Sie sind auf Seite 1von 190

Chapter 16

Model Predictive Control


Single Loop Controllers
Control Loop 1

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

Given: SRM: [0 0.4 0.8 0.9 1.0]


y0=5 u=-2 Ts=20 sec
Solve for y(t):
Solution to Class Exercise

Given: SRM: [0 0.4 0.8 0.9 1.0]


y0=5 u=-2 Ts=20 sec
Solve for y(t):
y = y0 + u SRM
y1=5 + -20 = 5; y2 = 5 + -20.4 = 4.2;
y3 = 5 +-20.8 = 3.4; y4 = 5 + -2.9 =3.2
y5 = 5 + -21 = 3 or in vector form
y = [5 4.2 3.4 3.2 3 3 3 ]
Calculating SRM from Step
Response Data

Remember previous equation:


y = y0 + u SRM
Solving for SRM yields:
SRM = (y-y0)/u
Example of the Calculation of
SRM from Step Response Data

Time (s) u(t) yi ai


0 1000 lb/h 351 F 0
10 0 352 F 0.001 F-h/lb
20 0 355 F 0.004 F-h/lb
30 0 356 F 0.005 F-h/lb
40 0 357 F 0.006 F-h/lb
50 0 357 F 0.006 F-h/lb
Class Exercise for the
Calculation of the SRM from
Step Response Data

Time (s) u(t) yi ai


0 500 lb/h 55 psig
10 0 53 psig
20 0 48 psig
30 0 46 psig
40 0 45 psig
50 0 45 psig
Class Exercise for the
Calculation of the SRM from
Step Response Data

Time (s) u(t) yi ai


0 500 lb/h 55 psig 0
10 0 53 psig -.004 psig-h/lb
20 0 48 psig -.014 psig-h/lb
30 0 46 psig -.018 psig-h/lb
40 0 45 psig -0.02 psig-h/lb
50 0 45 psig -0.02 psig-h/lb
Simulation Demonstration
A thermal mixing process mixes two streams
with different temperatures (25C and 75C)
to produce a product (about 50C).
Consider a 10% increase (0.05 kg/s) increase
in the flow rate of colder stream.
Develop SRM from step response.
Step Test Result and SRM

Time (s) Outlet Temperature (C) SRM Coefficients (C-s/kg)


5 50
12 49.77 -4.68
19 49.35 -13.0
26 49.08 -18.4
33 48.94 -21.2
40 48.87 -22.6
47 48.84 -23.2
54 48.82 -23.5
61 48.816 -23.7
68 48.813 -23.7
75 48.811 -23.8
Comparison for the Same u
(+10%)
Controlled Variable

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

+10% +5% -5% -10% Average


u 0.05 0.025 -0.025 -0.05 -
a1 -4.68 -4.70 -4.73 -4.75 -4.72
a2 -13.0 -13.2 -13.4 -13.5 -13.3
a3 -18.4 -18.7 -19.2 -19.5 -19.0
a4 -21.2 -21.6 -22.4 -22.8 -22.0
a5 -22.6 -23.0 -24.0 -24.5 -23.3
a6 -23.2 -23.7 -24.8 -25.4 -24.3
a7 -23.5 -24.1 -25.2 -25.8 -24.7
a8 -23.7 -24.2 -25.4 -26.1 -24.9
a9 -23.7 -24.3 -25.5 -26.2 -24.9
a10 -23.8 -24.4 -25.6 -26.3 -25.0
Another Approach

Use the average ais


Using Average ais for u=+10%

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%

Time F1 T Out MPC Open-Loop


T1 Model
F1 S.P.
Output
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.485624 50.00196 50 25 0.45
7 0.475381 50.01314 50.03371 25 0.45
Using Average ais for u=+5%

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

Developing SRMs that represent an


