# Hybrid Systems and Hybrid Computation 1st Part: Hybrid Systems

• Published on
06-Aug-2016

• View
222

8

Embed Size (px)

Transcript

• Numerical Algorithms 33: 203213, 2003. 2003 Kluwer Academic Publishers. Printed in the Netherlands.

Hybrid systems and hybrid computation1st part: Hybrid systems

Jean Della Dora, Mihaela Mirica-Ruse and Evelyne TournierLMC-IMAG, B.P. 53, 38041, Grenoble, France

Received 3 December 2001; accepted 16 December 2002

In the first part of this paper we will give a short historical survey of the field of hybridsystems, a precise definition of a hybrid system and some comments on the definition. In asecond paper (Hybrid systems and hybrid computation 2nd part: Hybrid computation) wewill concentrate on a particular aspect of the theory closely related to scientific computation,that we have called hybrid computation.Keywords: hybrid systems, implicit ordinary differential equations, Caratheodory solutions,Zeno behaviorAMS subject classification: 93C15, 93C55

1. Hybrid systems

1.1. Some historical roots

Hybrid systems are used to model, analyse and control complex systems where theglobal behavior can be seen as a combination of continuous and discrete evolution. Wecan imagine that the continuous part of the evolution is modeled by differential equationsand that the discrete part is modeled by an automaton.

From a control point of view, a hybrid system can be seen as the realization of thefollowing paradigms: the continuous part is related to the modeling of a continuous time plant; the automaton (or discrete event system) is the model of a digital controller (a pro-

gram, for example); the interface between the plant and the controller is basically represented by two

entities, an actuator and a sensor.The job of the sensor is to transform some observations of the continuous behavior ofthe plant into a discrete set of values (boolean) which are used to feed the automaton(program). In the opposite way, the actuator uses outputs of the program to modifythe functioning of the plant.

• 204 J. Della Dora et al. / Hybrid systems

The global configuration of the controlled system is represented by the following dia-gram:

One of the main tasks of the theory is to build a controller for a given plant. In thiscontext, it is important to use the word plant in a very broad sense. A plant could be achemical factory as well as a living procariotic cell. This is related to the basic goal ofthe theory: to build a secure methodology for the very complex technological, physicalor biological systems that the industry wants to control in the near future.

This idea has a very long history, but the community is used to dating the startingpoint of the theory from the article of Witsenhausen [21] and, from a more theoreticalpoint of view, from the one of Tavernini [19].

Another important root of the theory is the recognition and the formalization bythe community of computer scientists of the field. The article [16], the Ph.D. thesis ofBranicky [11], the work of Alur et al. [1,2] are fundamental in this context.

Fortunately, the interested reader can access a huge amount of information in theedited proceedings of annual meetings on the subject [36,12].

An important and fundamental point is underlined clearly by Alur and Dill in [1]:Although the decision to abstract away from qualitative time has had many advan-tages, it is ultimately counterproductive when reasoning about systems that must in-teract with physical processes. The correct functioning of the control system of air-planes and toasters depends crucially upon real-time considerations. We would liketo be able to specify and verify models of real-time systems as easily as qualitativemodels. Our goal is to modify finite automata for this task and develop a theory offinite timed automata, similar in spirit to the theory of -regular languages. We be-lieve that this should be the first step in building theories for the real-time verificationproblems.

The theory of timed automata is a key for the theory of hybrid systems.

1.2. A definition of hybrid systems

The components of the definition are the following:

1. First we need a finite graph A = (Q, E) where Q is the set of nodes of A and E isthe set of edges. We note Q = {q1, . . . , qm}. E is a subset of QQ and e E willbe noted e = (ei, ef) with ei and ef belonging to Q.A is called the discrete automata underlying the hybrid system H.

• J. Della Dora et al. / Hybrid systems 205

2. We need a correspondence fromQ to Rn. (q) is a connected subset of Rn calledthe chart associated to the node q. In A = Q Rn, = (q, (q))qQ is the atlasof H.

3. The continuous dynamic associated to H is described in the following manner: toeach q Q is associated a correspondence F(q) :(q) Rn such that

X F(q)(X) = F(q,X).The state of H is a couple (q,X) and this state belongs to the atlas .

4. The definition also uses a distinguished subset of , the subset of valid initial con-ditions of H. This subset will be noted Init.

