ABSTRACT
Hybrid modelers such as Simulink have become corner stones of embedded systems development. They allow both discrete controllers and their continuous environments to be expressed in a single language. Despite the availability of such tools, there remain a number of issues related to the lack of reproducibility of simulations and to the separation of the continuous part, which has to be exercised by a numerical solver, from the discrete part, which must be guaranteed not to evolve during a step.
Starting from a minimal, yet full-featured, Lustre-like synchronous language, this paper presents a conservative extension where data-flow equations can be mixed with ordinary differential equations (ODEs) with possible reset. A type system is proposed to statically distinguish discrete computations from continuous ones and to ensure that signals are used in their proper domains. We propose a semantics based on non-standard analysis which gives a synchronous interpretation to the whole language, clarifies the discrete/continuous interaction and the treatment of zero-crossings, and also allows the correctness of the type system to be established.
The extended data-flow language is realized through a source-to-source transformation into a synchronous subset, which can then be compiled using existing tools into routines that are both efficient and bounded in their use of memory. These routines are orchestrated with a single off-the-shelf numerical solver using a simple but precise algorithm which treats causally-related cascades of zero-crossings. We have validated the viability of the approach through experiments with the Sundials library.
- A. Benveniste. Compositional and uniform modelling of hybrid systems. IEEE Trans. on Automatic Control, 43(4):579--584, April 1998.Google ScholarCross Ref
- A. Benveniste, B. Caillaud, and M. Pouzet. The fundamentals of hybrid systems modelers. In 49th IEEE Int. Conf. on Decision and Control (CDC), Atlanta, Georgia, USA, December 2010.Google ScholarCross Ref
- A. Benveniste, P. LeGuernic, and Ch. Jacquemot. Synchronous programming with events and relations: the SIGNAL language and its semantics. Science of Computer Programming, 16:103--149, 1991. Google ScholarDigital Library
- D. Biernacki, J.-L. Cola\c co, G. Hamon, and M. Pouzet. Clock-directed modular code generation of synchronous data-flow languages. In ACM Int. Conf. on Languages, Compilers, and Tools for Embedded Systems (LCTES), Tucson, Arizona, June 2008. Google ScholarDigital Library
- S. Bliudze and D. Krob. Modelling of complex systems: Systems as dataflow machines. Fundamenta Informaticae, 91(2):251--274, 2009. Google ScholarDigital Library
- S.L. Campbell, J.-Ph. Chancelier, and R. Nikoukhah. Modeling and Simulation in Scilab/Scicos. Springer, 2006. Google ScholarDigital Library
- L.P. Carloni, R. Passerone, A. Pinto, and A.L. Sangiovanni-Vincentelli. Languages and tools for hybrid systems design. Foundations and Trends in Electronic Design Automation, 1(1/2), 2006. Google ScholarDigital Library
- B. Denckla and P.J. Mosterman. Stream- and state-based semantics of hierarchy in block diagrams. In 17th IFAC World Congress, pages 7955--7960, Seoul, Korea, 2008.Google ScholarCross Ref
- C. Elliott and P. Hudak. Functional reactive animation. In Proc. of the ACM SIGPLAN Int. Conf. on Functional Programming (ICFP'97), pages 263--273, Amsterdam, The Netherlands, August 1997. Google ScholarDigital Library
- N. Halbwachs, P. Caspi, P. Raymond, and D. Pilaud. The synchronous dataflow programming language lustre. Proc. of the IEEE, 79(9):1305--1320, September 1991.Google ScholarCross Ref
- A.C. Hindmarsh, P.N. Brown, K.E. Grant, S.L. Lee, R. Serban, D.E. Shumaker, and C.S. Woodward. SUNDIALS: Suite of nonlinear and differential/algebraic equation solvers. ACM Trans. on Mathematical Software, 31(3):363--396, September 2005. Google ScholarDigital Library
- E.A. Lee and A.L. Sangiovanni-Vincentelli. A framework for comparing models of computation. IEEE Trans. on CAD of Integrated Circuits and Systems, 17(12):1217--1229, 1998. Google ScholarDigital Library
- E.A. Lee and H. Zheng. Operational semantics of hybrid systems. In Hybrid Systems: Computation and Control (HSCC), volume 3414 of LNCS, pages 25--53, 2005. Google ScholarDigital Library
- E.A. Lee and H. Zheng. Leveraging synchronous language principles for heterogeneous modeling and design of embedded systems. In Proc. of the 7th ACM & IEEE Int. Conf. on Embedded software (EMSOFT), pages 114--123, 2007. Google ScholarDigital Library
- P.J. Mosterman, J. Zander, G. Hamon, and B. Denckla. Towards computational hybrid system semantics for time-based block diagrams. In 3rd IFAC Conf. on Analysis and Design of Hybrid Systems (ADHS'09), pages 376--385, Zaragoza, Spain, September 2009.Google ScholarCross Ref
- M. Najafi and R. Nikoukhah. Implementation of hybrid automata in scicos. In IEEE Multi-conference on Systems and Control, 2007.Google Scholar
- R. Nikoukhah. Hybrid dynamics in modelica: Should all events be considered synchronous? In First Int. Workshop on Equation-Based Object Oriented Languages and Tools (EOOLT 2007), pages 37--48, Berlin, Germany, 2007.Google Scholar
- H. Nilsson, A. Courtney, and J. Peterson. Functional reactive programming, continued. In Haskell'02: Proc. of the 2002 ACM SIGPLAN workshop on Haskell, pages 51--64, Pittsburgh, Pennsylvania, January 2002. Google ScholarDigital Library
- M. Pouzet. Lucid Synchrone, version 3. Tutorial and reference manual. Université Paris-Sud, LRI, April 2006. Distribution available at: www.lri.fr/$\sim$pouzet/lucid-synchrone.Google Scholar
- S. Tripakis, C. Sofronis, P. Caspi, and A. Curic. Translating discrete-time simulink to lustre. ACM Trans. on Embedded Computing Systems, 4(4):779--818, 2005. Google ScholarDigital Library
Index Terms
- Divide and recycle: types and compilation for a hybrid synchronous language
Recommendations
Divide and recycle: types and compilation for a hybrid synchronous language
LCTES '10Hybrid modelers such as Simulink have become corner stones of embedded systems development. They allow both discrete controllers and their continuous environments to be expressed in a single language. Despite the availability of such tools, there remain ...
A hybrid synchronous language with hierarchical automata: static typing and translation to synchronous code
EMSOFT '11: Proceedings of the ninth ACM international conference on Embedded softwareHybrid modeling tools like Simulink have evolved from simulation platforms into development platforms on which testing, verification and code generation are also performed. It is critical to ensure that the results of simulation, compilation and ...
Building a hybrid systems modeler from synchronous language principles
EMSOFT '15: Proceedings of the 12th International Conference on Embedded SoftwareHybrid systems modeling languages are widely used in the development of embedded systems. Two representatives are Simulink/Stateflow1 that combine Ordinary Differential Equations (ODEs), data-flow and difference equations, hierarchical automata a la ...
Comments