average response is the basis of good
MPC models.
Class Exercise
Using the composition mixer simulator
(CMIXER), use a +5% step input change
(0.025 kg/min) to generate a SRM for this
process
First, implement the step input change
Next, determine the model interval
Then, calculate the SRM coefficients
Finally, compare simulator result to MPC
model prediction for u (+10% to -10%)
SRM Summary
SRMs represent the dynamic behavior of a
dependent variable (output variable) for a
process for a unit step change in an input.
SRMs are empirical models that are
flexible enough to model complex dynamics
SRMs are linear approximations of process
behavior and can be estimated using step
responses for the process.
SISO MPC Controller

Application of SRM for a Series of


Input Changes
A Series of Input Changes
Definition of the SRM is based on a single
step input change.
But feedback control requires a large
number of changes to the input variables.
To use a SRM to predict the output behavior
for a series of input changes, linear
superposition is assumed, i.e., the process
response is equal to the sum of the
individual step responses.
Superposition of Two Step Input
Changes

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

SRM: (0.1 0.5 0.9 1.0) nc m; n p 1.5m


0.1 0 0 0
0.5 0.1 0 0

0.9 0.5 0.1 0
A
1.0 0.9 0.5 0.1
1.0 1.0 0.9 0.5

1.0 1.0 1.0 0.9
Class Exercise

SRM: (0.3 1.0)


A is a 3 by 3 matrix (i.e., n p =1.5m
and nc m)
Solution to Class Exercise

SRM: (0.3 1.0)


0.3 0

A 1.0 0.3
1.0 1.0
SISO MPC Controller

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

The prediction vector, yP, contains the


combined effect of the previous input
changes on the future values of the output
variable.
The prediction vector is calculated from the
product of the previous input changes and
the prediction matrix, which is constructed
using the coefficients of the SRM.
Process Model
The future values of the output variable are
equal to the sum of the contribution from
previous inputs (prediction vector) and the
contribution from future change in the input
variable:

y = y + Au
P

where u is the vector of input changes


Process Model
In order to correct for the mismatch
between the predicted value of y at the
current time and the measured value, a
correction vector, e, is added to the process
model equation.

y = y + Au + e
P

where e y(t0 ) y (t0 )


P
Correction for Mismatch in
Ramp Variable
The error between the predicted value of
y(t0) and the measured value is applied as
before: e= y(t0) - yP(t0)
An unmeasured disturbance can affect the
slope of the modeled SRM
Therefore, an additional tuning factor for
ramp variables is the rotation factor (RF),
which is the fraction of the mismatch e that
is used to change the slope of the SRM of
the ramp variable. Slopenew=Slopeold+RFe
SISO MPC Controller

DMC Controller
Development of DMC Control
Law

Minimize the error from setpoint:


2
Min ( ysp yi )
i
Substituting for yi
( ysp y Aui e )
i
P 2

i
DMC Control Law

Define Ei ysp y e i
P

( Ei Aui ) 2

DMC Control Law: u = (A A) A ET -1 T


Analysis of DMC Controller
(ATA)-1AT is a constant matrix that is
determined explicitly from the coefficients
of the SRM.
If you double the number of coefficients in
the SRM, you will increase the number of
terms in the dynamic matrix by a factor of 4
E takes into account changes in the setpoint,
the influence of previous inputs, and the
correction for model mismatch.
A full set of future moves are determine by
this control law at each control interval.
Moving Horizon Controller

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

Previous DMC control law results in


aggressive control because it is based on
minimizing the error from setpoint without
regard to changes in the MV.
(ATA)-1 is usually ill-conditioned due to
normal levels of process/model mismatch.
These problems can be overcome by adding
a diagonal matrix, Q, to the Dynamic
Matrix, A.
DMC Controller with Move
Suppression
q 0 0 ... 0
0 q 0 ... 0

Q= 0 0 q ... 0 q is the move suppression factor

...
0 0 0 ... q
Q is a diagonal matrix (nc nc )
The Dynamic Matrix is augmented with Q,
A
A
Q
The Dynamic Matrix with the
Move Suppression Factor Added
a1 0 0
a a1 0
2
a3 a2 a1

