Embedded systems have become pervasive. They are prevalent in many aspects of our everyday lives, from controlling cars using anti-lock braking systems (ABSs) to controlling the rhythm of hearts using a pacemaker. All of these systems are discrete computers embedded within a continuous environment. Hybrid modelers are an important tool for studying and analyzing the interaction between discrete computation and the control of a continuous environment.
A number of tools exist for modeling, simulating, and analyzing hybrid systems, including Simulink/Stateflow, Modelica, and Ptolemy. This paper enriches the literature with a type system that enables a clean factorization of a hybrid model into its discrete and continuous parts. It presents the factorization in the form of a compilation scheme that transforms well-typed hybrid models into synchronous programs, and a set of open dynamics engines (ODEs). Traditional tools available for synchronous languages can then simulate the synchronous program, and well-known ODE solvers can solve the ODEs. The heart of the compilation scheme is the interface between the ODE solvers and the synchronous code that takes the form of additional parameters to the synchronous functions, capturing information about zero crossings and continuous state variables.
This paper is interesting because it provides a declarative approach for structuring hybrid models, as compared to the operational concept of “directors” used in Ptolemy. The use of a type system to enable factorization of a hybrid model is also quite novel. The type system also opens up the possibility of developing more expressive proof systems for reasoning about hybrid models in the future.