hybrid systems mpc for hybrid systems • mpc for hybrid ... eduardo camacho... · • some hycon...

18
MPC for Hybrid systems Eduardo F. Camacho Univ. of Seville E.F. Camacho EECI MPC course , Paris 2 Outline • Hybrid Systems MPC for Hybrid systems Some results Some HYCON examples • Conclusions E.F. Camacho EECI MPC course , Paris 3 Hybrid Systems Models TWO approaches CONTROL ENGINEERING- ORIENTED VIEW COMPUTER SCIENTIST- ORIENTED VIEW TIME - DRIVEN DYNAMICS EVENT - DRIVEN DYNAMICS E.F. Camacho EECI MPC course , Paris 4 Computer science approach - State machine embedding dynamics dx/dt=f(x) dx/dt=g(x) 1- Hybrid Automaton 2- Timed Petri Nets 3- Finite State Machines 4. Etc. E.F. Camacho EECI MPC course , Paris 5 3 2 C B B B C A 1 A 5 C 4 Hybrid Systems X={1,2,3,4,5} U={A,B,C} output 1 dx/dt=f 1 (x) X=1 5 X=5 dx/dt=f 2 (x) 4 X=4 dx/dt=f 3 (x) reference control system C U=C, t=t1 U=A, t=t2 A E.F. Camacho EECI MPC course , Paris 6 Control engineering approach x(k+1) = f(x(k),u(k)) y(k) = g(x(k),u(k)) state x = [x c T , x d T ] T output y = [y c T ,y d T ] T input u = [u c T ,u d T ] T ,

Upload: truongduong

Post on 10-Jun-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Hybrid Systems MPC for Hybrid systems • MPC for Hybrid ... Eduardo CAMACHO... · • Some HYCON examples • Conclusions E.F. Camacho EECI MPC course , Paris 27 MPC and PWA systems

MPC for Hybrid systems

Eduardo F. CamachoUniv. of Seville

E.F. Camacho EECI MPC course , Paris 2

Outline

• Hybrid Systems• MPC for Hybrid systems• Some results• Some HYCON examples• Conclusions

E.F. Camacho EECI MPC course , Paris 3

Hybrid Systems Models

TWO approaches

CONTROL ENGINEERING-ORIENTED VIEW

COMPUTER SCIENTIST-ORIENTED VIEW

TIME - DRIVENDYNAMICS

EVENT - DRIVEN DYNAMICS

E.F. Camacho EECI MPC course , Paris 4

Computer science approach

- State machine embedding dynamics

dx/dt=f(x) dx/dt=g(x)

1- Hybrid Automaton 2- Timed Petri Nets3- Finite State Machines4. Etc.

E.F. Camacho EECI MPC course , Paris 5

3

2CB

BB

CA

1

A5C

4

Hybrid Systems

X={1,2,3,4,5}U={A,B,C}

output

1

dx/dt=f1(x)

X=1

reference control system

5

X=5

dx/dt=f2(x)

reference control system

4

X=4

dx/dt=f3(x)

reference control system

C

U=C, t=t1 U=A, t=t2

A

E.F. Camacho EECI MPC course , Paris 6

Control engineering approach

x(k+1) = f(x(k),u(k))y(k) = g(x(k),u(k))

state x = [xcT, xd

T]T

output y = [ycT,yd

T]T

input u = [ucT,ud

T]T,

Page 2: Hybrid Systems MPC for Hybrid systems • MPC for Hybrid ... Eduardo CAMACHO... · • Some HYCON examples • Conclusions E.F. Camacho EECI MPC course , Paris 27 MPC and PWA systems

E.F. Camacho EECI MPC course , Paris 7

Control engineering approach

discretecontrol command

generator

dynamicalsystem

reference

output

1 - Piecewise Affine (PWA) Systems2 - Mixed Logical Dynamical (MLD) Systems 3 - Linear Complementary (LC) Systems 4 - Extended Linear Complementary (ELC) Systems5 - Max-Min-Plus-Scaling (MMPS) Systems6 - etc

E.F. Camacho EECI MPC course , Paris 8

Equivalence Results

Figure 1: Graphical representation of the links between the classes of hybrid systems. An arrow going from class A to class B means that A is a subset of B. The label next to each arrow corresponds to the result that states this relation. An arrow with a star (*) require conditions to establish the indicate inclusion.

PWA

MLD

LC MMPS

ELC

Prop. 9*

Prop. 6Prop. 5*

Prop. 1Prop. 2*Prop. 4*

Prop. 3

Prop. 7

Prop. 8*

Cor. 2Cor. 1*Cor. 3*Rem. 3

Rem. 4

E.F. Camacho EECI MPC course , Paris 9