Example Dynamic Matrix: A a3 a3 a2
a a3 a3
3
q 0 0
0 q 0

0 0 q
Move Suppression
A u E
e1
e
a1 0 0 2
a a1 0 e3
Minimize 2
a3 a2 a1 e4
Error a u1
3
a3 a2 u e5
a3 a3 a3 2 e6
u3
Minimize q 0 0 e7

0 q 0 0
Move
Size 0 0 q 0
0
DMC Control Law

DMC control law remains the same as before


except the A now contains Q.

DMC Control Law: u = (A A) A E


T -1 T
Effect of Move Suppression
Factor
The larger q, the greater the penalty for
MV moves. The smaller q, the greater the
penalty for errors from setpoint.
Tmixer DMC Tuning Example
Q=300
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=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

Tune the DMC controller for the CMixer


SISO MPC Controller

Testing
Controller Testing

Use disturbance upsets to test controller


performance
Controller Disturbance Rejection
Q=60
Controlled Variable

52
51.5
51 T Out
CV

50.5 T Out S.P.


50
49.5
0 50 100 150 200
Time (sec)
Controller Disturbance Rejection
Q=30
Controlled Variable

52
51.5
51 T Out
CV

50.5 T Out S.P.


50
49.5
0 50 100 150 200
Time (sec)
Controller Disturbance Rejection
Q=10
Controlled Variable

52
51.5
51 T Out
CV

50.5 T Out S.P.


50
49.5
0 50 100 150 200
Time (sec)
Class Exercise
Testing the Controller Tuning

Using disturbance upset tests, test the


performance of your tuned DMC controller.
Model Identification:
The Least Squares Solution
N 2

ys (ti ) y p (ti )
i 1

ys (ti ) is the measured value of the CV at time ti


y p (ti ) is the predicted value of the CV from the
SRM at time ti
Model ID: adjust the coefficients of the SRM
until minimized (results in averaged
SRM coeficients if enough tests are used)
Controller Disturbance Rejection
Ts=7, Q=30
Controlled Variable

52
51.5
51 T Out
CV

50.5 T Out S.P.


50
49.5
0 50 100 150 200
Time (sec)
What if the SRM become worse?
Ts=11; Q=30
Controlled Variable

52
51.5
51 T Out
CV

50.5 T Out S.P.


50
49.5
0 50 100 150 200
Time (sec)
What if the SRM become worse?
Ts=15; Q=30
Controlled Variable

52
51.5
51 T Out
CV

50.5 T Out S.P.


50
49.5
0 50 100 150 200
Time (sec)
SRM Model Mismatch

The controller still works in this case, but


the performance is penalized.
MIMO DMC Control
MIMO DMC Control
Extension of SISO to MIMO
Constraint control
Economic LP
Large-scale applications
MIMO DMC Control

Extension of DMC to MIMO


processes
Dynamic Matrix for a MIMO
Process
A11 A12 ... A1j A lm is the SISO
Dynamic Matrix
A 21 A 22 ... A 2j
. th
for the l CV
A
and the m MV th
.
. with the move
suppression factor
Ak1 Ak2 ... Akj
added
Recall
The SISO Dynamic Matrix
a1 0 0
a a1 0
2
a3 a2 a1

Example Dynamic Matrix: A a3 a3 a2
a a3 a3
3
q 0 0
0 q 0

0 0 q
Example of a Partitioned
Dynamic Matrix
1 2 5 6
A11 A12
3 4 7 8
9 10 13 14
A 21 A 22
11 12 15 16
1 2 5 6
A11 A12 3 4 7 8
A

A 22 9 10 13 14
A 21

11 12 15 16
Dynamic Matrix for a MIMO
Process
A11 A12 ... A1j

A 21 A 22 ... A 2j
. A lm is the SISO
A
. Dynamic Matrix
. th
for the l CV
Ak1 Ak2 ... Akj and the m MV th
A Partitioned Control Vector

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

W is a partitioned diagonal matrix, which