5. There is another correspondence G : E described as:G(e) is a subset of Rn (called guard) such that G(e) (ei, (ei)) = .The following property is essential for a well defined hybrid system:

q Q: (q, (q)) {e; ei=q}

G(e).

6. We have another correspondence, called Reset, defined on E such that Reset(e) (ef, (ef)).

A hybrid system is then a 7-uple:

H = {Q, E,, Init,F,G,Reset}.The semantic of this definition is explained in the following subsection.

1.3. Comments about the definition of hybrid systemsWe will now comment the previous definition in order to explain the semantic be-

hind the formal definition. Previously it was necessary to explain that this was probablya local definition coming from the present definition of [11] but with a view towardsthe importance of set-valued analysis in these questions [10].

First we start in a node q of A and in a chart (q). In this chart we have a pre-scription: we must start at a point (q,X0) belonging to Init (the subset of legal startingpoints of the system).

To this point is associated a subset F(q,X0) of Rn and the dynamic (the velocity)must be chosen in F(q,X0). That is,

X F(q,X0). (1)It is important to bear in mind that this system seems autonomous, but we have decided toincorporate (if necessary) the time as a component of X (as is usual in the transformationof a nonautonomous dynamic system into an autonomous form).

But before integrating (1), it is necessary to observe and study the validity of thisintegration. For this, we must look at

• 206 J. Della Dora et al. / Hybrid systems

ei=q

G(e) = q.

By construction (q,X0) (ei, (ei)). If (q,X0) / q , we can then carry out the integra-tion, if not we must jump using the Reset correspondence. Suppose first that (q,X0) belongs to a single G(e). We can then apply the Reset

function and must note that Reset(e)(q,X0) is a subset of (ef, (ef)).Now we have to choose a point (ef, X0,+) in this subset. This choice must be specifiedin the construction of the system.The capital point in this action is that it is supposed to take place with zero duration.This is a very fundamental hypothesis which states the following.

We observe the system with a sensor. We then pass the boolean signal of the sensor to the program (the controller), the

program performs its task and returns a boolean vector. This vector is eventually transformed by the actuator into a continuous vector and

a value for the transition. So the whole process turns

(q,X0) (ef, X0,+)and this transformation is a subset of Reset(e)(X0).

All this process is supposed to be done instantaneously.

What this simplification means is that the time scale of the dynamic evolution issupposed to be infinitely slower than that of the processor behind the controller.It is clear that the consequence of this simplification must have a deep impact on thefinal simulation. We will illustrate all this in the following paragraphs.

Another possibility is that

(q,X0) ni=1

G(ei),

then we must also choose which of the reset branches will be privileged. It is, ofcourse, necessary in that case not to forget the previous remark.

• J. Della Dora et al. / Hybrid systems 207

In these two eventualities we have many possibilities for building a very rich class ofmodeling tools, but the complexity of this nondeterministic class of systems introducesgreat difficulties into the theory.

Another class of difficulty is of course localized in the assumption:

X F(q,X).The fact that the dynamic is described by a differential inclusion introduces non deter-minism and new technicalities into the model. For all these questions we recommendthe books of Aubin and specially [8,9].

Suppose now that we are able to choose a continuous selection (t,X) such thatas long as we remain in V (q) we have

(t, X) F(q,X) for all 0 t tq .The process is then classical, we must wait as long as no guard is reached. If we reach aguard then we must obey the previous rules.

After this brief introduction to the behavior of a hybrid system, we have to specifythe mathematical tools we want to introduce, in order to attain all the objects previouslydescribed.

1.4. Some mathematical issues

As we have seen in the previous definition, there are several places where we mustadd mathematical support to the intuitive framework. But these mathematical tools mustbe related to the actual demand coming from the development of modeling languages.Starting from user demands for model libraries (Dymola), first steps in hybrid systems(Omola-Ginsim 1994), Object oriented modeling (NMF 1996, DAE solver 1995), Sym-bolic computation and Modelica system (1998), a certain number of key ideas are emerg-ing.

Perhaps a basic one is the way we must view the dynamic part of a H.S. (HybridSystem).

In fact, the new point is to see this part of the modeling process as the writing ofconstraints for the behavior of the system. This philosophy, developed by Poldermanand Willems [17] consists in writing constraints as ordinary differential equations oralgebraic equations (we focus on ODEs, but we can also think about modeling by PDEs);however, in general, these equations will be implicit differential equations.

