Model Predictive Control
Model Predictive Control
Control design methods based on MPC concept have found wide acceptance in
industrial applications and have been studied by academia. It is currently the most
widely used of all advanced control methodologies in industrial applications. The
reason for such popularity is the ability of MPC design to yield high performance
control systems capable of operating without expert intervention for long periods of
time.
2. Motivation
While achieving the above tasks, consideration should be continuously given to the
following issues:
To develop better, fast, accurate and robust process control, model-based modern
control algorithms and efficient adaptive and learning techniques are required.
The requirement for consistent attainment of high product quality, more efficient
use of energy, and an increasing awareness of environmental responsibilities have all
combined to impose far restrict demand on control systems than can be met by
traditional techniques alone. The industrial response to these challenges led to the
development of the successful MPC algorithm. It had an enormous impact on industrial
process control and served to define the industrial MPC paradigm.
3. Benefits of MPC
4. Industrial implementation
Thee are more than 2000 successful industrial implementations have been reported.
According to recent reports, the number of applications is expected to continue to
increase rapidly. Most of these applications (67%) are in refineries where MPC was
originally born. However, significant number of applications can also be found in other
areas. The following is an example of the areas where MPC has been active.
There are several versions (generations) of the MPC depending on the vendor or
developer group. These different versions are very similar in principles. They may differ
in implementation procedure, model type, objective function formulation, or method of
solution. However, not all of these control methodologies has reached the level of
Overall, DMC scheme is the most widely used industrially. It is reported that DMC has
over 600 industrial applications.
r + e u yp
MPC Plant
_
+
-
Model
ym
x
At the next sampling time k+1, the prediction and control horizon are shifted ahead
by one step and a new optimization problem is solved using updated measurements
from the process. Thus, by repeatedly solve an open-loop optimization problem with
every initial conditions updated at each time step, the model predictive control strategy
results in a closed-loop constrained optimal control technique.
Past Future
Reference, r(k+1)
k k+1 k +M -1 k+P
Control horizon
Prediction horizon
subject to:
U l ≤ U (k ) ≤ U u (2)
ΔU l ≤ ΔU (k ) ≤ ΔU u (3)
Note that the last two equations represent the physical constraints on the input and
their moves. They can be combined and formulated as constraints on the input move
and then added to the optimization problem. This treatment is more suitable because the
objective function contains only input moves. Inputs are not optimized because they
create steady state offset.
In the above optimization problem, Γ and Λ are diagonal weight matrices. Their role
will be explained under Tuning section. R(k+1/k) = [r(k+1/k) r(k+2/k) … r(k+P/k)] is a
vector of dimension ny × P , which contains the set point for all ny outputs over the
prediction horizon P In his case, r(k+1) is a vector of all ny outputs at time k+1
Similarly, ΔU(k/k) is a vector of dimension nu × M , which contains the input move for
all nu inputs over the control horizon M and is defined as follows:
In this case, Δu(k/k) is a vector of all nu inputs at time k. In fact, ΔU(k/k) is the
unknown control actions that need to be found through solving the above optimization
problem. Y(k+1/k) is a vector of dimension ny × P , which contains all ny outputs over
the prediction horizon P and is defined as follows:
Therefore, y(k+1/k) is a vector of all ny outputs at time k+1. Generally, the output
predictions Y is obtained from the recursive state equations:
Y (k + 1 / k ) = M p Y (k / k ) + S mp ΔU (k / k ) (4)
Note that the second index (k) in all above equations and definitions denotes that
these values are computed at real time k. this index changes with the moving horizon.
According to the definition of the predicted output from equation 4, the optimization
problem (Eqs. 1-3) can be written in terms of the unknown variable ΔU(k). Therefore, if
the constraints (Eqns. 2-3) are excluded, the optimization problem can be solved
analytically and closed-form solution can be written as follows:
Here, Kmpc is known as the MPC controller gain matrix, which is a combination
of the dynamic matrix, and the weight matrices Γ and Λ. In this case, online solution of
the optimization problem is not necessary. Instead, the controller gain can be computed
offline and then equation (5) is executed online to determine the new values for the
control action. However, in most cases the input constraints are included in the
optimization. Therefore, analytical solution can not be found. Instead the optimization
problem can be cast as Quadratic Programming (QP) or linear programming (LP) and
then solved by available optimization software. It should be noted that no output
constraints are imposed in the optimization problem. Although the MPC formulation
allows using output constraints, it is usually excluded because it increases the
computational effort and time. Moreover, inclusion of output constraints may cause the
optimization problem to run into infeasible solution.
Output feedback:
In the mathematical treatment above, the concept of feedback was not
highlighted explicitly. If the output prediction obtained from equation 4 is fed directly
to equation 1, then the MPC control action depends only on the model outputs and not
on the plant measurement. In due course, unless the model is extremely perfect, the
control performance will be poor and even unstable. Nevertheless, the standard MPC
concept allows for feedback correction. This means that the output prediction from
equation 4 is corrected for model-plant mismatch before being implemented. In fact,
the model states are first updated by the last control action as follows:
Y (k / k − 1) = M n Y (k − 1 / k − 1) + SΔu (k − 1 / k − 1) (6)
The computed states are then corrected by the current plant measurement as follows:
Y (k / k ) = Y (k / k − 1) + I n [ y p (k ) − NY (k / k − 1)] (7)
Note that this feedback mechanism is a built-in feature of all MPC formulations.
Inclusion of the output feedback mechanism is the main reason for repeating the overall
MPC control calculation is each sampling time. It is also the main feature that
differentiates the MPC from the classical optimal control theory.
network models can be used. Most of the commercial MPC software use convolution
models such as FIR or FSR models. FIR and FSR are easier to develop than other types
of models. In addition these convolution models have the following advantages:
• Model coefficients can be easily obtained from the experimental step test.
• No model structure or order needs to be assumed.
• Unusual dynamics can be modeled.
• Provide convenient way to design a controller based on the use of
optimization.
• The model is linear which simplify the solution of the optimization problem.
• They can be deduced form other parametric model forms.
Despite the advantages of the convolution models some fundamental problems related
to convolution models exist:
It should be emphasized that the convolution models are linear, which allow
simplifying the optimization problem into LP or QP. The latter can be solved easily or
moderately online. However, when more complicated or nonlinear model forms are
used in the MPC design, the objective function (Eq. 1) becomes nonlinear. As a result
nonlinear programming is required to solve the optimization problem.
• Step testing
• PRBS (pseudo random binary sequence)
[
S1 = s 0,1 s 0, 2 L s 0,ny L s1,1 s1, 2 L s1,ny L s n ,1 s n , 2 L s n ,ny ]
T
where s0,i are the initial step response values and they equal zero because deviation
variables are used in linear models. The term n, is known as the truncation point and it
is determined such that the full open-loop response has reached steady sate. It is also
defined as the open-loop settling time. The above step test is repeated for each
individual input and finally the full step response coefficient matrix can be developed as
follows:
S = [ S1 S 2 L S nu ]
Constant h1,1
Input 2 Dynamic
Process
h1,ny
Constant
Output ny s1,ny h2,ny
Input nu s2,ny
h3,ny
s3,ny
sn,ny
One can develop the FIR model from the FSR model directly noting the following
relation:
hi ,1 = s i ,1 − si −1,1
Or otherwise, they can be deduced directly from the unit step response plot shown in
Figure 3. Similar procedure to that used for developing FSR can be used to develop the
overall dynamic matrix.
• The tests are done manually, which dedicates extremely high commitments
of the engineers and operators.
• The overall multivariable model is generated by merging the individual
SISO identification.
The SISO identification implies that the input channels are perturbed one at a time. The
accuracy of the individual SISO models may not yield a multivariable model of required
accuracy.
PBRS
Input 1 Output 1
PBRS
Input 2 Dynamic
Process
PBRS
Output ny
Input nu
8. Tuning
Basically, the MPC has four main tuning parameters namely; the control horizon M,
the prediction horizon P, the output weight matrix Γ and the input weight matrix Λ. The
last two matrices are diagonal ones. The sampling time has a strong impact on the
control performance, however it is not used as a tuning parameter since it is often fixed
based on the equipment at installation. Therefore, the total number of tuning parameters
is 2+nu+ny. These parameters have profound and somewhat overlapping effect on the
closed-loop performance. The definition and function of each parameter is outlined
next:
• The prediction horizon, P, represents the number of samples into the future
over which MPC computes the predicted process variable profile and
minimizes the prediction error. Usually P>M is selected to avoid dead-band
effect. Increasing P, result in a significant non-monotonic response ranging
from damped to under-damped to damped.
• The move suppression factor (weight on the MV move, Λ). They indicate the
trade-off between the amount of movement allowed in the manipulated
variables and the rate at which the output deviation from set point is reduced
over the prediction horizon. They serve dual purpose of suppressing
aggressive control action and conditioning the system matrix before
inversion.
In general, based on general reasoning, one can simplify the tuning problem to a
single primary tuning parameter, which is Λ. Note that P can not be made independent
of the sampling time. In addition, for stability reasons, P must be selected such that it
includes the steady state effect of all past MV moves, i.e., it should equal the open-loop
settling time (n) of the process in samples. Note also that the relative value of M to P is
more important, therefore, M can be fixed at a small number to reduce computational
effort. On the other hand, Γ do not affect the invertibility of the overall system matrix.
Thus, they can be specified by the user on the basis of control objective priorities or
saved for later fine-tuning.
Local PID
FC controller
dC 2
Mv = F1C1 − F2 C 2
dt
dP
W 2 = F4 − F5
dt
where C1 and C2 are the input and product compositions, respectively and P2 is
the operating pressure (kPa). F1 and F2 are the feed and product flow rates (kg/min),
respectively. F4 and F5 are the vapor and condensate flow rates, respectively (kg/min).
Mv is the liquid holdup in the evaporator (20 kg) and W is a constant (4 kg/kPa). The
liquid level in the separator is considered well controlled by manipulating the product
flow rate. Therefore, the flow rates are givens as follows:
F2 = F1 − F4
F4 = [0.16( F1 + F3 )(−0.3126C2 − 0.5616 P2 + 0.1538P100 + 41.57) −
F1C p (0.3126C2 + 0.5616 P2 + 48.43 − T1 )] / λ s1
2UA(0.507 P2 + 55 − T200 )C p F200
F5 =
λ s 2 (UA + 2C p F200 )
where P100 is the steam pressure (kPa). F200 (kg/min) and T200 (oC) are the flow and
temperature of the cooling water, respectively. UA is the product of heat transfer
coefficient and the transfer area (6.84 kW/K) and Cp is the heat capacity of the cooling
water (0.07 kW/kg min). F3 is the recycle flow rate (20 kg/min). λs1 is the latent of
steam at saturation condition (36.6 kW/Kg min) and λs2 is the latent heat of evaporation
of water (38.5 kW/kg min). F1 is fixed at 10 kg/min and its temperature T1 is fixed at 40
o
C. The cooling water enters the cooler at 25 oC. The initial steady state value for the
outputs is C2 = 0.1474 and P2 = 32.109 kPa which corresponds to C1 = 0.05, P100 = 200
kPa and F200 = 200 kg/min. The control objective is to maintain the outputs within
desired values using P100 and F200 as manipulated variables. This control problem is
selected because it has strong cross-loop interaction. In addition, because mass fraction
is used for C1 and C2, the process is ill conditioned. Both manipulated variables are
constrained between 0 and 400.
A step response model is generated from the nonlinear process model using
MATLB software with truncation number, n = 30 and sampling time Ts = 0.5 min. The
step response model is used in the MPC controller algorithm. The full nonlinear model
will be used to simulate the plant from which the output measurement will be obtained.
This formulation generates model-plant mismatch, which makes the control problem
more challenging.
pressure can not pick up its original condition. Figure 8 demonstrates how the closed-
loop performance is improved when MIMO scheme is used. The set point for the
column pressure is stepped by 1 kPa. The purpose of this simulation is to highlight the
capability of MPC in handling multivariable interactive control loops. The MPC
parameter values are M = 1, P = 2, Γ = [1,1] and Λ = [0,0]. Figure 9 depicts the same set
point change but for two different values for the prediction horizon while the rest of the
MPC parameters are kept the same as before. It can be seen that increasing P creates
slower response. In general, larger P leads to more robust and stable behavior. The
effect of P can be considered marginal noting that the prediction horizon has increased
by 25 folds. Figure 10 illustrates the effect of changing the other MPC parameter values.
For example, the dashed line shows the performance becomes damped and sluggish for
small increasing the move suppression. The dash-and-dot line, on the other hand, shows
that increasing the weight on the first output, i.e. γ1, the original performance is
retrieved. This change in the control performance indicates clearly the overlapping
effect of the MPC parameters.
F4 Cooling
water
F200
T200
Steam L2
F5
P100 Separator
F100 P2
T100
F3
F1
C1 Pump-1
F2
T1
Feed Product C2
T2
Figure 6: Schematic of the evaporator process
0.19 33
0.18 32
P2 (kPa)
31
0.17
C2 30
0.16
29
0.15 28
0.14 27
500 400
450
F200 (kg/min)
P100 (kPa)
300
400
350
200
300
250 100
0 35 70 0 35 70
Time (min) Time(min)
Figure 7: Set point change response for SISO control loop
0.20 33.6
33.2
P2 (kPa)
0.18
C2
32.8
0.16
32.4
0.14 32
500 400
F200 (kg/min)
400
P100 (kPa)
300
300
200
200
100 100
0 35 70 0 35 70
Time (min) Time(min)
Figure 8: Set point change response for MIMO case
0.20
0.18
C2
set point
0.16 P=2
P = 50
0.14
33.6
33.2
P2 (kPa)
32.8
32.4
32
0 35 70
Time (min)
Figure 9: Set point change response for two different values of P.
0.20
0.18
C2
0.16
0.14
33.6
33.2
P2 (kPa)
References
Ali, E., and Zafiriou, E., “Optimization-based Tuning of Non-linear Model Predictive
Control with State Estimation”, J. of Process Control, 3, 97-107, 1993.
Al-Ghazzawi, A., Ali, E., Nouh, A., and Zafiriou, E., “On-line Tuning Strategy for
Model Predictive Controllers”, Journal Process Control, 11(3), 265-284, 2001.
Cutler, C.R., and Ramaker, D. L., "Dynamic Matrix Control- A Computer Control
Algorithm", Proceeding of JACC, San Francisco, CA , 1980.
Garcia, C., and Morari, M., “Internal Model Control 1: A Unifying Review and Some
New Results”, Ind. Eng. Chem. Proc. Des. Dev., 21, 309-323, 1982.
Meadows, E. S., and Rawlings, J. B., “Model Predictive Control”, In: Henson, M. A.,
and Seborg, D. E., (Eds), Nonlinear Process Control. Prentice-Hall, Englewood Cliff,
NJ, 1997.
Morshedi, A., and Garcia, C., “Quadratic Programming Solution of Dynamic Matrix
Control (QDMC)”, Chem. Eng. Comm., 46, 73-87, 1986.
Ohno, H., Ohshima, M., and Hashimoto, I., “A Study on Robust Stability of Model
Predictive Control”, IFAC Model Based Process Control, GA, USA, 1988.
Richalet, J., Rault, A., Testud, J. and Papon, J., "Model Predictive /heuristic Control:
Applications to Industrial Processes", Automatica, 14, 413-428, 1978.
Shridhar, R., and Cooper, D. J., “A Tuning Strategy for Unconstrained SISO Model
Predictive Control”, Ind. & Eng. Chem. Res., 36, 729-746, 1997.
Shridhar, R., and Cooper, D. J., “A Tuning Strategy for Unconstrained Multivariable
Model Predictive Control”, Ind. & Eng. Chem. Res., 37, 4003-4016, 1998.
Camacho, E.F. and Bordons, C., Model Predictive Control, Springer-Verlag, 1999.
Morari, M. and J. Lee, “Model Predictive Control: Past, Present and Future", Comp.
Chem. Eng., 21, 667-682, 1999.