contains matrices, Wi . Wi is a diagonal
matrix, which contains wi on its diagonal.
wi is the relative weighting factor for
the i -th CV.
Relative Weighting Factor
The relative weighting factor, wi , allows the
application control engineer to quantitatively
rank the importance of each CV and constraint.
For each of the constraints and CVs, the
control engineer must determine how large a
violation of the constraint or deviation from
setpoint requires drastic action to maintain
reliable operation (Equal Concern Errors).
1
wi
(Equal Concern Error)i
Equal Concern Errors

ECEs are based on process experience.


Consider a distillation column
0.5 psi above the differential pressure limit of 2
psi will cause drastic action to prevent flooding.
1% impurity levels above the specified impurity
levels in the products will require rerunning the
product.
Reboiler temperatures greater than 10F above
the reboiler temperature constraint will result in
excessive fouling of the reboiler.
Feedforward Variables
Measured disturbances should be modeled
as inputs for the MPC controller to reduce
the effect of those disturbances on the CV.
FF variables are treated as inputs that are
not manipulated.
MIMO DMC Control

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

W is a partitioned diagonal matrix, which


contains matrices, Wi . Wi is a diagonal
matrix, which contains wi on its diagonal.
wi is the relative weighting factor for
the i -th CV.
MIMO DMC Control

MPC Model Identification


MPC Model ID
N 2

ys (ti ) y p (ti )
i 1

ys (ti ) is the measured value of the CV at time ti


y p (ti ) is the predicted value of the CV from the
SRM's at time ti
Model ID: adjust the coefficients of the SRM's
until minimized
MIMO Model Identification

For DMC, impulse models are used for


identification so that bad data can be
sliced out of the training data.
Sources of bad data: analyzer failure, data
not recorded, process not operated in
normal fashion (by-pass opened, atypical
feed to the process, saturated regulatory
controls, etc.), and large unmeasured
disturbance to the process.
Model Identification
SRMs have the flexibility to model a full
range of process dynamics (e.g., recycle
systems).
MPC controllers that use preset functional
forms for models (e.g., state-space models
or a set of preset transfer function models)
can be inferior to SRM based models in
certain cases.
MIMO DMC Control

Economic LP
Economic LP

The LP combines process optimization with


the DMC controller.
The LP is based on economic parameters
(e.g., product values, energy costs, etc.) and
the steady-state gains of the process.
The last term in each SRM is used to
provide the necessary gain information;
therefore, the LP is consistent with the MPC
controller.
Example of an LP
Constraints

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

Understand the process


Understand the Process
Process understanding is the single most
important issue for a successful MPC
application.
Stated another way, if you do not fully
understand the process and its preferred
operation, it is highly unlikely that you will
be able to develop a successful MPC
application.
How to Develop Process
Understanding
Study PFDs
Study P&IDs
Talk to the operators (how it really works!)
Talk to plant engineers (how they want it to work)
Interview plant economic planners (how much its
worth).
If available, run steady-state process simulator
Read the plant operating manuals
Spend time at the process on graveyards.
Be able to answer the following
questions
What is the purpose of the plant?
Where does the feed come from?
Where do the product go?
How much flexibility is there for feed
supply and product demand?
How do the seasons affect the operation?
Also, feed supply and product demand?
Be able to answer the following
questions
What are the 3 or 4 most important
constraints that operators worry about?
Where is energy used and how expensive is
it?
What are the product specifications?
Are there environmental or tax issues that
affect plant operations?
MPC Project Organization

Set the scope of the MPC controller


Set the Scope of the Project
(Very Important Step)
What part of the plant should be included in
the controller? That is, how much of the
plant should be included in the MPC
controller to meet the project objectives?
To answer this question, you must discuss
the objectives of the project with the
operations personnel, the technical staff for
that portion of the plant, and the scheduling
people. Only then can you be sure that you
are solving the correct problem.
MPC Project Organization

Select the control configuration


