Introduction To Model Predictive Control (MPC) : Oscar Mauricio Agudelo Mañozca Bart de Moor
Introduction To Model Predictive Control (MPC) : Oscar Mauricio Agudelo Mañozca Bart de Moor
Control (MPC)
Course :
Computergestuurde regeltechniek
ESAT - KU Leuven
May 11th, 2017
Basic Concepts
Control method for handling input and state constraints within an optimal control setting.
yref y(k i)
2
min
u ( k ), ,u ( k N 1)
Past Future i 1
subject to
Reference yref model of the process
input constraints
Prediction of y (k ) output / state constraints
measurement
MPC strategies have been used for stabilizing and maximizing the throughput of the
synthesis section of a urea plant, while satisfying all the process constraints.
Urea plant of Yara at Brunsbüttel (Germany), where a MPC control system has been
set by IPCOS
A Nonlinear MPC control strategy has been implemented (2016) for avoiding future
floodings of the Demer river in Belgium. Partners: STADIUS, Dept. Civil Engineering of KU
Leuven, IPCOS, IMDC, Antea Group, and Cofely Fabricom.
DIEST
HASSELT
Linear MPC : it uses a linear model of the plant x(k 1) Ax(k ) Bu(k )
Convex optimization problem
Nonlinear MPC: it uses a nonlinear model of the plant x(k 1) f x(k ), u(k )
Non-convex optimization problem
Remark: Since linear MPC includes constraints, it is a non-linear control strategy !!!
N N 1
min x(k i) xref (k i) Q x(k i ) xref (k i) u(k i) u ref (k i) T R u(k i ) u ref (k i )
T
x N ,u N
i 1 i 0
subject to
x(k 1 i) Ax(k i) Bu(k i), i 0,1, , N 1, Model of the plant
with: x N x(k 1); x(k 2); ; x(k N ) , u N u(k ); u(k 1); ; u(k N 1)
Introduction to Model Predictive Control Course: Computergestuurde regeltechniek 9
MPC Algorithm
Typical MPC control Loop
xref (k )
u( k ) u(t )
u ref (k ) MPC ZOH Plant y (t )
xˆ (k )
Observer y (k )
Ts
Digital system
MPC Algorithm
At every sampling time:
Apply to the plant ONLY the first element of such a sequence u(k)
subject to subject to
x(k 1) Ax(k ) Bu(k ), k 0,1, , N 1,
x(k 1) Ax(k ) Bu(k ), k 0,1, ,
x(k ) xmax , k 1, 2, , N,
u(k ) umax , k 0,1, , N 1,
The optimal solution has the form: u(k ) Kx(k )
PRO PRO
Explicit, Linear solution Takes constraints into account
Low online computational burden Proactive behavior
CON CON
Constraints are not taken into account High online computational burden
If N∞, and constraints are not considered the MPC and LQR give the same solution
N N 1
min x(k i) xref (k i) Q x(k i ) xref (k i) u(k i) u ref (k i) T R u(k i ) u ref (k i )
T
x N ,u N
i 1 i 0
subject to
x(k 1 i) Ax(k i) Bu(k i), i 0,1, , N 1,
u(k i) umax , i 0,1, , N 1,
x(k i) xmax , i 1, 2, , N,
with: x N x(k 1); x(k 2); ; x(k N ) , u N u(k ); u(k 1); ; u(k N 1)
n N x n N u
1 T
min x Hx f T x
x 2
with:
subject to
xN ; u N
N nx nu
Ae x be x
Ai x bi
where
N times
Q x ref (1)
Q x (N )
N nx nu N nx nu
f x u H ref
N n n
H 2
R u ref (0)
R u ref ( N 1)
N times
x max
I nx N
2N times
I nx N x max
Ai
2 N nx nu N nx nu 2 N nx nu
bi
I nu N u
max
I nu N 2N times
max
u
I nx N times B Ax(k )
0
A I nx B
A e x x u
N n N n n
b e N nx
A I nx N times B 0
Remarks:
The problem is convex if Q and R are positive semi-definite
Number of optimization variables: N(nx + nu). This number can be reduced to N·nu (Condensed
form of the MPC) through elimination of the states x(k) but at the cost of sparsity !!!
What
happens?
We have a
winner !!!
What
happens?
We have an
accident !!!
x N ,u N
i 1 i 0
subject to
x(k 1 i) Ax(k i) Bu(k i), i 0,1, , N 1,
u(k i) umax , i 0,1, , N 1,
x(k i) xmax , i 1, 2, , N,
x2 (k )
Main goal of the terminal cost:
x(k 2) x(k 1)
To include the terms for which i ≥ N in the cost
function (To extend the prediction horizon to
infinity) x( k )
x(k N )
What do we gain?
Effect of the stabilizing
control law u(k) = -Kx(k)
“Stability”
x(k ) x1 (k )
steady-state xref (k ) 0