Académique Documents
Professionnel Documents
Culture Documents
LECTURE 12:
MODEL PREDICTIVE CONTROL
Daniel R. Lewin
Department of Chemical Engineering
Technion, Haifa, Israel
12-1 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
Objectives
On completing this section, you should:
n Be able to explain to a layman how model predictive
control (MPC) works.
o Understand why MPC can improve on the performance
that can be expected from decentralized controllers.
p Be able to correctly tune MPC to obtain a good
response.
q Be able to implement MPC using MATLAB.
12-2 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
Introduction
Thus far, digital controllers have been designed using relatively
simple models to predict the future values of the process
outputs. We shall now consider a more general form of model
predictive control in which:
n The set points are computed based on a constrained
optimization of a steady-state process model.
o A model-based predictive algorithm ensures that the process
outputs track the setpoints over a prespecified horizon.
d
e u +
+
Opt. control process y
ys -
y model - +
constraints
12-3 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
Constrained Optimization
The most common approach is to perform constrained
optimization using a static process model at regular
intervals. This ensures that the process is maintained at
the optimal operating level when confronted with such
things as:
Changes in product demands.
Disturbances such as feedstock changes
Changes in equipment availability
Despite the fact that processes can be highly nonlinear,
the most commonly-used method is LP. This has been
covered in other courses (054374, 054402), so it will not
be discussed further here. This leaves MPC to cover…
12-4 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
mk
k k+M k+P
Control horizon, M
12-5 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
12-6 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
12-7 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
12-8 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
Then HP ( z ) =
(1 − e ) z
−0.2 −1
=
0.1813z −1
1 − e −0.2z −1 1 − 0.8187z −1
By long division: HP ( z ) = 0.1813z −1 + 0.1484z −2 + 0.1215z −3
+0.0995z −4 + 0.0815z −5 + … (11.4)
12-9 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
12-11 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
future past
12-12 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
H
control action: y k + j =
0
∑ ai ∆mk
i j= +1
+ j −i and wk is disturbance effect.
12-13 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
Rearranging: e *k (
= −A ⋅ ∆m k + y − y − wˆk
*
k
0
k ) (11.11)
Closed-loop Vector of Open-loop
prediction future control
error prediction
moves error
12-14 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
T
min φ = ⎡⎣e k0 − A ⋅ ∆m k ⎤⎦ ⎡⎣e k0 − A ⋅ ∆m k ⎤⎦ (11.12)
∆mk
( )
−1
Solving gives: ∆m k = A A AT e k0
T
(11.13)
A MxP matrix
of controller
gains
12-15 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
12-16 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
MPC in Action
n The process output, yk, is measured, and used to
estimate the process model error using Eq. (11.10).
past
yk
mk
12-17 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
MPC in Action
o The open-loop prediction error, e k = y k − y k − wˆk , is
0 * 0
mk
k k+P
12-18 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
MPC in Action
( )
−1
p Solve Eq. (11.13): ∆m k = AT A AT e k0
q ∆mk (first step only) is implemented.
mk
k k+M k+P
Control horizon, M
12-19 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
MPC in Action
r Counter is updated: k = k + 1.
yk
mk
k k+M k+P
Control horizon, M
Problem. Control law can result in ringing in ∆mk. This occurs
when A A is ill-conditioned or singular.
T
12-20 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
( )
−1
Minimizing with respect to ∆mk gives: ∆m k = A A +W 2 AT e k0
T
12-21 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
P=3,M=1
P=4,M=2
P=3,M=1
P=4,M=2
12-22 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
P=3,M=1
P=4,M=2
P=3,M=1
P=4,M=2
12-23 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
MIMO MPC
The results obtained so far are easily extended to cover MIMO
systems. Consider for example the 2x2 system described by
the following discrete convolution model:
H H
y1,k+1 = ∑ a11,i ∆m1,k +1−i + ∑ a12,i ∆m2,k +1−i
i =1 i =1
H H
y2,k+1 = ∑ a21,i ∆m1,k +1−i + ∑ a22,i ∆m2,k +1−i
i =1 i =1
This model can be transformed into the standard dynamic form:
* 0
E k = −A ⋅ ∆M k + E k
* 0
where E k and E k are vectors of length 2P and ∆Mk is a vector
of length 2M: * T
E k = ⎡⎣e1,*k +1 , e1,*k +2 , …, e1,*k +P , e2,*k +1 , e2,*k +2 , …, e2,*k +P ⎤⎦
T
∆M k = ⎡⎣ ∆m1,k , ∆m1,k +1 , …, ∆m1,k +M −1 , ∆m2,k , ∆m2,k +1 , …, ∆m2,k +M −1 ⎤⎦
12-24 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
MIMO MPC
In this 2x2 case, the matrix A has the following structure:
⎡A A 12 ⎤
A
A = ⎢ 11 ⎥ where each sub-matrix ij has the structure:
A
⎣ 21 A 22 ⎦
⎡aij ,1 0 0 0 ⎤
⎢a aij ,1 0 0 ⎥
ij ,2
⎢ ⎥
Aij = ⎢aij ,3 aij ,2 aij ,1 0 ⎥
⎢ ⎥
⎢ ⎥
⎣⎢aij ,P aij ,P −1 aij ,P −2 aij ,P −M +1 ⎦⎥
( )
−1 0
Minimizing gives: ∆M k = A W 1 A +W 2 AT W 1 E k
T
12-25 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
12-26 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
12-27 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
12-28 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
12-29 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
12-30 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
12-31 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
Process Constraints
In practice, the manipulated variables are constrained to
physical, or allowable limits. Furthermore, the output variables
may also be subject to constraints. Thus, in practice, a
constrained optimization problem is solved:
*T * T
min φ = E k W 1 E k + ∆M k W 2 ∆M k (11.15)
∆M k
12-32 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
12-33 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control
Summary
On completing this section, you should:
n Be able to explain to a layman how model predictive
control (MPC) works.
Recall that MPC uses a model in two ways: (a) to predict
the effects of past moves; (b) to optimize future moves.
o Understand why MPC can improve on the performance
that can be expected from decentralized controllers.
Recalling that MPC: (a) implicitly handles constraints and
thus maximizes DOF; (b) effectively decouples process
interactions.
p Be able to correctly tune MPC to obtain a good
response.
q Be able to implement MPC using MATLAB.
12-34 PROCESS CONTROL SYSTEM DESIGN - (c) Daniel R. Lewin Model Predictive Control