Example: A Jacket Cooled Bath Reactor

X (t)T = [C (t) T (t) V (t)]T

Output vector

Manipulated variable

E.F. Camacho EECI MPC course , Paris 10

Example: A Jacket Cooled Bath Reactor (2)

E.F. Camacho EECI MPC course , Paris 11

Mixed Logical Dynamical Systems (MLD)

Notice that if the state is discrete, not necessarily Boolean, butfinite, it can be coded into a set of Boolean variables.

x (t) = [xrT (t) xb

T (t)]xr (t) є n

xb (t) є {0.1}nb

y (t) = [yrT (t) yb

T (t)]

yr (t) є m

u (t) = [urT (t) ub

T (t)]

ur (t) є l

ub (t) є {0,1}lb

(t) є {0,1}lbAuxiliary continuous z (t) є r and discrete variables ∂ (t) є {0,1}rb are usually needed.

E.F. Camacho EECI MPC course , Paris 12

logical expressions can be trasformed into algebraicconstraints.

L1 L2 ~ L1 V L2

L1 L2 L1 = L2.

TFFT

L1 L3TFFT

TTFT

TTFT

FFFT

FTTT

TTFF

FTFT

FFTT

L1 = L2~ L1 V L2L1 L2 L1 Λ L2L1 V L2~ L1L2L1

Logical Expressions and algebraic constraints

Page 3: Hybrid Systems MPC for Hybrid systems • MPC for Hybrid ... Eduardo CAMACHO... · • Some HYCON examples • Conclusions E.F. Camacho EECI MPC course , Paris 27 MPC and PWA systems

E.F. Camacho EECI MPC course , Paris 13

Logical Expressions and algebraicconstraints(2)

Associate an integer variable ∂. ∂= 1 if L= T (true) and ∂= 0 if L= F (False).

Algebraic inequalities:~ L1 ∂1 = 0

L1 V L2 ∂1 + ∂2 ≥ 1L1 Λ L2 ∂1= 1, ∂2= 1L1 L2 ∂1 - ∂2 ≤ 0L1 L2 ∂1 - ∂2 = 0

E.F. Camacho EECI MPC course , Paris 14

Logical Expressions and constraints(3)

• Consider a function f and a logical variable l є {0,1}.• f is bounded in its domain by f ≤ f (x) ≤ f. • The following logical statements and constraints are

equivalent.

(f (x) ≤ 0) Λ (∂= 1) f (x) - ∂ ≤ - 1 + f (1 - ∂) (f (x) ≤ 0) V (∂= 1) f (x) ≤ f¯ ∂

~ (f (x) ≤ 0) f (x) > 0 or f (x) ≥ є

where є is the smallest number in the computer.

(f (x) ≤ 0) (∂ = 1) ~ (f (x) ≤ 0) V (∂ = 1)

E.F. Camacho EECI MPC course , Paris 15

Logical Expressions and algebraicconstraints(4)

If and only if condition ( ) necessary toestablish the equivalence between the logicalpredicate and the set of constraints can

f (x) ≤ f¯∂1= f¯ (1-∂)(∂ = 1) (f (x) ≤ 0)

f(x) ≥ є + ∂ (f – є)

E.F. Camacho EECI MPC course , Paris 16

Logical predicates and real functions.

Consider a term in the form ∂ f (x). Define an auxiliary real variable z ∂ f(x) with z = 0 when ∂ = 0 and z = f (x) when ∂ = 1.

Predicates((∂ = 0)) (z = 0) and (∂ = 1) (z = f (x))) can

be translated into the following linear inequalities:

z ≤ f¯ ∂z ≥ f ∂

z ≤ f (x) – f (1 - ∂)z ≥ f (x) - f¯ (1 - ∂)

E.F. Camacho EECI MPC course , Paris 17

Logical predicates and real functionsproduct of variables (∂1, ∂2).

Define auxiliary variable ∂3 = ∂1 ∂2.

Equivalent to

- ∂1 + ∂3 ≤ 0(∂3 = 1) (∂1 = 1) Λ (∂2 = 1) - ∂2 + ∂3 ≤ 0

∂1 + ∂2 + ∂3 ≤ 1

E.F. Camacho EECI MPC course , Paris 18

A Mixing Process example

1. Filled and stirred at the same time until the level in thetank reaches the maximum height H.

2. At this point the outlet valve opens, letting the product out until the level in the tank is below the empty level.

xb = 0 the process in the filling-mixing statexb = 1 when the process is in the empty state.

Page 4: Hybrid Systems MPC for Hybrid systems • MPC for Hybrid ... Eduardo CAMACHO... · • Some HYCON examples • Conclusions E.F. Camacho EECI MPC course , Paris 27 MPC and PWA systems

