MPC Intro PDF
MPC Intro PDF
Introductory Survey
Eduardo F. Camacho
Universidad de Sevilla
MPC successful in
industry.
Many and very diverse and successful
applications:
Refining, petrochemical, polymers,
Semiconductor production scheduling,
Clinical anesthesia,
….
Satisfaction degree
Comp. Retardo 72
89
Borroso 67
83
MPC 76
94
Gain-scheduling 78
87
PID avanzado 77
89
Autoajuste 60
65
Desacoplo 64
66
1989
Basado Reglas 43
61
1995
F. Kalman 70
66
Neuronal 0
69
LQ 79
70
Observador 67
62
Adaptativo 50
56
Hoo 0
50
0 10 20 30 40 50 60 70 80 90 100
Eduardo F. Camacho MPC:An Introductory Survey 6
IFAC Pilot Industry Committee
Known references
Measurable disturbances
Multivariable
Dead time
Constraints
Uncertainties
Tmax
P1 P2
Flash
Contacto 1
Lavado
Línea 1
Contacto 3
Línea 2
Contacto 2
0
1 100 199 298 397 496 595 694 793 892
-1
Serie1
-2
-3
-4
-5
Benefits
Bibliografía
Stability was difficult to prove because of the finite horizon and the
presence of constraints (non linear controller, no explicit solution, …)
A breakthrough produced in the field. As pointed out by Morari: ”the
recent work has removed this technical and to some extent
psychological barrier (people did not even try) and started wide
spread efforts to tackle extensions of this basic problem with the
new tools”. (Rawlings & Muske, 1993)
Many contributions to stability and robustness of MPC: Allgower,
Campo, Chen, Jaddbabaie, Kothare, Limon, Magni, Mayne, Michalska,
Morari, Mosca, de Nicolao, de Olivera, Scattolini, Scokaert…
MPC Objetive
Compute at each time instant the sequence
of future control moves that will make the
future predicted controlled variables to best
follow the reference over a finite horizon and
taking into account the control effort.
Common ideas:
Explicit use of a model to predict output.
MPC strategy
u(t)
t+2 t+1
u(t)
Future Future
controls errors
Optimizer
CARIMA model
A q 1 yt B q 1 ut 1
C q 1
t
Cost function
J u, t y t j rt j u t j 1
N2 Nu
2 2
j N1 j 1
GPC
Control moves u (G T G I ) 1 G T (r f )
with
g0 0 0
g g0 0
1
G
g Nu 1 g Nu 2 g0
g N 2 1 g N 2 2 g N 2 Nu
Y1
U1
Y2
.
U2 .
.
.
Proceso .
. Yn
Un
R1 +
Gc1
- U
R2 + G
Gc2 Gd
-
(Proc.)
Rn +
Gcn
-
Multivariable MPC
Direct extension
But …
Dead times, control horizon, ...
Unstable transmission zeros
1/(1+0.1s) 5/(1+s)
1/(1+0.5s) 2/(1+0.4s)
Multivariable MPC
Tmax
P1 P2
umin<u(t)< umax
Umin<U(t)< Umax
ymin (t)<y(t)< ymax(t)
Minu J(u,x(t))
u(t+1)
u(t+1)
Señal de control
sin saturar
Señal
óptima
Solución sin u(t)
Señal restricciones
óptima
u(t)
Señal de control saturada
MPC strategy
Operating constaints .
x(i) X, u(i) U, i=0,...,N-1
Linear model:
y(t+1)= 0.9 y(t) + u(t)
^
y(t+D)
R Predictor
Falatious congeture
Modeling:
Empirical Models
Fixed structure, parameters determined from data
State space x(t+1)=f(x(t),u(t)), y(t)=g(x(t))
Input-output (NARMAX)
y(t+)= (y(t), ..., y(t-ny), u(t),...,u(t-nu),e(t),...,e(t-ne+1))
Volterra (FIR, bilineal)
y(t+1)= y0+ {i=0..N}h1(i) u(k-i)+ {i=0..M} {i=0..M} h2(i,j)u(t-i)u(t-j)
Hammerstein
Wiener
NN
z-1
Eduardo F. Camacho MPC:An Introductory Survey 53
PWA Approx.
Function
Approximation error
MPC: constraints II
Stability
Optimal controllers with infinite horizon
guaranty stability.
Optimal finite horizon and the presence of
constraints make it very difficult to prove stability
(non linear controller, no explicit solution)
A breakthrough has been made in the last few years
in this field. As pointed out by Morari , ”the recent
work has removed this technical and to some
extent psychological barrier (people did not even
try) and started wide spread efforts to tackle
extensions of thisbasic problem with the new
tools”.
MPC stability
Infinite horizon, the objective function can be considered a Lyapunov
function, providing nominal stability. Cannot be implemented: an infinite set of
decision variables.
Terminal cost. Bitmead et al’90 (linear uncostrained), Rawling & Muske’93
(linear contrained).
Terminal state equality constraint. Kwon & Pearson’77 (LQR constraints),
Keerthi and Gilbert’88, x(k+N)= xS
x(t+2)
x(t+1)
x(t+N) xS
x(t)
Robust controllers
Impose surface S as
terminal constraints
The optimization problem is simplified (especially when the state is not constrained)
u*= arg minu (i=0,...,N-1) l(x(i),u(i)) + F(x(N))
s.t. x(i) X, u(i) U, i=0,...,N-1 and to the terminal constraint: x(N)
There is a strong interplay between infinite horizon-terminal cost and terminal regions :
A prediction horizon N and a quadratic terminal cost stabilizes the system in a
neighborhood of the origin. (Parisini and Zoppoli’95)
The unconstrained (no terminal constraints) MPC satisfies the terminal constraint in
a neighborhood of the origin. (Jadbabaie et al’01)
Given a terminal cost F(x) that is a CLF in , define Fs(x)= F(x) if x and Fs(x)=
if x where = {x Rn: F(x) ≤ }. The MPC with Fs(x) as terminal cost is
stabilizing for all initial state in the region where the optimal solution to PN(x,X)
reaches the terminal region. (Hu and Linnemann’02)
Procedure for removing the terminal constraint while maintaining asymptotic stability
and computing the domain of attraction. (Limon et al’03). Suboptimality
y(t)
u(t)
Robustness (2)
The stability conditions has to be
satisfied for all possible values of
the uncertainties.
A prediction horizon of N = 11 is
E
C Af C A k0 exp
dC A q
used. CA
dt V RT
H k0 E UA
T f T
dT q
exp CA Tc T
dt V Cp RT V Cp
State estimation
Set-membership estimation
Compute a set of all states consistent with the measured output
and the given noise parameters.
Ellipsoidal bounding (Schweppe’68), (Kurzhanski and Valyi’96)
Polyhedron bounding (Kuntsevich and Lychak’85)
Interval arithmetics, zonotopes (Kieffer et al’01), (Alamo et al’03)
Outline
A little bit of history
Model Predictive Control concepts
Linear MPC
Multivariable
Constraints
Nonlinear MPC
Stability and robustness
Hybrid systems
Implementation
Some applications
Conclusions
Eduardo F. Camacho MPC:An Introductory Survey 78
MPC and polytopes
MPC with linear constraints is a
MultiParametric-QP o LP (Bemporad y
Morari, 2000)
The solution of an mp_QP o mp_Lp is a
PWA function of state.
Min-max quadratic is PWA (Ramirez y
Camacho, 2001).
Process:
y(t+1)=g(y(t),u(t),...)
Model:
z(t+1)=f(y(t),u(t),..., )
si | z(t+1)=y(t+1)
e(t )
A( z 1 ) y(t ) z d B( z 1 )u(t 1) C ( z 1 )
~
A( z 1 ) y(t ) z d B( z 1 )u(t 1) (t ) (t )
•The set of j-ahead optimal predictions for j=1,...,N2 can be written as:
y Guu G f
J , u u T M uuu T M 2 T M u u 2 M ufT u 2 MTf f T f
where:
M uu GuT Gu I , M GT G , M u GT Gu , M uf GuT f , M f GT f
Properties of J and J*
J * (u) max T M M' (u) M ' (u)
• Due to convexity of J and compactness of , the
maximum will be reached at one of the vertexes of the
polytope . J* can be expressed as a convex function of
u (if Muu is positive definite) :
J * (u ) u T M uuu M u* ( p )u M * ( p )
An illustrative example
• Let Nu=2, N2=2, =1.0 and -0.1 k 0.1 then the following
output predictions can be formulated:
yk 1 uk k 1 yk 1
y Gu u G Fy y
k 2 k 1 k 2 k
with :
0.5 0 1 0 0.9 1.9
Gu G Fy
0.95 0.5 1.9 1 1.71 2.71
• The lower region is due to the minimizer of J1.The upper region is due to the
minimizer of J4. Between them there is another region due to the intersection
of J1 and J4.
Eduardo F. Camacho MPC:An Introductory Survey 85
An illustrative example
• Boundary regions can be computed:
• J4 - J41: • J41 - J1:
y y
0.2156 0.9873 1.6242 k 1 0 0.2156 0.9873 1.6242 k 1 0
yk yk
y y
0.0747 0.7098 1.2209 k 1 0 0.0111 0.2775 0.4032 k 1 0
yk yk
y y
0.0111 0.2775 0.4032 k 1 0 0.0747 0.7098 1.2209 k 1 0
yk yk
x(k+1)=x(k)+u(k)+w(k) with
-2 < x(k) < 2
-2 < u(k) < 2
-1 < w(k) < 1
Qith horizon 3 there is no u(1),u(2), u(3) which
keeps -2 < x(k) < 2 dor all w(k)
If u(k)= - x(k) then -2 < x(k) < 2 for all w(k)
Game theory: available information by each
player
NMPC implementation
Computer Control
Science Theory
X={1,2,3,4,5}
Discrete Dynamical x Rn
U={A,B,C} Events u Rm
systems
yRp
A 2
B C
1 B
B 3
x(k 1) f (x(k ), u(k ))
C
C y (k ) g (x(k ), u(k ))
5
4 A
Eduardo F. Camacho MPC:An Introductory Survey 91
C
Hybrid System 1
Computer Control
Science Theory
Computer Control
Science Theory
Model: Model:
Automata, Petri nets, - Differential equations
statecharts, etc. - Algebraic equations
A
2 - Invariant constraints
B C
1
x(k 1) f (x(k ), u(k ))
B
3
B
C
5 C
4 A
y (k ) g (x(k ), u(k ))
C
Hybrid System 3
Computer Control
Science Theory
Computer Control
Science Theory
Statemate, MATLAB,
Design CPN, MatrixX,
Slam II, VisSim, etc.,
SMV, etc.
PWA systems
x(k+1) = A1 x(k) + B1 u(t) + f1
x(k+1) = A3 x(k) + B3 u(t) + f3
u
Mixed
xk+1=Ak x k+Bk uk+f k
x =A x
xk+2=Ak+1xk+1+Bk+1uk+1+fk+1
+B u +f
k+3
k+2
k+2
k+2
k+2
? ? k+2
Integer-Real
X
X
y =C x +g
k+2
k+2 k+2
k+1 k+2 k+2
y =C x +g k+1 k+1
X k
Optimization
y =C
k
k
x +g k
k
Problem
k+1 k+1
Problem
Future trajectory known (computed by planner)
Unexpected obstacles
Control signals and state are constrained
System model is highly nonlinear
The objective function: position error, the acceleration, robot
angular velocity and the proximity between the robot and the
obstacles (detected with an ultrasound proximity system)
Unexpected obstacles makes the objective function more
complex.
Distributed collectors
Nonlinear disturbances
prediction: Solar radiation