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 new kind of connections associated with transition conditions. The paper gives the details for building state machines and includes many examples. In addition; the complete semantics is described using only 13 Modelica equations.
Keywords: Modelica; State Machines; Control
Proceedings of the 9th International MODELICA Conference; September 3-5; 2012; Munich; Germany
Elmqvist H.; Otter M.; and Mattsson S.E. (2012): Fundamentals of Synchronous Control in Modelica. Proceedings of 9th International Modelica Conference; Munich; Germany; September 3-5.
Friedenthal S.; Moore A.; and Steiner R. (2008): A Practical Guide to SysML –The Systems Modeling Language; Elsevier Inc.
Gaucher F.; Closse E.; Weil D. (2009): The LCM Language Primer; Dassault Systèmes Internal Report; Grenoble; France; 2009
Hamon G.; and Rushby J. (2004). An operational semantics for Stateflow. In Fundamental Approaches to Software Engineering (FASE)’04; volume 2984 of LNCS; pages 229–243; Barcelona; Spain; 2004. Springer. http://fm.csl.sri.com/~rushby/papers/sttt07.pdf
Harel; D. (1987): Statecharts: A Visual Formalism for Complex Systems. Science of Computer Programming 8; 231-274. Department of Applied Mathematics; The Weizmann Institute of Science; Rehovot; Israel. www.inf.ed.ac.uk/teaching/courses/seoc1/2005_2006/resources/statecharts.pdf
Malmheden M.; Elmqvist H.; Mattsson S.E.; Henriksson D.; and Otter M. (2008): ModeGraph - A Modelica Library for Embedded Control Based on Mode-Automata. B. Bachmann (editor); in Proc. of Modelica?2008 conference; Bielefeld; Germany. www.modelica.org/events/modelica2008/Proceedings/sessions/session3a3.pdf
Maraninchi; F. and Rémond; Y. (2002): Mode-Automata: a New Domain-Specific Construct for the Development of Safe Critical Systems. http://wwwverimag.imag.fr/~maraninx/SCP2002.html
MathWorks (2012): R2012a Documentation - Stateflow http://www.mathworks.com/help/toolbox/stateflow/
Modelica Association (2012): Modelica Language Specification Version 3.3. https://www.modelica.org/documents/ModelicaSpec33.pdf.
Mosterman P.; M. Otter; and H. Elmqvist. (1998): Modeling Petri Nets as Local Constraint Equations for Hybrid Systems using Modelica. Proceedings of SCSC?98; Reno; Nevada; USA; Society for Computer Simulation International; pp. 314–319.
Otter M.; K.-E. Årzén; and I. Dressler (2005): StateGraph – A Modelica Library for Hierarchical State Machines. Proceedings of the 4th International Modelica Conference; Hamburg; Germany; ed. G. Schmitz; pp. 569-578. http://www.modelica.org/events/Conference2005/online_proceedings/Session7/Session7b2.pdf
Otter M.; Malmheden M.; Elmqvist H.; S.E. Mattsson; and C. Johnsson (2009): A New Formalism for Modeling of Reactive and Hybrid Systems. Proceedings of the 7th International Modelica Conference; Como; Italy; 20-22 September 2009. http://www.ep.liu.se/ecp/043/041/ecp09430108.pdf
Pouzet M. (2006): Lucid Synchrone; Version 3.0; Tutorial and Reference Manual. http://www.di.ens.fr/~pouzet/lucid-synchrone/