E.F. Camacho EECI MPC course , Paris 19

A Mixing Process example (2)

Logical part:((xb (t) = 1) Λ (xc (t) > h)) V (xc (t) > H) xb (t+1) = 1

Introduce some logical auxiliary ∂1, ∂2, ∂3

(∂1 = 1) (xc (t) ≤ H)(∂2 = 1) (xc (t) > h)(∂3 = 1) ((xb (t)= 1) Λ ∂2)(∂4 = 1) (∂3 V ~ ∂1)

Continuous part:xc (t + 1) = xc (t) + (1 – xb (t)) (QA + QB) / S – xb (t) QC / S

Operating constraints can be added. For example, xc (t) ≤ H¯ ; xc (t) ≥ 0

E.F. Camacho EECI MPC course , Paris 20

The complete model

xc (t + 1) = xc (t) + (1 – xb (t) (QA + QB) / S – xb (t) Qc / Sxb (t + 1) = ∂4 (t)s.t.: xc (t) – H ≤ (H¯ - H) (1 - ∂1)

xc (t) – H ≥ є – (H + є) ∂1h – xc (t) ≤ h (1 - ∂2) - є∂2h xc (t) ≥ є (h - H¯) ∂2- xb (t) + ∂3 ≤ 0-∂2 + ∂3 ≤ 0xb (t) + ∂2 - ∂3 ≤ 1∂1 - ∂3 + ∂4 ≤ 1∂1 - ∂3 + 2∂4 ≥ 1xc (t) ≤ H¯xc (t) ≥ 0

E.F. Camacho EECI MPC course , Paris 21

PWA. (Sontag, 1981)

Nonlinear System:

PWA Approx.

Many hybrid processes can be modeled by PWA system

x(t+1)=f(x(t),u(t))

y(t)=g(x(t))

E.F. Camacho EECI MPC course , Paris 22

Function

E.F. Camacho EECI MPC course , Paris 23

PWA Approximation

E.F. Camacho EECI MPC course , Paris 24

Approximation error

Page 5: Hybrid Systems MPC for Hybrid systems • MPC for Hybrid ... Eduardo CAMACHO... · • Some HYCON examples • Conclusions E.F. Camacho EECI MPC course , Paris 27 MPC and PWA systems

E.F. Camacho EECI MPC course , Paris 25

PWA systems

x

u

x(k+1) = A1 x(k) + B1 u(t) + f1

x(k+1) = A2 x(k) + B2 u(t) + f2

x(k+1) = A3 x(k) + B3 u(t) + f3

E.F. Camacho EECI MPC course , Paris 26

Outline

• Model Predictive Control• Hybrid Systems• MPC for Hybrid systems• Some results• Some HYCON examples• Conclusions

E.F. Camacho EECI MPC course , Paris 27

MPC and PWA systems

PWA Model:

Where is a polyhedral partition ofstates and input space

E.F. Camacho EECI MPC course , Paris 28

Example: Tank with DifferentArea Sections (1)

Approximated by discrete time model:

E.F. Camacho EECI MPC course , Paris 29

The model can be described by the following PWA Systems:

1. (x (t) ≤ h0) Λ (ud (t) = 0) x (t) + T0 (uc (t) – q0)) / A2

2. (x (t) ≤ h0) Λ (ud (t) = Qd) x (t+1) = x (t) + (T0 (uc (t) + Qd – q0)) /A2

