Optimal control
University of Strasbourg
Telecom Physique Strasbourg, ISAV option Master IRIV, AR track
Part 2 – Predictive control
Outline
1. Introduction
2. System modelling
3. Cost function
4. Prediction equation
5. Optimal control
6. Examples
7. Tuning of the GPC
8. Nonlinear predictive control
9. References
1. Introduction
1.1. Definition of MPC
Model Predictive Control (MPC)
Use of a model to predict the behaviour of the system.
Compute a sequence of future control inputs that minimize the quadratic error over a receding
horizon of time.
Only the first sample of the sequence is applied to the system. The whole sequence is re-evaluated at each sampling time.
1. Introduction
1.2. Principle of MPC
r t +1( )
! r t + N( 2)
!
"
##
#
$
%
&
&
&
+!
Prediction
y t +1( )
! y t + N( 2)
!
"
##
#
$
%
&
&
&
Optimization
u t( )
!
u t + N( u !1)
"
#
$$
$
%
&
'' '
u t( )
System
y t( )
N2 future references
N2 predicted outputs
Nu future control signals
1. Introduction
1.2. Principle of MPC
t + N1 t + N2 t
Receding Horizon
r
y
Goal of the optimization : minimizing
1. Introduction
1.3. Various flavours of MPC
DMC (Dynamic Matrix Control)
Uses the system’s step response.
The system must be stable and without integrator.
MAC (Model Algorithmic Control)
Uses the system’s impulse response.
PFC (Predictive Functional Control)
Uses a state space representation of the system.
Can apply to nonlinear systems.
GPC (Generalized Predictive Control)
Uses a CARMA model of the system.
The most commonly used.
1. Introduction
1.4. Advantages / drawbacks of MPC
Advantages
Simple principle, easy and quick tuning.
Applies to every kind of systems (non minimum phase, instable, MIMO, nonlinear, variant).
If the reference of the disturbance is known in advance, it can drastically improve the reference tracking accuracy.
Numerically stable.
Drawback
Good knowledge of the system model.
2. Modelling
2.1. Example of MAC
Input-output relationship :
Truncation of the response :
Drawbacks :
Model is not in its minimal form.
Computationally demanding.
y t( )= hiu t( )!i
i=1
"
#
y t + k |tˆ( )= hiu t + k( !i |t)
i=1
"N
2. Modelling
2.2. The case of the GPC
CARMA modelling (Controller Auto- Regressive Moving Average) :
With :
Usually :
A q( )-1 y t( )= q-dB q( )-1 u t( )!1 + C q( )-1
D q( )-1 e t( )
A q( )-1 =1+ a1q-1+ a2q-2+…+ anaq-na
B q( )-1 = b0+ b1q-1+ b2q-2+…+ bnbq-nb
C q( )-1 =1+ c1q-1+ c2q-2+…+ cncq-nc
!
"
##
$
##
D q( )-1 = !( )q-1 =1"q-1
3. GPC cost function
For the GPC :
Tuning parameters : N1 N2 Nu λ
J = "#y tˆ
(
+ j |t)
! r t( )
+ j $%2j!N1 N2
&
+ ' ("# u t(
+ j !1)
$%2j=1 Nu
&
Quadratic error Energy of the control signal
4. GPC prediction equations
First Diophantine equation :
With C=1 :
Let :
C = Ej!A+ q-jFj
1= Ej!A+ q-jFj with deg
( )
Ej = j "1 deg( )
Fj = na#
$%
&%
Ay t
( )
= Bq-du t( )
!1 + e t( )
"
#
$%
%
&
'(
( ) "Ejq j
( ) ( ) ( )
4. GPC prediction equations
Using the Diophantine equation :
Which yields :
Thus, the best prediction is :
1! q-jFj
( )
y t + j( )
= EjB"u t + j(
! d !1)
+ Eje t + j( )
y t + j
( )
= Fjy t( )
+ EjB!u t + j(
" d "1)
+ Eje t + j( )
y t + j |tˆ
( )
= EjB!u t + j(
" d "1)
+ Fj y t( )
4. GPC prediction equations
Second Diophantine equation :
Separation of control inputs :
Prediction equation :
With :
EjB = Gj + q-j! j
y t + j |tˆ
( )
= Gj!u t + j(
" d "1)
Forced response
!###"###$+# j!u t
(
" d "1)
+ Fjy t( )
Free response
!####"####$
y = Gˆ u +! fˆ
y =ˆ !"y t +ˆ( 1+ d |t)…y t + Nˆ( 2+ d |t)#$T
!
u = !"%u t |t( )…%u t + N( u &1|t)#$T
' ( )) )
4. GPC prediction equations
And :
With g0 … gN2-1 the samples of the system’s step response.
GN
2!Nu =
g0 0 ! 0
g1 g0 ! 0
" " # "
gN
2"1 gN
2"2 ! g0
" " " "
gN
2"1 gN
2"2 ! gN
2"Nu
#
$
%%
%%
%%
%%
%
&
' (( (( (( (( (
5. Optimal control
Cost function :
Let :
With :
Only the first optimal control sample is applied to the system.
J =
( )
yˆ ! r T( )
yˆ ! r +"u!Tu!!
uopt s.t. dJ
du! = 0
! u!opt = G
(
TG +"I)
-1 GT( )
r # fˆr = r t +1!"
( )
…r t + N(
2)
#$TFuture references
6. Examples
6.1. First order system
A system in the CARMA form has the following parameters :
Compute the system’s prediction equations 3 steps ahead.
A = 1! 0.7q-1 B = 0.9 !0.6q-1 C =1
"
#$
%$
6. Examples
6.1. First order system
Using three times the CARMA model :
6. Examples
6.1. First order system
Putting everything in matrix form :
6. Examples
6.1. First order system
Optimal control (differential) :
Optimal control (absolute) :
6. Examples
6.2. Simulation results
6. Examples
6.2. Simulation results
7. Tuning the GPC
Parameter λ :
Increase : response slow down.
Decrease : more energy in the control signal, thus faster response.
Parameter N2 :
At least the size of the step response of the system.
Parameter N1 :
Greater than the system’s delay.
Parameter Nu :
Tends toward dead-beat control when Nu tends toward zero.
8. Nonlinear predictive control
The system can be nonlinear.
The optimal solution is computed using an iterative optimization algorithm.
The optimization is performed at each sampling time.
Additional constraints can be added.
The cost function can be more complex.
Main drawback : very computationally intensive.
9. References
R. Bitmead, M. Gevers et V. Wertz,
« Adaptive Optimal control – The thinking man's GPC », Prentice Hall International, 1990.
E. F. Camacho et C. Bordons, « Model Predictive Control », Springer Verlag, 1999.
J.-M. Dion et D. Popescu, « Commande optimale, conception optimisée des systèmes », Diderot, 1996.
P. Boucher et D. Dumur, « La commande prédictive », Technip, 1996.