State Machines in Modelica

The scope of Modelica has been extended from a language primarily intended for physical systems modeling to modeling of complete systems by allowing the modeling of control systems including state machines. This paper describes the state machines introduced in Modelica 3.3. 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. The paper gives the details for building state machines and includes several examples. In addition, the complete semantics is described using only 13 Modelica equations.