3. (x (t) > h0 Λ (ud (t) = 0) x (t+1)= x (t) + (T0 (uc (t) – q0)) / A1

4. (x (t) > h0 Λ (ud (t) = Qd x (t+1)= x (t) + (T0 (uc (t) – q0)) / A1

Example: Tank with DifferentArea Sections (2)

rx (r (j+t) – x (t+j))2 + rudu

d (t+j-1)2 + rucuc (t+j-1)2

E.F. Camacho EECI MPC course , Paris 30

Tank with discontinuous section: simulation results

Page 6: Hybrid Systems MPC for Hybrid systems • MPC for Hybrid ... Eduardo CAMACHO... · • Some HYCON examples • Conclusions E.F. Camacho EECI MPC course , Paris 27 MPC and PWA systems

E.F. Camacho EECI MPC course , Paris 31

Optimization problem

Xkyk=Ckxk+gk

xk+1=Ak x k+Bk uk+f k?

Xk+1yk+1=Ck+1xk+1+gk+1

xk+2=Ak+1xk+1+Bk+1uk+1+fk+1

?Xk+2

yk+2=Ck+2xk+2+gk+2

xk+3=Ak+2xk+2+Bk+2uk+2+f k+2

The resulting optimization problem

U = {u(k), u(k+1), u(k+2), …,u (k+N-1)} realI = {I(k), I(k+1), I(k+2),…, I(k+N-1)} Integer

Mixed Integer-Real

Optimization Problem

E.F. Camacho EECI MPC course , Paris 32

I = {I(k), I(k+1), I(k+2),…, I(k+N-1)}

Index can be written as

The predicted vector is written as

The problem reduces to a QP Problem

Problem when I is fixed

E.F. Camacho EECI MPC course , Paris 33

...2 s1 ... 2 s1 ...2 s1 ... [Ik, Ik+1, Ik+2]

N = 2

State Transition Graph

Ik [Ik]

QP (LP) problem[Ik ,Ik+1 ,Ik+2 ]

1 s2

N = 1

[Ik, Ik+1]...

E.F. Camacho EECI MPC course , Paris 34

Computationalcosts

If the number of sub-systems is san the prediction horizon is N

Then the number of QP (or LP) to solve is

NRP = sN

We need to reduce the Computational Problem

E.F. Camacho EECI MPC course , Paris 35

Solutions PWA-MPC

• 1 – Explicit solution• 2 – Mixed Integer-Real Optimization

E.F. Camacho EECI MPC course , Paris 36

1. Explicit solution

The control law can be write as u(x(k)) = Fi x(k) + Gi if ∈ x(k) ∈ Pi

- Multiparametric Problems- Computational Expensive (off-line)- Only useful for simple systems

Page 7: Hybrid Systems MPC for Hybrid systems • MPC for Hybrid ... Eduardo CAMACHO... · • Some HYCON examples • Conclusions E.F. Camacho EECI MPC course , Paris 27 MPC and PWA systems

E.F. Camacho EECI MPC course , Paris 37

uc ud

qc3

qc4h3

h4

h1 h2

qo1 qo2

E.F. Camacho EECI MPC course , Paris 38

E.F. Camacho EECI MPC course , Paris 39

Branch and Bound Mixed Integer Programming

Consider the optimization problem P0 with u єand ∂ є{0,1}m;

E.F. Camacho EECI MPC course , Paris 40

Branch and Bound Mixed IntegerProgramming (2)

• Given two subsets U1 U and U2 U • And bounds f1 ≤ min uєU 1 f(u), f2 ≥ min uєU f (u).

• Then if, f2 ≤ f1, the points in U1 may be disregarded

Problem (RP0) relax conditions ∂ є {0, 1}m by 0 ≤ ∂ ≤ 1 with larger feasibility region and the following

characteristics:1. If P0 is feasible, so is RP0; if RP0 is infeasible so is P0.2. The minimum of the relaxed problem is a lower bound of the

minimum of the original problem.(i.e., min RP0 ≤ min P0).

3. If the optimal solution of RP0 is feasible for P0, it is also the optimal solution for P0.

E.F. Camacho EECI MPC course , Paris 41

Branch and Bound Mixed IntegerProgramming (3)

Define the problem Pkj; (k depth in the tree and j a binary combination of the boolean variables for one of the nodes being explored (j є {0, 1}k).)For example, P210 is the problem when the first two boolean decision variables are fixed to 1and 0, respectively (∂1= 1, ∂2= 0) while leaving the remaining boolean variables free ∂k + I є {0, 1} for i= 1 …, m – k.The relaxed problem RPkj is the problem obtained when the constraints ∂k+i є {0, 1} for i= 1, …, m – k are relaxed to 0 ≤ ∂k+i ≤ 1 for i= 1, …, m – k.

E.F. Camacho EECI MPC course , Paris 42

Define u*r= arg min RPkj ; u*= arg min Pkj

F(Pkj), and F(RPkj) the feasible regions of problems Pkjand RPkj.

1. F (Pkj) F (RPkj)2. F (Pkj) ≠ Ø F (RPkj) ≠ Ø3. F (RPkj) = Ø F (Pkj) = Ø4. min RPkj ≤ min Pkj5. If u*

r є F (Pkj) u* = u*r

Branch and Bound Mixed Integer Programming (3)

Page 8: Hybrid Systems MPC for Hybrid systems • MPC for Hybrid ... Eduardo CAMACHO... · • Some HYCON examples • Conclusions E.F. Camacho EECI MPC course , Paris 27 MPC and PWA systems

E.F. Camacho EECI MPC course , Paris 43

Branch and Bound Mixed Integer Programming (4)

A basic branch and bound-based MIP algorithm works as follow:

1) Calculate an upper bound J¯(P0) and a lower bound J (P0)of minu (P0), Ø SOL. Put P0 and its associated lower bound (J (P0)) into OPEN (List of candidate Solutions).

2) If OPEN is empty, the optimum solution is in SOL and its value is J¯, STOP.

3) Otherwise, get a problem Pi, from OPEN. If the associated lower bound of Pi is bigger than J¯, go to step 2 (disregard node as its lower bound is above the upper bound of the solution found so far).

