Prev Next

SysPhS Simulation Examples

This section provides a worked example for each of these stages: creating a SysML model for a domain, simulating it, and evaluating the results of the simulation. The examples apply the information discussed in the earlier topics.

Examples

Model

Description

See also

Analog Electrical Circuit OpAmp

The first example is of the simulation of a simple electronic circuit. The example starts with an Block Definition Diagram with blocks defining the circuit components, and a Block containing an Internal Block Definition diagram that outlines the circuitry. The model is then simulated and the sine wave voltage at the source and the target terminals of the OpAmp are evaluated and compared to the expected values.

OpAmp Circuit Simulation Example

Digital Electronics Simulation Example

The second example uses a standard Flip Flop component, that is predefined in both Modelica and Simulink, to create a simple, Flip Flop based, digital signal frequency divider. This gives examples of how to use the SysPhS notation to reference components that are available in Modelica and Simulink, but are not defined in the SysPhS patterns.

Digital Electronics Simulation Example

Humidifier Simulation Example

The example runs over using a SysML StateMachine diagram for defining the on-off state of a humidifier in operation. This is generated to Modelica and MATLAB's StateFlow diagram for simulation.

Humidifier Example

Notes

  • You need to provide a note on if they are physical or signal models, and therefore whether you need Simulink or Simscape

Learn More (Videos and WebEA)