Computing and Software Science pp 283310  Cite as
MultiMode DAE Models  Challenges, Theory and Implementation
 2 Citations
 1.4k Downloads
Abstract
Our objective is to model and simulate CyberPhysical Systems (CPS) such as robots, vehicles, and power plants. The structure of CPS models may change during simulation due to the desired operation, due to failure situations or due to changes in physical conditions. Corresponding models are called multimode. We are interested in multidomain, componentoriented modeling as performed, for example, with the modeling language Modelica that leads naturally to Differential Algebraic Equations (DAEs). This paper is thus about multimode DAE systems. In particular, new methods are discussed to overcome one key problem that was only solved for specific subclasses of systems before: How to switch from one mode to another one when the number of equations may change and variables may exhibit impulsive behavior? An evaluation is performed both with the experimental modeling and simulation system Modia, a domain specific language extension of the programming language Julia, and with SunDAE, a novel structural analysis library for multimode DAE systems.
Keywords
MultiMode systems CyberPhysical Systems CPS Modia Modelica Differential algebraic equations DAE Differential index Structural analysis Operational semantics Constructive semantics Nonstandard analysis1 Introduction
This should not come as a surprise, as the first principles of physics naturally lead to considering acausal models such as the one in Fig. 1left. Consider, for example, the case of electric circuits. Socalled circuit laws such as Kirchhoff laws, are naturally expressed as balance equations: the algebraic sum of currents in a network of conductors meeting at a point is zero; or, the sum of all the voltages around a loop is equal to zero. Similarly, some components (such as, e.g., resistors or capacitors) come with no input/output prespecified orientation. A same circuit can be assigned different input/output status for its variables, depending on which ones are declared as sources. The same situation arises in mechanics or in thermodynamics. Engineers interested in multiphysics modeling have identified this fact since the 70’s by proposing bond graphs [17, 31], in which electric circuits, mechanical systems, and thermodynamical systems, are abstracted to a common framework manipulating efforts, flows, and junctions. To summarize, for systems made of a large number of interconnected components, getting the usual input/output state space model (such as in Simulink block diagrams) becomes intractable, whereas it remains manageable if acausal models are supported.
 1.
make the specification of large (single mode) Cyber Physical Systems more modular, more elegant, and with better reuse;
 2.
