Control Systems
Web-based Simulator Documentation

Web-based Simulator Documentation


The Web-based Transfer Function Simulator is a simplistic (yet quite powerful) imitation of commercial products such as Simulink(r) by MathWorks(c) or PLECS(r) by PLEXIM(c). The purpose behind providing the simulator is simple: not everyone has access to Simulink. Alternatively, there might not a free license at the time or simply one would like to explore the design of control systems online on a machine without installed MatLab.

Simulator Options

At the moment, these options are available:

Block Description

At the moment, these blocks are available:

Summing junction



Transfer Function



Step function

Ramp function


Sine function

Perturbation Source


Perturbation Sink

General Block Diagram Action

The main purpose of this window is to let user delete highlighted connections.

Simulation Settings

Two simulation settings are available: end-time and simulation time step. The time step is currently fixed at 10 us (this limits the maximum reasonable pole frequency to ~ 5 kHz). The end time could be as short as 100 ms and as long as 10 s.

Simulation Info

The Simulation Info pop-up displays the number of blocks in the simulation as well as the number of connections and all simulation settings. It truly is an FYI feature.

Behind the Scene

Schematic Block Connections

Each connection is a "tree" - that is, each connection is an object. The master connection starts at an absolute position and an "xy" vector with differential values determines shape of the connection.

Connection starts with the sink port. That is, each connection can have only one driver.

Each fork in a connection is the place where the parent connection has at least (but three at most) children connections. Children connections do not have the absolute position available.

The picture below shows the actual connection object for the longer connection in the accompanying schematic.

The following describes the behavior when extending a connection.

When extending a connection:

  1. End connection extension
    • a. If the previous connection is vertical, start vertical
    • b. If the previous connection is horizontal, start horizontal
  2. Start of existing connection
    • a. The same as 1a)
    • b. The same as 1b)
  3. Middle of an existing connection
    • a. Always perpendicular
  4. Block port
    • a. Have a unity length stub in the direction of the port (could be any of the four)

When dropping a connection:

  1. In open space - follow the rules above
  2. On a block port - have a unity length stub
  3. On a net (must be a master connection sink) - both rotations are ok

Cannot drop the connection on:

  1. Source net
    • a. Existing connection except starts of other nets
    • b. Occupied sink ports (covered by condition a)
    • c. Source ports
  2. Sink net
    • a. Ends of the same net
    • b. Sink ports
    • c. Master nets start

To Do:

  1. Save/Load function
    • Allow the user to save and load schematics. This will likely be done using JSON, but of course the existing data structures used for connections and blocks are not supported.
  2. Move connection
    • Existing connections could be dragged around. This is difficult, however, since many times parent canopy would be affected as well.
  3. Detect algebraic loops
    • Currently the simulator does not detect algebraic loops and therefore does not produce correct results if there are some.
  4. Convergence
    • The simulator steps through all existing nets and calculates the next step individually - using backward Euler approximation. This leads to errors over time. But this is not a Simulink replacement...
    • If a pole is at a very high frequency (say more than 1/100th of the step frequency), the step should be adjusted.
  5. Add additional blocks
    • Sine wave
    • Saturation

Change log













Please leave us a comment regarding the content at this page.

Website Partially Powered by w3.css