About Synchronous Handling and State Machines

Sampled data systems with different sampling rates can be defined and synchronized. State machine handling is also supported.

This page discusses:

Synchronous Handling

The Modelica language contains synchronous language elements, and those elements are used in the library Modelica_Synchronous.

The most important types of blocks in this library are:

  • Clocks - a number of different clocks can be generated, for example periodic clocks and event clocks.
  • Sample and Hold - various blocks are available to sample, subsample, supersample and hold signals.

Non-linear inverse models are supported, as are engine control using event clocks.

State Machines

The Modelica language supports state machines.

Any block without continuous-time equations or algorithms can be a state of a state machine. Transitions between such blocks are modeled by a new kind of connections associated with transition conditions. A cluster of such blocks at the same hierarchical level which are coupled by transitions equations constitutes a state machine.

All parts of a state machine must have the same clock. One and only one instance in each state machine must be marked as initial by appearing in an initialState equation. Hierarchical state machines are supported.

For using the state machine editor in Dymola Behavior Modeling, see Creating and Simulating a Simple State Machine.

Tutorial and Documentation

A tutorial on synchronous handling and state machines, including many examples, is available: from the Behavior Tools section of the action bar, click Modelica Synchronous Tutorial .

More documentation, including documentation of the tutorial, is available in the Program Directories. See Modelica Library Documentation.