MPC Configuration Selection
Which PID loops do you open (i.e., turn
over to MPC controller) and which do you
leave closed. That is, if you leave a PID
loop closed, the MPC controller sets the
PID loop setpoint (e.g., flow controller).
What are the MVs for the distillation
columns in the process? Should the MPC
controller be responsible for accumulator or
reboiler level control?
MPC Configuration Selection

From an overall point of view, what are the


MVs and the CVs for the MPC controller?
A challenging problem that requires process
knowledge and control experience while
keeping focused on the overall process
objectives.
Reasons for Leaving a PID Loop
Closed
The PID loop may be more effective in
eliminating certain disturbance due to the
higher frequency of application. For
example, flow control loops. In addition,
certain pressure, level, and temperature PID
loops should be left closed.
Situations for which a PID loop
should be opened
Loops with very long dynamic and/or large
deadtime
Process lines with two control valves in
series.
Certain levels for which allowing the MPC
controller control the level adds important
flexibility to better meet the primary
objectives of the process. For example, it
can provide more effective decoupling.
Use Good Control Engineering
Ensure that the MVs have a direct and
immediate affect on the CVs.
Use computed MVs to reject certain
disturbances, e.g., use internal reflux control to
reduce the effect of rain storms or computed heat
input for a pumparound.
Use inferential measurements to reduce the
effect of deadtime (e.g., inferential temp control)
Use CV transformations that linearize the overall
response of the process.
Variable Transformations

For a control valve, P=KFlow2


For high purity distillation columns, use log
transformed compositions: x=log(x)
Use different linear models depending on
the operating range.
MPC Project Organization

Design the Plant Test


Plant Test Guidelines
Make from 5 to 15 step tests for each MV
The MV changes should be as random as
possible to prevent correlated data.
MV moves should be as large as possible
but not so large that it upsets the process
(e.g., 1-10%).
For each MV, make a change after 1tp, 2tp,
3tp, 4tp, and 5tp, where tp is Tss/4.
Above all, remember the product specs and
the process constraints
Develop the Testing Plan
Identify all the MVs you plan to move.
Tabulate the following data for each MV:
Tag number of the MV and physical description
Nominal value
Range of move sizes
Make a proposed testing sequence and
indicate when each MV is moved and by
how much.
Discuss the MV move sizes with operations.
Remember the spec and constraints.
Choose Sampling Period
Small sample period: high time resolution but
increased size of data set. In general, sample
as new information become available.
For fast responding processes, sample every
few seconds.
For slow processes, sample every 5 min
Look at the smallest expected Tss.
Estimate sample period as Tss/50
Compare with sensor dynamics
Make MV Changes one MV at a Time
to Generate Uncorrelated Results
Develop a Roughed-out Gain
Matrix
Using your process knowledge, determine
whether the steady-state process gain is
positive, negative, or zero for each input
(MV & DV)/ output (CV) pair.
Using + for positive, - for negative, or 0 for
zero, construct the roughed-out gain matrix.
Inputs are listed vertically while outputs are
listed horizontally.
Roughed-out Gain Matrix Ex.

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

Conduct the Pretest


Pretest
Check all the sensors, control valves and regulatory
control loops for proper operation.
Ensure that the process equipment is in proper repair.
Check material and energy balances on the unit.
Make sure that all the major pieces of equipment are
in operation. Check the feed to the unit.
Then, apply step input changes for each MV and
compare to your roughed out gain matrix.
Reconcile any deviations from what you expected
(e.g., roughed out gain matrix, dynamic response,
etc.). This will enhance your process understanding.
MPC Project Organization

Conduct the Plant Test and collect the


data
Testing in Optimal Operating
Mode
Because you will want your plant to operate
effectively at its optimum operating conditions,
you should, if possible, test you plant near the
optimum operating conditions to reduce the
effects of process/model mismatch.
Therefore, you will need to determine the
optimum operating conditions for your plant,
e.g., discuss with an experienced plant engineer
or use a nonlinear process optimizer.
Plant Test Overview
The plant test is the most important step
in an MPC project because if the MPC
models do not agree with the process,
controller reliability and performance will
be poor.
If the process changes (e.g., different
equipment configuration, different feed,
different regulatory controller tuning, etc.),
mismatch between the MPC model and the
process will result, affecting controller
performance.
Plant Test Check List