4) Form the relaxed problem RPi. Solve RPi. Let SOL1 be the solution (it may be empty if the problem is unfeasible) and Jibe the minimum value of the objective function.

E.F. Camacho EECI MPC course , Paris 44

Branch and Bound Mixed Integer Programming (5)

5) If SOL1 is empty (problem RPi infeasible), go to step 2.6) If Ji ≥ J¯ go to step 2 (disregard node as its lower

bound is above the upper bound of the solution found so far).

7) If SOL1 is also feasible for Pi set Ji* = Ji, set J¯ = Ji and

the solution of SOL = SOL1; go to step 2.8) Generate problems Pio and Pi1 (children of problem Pi)

and put them in OPEN with associated lower bounds J (Pio) = J (Pio)= Ji, go to step 2.

E.F. Camacho EECI MPC course , Paris 45

Branch and Bound Mixed Integer Programming (5)

Some remarks:

The initial upper and lower bounds can be fixed at very highand low values if no information is available. However, thenumber of visited nodes can be reduced if these bounds are tightly estimated.How is the next node to be expanded selected from the set of candidate solutions.

1. The depth-first search the (expand node with greatest depth). 2. The depth-first search of (expanding node with the smallest

depth), more systematic but requires more nodes in memory.3. More efficient strategies use information about the objective

function.4. The order in which the Boolean variables are selected is to order

these variables according to the influence they will have on theobjective function.

E.F. Camacho EECI MPC course , Paris 46

2 - Use the systems information to prune (1)A - Reach and controllable sets

xk+1=Ak x k+Bk uk+f k

Xkyk=Ckxk+gk

Xk+1yk+1=Ck+1xk+1+gk+1

Xk+2yk+2=Ck+2xk+2+gk+2

xk+2=Ak+1xk+1+Bk+1uk+1+fk+1 xk+3=Ak+2xk+2+Bk+2uk+2+f k+2

? ?

Ik

...

[Ik,*,*]

1

2 s1 ...

s

2 s1 ...

[Ik,Ik+1,*]

[Ik,Ik+1,Ik+2]

2

2 s1 ...

Reach and controllable sets

E.F. Camacho EECI MPC course , Paris 47

Definition 1: (Kerrigan 2000) Reach set (RS)

Definition 2: n-Step Reachable Neighbors

Definition 3: Index set of n-SRN

The STG can be pruned as Ij+k should belong to Nk

j

Pruning using Reach Sets

2 - Use the systems information to prune (2)A - Reach and controllable sets

E.F. Camacho EECI MPC course , Paris 48

2 - Use the systems information to prune (3)

A - Reach and controllable sets Reach Set

-3.5 -3 -2.5 -2 -1.5 -1

2

3

4

5

10

11

12

13

18

19

21

x

-6

-4

-2

0

2

x 2

11

11

N111 = {10, 11, 12, 13, 14, 16, 18, 19 ,21};

N211 = {3, 4, 5, 8, 10, 11, 13, 14, 12, 16, 18, 19, 21, 22};

11

N311 = {3, 4, 5, 8, 10, 11, 13, 14, 12, 16, 18, 19, 21, 22}

1

Page 9: Hybrid Systems MPC for Hybrid systems • MPC for Hybrid ... Eduardo CAMACHO... · • Some HYCON examples • Conclusions E.F. Camacho EECI MPC course , Paris 27 MPC and PWA systems

E.F. Camacho EECI MPC course , Paris 49

Definition 4: (Kerrigan 2000) The robust one-step controllable set

Definition 5: The robust one-step controllable set of the subsystem j over the subsystem i

Pruning using Controllable Sets

If xk∉Q1Ik+1|Ik is satisfied then the xk+1 state does not belong to Ik+1

transition; therefore, the transition from Ik to Ik+1is not allowed

E.F. Camacho EECI MPC course , Paris 50

-2.2 -2.1 -2 -1.9 -1.8 -1.7 -1.6 -1.5

-10

-8

-6

-4

-2

0

2

9

10

11

12

13 16

17

18

19

2122

x 1

x2

1 12R (X )

Controllable sets

int(R1(X12),X 9)

Q29/12Q1

9/12 Q39/12

E.F. Camacho EECI MPC course , Paris 51

.

.

....

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

. . .

. . .

. . .

. . .

. . .

. . .

.

.

