Hybrid Systems Modeling and Controlhybrid system would be a car. The dynamics of the car switch when...

25
Hybrid Systems Modeling and Control Manfred Morari * , Mato Baoti´ c, Francesco Borrelli Abstract Piece-wise affine and mixed logical dynamical models for discrete time linear hybrid systems are reviewed. Constrained optimal control problems with linear and quadratic objective functions are defined. Some results on the structure and computation of the optimal control laws are presented. The effectiveness of the techniques is illustrated on a wide range of practical applications. Keywords hybrid systems, optimal control, switched systems, parametric program- ming, mixed-integer programming 1 Introduction Hybrid systems can switch between many operating modes where each mode is governed by its own characteristic dynamical laws. Mode transitions are triggered by variables crossing specific thresholds (state events), by the lapse of certain time periods (time events), or by external inputs (input events). A simple example of a hybrid system would be a car. The dynamics of the car switch when a gear shift occurs, either because the driver moves the stick shift (input event) or because the state variable “speed” exceeds a specified threshold (state event) in the case of an automatic transmission. A hybrid system can have both continuous and discrete states. If a digital computer (with discrete states only) is used to control a physical system (typically * Corresponding Author, Automatic Control Laboratory, ETH Zentrum, CH-8092 Zurich, Switzerland, morari,baotic,[email protected] 1

Transcript of Hybrid Systems Modeling and Controlhybrid system would be a car. The dynamics of the car switch when...

Hybrid Systems Modeling and Control

Manfred Morari∗, Mato Baotic, Francesco Borrelli

Abstract

Piece-wise affine and mixed logical dynamical models for discrete timelinear hybrid systems are reviewed. Constrained optimal control problemswith linear and quadratic objective functions are defined. Some results onthe structure and computation of the optimal control laws are presented. Theeffectiveness of the techniques is illustrated on a wide range of practicalapplications.

Keywords

hybrid systems, optimal control, switched systems, parametric program-ming, mixed-integer programming

1 IntroductionHybrid systems can switch between many operating modes where each mode isgoverned by its own characteristic dynamical laws. Mode transitions are triggeredby variables crossing specific thresholds (state events), by the lapse of certain timeperiods (time events), or by external inputs (input events). A simple example of ahybrid system would be a car. The dynamics of the car switch when a gear shiftoccurs, either because the driver moves the stick shift (input event) or because thestate variable “speed” exceeds a specified threshold (state event) in the case of anautomatic transmission.

A hybrid system can have both continuous and discrete states. If a digitalcomputer (with discrete states only) is used to control a physical system (typically∗Corresponding Author, Automatic Control Laboratory, ETH Zentrum, CH-8092 Zurich,

Switzerland, morari,baotic,[email protected]

1

with continuous states only) a hybrid system is formed. Indeed, a mathemati-cal definition of hybrid systems was first introduced in computer science in thiscontext.

Another special example of a hybrid system would be a linear system un-der feedback control with actuator constraints. When the actuator hits a con-straint the dynamics change. Finally, consider a metabolic network, where the(dis)appearance of an enzyme turns a particular reaction step on or off. Its behav-ior can also be modelled as a hybrid system.

These examples illustrate that hybrid systems are very common in engineeringand many systems encountered in every day life can be effectively modeled ashybrid systems as well. Hybrid systems are a special class of nonlinear systemsbut most of the nonlinear system and control theory does not apply because itrequires certain smoothness assumptions. For the same reason we also cannotsimply use linear control theory in some approximate manner to design controllersfor hybrid systems.

Not surprisingly until the 1990s most tools available for the analysis and con-trol of hybrid systems were ad hoc supported by extensive simulation. For ex-ample, the design of anti-windup compensators was an art with numerous dif-ferent structures proposed and “proven” through case studies. Finally in [34] allstructures were shown to be identical and to differ only through the choice of aparameter. This opened up the area to extensive research so that now systematicoptimal control based tools for anti-windup design with stability and performanceguarantees are available [30, 37].

About five years ago two factors motivated us to embark on a broad researchprogram in the hybrid system area. First of all, we were encouraged by the suc-cess of model predictive control to deal with complex constrained control prob-lems in industry. Second, we were impressed by the progress in the performanceof commercial tools for solving mixed-integer programming problems and theirimpact on decision making in complex industrial environments [10, 11]. Ourfirst foray [47] was to model hybrid systems so that the associated optimal con-trol problems become mixed-integer programs and can be solved efficiently withcommercial codes. The success led to a wide range of activities on the analysisand synthesis of hybrid systems as will be sketched out in this paper.

2

2 ScopeThis overview paper is intended for the newcomer in the area. It should commu-nicate the motivation for the problems studied and outline the approach taken. Itshould provide a glimpse at the type of theoretical results that have been obtainedand the scope of the algorithms available. It will focus on optimal control. Topicslike identification [24] and filter design [23] will not be covered. The emphasiswill be on tools developed in our group and closely related work. To put our workin perspective the reader is referred to our web site http://control.ee.ethz.chfrom which an extensive set of papers and software tools are available.

All our work has been limited to discrete-time systems where the continu-ous dynamics are affine. By virtue of this restriction many interesting and com-plex mathematical issues have been removed. Our experience has shown, thateven with these assumptions the theoretical and computational challenges areformidable. However, together with our research partners we have been able tosolve a large number of real problems as will be reported in this paper.

Large parts of this paper are based on [14] which contains an extensive list ofreferences, more details on the theory and the algorithms as well as the proofs ofthe results reported here.

3 Modeling

3.1 Piece-Wise Affine (PWA) SystemsIn this paper our discussion will focus on discrete-time piecewise affine (PWA)systems.

Definition 1 (Polyhedron) A set Θ⊆ Rq of the form Θ = {θ ∈ R

q | Γθ ≤ γ} forsome Γ ∈ R

r×q, γ ∈ Rr is called polyhedron.

Piecewise affine systems [43] are defined by partitioning the state+input space intopolyhedral regions and associating with each region a different linear state-updateequation

x(t +1) = Aix(t)+Biu(t)+ f i

if[

x(t)u(t)

]

∈Pi

i = 1, . . . ,s

(1)

where x ∈ Rnc ×{0,1}n` , u ∈ R

mc ×{0,1}m`, {Pi}si=1 is a polyhedral partition

of the set of the state+input space P ⊂ Rn+m, n , nc + n`, m , mc + m`. We

3

assume that P is closed and bounded and we denote with xc ∈ Rnc and uc ∈ R

mc

the continuous components of the state and input vector, respectively.

Definition 2 We say that the PWA system (1) is continuous if the mapping (xc(t),uc(t)) 7→xc(t +1) is continuous and n` = m` = 0.

We emphasize that this modeling framework of PWA systems is very general.It allows (i) the system to be discontinuous, (ii) both states and inputs to assumecontinuous and logic values, (iii) events to be both internal, i.e., caused by thestate reaching a particular boundary, and exogenous, i.e., one can decide when toswitch to some other operating mode and (iv) states and inputs to fulfill piecewise-linear constraints.

Discrete-time PWA models can describe a large number of processes, such asdiscrete-time linear systems with static piecewise-linearities, discrete-time linearsystems with logic states and inputs or switching systems where the dynamic be-haviour is described by a finite number of discrete-time linear models, togetherwith a set of logic rules for switching among these models. Moreover, PWAsystems can approximate nonlinear discrete-time dynamics via multiple lineariza-tions at different operating points.

Also note that other types of hybrid systems, namely linear complementarity(LC) systems [31, 48, 32], extended linear complementarity (ELC) systems [18],max-min-plus-scaling (MMPS) systems [19], and mixed logical dynamical (MLD)systems [7] are all equivalent in their discrete time version to the discrete-time lin-ear PWA systems (cf. [33, 5]). Thus, the theoretical properties and tools can beeasily transferred from one class to another.

PWA models are, however, in most contexts not a “natural” system descrip-tion that follows directly from engineering specifications. Moreover, they are notsuitable for recasting analysis/synthesis problems into more compact optimizationproblems. The MLD framework [7] described in the following section has beendeveloped for such a purpose. In particular, MLD models can be used to recasthybrid dynamical optimization problems into mixed-integer linear and quadraticprograms [38].

3.2 Mixed Logical Dynamical (MLD) SystemsMLD systems [7] allow specifying the evolution of continuous variables throughlinear dynamic equations, of discrete variables through propositional logic state-ments and automata, and the mutual interaction between the two. The key idea

4

of the approach consists of embedding the logic part in the state equations bytransforming Boolean variables into 0-1 integers, and translating logic relationsinto mixed-integer linear inequalities [7, 41, 49]. The following correspondencebetween a Boolean variable X and its associated binary variable δ will be used:

X = true ⇔ δ = 1X = false ⇔ δ = 0 (2)

Linear dynamics are represented by difference equations x(t + 1) = Ax(t)+Bu(t), x ∈ R

n, u ∈ Rm. Boolean variables can be defined from linear-threshold

conditions over the continuous variables: [X = true]↔ [a′x≤ b], x, a∈Rn, b∈R,

with (a′x− b) ∈ [m,M]. This condition can be equivalently expressed by the twomixed-integer linear inequalities:

a′x−b ≤ M(1−δ )a′x−b > mδ .

(3)

Similarly, a relation defining a continuous variable z depending on the logicvalue of a Boolean variable X

IF X THEN z = a′1x−b1 ELSE z = a′2x−b2,

can be expressed as

(m2−M1)δ + z ≤ a′2x−b2(m1−M2)δ − z ≤ −a′2x+b2

(m1−M2)(1−δ )+ z ≤ a′1x−b1(m2−M1)(1−δ )− z ≤ −a′1x+b1.

(4)

where, assuming that x ∈X ⊂ Rn and X is a given bounded set,

Mi ≥ supx∈X

(a′ix−bi), mi ≤ infx∈X

(a′ix−bi), i = 1,2, (5)

are upper and lower bounds on (a′1x− b2) and (a′2x− b2), respectively. Notethat (4) also represents the hybrid product z = δ (a′1x− b1) + (1− δ )(a′2x− b2)between binary and continuous variables.

A Boolean variable Xn can be defined as a Boolean function of Boolean vari-ables f : {true, false}n−1→{true, false}, namely

Xn↔ f (X1,X2, . . . ,Xn−1) (6)

5

where f is a combination of “not” (∼), “and” (∧), “or” (∨), “exclusive or” (⊕),“implies” (←), and “iff” (↔) operators. The logic expression (6) is equivalent toits conjunctive normal form (CNF) [49]

k∧

j=1

i∈Pj

Xi

i∈N j

∼ Xi

,N j,Pj ⊆ {1, . . . ,n}

Subsequently, the CNF can be translated into the set of integer linear inequalities

1≤ ∑i∈P1 δi +∑i∈N1(1−δi)...1≤ ∑i∈Pk

δi +∑i∈Nk(1−δi)

(7)

Alternative methods for translating any logical relation between Boolean vari-ables into a set of linear integer inequalities can be found in chapter 2 of [35].In [35] the reader can also find a more comprehensive and complete treatment ofthe topic.

By collecting the equalities and inequalities derived from the representation ofthe hybrid system we obtain the Mixed Logical Dynamical (MLD) system [7]

x(t +1) = Ax(t)+B1u(t)+B2δ (t)+B3z(t) (8a)y(t) = Cx(t)+D1u(t)+D2δ (t)+D3z(t) (8b)

E2δ (t)+E3z(t)≤ E1u(t)+E4x(t)+E5 (8c)

where x ∈ Rnc ×{0,1}n` is a vector of continuous and binary states, u ∈ R

mc ×{0,1}m` are the inputs, y ∈ R

pc×{0,1}p` the outputs, δ ∈ {0,1}r`, z ∈ Rrc repre-

sent auxiliary binary and continuous variables, respectively, which are introducedwhen transforming logic relations into mixed-integer linear inequalities, and A,B1−3, C, D1−3, E1−5 are matrices of suitable dimensions.

Note that the constraints (8c) allow us to specify additional linear constraintson continuous variables (e.g., constraints on physical variables of the system), andlogic constraints of the type “ f (δ1, . . . ,δn) = 1”, where f is a Boolean expression.The ability to include constraints, constraint prioritization, and heuristics addsto the expressiveness and generality of the MLD framework. Note also that thedescription (8) appears to be linear, with the nonlinearity concentrated in the inte-grality constraints over binary variables.

The translation of a description of a hybrid dynamical system into mixedinteger inequalities is the objective of the tool HYSDEL (HYbrid Systems DE-scription Language), which automatically generates an MLD model from a high-level textual description of the system [45]. Given a textual description of the

6

logic and dynamical parts of the hybrid system, HYSDEL returns the matri-ces A,B1−3,C,D1−3,E1−5 of the corresponding MLD form (8). A full descrip-tion of HYSDEL is given in [46]. The compiler is available for download athttp://control.ethz.ch/˜hybrid/hysdel.Example. The following switching system

x(t +1) = 0.8[

cosα(t) −sinα(t)sinα(t) cosα(t)

]

x(t)+

[

01

]

u(t)

α(t) =

{ π3 if [1 0]x(t)≥ 0−π

3 if [1 0]x(t) < 0x(t) ∈ [−10,10]× [−10,10]u(t) ∈ [−1,1]

(9)

was first proposed in [7]. System (9) can be rewritten in form (8) as shown in [7].

x(t +1) =[

I I]

z(t)

5−5− ε−M−MMMMM−M−M

0000

δ (t)+

0 00 0I 0−I 00 I0 −II 0−I 00 I0 −I0 00 00 00 0

z(t) ≤

000000B−BB−B001−1

u(t)+

1 0−1 0

0000

A1−A1A2−A2

I−I00

x(t)+

5−ε00MMMM00NN11

where B = [0 1]′, A1,A2 are obtained from (9) by setting respectively α = π3 ,−π

3 ,M = 4(1 +

√3)[1 1]′+ B, N , 5[1 1]′, and ε is a properly chosen small positive

scalar.

4 Formulation of the Optimal Control ProblemConsider the PWA system (1) subject to hard input and state constraints

Ex(t)+Lu(t)≤M (10)

for t ≥ 0, and denote by constrained PWA system (CPWA) the restriction of thePWA system (1) over the set of states and inputs defined by (10),

x(t +1) = Aix(t)+Biu(t)+ f i if[

x(t)u(t)

]

∈ Pi (11)

7

where {P i}si=1 is the new polyhedral partition of the sets of the state+input space

Rn+m obtained by intersecting the sets P i in (1) with the polyhedron described

by (10).We assume the origin to be an equilibrium point of the PWA system (11) (i.e.

0 ∈ P i⇒ f i = 0) and define the following cost function

J(UN,x(0)) , ‖Px(N)‖p +N−1

∑k=0‖Qx(k)‖p +‖Ru(k)‖p (12)

We consider the constrained finite-time optimal control (CFTOC) problem

J∗(x(0)) , min{UN}

J(UN,x(0)) (13)

subj. to

{

x(k +1) = Aix(k)+Biu(k)+ f i if[

x(k)u(k)

]

∈ Pi

x(N) ∈X f(14)

where the column vector UN , [u′(0), . . . ,u′(N− 1)]′ ∈ RmcN ×{0,1}mlN , is the

optimization vector, N is the time horizon and X f is the terminal region. In (12),‖Qx‖p denotes the p-norm of the vector x weighted with the matrix Q, p = 1,2,∞.We will assume that Q = Q′ � 0, R = R′ � 0, P � 0, for p = 2, and that Q,R,Pare full column rank matrices for p = 1,∞.

In general, the optimal control problem (12)-(14) may not have a minimizer forsome feasible x(0), as we have assumed above, but only an infimizer. We remarkhere that situations where the minimizer does not exist may lead to arbitrarily highsensititvity of the performance of the controlled system to model errors.

The minimizer U∗N(x(0)) may not be unique for a given x(0). From an engi-neering point of view it make sense to refer to the function U ∗N(x(0)) as one of thepossible single-valued functions.

5 Properties of the Solution of the Optimal ControlProblem

In the following we need to distinguish between optimal control based on the 2-norm and optimal control based on the 1-norm or ∞-norm. We are interested indetermining structural properties of the value function and the feedback controllaw, in particular, its functional form.

8

Theorem 1 The solution to the CFTOC problem (12)-(14) with p = 2 is a PWAstate feedback control law of the form u∗(k) = fk(x(k)), where

fk(x(k)) = F ikx(k)+Gi

k if x(k) ∈Rik, (15)

where R ik, i = 1, . . . ,Nk is a partition of the set Xk of feasible states x(k) and the

closure Rik of the sets R i

k has the following form:

Rik ,

{

x | x′Lik( j)x+Mi

k( j)x≤ Nik( j), j = 1, . . . ,ni

k}

, k = 0, . . . ,N−1.

Theorem 1 implies that the control law has a simple form locally but that thepartition is defined by quadratic surfaces, which makes it complex. However,often most of the regions of the partition or even the whole partition turn out to bepolyhedral.

Theorem 2 Assume that the optimizer UN∗(x(0)) of CFTOC problem (12)-(14)

with p = 2 is unique for all x(0). Then the solution to the optimal control prob-lem (12)-(14) is a state feedback control law of the form

u∗(x(k)) = F ikx(k)+Gi

k if x(k) ∈Rik k = 0, . . . ,N−1 (16)

where R ik, i = 1, . . . ,Nr

k is a polyhedral partition of the set Xk of feasible statesx(k).

The previous results can be extended to piecewise linear cost functions, i.e.,cost functions based on the 1-norm or the ∞-norm.

Theorem 3 The solution to the CFTOC problem (12)-(14) with p = 1, ∞ is a statefeedback control law of the form u∗(k) = fk(x(k))

fk(x(k)) = F ikx(k)+Gi

k if x(k) ∈Rik (17)

where R ik, i = 1, . . . ,Nr

k is a polyhedral partition of the set Xk of feasible statesx(k).

By comparing Theorem 1 and Theorem 3 it is clear that it is simpler to solveproblems with performance indices based on 1 or ∞ norms. In this case the solu-tion is piecewise affine on polyhedra and one does not need to deal with nonconvexellipsoidal regions as in the 2-norm case. However, often the use of linear normshas practical disadvantages. A satisfactory performance may only be achievedwith long time-horizons with a consequent increase of complexity. Also perfor-mance may not depend smoothly on the weights used in the performance index,i.e., slight changes of the weights could lead to very different optimal trajectories,so that the tuning of the controller becomes difficult.

9

6 Computation of the Solution of the Optimal Con-trol Problem

6.1 Computation of the Sequence of Optimal Control InputsThe main idea is to translate problem (12)-(14) into a mixed integer program thatcan be solved by using standard commercial software. The translation is immedi-ate if the equivalent MLD representation of the PWA system is available. Whenthe performance index is quadratic, the optimization problem can be cast as aMixed-Integer Quadratic Program (MIQP) [7]. Similarly, 1-norm and ∞-normperformance indices lead to Mixed-Integer Linear Programming (MILP) prob-lems. This approach does not provide the state feedback law (15) or (17) but onlythe optimal control sequence U ∗N(x(0)) for a fixed initial state.

6.2 Computation of the Optimal Feedback Control LawThe basic method for computing the control law is multiparametric programmingwhich we introduce next.

6.2.1 Multiparametric Programming

Consider the nonlinear mathematical program dependent on a parameter appear-ing in the cost function and the constraints

J∗(x) = infz

f (z,x)

subj. to g(z,x)≤ 0(18)

where z ∈M ⊆ Rs is the optimization variable, x ∈ R

n is the parameter, f : Rs×

Rn→ R is the cost function and g : R

s×Rn→ R

ng are the constraints.A small perturbation of the parameter x in the mathematical program (18) can

cause a variety of results, i.e., depending on the properties of the functions f andg the solution z∗(x) of the mathematical program may vary smoothly or changeabruptly as a function of x. The process of finding the optimizer z∗(x) as a functionof the parameter x is referred to as multiparametric programming. We denote byK∗ the set of feasible parameters, i.e.,

K∗ = {x ∈ Rn|∃z ∈ R

s,g(z,x)≤ 0} (19)

10

by J∗(x) the real-valued function, which expresses the dependence on x of theminimum value of the objective function over K∗, and by Z∗(x) the point-to-setmap which expresses the dependence on x of the set of optimizers, i.e.,

Z∗(x) = {z ∈M| f (z,x) = J∗(x)} (20)

J∗(x) will be referred to as optimal value function or simply value function, Z∗(x)will be referred to as optimal set. If Z∗(x) is a singleton for all x, then z∗(x) ,Z∗(x) will be called optimizer function.

Fiacco (Chapter 2 of [25]) provides conditions under which the solution ofnonlinear multiparametric programs (18) is locally well behaved and establishesproperties of the solution as a function of the parameters. Below we restrict ourattention to some special classes of multiparametric programming.

Definition 3 (mp-LP) If f (·, ·) and g(·, ·) are linear, z ∈ Rm and x ∈ R

n we callthe problem (18) a multiparametric linear program (mp-LP).

Definition 4 (mp-QP) If f (·, ·) is quadratic, g(·, ·) is linear, z ∈ Rm and x ∈ R

n

we call the problem (18) a multiparametric quadratic program (mp-QP).

If some of the optimization variables are restricted to be integer, the problems arereferred to as multiparametric mixed integer programs.

Definition 5 (mp-MILP) If f (·, ·) and g(·, ·) are linear, z ∈ Rmc ×{0,1}ml and

x ∈ Rn we call the problem (18) a multiparametric mixed integer linear program

(mp-MILP).

Definition 6 (mp-MIQP) If f (·, ·) is quadratic, g(·, ·) is linear, z∈Rmc×{0,1}ml

and x ∈ Rn we call the problem (18) a multiparametric mixed integer quadratic

program (mp-MIQP).

6.2.2 Computation via multiparametric Mixed Integer Programming

By generalizing the results for linear systems in [8] to hybrid systems, the statevector x(0), which appears in the objective function and in the constraints (12)-(14), can be handled as a vector of parameters that perturbs the solution of themathematical program. Then, for performance indices based on the ∞-norm or1-norm, the optimization problem can be treated as a multiparametric MILP (mp-MILP), while for performance indices based on the 2-norm, the optimization prob-lem can be treated as a multiparametric MIQP (mp-MIQP). Solving an mp-MILP

11

(mp-MIQP) amounts to expressing the solution of the MILP (MIQP) as a functionof the parameters x(0).

In [1, 21] two approaches were proposed for solving mp-MILP problems. Inboth methods the authors use an mp-LP algorithm and a branch and bound strategythat avoids the enumeration of all combinations of 0-1 integer variables. A methodfor solving mp-MIQPs has appeared recently in [20].

The solution of the mp-MILP (mp-MIQP) provides the state feedback solutionu∗(k) = fk(x(k)) ((17) or (15)) of the problem (12)-(14) for k = 0 and it alsoprovides the open loop optimal control laws u∗(k) as function of the initial state,i.e., u∗(k) = u∗(k)(x(0)). The piecewise-affine state feedback optimal controllaw fk : x(k) 7→ u∗(k) for k = 1, . . . ,N is obtained by solving N mp-MILPs (mp-MIQPs) over a shorter horizon [12].

More details on multiparametric programming can be found in [26, 17] forlinear programs, in [9, 44, 42] for quadratic programs in [1, 21] for mixed integerlinear programs and in [20, 15, 12] for mixed integer quadratic programs.

6.2.3 Computation via Dynamic Programming

In his thesis [12] Borrelli showed how linear and quadratic parametric program-ming can be used to solve the Hamilton-Jacobi-Bellman equation associated withproblem (12)-(14). The PWA solution (15) is computed proceeding backwardsin time using two tools: simple linear or quadratic parametric programming (de-pending on the cost function used) and - for the quadratic cost function - a specialtechnique to store the solution.

This procedure becomes prohibitive for a system with a large number of bi-nary inputs or states and long horizons. In this case multiparametric mixed integerprogramming (or a combination of the two techniques) may be preferable. Themultiparametric programming approach described in Section 6.2.2 and the dy-namic programming approach have been compared in [2].

6.2.4 Example - Finite Time Optimal Control (∞-norm)

Consider the problem of steering the piecewise affine system (9) to a small re-gion around the origin in three steps while minimizing the cost function (12) withp = ∞. The finite-time constrained optimal control problem (12)-(14) is solvedwith N = 3, P = 0, Q = 700I, R = 1, and X f = [−0.01 0.01]× [−0.01 0.01].The solution was computed with the algorithm presented in Section 6.2.3 in 71 swith Matlab 6.1 on a Pentium IV 2.2 GHz machine. The polyhedral regions corre-

12

sponding to the state feedback solution u∗(x(k)), k = 0, . . . ,2 in (17) are depictedin Figure 1. The resulting optimal trajectories for the initial state x(0) = [−1 1]′

are shown in Figure 2. The state feedback control law at time 0 comprises 106polyhedral regions.

Figure 1: State space partition for the time varying state feedback control law u∗(x(k))for the Example 6.2.4. Each picture shows the control law at a particular time step k =

0, . . . ,3. In each shaded region a different PWA state feedback law applies.

7 Case StudiesAn infinite horizon controller can be obtained by implementing in a receding hori-zon fashion a finite-time optimal control law. In this case the infinite time con-troller is simply obtained by repeatedly evaluating the PWA controller (15) fork = 0:

u(t) = u∗0(x(t)) for x(t) ∈X0. (21)

This approach was employed in all case studies described below.

7.1 Electronic Throttle [3]In automotive applications an electronic throttle is used to control the inflow of airto the vehicle engine. The electronic throttle shown in Figure 3 is a DC servo sys-

13

Figure 2: Response of system described in 6.2.4 with controller shown in Figure 1 forinitial state x(0) = [−1,1]′.

tem, where the DC drive is supplied from a bipolar chopper. Motor shaft rotationis transmitted through a gearbox to the shaft with the throttle plate. Movement ofthe plate continues until the motor torque is balanced by the torque generated bythe return spring which is attached to the plate’s shaft.

Two nonlinearities in the throttle body make the control of the plate positiona challenging task. One is friction in the gearbox transmission mechanism, andanother one is the so called Limp-Home (LH) position nonlinearity that is a con-sequence of an embedded mechanical safety feature which guarantees a specificlevel of air inflow even in the case of total power failure.

All nonlinearities of the electronic throttle are PWA in continuous time (cf. [3]).It is reasonable to consider the following approach when constructing a discrete-time PWA model. We determine all possible combinations of affine parts of non-linearities (5 from the friction model, and 3 from the LH model give 15 affinedynamics in total), and for each of those combinations we form an affine contin-uous description of the throttle system. Sampling each of the continuous affinesystems with a Zero Order Hold (ZOH) gives us an equivalent discrete-time rep-resentation. Combining them finally gives 15 discrete-time PWA dynamics, eachof which is defined over a certain part of the state+input space. The state vectoris x = [ωm,θ ], where θ denotes position of the throttle valve, ωm is the motorangular speed, and the manipulated variable u is the input voltage to the chopper

14

(a) Electronic throttle system. (b) Throttle valve.

Figure 3: The electronic throttle.

(Figure 3(a)). The sampling time was set to Ts = 10ms. The following constraintsωm(k) ∈ [−100 100], θ(k) ∈ [13 90] and u(k) ∈ [−5 5] where included in thediscrete-time PWA model of the throttle. For more details see [3].

We designed a receding horizon controller based on the optimization prob-lem (12)-(14) with T = 5, Q =

[

0.01 00 1

]

, R = 0.1, P = Q, X f = [−0.2 24.95]×[0.2 25.05], xe = [0 25]′, ue = 1.098. Thus, our goal is to open the throttle valveto the fixed reference of 25◦. The corresponding optimal solution is composed of568 regions in the state-space.

The optimal set point control scheme was applied to the real electronic throttledepicted in Figure 3(b). Experiments were carried out with a Pentium III 1.7 GHzmachine running MATLABr 5.3 and using Real-Time Workshopr with an A/D–D/A card as a computer-process interface. Note that the optimal controller isapplied in a receding horizon fashion.

In Figure 4 we report experimental results for a particulary demanding taskwhere the LH position θLH = 20◦ is crossed while opening the valve from 13.74◦

to a specified angle of 25◦. The starting point x(0) = [0 13.74]′ is reached usinga step change of the control input at t = 2.5 s. The optimal controller action isturned on at t = 5 s. We point out that only the position signal θ was measured,while ωm was reconstructed from the position signal.

7.2 Multi-Object Adaptive Cruise Control [36]Cruise control is a common and well known automotive driver assistance systemin which the driver sets a reference speed and the engine is controlled so thatthis reference speed is maintained regardless of external loads such as wind, roadslope or changing vehicle parameters. Adaptive Cruise Control (ACC) addition-

15

2 3 4 5 6 7 8 9 10 11 1210

15

20

25

θ/°

2 3 4 5 6 7 8 9 10 11 12−50

0

50

100

ωm

/rad

/s

2 3 4 5 6 7 8 9 10 11 120

1

2

3

u/V

2 3 4 5 6 7 8 9 10 11 12−2

0

2

i a/A

t/s

Figure 4: Experimental results for a particulary demanding task where the LHposition θLH = 20◦ is crossed while opening the throttle valve from 13.74◦ to aspecified angle of 25◦. The optimal controller action is turned on at t = 5 s.

ally takes into account the traffic in front of the car. In a multi-object adaptivecruise control problem the optimal acceleration of the driver’s car is to be foundrespecting traffic rules, safety distances and driver intentions. The control objec-tives for a traffic scene depicted in Figure 5 are

• to track the reference speed vref

• to respect safety distance dmin if a neighboring car is in the same lane, and

• not to overtake on the right side of a neighboring car

while constraining acceleration and changes in acceleration and in deceleration.Loosely speaking we would like to maintain a comfortable drive for the ego-carand prevent any obj-car from entering the shaded area in Figure 5. The hybridnature of the problem arises from the multiple objectives which include switches.

16

Figure 5: Multi-object adaptive cruise control problem.

(a) Mercedes E430. (b) Look from the cockpit.

Figure 6: Experimental setup.

The objective function is chosen to be quadratic. The optimal state-feedback con-trol law is found by solving the underlying constrained finite time optimal controlproblem via dynamic programming.

Here we report experimental results when the ego-car is driving in the right-most lane (neglecting the lateral dynamics). The finite-time constrained optimalcontrol problem (12)-(14) was solved over a time horizon of 8.1 s with vref =30m

s and dmin = 40m. The corresponding optimal solution is composed of 753polyhedra in R

7 (the dimension of the state space is 7).The optimal state-feedback control law was tested on a research car Mercedes

E430 (Figure 6). Special interfaces to throttle and brakes, sensor fusion, visual-ization and the ACC controller were running in a real-time environment with an80 ms cycle time on an Intel Pentium4 1.4GHz machine with 500 MByte RAM.In Figure 7 experimental data from a test drive are shown. In Figure 7(a) the dis-tance d between ego-car and obj-car, velocity vego of ego-car and velocity vob j ofobj-car are reported. In Figure 7(b) we see a corresponding controller action aref(reference acceleration) for ego-car, measured acceleration aego of ego-car and

17

2 4 6 8 10 12 14 16 18 200

5

10

15

20

25

30

35

40

45

t[s]

d[m

]; vE

go[m

/s];

vObj

[m/s

]

d vEgovObj

(a) Measured distance between ego-car andobj-car d, and velocities vego and vob j.

2 4 6 8 10 12 14 16 18 20

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

t [s]

aObj

, aE

go, a

Ref

[m/s

2]

aObjaEgoaRef

(b) Manipulated variable are f and mea-sured/estimated accelerations aego and aob j.

Figure 7: Experimental results of the ACC system with implemented optimal state-feedback controller. After a transient ego-car manages to track the speed of obj-car whilemaintaining the safety distance dmin = 40m.

estimated acceleration aob j of obj-car.Initially ego-car is driving faster then obj-car (vego = 26m

s , vob j = 24ms , see

Figure 7(a)), and the distance between ego-car and obj-car d = 28m is below thesafety distance dmin = 40m. As depicted in Figure 7(b), controller reacts to such asituation by decelerating ego-car more and more strongly (e.g., hitting the brakeswith an increasing force) until t = 0.8s when the lower bound on the accelera-tion value aob j = −1 m

s2 is reached. Around t = 2.5s both vehicles have the samevelocity and from that moment on vego < vob j and the distance d between the ve-hicles is steadily increasing. From t = 3.5s on brakes are gradually released, andaround t = 6s ego-car even begins accelerating. The reasoning is relatively sim-ple. The closer we get to the safety distance the more important the tracking of thereference velocity becomes. However, since obj-car drives more slowly than thedesired vref = 30m

s , after t = 11s ego-car tracks obj-car’s speed while preservingthe safety distance.

7.3 Other case studiesCement Mill [27]. In a cement mill scheduling problem we have to decide, de-pending on the customers demand and energy prices, when to produce certaincement grades and on which mills. Due to the number of mills, grades, silosand the various operating constraints the problem is quite complex. The authors

18

show how to achieve an economically optimal behaviour by designing two modelpredictive control loops in a cascade: an “outer” one responsible for long termeconomic goals, and a faster “inner” one ensuring optimal reactions to deviationsfrom the original plan. The hybrid characteristic arise from discrete values ofdecision variables, finite state machine models for the mills and operational con-straints. The case of 2 mills, 2 silos, and 5 cement grades and a sampling timeof one hour was considered. Simulation results obtained by solving an MILPproblem are reported. The procedure has been implemented on a cement mill inSwitzerland and is in test phase.Co-generation Power Plant [22]. The authors consider optimal control of apower plant that comprises a steam turbine and a gas turbine. The possibilityof turning on/off the gas and steam turbine, the operating constraints (minimumup and down times) and the different types of start-up of the turbines character-ize the hybrid behavior of a combined cycle power plant. For various predictionhorizons N ∈ {1, . . . ,24}, at every time instant an MILP problem with (46 ·N−4)optimization variables (27 ·N of which are integer), and (119 ·N− 8) mixed in-teger linear constraints was solved. The computation times (average and worstcases) needed for solving the MILPs, on a Pentium II-400 (running Matlab 5.3 forbuilding the matrices defining the MILP and running CPLEX for solving it) arewell below the sampling time of one hour.Traction control [16]. Traction controllers are used to improve a driver’s abilityto control a vehicle under adverse external conditions such as wet or icy roads.The objective of the controller is to maximize the tractive torque while preservingthe stability of the system. The wheel slip, i.e., the difference between the normal-ized vehicle speed and the speed of the wheel is used as the controlled variable.The complete MLD model, capturing all the hybrid features of the plant involves 6state variables, 1 δ variable, 3 z variables and 1 continuous control variable. Thereare 14 inequalities stemming from the representation of the δ and z variables inthe matrices E1−5 of MLD description. Rather than solving MILP problems on-line at all times (as was the case in the two previously mentioned applications),the authors were using an mp-MILP solver to compute off-line the PWA con-troller (15) for all the states x(0) within a given polyhedral set. The controller wasimplemented on a prototype vehicle and performed satisfactorily [12].Active vibration suppression [39]. Today, smart materials are used extensively tosuppress vibration of mechanical structures. The authors describe active vibrationsuppression using shunted piezoelectric materials (PZTs). These PZTs convertmechanical vibration energy into electrical energy, which is thereafter dissipatedby a passive electronic shunt circuit. Shunts with internal switches may lead to

19

a better damping performance than shunts that use only resistors. Furthermore,shunts with internal switches remain simple as the switches can be realized withMOSFETs. The mechanical structure together with switched PZTs can be mod-eled as a PWA system with s = 2 dynamics, the state vector x ∈ R

3, and oneinteger input u∈ {0,1} that specifies if the shunt is switched off or switched on. Itis shown in simulations that the solution to the underlining optimal control prob-lem for a prediction horizon of N = 17 yields a superior state feedback control law(i.e., better damping) than previously used ad-hoc switching rules. The system iscurrently undergoing experimental testing.

Among other applications we mention control of a benchmark multi-tank sys-tem [35], a gas supply system [7], a gear shift operation on automotive vehi-cles [45], a direct injection stratified charge engine [6], integrated management ofa power-train [4], voltage collapse in power systems [28] and direct torque controlof three-phase symmetric induction motors [40].

8 ConclusionsThe structure and computation of optimal control laws for hybrid systems werediscussed and various successful applications were shown. The results are veryencouraging but the research in this area is at the beginning. In particular, there issignificant potential to improve the algorithms in terms of their numerical proper-ties as well as their speed. As an example, the reader is referred to the new tech-nique for computing the infinite time linear quadratic regulator for constrainedsystems [29]. From the presented analysis it is clear that the proposed optimalcontrol law for hybrid systems is inherently complex and, therefore, the tech-niques for finding these control laws exactly must be computationally demanding.To deal with this issue various approaches to reduce the complexity (representa-tion of the control law [13], model employed for the optimization, decompositionof the optimization problem) are investigated.

Note: All technical reports AUTxx-xx from the Automatic Control Laboratoryare available from the web site http://control.ee.ethz.ch.

20

References[1] J. Acevedo and E.N. Pistikopoulos. A multiparametric programming ap-

proach for linear process engineering problems under uncertainty. Ind. Eng.Chem. Res., 36:717–728, 1997.

[2] M. Baotic, F. J. Christophersen, and M. Morari. A new algorithm for con-strained finite time optimal control of hybrid systems with a linear perfor-mance index. Technical Report AUT02-18, Automatic Control Laboratory,ETH Zurich, Switzerland, December 2002.

[3] M. Baotic, M. Vasak, M. Morari, and N. Peric. Hybrid theory based opti-mal control of electronic throttle. In Proc. American Control Conf., Denver,Colorado, USA, June 2003.

[4] A. Bemporad, P. Borodani, and M. Mannelli. Hybrid control of an auto-motive robotized gearbox for reduction of consumptions and emissions. InO. Maler and A. Pnueli, editors, Hybrid Systems: Computation and Control,HSCC 2003, volume 2623 of Lecture Notes in Computer Science, pages 81–96. Springer Verlag, 2003.

[5] A. Bemporad, G. Ferrari-Trecate, and M. Morari. Observability and con-trollability of piecewise affine and hybrid systems. IEEE Trans. AutomaticControl, 45(10):1864–1876, 2000.

[6] A. Bemporad, N. Giorgetti, I.V. Kolmanovsky, and D. Hrovat. Hybrid mod-eling and control of a direct injection stratified charge engine. In Sympo-sium on Advanced Automotive Technologies, ASME International Mechani-cal Engineering Congress and Exposition, New Orleans, Louisiana, Novem-ber 2002.

[7] A. Bemporad and M. Morari. Control of systems integrating logic, dynam-ics, and constraints. Automatica, 35(3):407–427, March 1999.

[8] A. Bemporad, M. Morari, V. Dua, and E. N. Pistikopoulos. The explicit lin-ear quadratic regulator for constrained systems. In Proc. American ControlConf., pages 872–876, Chicago, IL, USA, 2000.

[9] A. Bemporad, M. Morari, V. Dua, and E.N. Pistikopoulos. The explicit linearquadratic regulator for constrained systems. Automatica, 38(1):3–20, 2002.

21

[10] L. T. Biegler and I.E. Grossmann. Retrospective on optimization. Computers& Chemical Engineering, in press 2003.

[11] R. E. Bixby, M. Fenelon, Z. Gu, E. Rothberg, and R. Wunderling. MIP:Theory and practice: Closing the gap. In M. J. D. Powell and S. Scholtes,editors, System Modelling and Optimization, volume 174 of IFIP ConferenceProceedings, pages 19–50. Kluwer, 2000.

[12] F. Borrelli. Constrained Optimal Control of Linear and Hybrid Systems,volume 290 of Lecture Notes in Control and Information Sciences. Springer,in press 2003.

[13] F. Borrelli, M. Baotic, A. Bemporad, and M. Morari. Efficient on-line com-putation of constrained optimal control. In Proc. 40th IEEE Conf. on Deci-sion and Control, December 2001.

[14] F. Borrelli, M. Baotic, A. Bemporad, and M. Morari. Constrained optimalcontrol of discrete-time linear hybrid systems. Technical Report AUT03-05,Automatic Control Laboratory, ETH Zurich, Switzerland, 2003.

[15] F. Borrelli, M. Baotic, A. Bemporad, and M. Morari. An efficient algorithmfor computing the state feedback optimal control law for discrete time hybridsystems. In Proc. American Control Conf., Denver, Colorado, USA, June2003.

[16] F. Borrelli, A. Bemporad, M. Fodor, and D. Hrovat. A hybrid approachto traction control. In A. Sangiovanni-Vincentelli and M.D. Di Benedetto,editors, Hybrid Systems: Computation and Control, volume 2034 of LectureNotes in Computer Science, pages 162–174. Springer Verlag, 2001.

[17] F. Borrelli, A. Bemporad, and M. Morari. A geometric algorithm for multi-parametric linear programming. Journal of Optimization Theory and Appli-cations, in press 2003.

[18] B. De Schutter and B. De Moor. The extended linear complementarityproblem and the modeling and analysis of hybrid systems. In P. Antsaklis,W. Kohn, M. Lemmon, A. Nerode, and S. Sastry, editors, Hybrid Systems V,volume 1567 of Lecture Notes in Computer Science, pages 70–85. Springer,1999.

22

[19] B. De Schutter and T. van den Boom. Model predictive control for max-plus-linear systems. In Proc. American Control Conf., pages 4046–4050,Chicago, IL, June 2000.

[20] V. Dua, N. A. Bozinis, and E. N. Pistikopoulos. A multiparametric program-ming approach for mixed-integer quadratic engineering problems. Comput-ers and Chemical Engineering, 26(4-5):715–733, 2002.

[21] V. Dua and E.N. Pistikopoulos. An algorithm for the solution of multipara-metric mixed integer linear programming problems. Annals of OperationsResearch, 99:123–139, 2000.

[22] G. Ferrari-Trecate, E. Gallestey, A. Stothert, P. Letizia, M. Spedicato,M. Morari, and M. Antoine. Modeling and control of co-generation powerplants: A hybrid system approach. In C. J. Tomlin and M. R. Greenstreet,editors, Proc. 5th International Workshop on Hybrid Systems: Computationand Control, Lecture Notes in Computer Science. Springer-Verlag, 2002.

[23] G. Ferrari-Trecate, D. Mignone, and M. Morari. Moving horizon estimationfor hybrid systems. IEEE Trans. Automatic Control, 47(10):1663–1676, Oc-tober 2002.

[24] G. Ferrari-Trecate, M. Muselli, D. Liberati, and M. Morari. A clusteringtechnique for the identification of piecewise affine systems. Automatica,39(2), 2003.

[25] A. V. Fiacco. Introduction to sensitivity and stability analysis in nonlinearprogramming. Academic Press, London, U.K., 1983.

[26] T. Gal. Postoptimal Analyses, Parametric Programming, and Related Topics.de Gruyter, Berlin, 2nd edition, 1995.

[27] E. Gallestey, A. Stothert, D. Castagnoli, G. Ferrari-Trecate, and M. Morari.Using model predictive control and hybrid systems for optimal schedulingof industrial processes. Automatisierungstechnik, in press 2003.

[28] T. Geyer, M. Larsson, and M. Morari. Hybrid control of voltage collapse inpower systems. Technical Report AUT02-12, Automatic Control Lab, ETHZurich, 2002.

23

[29] P. Grieder, F. Borrelli, F. D. Torrisi, and M. Morari. Computation of the con-strained infinite time linear quadratic regulator. In Proc. American ControlConf., Denver, Colorado, USA, June 2003.

[30] G. Grimm, I. Postlethwaite, A. R. Teel, M. C. Turner, and L. Zaccarian.Linear matrix inequalities for full and reduced order anti-windup synthesis.In Proc. American Control Conf., pages 4134–4139, Arlington, Virginia,USA, 2001.

[31] W.P.M.H. Heemels. Linear complementarity systems: a study in hybrid dy-namics. PhD thesis, Dept. of Electrical Engineering, Eindhoven Universityof Technology, The Netherlands, 1999.

[32] W.P.M.H. Heemels, J.M. Schumacher, and S. Weiland. Linear complemen-tarity systems. SIAM Journal on Applied Mathematics, 60(4):1234–1269,2000.

[33] W.P.M.H. Heemels, B. De Schutter, and A. Bemporad. Equivalence of hy-brid dynamical models. Automatica, 37(7):1085–1091, July 2001.

[34] M.V. Kothare, P.J. Campo, M. Morari, and C.N. Nett. A unified frameworkfor the study of anti-windup designs. Automatica, 30(12):1869–1883, 1994.

[35] D. Mignone. Control and Estimation of Hybrid systems via MathematicalOptimization. Dr. sc. tech. thesis, Automatic Control Labotatory - ETH,Zurich, 2002. http://control.ee.ethz.ch.

[36] R. Mobus, M. Baotic, and M. Morari. Multi-object adaptive cruise control.In O. Maler and A. Pnueli, editors, Hybrid Systems: Computation and Con-trol, HSCC 2003, volume 2623 of Lecture Notes in Computer Science, pages359–374. Springer Verlag, 2003.

[37] E.F. Mulder, M.V. Kothare, and M. Morari. Multivariable anti-windup con-troller synthesis using linear matrix inequalities. Automatica, 37(9):1407–1416, 2001.

[38] G.L. Nemhauser and L.A. Wolsey. Integer and Combinatorial Optimization.Wiley, 1988.

[39] D. Niederberger, M. Baotic, and M. Morari. Active vibration suppressionusing switched PZTs. Technical Report AUT03-06, Automatic Control Lab,ETH Zurich, 2003.

24

[40] G. Papafotiou, T. Geyer, and M. Morari. Optimal direct torque control ofthree-phase symmetric induction motors. Technical Report AUT03-07, Au-tomatic Control Lab, ETH Zurich, 2003.

[41] R. Raman and I.E. Grossmann. Relation between MILP modeling and logi-cal inference for chemical process synthesis. Computers & Chemical Engi-neering, 15(2):73–84, 1991.

[42] M.M. Seron, J.A. DeDona, and G.C. Goodwin. Global analytical model pre-dictive control with input constraints. In Proc. 39th IEEE Conf. on Decisionand Control, pages 154–159, Chicago, IL, 2000.

[43] E.D. Sontag. Nonlinear regulation: The piecewise linear approach. IEEETrans. Automatic Control, 26(2):346–358, April 1981.

[44] P. Tøndel, T.A. Johansen, and A. Bemporad. An algorithm for multi-parametric quadratic programming and explicit MPC solutions. In Proc.40th IEEE Conf. on Decision and Control, Orlando, Florida, 2001.

[45] F.D. Torrisi and A. Bemporad. HYSDEL — a tool for generating compu-tational hybrid models. Technical Report AUT02-03, ETH Zurich, 2002.Submitted for publication in IEEE Transactions on Control Systems Tech-nology.

[46] F.D. Torrisi, A. Bemporad, and D. Mignone. HYSDEL - A language fordescribing hybrid systems. Technical Report AUT00-03, ETH Zurich, 2000.http://control.ethz.ch/˜hybrid/hysdel.

[47] M.L. Tyler and M. Morari. Propositional logic in control and monitoringproblems. Automatica, 35(4):565–582, 1999.

[48] A.J. van der Schaft and J.M. Schumacher. Complementarity modelling ofhybrid systems. IEEE Trans. Automatic Control, 43:483–490, 1998.

[49] H.P. Williams. Model Building in Mathematical Programming. John Wiley& Sons, Third Edition, 1993.

25