Title: Chapter%206%20Model%20Predictive%20Control
1Chapter 6Model Predictive Control
- Prof. Shi-Shang Jang
- National Tsing-Hua University
- Chemical Engineering Department
2Historical Development
- Questions
- Given a system what are the absolute limitations
to output control? - How can one make use of a process model and
account for model error? - Smith Predictor(1955)
- Feedforward Control
- Inferential Control (1975, 1979)
- Dynamic Matrix Control (Shell, 1979)
- Model Algorithmic Control (France, 1979)
- Internal Model Control (Garcia and Morari, 1982)
3Criteria for Controller Quality
- Regulatory Behavior Compensation for
(unmeasured disturbances) - Servo Behavior- Follow set point changes (fast,
smooth, no offset) - Robustness-Controller should be effective when
there are modeling errors (both structure and
parameters)
4Criteria for Controller Quality-Continued
- Constraints- Ability to deal with constraints on
inputs and states (no windup) - Remark 90 of loops can be handled by PID type
controllers.
5Internal Model Control (IMC) Structure
eys-yym
6Analysis of Internal Model Structure
7Properties of IMC (Principles of Internal Model
Control)
- 1. (Dual Stability) If the model is perfect,
stability of controller and plant is sufficient
for overall system stability - Proof If GpGm, then
- yGpGI(ys-d)d
- u(ys-d) GI
- Use IMC only on stable systems, unstable systems
can be stabilized by feedback control - Constraints on inputs has no effect on stability
8Properties of IMC (Principles of Internal Model
Control)- continued
- 2. (Prefect Control) If model is perfect and
invertible, and GIGp-1, then yys for any d - Notes (1) This is optimal control.
- (2) Suppose Gp-1 is not
realizable, then it is recommended to factor this
transfer function into two terms
Gp(s)G(s)G-(s) where G(s) is not realizable
contains all time delays and RHP zeros. In this
case the best controller possible is
GI(s)G--1(s), this controller minimizes sum of
the square of the errors in output. - (3) This suggests the design of
F(s) as GIGp-1 F(s) such that GI(s) realizable.
9Example
Which is realizable if we choose
Where ndegree of D(s)-degree of N(s)gt0, ? is
chosen
10Properties of IMC (Principles of Internal Model
Control)- continued
- 3. Zero Offset
- There is no offset if we choose
- GI(0)1/Gm(0)
- Pf
- This means the output will attain the set point
exactly in presence of persistent disturbances
and set-point changes - integral feedback - b. Note that this is true even if the model is
imperfect.
11Properties of IMC (Principles of Internal Model
Control)- continued
- 4. Comparison with Feedback Controller
- If we choose
- Then we get classical output feedback control.
Note that GI(s) in the closed loop transfer
function of the following
12Properties of IMC (Principles of Internal Model
Control)- continued
- Joining this with the IMC block diagram we get
- which reduced to a classical feedback control
d
ys(s)
Gc
Gp
-
13Properties of IMC (Principles of Internal Model
Control)- continued
- Notes
- (a)
- may be looked upon as a poor approximation to
Gm-1(s). For large Kc, this approximation gets
better. - (b) Note the similarity of this structure to
Smith Predictor also approximates the invertible
part of Gm-1(s). - (c) This feedback structure implies use of a
filter
14On-Line Tuning of IMC
- Choose a process model through plant tests
- Choose a filter
to make GI(s) realizable - Decrease ? untill system becomes oscillatory.
Brosilow recommends the following time constant
(where ?umin. filter constant Puperiod of
oscillation) - If ?/Dlt1, then IMC will yield better performance
than a PID controller. If 1lt ?/Dlt2 then IMC and
PID are competitive.
15Computation of Approximate Inverses
- In practice, it is easier to find an approximate
inverse of the process transfer function in the
time domain (using discrete models). - Time Domain View
- Given the past history of inputs to the process
and current estimate of the disturbance, compute
the current and future inputs which will make the
output follow the desired set point. - Limitation in Practice
- The future will be limited to a finite time
horizon (3-4 times time-constant of system. - Attention must be limited to values of output at
discrete times.
16Summary of MPC
- MPC consists of three blocks
- Process model
- A controller (approximate inverse)
- A filter
- Advantages
- Quality of response depends on controller design
- Robustness depends on filter
- Stability is not an issue
- Implementation is straight forward
- On-line tuning can be provided by the filter
time constant
17Computation of Approximate Inverses - Continued
- 3. Values of all future inputs may be limited
to a few in the immediate future. - 4. Problem must be solved every so often (at
discrete sampling times) when new estimates of
disturbance become available. - 5. We must limit the size and velocity of control
input variations. - 6. On-line computations should be kept to a
minimum. - 7. Smooth transfer between auto/manual should be
possible. - 8. It should be recognize constraints on inputs.
- 9. There should be operator adjustable
constant(s) to account for plant/model mismatch.
18Review of least-square problem
- Given a set of equations
- Axbe
- We seed a solution which minimizes
- ?iei2
- The solution is given by
- x(ATA)-1ATb
- We term (ATA)-1AT to be pseudo inverse of matrix A
19A Discrete Input Plant Model
Note that N/D is actually the impulse response of
the system m(z)1 without delay
y(t)
h3
h4
h5
h1
h2
h6
h7
t
20Example G(s)1/(s1)3
global m m1TSPAN0 1 Y00 0
0 Y_realY_sampleT_real T_sample0
Y_model0 for i129 T,Y
ODE45('model_3',TSPAN,Y0) TSPANTSPAN(2),TSPAN(2
)1 Y0(1)Y(end,1) Y0(2)Y(end,2) Y0(3)Y(end,
3) TTT(end) Y_realY_realY(,1)T_realT_re
alT m0 T_sampleT_sample,TT Y_modelY_mod
el,Y0(1) end function dymodel_3(t,y) global
m dy(1)y(2) dy(2)y(3) dy(3)-3y(3)-3y(2)-y(1
)m dydy'
21Example G(s)1/(s1)3 - continued
TSPAN0 1mmzeros(1,29) Y00 0
0 Y_realY_sampleT_real T_sample0
Y_pred0 for i150 mrandn(1,1) for
i128 mm(29-i1)mm(29-i) end
mm(1)m T,Y ODE45('model_3',TSPAN,Y0) TSPAN
TSPAN(2),TSPAN(2)1 Y0(1)Y(end,1) Y0(2)Y(end
,2) Y0(3)Y(end,3) TTT(end) Y_realY_realY(
,1)T_realT_realT ypY_modelmm' Y_predY_
pred,yp T_sampleT_sample,TT end
22A Discrete Input Plant Model
23A Discrete Input Plant Model-Continued
This expresses y in terms of past inputs m i.e.
24Approximate Inversion
Since we cannot make y(t)yd(t) exactly, we pose
the following least square minimization problem
subject to the above process model
No control changes beyond M
25The Solution
- The previous problem can be solved based on a
Quadratic Programming solver or using previous
pseudo-inverse of matrix approach.
26MPC-Servo Control (A Feed-forward Approach) Want
yk1yk2yd
P4 M4
27MPC-Servo Control (A Feed-forward Approach)
-Example
Y_real
Y_sample
time
time
P4 M4
28MPC-Servo Horizon Control (A Feed-forward
Approach) Want yk1yk2yd, but mk1mk2mk3
P4 M2
29MPC-Servo Horizon Control (A Feed-forward
Approach) Want yk1yk2yd, but mk1mk2mk3
Response
Time
P4 M2
30MPC-Regulation Control (A Feedback Approach)
P4 M4
31MPC-Regulation Control (A Feedback Approach)
P4 M2
32MPC-Regulation Control (A Feedback Approach)
Response
Time
M2
M4
33Multi-variable Discrete Input Plant Model
34Examples of Multivariable Control Control of a
Mixing Tank
MVs Flow of Hot Stream CVs Level in the
tank Flow of Cold Stream
Temperature in the tank
35Example- Mixing Tank Problem
Height
Time
36Example- Mixing Tank Problem
Temperature
Time
37Dynamic Matrix Control (DMC)
Response
Response
a4,.
a3
h2
h3
h4,.
a2
h1
a1
Time
Time
Step response
Pulse response
38Dynamic Matrix Control (DMC)- Continued
39Dynamic Matrix Control (DMC)- Continued
disturbance
Effect of the past
40Dynamic Matrix Control (DMC)- Continued
P4 M4
41Dynamic Matrix Control (DMC)- Continued
P4 M2
42Tuning Procedures
- Sampling time (T) stability is not affected by
T. Larger T leads to less variations in m, but
deteriorates system performance in presence of
frequent disturbances - Horizon for m (M) Choosing MP (perfect
control) leads to severe oscillation in m(t).
Reducing M, leads to a more desired response
43Tuning Procedures - Continued
- Input penalty parameter ? Increasing ? makes
system more sluggish and nonzero ? lead to
offset, but can be compensated by adding integral
control algorithm itself. - Optimization horizon, P increasing P gets
better inverse for system of order n, Pgt2n is
generally sufficient.
44Summary - Continued
- Model Predictive Control (MPC) is the major
existed advanced process control in chemical
engineering industrial - The modeling in the MPC is crucial
- The tuning of MPC using M (horizon of
suppression) is the most effective for stability.
All other parameters may also frequently
implement to improve the control quality