are indispensable to synthesize proper restart conditions at mode changes, for models where this cannot be done manually—the idealized clutch model being a simple example.
It should also be clear that classical state space input/output formalisms (such as Simulink block diagrams) do not address the above challenges. Neither does the formalism of hybrid automata [1] used as the model of hybrid systems by several verification tools such as Flow* or SpaceEx.
Causal input/output state space models are based on Ordinary Differential Equations (ODE), of the form \(\dot{x}=f(x,u)\) where x is the state and u the input, whereas acausal models à la Modelica are based on Differential Algebraic Equations (DAE) of the form \(f(\dot{x},x,v)=0\) where x is a state and v an algebraic variable, for which no input or output status can be a priori specified.
In this paper we propose a theory to support the compilation of multimode DAE based models in a systematic and mathematically sound way. We want to reject some models that are in some sense spurious. And we want to synthesize (whenever needed, not in all cases) the computation of the restart conditions at mode changes. All of this will be performed at compile time, through a special static analysis called the structural analysis, which is an important topic of this paper. This structural analysis is an essential preprocessing step prior to generating simulation code. We will illustrate our purpose by an example from electromechanics that includes a clutch as one of its subsystems. The specification, analysis, compilation, and simulation of this model will be illustrated using the recently proposed experimental modeling language called Modia.
2 StateoftheArt and Related Work
There exists an extensive body of work related to the numerical solution of singlemode DAEs, especially [9], as well as to the modeling and simulation of singlemode multidomain models leading to DAEs^{1}.
Mechanical systems featuring impulses are known since the 18th century. A large literature about multibody systems with contacts and impulses exists, for example [25, 26]. The current research focuses on simulating contacts between many bodies using time stepping methods. Contact equations are usually described approximately on velocity or acceleration level (if contact occurs, the relative velocity or acceleration between the relevant bodies is constrained to be zero). Since the constraints on position level are not explicitly taken into account, typically a drift occurs that is usually not relevant for systems with many contacting bodies but is not acceptable for general multimode DAEs. An exception is [29], where constraints on position level are enforced. It is not obvious how the specialized multimode methods for multibody systems can be generalized to any type of multimode DAE.
Also for electrical circuits with idealized switches, like ideal diodes, impulses can occur. Again a large literature is available concentrating mostly on specialized electrical circuits such as piecewiselinear networks with idealized switches [2, 16, 32]. Again, it is not obvious how to generalize methods in this specialized area to general multimode DAEs.
The paper of Mehrmann et al. [20] contains interesting results regarding numerical techniques to detect chattering between modes. It, however, assumes that consistent reset values are explicitly given for each mode. Such an assumption does not hold in general, especially for a compositional framework where one wants to assemble predefined physical components.
In the PhDthesis of Zimmer [33] variablestructure multidomain DAEs are defined with a special modeling language and a runtime interpreter is used that processes the DAE equations at runtime, when the structure and/or the index is changing. Limitations of this work are that impulsive behavior is not supported and that the user has to define the transfer of variable values from one mode to the next mode explicitly, which is not practical for large models.
Describing variable structure systems with causal state machines is discussed by Pepper et al. [24].
Elmqvist et al. [13, 19] propose a high level description of multimode models as an extension to the synchronous Modelica 3.3 state machines by using continuoustime state machines having continuoustime models as “states”. Besides ODEs as used in hybrid automata, also acausal DAE models with physical connectors can be a “state” of a state machine. Such a state machine is mapped into a form so that the resulting equations can be processed by standard symbolic algorithms supported by Modelica tools. The major restrictions of this approach are that mode changes with impulsive behavior are not supported and that not all types of multimode systems can be handled due to the static code generation.
Benveniste et al. [3, 5] tackle the problem of variable structure, varying index DAEs from a fundamental point of view by using a low level description of DAEs with a few language elements only and a precise mathematical description of the semantics based on nonstandard analysis. A proofofconcept mockup, SunDAE, was developed implementing this approach.
3 The Modia Language
Modelica [21] is a stateoftheart modeling language for multidomain modeling. Recently, an experimental language which is similar to Modelica and called Modia [11, 12] has been designed and implemented. Modia is a domain specific language extension of Julia [8] by means of structured macros, that is, the Julia parser is used to parse Modia models. The Modia language elements will be introduced through a small set of examples.
The equation J*der(w) = flange.tau is Euler’s equation for the rotational motion of the inertia. The operator der() denotes time derivative.
The results of a simulation are shown in Fig. 4. The initial angular velocity of inertia1 is 0 rad/s and 10 rad/s for inertia2. The capacitor is initially uncharged. The upper two partly overlapping curves are the angular velocities of inertia1 and inertia2. When the clutch is disengaged, the angular velocity of inertia2 is constant. The lower curve shows the voltage over the capacitor. Since the clutch is engaged at initialization, Dirac impulses occur at time = 0 s. As a result, after initialization the angular velocities of the two inertia are identical. The common angular velocity at time = 0 s is not 8 rad/s as in the example TwoInertias, but 6.4 rad/s. The reason is that the capacitor acts in the same way as an additional moment of inertia to inertia1. The effective inertia is \(J1' = J1 + k^2*C = 0.1 + 0.25^2*2 = 0.225\). Thus, the angular velocity at time=0 s becomes \(w = (J1'*w1 + J2*w2)/(J1'+J2) = (0.225*0 + 0.4*10)/(0.225+0.4) = 6.4\) rad/s. There are no Dirac impulses at time = 100 s when the clutch disengages, but again Dirac impulses at time = 300 s when the clutch engages again.
4 Simulating a Restricted Class of MultiMode DAEs
In this section, we propose a method to simulate a restricted class of multimode DAE systems, encompassing in particular our example of Fig. 3 and its simulation result in Fig. 4.
Throughout this paper, we use the classical notations \(\dot{x}\) and \(\ddot{x}\) to denote the first and second timederivatives of a function of continuous time \(x:\mathbb {R}\mapsto \mathbb {R}\). When such a notation is not appropriate for readability reasons, we sometimes write instead \(x'\) and \(x''\). The notation for higher order derivatives is indicated when needed. We write vectors and matrices in boldface. The transpose of a matrix \(\varvec{G}\) is written \(\varvec{G}^T\).
4.1 Problem Setting

vector \(\varvec{x}_{\gamma }\) of length \(n_{\gamma }\) collects variables that are present in all modes and in the predicates \(\gamma _i(\dots )\),

vector \(\varvec{x}_i\) of length \(n_i\) collects all variables that are used in mode i (\(\varvec{x}_{\gamma }\) is a subset of \(\varvec{x}_i\)), and

\(\gamma _i \in \mathbb {R}^{n_{\gamma }} \times \mathbb {R}^{n_{\gamma }} \times \mathbb {R} \rightarrow \text {Boolean}, \quad \varvec{f}_i \in \mathbb {R}^{n_i} \times \mathbb {R}^{n_i} \times \mathbb {R} \rightarrow \mathbb {R}^{n_i}\).
Note that the class (1) of multimode systems is not compositional as the predicates \(\varvec{x}_\gamma \) are global. We restricted ourselves to this class in order to simplify the exposure below. This restriction is relaxed in the actual implementation in Modia. For instance, Open image in new window Clutch in Sect. 3 has a local definition of the predicate to engage or disengage the clutch and there is no global ifclause. In Sect. 5, where an alternative approach is discussed, such restrictions are not present.
4.2 Handling Mode Changes
In a mode i, an initial value problem \(\varvec{f}_i(\dot{\varvec{x}}_i,\varvec{x}_i,t) = \varvec{0}\) has to be solved. It is wellknown that only special classes of DAEs can be directly numerically integrated [9]. For this reason, general DAEs might be first transformed in to a DAE class where reliable integration methods exist. For nonlinear systems such a transformation means that equations of the DAE might need to be (analytically) differentiated. The best integration methods exist for ODEs \(\dot{\varvec{x}} = \bar{\varvec{f}}(\varvec{x},t)\). However, transforming a DAE to this form requires in general to solve nonlinear algebraic equation systems at every model evaluation and therefore the benefit of ODE integration methods might get lost. For this reason, another approach is used in this section where the transformation to a numerically solvable form is performed without solving algebraic equation systems. In Assumption 1 we define the target DAE class for this transformation:
Assumption 1
In (2), subscripts “\(_d\)” and “\(_c\)” are reminiscent of “dynamics” and “constraint”, respectively. Condition (3) means that System (2) has differentiation index one.^{2}
Transforming General DAEs to System (2, 3). If the model equations in a given mode are not in the form (2, 3), they are transformed to it. This transformation is nontrivial and it is beyond the scope of this paper to explain the details. Only a short overview is given here: Typically, the Pantelides algorithm [23], or a variant like [27], is used to determine which equations of the original DAE must be differentiated in order that the highest derivative variables can be uniquely determined from the highest derivative equations. By differentiating the corresponding equations analytically it is then possible to transform to ODE form. Hereby, algebraic equation systems might need to be solved. In [22] a new algorithm is proposed to transform every DAE that can be treated with the Pantelides algorithm to the form of Assumption 1 without solving algebraic equation systems. This algorithm is a generalization of [15] that was developed for singlemode multibody systems. In Sect. 4.3 it is applied to multimode multibody systems.
To derive our method for computing the restart values, we first restrict the class of systems with the following additional assumption. We then discuss the general case.
Assumption 2
Note that Assumption 2 does not forbid that the triple defining the dynamics (7) actually varies with the mode i, that is has the form \((\varvec{A}_i,\varvec{b}_i,\varvec{f}_{c,i})\). Since elements of \(\varvec{x}\) may be discontinuous, \(\dot{\varvec{x}}\) may have Dirac impulses. In (7) it is therefore assumed that \(\dot{\varvec{x}}\) having potentially Dirac impulses appear linearly and the linear factors are continuous functions without discontinuities.
Thus, if Assumption 2 holds, the form (2) for the system model at mode i can be used to numerically compute restart values for this mode: At the instant of the mode change integrate (2) with either mixed explicit/implicit Euler or implicit Euler schemes, from \(\varvec{x}^{}\) over a small stepsize h, thereby scaling the dynamic part of the model, \(\varvec{f}_{d}({..})\), with h. The solution of the nonlinear equation system (9) converges to the solution of the system (8).

Relaxing the continuity assumption on \(\varvec{A}(\dots )\), so that \(\varvec{A}(\varvec{x},t)\) might have discontinuous elements: As a result the first contribution in the decomposition of the integral \(\int _{t_{ ev}}^{t_{ ev}+\varepsilon }\varvec{f}_{d}(\dot{\varvec{x}}, \varvec{x},t)dt\) is no longer negligible and it is unclear, from the literature, whether a welldefined meaning to this term exists.

Removing the linearity assumption on \(\dot{\varvec{x}}\): The solution is no longer a Dirac and it is again unclear whether a welldefined solution exists. It is not even clear that h is the proper scaling factor for \(\varvec{f}_d\). Note that the linearity assumption quite often holds for physical system models, since balance equations in physics are linear in their derivatives.
To summarize, there is some evidence that precautions must be taken when relaxing Assumption 2.
4.3 A Class of Multimode Multibody Systems Satisfying Assumptions 1 and 2
4.4 Example: Ideal Clutch with Motor
4.5 Implementation of Multimode Features in Modia
The implementation of Modia is described in [12]. An extension of Modia to support a restricted class of multimode DAE systems along the lines developed in this section is currently under development. Since completely different sets of equations can be present in different modes, the implementation is based on justintime symbolic transformations and code generation of residue functions. A dictionary from a Boolean vector of mode flags to functions is used as a cache to avoid symbolic transformations and code generation in case the same modes have been active before and a corresponding function is already available to calculate the residues.
The final values of all variables from one simulation is extracted when a mode change event happens. These are inputs to one very short implicit Euler step with the residue function for the newly enabled modes in order to correctly simulate possible impulses. The new values of the state vector is used to start a new simulation until the next mode change.
5 Structural Analysis of MultiMode DAE Systems
In Sect. 4 we proposed an approach to analyze and simulate multimode DAE systems based on a generalization of DAE theory.
In this section we propose an alternative approach, more computer science oriented and detailed in [3] (as well as its companion technical report [5]), which works for general multimode systems and uses a small number of principles. The key ideas are as follows.
 1.
Mode changes may result in discontinuous jumps and, therefore, resets must be performed in discrete computation steps. Hence, we first map the original system to discrete time by using a first order Euler scheme. This brings to discrete time both the reset actions and the dynamics within each mode, hence the principles of index analysis uniformly apply, albeit in discrete time. Also, a new principle of mode causality is invoked.
 2.
Mapping the dynamics to discrete time results in approximations. No approximation, however, results if we interpret the Euler scheme via nonstandard analysis [18, 28] by using an infinitesimal time step. The analysis is then performed over the nonstandard reals. A final standardization step is applied to recover an effective numerical scheme.
5.1 Separate Analysis of Each Mode, in Discrete Time
We begin by providing the model for each mode. We highlight in Open image in new window the equations that are unique to the considered mode. Other equations are shared. In the “released” mode, the two shafts are independent. In the “engaged” mode, the velocities of the two shafts are algebraically related.
The above reasoning applies in continuous time where the forward shift is substituted back using differentiation. As far as structural analysis is concerned, we can freely exchange continuous and discrete time using the correspondence \(\dot{\omega }~\leftrightarrow \frac{\omega ^\bullet \omega }{\delta }\).
5.2 Global DiscreteTime Analysis
1. Using \((e_1),\dots ,(e_3)\) Those three equations are active in all modes. Equation \((e_3)\) is useless, so we are left with 2 equations and 4 leading variables and no subset of them can be evaluated using the 3 available equations only. We thus have to evaluate the guard \(\gamma \) in order to know which equation among \((e_4)\) or \((e_5)\) is active. We successively analyze the two cases below.
 Case \(\omega _1=\omega _2\) follows from previous time step. This corresponds to the case in which the system was already in mode “engaged” at the previous time step. The separate analysis developed for the “engaged” mode in Sect. 5.1 applies with no change. The model, as augmented with the two latent equations \((e_3^\bullet ,e_5^\bullet )\) is (29engaged), in which \(({e_3},{e_5})\) are taken as assumptions:$$\begin{aligned} \begin{array}{rcl} \mathtt {assuming} &{}:&{} \left\{ \begin{array}{rll} (e_3):&{}&{} 0= k \omega _1  u \\ (e_5):&{}&{} 0= {\omega _1}{\omega _2} \end{array}\right. \\ \mathtt {if}\;\gamma =\text{ f }&{}\mathtt {do}&{} \text {(29engaged}\,\setminus \,\{(e_3),(e_5)\}) \end{array} \end{aligned}$$(33)

Case \(\omega _1=\omega _2\) does not follow from previous time step. This arises if the system is engaged at the current instant t, but was released at the immediate previous time step, \(t\delta \), i.e., t is an instant of mode change \(\gamma :\text{ t }\rightarrow \text{ f }\). This yields a new situation, not seen in Sect. 5.1. The engaged mode requires the consistency equation \(\omega _1=\omega _2\), whereas \(\omega _1(t)\) and \(\omega _2(t)\) were both evaluated at the previous time step \(t\delta \), at which \(\omega _1^\bullet (t\delta )=\omega _2^\bullet (t\delta )\) was not enforced. As a consequence, equation \((e_5)\) of System (31) is enabled. Unfortunately, \((e_5)\) possesses no dependent variable and the values of the state variables \(\omega _1\) and \(\omega _2\) were set at previous time step \(t\delta \), with no guarantee that \(\omega _1(t)=\omega _2(t)\) would result. System (31) is thus overdetermined at time t. A first idea would be to reject this kind of model. This would be unfortunate as our original model (26) was natural for our electromechanical system. To overcome this issue, we invoke the following
Principle 1
(Mode Causality Principle). A guard must be evaluated before the equation it controls.
The corresponding complete execution scheme is shown in Fig. 5. In this figure, boxes are the states of the execution scheme and their content specifies the configuration of guard, variables, and equations. For the guard and the variables: \({v}\) (resp. \(\overline{v}\)) means \(v=\text{ t }\) (resp. \(v=\text{ f }\)). For equations, \({e}\) (resp. \(\overline{e}\)) means that e is active (resp. disabled) and \(\sharp {e}\) means that the body of e is assumed from previous time step. Not mentioning a variable or an equation in a box means that this variable is not evaluated yet and this equation is not solved yet; for shifted equations added by the algorithm, however, we mention them underlined. The transitions of the state machine indicate the actions performed when moving to the next state. \(\text{ FS }({e})\) indicates that e is shifted. \(\text{ PR }({e})\) indicates that e is known to be satisfied. \(\text{ LE }({e^\bullet })\) indicates that we add \(e^\bullet \) as a latent equation. Blue (resp. black) transitions belong to a continuoustime (resp. discretetime) dynamics. The red transition is impulsive. A semicolon is the sequential composition of computations, and the \(+\) sign denotes enabled blocks of equations, ready to be solved. The following comments are in order.
 1.
Observe first the parallel between the models sitting in the boxes of the diagram of Fig. 5 on the one hand, and the mixed explicit/implicit scheme (9) on the other hand. For this comparison, variables with superscript “\(^+\)” in (9) correspond to shifted variables in Fig. 5 and variables with superscript “\(^\)” in (9) correspond to non shifted variables in Fig. 5.
 2.Our development relies on a small set of principles:

We map the continuous time multimode System (26) to discrete time System (31) by mapping derivatives \(\dot{x}\) to their explicit Euler scheme \(\frac{x^\bullet x}{\delta }\).

Our massaging of the equations only depends on the values taken by the guards, and the assumption regarding the satisfaction/violation of the consistency equations (here \((e_3)\), and \((e_5)\) for the engaged mode). Otherwise, we make no distinction between instants of mode changes and other instants: our treatment is uniform.

Our massaging of the equations has two objectives: finding latent equations if needed, and shifting forward equations when required by the principle of mode causality (Principle 1).
This set of principles is small, clean, and powerful enough to encompass general systems with a structural analysis alike the one we developed here for the clutch example. See [3] for a presentation of this approach for general multimode DAE systems.

5.3 Effective Simulation Code

a DAE model of index zero or one for each mode, and

code for resetting the state variables at mode changes.
The model for each mode can be simulated, e.g., using a BDF method as proposed in Sect. 4.2. Regarding the resets at mode changes, \(\omega _i^{}\) is the previous value of state variable \(\omega _i\), which is the left limit of \(\omega _i\) when exiting a mode. Similarly, \(\omega _i^+\) is the reset value for state variable \(\omega _i\) when entering the new mode. Continuoustime dynamics are colored blue; nonimpulsive (resp. impulsive) resets are colored black (resp. red). The dynamics in each mode are defined by an overdetermined index1 DAE system consisting of an ODE system coupled to an algebraic constraint. In the transition from mode \(\overline{\gamma }\) to mode \(\gamma \), variable \(\tau \) is impulsive, and its value is not computed—it is set to \(\text{ NaN }\) (Not a Number). Let us explain how the code of Fig. 6 is deduced from the execution scheme of Fig. 5.
Nonstandard Analysis. First, we select the step size \(\delta \) to be infinitesimal in the sense of nonstandard analysis [18, 28], of which we informally recall the background we need.
In nonstandard analysis, the set \(\mathbb {R}\) of real numbers is extended with infinite numbers, which are larger than any real number, and infinitesimal numbers, which are smaller (in absolute value) than any nonzero real number. The resulting set \({^{\star \!}\mathbb {R}}\) is an extension of \(\mathbb {R}\) that keeps its basic properties. In particular, it is an ordered field. We will be writing \(x\approx {y}\) if \(xy\) is an infinitesimal. Any finite element \(z\in {^{\star \!}\mathbb {R}}\) has a standard part, defined as the unique real number \({ st}(z)\) such that \(z\approx { st}(z)\). Any element of \(\mathbb {R}\) is called standard.
Computing the Reset Values. As in the development of Sect. 4, one key contribution of our approach is the reset code for the mode transitions. Let us now explain how this part of Fig. 6 is derived from Fig. 5. Here the reasoning is different since we do not target a continuous time dynamics, but rather a finite sequence of discrete time steps implementing the reset actions.
5.4 Constructive Semantics
 1.
A specification of the set of atomic actions, which are effective, non interruptible, state transformation operations. Executing an atomic action is often referred to as performing a microstep;
 2.
A specification of the correct scheduling of the set of microsteps constituting a reaction, by which discrete time progresses, from the current instant to the next one.
The effect of atomic actions is to propagate knowledge regarding the statuses (not evaluated, evaluated) and values of variables. The computation of the constructive semantics of a synchronous program may succeed, and then the execution code is generated. Or it may fail, and then the program is rejected. The decision success/failure is formally sound, see [4, 6, 7].
For synchronous languages, atomic actions are restricted to either (i) the evaluation of a single expression, or (ii) control flow operations.
In contrast, the class of atomic actions for multimode difference algebraic equations systems comprises: (i) Evaluating a guard; (ii) Solving a block of numerical equations; (iii) Equation management operations, such as shifting an equation, adding a latent equation, or changing the status involved/not involved of an equation at a given mode.
In [3] we develop in detail the constructive semantics for multimode DAE systems. This allows us to formally define which model can be compiled and then simulated, and which cannot. Models that are under or overdetermined are rejected. In addition, models which are not handled by the Principle 1 of mode causality, are rejected as well. This approach is implemented in the SunDAE proof of concept tool.
The standardization of the constructive semantics remains open in part although its main principles have been clarified. The Standardization, however, requires symbolic processing related to computer algebra.
6 Challenges in DAE Based Modeling Languages
DAE based modeling languages are essential to the design of CPS. The development of such languages raise a number of challenges.
The correct simulation of mode changes and the need for resetting state variables is a first—mostly open—difficulty, particularly when impulses occur. In this paper, we proposed two different approaches for addressing this issue. The first approach relies on a transformation of the system model to a special index one form, followed by the application of a new formula for resetting the state variables. Arguments supporting this formula were given under additional assumptions on the model. The second approach builds on the use of nonstandard analysis, combined with the heritage of synchronous languages in computer science, particularly on the concept of constructive semantics. The classes of accepted/rejected models are well defined and simulation code is always produced for accepted models. In turn, the physical interpretation is understood only for restricted classes of models.
A particular difficulty of DAE based modeling languages is the need for sophisticated symbolic preprocessing of the model, called structural analysis. The Pantelides algorithm for computing the latent equations of a (singlemode) DAE model gave birth to a large body of literature since 1988. Our paper shows that structural analyses are also essential to handle mode changes.
Structural analyses play also a central role in scalingup to huge models involving millions of equations. The community of High Performance Computing has provided important related contributions, for singlemode DAE systems. Yet, modularity in compilation and simulation remains open.
Overall, we see as a grand challenge the development of a DAE based modeling language and tool with the following features: DAE models with a very large number of modes are supported; accepted/rejected models are formally characterized; huge models are supported and can be handled in a modular way. We see the new language Modia and the SunDAE library as good starting points for tackling such challenges.
Footnotes
 1.
See the extensive literature available in https://www.modelica.org/publications.
 2.
A DAE \(\varvec{f}(\dot{\varvec{x}},\varvec{x},t) = 0\) has differentiation index n if one or more equations must be differentiated ntimes until the equations can be algebraically transformed to an ODE form \(\dot{\varvec{x}} = \bar{f}(\varvec{x},t)\), see for example [30].
 3.
A function \(f:\mathbb {R}\mapsto \mathbb {R}\) is said to have bounded variation if it is the primitive of a Lebesgue integrable function [10]. As a consequence, \(\int _t^{t+h}\dot{f}(s)ds\rightarrow {0}\) when \(h\rightarrow {0}\).
Notes
Acknowledgements
The authors want to thank Toivo Henningsson, Lund, Sweden for the collaboration regarding Julia and the design of Modia, as well as the implementation of instantiation and flattening.
References
 1.Alur, R., Courcoubetis, C., Henzinger, T.A., Ho, P.H.: Hybrid automata: an algorithmic approach to the specification and verification of hybrid systems. In: Grossman, R.L., Nerode, A., Ravn, A.P., Rischel, H. (eds.) HS 19911992. LNCS, vol. 736, pp. 209–229. Springer, Heidelberg (1993). https://doi.org/10.1007/3540573186_30CrossRefGoogle Scholar
 2.Barela, M.: A complementarity approach to modeling dynamic electric circuits. Ph.D. thesis, University of Iowa (2016)Google Scholar
 3.Benveniste, A., Caillaud, B., Elmqvist, H., Ghorbal, K., Otter, M., Pouzet, M.: Structural analysis of multimode DAE systems. In: HSCC, pp. 253–263. ACM (2017)Google Scholar
 4.Benveniste, A., Caillaud, B., Guernic, P.L.: Compositionality in dataflow synchronous languages: specification and distributed code generation. Inf. Comput. 163(1), 125–171 (2000)MathSciNetCrossRefGoogle Scholar
 5.Benveniste,A., Caillaud, B., Pouzet, M., Elmqvist, H., Otter, M.: Structural analysis of multimode DAE systems. Research report RR8933, Inria, July 2016Google Scholar
 6.Benveniste, A., Caspi, P., Edwards, S.A., Halbwachs, N., Guernic, P.L., de Simone, R.: The synchronous languages 12 years later. Proc. IEEE 91(1), 64–83 (2003)CrossRefGoogle Scholar
 7.Berry, G.: Constructive semantics of Esterel: from theory to practice (abstract). In: Wirsing, M., Nivat, M. (eds.) AMAST 1996. LNCS, vol. 1101, p. 225. Springer, Heidelberg (1996). https://doi.org/10.1007/BFb0014318CrossRefGoogle Scholar
 8.Bezanson, J., Edelman, A., Karpinski, S., Shah, V.B.: Julia: a fresh approach to numerical computing. SIAM Rev. 59(1), 65–98 (2017)MathSciNetCrossRefGoogle Scholar
 9.Brenan, K.E., Campbell, S.L., Petzold, L.R.: Numerical Solution of Initial Value Problems in DifferentialAlgebraic Equations. SIAM (1996)Google Scholar
 10.Dunford, N., Schwartz, J.: Linear Operators, Part I, General Theory. WileyInterscience (1958)Google Scholar
 11.Elmqvist, H., Henningsson, T., Otter, M.: Systems modeling and programming in a unified environment based on Julia. In: Margaria, T., Steffen, B. (eds.) ISoLA 2016. LNCS, vol. 9953, pp. 198–217. Springer, Cham (2016). https://doi.org/10.1007/9783319471693_15CrossRefGoogle Scholar
 12.Elmqvist, H., Henningsson, T., Otter, M.: Innovations for future Modelica. In: Jiri Kofranek, F.C. (ed.) Proceedings of the 12th International Modelica Conference, May 2017. http://www.ep.liu.se/ecp/132/076/ecp17132693.pdf
 13.Elmqvist, H., Mattsson, S.E., Otter, M.: Modelica extensions for multimode DAE systems. In: Tummescheit, H., Arzèn, K.E. (eds.) Proceedings of the 10th International Modelica Conference, Lund, Sweden. Modelica Association, September 2014. http://www.ep.liu.se/ecp/096/019/ecp14096019.pdf
 14.Gear, C.W.: Differentialalgebraic equation index transformations. SIAM J. Sci. Stat. Comput. 9(1), 39–47 (1988)MathSciNetCrossRefGoogle Scholar
 15.Gear, C.W., Leimkuhler, B., Gupta, G.K.: Automatic integration of eulerlagrange equations with constraints. J. Comput. Appl. Math. 12, 77–90 (1985)MathSciNetCrossRefGoogle Scholar
 16.Heemels, W.P.M.H., Camlibel, M.K., Schumacher, J.M.: On the dynamic analysis of piecewiselinear networks. IEEE Trans. Circ. Syst. I: Fundam. Theory Appl. 49(3), 315–327 (2002)MathSciNetCrossRefGoogle Scholar
 17.Karnopp, D., Margolis, D., Rosenberg, R.: System Dynamics: A Unified Approach. Wiley, Hoboken (1990)Google Scholar
 18.Lindstrøm, T.: An invitation to nonstandard analysis. In: Cutland, N. (ed.) Nonstandard Analysis and its Applications, pp. 1–105. Cambridge University Press, Cambridge (1988)Google Scholar
 19.Mattsson, S.E., Otter, M., Elmqvist, H.: Multimode DAE systems with varying index. In: Elmqvist, H., Fritzson, P. (eds.) Proceedings of the 11th International Modelica Conference, Versailles, France. Modelica Association, September 2015. http://www.ep.liu.se/ecp/118/009/ecp1511889.pdf
 20.Mehrmann, V., Wunderlich, L.: Hybrid systems of differentialalgebraic equations  analysis and numerical solution. J. Process Control 19(8), 1218–1228 (2009). Special Section on Hybrid Systems: Modeling, Simulation and OptimizationCrossRefGoogle Scholar
 21.Modelica: A unified objectoriented language for systems modeling. Language Specification, Version 3.4. Technical report, Modelica Association, April 2017. https://www.modelica.org/documents/ModelicaSpec34.pdf
 22.Otter, M., Elmqvist, H.: Transformation of differential algebraic array equations to index one form. In: Kofranek, J., Casella, F. (eds.) Proceedings of the 12th International Modelica Conference, May 2017. http://www.ep.liu.se/ecp/132/064/ecp17132565.pdf
 23.Pantelides, C.: The consistent initialization of differentialalgebraic systems. SIAM J. Sci. Stat. Comput. 9(2), 213–231 (1988)MathSciNetCrossRefGoogle Scholar
 24.Pepper, P., Mehlhase, A., Höger, C., Scholz, L.: A compositional semantics for Modelicastyle variablestructure modeling. In: 4th International Workshop on EquationBased ObjectOriented Modeling Languages and Tools (2011). http://www.ep.liu.se/ecp/056/006/ecp1105606.pdf
 25.Pfeiffer, F.: On nonsmooth multibody dynamics. Proc. Inst. Mech. Eng. Part K: J. Multibody Dyn. 226(2), 147–177 (2012). http://journals.sagepub.com/doi/pdf/10.1177/1464419312438487Google Scholar
 26.Pfeiffer, F., Glocker, C.: Multibody Dynamics with Unilateral Contacts. Wiley, Hoboken (2008)zbMATHGoogle Scholar
 27.Pryce, J.D.: A simple structural analysis method for DAEs. BIT 41(2), 364–394 (2001)MathSciNetCrossRefGoogle Scholar
 28.Robinson, A.: Nonstandard Analysis. Princeton Landmarks in Mathematics (1996). ISBN 0691044902Google Scholar
 29.Schoeder, S., Ulbrich, H., Schindler, T.: Discussion of the GearGuptaLeimkuhler method for impacting mechanical systems. Multibody Sys. Dyn. 31, 477–495 (2013)MathSciNetCrossRefGoogle Scholar
 30.Campbell, S.L., Gear, C.W.: The index of general nonlinear DAEs. Numer. Math. 72, 173–196 (1995)MathSciNetCrossRefGoogle Scholar
 31.Thoma, J.: Introduction to Bond Graphs and Their Applications. Pergamon International Library of Science, Technology, Engineering and Social Studies. Pergamon Press (1975)Google Scholar
 32.Trenn, S.: Distributional differential algebraic equations. Ph.D. thesis, Technischen Universität Ilmenau (2009). https://www.dbthueringen.de/servlets/MCRFileNodeServlet/dbt_derivate_00018071/ilm12009000207.pdf
 33.Zimmer, D.: Equationbased modeling of variablestructure systems. Ph.D. thesis, ETH Zürich, no. 18924 (2010). http://www.inf.ethz.ch/personal/fcellier/PhD/zimmer_phd.pdf