So, if the pertinent variables are denoted by t, x1, . . . , xn, we will end by a set ofthe form:

fj (t, x1, . . . , xn, x1, . . . , xn) = 0 or g(t, x1, . . . , xn) = 0 (2)in the case of IODE (Implicit ODE). (In fact, the general case is related to IOD inequal-ities.)

We can consider only first order equations because we can always add, by a classi-cal trick, higher order derivatives.

• 208 J. Della Dora et al. / Hybrid systems

Thus, the domain of definition of a state q, say (q), is specified by a set of equa-tions like (2). This system could be interpreted in several ways: As description of the dynamic behavior of a system constrained on an algebraic sur-

face. This is the classical DAE view point. As a set of differential forms in the sense of E. Cartan. The idea is the following: we

introduce a set of n differential forms of degree 1,

dxi pi dt = 0, i = 1, . . . , n,and the forms of degree zero

fj (t, x1, . . . , xn, p1, . . . , pn) = 0 or g(t, x1, . . . , xn) = 0.Such a system is closely related to the Lie view of systems of ODE.

We can also view such a system as describing a set of equations in the differentialalgebra R[t, x1, . . . , xn, x1, . . . , xn] (if the equations are polynomial). This is Rittspoint of view.

All these points of view are closely related but much more has to be done to pro-duce reliable software for handling true applied systems.

We will give an example of certain difficulties which are related to the manipulationof such systems of differential equations.

Example. The following example of a single implicit differential equation is very im-portant (see [7,15] for this affirmation):

f (x, y, y) = (y)2 4y = 0.It is easy to see that this equation has a general solution of the form

y = (x + c)2,where c is a constant (here a real one). But it is important to notice that this equationhas also a singular solution y = 0. This does not belong to the general solution (for adetailed description of symbolic and numeric views on these problems see [13,20]).

The construction of this solution (general, singular, particular, . . . ) is a difficultalgebraic task. But the goal of differential algebra is to look for analytical or formalsolutions. These solutions are tremendously important, but are only part of the problem.That is because we are faced with two difficulties:

1. We are looking for real solutions and analyticity is generally related to complexsolutions. But more than that, it is important to look at solutions having only alimited number of derivatives. In the considered example, we have the followingpicture:

• J. Della Dora et al. / Hybrid systems 209

2. If we start from an initial condition at a point (x0, y0)with y0 > 0, then the particularsolution will be of the form:

y = (x x0 +y0)2. (3)This solution will admit the point (x0 y0, 0) as minimum. At this point we caneither continue as long as we want along the singular solution y = 0, or followanother branch of the parabola.At this point (x0y0, 0) called Peano point, we lose the uniqueness of the solution.But in any case, following y = 0 we have a C1 solution built after the two analyticalsolutions.The OsgoodMontel theorem states that each point of the sector of the followingfigure can be reached by a C1 solution starting at (x0 y0, 0).

Theorem (OsgoodMontel). Consider the differential equation, y = f (x, y), where fis continuous with respect to the set of variables y and x. The integrals starting from apoint P lie between two limiting curves which are integrals starting from P: the higherintegral and the lower integral.

• 210 J. Della Dora et al. / Hybrid systems

So we see that we did not ask for analytical solutions and this is the case for real lifeapplication; we are then faced with the problem of the description of the set of solutionsof finite derivative order and of choosing a particular solution belonging to this set.

But this is only the classical part of the theory. In general (as, for example, incontrol problems) we are looking for more general kinds of solutions. This kind ofgeneralized solutions is called Caratheodory solutions [18].

This example shows us the great number of questions which are actually not clearlyunderstood in the first step of the description of a hybrid system.

1.5. Zeno behavior

We now want to show another kind of difficulty related this time to the transitionproblem. The following example is a classical one in the field; it comes from [4] andmuch work has yet be done, specially from the regularization point of view [14].

The system is described by two liquid tanks, only one of which can be filled at atime by a constant flow w, but both drain according to a constant flow rate v1, respec-tively v2. The goal is to keep the level of liquid above zero in each tank. The controlstrategy is to switch between the two tanks T1 and T2.

We have two discrete states for the system:

state q1: T1 is filled and T2 not; state q2: T2 is filled and T1 not.

The two legal transitions corre...