Mathematical Programming Approach toMathematical Programming Approach toHybrid SystemsHybrid Systems
Analysis and ControlAnalysis and Control
Automatic Control LaboratoryAutomatic Control LaboratorySwiss Federal Institute of TechnologySwiss Federal Institute of Technology
ETHETH Zürich Zürich
Manfred MorariAlberto Bemporad Giancarlo Ferrari Trecate
Mato Baotic, Francesco Borrelli, Francesco Cuzzola,Tobias Geyer, Domenico Mignone, Fabio Torrisi
Drivers for Control Research
Novel Applicationsenabled by
• new computer power• new actuators• new sensors
Novel Theorymotivated by
• system integration• system failures
Hybrid systemsHybrid systems
Hybrid SystemsHybrid Systems
dtdx(t) = Ax(t) +Bu(t)y(t) = Cx(t) +Du(t)
úS , (X;U; ');X = f1; 2; 3; 4; 5g;U = fa; b; cg;' : X â U ! X
ComputerScience
ControlTheory
Finitestate
machines
Continuous dynamical
systemssystemu(t) y(t)
x 2 Rn; u 2 Rm
y 2 Rp
Hybrid Systems in Control - MotivationHybrid Systems in Control - Motivation• Switches occuring naturally
because plant operates in different modes
• Switches introduced by controller
to accommodate constraints: anti-windup, MPC to implement sequence: PLC
•• Switches introduced by controller: Switches introduced by controller: Model Predictive Control (MPC) Model Predictive Control (MPC)
Theorem: The solution of the MPC problem yields a
piecewise affine state feedback law.
(Bemporad, Morari, Dua, Pistikopoulos, 2000)
Example: y =s 2 + s + 2
s + 1u T s = 0:2
à 16 u6 1 x1 ; x2> à 0 :5
• Switches introduced by controller: MPC• Explicit MPC = PWA controller
x2
x1
#5
#1#2
#3
#4
u=
8>>>>>>>>>>>>>>>>>>>>>>>><>>>>>>>>>>>>>>>>>>>>>>>>:
¡ 1:0000 if
" 0:2425 0:00000:0000 0:2425¡2:5336 ¡1:3548¡2:4411 0:55700:0000 ¡2:0000
#x ·
"1:00001:0000¡1:00001:00001:0000
#(Region #1)
[¡4:3828 1:0000]x¡ 2:7954 if
" 0:0000 0:2425¡2:0000 0:00000:6615 ¡0:8424¡1:1548 0:26352:4411 ¡0:5570
#x ·
" 1:00001:0000¡1:00001:0000¡1:0000
#(Region #2)
[¡2:5336 ¡1:3548]x if
"¡0:6615 0:8424¡2:5336 ¡1:35482:5336 1:3548¡2:0000 0:00000:0000 ¡2:0000
#x ·
"1:00001:00001:00001:00001:0000
#(Region #3)
1:0000 if
· 0:0000 ¡2:00002:5336 1:3548¡0:6659 ¡1:7922¡2:0000 0:0000
¸x·
·1:0000¡1:00001:00001:0000
¸(Region #4)
• Closed-loop MPC
Hybrid Systems in Control - MotivationHybrid Systems in Control - Motivation• Switches occuring naturally
because plant operates in different modes
• Switches introduced by controller
to accommodate constraints: anti-windup, MPC to implement sequence: PLC
• Switches introduced by model simplification
to realize model hierarchy: approximatelower level dynamics by switches
Hybrid Systems in Control - MotivationHybrid Systems in Control - Motivation• Switches occuring naturally
because plant operates in different modes
• Switches introduced by controller
to accommodate constraints: anti-windup, MPC to implement sequence: PLC
• Switches introduced by model simplification
to realize model hierarchy: approximatelower level dynamics by switches
Modeling FrameworkModeling Framework
• Complex enough to be practically important
• Simple enough to allow analysis and synthesis
"Things should be made as simple as possible but not simpler" ….Einstein
x(t + 1) = Aix(t) +Biu(t) + fi
y(t) = Cix(t) + gi
Lix(t) +Miu(t) ô Ni
8>>><>>>:
Discrete Time Piecewise Affine Systems
Modeling FrameworkModeling FrameworkToo restrictive?
Piecewise Affine Systems, equivalent to:
•Mixed Logic Dynamical Systems•(Extended) Linear Complementarity Systems•Max-Min-Plus -Scaling Systems
(Heemels, De Schutter, Bemporad, 2000)
(Each framework has its advantages)
May be too general, …..
Hybrid SystemsHybrid SystemsHybrid Control SystemsHybrid Control Systems Switched (PWA) SystemsSwitched (PWA) Systems
Sastry, Lygeros, Tomlin, Godbole, PappasAlur, Pnueli, Maler, Henzinger, Krogh, ...
Sontag, Branicky, Johansson, Rantzer, Morse, Hespanha, van der Schaft, Tsitsiklis, Blondel, ...
xç =úfi(t; x; u) if x 2 Ri
i = 1; . . .; N
xç =úAix + Biu + fi if Hix ô Ki
i = 1; . . .; N
automaton / logicautomaton / logicsymbols δ0symbols δi
continuous dynamical system
continuous dynamical systemcontinuous
statesinputs
A/DD/A
Truth value operator:
From Algebraic Equalities to From Algebraic Equalities to MixedMixed--Integer Linear InequalitiesInteger Linear Inequalities
Xb c 2 f0;1gP(X1; . . .; Xn)b c = 1 Aîöô B
îö= î1; . . .; în[ ]0 2 f0; 1gn
z = îxî 2 f0; 1gx 2 [m;M]
ú z ô Mîz õ mîz ô x àm(1 à î)z õ x àM(1 à î)
8><>:
x ô 0b c = î x ôM(1 à î)x õ ï+ (m + ï)î
ú
Mixed product
Propositionallogic
Threshold condition
Algebraic equalities MI linear inequalities
(Williams, 1977)
(Glover, 1975)(Witsenhausen, 1966)
MLD Hybrid ModelsMLD Hybrid Models
x(t + 1) = Ax(t) +B1u(t)y(t) = Cx(t) +D1u(t)
Mixed Logical Dynamical (MLD) form
+B2î(t) +B3z(t)+D2î(t) +D3z(t)
E2î(t) + E3z(t) ô E4x(t) + E1u(t) + E5
(Bemporad, Morari, Automatica, March 1999)
• Well-Posedness Assumption :
are single valuedWell posedness allows defining trajectories in x- and y-space
î(t) = F(x(t); u(t))z(t) = G(x(t); u(t))
fx(t); u(t)g ! fx(t + 1)gfx(t); u(t)g ! fy(t)g
x; y; u = ?c?`
ô õ; ?c 2 Rnc; ?` 2 f0; 1gn`; z 2 Rrc; î 2 f0; 1gr`
Major Advantage of PWA/MLD Framework
All problems of analysis:• Stability• Verification• Controllability / Reachability• Observability
All problems of synthesis:• Controller Design• Filter Design / Fault Detection & Estimation
can be expressed as (mixed integer) mathematical programmingproblems for which many algorithms and software tools exist.However, all these problems are NP-hard.
MLD/PWAMLD/PWAHybrid SystemsHybrid Systems
• Reachability / Verification• Stability• Observability
• Control (MPC)• Explicit PWA MPC controllers• State estimation (MHE)/fault detection
• Car suspension system• Gas supply system • Hydroelectric power plant ...
• HYSDEL
• Identification
Research TopicsResearch Topics(Bemporad, Borrelli, Ferrari-Trecate, Mignone, Torrisi, Morari)
AnalysisSynthesis
ApplicationsModeling
HYbridHYbrid System Description System Description LAnguageLAnguage (HYSDEL) (HYSDEL)
HYSDEL Model
MLD + PWA Model
Process
Controller Design Reachability Analysis
Filter Design Stability Analysis
• Planned integration with CHECKMATE (CMU)
Identification of Hybrid systemsyk uk[ ]2C1yk uk[ ]2C2yk uk[ ]2C3
yk+1 =
0:9 0:2 0[ ] yk uk 1[ ]0
0:5 0:4 2[ ] yk uk 1[ ]0
0:3 à0:3 à5[ ] yk uk 1[ ]0
8>>>><>>>>:
Model and datapoints
Problem:Identify a piecewise ARX model from a finite set of noisy measurements.
Useful when the switches between different submodels cannot be measured
The estimation of the submodels cannot be separated from the problem of estimating the regions
Identification Algorithm Identification Algorithm Exploit the combined use of
• clustering ⇒ “K-means” like procedure• linear identification ⇒ weighted least squares• classification ⇒ linear support vector machines
Model and datapoints Estimated model and classified datapoints
G. Ferrari-Trecate, M. Muselli, D. Liberati, M. Morari,A Clustering Technique for the Identification of Piecewise Affine Systems, HS2001, Section FA
Dialysis Therapy
• Blood urea concentration is measured
• Bi-exponential dynamic (Liberati et. al., 1993)
- First part (30-40 minutes)Fast decrease
- Second part (3-4 hours) Slow decrease
An early estimation of both the time constants and the switching timeallows the assessment of the total duration of the therapy
Fast dynamics
Slow dynamics
Dialysis Therapy
Take the log of the data
Piecewise Affineapproximation
Estimation of thetime constants
The switching time cannot be measured directly
Depends on both the patient physiologyand the clearance rate of the dialyzer
EEG Analysis
"letter composing"task
"multiplication"task
Problem: discriminate the presence of different mental tasks from EEGProposition: EEG in a single mental "state" ≈ AR model of low order
The switch between mental states cannot be measured
Hybrid identification
(C. Anderson et al., 1995)
Application of EEG Analysis:
Brain computer interfacing
• High inter-subjects and intra-subjects variability of EEG
Need to update models easily
• Biofeedback: the subject can be forewarned that he is changing mental state
Epileptic patients: Early seizure detection
• Prompt intervention against epilepsy crisis
EEG Analysis for Brain-Computer Interface
The MITs Technology Review magazine recently listed brain-machine interfaces as one of the 10 emerging technologies that will "soon have a profound impact on the economy and on how we live and work."
MLD/PWAMLD/PWAHybrid SystemsHybrid Systems
• Reachability / Verification• Stability• Observability
• Control (MPC)• Explicit PWA MPC controllers• State estimation (MHE)/fault detection
• Car suspension system• Gas supply system • Hydroelectric power plant ...
• HYSDEL
• Identification
Research TopicsResearch Topics(Bemporad, Borrelli, Ferrari-Trecate, Mignone, Torrisi, Morari)
AnalysisSynthesis
ApplicationsModeling
Analysis Analysis vsvs. Synthesis. Synthesis
Control of stable system with input constraints
• Analysis of closed loop stability conservative / difficult
• Synthesis of feedback controllers with stability guarantee industrial routine
Laptop Computer
• Analysis: 101020 states 10100 atoms in universe (Wm. A. Wulf, President NAE)
Hybrid Systems Control ReviewHybrid Systems Control Review
• Piecewise Quadratic/Linear Lyapunov functions Linear Matrix Inequalities to characterize stability and performance
• Pontryagin Maximum Principle
• Hamilton Jacobi Bellman equation
• Parametric Programming
• …….
Bemporad, Berardi, Boyd, Borrelli, Branicky, Buss, Burlirsch, De Santis, Di Benedetto, Hassibi, Hedlund,Johansson, Kratz, Lygeros, Mitter, Piccoli, Rantzer, Riedinger, Sastry, Styrk, Sussmann, Tomlin, Zann
Receding Horizon ControlReceding Horizon Control
Predicted outputs
Manipulated (t+k)uInputs
t t+1 t+m t+p
futurepast
t+1 t+2 t+1+m t+1+p
• Optimize at time t (new measurements)
• Only apply the first optimal move u(t)
• Repeat the whole optimization at time t +1
• Advantage of on-line optimization Õ FEEDBACK
• Objective: determine the optimal input sequence
driving the system from to ,
compatibly with the limits on
• Apply the first input move according to RHC
• Repeat the optimization at time t +1
Model Predictive ControlModel Predictive Control
VU� � � �� VU�L YU Y�
VU�L� YU�LkU
6 gVU� VU��� � � �� VU�/Vh
TVCKFDU UP VNJO � VU�L � V
NBY
YNJO � YU�LkU � Y
NBY
+PQU �NJO
6
+6�YU QL��
/ l2YU�LkU�Y�l� l3VU� Ll
TZTUFN EZOBNJDT
VU
• Linear Model and 2-norm performance index
Õ Quadratic Program
• Linear Model and ∞-norm performance index
Õ Linear Program
• Hybrid Model and ∞-norm performance index
Õ Mixed Integer Linear Program
Model Predictive ControlModel Predictive Control
6 gVU� VU��� � � �� VU�/Vh
TVCKFDU UP VNJO � VU�L � V
NBY
YNJO � YU�LkU � Y
NBY
+PQU �NJO
6
+6�YU QL��
/ l2YU�LkU�Y�l� l3VU� Ll
TZTUFN EZOBNJDT
MPC - SolutionMPC - Solution
6 gVU� VU��� � � �� VU�/Vh
TVCKFDU UP VNJO � VU�L � V
NBY
YNJO � YU�LkU � Y
NBY
+PQU �NJO
6
+6�YU QL��
/ l2YU�LkU�Y�l� l3VU� Ll
TZTUFN EZOBNJDT
(Bemporad et. Al., 2000; Bemporad, Borrelli, Morari, CDC 2000 TuM05-1, WeM01-1)
Theorem: The solution of the MPC problem yields apiecewise affine state feedback law
• The solution of the MPC can be computed explicitly
• Off-line optimization: optimize for all x(t)
MPC - Explicit SolutionMPC - Explicit Solution
6 gVU� VU��� � � �� VU�/Vh
TVCKFDU UP VNJO � VU�L � V
NBY
YNJO � YU�LkU � Y
NBY
+PQU �NJO
6
+6�YU QL��
/ l2YU�LkU�Y�l� l3VU� Ll
TZTUFN EZOBNJDT
Explicit solvers for QP, LP and MILP are available(Bemporad et. Al., 2000; Bemporad, Borrelli, Morari, CDC 2000 TuM05-1, WeM01-1)
Õ Multi-parametric Program
MPC for MLD SystemsExample:Alternate Heating of Two Furnaces
(Hedlund,Rantzer CDC1999)
xç = à 1 00 à 2
ô õx(t) +Biu0
Bi =
10
ô õif first furnace heated
01
ô õif second furnace heated
00
ô õif no heating
8>>>>>><>>>>>>:
• Objective:
• Control the Temperature of Two
Furnaces
• Constraints:
•Switching Control between three
operation modes:1- Heat only the first furnace
2- Heat only the second furnace
3- Do not heat any furnaces
Amount of energy u0 fixed
Can be parametrized !
• MLD system
• mp-MILP optimization problem
•inside the region:
• Computational complexity of mp-MILP
Alternate Heating of Two FurnacesAlternate Heating of Two Furnaces
minv20
n o J(v20; x(t)),P
k=02 kR(v(k + 1) à v(k))k1 + kQ(x(kjt) à xe)k1
u(k) =1 0 0[ ] if first furnace heated0 1 0[ ] if second furnace heated0 0 1[ ] if no heating
8<:
State x(t) 3 variables
Input u(t) 3 variables
Aux. binary vector ±(t) 0 variables
Aux. continuous vector z(t) 9 variables
1 ô x1 ô 11 ô x2 ô 10 ô u0 ô 1 linear constraints 168
continuous variables 33
binary variables 9
parameter variables 3
time to solve the mp-MILP 5 min
Number of regions 105
X1
X2
Heat 1
Heat 2
No Heat
mpmp-MILP Solution-MILP Solutionu0=0.4 u0=0.8
X1
X2
Heat 1
Heat 2
No Heat
X1
X2
X1
X2
Characteristics of the SolutionCharacteristics of the Solution
u(k) = Fkx(k) +Gk , x(k) 2 Xk; Xk = fxjLkx ô Mkg k = 0; . . .; N:
• Piecewise affine control law, polyhedral regions
• Simultaneous and automatic partitioning and control law synthesis
• Stability guarantee (PWL Lyapunov function)
• On-line implementation does not require storage of all Xk
MLD/PWAMLD/PWAHybrid SystemsHybrid Systems
• Reachability / Verification• Stability• Observability
• Control (MPC)• Explicit PWA MPC controllers• State estimation (MHE)/fault detection
• Car suspension system• Gas supply system • Hydroelectric power plant ...
• HYSDEL
• Identification
Research TopicsResearch Topics(Bemporad, Borrelli, Ferrari-Trecate, Mignone, Torrisi, Morari)
AnalysisSynthesis
ApplicationsModeling
• Traction control (Ford Research Center )
• Gas supply system (Kawasaki Steel )
• Batch evaporator system (Esprit Project 26270 )
• Anesthesia (Hospital Bern )
• Hydroelectric power plant ( )
• Power generation scheduling ( )
ApplicationsApplications
• must have priority
• in range rather than tracked
• aggressive action upon constraint violation
• constraints prioritization:
Analgesia Control during AnesthesiaAnalgesia Control during AnesthesiaClinicalClinical Goals Goals
���������������
�����������
�
�
�
�
1. hypotension
2. overdosing
3. hypertension
4. underdosing
���� ��
����� ��
����� ��
���� ��
�
�
• Explicit MPC Control horizon 3 Dimension 8Prediction horizon 10 weight 150Number of regions 127 weight 1
Controller ImplementationController Implementation
��
Case Study ICase Study I
Case Study IIICase Study III
In the Operating RoomIn the Operating Room
1. Induction
2. Artifact detection
3. Intense stimulation
1. 2.
3.
• Traction control (Ford Research Center )
• Gas supply system (Kawasaki Steel )
• Batch evaporator system (Esprit Project 26270 )
• Anesthesia (Hospital Bern )
• Hydroelectric power plant ( )
• Power generation scheduling ( )
ApplicationsApplications
Optimization of Combined Cycle Power Plants
Air
C
Fuel
CC
Condensate
TG HRSG
ProcessPP
Recycled water
Factory
Exhausts
TV
Deregulated energy market- electricity/gas demands and
prices change rapidly
Optimize the plant hourly
Optimization
Maximize the profit while fulfilling the operating constraints
(ETH-ABB joint project)
Topologies of Combined Cycle Power Plants
Simple plant:
• Two turbines and two binary inputs (on/off commands)
• Several gas/steam turbines, firings ...
Other plants:
The complexity of the example is scalable !
Optimization of Combined Cycle Power Plants
• Gas/Steam turbines can be switched on/off
• Different types of startup procedures
• Minimum up/down times
• Normal operation: Dynamicsof the energy/steam production
• Constraints on the productioncapabilities
Hybrid model
LogicContinuous
Economic optimization ⇒ Predictive control for hybrid systems
ConclusionsConclusions
• Hybrid system models are important
• Control Theory ⇔ Computer Science
• Computations must be an inherent part of any new theory