Meet (5-10 min) with the operators at the


start of each shift and explain what you are
doing.
Make sure that each MV move is made on
time, in the proper direction, and by the
correct amount.
Make sure that a technical person is
observing entire testing period (24-7).
Plant Test Check List
Make real-time plots of the data and explain
all the behavior that you see.
Identify abnormal periods and make notes:
significant unmeasured disturbances,
instrument failures, utility outages. The
MPC model should not be trained using
data collected during these periods.
Talk to the operators about the process.
Buy pizza, donuts, ice cream and barbeque
for the operators
Using Roughed-out Gain Matrix

During the testing phase, make sure that the


plant results agree with your roughed-out
gain matrix.
If not, you will need to explain the
difference. That is, your process knowledge
needs to be improved a bit or something is
not working properly (e.g., an analyzer is
off-line)
Unmeasured Disturbances
Training an MPC controller on data
collected during periods with unmeasured
disturbances will reduce the accuracy of
your model and reduce the effectiveness of
the overall project.
Some unmeasured disturbances are
inevitable, but you must strive to keep them
to an absolute minimum.
Examples of Unmeasured
Disturbances to be Avoided
Back flushing a condensor
Changes in by-pass streams
Product grade changes
Changes in the controller settings for the
regulatory controllers.
Any change in the process operating
conditions not modeled in the controller
or process equipment changes
Identified Periods with
Unmeasured Disturbances

Slice out the data from those periods so that


this data is not used to train the MPC
model; therefore, the identified model will
not be corrupted.
MPC Project Organization

Analyze the data and develop the


MPC model
Obtain the MPC Process Models

Use the accepted plant test data with the


MPC model identification software to
develop each of the input/output SRM
models.
Evaluate Process Models
For each input/output pair, plot the SRM on
a small graph.
Arrange the SRM models into a matrix
similar to the roughed-out gain matrix.
Review the results to ensure that you have
models that make sense.
Use the statistical tools from the MPC
model ID software to evaluate each SRM
Evaluate Process Models
Examine the difference between the plant
test data and your models (residual).
Plot the residual for positive and negative
MV changes. This will help identify the
degree of process nonlinearity. Also, it will
help evaluate CV transformations that
behave more linearly.
Plant Economics
The LP will require incremental costs (feed
costs, utility costs) and incremental
revenues (product values)
For previous distillation example, you will
need the incremental cost of steam ($/lb),
the incremental cost of feed ($/lb), and the
incremental value of both products ($/lb).
MPC Project Organization

Tune the controller


General Approach to Tuning
Use the SRMs of the process (MPC model)
off-line as the process to develop the
preliminary settings for the controller.
Three areas that you need to get right:
Economics
Constraints
Dynamics
Testing Economics
Run plant/controller simulations (off-line)
with different combinations of constraints to
ensure that the controller pushes the plant in
the correct direction.
Run test cases to see which LP constraints
are operative.
Constraints
Check the equal concern errors for each
constraint to ensure that the proper relative
weighting factors for each combination of
active constraints is used. That is, when
constraint 1 and 5 are active, what is the
relative importance of the CVs and
constraints.
Also, use the plant/controller simulation
(off-line) to test the relative weighting.
Dynamics
Select the move suppression factors for
each MV using off-line simulations of the
plant. Run the simulations a number of
times for setpoint changes and unmeasured
disturbances to get the MSFs right.
Operators are a good source for letting you
know how much the MVs should move in
certain situations and how fast the process
should move to CVs, but remember that
they are most familiar with how the plant
used to operate.
Operator Training
In some states, it is a legal requirement.
Typically operators receive one to two hours
of training with MPC.
Nevertheless, better operator training
increases your chance for success.
Watchdog Timer
The controller should run every minute 24-7
Otherwise, a DCS alarm should sound.
The most common approach is to use a
watchdog timer (a small program running
on the DCS) to communicate with the MPC
controller. If the watchdog fails to receive a
healthy response from the controller after an
appropriate period of time, the watchdog
forces each MV into a fallback (shed)
position and writes an alarm to the operator.
MPC Project Organization