.

.

.

.

.

.

.

k

rootnode 0depth 0

k+N-2k+1 k+2 k+Nlevel 0 level 1 level 2 level N-2 level N

k+N-1level N-1

x(k) x(k+1) x(k+2) x(k+N-2) x(k+N)x(k+N-1)

node 1,1depth 1branch 1

node 1,sdepth 1branch s

node 2,1depth 2branch 1

node 2,s2

depth 2branch s2

leave N,1depth Nbranch 1

leave N,sN

depth Nbranch sN

+ >Branch & Bound

E.F. Camacho EECI MPC course , Paris 52

where

It can be rearranged as

Bound on the objective function

If the sequence of subsystems is defined

then, the state and input fulfill that

E.F. Camacho EECI MPC course , Paris 53

It is possible to obtain a minimum bound of Ji

This is a QP Problem

then

This is a lower bound of the index and can be used in a Branch & Bound algorithm

Somewhat conservative but there are more tricks

E.F. Camacho EECI MPC course , Paris 54

Prediction horizon vs. Nº QP evaluation

2 4 6 8 10100

105

1010

1015

Prediction Horizon

Log(Number of QP evaluation)

Enumerative QPevaluation = SN-1

Max Number of QP evaluation

Min Number of QP evaluationMean Number of QP evaluation

Page 10: Hybrid Systems MPC for Hybrid systems • MPC for Hybrid ... Eduardo CAMACHO... · • Some HYCON examples • Conclusions E.F. Camacho EECI MPC course , Paris 27 MPC and PWA systems

E.F. Camacho EECI MPC course , Paris 55

Invariant sets for PWA

• Role of invariant sets in MPC

– Used as terminal constraint to guaranty stability

– The domain of attraction of the MPC depends on the size of the invariant set.

E.F. Camacho EECI MPC course , Paris 56

Invariant sets for PWA• Regions

– Given a convex polyhedron

– The one-step set of

E.F. Camacho EECI MPC course , Paris 57

Invariant sets for PWA• Algorithm 1

– Set can be represented as the union of convex sets. The number of required convex sets grows exponentially with k. This approach is not practical for relatively small values of k.

E.F. Camacho EECI MPC course , Paris 58

Outer bound of invariant set• Algorithm 2

– The convex hull operator required to implement the algorithm can be substituted by any outer approximation.

– It can be stopped when there is no significant improvement.

– Each set contains , for all

E.F. Camacho EECI MPC course , Paris 59

Inner approx. of invariant set

• Given set , denotes the

complementary set of in .

• The algorithm obtains an inner approximation

(polyhedron) of a union of convex sets.

• Done by computing inner supporting constraints

that separate the complementary set of the

union of sets from the inner approximation.

E.F. Camacho EECI MPC course , Paris 60

Example

Outer approximation Inner approximation

Page 11: Hybrid Systems MPC for Hybrid systems • MPC for Hybrid ... Eduardo CAMACHO... · • Some HYCON examples • Conclusions E.F. Camacho EECI MPC course , Paris 27 MPC and PWA systems

E.F. Camacho EECI MPC course , Paris 61

Approximated evolution of PWA: Zonotopes

– Allow fast computation of an outer approximation of the union and intersection of zonotopes.

– Permit to compute a guaranteed outer bound of the uncertain evolution.

– They constitute a powerful tool to address the MPC problem (Bravo, et al. Automatica 2006).

– Used in combination with the outer and inner bound of the robust invariant sets can be usedfor robustness or verification problems,

E.F. Camacho EECI MPC course , Paris 62

Zonotopes

• Definitions– Minkowski sum of two set X and Y denoted by

– Unitary interval

– Unitary box , is a vector composed by m unitary intervals.

– Zonotope of order m. Given a vector and a matrix , the set

E.F. Camacho EECI MPC course , Paris 63

Evolution Zonotopes for autonomous PWA sytems

– PWA system– At time , the current state set is represented

by a zonotope– Then, it is mapped by the dynamic function as

which is a zonotope.– In the presence of additive uncertainty, an exact

outer bound of the one step set can also be obtained a zonotope.

E.F. Camacho EECI MPC course , Paris 64

Union of zonotopes

• Consider– Two zonotopes

• Property– A zonotope containing

their union is

Unsafe

Inner

Outer

Init

• Given:– A PWA system.– Outer and inner bound

of the robust invariantset

– An unsafe region– An initial condition

region

Constraint satisfaction

– If the current zonotopeis completely containedin the inner bound set, then the system issafe.

Constraint Satisfaction

Page 12: Hybrid Systems MPC for Hybrid systems • MPC for Hybrid ... Eduardo CAMACHO... · • Some HYCON examples • Conclusions E.F. Camacho EECI MPC course , Paris 27 MPC and PWA systems

