Control Systems Academy.com
HOME
Web-based Simulator Documentation

Web-based Simulator Documentation

Introduction

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

Gain

Integrator

Transfer Function

Constant

Scope

Step function

Ramp function

Saturation

Sine function

Perturbation Source


pcc2

Perturbation Sink

General Block Diagram Action

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

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.
pcc2
pcc2

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.
pcc2

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.
pcc2
pcc2

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

8/3/2017

9/20/2017

9/21/2017

9/22/2017

9/24/2017

9/26/2017

9/27/2017

10/1/2017

10/15/2017

11/19/2017

04/01/2018

04/01/2018

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


Website Partially Powered by w3.css