Commission the controller


General Approach
Now it is time to install the controller in the
closed loop in the process.
Since the controller will directly affect the
plant operation, it is essential to proceed
methodically and with caution.
Use a checklist and be observant
Commissioning Checklist
Make sure that the operators have been
trained
Install control software, database, and other
real-time components.
Check controller database
Control CVs, DVs, and MVs match raw DCS
inputs exactly
Controller models, tuning parameters, etc.
match off-line versions exactly
Commissioning Checklist (cont.)
Turning controller on the prediction mode:
Each MV configured correctly in the DCS?
Correct shed mode for each MV?
MVs out of cascade (controller cannot change)?
Controller turned on the prediction mode?
The size of the calculated MV moves make
sense?
The CV predictions make sense?
Commissioning Checklist (cont.)
First-time MV check
Use conservative controller settings
Reduce difference between upper and lower
limits on MV (or rate limits)
Make sure controller is running
Put MVs into cascade one at a time.
Ensure that the calculated MV change is
applied to DCS setpoint.
Commissioning Checklist (cont.)
Close the loop
Ensure that the controller is running
Turn ON the controller master switch
With MVs clamped, put one or two MVs into
cascade
Relax the MV limits somewhat and check for
good controller behavior
Add more MVs gradually, ensuring good
control performance.
Final Checks
Ensure that the standard deviations of the
CVs decrease and that the MVs are not
moving around too much.
Ensure that the LP is driving the process in
the correct direction.
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

C3 splitter in an ethylene plant (reboiler duty


is free; therefore, run at maximum reboiler
duty and apply single-ended control.)
DCS 70% of cost 35% of inc. benefit
AdPID 10% of cost 60% of inc. benefit
MPC 10% of cost 3% of inc. benefit
RTO 10% of cost 2% of inc. benefit
Application Example

Reformer. Control is easy since it only


involve inlet temperature controllers.
DCS 70% of cost 35% of inc. benefit
AdPID 10% of cost 30% of inc. benefit
MPC 10% of cost 5% of inc. benefit
RTO 10% of cost 30% of inc. benefit
Application Examples
FCC Unit. Optimal constraints change with
economics, operating conditions, etc.
Finding the optimal riser temperature
requires RTO (yield model and nonlinear
problem).
DCS 70% of cost 35% of inc. benefit
AdPID 10% of cost 10% of inc. benefit
MPC 10% of cost 35% of inc. benefit
RTO 10% of cost 30% of inc. benefit
Limitations of MPC
It is a linear method; therefore, it is not
recommended for highly nonlinear
processes (e.g., pH control).
It does not adapt to process changes. If the
process changes significantly, the MPC
model must be re-identified.
For certain cases, the economic LP may not
be accurate enough. For these cases, it may
be necessary to add nonlinear optimization
on top of the LP.
Different Forms of MPC
Primary Commercial MPC
Software
ABB
Aspentech DMCplus
Fisher-Rosemount
Foxboro
Honeywell RMPCT
Yokogawa
MPC software based on models with
specified dynamic characteristics can be
inferior to SRM based approaches.
Conclusions
Conclusions
The challenges of this course:
A very difficult area with considerable
mathematics and industrial practice.
Only two days
Wide variety of backgrounds of the students.
Conclusions
You should now be familiar with MPC
terminology and technology and the major
issues associated with the commercial
application of MPC.
Are you an MPC expert? Not yet! But with
more study and a lot more experience, you
can become one.
Conclusions
This is not the end.
It is not even the beginning of the end.
But it is, perhaps, the end of the beginning
(Sir Winston Churchill, Nov. 10, 1942)

Das könnte Ihnen auch gefallen