• Conservative rule:

– If the current zonotope– is contained in more

than one region, thencompute the

intersection zonotopesand bound the union oftheir images.

Constraint Satisfaction

If more accuracy is required:

– If the current

zonotope is contained

in more than one

region, then compute

the intersection

zonotopes and analizeindependently theirimages.

Constraint Satisfaction

• Intersection

– If the current zonotope

is contained in more

than one region, then compute the

intersection zonotopes andanalize

indepenently their images.

Constraint Satisfaction

• Reducing the search space:

– If the current zonotope

is partially contained in theinner bound set,

then compute the intersectionand

analize only the

external part.

Constraint Satisfaction

E.F. Camacho EECI MPC course , Paris 71

Outline

• Model Predictive Control• Hybrid Systems• MPC for Hybrid systems• Some results• Some HYCON examples• Conclusions

HYCON Network of ExcellenceFP6 – IST- 511368

Fuel cell: PWA model

Page 13: Hybrid Systems MPC for Hybrid systems • MPC for Hybrid ... Eduardo CAMACHO... · • Some HYCON examples • Conclusions E.F. Camacho EECI MPC course , Paris 27 MPC and PWA systems

• Fuel cell: safety objective

– Evaluate the possibility of starvation

Sistema

Ist

λo2

Fuel cell: PWA model

• Fuel cell: problems

– Complex dynamics.• Non-linearities,

• hybrid

– Different time constants

Fuel cell: PWA model

• Fuel cell: identification

– The identification has done employing ramps as input.

SistemastI 2oλ1s

Integrator

0 2 4 6 8 10 12 14 16 18 200

0.01

0.02

0.03

0.04

0.05

0.06

0.07

0.08

0.09

0.1

DeltaIst [V/s]

Tim

e [s

]

0 2 4 6 8 10 12 14 16 18 202.224

2.226

2.228

2.23

2.232

2.234

2.236

2.238

2.24

2.242

Time [s]

Lam

bda o2

0 2 4 6 8 10 12 14 16 18 2020

20.2

20.4

20.6

20.8

21

21.2

21.4

21.6

21.8

22

Time [s]

Ist

Fuel cell: PWA model

• Fuel cell: system characteristic

the output depends only on the ratio between thevariation of the current and the current!

st

st

IIΔr =

A PWA model can be identified considering r as an input

Fuel cell: PWA model

• Obtained model is of the form:

where x is the state, r the ratio input, w the uncertainty, u the control action.

• Suitable for MPC:1. It is possible to obtain the greatest robust (control) invariant set.2. It is possible (using LMIs) to design a controller of the form:

3. It is not difficult to implement a MPC generalizing the results of Kothare et al Automatica 1996.

Fuel cell: PWA model

• Fuel cell: identification

– In blue the non-linear systems with differentconstant current.

– In magenta the linear identified modelwithout integrator.

– In red the linear modelwith integrator.

0 2 4 6 8 10 12 14-0.05

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

Time [s]

Lam

bda o2

Ist = 10Ist = 20Ist = 30Ist =40IdIdInt

Fuel cell: PWA model

Page 14: Hybrid Systems MPC for Hybrid systems • MPC for Hybrid ... Eduardo CAMACHO... · • Some HYCON examples • Conclusions E.F. Camacho EECI MPC course , Paris 27 MPC and PWA systems

• Fuel cell: identification results

– Example: a random current ratio

Output Error

10 20 30 40 50 60 70 80 90

2

2.05

2.1

2.15

2.2

2.25

2.3

2.35

2.4

2.45

2.5

Time [s]

Lam

bda o2

LambdaIdIdint

10 20 30 40 50 60 70 80 90

-0.06

-0.04

-0.02

0

0.02

0.04

0.06

Time [s]

Erro

r

Error IdError Id Int

Fuel cell: PWA model

E.F. Camacho EECI MPC course , Paris 80

E.F. Camacho EECI MPC course , Paris 81

Solar Plant web

E.F. Camacho EECI MPC course , Paris 82

Solar Plant Benchmark

u1

u2

ud

y1y2

y3

y4

E.F. Camacho EECI MPC course , Paris 83

Absorption machine

E.F. Camacho EECI MPC course , Paris 84

Process variables

• Controlled variables:– temperatures and flows

• Manipulated variables:– pump velocity and valves

• Perturbations:– Solar radiation, ambient temperature, flow

through the evaporator of the absorption machine, evaporator input temperature of the absorption machine

