Upload
others
View
14
Download
1
Embed Size (px)
Citation preview
Eduardo F. Camacho MPC:An Introductory Survey 1 Paris'2010
Model Predictive Control: an Introductory Survey
Eduardo F. Camacho Universidad de Sevilla
Paris, 2009
Eduardo F. Camacho MPC:An Introductory Survey 2 Paris'2010
MPC successful in industry.
Many and very diverse and successful applications: Refining, petrochemical, polymers, Semiconductor production scheduling, Air traffic control Clinical anesthesia, …. Life Extending of Boiler-Turbine Systems via Model
Predictive Methods, Li et al (2004) Many MPC vendors.
Eduardo F. Camacho MPC:An Introductory Survey 3 Paris'2010
MPC successful in Academia
Many MPC sessions in control conferences and control journals, MPC workshops.
4/8 finalist papers for the CEP best paper award were MPC papers (2/3 finally awarded were MPC papers)
Eduardo F. Camacho MPC:An Introductory Survey 4 Paris'2010
Análisis de las distintas técnicas
Informe de Takatsu et al. (1998) para la Society of Instrumentation and Control Engineering Principales problemas de control que se encuentran en la industria de procesos Estado de aplicación de la técnicas avanzadas Grado de satisfacción de los usuarios con cada técnica Expectativas Indicativo de las necesidades futuras de la industria en el ámbito del control
Eduardo F. Camacho MPC:An Introductory Survey 5 Paris'2010
Principales problemas de control
Eduardo F. Camacho MPC:An Introductory Survey 6 Paris'2010
Grado de satisfacción de las distintas técnicas
Eduardo F. Camacho MPC:An Introductory Survey 7 Paris'2010
Why is MPC so successful ?
MPC is Most general way of posing the control problem in the time domain: Optimal control Stochastic control Known references Measurable disturbances Multivariable Dead time Constraints Uncertainties
Eduardo F. Camacho MPC:An Introductory Survey 8 Paris'2010
Real reason of success: Economics MPC can be used to optimize operating points (economic
objectives). Optimum usually at the intersection of a set of constraints.
Obtaining smaller variance and taking constraints into account allow to operate closer to constraints (and optimum).
Repsol reported 2-6 months payback periods for new MPC applications.
P1 P2
Pmax
Eduardo F. Camacho MPC:An Introductory Survey 9 Paris'2010
Flash
Línea 2
Línea 1 Lavado
Contacto 1
Contacto 3
Contacto 2
ESQUEMA GENERAL CIRCUITO DE GASES
Eduardo F. Camacho MPC:An Introductory Survey 10 Paris'2010
Eduardo F. Camacho MPC:An Introductory Survey 11 Paris'2010 Eduardo F. Camacho MPC:An Introductory Survey 12 Paris'2010
Eduardo F. Camacho MPC:An Introductory Survey 13 Paris'2010
Benefits
Yearly saving of more that 1900 MWh Standard deviation of the mixing chamber
pressure reduced from 0.94 to 0.66 mm water column.
Operator’s supervisory effort: percentage of time operating in auto mode raised from 27% to 84%.
Eduardo F. Camacho MPC:An Introductory Survey 14 Paris'2010
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 15 Paris'2010
Bibliografía
R. Bitmead, Gevers M. and Werts W. “Adaptive Optimal Control: The Thinking man GPC”, Prentice Hall, 1990
R. Soeteboek, Predictive Control: A Unified Approach, Prentice Hall, 1991.
E.F. Camacho and C. Bordons, “Model Predictive Control in the Process Industry”, Springer-Verlag, 1995.
J. Maciejowski, “Predictive Control with constraints”, Prentice Hall, 2002.
A. Rossiter, “Model-Based Predictive Control: A Practical Approach”, CRC Press, 2003
E.F. Camacho and C. Bordons, “Model Predictive Control”, Springer-Verlag, 1999 (Second edition coming soon: 2004)
Eduardo F. Camacho MPC:An Introductory Survey 16 Paris'2010
A little bit of history: the beginning
Kalman, LQG (1960) Propoi, “Use of LP methods ...” (1963)
Richalet et al, Model Predictive Heuristic Control (MPHC) IDCOM (1976, 1978) (150.000 $/year benefits because of increased flowrate in the fractionator application)
Cutler & Ramaker, DMC (1979,1980)
Cutler et al QDMC (QP+DMC) (1983)
Clarke et al GPC (1987)
First book: Bitmead et al, (1990)
Eduardo F. Camacho MPC:An Introductory Survey 17 Paris'2010
The impulse of the 90s. A renewed interest from Academia (stability)
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…
Eduardo F. Camacho MPC:An Introductory Survey 18 Paris'2010
The new millenium
Linear MPC is a mature discipline. More than 4500 industrial applications (not counting licensed technology companies app.) Qin and Badgwell’03.
The number of applications seems to duplicate every 4 years. Some vendors have NMPC products: Adersa (PFC), Aspen Tech
(Aspen Target), Continental Control (MVC), DOT Products (NOVA-NLC), Pavilon Tech. (Process Perfecter)
Efforts to developed MPC for more difficult situations: Multiple and logical objectives (Morari, Floudas) Hybrid processes (Morari, Bemporad, Borrelli, De Schutter, van den
Boom …) Nonlinear (Alamir, Alamo, Allgower, Biegler, Bock, Bravo, Chen, De
Nicolao, Findeisen, Jadbadbadie, Limon, Magni, …)
Eduardo F. Camacho MPC:An Introductory Survey 19 Paris'2010
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.
Only the first element of the sequence is used and the computation is done again at the next sampling time.
Eduardo F. Camacho MPC:An Introductory Survey 20 Paris'2010
MPC basic concepts
Common ideas: Explicit use of a model to predict output.
Compute the control moves minimizing an objective fuction.
Receding horizon strategy. Estrategia deslizante (el horizonte se desplaza hacia el futuro).
The algorithms mainly differ in the type of model and objective function used.
Eduardo F. Camacho MPC:An Introductory Survey 21 Paris'2010
MPC strategy
At sampling time t the future control sequence is compute so that the future sequence of predicted output y(t+k/t) along a horizon N follows the future references as best as possible.
The first control signal is used and the rest disregarded.
The process is repeated at the next sampling instant t+1
t t+1 t+2 t+N
Acciones de control
Setpoint
Eduardo F. Camacho MPC:An Introductory Survey 22 Paris'2010
t t+1 t+2
t+N t t+1 t+2 …….. t+N
u(t)
Only the first control move is applied
Errors minimized over a finite horizon
Constraints taken into account
Model of process used for predicting
Eduardo F. Camacho MPC:An Introductory Survey 23 Paris'2010
t+2 t+1
t+N
t+N+1
t t+1 t+2 …….. t+N t+N+1
u(t)
Only the first control move is applied again
Eduardo F. Camacho MPC:An Introductory Survey 24 Paris'2010
MPC
PID: u(t)=u(t-1)+g0 e(t) + g1 e(t-1) + g2 e(t-2)
vs. PID
Eduardo F. Camacho MPC:An Introductory Survey 25 Paris'2010
Estructura básica de MPC
Restricciones Función de coste
Optimizador
Trayectoria de Referencia
Errores Futuros
-
Controles Futuros
Entradas y salidas pasadas Modelo
Salidas Futuras
Eduardo F. Camacho MPC:An Introductory Survey 26 Paris'2010
GPC
CARIMA model
Cost function
Eduardo F. Camacho MPC:An Introductory Survey 27 Paris'2010
GPC
Control moves
with
Eduardo F. Camacho MPC:An Introductory Survey 28 Paris'2010
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 29 Paris'2010
U1
U2
Un
Y2
Yn
Y1
Proceso ...
...
Eduardo F. Camacho MPC:An Introductory Survey 30 Paris'2010
Gd G
(Proc.)
U
Y
+R1 Gc1 -
+R2 Gc2 -
+Rn Gcn -
Eduardo F. Camacho MPC:An Introductory Survey 31 Paris'2010
Multivariable MPC
Direct extension But …
Dead times, control horizon, ... Unstable transmission zeros
Eduardo F. Camacho MPC:An Introductory Survey 32 Paris'2010
Multivariable MPC
Eduardo F. Camacho MPC:An Introductory Survey 33 Paris'2010
Multivariable MPC
Eduardo F. Camacho MPC:An Introductory Survey 34 Paris'2010
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 35 Paris'2010
Constraints in process control
All process are constrained Actuators have a limited range and slew
rate Safety limits: maximun pressure or
temperature Tecnological or quality requirements Enviromental legislation
Eduardo F. Camacho MPC:An Introductory Survey 36 Paris'2010
Real reason of success: Economics MPC can be used to optimize operating points (economic
objectives). Optimum usually at the intersection of a set of constraints.
Obtaining smaller variance and taking constraints into account allow to operate closer to constraints (and optimum).
Repsol reported 2-6 months payback periods for new MPC applications.
P1 P2
Pmax
Eduardo F. Camacho MPC:An Introductory Survey 37 Paris'2010
Work close to the optimal but not violating it
120
Fine
400 Euros
3 points
Eduardo F. Camacho MPC:An Introductory Survey 38 Paris'2010
MPC: constraints IV
umin<u(t)< umax Umin<U(t)< Umax ymin (t)<y(t)< ymax(t)
Minu J(u,x(t))
s.t.: R u < r +S x(t)
Eduardo F. Camacho MPC:An Introductory Survey 39 Paris'2010
Usual way of dealing with constraints
Señal óptima
J (curvas de nivel)
Señal de control sin saturar
u(t)
u(t+1)
Solución sin restricciones
Señal de control saturada
u(t)
u(t+1)
Señal óptima
Eduardo F. Camacho MPC:An Introductory Survey 40 Paris'2010
MPC strategy
Consider a nonlinear invariant discrete time system: x+=f(x,u), x ∈ Rn, u ∈ Rm
The system is subject to hard constraints x ∈ X, u ∈ U
Let u={u(0),...,u(N-1) } be a sequence of N control inputs applied at x(0)=x,
the predicted state at i is x(i)=Φ(i;x, u)=f(x(i-1), u(i-1) )
Eduardo F. Camacho MPC:An Introductory Survey 41 Paris'2010
MPC strategy
1. Optimization problem PN(x,Ω):
u*= arg minu Σ(i=0,...,N-1) l(x(i),u(i)) + F(x(N))
Operating constaints . x(i) ∈ X, u(i) ∈ U, i=0,...,N-1
Terminal constraint (stability): x(N) ∈ Ω
2. Apply the receding horizon control law: KN(x)=u*(0).
Eduardo F. Camacho MPC:An Introductory Survey 42 Paris'2010
Linear MPC
f(x,u) is an affine function (model) X,U,Ω are polyhedra (constraints) l and F are quadratic functions (or 1-norm
or ∞-norm functions)
⇓ QP or LP
Eduardo F. Camacho MPC:An Introductory Survey 43 Paris'2010
Control predictivo lineal
Eduardo F. Camacho MPC:An Introductory Survey 44 Paris'2010
Otherwise
If f(x,u) is not an affine function Or any of X,U,Ω are not polyhedra Or any of l and F are not quadratic functions
(or 1-norm or ∞-norm functions)
⇓ Non linear MPC (NMPC) Non linear (non necessarily convex) optimization
problem much more difficult to solve.
Eduardo F. Camacho MPC:An Introductory Survey 45 Paris'2010
MPC and nonlinear processes
Most processes are non-linear, Linear approximations works for small perturbations
around the operating point (well in most cases) There are processes with
continuous transitions (startups, shutdowns, etc.) and spend a great deal of time away from a steady-state operating region or
never in steady-state operation (i.e. batch processes, solar plants), where the whole operation is carried out in transient mode.
severe nonlinearities (even in the vicinity of steady states) hybrid
Eduardo F. Camacho MPC:An Introductory Survey 46 Paris'2010
NMPC vs. LMPC
Consider the nonlinear system y(t+1)= 0.9 y(t) + u(t)1/4
with 0<u(t)< 1.
Linear model: y(t+1)= 0.9 y(t) + u(t)
Applying a L-MPC and a NL-MPC with N=10, λ=0
0 20 40 60 80 100 120 140 1600
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 20 40 60 80 100 120 140 1600
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Eduardo F. Camacho MPC:An Introductory Survey 47 Paris'2010
NMPC vs. LMPC
Better predictions should be obtained from more accurate models.
Better predictive control should be obtain with better predictions.
Is that so ?
Eduardo F. Camacho MPC:An Introductory Survey 48 Paris'2010
MPC turns out to be a linear controller with a feedback of the prediction of y(t+D)
H C Process
Predictor y(t+D) ^
u(t) y(t)
R
Eduardo F. Camacho MPC:An Introductory Survey 49 Paris'2010
Falatious congeture
An optimal predictor plus an optimal controller is going to produce the “best” closed loop behaviour.
J. Normey showed that Smith predictor (and other DTC structures) produce “better” (more robust) controllers than optimal predictor.
Optimal state estimator + optimal controller (LQG/LTR) Optimal identifier + optimal controller does not produce
the optimal adaptive control (identification for control) A fundamental issue: The best model is the one that
produces the “best” close loop control not necessarily best predictions..
Eduardo F. Camacho MPC:An Introductory Survey 50 Paris'2010
Nonlinear Identification is more difficult
Lack of a superposition principle A high number of plant tests required
tests with many different size steps Multivariable processes the difference in the number
of tests required is even greater.
Optimization problem for parameter estimation is more difficult (offline)
Eduardo F. Camacho MPC:An Introductory Survey 51 Paris'2010
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
(t) y(t)u(t)
g(.)H(z)
Linear dynamic
!
a) b)
g(.) H(z)
" (t)
Linear dynamic
y(t)u(t)
Nonlinear static Nonlinear static
Eduardo F. Camacho MPC:An Introductory Survey 52 Paris'2010
Neural Networks Multilayer Perceptron: a nonlinear function with good approximation
properties and “backpropagation”. Input-output with NN: y(t)= NN(y(t-1), ..., y(t-ny), u(t-1),...,u(t-nu))
State space with NN x(t+1)=NNf(x(t),u(t)), y(t)=NNg(x(t))
. . . .
. . . .
!"!(k)
V(k). . . .
. . . .
. . . .
(k)"
(k)d
S0 (k)
S5 (k)
S6 (k)
V(k-1)
(k-1).
(k).
#
#
z-1
Eduardo F. Camacho MPC:An Introductory Survey 53 Paris'2010
Local Model Networks
A set of models to accommodate local operating regimes The output of each submodel is passed through a
processing function that generates a window of validity. y(t+1)=F(Ψ(t), Φ(t)) = Σ {i=1.M}fi(Ψ(t), Φ(t)), ρi (Φ(t))
local models are usually linear multiplied by basis functions ρi (Φ(t)) chosen to have a value close to 1 in regimes where is a good approximation and a value close to 0 in other cases.
Piece Wise Affine (PWA) systems
Eduardo F. Camacho MPC:An Introductory Survey 54 Paris'2010
PWA. (Sontag, 1981)
Nonlinear System:
PWA Approx.
Some hybrid processes can be modeled by PWA system
x(t+1)=f(x(t),u(t))
y(t)=g(x(t))
Eduardo F. Camacho MPC:An Introductory Survey 55 Paris'2010
Function
Eduardo F. Camacho MPC:An Introductory Survey 56 Paris'2010
PWA Approximation
Eduardo F. Camacho MPC:An Introductory Survey 57 Paris'2010
Approximation error
Eduardo F. Camacho MPC:An Introductory Survey 58 Paris'2010
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 59 Paris'2010
MPC: constraints II
Difference in input and output constraints: manipulated variables can always be kept in
bound by the controller by clipping the control action or by the actuator.
Output constraints are mainly due to safety reasons, and must be controlled in advance because output variables are affected by process dynamics.
Eduardo F. Camacho MPC:An Introductory Survey 60 Paris'2010
MPC: constraints III
Not considering constraints on manipulated variables may result in higher values of the objective function. But this is not the main problem.
Violating the limits on the controlled variables may be more costly and dangerous as it could cause damage to equipment and losses in production.
Not considering input contraints may lead to unstability
Eduardo F. Camacho MPC:An Introductory Survey 61 Paris'2010
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”.
Eduardo F. Camacho MPC:An Introductory Survey 62 Paris'2010
Eduardo F. Camacho MPC:An Introductory Survey 63 Paris'2010 Eduardo F. Camacho MPC:An Introductory Survey 64 Paris'2010
Stability and constraints y(t+1)=1.2 y(t)+0.2 u(t-2) with -4 < u(t) < 4, N=5
Eduardo F. Camacho MPC:An Introductory Survey 65 Paris'2010
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
xS
x(t)
x(t+1) x(t+2)
x(t+N)
Eduardo F. Camacho MPC:An Introductory Survey 66 Paris'2010
MPC stability: terminal region
Dual control. Michalska and Mayne (1993) x(N) ∈ Ω
Once the state enters Ω the controller switches to a previously computed stable linear strategy.
Quasi-infinite horizon. Chen and Allgower (1998). Terminal region and stabilizing control, but only for the computation of the terminal cost. The control action is determined by solving a finite horizon problem without switching to the linear controller even inside the terminal region. The term (|| x(t+N)||P)2 added to the cost function and approximates the infinite- horizon cost to go.
x(t)
x(t+1) x(t+2)
x(t+N) Ω
Eduardo F. Camacho MPC:An Introductory Survey 67 Paris'2010
MPC and sliding mode control
Robust controllers Impose surface S as
terminal constraints
Eduardo F. Camacho MPC:An Introductory Survey 68 Paris'2010
NMPC stability: all ingredients
Asymptotic stability theorem (Mayne 2001) The terminal set Ω is a control invariant set. The terminal cost F(x) is an associated Control
Lyapunov function such that min{u ∈ U} {F(f(x,u))-F(x) + l(x,u) | f(x,u)∈Ω} ≤0 ∀ x∈Ω Then the closed loop system is asymptotically
stable in XN(Ω )
Eduardo F. Camacho MPC:An Introductory Survey 69 Paris'2010
Removing the terminal constraint maintaining stability
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
Eduardo F. Camacho MPC:An Introductory Survey 70 Paris'2010
Robustness Nonlinear uncertain system: x+=f(x,u, θ ), x ∈ Rn, u ∈ Rm θ ∈ Rp
With bounded uncertainties θ∈Θ and subject to hard constraints x ∈ X, u ∈ U
The uncertain evolution sets: X(i)=Γ(i;x, u)= {z ∈ Rn | ∃ θ∈Θ , y ∈ X(i-1), z=f(y, u(i-1), θ)}
and X(0)=x
t t+1 t+2 … t+N
y(t)
u(t)
Eduardo F. Camacho MPC:An Introductory Survey 71 Paris'2010
Robustness (2) The stability conditions has to be
satisfied for all possible values of the uncertainties.
The terminal set Ω is a robust control invariant set. (i.e. ∀ x∈Ω, ∀ θ∈Θ ∃ u ∈ U | f(x,u, θ)∈Ω)
The terminal cost F(x) is an associated Control Lyapunov function such that
min{u ∈ U} {F(f(x,u,θ))-F(x) + l(x,u) | f(x,u,θ)∈Ω} ≤0 ∀ x∈Ω, ∀ θ∈Θ
Eduardo F. Camacho MPC:An Introductory Survey 72 Paris'2010
Computation of regions in robust NMPC
Invariant regions, domain of attraction, uncertain evolution sets bounding sets (state estimation) bounding sets (identification) …
!!"# !!$
!
%$
%&
!'()"*$+
,'(
#(
!'()"*$!+
Continuous stirred tank reactor (CSTR)
• Relatively easy if regions are polyhedron and linear transformations (f(x,u, θ) ), Kerrigan’00
• NMPC more complex and approximations are normally used.
Eduardo F. Camacho MPC:An Introductory Survey 73 Paris'2010
Example: continuos stirred tank reactor (CSTR) Zonotopes: (Bravo et al’03)
Sampling period 0.03.
A normalized additive uncertainty is added. It is bounded by w1=(-6.5*10-3, 6.5*10-3) and w2=(-1.2*10-3, 1.2*10-3).
A terminal robust positively invariant set is calculated.
A prediction horizon of N = 11 is used.
Eduardo F. Camacho MPC:An Introductory Survey 74 Paris'2010
Example
Some of these methods are too conservative: Pure interval arithmetic: boxes
Eduardo F. Camacho MPC:An Introductory Survey 75 Paris'2010
State estimation
The observer error must be small to guarantee stability of the closed-loop and in general little can be said about the necessary degree of smallness.
No general valid separation principle for nonlinear systems exists.
Nevertheless observers are applied successfully in many NMPC applications.
Extended Kalman Filter (EKF), High gain estimators.
Eduardo F. Camacho MPC:An Introductory Survey 76 Paris'2010
State estimation (2)
Moving Horizon Estimation (MHE). Moving window looking backward A dual problem to MPC: Control moves: known, process state:
unknown, horizon: backwards. (Kwon et al’83), (Zimmer’94), (Mishalska and Mayne’95) ..
IDCOM (Richalet’76) was developed as the dual to identification !!!
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)
Eduardo F. Camacho MPC:An Introductory Survey 77 Paris'2010
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 Paris'2010
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).
Eduardo F. Camacho MPC:An Introductory Survey 79 Paris'2010
Min-Max MPC with bounded global uncertainties
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)
Eduardo F. Camacho MPC:An Introductory Survey 80 Paris'2010
Properties of J and J*
• The set of j-ahead optimal predictions for j=1,...,N2 can be written as:
where:
• Mθ θ is positive definite.
• Also, Muu is positive definite for positive values of λ
Eduardo F. Camacho MPC:An Introductory Survey 81 Paris'2010
Properties of J and J*
• 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) :
• Due to its convexity, J* has a unique minimizer, thus the min-max problem has a unique solution.
Eduardo F. Camacho MPC:An Introductory Survey 82 Paris'2010
Piecewise Linearity of the Control Law
!"#
!$# !
%#
&'(!&)*#
!"#
!$#
!%#
&'(!&)*#
• This situation can be generalized to N quadratic functions, thus it can be stated that the solution will be attained on either a minimizer of one of them or on an intersection point of two or more of them.
Eduardo F. Camacho MPC:An Introductory Survey 83 Paris'2010
An illustrative example
• Consider the following first order integrated uncertainties prediction model:
• Let Nu=2, N2=2, λ=1.0 and -0.1 ≤ θk ≤ 0.1 then the following output predictions can be formulated:
Eduardo F. Camacho MPC:An Introductory Survey 84 Paris'2010
An illustrative example
!!"#!!"$#
!!"$#
!"#
!!"#!!"$#!!"$#!"#!%"#
!%
!!"#
!
!"#
%
%"#
&'&
'!%
!()'
• The control law has been calculated numerically for (only Δuk shown):
• 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 Paris'2010
An illustrative example • Boundary regions can be computed:
• J4 - J41: • J41 - J1:
!!"# !!"$# ! !"$# !"#!!"#
!!"$#
!
!"$#
!"#
%&
%&!'
Eduardo F. Camacho MPC:An Introductory Survey 86 Paris'2010
An illustrative example
! " #! #" $! $" %! %" &! &" "!!!'$
!!'#
!
!'#
!'$
!'%
!'&
!'"
()*+,-(
./
• An explicit form of the control law can be found:
• The output under the MMMPC control law versus an unconstrained GPC:
Eduardo F. Camacho MPC:An Introductory Survey 87 Paris'2010
Min-max MPC: open-close loop predictions
Minu(k),u(k+1),.. Max w(k),w(k+1) … J(u,w)
Minu(k) Max w(k) Minu(k+1) Max w(k+1) … J(u,w) Minu(k)c(x(k+1)),c(x(k+2)) .. Max w(k) w(k+1) … J(u,w)
Control laws
Eduardo F. Camacho MPC:An Introductory Survey 88 Paris'2010
Min-max MPC: bucle abierto-bucle cerrado (2)
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
Eduardo F. Camacho MPC:An Introductory Survey 89 Paris'2010
NMPC implementation
Solving a Nonlinear (non QP), possibly nonconvex.
Real time and no convexity >>> suboptimal solutions Sequential Quadratic Programming (SQP) Simultaneous approach (Findeisen and Allgower’02) Using a sequential approach with successive
linearization around the previous trajectory. PWA >>>> Mixed Integer Programming Problem.
Eduardo F. Camacho MPC:An Introductory Survey 90 Paris'2010
Hybrid System
Computer
Science
Discrete Events
X={1,2,3,4,5}
U={A,B,C}
1 3
4 5
2 C
A B
B B
C
C C A
Control
Theory
Dynamical
systems
Eduardo F. Camacho MPC:An Introductory Survey 91 Paris'2010
Hybrid System 1
Computer
Science
Control
Theory
Dynamical Systems - Physical processes in control system e.g. robots, aircraft, ...
Discrete Events
- Collisions - Decision logic - Discrete communication
Eduardo F. Camacho MPC:An Introductory Survey 92 Paris'2010
Hybrid System 2
Computer
Science
Control
Theory
Model: - Differential equations - Algebraic equations - Invariant constraints
Model: Automata, Petri nets, statecharts, etc.
1 3
4 5
2 C
A B
B B
C
C C
A
Eduardo F. Camacho MPC:An Introductory Survey 93 Paris'2010
Hybrid System 3
Computer
Science
Control
Theory
Analytical Tools:
Lyapunov functions, eigenvalue analysis, etc.
Analytical Tools:
Boolean algebra, formal logics, recursion, etc.
Eduardo F. Camacho MPC:An Introductory Survey 94 Paris'2010
Hybrid System 4
Computer
Science
Control
Theory
Software Tools:
MATLAB, MatrixX, VisSim, etc.,
Software Tools:
Statemate, Design CPN, Slam II, SMV, etc.
Eduardo F. Camacho MPC:An Introductory Survey 95 Paris'2010
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
Eduardo F. Camacho MPC:An Introductory Survey 96 Paris'2010
PWA approximations
X k y k =C k x k +g k
x k+1 =A k x k +B k u k +f k ?
X k+1 y k+1 =C k+1 x k+1 +g k+1
x k+2 =A k+1 x k+1 +B k+1 u k+1 +f k+1 ?
X k+2 y k+2 =C k+2 x k+2 +g k+2
x k+3 =A k+2 x k+2 +B k+2 u k+2 +f k+2
The resulting optimization problem
U = {u(k), u(k+1), u(k+2), …,u (k+N-1)} real I = {I(k), I(k+1), I(k+2),…, I(k+N-1)} Integer
Mixed Integer-Real
Optimization Problem
Eduardo F. Camacho MPC:An Introductory Survey 97 Paris'2010
NMPC implementation (2)
Although there are many clever tricks to alleviate the situation, these algorithms take time. This is a major obstacle. Only slow or small processes.
Approximations and simplifications Using short horizons Precomputation of solution over a grid in the state
space (only small systems)
Eduardo F. Camacho MPC:An Introductory Survey 98 Paris'2010
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 99 Paris'2010 Eduardo F. Camacho MPC:An Introductory Survey 100 Paris'2010
Application of NMPC to a mobile robot: Path tracking in an unstructured environment
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.
(Gómez & Camacho, 1994)
Eduardo F. Camacho MPC:An Introductory Survey 101 Paris'2010
Mobile robot avoiding obstacles
0.0 2.0 4.0 6.0
-1.0
0.0
1.0
2.0
3.0
X (m)b )
Y (
m)
Eduardo F. Camacho MPC:An Introductory Survey 102 Paris'2010
Mobile robot NMPC
-2.0 0.0 2.0 4.0 6.0
-6.0
-4.0
-2.0
0.0
2.0
4.0
Y (
m)
X ( ))
Eduardo F. Camacho MPC:An Introductory Survey 103 Paris'2010
NMPC at a Solar plant Almeria
Eduardo F. Camacho MPC:An Introductory Survey 104 Paris'2010
NMPC application at the Solar plant in Almeria (PSA)
Eduardo F. Camacho MPC:An Introductory Survey 105 Paris'2010
Distributed collectors
Eduardo F. Camacho MPC:An Introductory Survey 106 Paris'2010
Plant diagram
Eduardo F. Camacho MPC:An Introductory Survey 107 Paris'2010
Nonlinear disturbances prediction: Solar radiation
400
500
600
700
800
900
1000
9 10 11 12 13 14 15 16
direct sola
r ra
dia
tion (
W/m
2)
local time (hours)
!!""
"
!""
#""
$""
%""
&""
'""
(""
)""
*""
!"""
* !" !! !# !$ !% !& !' !( !)
+,-./012345-1-5+,50,361789:#;
43/5410,:.17<3=-2;
Eduardo F. Camacho MPC:An Introductory Survey 108 Paris'2010
Plant results: a clear day
9.5 10.5 11.5 12.5 13.5 14.5 15.5
local time (hours)
20.0
50.0
80.0
110.0
140.0
170.0
200.0
230.0
tem
pe
ratu
re (
C)
inlet oil temperature
outlet oil temperature
set point temperature
9.5 10.5 11.5 12.5 13.5 14.5 15.5
local time (hours)
800.0
850.0
900.0
950.0
1000.0
direct sola
r ra
dia
tion (
W/m
2)
real direct solar radiation
predicted direct solar radiation
Very fast setpoint tracking, little overshoot
Eduardo F. Camacho MPC:An Introductory Survey 109 Paris'2010
Plant results: a cloudy day
12.4 12.9 13.4 13.9 14.4 14.9 15.4 15.9
local time (hours)
90.0
110.0
130.0
150.0
170.0
190.0
210.0
tem
pera
ture
(C
)
inlet oil temperature
outlet oil temperature
set point temperature
12.4 12.9 13.4 13.9 14.4 14.9 15.4 15.9
local time (hours)
100.0
200.0
300.0
400.0
500.0
600.0
700.0
800.0
900.0
1000.0
dire
ct so
lar
radia
tion
(W
/m2
)
real direct solar radiation
predicted direct solar radiation
Eduardo F. Camacho MPC:An Introductory Survey 110 Paris'2010
Conclusions
Well established in industry and academia
Great expectations for MPC Many contribution from the research
community but … Many open issues Good hunting ground for PhD
students.
Eduardo F. Camacho MPC:An Introductory Survey 111 Paris'2010