MODEL PREDICTIVE CONTROL SC4060 Ton J.J. van den Boom Delft Center for Systems and Control Delft University of Technology Email:
[email protected]
SC4060
Model Predictive Control (February-March 2011)
Preliminaries - slide 1
COURSE SCHEDULE 2008-2009 Tue 01 Feb : Introduction/Basics (C1/C2) Thu 03 Mar : Stability (C6) Thu 03 Feb : Basics (C2)
Tue 08 Mar : cancelled
Tue 08 Feb : Prediction (C3)
Thu 10 Mar : Tuning (C8)
Thu 10 Feb : Standard formulation (C4)
Tue 15 Mar : cancelled
Tue 15 Feb : Solution of the SPCP (C5)
Thu 17 Mar : cancelled
Thu 17 Feb : cancelled
Tue 22 Mar : reserve
Tue 01 Mar : Solution of the SPCP (C5)
Thu 24 Mar : Question hour
SC4060
Tuesday
10:45-12:30
3mE Room-J (Coenraad Storkzaal)
Thursday
08:45-10:30
3mE Room-J (Coenraad Storkzaal)
Model Predictive Control (February-March 2011)
Preliminaries - slide 2
EXAMINATION
• Written exam on Tuesday April 4, 9:00-11:00 hrs • Homework assignment set (MATLAB) Available in week 9, Hand-in on Monday April 18
QUESTIONS Minh Dang Doan Room: 8C-3-10, tel: 015-278 1362, email:
[email protected]
SC4060
Model Predictive Control (February-March 2011)
Preliminaries - slide 3
Some properties of discrete time systems CONTINUOUS TIME
DISCRETE TIME state space model
d x(t) = A x(t) + B u(t) dt y(t) = C x(t) + D u(t)
x(k + 1) = A x(k) + B u(k) y(k) = C x(k) + D u(k) operators
d x(t) S x(t) = dt
q x(k) = x(k + 1) transfer function
H(s) = C (s I − A)−1 B + D
SC4060
H(z) = C (z I − A)−1 B + D
Model Predictive Control (February-March 2011)
Preliminaries - slide 4
Consider two systems with common A and C matrices
H1
H2
x1 (k + 1) = A x1 (k) + B1 u1 (k)
x2 (k + 1) = A x2 (k) + B2 u2 (k)
y1 (k) = C x1 (k) + D1 u1 (k)
y2 (k) = C x2 (k) + D2 u2 (k)
Connect the systems
u2 (k)
?
y(k) = y1 (k) + y2 (k)
H2 y2 (k)
New system becomes:
x(k + 1) = A x(k) + B1 u1 (k) + B2 u2 (k)
u1 (k)-
H1
y1 (k) -? d
-
y(k)
y(k) = C x(k) + D1 u1 (k) + D2 u2 (k)
SC4060
Model Predictive Control (February-March 2011)
Preliminaries - slide 5
CHAPTER 1 INTRODUCTION
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 1 - slide 6
Model predictive control Enormous challenge for industry:
• Tighter product quality specifications • Increasing productivity demands • Fast changes in the economical market Model Predictive Control (MPC) is able to respond in an effective way to these demands. MPC is more a methodology, not a single technique. Differences in translation into a mathematical formulation.
• • • • SC4060
Model Predictive Control (MPC) Model Based Predictive Control (MBPC) Receding Horizon Control (RHC) Moving Horizon Control (MHC) Model Predictive Control (February-March 2011)
Notes chapter 1 - slide 7
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 1 - slide 8
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 1 - slide 9
Ingredients of MPC Five ingredients are recognizable:
• • • • •
Process + disturbance model Performance index Constraint handling Optimization Receding horizon principle
Theory:
• analysis is difficult Practice:
• accurate tuning for stability & robustness SC4060
Model Predictive Control (February-March 2011)
Notes chapter 1 - slide 10
History of MPC
• pioneered by Richalet (1979) and Cutler & Ramaker (1979) • well accepted by industry: - MPC can handle multivariable processes with large time-delays, non-minimum-phase, unstable poles - easy concept, easy tuning - MPC can handle constraints - MPC can handle structure changes and actuator failures
• academic interest - Self-tuning control & Minimum Variance control - Generalized Predictive Control (GPC)
• many successful applications have been reported
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 1 - slide 11
COURSE SETUP 2. Basics of MPC
? 3. Prediction -
? 4. Standard formulation 5. Solving the MPC problem
? 6. Stability
-
? 8. Tuning
? 7. LMI-based MPC
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 1 - slide 12
COURSE SETUP 2. Basics of MPC
? 3. Prediction -
? 4. Standard formulation 5. Solving the MPC problem
? 6. Stability
-
? 8. Tuning
? 7. LMI-based MPC
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 1 - slide 13
CHAPTER 2 THE BASICS OF MODEL PREDICTIVE CONTROL
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 14
BASICS OF MODEL PREDICTIVE CONTROL Discuss the five ingredients of MPC:
• • • • •
SC4060
1. Process + disturbance model 2. Performance index 3. Constraint handling 4. Optimization 5. Receding horizon principle
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 15
BASICS OF MODEL PREDICTIVE CONTROL Discuss the five ingredients of MPC:
• • • • •
SC4060
1. Process + disturbance model 2. Performance index 3. Constraint handling 4. Optimization 5. Receding horizon principle
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 16
1. The process & disturbance model The models applied in MPC serve two purposes:
• Prediction of the behavior of the future output of the process on the basis of inputs and known disturbances applied to the process in the past
• Calculation of the input signal to the process that minimizes the given objective function These models are not necessarily the same.
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 17
Two types of IO models are applied:
• Direct Input-Output models (IO models) in which the input signal is directly applied to the model.
• Increment Input-Output models (IIO models) in which the increments of the input signal are applied to the model instead of the input directly. Model assumptions:
• • • • • • SC4060
Linear Time-invariant Discrete time Causal Finite order State space description
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 18
Input-output (IO) Model
y(k)= Go (q) u(k) where
Go (q)= strictly proper plant model ∆u(k)= ∆(q)u(k) = u(k) − u(k − 1) Increment-input-output (IIO) Model
y(k)= Gi (q) ∆u(k) where
∆u(k)= ∆(q)u(k) = u(k) − u(k − 1) ∆(q)= (1 − q−1 ) Gi (q)= strictly proper plant model SC4060
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 19
State space description: IO-model
IIO-model
xi (k+1) = Ai xi (k)+Bi ∆u(k)
xo (k+1) = Ao xo (k)+Bo u(k) y(k) = Co xo (k)
y(k) = Ci xi (k)
Relation IO Model and IIO model: Introduce new state
xi =
"
y(k − 1) ∆xo (k)
and define the system matrices
then
SC4060
Gi (q) = Go (q)∆(q)−1
#
Ai =
I Co 0 Ao
Bi =
Model Predictive Control (February-March 2011)
0 Bo
h
Ci = I Co
i
Notes chapter 2 - slide 20
Advantage of using IIO models Example 1: Given an IO system with kGo (1)k < ∞. Minimize an IO-performance index N2
J(k) =
∑ ky(k + j) − r(k + j)k2 + λ2ku(k + j − 1)k2
j=1
Let r(k) = rss
6= 0 for k −→ ∞.
Jss = kyss − rss k2 + λ2 kuss k2 = kGo (1)uss − rss k2 + λ2 kuss k2 T = uTss GTo (1)Go (1) + λ2 I uss − 2uTss GTo (1)rss + rss rss SC4060
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 21
Minimizing Jss over uss means that
−1
uss = GTo (1)Go (1) + λ2 I GTo (1)rss −1 yss = Go (1) GTo (1)Go (1) + λ2 I GTo (1)rss
It is clear that yss
6= rss for λ > 0.
Conclusion: There will be a steady-state error.
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 22
Example 2: Given an IIO system Gi (q) = ∆−1 (q)Go (q) with kGo (1)k < ∞. Minimize an IIO-performance index N2
J(k) =
2 2 2 ky(k + j) − r(k + j)k + λ k∆u(k + j − 1)k ∑
j=1
Let r(k) = rss
6= 0 for k −→ ∞. Jss = kyss − rss k2 + λ2 k∆uss k2
= 0 is reached for uss = G−1 o (1)rss which gives yss = rss and ∆uss = 0. It is clear that yss = rss for any λ > 0. Minimum Jss
Conclusion: There will be no steady-state error.
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 23
Standard model IO Model
IIO Model
xo (k + 1) = Ao xo (k) + Bo u(k)
xi (k + 1) = Ai xi (k) + Bi ∆u(k)
y(k) = Co xo (k)
SC4060
y(k) = Ci xi (k)
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 24
Standard model IO Model
IIO Model
xo (k + 1) = Ao xo (k) + Bo u(k)
xi (k + 1) = Ai xi (k) + Bi ∆u(k)
y(k) = Co xo (k)
y(k) = Ci xi (k)
Standard Model
x(k + 1) = A x(k) + B v(k) y(k) = C x(k)
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 25
Standard model State space model:
x(k + 1) = A x(k) + B v(k)+B2 w(k) + B3 v3 (k) y(k) = C x(k)+D11 e(k) + D12 w(k) where
x(k) v(k) y(k) e(k) w(k)
SC4060
is the state of the system is the input of the system (either u or ∆u) is the output of the system is zero-mean white noise (unmeasurable disturbances) denotes of all known signals (measurable disturbances)
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 26
Standard model State space model:
x(k + 1) = A x(k) + B1 e(k) + B2 w(k) + B3 v(k) y(k) = C x(k) + D11 e(k) + D12 w(k) where
x(k) v(k) y(k) e(k) w(k)
SC4060
is the state of the system is the input of the system (either u or ∆u) is the output of the system is zero-mean white noise (unmeasurable disturbances) denotes of all known signals (measurable disturbances)
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 27
Standard model Input-Output relation:
y(k)= H(q) e(k) + F(q) w(k) + G(q) v(k)
e(k)
? Transfer functions:
H
G(q)=C ( q I − A )−1 B3 −1
v(k) -
F(q)=C ( q I − A ) B2 + D11
G
-? d y(k) 6
H(q)=C ( q I − A )−1 B1 + D12 =C ( q I − A )−1 ( q I − A )−1 B F 6
Noise signal:
w(k)
e(k) is ZMWN IO-model: H(q) e(k) is zero-mean IIO-model: H(q) e(k) is NOT zero-mean, but gives a trend. SC4060
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 28
Standard model Input-Output relation:
y(k)= H(q) e(k) + F(q) w(k) + G(q) v(k)
e(k)
? Noise signal:
H
IO-model:
H e(k) →
3 2
v(k) -
1 0
−1
G
-? d y(k) 6
−2 −3
0
10
20
30
40
50
60
70
80
90
100
6
20
H e(k) →
F w(k)
15
IIO-model:
10 5 0
SC4060
0
10
20
30
40
50
k −→
60
70
80
90
100
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 29
Other model descriptions Impulse and step response models
• • • •
Process industry: no detailed models Reliable models: step/impulse response Simple experiments First MPC models were step/impulse response models (Richalet, Cutler)
Polynomial models
• • • •
SC4060
Model on basis of physical laws Model on basis of system identification Less parameters than in impulse or step response models Suitable for SISO systems
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 30
Choice of model description For all models: Resulting performance ≈ the same Differences:
• effort of modeling • model accuracy • computational power Step response models:
• • • • • • SC4060
more parameters more uncertainty intuitive less a priori information easy to understand cheap experiments Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 31
Polynomial model:
• • • • •
very compact gives good physical insight controller is compact and low order making predictions is cumbersome not tractable for MIMO systems
State space models:
• • • • •
SC4060
especially suited for MIMO systems compact model description compact and low order controller computations are well conditioned algorithms easy to implement
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 32
BASICS OF MODEL PREDICTIVE CONTROL Discuss the five ingredients of MPC:
• • • • •
SC4060
1. Process + disturbance model 2. Performance index 3. Constraint handling 4. Optimization 5. Receding horizon principle
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 33
2. Performance index: The MPC controller minimize the standard performance index at time k: N
J(v, k)=
∑
j=Nm
N
zˆT1 (k+ j−1|k)ˆz1 (k+ j−1|k) + ∑ zˆT2 (k+ j−1|k)ˆz2 (k+ j−1|k) j=1
where z1 reflects tracking error and z2 reflects the control action. and where zˆi (k+ j−1|k) is prediction of zi (k+ j−1) at time k. In MPC literature three performance indices often appear:
• Generalized Predictive Control (GPC) performance index • Linear Quadratic Predictive Control (LQPC) performance index • Zone performance index
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 34
GPC performance index: N
J(u, k) =
∑
j=Nm
r(k) y(k) ∆u(k) y p (k) Nm N Nc λ SC4060
Nc 2 yˆ p (k + j|k) − r(k + j|k) + λ2 ∑ | ∆u(k + j − 1) |2 j=1
is the reference trajectory is the process output signal is the process control increment signal
= P(q)y(k) is the minimum cost- horizon is the prediction horizon is the control horizon is the weighting on the control signal
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 35
LQPC performance index:
N
J(u, k) =
∑
N
j=Nm
xˆT (k + j|k)Qx(k ˆ + j|k) + ∑ uT (k + j − 1)Ru(k + j − 1)
x(k) u(k) Q R
SC4060
j=1
is the state signal vector is the process control signal is the state weighting matrix is the control weighting matrix
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 36
Zone-control performance index: N
J(u, k) =
∑
j=Nm
Nc
εˆ 2 (k+ j|k) + λ2 ∑ ∆u2 (k+ j−1) j=1
where
εˆ (k) =
0
SC4060
for
| y(k)−r(k) ˆ | ≤ δmax
y(k)−r(k)−δ ˆ max
for
y(k)−r(k) ˆ ≥ δmax
y(k)−r(k)+δ ˆ max
for
y(k)−r(k) ˆ ≤ −δmax
δmax
is the size of the zone
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 37
Tracking error y(k) − r(k)
y(k) − r(k) →
3 2
+δmax
1 0
−δmax
−1 −2 −3
0
2
4
6
8
10
12
14
16
18
20
0
2
4
6
8
10
12
14
16
18
20
1.5
ε(k) →
1 0.5 0
−0.5 −1 −1.5
k −→
zone performance signal ε(k)
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 38
Performance index - GPC ↔ Standard Choose:
z(k) =
Then:
z1 (k) z2 (k)
=
y p (k + 1) − r(k + 1) λ∆u(k)
N
J(k)=
T T z ˆ (k+ j−1|k)ˆ z (k+ j−1|k) + z ˆ z2 (k+ j−1|k) 1 ∑ 1 2 (k+ j−1|k)ˆ
j=1 N
2 = ∑ yˆ p (k + j|k) − r(k + j|k) + λ2 | ∆u(k + j − 1|k) |2 j=1
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 39
Performance index - LQPC ↔ Standard Choose:
z(k) =
Then:
z1 (k) z2 (k)
=
Q1/2 x(k + 1) R1/2 u(k)
N
J(k)=
T T z ˆ (k+ j−1|k)ˆ z (k+ j−1|k) + z ˆ z2 (k+ j−1|k) 1 ∑ 1 2 (k+ j−1|k)ˆ
j=1 N
=
T T x ˆ (k + j|k)Q x(k ˆ + j|k) + u (k + j − 1|k)Ru(k + j − 1|k) ∑
j=1
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 40
Performance index (Minimum cost horizon) # " Choose 0 0 for 0 ≤ j < Nm −1 0 I Γ1 ( j) 0 = " # Γ( j) = 0 Γ2 ( j) I 0 for Nm −1 ≤ j ≤ N 0 I Then
N
J=
∑
N
j=Nm N−1
=
∑
zˆT1 (k+ j−1|k)ˆz1 (k+ j−1|k) + ∑ zˆT2 (k+ j−1|k)ˆz2 (k+ j−1|k) j=1
zˆT1 (k+ j|k)Γ1 ( j)ˆz1 (k+ j|k) + zˆT2 (k+ j|k)Γ2 ( j)ˆz2 (k+ j|k)
j=0 N−1
=
∑
zˆT (k+ j|k)Γ( j)ˆz(k+ j|k)
j=0 SC4060
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 41
BASICS OF MODEL PREDICTIVE CONTROL Discuss the five ingredients of MPC:
• • • • •
SC4060
1. Process + disturbance model 2. Performance index 3. Constraint handling 4. Optimization 5. Receding horizon principle
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 42
3. Constraint handling Inequality constraints:
umin ≤ u(k) ≤ umax ymin ≤ y(k) ≤ ymax
∆umin ≤ ∆u(k) ≤ ∆umax xmin ≤ x(k) ≤ xmax
or
ψ(k) ≤ Ψ(k) ∀k For future values we use the predicted value of ψ:
ˆ + j|k) ≤ Ψ(k + j) ∀ j > 0 ψ(k
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 43
Equality constraints: Motivated by control algorithm itself:
Control horizon constraint:
∆u(k+ j|k) = 0 for j ≥ Nc
The state end-point constraint:
x(k ˆ + N|k) = xss
or
φ(k) = 0 k ∈ κ For future values we use the predicted value of φ:
ˆ + j|k) = 0 ∀ j > 0 A j φ(k
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 44
Multiple constraints can be combined by stacking Equality constraints:
φ1 (k) = 0 .. .
φn (k) = 0
Inequality constraints:
ψ1 (k) ≤ Ψ1 (k) .. .
ψm (k) ≤ Ψm (k)
SC4060
φ(k) =
ψ(k) =
φ1 (k) .. .
φn (k)
ψ1 (k) .. .
ψm (k)
Model Predictive Control (February-March 2011)
=0
≤
Ψ1 (k) .. .
Ψm (k)
= Ψ(k)
Notes chapter 2 - slide 45
Two-sided inequality constraint
Ψ1,min (k) ≤ ψ1 (k) ≤ Ψ1,max (k) can be translated into one-sided inequality constraint
ψ(k) =
SC4060
ψ1 (k) −ψ1 (k)
≤
Ψ1,max (k) −Ψ1,min (k)
Model Predictive Control (February-March 2011)
= Ψ(k)
Notes chapter 2 - slide 46
Structuring the input signal To obtain tractable optimization problem. Decrease the degrees of freedom in
{ u(k) , u(k + 1) , . . . , u(k + N − 1) } • Control horizon Nc . u(k+ j|k) = u(k+Nc −1|k) for j ≥ Nc • Blocking. u(k+ j|k) = u(k+mℓ −1|k) for mℓ ≤ j < mℓ+1 , ℓ = 1, . . . , nbl • Basis functions. u(k+ j|k) = ∑M i=0 Si ( j) αi (k) - Si ( j) are the basis functions - αi (k), i = 1, . . . , M are scalar parameters SC4060
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 47
Control horizon
SNc−1 SNc−2 SNc−3 SNc−4 SNc−5 S2 S1 S0 0
SC4060
Model Predictive Control (February-March 2011)
Nc −1
Notes chapter 2 - slide 48
Blocking
SM SM−1 SM−2 SM−3 SM−4 S2 S1 S0 0
SC4060
Model Predictive Control (February-March 2011)
N−1
Notes chapter 2 - slide 49
BASICS OF MODEL PREDICTIVE CONTROL Discuss the five ingredients of MPC:
• • • • •
SC4060
1. Process + disturbance model 2. Performance index 3. Constraint handling 4. Optimization 5. Receding horizon principle
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 50
Standard Predictive Control Problem: The MPC controller minimizes the following performance index at time k: N−1
J(v, k) =
∑ zˆT (k + j|k)Γ( j)ˆz(k + j|k)
j=0
subject to the constraints
SC4060
ˆ + j|k) = 0 A j φ(k
∀j ≥ 0
ˆ + j|k) ≤ Ψ(k + j) ψ(k
∀j ≥ 0
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 51
An optimization algorithm will be applied to compute a sequence of future control signals that minimizes the performance index subject to the given constraints. For
• linear models • linear constraints • quadratic (2-norm) performance index we can use quadratic programming algorithms. For 1-norm or ∞- norm performance index: linear programming algorithms. Both types of algorithms are convex and show fast convergence.
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 52
BASICS OF MODEL PREDICTIVE CONTROL Discuss the five ingredients of MPC:
• • • • •
SC4060
1. Process + disturbance model 2. Performance index 3. Constraint handling 4. Optimization 5. Receding horizon principle
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 53
RECEDING HORIZON PRINCIPLE
• a time k: Performance index J(k) is minimized • first element of optimal control sequence v(k) is applied to the system • horizon shifted • optimization restarted for time k + 1
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 2 - slide 54
RECEDING HORIZON PRINCIPLE FUTURE -
PAST
b b b b b
b b
z(k)
b b b
b b b b b b b b b
v(k) Nm
Nc
N k+ j
k
SC4060
Model Predictive Control (February-March 2011)
-
Notes chapter 2 - slide 55
RECEDING HORIZON PRINCIPLE FUTURE -
PAST b b b b
z(k + 1) zˆ(k + 1|k)
b
z(k)
b b
v(k) k+1
SC4060
Model Predictive Control (February-March 2011)
k+ j
-
Notes chapter 2 - slide 56
RECEDING HORIZON PRINCIPLE FUTURE -
PAST b
b
b b
b b
b
z(k)
b b
b b b b b b b b b b b
v(k) Nm
Nc
k+1
SC4060
Model Predictive Control (February-March 2011)
N k+ j
-
Notes chapter 2 - slide 57
RECEDING HORIZON PRINCIPLE FUTURE -
PAST b b
b b
b
zˆ(k + 1|k) z(k + 1)
b
z(k)
b b
v(k) k+2
SC4060
Model Predictive Control (February-March 2011)
k+ j
-
Notes chapter 2 - slide 58
RECEDING HORIZON PRINCIPLE FUTURE -
PAST b b b
b b
b b
z(k)
b b b b b b b b b b b b b b
v(k) Nm
Nc
k+2
SC4060
Model Predictive Control (February-March 2011)
N k+ j
-
Notes chapter 2 - slide 59
CHAPTER 3 PREDICTION
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 3 - slide 60
PREDICTION MODEL Prediction on basis of model:
x(k+1) = Ax(k) + B1 e(k) + B2 w(k) + B3 v(k) y(k) = C1 x(k) + D11 e(k) + D12 w(k) p(k) = Cp x(k) + D p1 e(k) + D p2 w(k) + D p3 v(k)
x(k)
is the state
v(k)
is the control signal (u / ∆u)
e(k)
is ZMWN
w(k) consists of all known signals ( r / di / do ) p(k)
SC4060
is a signal, to be predicted.
Model Predictive Control (February-March 2011)
Notes chapter 3 - slide 61
At time instant k: - make a set of j-step ahead predictions of Prediction, denoted as
p(k + j).
p(k ˆ + j|k)
- using information given at time k - future values of the control signal v(k +
SC4060
j)
Model Predictive Control (February-March 2011)
Notes chapter 3 - slide 62
p(k) =C p x(k) + D p1 e(k) + D p2 w(k) + D p3 v(k) Define
p(k|k) ˆ
p(k+1|k) ˆ p(k) ˜ = . .. p(k+N−1|k) ˆ
v(k)
v(k+1) v(k) ˜ = . .. v(k+N−1)
˜ p3 such that Goal: find p˜0 (k) and D
w(k)
w(k+1) w(k) ˜ = . .. w(k+N−1)
p(k) ˜ = p˜0 (k) + D˜ p3 v(k) ˜ with free-response signal:
p˜0 (k) = C˜ p x(k) + D˜ p1 e(k) + D˜ p2 w(k) ˜ SC4060
Model Predictive Control (February-March 2011)
Notes chapter 3 - slide 63
Noiseless case The model:
x(k + 1) = Ax(k) + B2 w(k) + B3 v(k) p(k) = C p x(k) + D p2 w(k) + D p3 v(k) Successive substitution:
x(k+ ˆ j|k) = Ax(k + j − 1|k) + B2 w(k+ j−1) + B3 v(k+ j−1) = A2 x(k+ j−2|k) + AB2 w(k+ j−2) + AB3 v(k+ j−2) +B2 w(k + j − 1) + B3 v(k + j − 1) j
.. .
j
= A j x(k) + ∑ Ai−1 B2 w(k+ j−i) + ∑ Ai−1 B3 v(k+ j−i) i=1
SC4060
Model Predictive Control (February-March 2011)
i=1
Notes chapter 3 - slide 64
p(k+ ˆ j|k) = C p x(k+ ˆ j|k) + D p2 w(k+ j) + D p3 v(k+ j) j
= C p A j x(k) + ∑ C p Ai−1 B2 w(k + j − i) i=1
j
+ ∑ C p Ai−1 B3 v(k + j − i) + D p2 w(k+ j) + D p3 v(k + j) i=1
and so
p(k) ˜ = C˜ p x(k) + D˜ p2 w(k) ˜ + D˜ p3 v(k) ˜ = p˜0 (k) + D˜ p3 v(k) ˜ with free-response
p˜0 (k) = C˜ p x(k) + D˜ p2 w(k) ˜ SC4060
Model Predictive Control (February-March 2011)
Notes chapter 3 - slide 65
where
C p CpA ˜ C p = C p A2 . .. C p AN−1
D˜ p3 = SC4060
˜ D p2 = D p3 C p B3 C p AB3 .. .
C p AN−2 B3
D p2 C p B2
0 D p2
C p AB2
C p B2
.. .
C p B3
0 0
..
.
.. .
..
.
D p2 · · · C p B2
C p AN−2 B2 0 D p3
··· ···
··· ···
0 0
..
.
.. .
..
.
D p3 · · · C p B3
Model Predictive Control (February-March 2011)
0 0 .. . 0 D p2
0 0 .. . 0 D p3 Notes chapter 3 - slide 66
Noisy case The model:
x(k+1) = Ax(k) + B1 e(k) + B2 w(k) + B3 v(k) y(k) = C1 x(k) + D11 e(k) + D12 w(k) p(k) = Cp x(k) + D p1 e(k) + D p2 w(k) + D p3 v(k) Successive substitution: j
j
i=1
i=1
x(k+ ˆ j|k) = A j x(k) + ∑ Ai−1 B3 v(k+ j−i) + ∑ Ai−1 B1 e(k+ ˆ j−i|k) j
+ ∑ Ai−1 B2 w(k+ j−i) i=1
e(k ˆ + j|k) = 0 for j > 0 −1 and e(k) = D11 y(k) −C1 x(k) − D12 w(k) Prediction of noise:
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 3 - slide 67
j
x(k+ ˆ j|k) = A j x(k) + ∑ Ai−1 B3 v(k+ j−i)+A j−1 B1 e(k) ˆ i=1
j
+
i−1 A ∑ B2w(k+ j−i)
i=1
and so:
p(k+ ˆ j|k) = C p x(k ˆ + j|k) + D p2 w(k + j) + D p3 v(k + j) j
= C p A j x(k) +C pA j−1 B1 e(k) + ∑ C p Ai−1 B p w(k + j − i) i=1
j
+ ∑ C p Ai−1 B3 v(k + j − i) + D p2 w(k + j) + D p3 v(k + j) i=1
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 3 - slide 68
p(k)= ˜ C˜ p x(k) + D˜ p1 e(k) + D˜ p2 w(k) ˜ + D˜ p3 v(k) ˜ = p˜0 (k) + D˜ p3 v(k) ˜ where
and free-response signal:
D˜ p1 =
D p1 Cp B1 C . p AB1 ..
Cp AN−2 B1
p˜0 (k)= C˜ p x(k) + D˜ p1 e(k) + D˜ p2 w(k) ˜ ˜ p2 w(k) = C˜ p x(k) + D˜ p1 D−1 (y(k) −C x(k) − D w(k)) + D ˜ 1 12 11 −1 −1 ˜ ˜ ˜ = (C˜ p − D˜ p1 D−1 C )x(k) + D D y(k) + ( D − D D ˜ p1 11 p2 p1 11 D12 Ew )w(k) 11 1
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 3 - slide 69
Summary On basis of model:
x(k+1) = Ax(k) + B1 e(k) + B2 w(k) + B3 v(k) y(k) = C1 x(k) + D11 e(k) + D12 w(k) p(k) = C p x(k) + D p1 e(k) + D p2 w(k) + D p3 v(k) we make prediction:
p(k) ˜ = C˜ p x(k) + D˜ p1 e(k) + D˜ p2 w(k) ˜ + D˜ p3 v(k) ˜ = p˜0 (k) + D˜ p3 v(k) ˜ −1 where e(k) = D11 y(k) −C1 x(k) − D12 w(k) and SC4060
Model Predictive Control (February-March 2011)
Notes chapter 3 - slide 70
where
C p CpA ˜ C p = C p A2 . .. C p AN−1
D p1 C p B1 C . p AB1
D˜ p1 = .. C p AN−2 B1 SC4060
˜ D p2 =
D˜ p3 =
D p2 C p B2 C p AB2 .. .
0 D p2 C p B2
C p AB3 .. .
C p AN−2 B3
Model Predictive Control (February-March 2011)
0 0
..
.
.. .
..
.
D p2 · · · C p B2
C p AN−2 B2 D p3 C p B3
··· ···
0 D p3 C p B3
··· ···
0 0
..
.
.. .
..
.
D p3 · · · C p B3
0 0 .. . 0 D p2
0 0 .. . 0 D p3
Notes chapter 3 - slide 71
The use of a priori knowledge
We assume w(k +
w(k) ˜ =
w(k) w(k+1) ... w(k+N−1)
j|k) to be known at time k.
If not we choose
w(k) ˜ = SC4060
w(k|k) ˆ w(k+1|k) ˆ ... w(k+N−1|k) ˆ
Model Predictive Control (February-March 2011)
Notes chapter 3 - slide 72
Zero-th order extrapolation: We assume w(k ˆ +
j) = w(k − 1) for j ≥ 0.
This results in
w(k − 1)
w(k − 1) w(k) ˜ = ... w(k − 1)
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 3 - slide 73
Linear (first order) extrapolation:
ˆ + We assume w(k
j) = w(k − 1) + j (w(k − 1) − w(k − 2)) for j ≥ 0.
This results in
w(k) ˜ =
2w(k − 1) − w(k − 2) 3w(k − 1) − 2w(k − 2) ... (N + 1)w(k − 1) − Nw(k − 2)
Polynomial (higher order) extrapolation: For an nth order extrapolation we use n + 1 past values of w. The error estimate will grow with the degree of the polynomial extrapolation.
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 3 - slide 74
CHAPTER 4 STANDARD FORMULATION
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 4 - slide 75
Standard formulation Many kinds of performance indices
• LQPC performance index • GPC performance index • zone performance index Many types of constraints
• equality constraints • inequality constraints Standard formulation:
• transform performance index • formalize constraints
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 4 - slide 76
Performance index Consider the system
x(k + 1) = Ax(k) + B1 e(k) + B2 w(k) + B3 v(k) y(k) = C1 x(k) + D11 e(k) + D12 w(k) Define performance index N−1
J(v, k) =
∑
zˆT (k + j|k)Γ( j)ˆz(k + j|k)
j=0
where
z(k) = C2 x(k) + D21 e(k) + D22 w(k) + D23 v(k)
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 4 - slide 77
LQPC: N
J(u, k) =
∑
j=Nm
N
xˆT (k + j|k)Qx(k ˆ + j|k) + ∑ uT (k + j − 1)Ru(k + j − 1) j=1
z(k) =
GPC: N
J(u, k) =
∑
j=Nm
R1/2 u(k)
Nc 2 yˆ p (k + j|k) − r(k + j|k) + λ2 ∑ | ∆u(k + j − 1) |2 j=1
z(k) = SC4060
Q1/2 x(k + 1)
yˆ p (k + 1) − r(k + 1) λ∆u(k)
Model Predictive Control (February-March 2011)
Notes chapter 4 - slide 78
LQPC performance index Consider IO-model
xo (k+1) = Ao xo (k)+Ko eo (k)+Lo do (k)+Bo u(k) y(k) = Co xo (k)+DH eo (k)+DF do (k) Choose
x(k) = xo (k) , v(k) = u(k) , w(k) = do (k) , e(k) = eo (k), then x(k+1) = Ao x(k) + Ko e(k) + Lo d(k) + Bo v(k) = A x(k) + B1 e(k) + B2 w(k) + B3 v(k) y(k) = C1 x(k) + D11 e(k) + D12 w(k)
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 4 - slide 79
z(k) =
=
Q1/2 x(k + 1) R1/2 v(k)
Q1/2 Ao x(k) + Q1/2 Ko e(k) + Q1/2 Lo w(k) + Q1/2 Bo v(k)
R1/2 v(k) Q1/2 Ao Q1/2 Ko Q1/2 Lo Q1/2 Bo x(k)+ e(k)+ w(k)+ v(k) = 0 0 0 R1/2 = C2 x(k) + D21 e(k) + D22 w(k) + D23 v(k)
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 4 - slide 80
GPC performance index Consider the IIO-output model:
xi (k+1) = Ai xi (k)+Ki ei (k)+Li di (k)+Bi ∆u(k) y(k) =Ci xi (k) + DH ei (k) The realization y p (k) = P(q)y(k) described by:
x p (k + 1) = A p x p (k) + B p y(k) y p (k) = C p x p (k) + D p y(k) Choose e(k) = ei (k) , v(k) = ∆u(k),
w(k) = SC4060
di (k) r(k + 1)
, and x(k) =
x p (k) xi (k)
Model Predictive Control (February-March 2011)
, Notes chapter 4 - slide 81
then
x p (k+1) xi (k+1)
=
A p B pCi
x p (k)
+
B p DH
ei (k)+
xi (k) Ki 0 0 di (k) 0 + ∆u(k) Li 0 r(k + 1) Bi 0
Ai
= Ax(k) + B1 e(k) + B2 w(k) + B3 v(k) y(k) = Ci x(k) + DH e(k) = C1 x(k) + D11 e(k) + D12 w(k)
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 4 - slide 82
For y p (k) we find:
y p (k) =
h
i
C p D pCi x(k) + D pDH e(k)
and we obtain the estimate y p (k+1):
h i x p (k) + y p (k+1) = C p A p C p B pCi + D pCi Ai xi (k) h i C p B p DH + D pCi Ki eˆi (k)+ h i h i di (k) + D pCi Bi v(k) D pCi Li 0 r(k + 1)
where we used the fact that eˆi (k + 1|k) = 0. SC4060
Model Predictive Control (February-March 2011)
Notes chapter 4 - slide 83
Now we find:
z(k) =
=
y p (k + 1) − r(k + 1)
λ∆u(k)
C p A p C p B pCi + D pCi Ai 0
0
C p B p DH + D pCi Ki 0 D pCi Li −I 0
0
eˆi (k)+
di (k)
r(k + 1)
x p (k) xi (k)
+
+
D pCi Bi λI
= C2 x(k) + D21 e(k) + D22 w(k) + D23 v(k) SC4060
Model Predictive Control (February-March 2011)
v(k)
Notes chapter 4 - slide 84
Standard performance index Define vector z˜(k) with predictions of zˆ(k +
j|k):
zˆ(k|k) zˆ(k+1|k) z˜(k) = . .. zˆ(k+N−1|k)
Then using the formulas of chapter 3 we obtain:
z˜(k) = C˜2 x(k) + D˜ 21 e(k) + D˜ 22 w(k) ˜ + D˜ 23 v(k) ˜
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 4 - slide 85
where
C 2 C2 A ˜ C2 = C2 A2 . .. C2 AN−1
D21 C2 B1 C . 2 AB1
D˜ 21 = .. C2 AN−2 B1 SC4060
˜ D22 =
D˜ 23 =
D22 C2 B2 C2 AB2 .. .
0 D22 C2 B2
C2 AB3 .. .
C2 AN−2 B3
Model Predictive Control (February-March 2011)
0 0
..
.
.. .
..
.
D22 · · · C2 B2
C2 AN−2 B2 D23 C2 B3
··· ···
0 D23 C2 B3
··· ···
0 0
..
.
.. .
..
.
D23 · · · C2 B3
0 0 .. . 0 D22
0 0 .. . 0 D23
Notes chapter 4 - slide 86
Now define
then
Γ(0)
0
0
Γ(1)
Γ¯ =
.. .
0
0
∑
0 0
..
N−1
J(v, k) =
...
.
.. .
. . . Γ(N − 1)
zˆT (k + j|k)Γ( j)ˆz(k + j|k)
j=0
¯ z(k) = z˜T (k)Γ˜
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 4 - slide 87
Handling constraints Equality constraints
ˆ + j|k) = 0 A j φ(k Stack all constraints at time k on predicted φ in one vector:
ˆ + 1|k) A1 φ(k A φ(k ˆ + 2|k) 2 ˜ φ(k) = .. . ˆ + N|k) AN φ(k
In standard framework, we can express the equality constraints in the form:
˜ φ(k) = C˜3 x(k) + D˜ 31 e(k) + D˜ 32 w(k) ˜ + D˜ 33 v(k) ˜ =0 SC4060
Model Predictive Control (February-March 2011)
Notes chapter 4 - slide 88
State end-point constraint:
h
i x(k + N|k) = AN x(k) + AN−1 B2 AN−2 B2 · · · B2 w(k)+ ˜ h i +AN−1 B1 e(k) + AN−1 B3 AN−2 B3 · · · B3 v(k) ˜ =0
by defining
C˜3 = AN
D˜ 31 = AN−1 B1 D˜ 33 =
we obtain:
h
D˜ 32 =
h
AN−1 B2 AN−2 B2 · · · B2
AN−1 B3 AN−2 B3 · · · B3
i
i
˜ = C˜3 x(k)+ D˜ 31 e(k)+ D˜ 32 w(k)+ φ(k) ˜ D˜ 33 v(k) ˜ =0
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 4 - slide 89
Inequality constraints
ψ(k) ≤ Ψ(k) where ψ reflect states, inputs, outputs and Ψ reflects limitations. Example:
x1,min ≤ x1 (k) ≤ x1,max v(k) ≤ vmax ymin ≤ y(k) result in :
ψ(k) = SC4060
x1 (k) −x1 (k) v(k) −y(k)
Ψ(k) =
Model Predictive Control (February-March 2011)
x1,max −x1,min vmax −ymin
Notes chapter 4 - slide 90
So:
E1 0 0 −E1 0 0 ψ(k) = x(k) + e(k) + w(k) + 0 0 0 −C1 −D11 −D12 = C4 x(k) + D41 e(k) + D42 w(k)+ D43 v(k)
where
0 0 v(k) I 0
E1 = [ 1 0 . . . 0 ] .
Now we obtain the inequality constraint:
ψ(k) = C4 x(k) + D41 e(k) + D42 w(k) + D43 v(k) ≤ Ψ(k)
SC4060
Model Predictive Control (February-March 2011)
Notes chapter 4 - slide 91
Now consider the inequality constraint
ψ(k) = C4 x(k) + D41 e(k) + D42 w(k) + D43 v(k) ≤ Ψ(k) Stack all constraints at time k on predicted ψ in one vector:
ˆ + 1|k) ψ(k
ψ(k ˆ + 2|k) ˜ ψ(k) = .. . ˆ + N|k) ψ(k
Ψ(k + 1|k)
Ψ(k + 2|k) ≤ .. . Ψ(k + N|k)
˜ = Ψ(k)
Using the formulas of chapter 3, the inequality constraints can be written in the form
˜ ˜ ψ(k) = C˜4 x(k) + D˜ 41 e(k) + D˜ 42 w(k) ˜ + D˜ 43 v(k) ˜ ≤ Ψ(k) where SC4060
Model Predictive Control (February-March 2011)
Notes chapter 4 - slide 92
C 4 C4 A C˜4 = C4 A2 . .. C4 AN−1
D41 C4 B1 C . 4 AB1
D˜ 41 = .. C4 AN−2 B1 SC4060
D˜ 42 =
D˜ 43 =
D42 C4 B2 C4 AB2 .. .
0 D42 C4 B2
C4 AB3 .. .
C4 AN−2 B3
Model Predictive Control (February-March 2011)
0 0
..
.
.. .
..
.
D42 · · · C4 B2
C4 AN−2 B2 D43 C4 B3
··· ···
0 D43 C4 B3
··· ···
0 0
..
.
.. .
..
.
D43 · · · C4 B3
0 0 .. . 0 D42
0 0 .. . 0 D43
Notes chapter 4 - slide 93
Standard formulation Consider the system
x(k + 1) = Ax(k) + B1 e(k) + B2 w(k) + B3 v(k) y(k) = C1 x(k) + D11 e(k) + D12 w(k) z˜(k) = C˜2 x(k) + D˜ 21 e(k) + D˜ 22 w(k) ˜ + D˜ 23 v(k) ˜ ˜ φ(k) = C˜3 x(k) + D˜ 31 e(k) + D˜ 32 w(k) ˜ + D˜ 33 v(k) ˜ ˜ ψ(k) = C˜4 x(k) + D˜ 41 e(k) + D˜ 42 w(k) ˜ + D˜ 43 v(k) ˜ Minimize performance index N−1
J(v, k) =
∑
zˆT (k + j|k)Γ( j)ˆz(k + j|k)
j=0
¯ z(k) = z˜T (k)Γ˜ subject to the constraints SC4060
˜ ˜ ˜ φ(k) = 0 and ψ(k) ≤ Ψ(k).
Model Predictive Control (February-March 2011)
Notes chapter 4 - slide 94