Page 15: Hybrid Systems MPC for Hybrid systems • MPC for Hybrid ... Eduardo CAMACHO... · • Some HYCON examples • Conclusions E.F. Camacho EECI MPC course , Paris 27 MPC and PWA systems

E.F. Camacho EECI MPC course , Paris 85

1.Fulfill cooling demand.2.Minimize use of gas.3.Maximize energy stored at the end of the

day.4.Minimize the number of operating mode

changes.

Control objectives

E.F. Camacho EECI MPC course , Paris 86

Operating modes

1. Recirculation ⇒ l1 = 12. Loading the tanks with hot water ⇒ l2 = 13. Using the solar collectors ⇒ l3 = 14. Using the solar collectors and gas heater ⇒ l4 = 15. Using the gas heater ⇒ l5 = 16. Using the tanks and gas heater ⇒ l6 = 17. Using tanks ⇒ l7 = 18. Loading the tanks and using the gas heater ⇒ l8 = 19. Recirculation and using the gas heater ⇒ l9 = 110.Using the solar collectors and loading tank ⇒ l10 = 111.Using the solar collectors and gas heater, and loading

tanks ⇒ l11 = 1

E.F. Camacho EECI MPC course , Paris 87

m1

E.F. Camacho EECI MPC course , Paris 88

m2

E.F. Camacho EECI MPC course , Paris 89

m3, m4, m5, m6 …

E.F. Camacho EECI MPC course , Paris 90

Model validation

Page 16: Hybrid Systems MPC for Hybrid systems • MPC for Hybrid ... Eduardo CAMACHO... · • Some HYCON examples • Conclusions E.F. Camacho EECI MPC course , Paris 27 MPC and PWA systems

E.F. Camacho EECI MPC course , Paris 91

HYCONHYCONHybrid Control: Taming

Heterogeneity and Complexity of Networked Embedded Systems

Hybrid systems provide the modeling framework for capturing the richness of behaviors characteristic of embedded systems.

The key feature of hybrid systems is their capability of rigorously describing the dynamics of devices where continuous parts – governed by differential or difference equations and discrete parts – described by finite state machines, if-then-else rules, prepositional and temporal logic interact over time.

E.F. Camacho EECI MPC course , Paris 92

The controller is connectedwith the real plant using OPC library of Matlab/Simulink.

The controler is allocatedinside the block called Controllerand is connected with the necessary inputs and outputs.

Control of the Real Plant

E.F. Camacho EECI MPC course , Paris 93

Control of the Real Plant

E.F. Camacho EECI MPC course , Paris 94

University of Sienna (UNISI).

University of Dortmund (UNIDO).

University of Valladolid (UV).

ETH Zurich (ETHZ).

University of Seville (US).

Proposals from HYCON partners. Proposals from non HYCON researchers.

Universidad Tecnológica de Bolívar, Colombia

University of Almería, Spain

Federal University of Santa Catarina, Brazil

Uppsala University, Sweden

University of Los Andes, Venezuela

Simón Bolívar University, Venezuela

Accepted Not accepted

Participants

HYCON activities: Solar plant benchamrk

E.F. Camacho EECI MPC course , Paris 96

•Award panel

•Analyzed issues:

•Results on two days simulation (real environmental data)

•Results of one day control on the real plant

•The proposed controller, implementation requirements …

•Award involved 1000 Euros check

WP2 activities – M25-M36

Page 17: Hybrid Systems MPC for Hybrid systems • MPC for Hybrid ... Eduardo CAMACHO... · • Some HYCON examples • Conclusions E.F. Camacho EECI MPC course , Paris 27 MPC and PWA systems

E.F. Camacho EECI MPC course , Paris 97

WP2 activities – M25-M36

E.F. Camacho EECI MPC course , Paris 98

Control operating modes (D. Zambrano)

E.F. Camacho EECI MPC course , Paris 99

Day 3 tests (D. Zambrano)

E.F. Camacho EECI MPC course , Paris 100

Day 2 tests (Darine Zambrano)

E.F. Camacho EECI MPC course , Paris 101

Detailed simulink model andprocess data available

HYCON WP2 websitenyquist.us.es/hycon/

E.F. Camacho EECI MPC course , Paris 102

Two stages solar cooling plant (Gas Natural)

Page 18: Hybrid Systems MPC for Hybrid systems • MPC for Hybrid ... Eduardo CAMACHO... · • Some HYCON examples • Conclusions E.F. Camacho EECI MPC course , Paris 27 MPC and PWA systems

E.F. Camacho EECI MPC course , Paris 103

Conclusions

• MPC ideas can be applied to Hybridsystems

• Many Open Problems– Modelling– Identification– Stability and Robustness– Implementation

E.F. Camacho EECI MPC course , Paris 104

Thanks