Beruflich Dokumente
Kultur Dokumente
y1,sp - u1
+
GC 1 G11(s)
+
+
y1
G21(s)
G12(s)
y2,sp y2
++
u2
GC 2 G22(s)
+
Control Loop 2
MPC Controller
d1
G'd1(s)
u1
+ +
G'11(s)
+
y1
y1,sp G'21(s)
MPC
y2,sp Controller
G'12(s)
u2 y2
+ +
G'22(s)
+
G'd2(s)
Process
d2
Model Predictive Control
Most popular form of multivariable control.
Effectively handles complex sets of
constraints.
Has an LP on top of it so that it controls
against the most profitable set of constraints.
Several types of industrial MPC but DMC is
the most widely used form.
DMC is based on Step Response
Models
Allow the development of empirical
input/output process models.
The coefficients correspond to the step
response behavior of the process
y (ti )
ai
u (t0 )
Example of a SRM
t i u y(t) ai
0 0 1 0 0
1 1 0 0 0
2 2 0 0.63 0.63
3 3 0 0.87 0.87
4 4 0 0.95 0.95
5 5 0 0.98 0.98
6 6 0 0.99 0.99
7 7 0 1.00 1.00
8 8 0 1.00 1.00
Open-Loop Step Test for Thermal
Mixer
51
Temperature (C)
50
49
48
0 20 40 60 80 100
Time (s)
SRM for the Thermal Mixer (u=0.05)
i ti yi y i ai
0 5 50.00 0.0 0.0
1 10 49.77 -0.23 -4.68
2 15 49.35 -0.65 -13.0
3 20 49.08 -0.92 -18.4
4 25 48.94 -1.06 -21.2
5 30 48.87 -1.13 -22.6
6 35 48.84 -1.16 -23.2
7 40 48.83 -1.17 -23.5
8 45 48.82 -1.18 -23.7
9 50 48.82 -1.18 -23.7
Example of SRM Applied to a
Process with Complex Dynamics
2.5
a8
2.3
a6
a7
2.1 a5
a1 a2
y
1.9
a4
1.7
a3
1.5
0 100 200 300 400
Time
SRM: [0 0 -0.3 -0.1 0.05 0.1 0.2 0.3 . . .]
Complex Dynamics
An integrating process (e.g., a level) is
modeled the same except that the Tss is
based on attaining a constant slope (i.e., a
constant ramp rate).
An integrating variable is referred to as a
ramp variable.
SRM for Ramp Function
y4
y3
y2
y1
Ts
y0
Tss
u=1
Time
Using SRM to Calculate y(t)
Given: SRM: [0 0.4 0.8 0.9 1.0]
y0=5 u=5 Ts=20 sec
Solve for y(t):
y = y0 + u SRM
y1=5 + 50 = 5; y2 = 5 + 50.4 = 7;
y3 = 5 +50.8 = 9; y4 = 5 + 5.9 = 9.5
y5 = 5 + 51 = 10 or in vector form
y = [5 7 9 9.5 10 10 10 ]
y(20 s)=5; y(40 s)=7; y(60 s)=9; y(80 s)=9.5
y(100 s)=10; y(120 s)=10; y(140 s)=10 ...
Class Exercise
50.2
50 T Out
49.8
49.6
CV
49.4
49.2 MPC Open-
49 Loop Model
48.8 Output
48.6
0 200 400 600
Time (sec)
Comparison for the Same u
(-10%)
Controlled Variable
51.5
51 T Out
CV
50.5
MPC Open-Loop
50 Model Output
49.5
0 200 400 600
Time (sec)
Demonstration Conclusions
MPC model agrees closely for the same step
input change, but shows significant
mismatch for a different size of input
change due to process nonlinearity.
Nonlinear Effects
This SRM will not accurately represent
negative changes in the MV or different
magnitude MV changes due to process
nonlinearity.
Therefore, a better way to develop a SRM is
to make a number of MV changes with
different magnitude and directions and
average the results to get the SRM.
SRMs for Different Size us
Time F1 T Out T1
MPC Open-Loop Model Output
F1 S.P.
0 0.5 50 50 25 0.5
1 0.5 50 50 25 0.5
2 0.5 50 50 25 0.5
3 0.5 50 50 25 0.5
4 0.5 50 50 25 0.5
5 0.5 50 50 25 0.5
6 0.514376 49.99804 50 25 0.55
7 0.524619 49.98688 49.96629 25 0.55
8 0.531917 49.96313 49.93257 25 0.55
9 0.537116 49.92698 49.89886 25 0.55
Using Average ais for u=-10%
Controlled Variable
50.2
50
T Out
49.8
CV
49.6
49.4 MPC Open-
49.2 Loop Model
0 200 400 600 Output
Time (sec)
Relation to MPC Model
Identification
Combined
Response
u1
u2
u2
u
u1
Time
Superposition of Two Step Input
Changes
u1 Combined
Response
u2
u1 u2
u
Time
Equation Form for Two
Sequential Input Changes
Consider the the response of a process to two step
input changes separately
u0 is applied at t 0 u1 is applied at t Ts
y1 y0 u0 a1
y2 y0 u0 a2 y2 y0 u1a1
y3 y0 u0 a3 y3 y0 u1a2
y4 y0 u0 a4 y4 y0 u1a3
. .
. .
Combined Response for Two
Input Changes
Using superposition to calculate
the combined response
y1 y0 u0 a1
y2 y0 u0 a2 u1a1
y3 y0 u0 a3 u1a2
y4 y0 u0 a4 u1a3
.
.
Combined Response for a Series
of 4 Input Changes
Using superposition to calculate
the combined response
y1 y0 u0 a1
y2 y0 u0 a2 u1a1
y3 y0 u0 a3 u1a2 u2 a1
y4 y0 u0 a4 u1a3 u2 a2 u3a1
y5 y0 u0 a5 u1a4 u2 a3 u3a2 u4 a1
Matrix Form for Combined Response
for a Series of 4 Input Changes
y1 y0 a1 0 0 0
y y a a1 0 0
2 0 2 u0
y3 y0 a3 a2 a1 0
u1
y4 y0 a4 a3 a2 a1
u2
y y a a4 a3 a2
5 0
4
u3
y6 y0 a4 a4 a4 a3
y y a a4 a4 a4
7 0 4
The Dynamic Matrix
The Dynamic Matrix
a1 0 0 0 determines the dynamic
a a1 0 0 response of the process
2 to a series of input
a3 a2 a1 0 changes, nc, for a
prediction horizon of np
A a4 a3 a2 a1 steps into the future.
The dynamic Matrix is
a a4 a3 a2 constructed from the
4
coefficients of the SRM
a4 a4 a4 a3 A is npnc; SRM is m
a (this case has 4 inputs
4 a4 a4 a4 and 7 output predictions)
Zeros in Dynamic Matrix
Where do they come from?
Consider the first row: y1 is cannot be
affected by u1, u2, and u3 because y1 is
measured before u1, u2, and u3 are
applied.
Likewise, y2 is cannot be affected by u2
and u3
The Matrix Form of the
Generalized Model Equation
y1 y0
y y
2 0
y = Au where y .
.
.
Dynamic Matrix Example
Prediction Vector
Previous Inputs Affect Future
Response of the Process
Future Inputs
u
Past Inputs
-10 -5 0 5 10
Time
Previous Inputs Affect Future
Response of the Process
Past Behavior
Setpoint
y
Future Prediction
-10 -5 0 5 10
Time
Prediction Vector
y = y + Au
P
y = y + Au + e
P
DMC Controller
Development of DMC Control
Law
i
DMC Control Law
Define Ei ysp y e i
P
( Ei Aui ) 2
Past Behavior
Setpoint
y
Future Prediction
-10 -5 0 5 10
Time
Moving Horizon Controller
Even though the DMC controller calculates
a series of future moves, only the first of the
calculated moves is actually implemented.
The next time the controller is called (Ts
later), a new series of moves is calculated,
but only the first is applied.
If the SRM were perfect, the subsequent set
of first moves would be equal to the first
series of moves calculated by the DMC
controller.
SISO MPC Controller
Implementation Details
Implementation Details
Choose Ts based on when new information
is available on the CV. E.g., analyzer update.
For temperature sensor, use Ts=10-15 s.
Model horizon: m= Tss / Ts (normally set
m=60-90 coefficients. Always set m>30.
Control horizon: nc=m
Prediction horizon: np=m+nc
Controller Implementation
Example
Consider a SISO DMC temperature control
loop that has an open loop time to steady-
state equal to 20 minutes.
Applying the previous equations:
Ts 10s
Tss 20 60 s
m 120
Ts 10s
n 1.5m 180
Class Example
Consider a SISO DMC controller applied to
the overhead product of a C3 splitter. The
overhead composition analyzer update
every 10 min and the time to steady-state
for the overhead composition for a reflux
flow rate change is 7 hours. Determine m,
np and nc for this controller.
Solution
Ts 10 min
7 60 min
m 42
10 min
n 1.5m 63
SISO MPC Controller
Tuning
DMC Controller Tuning
56
55
54
53 T Out
CV
52 T Out S.P.
51
50
49
0 50 100 150 200
Time (sec)
Tmixer DMC Tuning Example
Q=100
Controlled Variable
56
55
54
53 T Out
CV
52 T Out S.P.
51
50
49
0 50 100 150 200
Time (sec)
Tmixer DMC Tuning Example
Q=60
Controlled Variable
56
55
54
53 T Out
CV
52 T Out S.P.
51
50
49
0 50 100 150 200
Time (sec)
Tmixer DMC Tuning Example
Q=30
Controlled Variable
58
56
54 T Out
CV
52 T Out S.P.
50
48
0 50 100 150 200
Time (sec)
Tmixer DMC Tuning Example
Q=20
Controlled Variable
58
56
54 T Out
CV
52 T Out S.P.
50
48
0 50 100 150 200
Time (sec)
Tmixer DMC Tuning Example
Q=10
Controlled Variable
60
58
56
T Out
CV
54
T Out S.P.
52
50
48
0 50 100 150 200
Time (sec)
Controller Tuning
Reliability versus performance.
Meeting the overall process objectives.
Checking the Controller Tuning
for a Setpoint Changes in the
Opposite Direction Q=30
Controlled Variable
51
50
49
48 T Out
CV
47 T Out S.P.
46
45
44
0 50 100 150 200
Time (sec)
Class Exercise
SISO DMC Tuning
Testing
Controller Testing
52
51.5
51 T Out
CV
52
51.5
51 T Out
CV
52
51.5
51 T Out
CV
ys (ti ) y p (ti )
i 1
52
51.5
51 T Out
CV
52
51.5
51 T Out
CV
52
51.5
51 T Out
CV
u1
u
2
.
u
.
.
u j
An Example of a Partitioned
Control Vector
1 3
u1 u 2
2 4
1
2
then u
3
4
Control Law for MIMO DMC
Controller
1
u [ A W A] A W E
T 2 T 2
Constraint Control
Constraint Control
With DMC, constraints are treated as CVs.
As different combinations of constraints become
active, different weighting factors, wi, are used
which are based on the equal concern errors.
Therefore, as different combinations of active
constraints are encountered, the wis automatically
determine the relative importance of each.
The DMC controller determines the optimal control
action based on considering that the wis change
along the entire path to the setpoints. Therefore, the
entire control law must be solved at each control
interval.
MIMO DMC Control Law
1
u [ A W A] A W E
T 2 T 2
ys (ti ) y p (ti )
i 1
Economic LP
Economic LP
Feasible
Region
Optimum
Vertex
Economic LP and PID Control
Performance
Constraints
Ope rator
PID
Pe rform ance
Optimum
Vertex
Economic LP and MPC Control
Performance
Constraints
Control
Region
for MPC
Optimum
Vertex
MPC Control Performance
(i.e., size of control circle)
Depends on accuracy of models (e.g.,
process nonlinearity, type and size of
unmeasured disturbances, changes in the
process and operating conditions).
Depends on the performance of regulatory
controls and sensors.
Can also depend on the control MPC
technology used.
Economic LP
Consider the case with 5 MVs and 10 control
objectives (i.e., upper and lower limits on CVs,
upper and lower limits on MVs, and upper rate of
change limit on MVs): because there are 5 degrees-
of-freedom (i.e., one for each MV) the LP will
determine which 5 constraints to simultaneously
operate against.
The 5 constraints, in this case, become the setpoints
for the MPC controller.
The LP is applied each control interval along with
the MPC controller.
The LP and the MPC Controller
Both use the steady-state gains from the SRM.
The LP determines the setpoints for the controller
from the economic parameters and the process
gains.
The controller drives the process to the most
profitable set of constraints, i.e., keeps the process
making the most profit even though the most
profitable set of process constraints changes with
time parameters.
Balanced ramp variables are constraints for the LP.
MIMO DMC Control
Large-Scale Applications
Size of a Typical Large MPC
Application
MVs: 40
CVs: 60
Constraints: 75-100
There are some companies that have even
larger applications.
MPC Project Organization
MPC Project Organization
Understand the process
Set the scope of the MPC controller
Choose the control configuration
Design the Plant Test
Conduct the Pretest
Conduct the Plant Test and collect the data
Analyze data and determine MPC model
Tune the controller
Commission the controller
Post audit
MPC Project Organization
PT LC
L
z AT
AT y
MV's: L and S
S DV: z
LC
CV's: y and x
x
AT
Ex. Roughed-out Gain Matrix
CV's
y x
L - +
Inputs
S + -
z + -
MPC Project Organization
Post audit
Post audit
Collect post commissioning data for the key
CVs and compare to pre-project data.
Ensure that the standard deviations of the
key CVs have decreased.
Evaluate whether the upper and lower limits
on the MVs are still set correctly.
Ensure that the controller is running the
process at the economically best set of
constraints most of the time.
Advantages of MPC
Combines multivariable constraint control
with process optimization.
A generic approach that can be applied to a
wide range of processes.
Allows for more systematic controller
maintenance.
Depends on the particular process
MPC Offers the Most Significant
Advantages
For high volume processes, such as refineries and
high volume chemical intermediate plants.
For processes with unusual process dynamics.
For processes with significant economic benefit to
operated closer to optimal constraints.
For processes that have different active constraints
depending on product grade, changes in product
values, summer/winter operation, or day/night
operation.
For processes that it is important to have smooth
transitions to new operating targets.
Application Example