NPC Chapter5 Scan
NPC Chapter5 Scan
EDWARD S. MEADOWS
Departamento de Eletronica
Pontificia Universidade Catolica do Rio Grande do Sul
Porto Alegre, RS BRAZIL
JAMES B. RAWLINGS
Department of Chemical Engineering
The University of Wisconsin
Madison, WI USA
5.1 Introduction
Model predictive control (MPC) is an optimal-control based method to select
control inputs by minimizing an objective function. The objective function
is defined in terms of both present and predicted system variables and is
evaluated using an explicit model to predict future process outputs. This
chapter discusses the current practice in MPC, computational and design
issues, performance and stability and future research directions. Model pre-
dictive control incorporates ideas from systems theory, system identification
and optimization. The application of these ideas is illustrated using simula-
tion results from two chemical reactor models.
Because MPC is implemented with digital computers, much of this chap-
ter deals with discrete-time formulations. In discrete time, a nonlinear, de-
terministic process model can be represented by
x
k+l = .f ( x k,'u k) (5.1)
233
234 CHAPTER 5. MODEL PREDICTIVE CONTROL
Yk = 9(xk) (5.2)
N-1
J
= c( y k+N^k) + 1, L(yk +jl k,uk +j l k, Uk k
+jl ) (5.3)
j=0
Of the N-move control sequence that minimizes the above objective, only
the first is implemented. When another measurement becomes available,
the parameters of the problem are updated and a new optimization prob-
lem is formulated whose solution provides the next control. This repeated
optimization using an objective function that is modified through process
feedback is one of the principal defining features of MPC.
The objective function that appears in Equation 5.3 illustrates some of
the commonly used terminology in the literature of MPC. States, outputs
and controls are usually doubly indexed as x k+j I k, Yk+jlk and u k+jlk to indi-
cate values at time k +j given information up to and including time k. Since
MPC requires prediction, the double subscript also carries the connotation
of prediction when the first index is larger than the second. Variables that
are singly indexed may be used to represent controls, states or outputs that
have already been implemented, computed or measured, up to the current
time k. An optimal sequence of controls is often indicated using an asterisk
(uk+jIk). The corresponding state and output values then become xk+j^k
and yk +jlk , respectively.
Another feature of MPC illustrated by Equation 5.3 is the presence of
Au
Auk+j^k in the objective, in which k+iJk = u k+jIk — uk+j—llk• In chem-
ical engineering applications, the speed of control action may be limited.
For example, a large valve may require several seconds to change position.
Rather than model the dynamics of control actuators, it is common practice
to include limitations on actuator speed through penalties or constraints on
Ank+jlk. Aside from the issue of actuator limitations, inclusion of Auk+jlk
offers performance advantages in that control action can be limited through
restrictions or penalties on Duk+jjk without introducing permanent offset in
the output. This issue is discussed further in Section 5.7.
The objective function stage-cost L in Equation 5.3 may be chosen to
meet a variety of process objectives including maximization of profits, mini-
mization of operating costs or energy usage, or may be a measure of deviation
5.2. SOME EXAMPLES 235
+ I I n k+j k — u
reflln + I1Auk+jlklls) (5.4)
constant. The dynamics and control of this reactor have been studied by
several researchers, including Van de Vusse [75], Kantor [31], Kravaris and
Daoutidis [38], and Sistu and Bequette [69]. The reactor model is given by
AFB B3C 2A D
2.8
2.4
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04
Time
N
1.16
1.12
1.08
a 1.04
u
1
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04
Time
30
20
0
4D 10
0
U
0L
0 U.UU5 0.01 0.015 0.02 0.025 0.03 0.035 0.04
Time
11
`^ 5
cr 3
Time
1.12
1.08
1.04
0.96
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04
Time
300
200
100
01
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04
Time
Figure 5.2: Isothermal CSTR: Nominal system with horizon length 5 using
only the output.
240 CHAPTER 5. MODEL PREDICTIVE CONTROL
2.8
2.6
UO
Time
1.15
^ 1.1
1.05
Time
30
41
28
0
26
241 I I I I I I
Time
Figure 5.3: Isothermal CSTR: Nominal system with horizon length 5 using
only the output with input constraints.
5.2. SOME EXAMPLES 241
D 0---El--U
1.2
1.1
Ct
a)
1 ----
1 2 3 4 5 6 7 8 9
Horizon Length
Figure 5.4: Isothermal CSTR: Steady-state output versus horizon length.
subsequent values in the prediction horizon are constrained. With the initial
state used in the examples, the initial open-loop control sequence for N = 5
is {24.7, 50, 50, 50, 50}. For horizon lengths greater than 5, the open-loop
control profiles start at the lower constraint U min = 0 and reach the up-
per constraint subsequently within the control horizon. For example, with
N = 6, the open-loop control profile is {0, 46.4, 50, 50, 50, 50}. To minimize
the objective function while satisfying the input constraints, the optimal
open-loop control sequence begins at the lower bound and increases during
the prediction horizon until it reaches the upper bound.
It should be emphasized that the observed offset is not due to model error
or unmeasured disturbances. The controller and the simulation both use the
nominal model and no noise or disturbances were included. The observed
offset is the result of using a controller formulation that is asymptotically
stable only in the limit as N —* oo. The control values and corresponding
states reflect the best finite horizon solution to each constrained optimization
problem, but do not necessarily result in zero offset. In the limit as the
horizon length approaches infinity, we would expect the closed-loop output
to approach its setpoint with zero offset, since steady-state offset would result
in an unbounded objective function. This effect can be seen in Figure 5.4.
Since imposing control bounds failed to provide a satisfactory controller,
we look for other strategies to improve the performance of the nominal sys-
tem in closed loop. Figure 5.2 shows that, without the control penalty, the
control initially jumps to almost 148 on its way to the final undesirable
steady-state value at the undesirable high dilution rate. To prevent exces-
sive jumps in the control, we can include a penalty on Au k + j ^ k . Figure 5.5
shows the effect of including a 1 percent penalty on Duk+^^k.
CHAPTER 5. MODEL PREDICTIVE CONTROL
242
3
N=3 -
F3
N=6 ---
N=8 ----
2.8
PKy
2.4
0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18
0
Time
1.02
N
\ N = 3 -
1.01 ,
\ N = 8
O I I
0.99 '
1Q
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 n
Time
25.4
N-3
41
N= 6 ---
Cdr N=8 ----
H-i
25
41
24.6
0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18
Time
For this case, qualitative differences appear in the responses for different
horizon lengths. Figure 5.5 shows the results for horizon lengths of 3, 6
and 8. Notice that the speed of response has been greatly slowed due to
the penalty on Au, compared to Figures 5.1 or 5.2. The time scale on the
figures has increased by a factor of three from the previous figure. (The use
of symbols to identify the sampling instants obscures the results and has
been dropped.) We find that for horizons less than 6, the desired steady-
state operating point y = 1.0 is not asymptotically stable. The case N = 3,
illustrated in Figure 5.5, shows a continuous increase in the control following
the initial transient. The simulation ended before a steady-state value was
reached. All horizons shorter that 6 showed similar unstable behavior.
When the output variable is x 2 only and the flow rate is low, the lin-
earized reactor model contains a right half-plane zero and therefore exhibits
nonminimum phase characteristics. For linear systems, it is known that
model predictive control can induce unstable closed-loop behavior for non-
minimum phase systems, even if the open-loop system is stable [23]. Some
of the linear systems results can be used as a guide to explain the observed
behavior of the nominal system under MPC that was examined in this sec-
tion.
A B C
ri = ai exp xA (5.11)
(—T)
r2 = a 2 exp I — T I XB (5.12)
with prediction and control horizon equal to 4, simulation results for the
nominal system are provided in Figure 5.6. As in the previous example,
we employed the orthogonal collocation technique in a simultaneous model
solution/optimization approach. Both cases 13 = 0 and 13 = 0.1 are shown.
Without any penalty on control action, Figure 5.6 shows a control range of
approximately —2 to 3.5 with a maximum of approximately 5.5. Based
on the values of the numerical results reported by Elnashaie et al. [22], we
can infer that this control is probably more aggressive than the system can
support. Using a 0.1 percent penalty on Du (Q = 0.1) moderates the control
action and yields a slower response by the internal states and the output
variable.
Another common approach that dampens excessive control action is to
select a control horizon M that is shorter than the prediction horizon N.
After the M-th interval, the control is held constant through the end of the
prediction horizon. Figure 5.7 shows the results of this approach for N = 4
without control penalty (3 = 0), using control horizons M = 1 and M = 2.
Using M = 1 greatly dampens the control input and slows the response of
the system. Note the increase in scale in Figure 5.7 necessary to illustrate
the transient of XA and X B . Increasing the prediction horizon from M = 1
to M = 2 increases both the aggressiveness of the control action and the
speed of the system response. With M = 2 we observed system behavior
very similar to that shown in Figure 5.6 using the 0.1 percent penalty on
Ou.
0.2
0 1 2 3 4 5 6 7 8
0 .6 ___ ---------------
0 1 2 3 4 5 6 7 8
`' 1
_ Without Du penalty
With Ou penalty - - -
-3 E I I I I I I I -1
0 1 2 3 4 5 6 7 8
Dimensionless Time
0.7
M=1 -
M=2 -
0.3
0 5 10 15 20 25 30
M=1
0.5 % M = 2 ---
0.4
0 5 10 15 20 25 30
I
C, 1
-----
/ M = 1
// M = 2 - --
0.6
0 1 2 3 4 5 6 7 8
3 ---- -i M =1
2 M= 2 ---
1
0 -- ------ IL----- ------ - - - - _
-1
0 1 2 3 4 5 6 7 8
Dimensionless Time
Yk = 9( x k, v k) (5.14)
u
xi — f( x o, o) = 0
u
x2 — f( x i, i) = 0
X u
N — f ( X N-1, N-1) = 0
Ymin C Yj C Ymax
C U C
Umin i umax
Au Au
min < Au i < max (5.16)
5.4. COMPUTATIONAL ISSUES 255
UO
[ _c ] I ul < [ c
lb ]
uN-1
I
—I I
C_ —I I
—I I
u
-1 + Au max — u -1 — Dumin
Du
max —Dumin
Cub— Clb =
Du
max —Aumin
Dx k < d
Hu k < h
These constraints are applied to each predicted state or control in the hori-
zon. The complete set of constraints may then be expressed using the Kro-
necker matrix product
xi no
X2 ul
(IN ®D) < 1N ® d ( INCH) <1N(h
XN uN-1
256 CHAPTER 5. MODEL PREDICTIVE CONTROL
I —F.,o
—F. ,1I —F1
—F ,2
I
—F
.,3 I —Fu,3
The Jacobian of the inequality constraints is also sparse with the follow-
ing structure:
D
D
D
D
H
H
H
H
I
—I I
—I I
—I
—I
I —I
I —I
I —I
x = f (x, u, t) (5.17)
tf
J=O[x(tf),tf]+ L [x(t),u(t),t] dt (5.18)
to
tl t2 t3 t4 t5
in which
x x
11 12 x1,n 4 it
(x u
X2 ,l X2 , 2 ''' X2,n fT 2,* , t2)
X
x
4,1 4,2 X4,n f T ( x 4,* u
^ t4)
x
5,1 x5,2 fT ( x5 ,*' u
' t5)
1 0 0 0 0
—5.32 3.87 2.07 —1.29 0.68
A0 = 1.5 —3.23 0 3.23 —1.5
—0.68 1.29 —2.07 —3.87 5.32
1 —1.88 2.67 —14.79 13
(The subscript 0 is included to emphasize that the first line of the collocation
weight matrix is added to account for the initial condition.) The objective
260 CHAPTER 5. MODEL PREDICTIVE CONTROL
5
J W. , t 5 ) + E c k L (x , u, t k ) ( 5.20)
min J
w,x
subject to:
which represents a discretized form of the MPC problem with horizon length 1.
For horizon lengths greater than 1, we can extend the orthogonal collo-
cation method to a set of finite elements in time, with the solution of the
problem approximated by polynomials defined on each element. This sit-
uation is illustrated in Figure 5.9. Note that we have chosen an indexing
scheme that consecutively numbers nodes across finite element boundaries.
It would perhaps be more natural to adopt an additional index to indicate
to which finite element a state or control belongs; however, this would result
in triple indices for states, controls and outputs, which are not supported in
most programming languages or any known optimization software implemen-
tations. The structure shown in Figure 5.9 corresponds to the collocation
scheme used for the isothermal CSTR example of Section 5.2. The fixed-bed
reactor example used one fewer interior collocation point. The matrix A 0 in
5.4. COMPUTATIONAL ISSUES 261
Element 1
-h- Element 2 —I
mo
— Element N —I
^ ^ 1 1 I I ^
t l t2 t3 t4 t5 t7 t9 t
t6 t8 4(N-1)+1 t4N+1
r- I
'A '
I of
'A'
L _I
A
L _I
r -I
'A'
L _I
r---I
L
A'_I
(5.22)
The overlap is due to the presence of the points on the boundaries of two
adjacent finite elements. The state vector includes contributions from states
262 CHAPTER 5. MODEL PREDICTIVE CONTROL
X
2,1 X2,2 ''' X2,n
X
3,1 X3,2
X4,n
X=I
x x
4N-2,1 4N-2,2 x4N-2,n
X x
4N-1,1 4N-1,2 x4N-1,n
The F vector is constructed as in the one-element case, except that the value
of the control must change across element boundaries:
x nit
u
f T l x 2* 0 , t2)
f T ( x 3*, 0 t3)
u
f T ( X 4*, u 0 t4)
u
f T ( x 5*, 0 t5)
f T ( x 6 u1,t6)
F X
( , n 1, n 2, ... , u N-1) _ f T ( x 7*, n 1, t7)
x
f T ( 8*, 1, t8)
u
fT
( xg , u
1, t9)
f T ( x 10*, U 2, t10)
fT (x
(4N-2)* uN
- 1 ^ t4N-2)
Since most optimization codes pass the optimization variables as a single ma-
trix, the matrix equation of Equation 5.23 must be appropriately indexed. In
our examples, we were more interested in coding convenience that in optimal
performance, so we reconstructed the state matrix X as shown above within
the objective function function. Naturally, choices of indexing schemes are at
the discretion of the programmer. For on-line application, we would seek the
fastest evaluation method possible and would probably include such items
as sparse matrix multiplication and optimization of sparse systems.
Since optimization codes require a single vector of decision variables,
the task of re-indexing can become tedious. The Jacobian matrix of the
equality constraints is quite sparse, becoming more sparse with larger prob-
lems, and the overlapped, quasi-block diagonal structure of A is repeated in
the Jacobian. This is illustrated more clearly in Figure 5.10, which shows
the non-zero elements for the fluidized-bed reactor example with prediction
horizon 3, using 5 internal collocation points in each finite element.
ID]
20
30
40
50
0 10 20 30 40 50 60
Cq
1.4
1.25
a
^ 1.1
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
Time
The updated states then become the initial conditions for the model predic-
tions. For the case without model error, this method works well as shown
in Figure 5.1. In the presence of modeling error, simply resetting the state
usually produces steady-state offset. We simulated this controller using the
model of Section 5.2 and a +50 percent error in the concentration of species
A in the the feedstream, X F . The resulting system output is shown in Fig-
ure 5.11. The setpoint was 1.0 and the objective was the same is in Figure 5.5
with horizon length 5. We noted the presence of steady-state offset for hori-
zon lengths 6 through 9 as well. This controller produces offset for any finite
horizon. Since resetting the state provides such poor results, it is generally
not used in practice. We next describe two other approaches with better
properties: conventional MPC feedback and MPC with steady-state target
optimization.
By far the most common feedback method in MPC is to compare the mea-
sured output of the process to the model prediction at time k to generate a
disturbance estimate d k = Yk — y k, in which Yk and y k represent the process
measurement and model prediction, respectively. In forming the MPC ob-
jective function, the disturbance term is then added to the output prediction
over the entire prediction horizon to produce the modified objective
N-1
J = E IlYref — (Yk+jik — dk) II Q + Ilouk+j^kII
j=0
266 CHAPTER 5. MODEL PREDICTIVE CONTROL
This procedure assumes that differences observed between the process output
and the model prediction are due to additive step disturbances in the output
that persist throughout the prediction horizon. Although simplistic, this
error model offers several related practical advantages:
Coupled with a linear step response model, feedback through the estimation
of a step disturbance has been extensively applied in industrial applications.
The stability and robustness have been analyzed for linear, unconstrained
systems by Garcia and Moran i [ 23]. More details for linear systems with
an emphasis on robust design using linear models may be found in the the
monograph by Morani and Zafiriou [53].
Figure 5.12 illustrates the effect of feedback using the disturbance term
with the isothermal CSTR model. The simulation used the same model
mismatch, and the same objective function weights as in Figure 5.11. The
results for horizon lengths 6 through 9 are included in Figure 5.12. The
MPC controller was not stabilizing for the nominal system with horizons
less than 6. Instability was observed in the simulations using these horizon
lengths for both cases with and without model mismatch.
Feedback through differencing model prediction and measurement does
not require a state-space description. Linear MPC methods used in industry
do not use a state-space model and incorporate the disturbance directly
into the MPC objective function. The feedback mechanism is sometimes
obscured by this treatment. A state-space description, even if not used in
the controller, allows a more natural interpretation of the conventional MPC
feedback procedure. Using an augmented state-space model, conventional
MPC feedback can be shown to be a particular form of a state observer for
the resulting system:
n
Xk+1 = f ( x k, k) (5.24)
d = d k(5.25)
k +1
Y k = 9(x k ) + dk(5.26)
5.5. FEEDBACK AND STATE OBSERVERS 267
♦♦ N=6
N ♦ N = 7 ---
3
^♦ N=8 ----
2.5
Time
1.4
N=6
♦
N=7
N=8
1.2 N=9....-.
Sir
^ 1
Time
25
:♦ N=6
- ♦♦ N = 8 - - _ _
20
•• • ♦ N = 9 ........
O
15
0
U
10
0
Time
d
k+1 = dk + hd ( x k, d k, y k, uk)
in which the x k and d k represent the observer estimates. To obtain the usual
MPC observer, choose
h
x ( x k, d k, y k, u k) = 0
h
d (
x
k, dk, Yk, u k) = Yk —g(k) —dk
This leaves an open-loop state observer for the original states x k and a
deadbeat observer for the disturbance dk . In the absence of information to
construct a disturbance model, this approach is a good choice in view of its
favorable features. With additional information and engineering judgment,
it is possible to obtain better state estimates using an observer that updates
x k as well as dk . Whether the extra effort leads to better control depends
upon the specific observer design and knowledge about the disturbances.
Several researchers have presented results for linear systems showing better
control using a full state estimator [26, 46, 55, 64] in the presence of noisy
output measurements and model mismatch.
Since the conventional MPC feedback uses a deadbeat observer of the
output disturbance, it is sensitive to random fluctuations in the output. This
is illustrated in Figure 5.13, which reproduces the situation of Figure 5.12
except that a zero-mean Gaussian disturbance with variance 0.09 has been
added to the output measurement. Figure 5.13 show the system response
for horizon lengths 7 and 9. The initial portion of the figures shows the
expected faster response of the longer horizon lengths. The faster response
comes at the expense of poorer disturbance rejection, i.e. noise in the input.
3.4
♦ N=7
\\ N = 9 ---
2.8
2.2
I
1.6
0 0.05 0.1 0.15 0.2
Time
1.4 I I I
N=7
I
N=9 ---
1.2
08
0 0.05 0.1 0.15 0.2
Time
I I I I
25
N=7
N= 9 ---
20
0 15
r, 10
O
M
5
0 0.05 0.1 0.15 0.2
Time
min Il u
ref — ut n
I l
(5.27)
Ut,xt
subject to:
Xt = f (xt, ut)
Yref = 9 ( x t) -^- dk
Xt E X
ut E U
In the above nonlinear program uref represents the input setpoint, for prob-
lems in which there are extra degrees of freedom in the input vector, i.e.
more inputs than output setpoints. The input setpoint is selected with
the understanding the the controller will enforce it as a setpoint only in a
minimum-norm sense. The solution {u t , x t } provides target values for the
states and controls that account for the current estimate for the output dis-
turbance dk . At each iteration, a new estimate of d k is obtained from the
state estimator and the target values are readjusted accordingly.
If the above nonlinear programming problem does not have a feasible
solution, then the output setpoint cannot be reached exactly; an alternative
5.5. FEEDBACK AND STATE OBSERVERS 271
min I
y
re£ — ( 9( x t) +dk)IQ (5.28)
Ut,Xt
subject to:
Xt = f ( x t, ut)
Xt EX
Ut EU
In this case, we cannot simultaneously find values of {x t , u t } to satisfy the
steady-state system equations at the desired setpoint. This can happen,
for example, if an especially large disturbance enters the system, or if the
desired setpoint minus the disturbance does not correspond to a steady state
of the model equations. We always assume that the model has at least one
real steady-state solution that satisfies the input and output constraints, so
Equation 5.28 always has a feasible point.
This technique can give excellent results. Figure 5.14 shows the response
of the isothermal CSTR with model mismatch using a 1 percent weight on
(U-Ut) 2 in relation to the weight on the output. The value of u t was adjusted
at each sampling time using the nonlinear program of Equation 5.27 with
u
ref = 25, the nominal steady-state value. Unlike the previous examples that
used a penalty on Du, the response is rapid. It satisfies both the primary
and secondary control objectives: It brings the system to the setpoint y = 1
without offset and it does so at a low feed rate. These results indicate that
this is the clear method of choice for control of the reactor of Section 5.2.
The curves shown in Figure 5.14 were computed with N = 5. Slightly slower
response was observed with shorter horizon lengths, but the differences were
very small and would not appear as distinct curves if plotted in Figure 5.14.
Even with horizon length 1, the response was very similar, and the time
necessary to compute the MPC control was much less. Recall that this
system was unstable for short horizons using conventional MPC feedback.
Up to this point, all of the isothermal CSTR examples shown have started
from the same initial conditions. It is necessary to check the behavior of the
controller over a range of initial conditions before deciding on a specific
controller design. Figure 5.15 shows trajectories of the system from vari-
ous initial conditions. The system was controlled using feedback through
steady-state target optimization with horizon length 3. The initial condi-
tions were selected to lie along the perimeter of the rectangular region of
272 CHAPTER 5. MODEL PREDICTIVE CONTROL
3.2
2.7
a1
5
ci:
2.2[
0 0.02 0.04 0.06 0.08
Time
N
1.3
N
1.2
1.1
71 1
N
0 0.02 0.04 0.06 0.08 0.1 0.1
Time
24
41
20
0
16
0
A
12
0 0.02 0.04 0.06 0.08 0.1 0.12
Time
1.6
G}.;---------R.----------El: ----- ---- ^: -------- ^: ---------C7.
1.4
II
1.2
- ,
41 0.8
0--------------------- -
0.6
C -- ""^7- --- G'---------- G----------- C3-----------{'1
0.4
1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3 3.2 3.4
State Variable x1
Figure 5.15: Isothermal CSTR: System response from various initial condi-
tions.
the state-space shown in the diagram. The initial conditions and the final
value of the controlled system are indicated with boxes. Since the controller
is implemented at discrete points in time, the system trajectories can cross,
unlike the situation with continuous-time feedback systems in two dimen-
sions. This figure shows that the region of attraction for the MPC controller
in the presence of model error is not negligible and that the controller would
be expected to perform well from a variety of initial conditions.
Using both the conventional MPC feedback and feedback through target
optimization, we compared the ability of the MPC controller to reject zero-
mean Gaussian disturbances in the output. As in Figure 5.13, we used
discrete, additive, zero-mean Gaussian noise in the output of the process
with variance 0.09. To allow direct comparison of various methods, each
simulation used the same noise sequence, which we obtained by re-seeding
the random number generator with the same seed value.
Figure 5.16 shows the response of the two feedback methods. The tar-
get optimization feedback method with horizon length 3 is compared to the
conventional DMC controller using horizon length 7. The target optimiza-
274 CHAPTER 5. MODEL PREDICTIVE CONTROL
tion feedback is insensitive to the horizon length and provides virtually the
same response for horizon lengths from 1 to 5. During the course of the
simulations, about 15 percent of the initial nonlinear programming prob-
lems of Equation 5.27 had no feasible point (which never occurred without
the random disturbances). In these cases, the NLP of Equation 5.28 was
used to determine the reference values. Figure 5.16 shows that feedback
through target optimization with no weighting on Du is more sensitive to
disturbances than the conventional MPC feedback method with the weight-
ing on Au. This effect clearly shows up in the input. To attenuate the
effect of the zero-mean disturbances, one can choose to weight Du in the
controller optimization, but there are other choices as well. For example, we
can incorporate a moving average filter to estimate the disturbance term:
dk = 0.9 d k _ 1 +0.1 (Yk — g (x k )). This reduces the occurrence of infeasibility
in the initial NLP to about 5 percent. The effect of this filter is illustrated
in Figure 5.17. As in the previous figure, the conventional MPC feedback
controller with horizon length 7 is included for reference. From Figure 5.17,
we can see that feedback through target optimization combined with the fil-
ter for the disturbance term has greatly improved the disturbance rejection
ability of the controller, while retaining the ability of the feedback method
to provide robustness and fast response.
Figure 5.17 shows that an MPC controller with a short horizon using
target optimization feedback can perform as well as or better than conven-
tional MPC feedback with longer horizons in terms of robustness, speed of
response and disturbance rejection; however, the feedback through the tar-
get optimization solution is much faster to implement. Using horizon length
9 and conventional MPC feedback, the simulations took about 20 hours to
simulate 120 time steps on an IBM-compatible 80486/33 MHz computer. At
each sampling time, this method required the solution of a nonlinear pro-
gramming problem involving 99 decision variables. In contrast, using feed-
back through target optimization, the initial NLP needed to compute the
targets involves 3 decision variables and requires an insignificant amount of
time to compute. The control computation itself involved as few as 6 deci-
sion variables (for N = 1) to 18 variable (for N = 3) and could easily have
been computed in real time using a sampling interval of 7.2 seconds.
5.5. FEEDBACK AND STATE OBSERVERS 275
a 3
1.2
1
O I I I I`-'
08
0 0.05 0.1 0.15 0.2
Time
80
4Z 60
40
0
0 20
U
0
0 0.05 0.1 0.15 0.2
Time
2.5 Ir
15
0 0.05 0.1 0.15 0.2
Time
1.4
1.2
O 0.8
0 0.05 0.1 0.15 0.2
Time
26
20
14
0
U Q
0.6
OT=1.09
0.4 \ DT=0.2725 ---
Q \
F3
0.2 -- -------------------------------
0 --------- ---------- ----------- --------------------- ----------- ---------
0 5 10 15 20 25 30 35 40
0.4
0T = .09
0.2 OT=0.21725 ---
0 5 10 15 20 25 30 35 40
2
0T= 1.09
1.6 OT = 0.2725 ---
a 1.2
0.8
0 5 10 15 20 25 30 35 40
4
° 0 v- ------
0
-4 OT = 1.09
OT = 0.2725 ---
-8
0 5 10 15 20 25 30 35 40
Dimensionless Time
0.6 M =1
M=2 --
0.4 `
`.
0.2
0
0
IIIIII EEEEEI
5 10 15 20
-- ------------------------ M =1------
0 .6 M=1
0.4 M=2---
w
0.2
0 -------------------- ---- _------- --------------------- ---------------------
0 5 10 15 20
2
M=1
C^
a
1.6
1.2 : ----
J\\
------ ------------------
M = 2 ---
^,
0.4
0 5 10 15 20
4
0 0
-4 M=1
O M=2 ---
-8
-12
0 5 10 15 20
Dimensionless Time
I I I
0.6 No filter --
Filter constant 0.9 — — — ' ' '
Q 0.4 ^. ''^
0.2 ^
0 5 10 15 20
0.6 - t
No filter
0.4 I Filter constant 0.9 ---
^
0.2 l
----....1---- --^-'
0 5 10 15 20
1.4 '
\ No filter
Cd 1.2 N Filter constant 0.9 ---
G,, 1 '
0.8 -----
0.6
0 5 10 15 20
No filter
4
O Filter constant 0.9 ---
o 0 v v - ^1 _ ,Vt LL
-4
0 5 10 15 20
Dimensionless Time
0.6 No filter
Filter constant 0.5 ---
0.4
0
0 5 10 15 20
0.7
0.5
0 5 10 15 20
°;
O o
' No filter
}^..^ 0.7 Filter constant 0.5 ---
E^ 0.6
0 5 10 15 20
No filter
4 Filter constant 0.5 — — —
O
-4 I
0 5 10 15 20
Dimensionless Time
AV
( x k) V
( x k+ l ) -
V
( x k) <_ - 1r(II x J) (5.30)
N-1
J*(x k ) = min u
(II x k+j^kll Q + Il k+j^kIIR) + IQ
Uk+Jik j=0
a
(II x kII) = am(Q) Il xkli2
(in which ami,,(Q) is the smallest singular value of Q), satisfies the lower
bound of Equation 5.29. Note that Xk and n k are equivalent to x k ^ k and
u k1k , respectively.
5.7. STABILITY AND PERFORMANCE 287
Equation 5.30 requires a bound for the difference between values of the
Lyapunov Function for subsequent states. Using the MPC objective func-
tion as our candidate Lyapunov function, Equation 5.30 is also satisfied by
including the final state constraint x k+Nlk = 0. If we represent a sequence
of controls that corresponds to the optimal J*(x k ) by
( * * *
j u klk , U k* +llk , ... 2Gk+N-1^k
The value of J' is simply J * ( x k ) without the contribution of the first stage. In
this case there is also no contribution from the final state to the summation
since it is constrained to be zero.
After the control uk^ k is implemented, the state moves to x k+llk =
f Since we are considering the nominal system, the state moves
( x k , uk^ k ) .
provides an upper bound for the optimal objective J*(xk+l) so that we have
if
> J* ( x k+l) . Combining this inequality with Equation 5.31, we obtain
J* x J* x (5.32)
( k) — ( k+l) > IlxkllQ
Q
> min(Q) Ixk112 (5.33)
• State Trajectory
O State Prediction
• 0 O
0 O _J L Control Implemented
O
Control Predicted
than that at k, because of the final state constraint. The decrease is lower
bounded by 1 1 x k I 1 Q, since the contribution of the state at k is no longer
included.
To apply the Lyapunov Stability Theorem to MPC, it remains to be
shown that there exist an upper bound ,C3(^IxIl) on the MPC objective. The
upper bound is closely related to the null-controllability of the system. In
general, a priori evaluation of null controllability is difficult for nonlinear
systems; the case of constrained nonlinear systems is even more difficult.
Suppose, however, that we knew that the origin could be reached using
feasible controls from any state in some specific subset S of R' and the
state trajectory under this sequence of controls remained in the feasible set.
Then the MPC objective function could then be evaluated using the feasible
control sequence and would provide an upper bound on the optimal MPC
objective. The argument proceeds as follows: Let x k be some state in S such
that the control sequence { u k^k, u k+11 k, ... u k+N-ij k } produces a final state
x
k+NIk = 0. We can construct a (non-optimal) MPC objective
N-1
J(xk)
_ E, I lXk+jlkIIQ+I
J uk+jlk (5.34)
j=0
Again, there is no contribution of the final state because of the zero end-
state. If J(x k ) is continuous, then it is a class 1C function, since it is lower
bounded by HxkU Q which is a class 1C function. The arguments above may
5.7. STABILITY AND PERFORMANCE 289
X
k+1 = f(xk,uk)
f (0, 0) = 0
State estimator. The state estimator takes the current control and plant
measurement and updates the state and disturbance estimates via
x
k+1 = .f ( x k, uk)
d
k+1 = Yk — 9(xl^)
i I ref — u t
m n u (5.35)
subject to:
Xt = f ( x t, ut)
Yref = 9( x t) + dk
Xt E X
ut E U
5.7. STABILITY AND PERFORMANCE 291
Notice that we consider explicitly any controller input and state (output)
constraints in the target optimization as well. If this optimization problem
does not have a feasible point, the following nonlinear program is used to
compute the targets
d
min bref — ( g ( x t) + k)11 2 (5.36)
subject to:
Xt = f ( x t, ut)
Xt E X
Ut E U
We always assume that this optimization problem has a feasible point, i.e.
the model has at least one steady-state solution satisfying the constraints.
MPC control law. Finally, the MPC controller takes x t , u t and x k and
produces the control input u k from the solution of
N-1
min E ll xk
+jl k —
x
tllQ + Ii ttk
+jl k — utII R (5.37)
Uk+jlk j=0
subject to:
xklk = Xk
x
k+Nlk = Xt
xk+jlk E X
uk+jlk E U
Then either H u ref — u sII R is minimized and Ys = y ref if Equation 5.35 has a
feasible solution at steady state or H yref — y SIIQ is minimized.
Proof: At steady state (Assumption 3), the estimator and target optimiza-
tion yield
xs = f ( x s, us)
d
s = y
s — 9(xs)
x
ts = f ( x ts, uts)
xts E X
ti ts E U
x
k+l = flxk,us)
Ys = 9( x ts) + ds
Therefore, if at the steady state Equation 5.35 is being solved then the steady
input minimizes I u ref — u sII R and ys = y ref . If this target problem has no
feasible solution at steady state, then Equation 5.36 applies and the steady
plant output minimizes I I y ref — y s I I Q
Because of the constraints, plant-model mismatch, and plants with more
setpoints than inputs, it may not be possible to satisfy the conditions neces-
sary for zero steady-state offset. We can add further restrictions to provide
conditions that do ensure zero steady-state offset.
5.8. DISCUSSION 293
xt = f ( x t, ut)
Yref = 9( x t) + dk
xt EX
ut E U
for every Yref and dk , then there is zero steady-state offset, ys = Yref
Proof: The added conditions of the corollary ensure that the target opti-
mization in Equation 5.35 has a feasible point. Therefore, zero steady-state
offset follows from Theorem 7.
5.8 Discussion
MPG has its roots in the development of optimal control theory in the late
1950's, in which the "state-space" approach was considered a modern al-
ternative to the frequency-domain techniques that had dominated control
theory and practice since the 1930's. Kalman's landmark paper [30] consoli-
dated and extended much of the then current work in the field, and provided
rigorous definitions for the now-common concepts of controllability and ob-
servability. Although Kalman reported work for linear systems, many of the
key concepts may be extended to nonlinear systems.
It was recognized early that optimality in the linear-quadratic problem
is not sufficient for stability. Kalman [30] provided sufficient conditions for
stability for this case. Several other workers considered formulations that
could provide a stabilizing LQ optimal controller. One of these was Klein-
man [36], whose "easy way" to stabilize a linear system was equivalent to a
finite-horizon LQ optimal control that is subject to the final state constraint
x(T) = 0. Kleinman followed up his continuous-time result with a discrete-
time analog [37] in which he provided a criterion for selection of an initial
condition for the matrix Riccati Difference Equation (RDE) that arises from
the LQ optimal control problem in discrete time.
Thomas and coworkers[72, 73, 74] recognized that the zero final state con-
straint could be incorporated into the LQ optimal regulator by inverting the
Riccati Differential (or Difference) Equation and integrating (or iterating)
the result from an initial condition of zero. Conceptually, this is equivalent to
294 CHAPTER 5. MODEL PREDICTIVE CONTROL
• Robustness : We have seen that MPC used with the deadbeat distur-
bance estimator is robust to model structural and parameter uncer-
tainty. To date, most results in this area indicate good performance in
the presence of model uncertainty; however, a rigorous analysis that
can provide sufficient conditions for robustness has not been completed.
N-1
T* u
( x k) = min (Hxk+jlkII Q + Il k+jlkll R) + J^(xN)
Uk+ j l k
j=1
Provided that the stage cost used to compute J is the same as in IV*,
the principle of optimality guarantees that Q* (x) = J (x); therefore,
MPC using the objective function J^(x k ) is stabilizing.
It is probably difficult or impossible to provide a closed-form expression
for Jam; however, if we are able to compute a bound on J^ (x) < J* (x)
such that J* (0) = 0, then the MPC controller computed using J* is also
stabilizing, subject to some technical conditions. Some preliminary
results in this area have already been presented [48] and an article
containing more details concerning this approach is in preparation.
Acknowledgments
The authors wish to thank Dr. Pierre 0. M. Scokaert for helpful discussions.
The financial support of NSF, through grant CTS-9311420, and the indus-
trial members of the Texas—Wisconsin Modeling and Control Consortium
(TWMCC) is gratefully acknowledged. The first author was financially sup-
ported during the writing of this chapter from a fellowship from the Brazil-
ian government, acting through the Conselho Nacional de Desenvolvimento
Cientifico e Tecnologico (National Council of Scientific and Technological
Development). This support is gratefully acknowledged.
5.10 Notation
A matrix of first derivative collocation weights without initial
condition
A matrix of first derivative collocation weight in orthogonal
collocation approximation with multiple finite elements
Ao matrix of first derivative collocation weight, modified to in-
clude the initial condition equation
5.10. NOTATION 299
Greek Symbols
Subscripts
References
[17] S. E. Dreyfus and A. M. Law. The Art and Theory of Dynamic Pro-
gramming. Academic Press, New York, 1977.
[39] C.-C. Ku and K. Y. Lee. Diagonal recurrent neural networks for dy-
namic systems control. IEEE Trans. Neural Net., 6(1):144-156, January
1995.
[61] S.-Z. Qin, H.-T. Su, and T. J. McAvoy. Comparison of four neural
net learning methods for dynamic system identification. IEEE Trans.
Neural Net., 3(1):122-130, January 1992.
[75] J. G. Van de Vusse. Plug-flow type reactor versus tank reactor. Chem.
Eng. Sci., 19:964, 1964.