You are on page 1of 12

Automatica, VoL 23, No. 2, pp. 137 148, 1987 0005 1098/87 $3.00+0.

0~
Printed in Great Britain. Pergamon Journals Ltd.
~ 1987 International Federation of Automatic Control

Generalized Predictive Control Part I. The Basic


Algorithm*

D. W. CLARKEt, C. M O H T A D I t and P. S. TUFFS~:

A new member of the family of long-range predictive controllers is shown to be suitable


for the adaptive control of processes with varying parameters, dead-time and model-
order.

Key Words--Adaptive control; predictive control; LQ control; self-tuning control; nonminimum-phase


plant.

Akstraet--Current self-tuning algorithms lack robustness to (1) a nonminimum-phase plant: most continuous-
prior choices of either dead-time or model order. A novel time transfer functions tend to exhibit discrete-time
method--generalized predictive control or GPC--is developed
which is shown by simulation studies to be superior to accepted zeros outside the unit circle when sampled at a fast
techniques such as generalized minimum-variance and pole- enough rate (see Clarke, 1984);
placement. This receding-horizon method depends on predicting (2) an open-loop unstable plant or plant with
the plant's output over several steps based on assumptions
about future control actions. One assumption--that there is a badly-damped poles such as a flexible spacecraft or
"control horizon" beyond which all control increments become robots;
zero--is shown to be beneficial both in terms of robustness and (3) a plant with variable or unknown dead-time:
for providing simplified calculations. Choosing particular values
of the output and control horizons produces as subsets of the some methods (e.g. minimum-variance self-tuners,
method various useful algorithms such as GMV, EPSAC, /~str6m and Wittenmark, 1973) are highly sensitive
Peterka's predictive controller (1984, Automatica, 20, 39-50) to the assumptions made about the dead-time and
and Ydstie's extended-horizon design (1984, IFAC 9th World
Congress, Budapest, Hungary). Hence GPC can be used either approaches (e.g. Kurz and Goedecke, 1981) which
to control a "simple" plant (e.g. open-loop stable) with little attempt to estimate the dead-time using operating
prior knowledge or a more complex plant such as nonminimum- data tend to be complex and lack robustness;
phase, open-loop unstable and having variable dead-time. In
particular GPC seems to be unaffected (unlike pole-placement (4) a plant with unknown order: pole-placement
strategies) if the plant model is overparameterized. Furthermore, and LQG self-tuners perform badly if the order of
as offsets are eliminated by the consequence of assuming a the plant is overestimated because of pole/zero
CARIMA plant model, GPC is a contender for general self-
tuning applications. This is verified by a comparative simulation cancellations in the identified model, unless special
study. precautions are taken.
The method described in this paper--General-
ized Predictive Control or GPC--appears to over-
1. INTRODUCTION come these problems in one algorithm. It is capable
ALTHOUGHSELF-TUNINGand adaptive control has of stable control of processes with variable parame-
made much progress over the previous decade, ters, with variable dead-time, and with a model
both in terms of theoretical understanding and order which changes instantaneously provided that
practical applications, no one method proposed so the input/output data are sufficiently rich to allow
far is suitable as a "general purpose" algorithm for reasonable plant identification. It is effective with
the stable control of the majority of real processes. a plant which is simultaneously nonminimum-
To be considered for this role a method must be phase and open-loop unstable and whose model
applicable to: is overparameterized by the estimation scheme
without special precautions being taken. Hence it
* Received 2 March 1985; revised 7 July 1985; revised 3 March is suited to high-performance applications such as
1986; revised 22 September 1986. The original version of this the control of flexible systems.
paper was not presented at any IFAC meeting. This paper was
recommended for publication in revised form by Associate
Hitherto the principal applied self-tuning
Editor M. Gevers under the direction of Editor P. C. Parks. methods have been based on the "Generalized
t Department of Engineering Science, Parks Road, Oxford Minimum-Variance" approach (Clarke and
OXI 3PJ, U.K. Gawthrop, 1975, 1979) and the pole-placement
Aluminum Company of America, Alcoa Technical Center,
Pittsburgh, PA 15069, U.S.A. algorithm (Wellstead et al., 1979; /~str6m and

AUT 23/2 - A
137
138 1). W. CLARKk et al.

Wittenmark, 1980). The implicit GMV self-tuner If the plant has a non-zero dead-time the leading
(so-called because the controller parameters are elements of the polynomial B(q- ~) are zero. In (1),
directly estimated without an intermediate calcul- u(t) is the control input, .~t) is the measured variable
ation) is robust against model order assumptions or output, and x(t) is a disturbance term.
but can perform badly if the plant dead-time varies. In the literature x(t) has been considered to be
The explicit pole-placement method, in which a of moving average form:
Diophantine equation is numerically solved as a
bridging step between plant identification and the x(t) = C(q- ~)~.(t) (2)
control calculation, can cope with variable dead-
time but not with a model with overspecified order.
where C ( q - 1 ) = I + clq ~ + ' + c,cq -"c.
Its good behaviour with variable dead-time is due
In this equation, ¢(t) is an uncorrelated random
to overparameterization of the numerator dynamics
sequence, and combining with (I) we obtain the
B(q - 1); this means that the order of the denominator
CARMA (Controlled Auto-Regressive and Mov-
dynamics has to be chosen with great care to avoid
ing-Average) model:
singularities in the resolution of the Diophantine
identity. The G P C approach being based on an
explicit plant formulation can deal with variable A(q- l)y(t) = B ( q ~ 1)u(t - I)
dead-time, but as it is a predictive method it can + C(q- l)~(t). (3)
also cope with overparameterization.
The type of plant that a self-tuner is expected to
Though much self-tuning theory is based on this
control varies widely. On the one hand, many
model it seems to be inappropriate for many
industrial processes have "simple" models: low
industrial applications in which disturbances are
order with real poles and probably with dead-time.
non-stationary. In practice, two principal disturb-
For some critical loops, however, the model might
ances are encountered: random steps occuring at
be more complex, such as open-loop unstable,
random times (for example, changes in material
underdamped poles, multiple integrators. It will be
quality) and Brownian motion (found in plants
shown that GPC has a readily-understandable
relying on energy balance). In both these cases an
default operation which can be used for a simple
appropriate model is:
plant without needing the detailed prior design of
many adaptive methods. Moreover, at a slight
increase of computational time more complex pro- x(t) = C ( q - 1)~(t)/A (4)
cesses can be accommodated by GPC within the
basic framework. where A is the differencing operator I - q - 1 .
All industrial plants are subjected to load-dis- Coupled with (1) this gives the CARIMA model
turbances which tend to be in the form of random- (integrated moving-average):
steps at random times in the deterministic case or
of Brownian motion in stochastic systems. To A ( q - l)y(t) = B(q l)u(t - 1)
achieve offset-free closed-loop behaviour given
these disturbances the controller must possess + C ( q - l)~(t)/A.
inherent integral action. It is seen that GPC adopts
an integrator as a natural consequence of its This model has been used by Tufts and Clarke
assumption about the basic plant model, unlike the (1985) to derive GMV and pole-placement self-
majority of designs where integrators are added in tuners with inherent integral action. For simplicity
an ad hoc way. in the development here C ( q - 1 ) is chosen to be 1
(alternatively C-1 is truncated and absorbed into
2. THE CARIMA PLANT MODEL AND OUTPUT the A and B polynomials; see Part II for the case
PREDICTION
of general C) to give the model:
When considering regulation about a particular
operating point, even a non-linear plant generally
admits a locally-linearized model: A ( q - 1 ) y ( t ) = B(q 1)u(t - l) + ~(tffA. (5)

A(q l)y(t) = B(q-1)u(t - 1) + x(t) (1) To derive a j-step ahead predictor of ~t + j )


based on (5) consider the identity:
where A and B are polynomials in the backward
shift operator q-1:
1 = E~q-1)AA + q-JFj~q-l) (6)
A(q -1) = 1 + a l q -1 + .., + a,~q -"~
where Ej and Fj are polynomials uniquely defined
B(q -1) = b o + b l q -~ + ... + bnbq -rib. given A ( q - 1 ) and the prediction interval j. If (5) is
Generalized predictive c o n t r o l - - P a r t I 139

multiplied by EjAq j we have: Subtracting (9) from (10) gives:

EjAAy(t + j) = EjBAu(t + j - 1) 0 = .4(R - E) + q-J(q-1S - F).

+ Ej¢(t + j)
The polynomial R - E is of degree j and may be
split into two parts:
and substituting for EjAA from (6) gives:

R- E = ~ + rjq -j
y(t + j) = EjBAu(t + j - 1)
+ Fjy(t) + E~(t + j). (7)
so that:

As Ej(q-1) is of degree j - 1 the noise components


~IR + q - J ( q - t S - F + ,4rj) = O.
are all in the future so that the optimal predictor,
given measured output data up to time t and any
given u(t + i) for i > l, is clearly: Clearly then /~ = 0 and also S is given by
Sq( F - ,~rj).
As ,4 has a unit leading element we have:
9(t + j It) = GjAu(t + j - 1) + Fjy(t) (8)

rj -~ fo (1 la)
where Gj(q-1) = EjB.
Note that Gj(q- 1) = B(q- 1)[1 - q-~Fj(q- t)]/
A(q- t)A so that one way of computing G~ is simply Si = f i + 1 - - ~li+ l r i (1 lb)
to consider the Z-transform of the plant's step-
response and to take the first j terms (Clarke and for i = 0 to the degree of S(q-1);
Zhang, 1985).
In the development of the GMV self-tuning
and: R ( q - i ) = E(q-1) + q-Jrj (12)
controller only one prediction ~(t + kit) is used
where k is the assumed value of the plant's dead-
time. Here we consider a whole set of predictions Gj+ I = B(q- 1)R(q- 1). (13)
for which j runs from a minimum up to a large
value: these are termed the minimum and maximum Hence given the plant polynomials A(q -1) and
"prediction horizons". For j < k the prediction B(q-1) and one solution Ej(q-a) and Fj(q-1) then
process .P(t + J l t) depends entirely on available (11) can be used to obtain Fj+~(q -1) and (12) to
data, but for j >/k assumptions need to be made give E j+ l(q- 1) and so on, with little computational
about future control actions. These assumptions effort. To initialize the iterations note that forj = 1:
are the cornerstone of the GPC approach.
1 --- E1.4 + q-1Ft
2.1. Recursion of the Diophantine equation
One way to implement long-range prediction is
and as the leading element of ,4 is 1 then:
to have a bank of self-tuning predictors for each
horizon j; this is the approach of De Keyser
and Van Cauwenberghe (1982, 1983) and of the E1 = 1, F1 = q(1 - ,']).
MUSMAR method (Mosca et al., 1984). Altern-
atively, (6) can be resolved numerically for E i and The calculations involved, therefore, are straightfor-
F i for the whole range of js being considered. ward and simpler than those required when using
Both these methods are computationally expensive. a separate predictor for each output horizon.
Instead a simpler and more effective scheme is to
use recursion of the Diophantine equation so that 3. THE PREDICTIVE CONTROL LAW
the polynomials Ej+I and Fj+I are obtained given Suppose a future set-point or reference sequence
the values of Ej and Fj. [w(t + j); j = 1,2 .... ] is available. In most cases
Suppose for clarity of notation E = E j, R = E j . 1, w(t + j) will be a constant w equal to the current set-
F = Fj, S = Fj+ ~ and consider the two Diophantine point w(t), though sometimes (as in batch process
equations with $ defined as AA: control or robotics) future variations in w(t + j )
would be known. As in the IDCOM algorithm
1 = EA + q-iF (9) (Richalet et al., 1978) it might be considered that a
smoothed approach from the current output Xt) to
1 = R.4 + q-tJ+ 1~S. (10) w is required which is obtainable from the simple
140 D . W . CLARKE et al.

w set- point

jJ Predicted output
//-
J
Y

I t +INu I !.
t-2 t t~l t+N Time t

u [-- Projected controts

FIG. 1. Set-point, control and outputs in GPC.

first-order lag model: polynomials, which means that the fast Diophantine
recursion is useful for adaptive control applications
w(t) = y(t) of the G P C method.
Consider a cost function of the form:
w(t + j ) = ~w(t + j - 1)

+(1 - a ) w j = l , 2 ....
t~j=N 1
where ~ ~ 1 for a slow transition from the current
measured-variable to the real set-point w. G P C is
capable of considering both constant and varying
future set-points.
+ ~ i(j)[Au(t + j - It] 2
j=l
} (14)

The objective then of the predictive control law where:


is to drive future plant outputs Xt + j ) "close" to
w(t + j) in some sense, as shown in Fig. 1, bearing N 1 is the minimum costing horizon;
in mind the control activity required to do so. This N2 is the maximum costing horizon, and
is done using a receding-horizon approach for ).(j) is a control-weighting sequence.
which at each sample-instant t:
(1) the future set-point sequence w(t + j) is calcu- The expectation in (14) is conditioned on data up
lated; to time t assuming no future measurements are
(2) the prediction model of (8) is used to generate available (i.e. the set of control signals are applied
a set of predicted outputs ~(t +jlt) with corre- in open-loop in the sequel). As mentioned earlier,
sponding predicted system errors e(t +j) the first control is applied and the minimization is
=w(t+j)-p(t+jlt) noting that p(t+j[t) for repeated at the next sample. The resulting control
j > k depends in part on future control signals law belongs to the class known as Open-Loop-
u(t + i) which are to be determined; Feedback-Optimal control (Bertsekas, 1976). Appen-
(3) some appropriate quadratic function of the dix A examines the relation between G P C and
future errors and controls is minimized, assuming Closed-Loop-Feedback-Optimal when the disturb-
that after some "control horizon" further incre- ance process is autoregressive. It is seen that costing
ments in control are zero, to provide a suggested on the control is over all future inputs which affect
sequence of future controls u(t + j); the outputs included in J. In general N2 is chosen
(4) the first element u(t) of the sequence is asserted to encompass all the response which is significantly
and the appropriate data vectors shifted so that the affected by the current control; it is reasonable that
calculations can be repeated at the next sample it should at least be greater than the degree of
instant. B(q -1) as then all states contribute to the cost
Note that the effective control law is stationary, (Kailath, 1980), but more typically N2 is set to
unlike a fixed-horizon LQ policy. However, in the approximate the rise-time of the plant. N 1 can often
self-tuned case new estimates of the plant model be taken as 1; if it is known a priori that the dead-
parameters requires new values for the parameter time of the plant is at least k sample-intervals then
Generalized predictive c o n t r o l - - P a r t I 141

N1 can be chosen as k or more to minimize go 0


computations. It is found, however, that a large gt go
class of plant models can be stabilized by G P C G=
with default values of 1 and 10 for N1 and N2. Part
II provides a theoretical justification for these
gN- 1 gN- 2 go
choices of horizon. For simplicity in the derivation,
below 2(j) is set to the constant 2, N1 to 1 and N 2
Note that if the plant dead-time is k > 1 the first
to N: the "output horizon".
k - 1 rows of G will be null, but if instead N1 is
Recall that (7i models the future outputs:
assumed to be equal to k the leading element is
non-zero. However, as k will not in general be
y(t + 1) = GxAu(t) + Fly(t ) + E ~ ( t + 1) known in the self-tuning case one key feature of
y(t + 2) = G2Au(t + 1) + F2y(t) + E2~(t + 2) the G P C approach is that a stable solution is
possible even if the leading rows of G are zero.
From the definitions of the vectors above and
with:
y(t + N) = GNAu(t + N - 1)
+ FNy(t) + EN~(t + N).
w = [w(t + 1), w(t + 2) ..... w(t + N)] T
Consider Xt +j), It consists of three terms: one
depending on future control actiol,s yet to be the expectation of the cost-function of (14) can be
determined, one depending on past known controls written:
together with filtered measured variables and one
depending on future noise signals. The assumption J1 ~-- E{J(I, N)}
that the controls are to be performed in open-loop
= E{(y - w)T(y -- W) + 2iiTii} (16)
is tantamount to ignoring the future noise sequence
{~(t + j)} in calculating the predictions. Let f ( t + j)
be that component of Xt + j) composed of signals i.e.
which are known at time t, so that for example:
Jl = {(Gii + f - w)T(Gii + f - w) + 2iiTii}.
f ( t + 1) = [GI( q - 1) _ glo]Au(t)
The minimization of J1 assuming no constraints
+ Fly(t), and on future controls results in the projected control-
f ( t + 2) = q[G2(q- 1) _ q - tg21 increment vector:

-- g20]Au(t) + F2y(t), fi = (GTG + 2I)- 1Gr(w - f). (17)


etc.
Note that the first element of fi is Au(t) so that
where Gi( q - 1)= gio + gilq-1 + . . . . the current control u(t) is given by:

u(t) = u(t - 1) + ~T(w - f) (I 8)


Then the equations above can be written in the key
vector form:
where ~r is the first row of(GTG + 2I)- tGT. Hence
the control includes integral action which provides
9 = Ga + f (15)
zero offset provided that for a constant set-point
w(t + i) = w, say, the vector finvolves a unit steady-
where the vectors are all N x 1: state gain in the feedback path.
Now the Diophantine equation (6) for q = 1 gives
= [j~(t + 1),j~(t + 2 ) , . . . , ~ t + N)] T
ii _ [Au(t), Au(t + 1). . . . . Au(t + N - 1)] T 1 = Ej(1)A(1)A(I) + Fj(1)

f = [ f ( t + 1),f(t + 2),...,f(t + N)] r.


and as A ( 1 ) = 0 then F j ( 1 ) = I so that
f ( t + j) = Fj)~t) is a signal whose mean value equals
As indicated earlier, the first j terms in Gj(q- 1) are that of y(t). Furthermore, defining F j ( q - i ) to be
the parameters of the step-response and therefore Ej(q- 1).~(q- 1) gives:
g~j = g~ for j = 0, I, 2 .... < i independent of the
particular G polynomial. Fj(q- 1)y(t) = (1 - F~(q- l)A)y(t)
The matrix G is then lower-triangular of dimen-
sion N x N: = y(t) - F jAy(t)
142 D . W . CLARKE et al.

which shows that if y(t) is the constant y so that of dimension N U and the prediction equations
A3~t) = 0 then the component Fjlq-1)~t} reduces reduce to:
to f. This, together with the control given by (18),
ensures offset-free behaviour by integral action. ~=G~ii+f

3,1. The control horizon where:


The dimension of the matrix involved in (17) is
N x N. Although in the non-adaptive case the -go 0 0
inversion need be performed once only, in a self- gl go 0
tuning version the computational load of inverting
at each sample would be excessive. Moreover, if GI= isN xNU.
go
the wrong value for dead-time is assumed, GVG is
singular and hence a finite non-zero value of
weighting 2 would be required for a realizable gN- 1 gN- 2 gN - Nu

control law, which is inconvenient because the


"correct" value for 2 would not be known a priori. The corresponding control law is given by:
The real power of the G P C approach lies in the
assumptions made about future control actions. fi = [ G ~ G I + ).I]- lG~(w - f) (20)
Instead of allowing them to be "free" as for the
above development, G P C borrows an idea from and the matrix involved in the inversion is of the
the Dynamic Matrix Control method of Cutler and much reduced dimension N U × NU. In particular,
Ramaker (1980). This is that after an interval if N U = 1 (as is usefully chosen for a "simple"
N U < N 2 projected control increments are assumed plant), this reduces to a scalar computation. An
to be zero, example of the computations involved is given in
Appendix B.
i.e. Au(t + j - 1) = 0 j > NU. (19)
3.2. Choice of the output and control horizons
The value N U is called the "control horizon". In Simulation exercizes on a variety of plant models,
cost-function terms this is equivalent to placing including stable, unstable and nonminimum-phase
effectively infinite weights on control changes after processes with variable dead-time, have shown how
some future time. For example, i f N U = 1 only one N 1 , N 2 and N U should best be selected, These
control change (i.e. Au(t)) is considered, after which studies also suggest that the method is robust
the controls u(t + j) are all taken to be equal to against these choices, giving the user a wide latitude
u(t). Suppose for this case that at time t there is a in his design.
step change in w(t) and that N is large. The choice
of u(t) made by G P C is the optimal "mean-level" 3.2.1. NI: The minimum output horizon. If the
controller which, if sustained, would place the dead-time k is exactly known there is no point in
settled plant output to w with the same dynamics setting N1 to be less than k since there would then be
as the open-loop plant. This control law (at least superfluous calculations in that the corresponding
for a simple stable plant) gives actuations which outputs cannot be affected by the first action u(t).
are generally smooth and sluggish. Larger values If k is not known or is variable, then N1 can be set
of N U, on the other hand, provide more active to 1 with no loss of stability and the degree of
controls. B(q-1) increased to encompass all possible values
One useful intuitive interpretation of the use of k.
of a control horizon is in the stabilization of
nonminimum-phase plant. If the control weighting 3.2.2. N 2 : The maximum output horizon. If the
2 is set to zero the optimal control which minimizes plant has an initially negative-going nonminimum-
J 1 is a cancellation law which attempts to remove phase response, N 2 should be chosen so that the
the process dynamics using an inverse plant model later positive-going output samples are included in
in the controller. As is well known, such (minimum- the cost: in discrete-time this implies that N z exceeds
variance) laws are in practice unstable because the degree of B(q- 1) as demonstrated in Appendix
they involve growing modes in the control signal B. In practice, however, a rather larger value of N2
corresponding to the plant's nonminimum-phase is suggested, corresponding more closely to the rise-
zeros. Constraining these modes by placing infinite time of the plant.
costing on future control increments stabilizes the
resulting closed-loop even if the weighting 2 is zero. 3.2.3. NU: The control horizon. This is an import-
The use of N U < N moreover significantly reduces ant design parameter. For a simple plant (e.g. open-
the computational burden, for the vector fi is then loop stable though with possible dead-time and
Generalized predictive control--Part I 143

nonminimum-phasedness) a value of N U of 1 gives considered as subsets of the G P C approach so that


generally acceptable control. Increasing N U makes accepted theoretical (e.g. convergence and stability)
the control and the corresponding output response and practical results can be extended to this new
more active until a stage is reached where any method.
further increase in N U makes little difference. An The concept of using long-range prediction as a
increased value of N U is more appropriate for potentially robust control tool is due to Richalet
complex systems where it is found that good control et al. (1978) in the IDCOM algorithm. This method,
is achieved when N U is at least equal to the number though reportedly having some industrial success,
of unstable or badly-damped poles. is restricted by its assumption of a weighting-
One interpretation of these rules for chosing N U sequence model (all-zeros), with an ad hoc way of
is as follows. Recall that GPC is a receding- solving the offset problem and with no weighting
horizon LQ control law for which the future control on control action. Hence it is unsuitable for unstable
sequence is recalculated at each sample. For a or nonminimum-phase open-loop plants. The
simple, stable plant a control sequence following a D M C algorithm of Cutler and Ramaker (1980) is
step in the set-point is generally well-behaved (for based on step-response models but does include
example, it would not change sign). Hence there the key idea of a control horizon. Hence it is
would not be significant corrections to the control effective for nonminimum-phase plants but not
at the next sample even if N U = 1. However, it is for open-loop unstable processes. Again the offset
known from general state-space considerations that problem is dealt with heuristically and moreover
a plant of order n needs n different control values the use of a step-response model means that the
for, say, a dead-beat response. With a complex savings in parameterization using a A(q-1) poly-
system these values might well change sign frequ- nomial are not available. Clarke and Zhang (1985)
ently so that a short control horizon would not compare the IDCOM and DMC designs.
allow for enough degrees of freedom in the deriv- The GMV approach of Clarke and Gawthrop
ation of the current action. (1975) for a plant with known dead-time k can be
Generally it is found that a value of N U of 1 is seen to be a special case of GPC in which both the
adequate for typical industrial plant models, minimum and maximum horizons N1 and N2 are
whereas if, say, a modal model is to be stabilized set to k and only one control signal (the current
N U should be set equal to the number of poles control u(t) or Au(t)) is weighted. This method is
near the stability boundary. If further damping of known to be robust against overspecification of
the control action is then required 2 can be increased model-order but it can only stabilize a certain class
from zero. Note in particular that, unlike with of nonminimum-phase plant for which the control
GMV, G P C can be used with a nonminimum- weighting 2 has to be chosen with reasonable care.
phase plant even if 2 is zero. Moreover, GMV is sensitive to varying dead-time
The above discussion implies that GPC can be unless 2 is large, with correspondingly poor control.
considered in two ways. For a process control GPC shares the robustness properties of GMV
default setting of N 1 = 1, N 2 equal to the plant rise- without its drawbacks.
time and N U = 1 can be used to give reasonable By choosing N1 = N 2 --- d > k and N U -- 1 with
performance. For high-performance applications 2 = 0, GPC becomes Ydstie's (1984) extended-
such as the control of coupled oscillators a larger horizon approach. This has been shown theoret-
value of N U is desirable. ically to be a stabilizing controller for a stable
nonminimum-phase plant. Ydstie, however, uses a
4. R E L A T I O N S H I P W I T H O T H E R A P P R O A C H E S CARMA model and the method has not been
G P C depends on the integration of five key shown to stabilize open-loop unstable processes.
ideas: the assumption of a CARIMA rather than Indeed, for a plant with poorly damped poles
a CARMA plant model, the use of long-range simulation experience shows that the extended-
prediction over a finite horizon greater than the horizon method is unstable, unlike the GPC design.
dead-time of the plant and at least equal to the This is because in this case more than one future
model order, recursion of the Diophantine equ- output needs to be accounted for in the cost-
ation, the consideration of weighting of control function for stability (i.e. N 2 > N1).
increments in the cost-function, and the choice of With N I = 1, N z = d > k and N U = 1 with
a control horizon after which projected control 2 = 0 and a CARIMA model, GPC reduces to
increments are taken to be zero. Many of these the independently-derived EPSAC algorithm (De
ideas have arisen in the literature in one form or Keyser and Van Cauwenberghe, 1985). This was
another but not in the particular way described shown by the authors to be a particularly useful
here, and it is their judicious combination which method with several practical applications; this is
gives G P C its power. Nevertheless, it is useful verified by the simulations described below where
to see how previous successful methods can be the "default" settings of G P C that were adopted
144 I). W. CLARKE et al.

with N 2 = 10 are similar to those of EPSAC Part TABLE l, TRANSIER-FUNCTIONS Ot THE SIMlr
LATED MODELS
lI of this paper gives a stability result for these
settings of the GPC horizons. Number Samples Model

Peterka's elegant predictive controller (1984) is I 1 79


1

nearest in philosophy to GPC: it uses a CARIMA- I + 10s + 40s 2

like model and a similar cost-function, though 2 80-159 e 2....


f + 10s + 40s 2
concentrating on the case where N2--, ~. The
3 160-239 e .,7~
algorithmic development is then rather different I + 10s
from GPC, relying on matrix factorization and l
4 240 -319
decomposition for the finite-stage case, instead of 1 + 10s
1
5 320-400
the rather more direct formulation described here. 10s(l + 2.5s)
Though Peterka considers two values of control
weighting (2 x for the first set of controls and 22 for
the final 6B steps), he does not consider the useful
GPC case where 22 = ~,. GPC is essentially a
the simulations were chosen to illustrate the relative
finite-stage approach with a restricted control hor-
robustness and adaptivity of the methods. The
izon. This means (though not considered here) that
models are given as Laplace transforms and the
constraints on both future controls and control
sampling interval was chosen in all cases to be 1 s.
rates can be taken into account by suitable modi-
Figure 2 shows the behaviour of a fixed digital
fications of tile GPC calculations - a generalization
which is impossible to achieve in infinite-stage PID regulator which was chosen to give reasonable
designs. Nevertheless, the Peterka procedure is an if rather sluggish control of the initial plant. It
was implemented in interacting PID form with
important and applicable approach to adaptive
control. numerator dynamics of (I + 10s + 25s z) and with
a gain of 12. For models 1 and 5 this controller
5, A S I M U L A T I O N STUDY
gave acceptable results but its performance was
The objective of this study is to show how an poor for the other models with evident excessive
gain. Despite integral action (with desaturation)
adaptive GPC implementation can cope with a
offset is seen with models 3 and 4 due to persistent
plant which changes in dead-time, in order and in
control saturation.
parameters compared with a fixed PID regulator,
with a GMV self-tuner and with a pole-placement The first adaptive controller to be considered
self-tuner. The PID regulator was chosen to give was the GMV approach of Clarke and Gawthrop
(1975, 1979) using design transfer-functions:
good control of the initial plant model which for
this case was assumed to be known. For simplicity
all the adaptive methods used a standard recursive-
p(q- 1) = (1 - 0.5q-1)/0.5 and
least-squares parameter estimator with a fixed for- Q(q- 1) = (1 - q- ~)/(1-0.5q- ~),
getting-factor of 0.9 and with no noise included in
the simulation. with the "detuned model-reference" interpretation.
The graphs display results over 400 samples of This implicit self-tuner used a k-step-ahead predi-
simulation for each method, showing the control ctor model with 2F(q-1) and 5 G(q-1) parameters
signal in the range - 100 to 100, and the set-point and with an adopted fixed value for k of 2. The
w(t) with the output )~t) in the range - 1 0 to 80. detuned version of GMV was chosen as the dead-
The control signal to the simulated process was time was known to be varying and the use of Q(q- 1)
clipped to lie in [ - 100, 100], but no constraint was makes the design less sensitive to the value of k.
placed on the plant output so that the limitations Note in particular that for models 2 and 3 the
on ~(t) seen in Fig. 4 are graphical with the actual real dead-time is greater than in the two samples
output exceeding the displayed values. assumed.
Each simulation was organized as follows. Dur- The simulation results using GMV are shown in
ing the first 10 samples the control signal was fixed Fig. 3; reasonable if not particularly "tight" control
at 10 and the estimator (initialized with parameters was achieved for models 1, 3, 4 and 5. The weighting
[1,0,0 .... ]) was enabled for the adaptive control- of control increments (as found in other cases)
lers. A sequence of set-point changes between three contributes to the overshoots in the step responses.
distinct levels was provided with switching every The behaviour with model 2 was, however, less
20 samples. After every 80 samples the simulated acceptable with poorly damped transients. Never-
continuous-time plant was changed, following the theless, the adaptation mechanism worked well and
models given in Table 1. It is seen that these changes the responses are certainly better than with the
in dynamics are large, and though it is difficult to nonadaptive PID controller.
imagine a real plant varying in such a drastic way, An increasingly popular method in adaptive
Generalized predictive c o n t r o l - - P a r t I 145

60 o/~ Output (Y )

-la*/°
'~ 400
Systeml~ change System chonge

Controt signal
IOO*/~

0",

-I00"/@
400

FIG. 2. The fixed PID controller with the variable plant.

60 °/° - Output ( Y

-ioo/° ~• ,1I 11 ' t' ' t ' '


System ~ change System~ change System change System change ~oo
Contro I. signaL

400

FIG. 3. The behaviour of the adaptive GMV controller.

control is pole-placement (Wellstead et al., 1979) as 3 and 4, however, the algorithm is entirely ineffective
variations in plant dead-time can be catered for due to singularities in the Diophantine solution.
using an augmented B(q-1) polynomial. To cover This verifies the observations that pole-placement
the range of possibilities of dead-time here 2A(q- ~) is sensitive to model-order changes. In other cases,
and 6B(q -1) parameters were estimated and the even though the response is good, the control is
desired pole-position was specified by a polynomial rather "jittery".
p(q-l) = 1 - 0 . 5 q -1 (i.e. like the G M V case The G P C controller involved the same numbers
without detuning). Figure 4 shows how an adaptive of A and B (2 and 6) parameters as in the pole-
pole-placer which solves the corresponding placement simulation. Default settings of the output
Diophantine equation at each sample coped with and control horizons were chosen with N 1 = I,
the set of simulated models. For cases 1, 2 and 5 N 2 = 10 and NU = 1 throughout, as it has been

the output response is good with less overshoot found that this gives robust performance. Figure 5
than the G M V approach. For the first-order models shows the excellent behaviour achieved in all cases
146 D.W. CLARKEet al.

6 0 °,~ Output ( Y ]

, I

-IOO/o
i t ,
System change Systerr change System change System change 400

Control signal
lOG °/*

0 */*

-IOO°/o
0 400

FIG. 4. The behaviour of the adaptive pole-placer.

6O*/o Output ( Y )

- i o °/o
o

Control signal

ooI I I o
. . . . . i I
aoo

FIG. 5. The behaviour of the adaptive GPC algorithm.

by the GPC algorithm. For each new model only when used on a plant which has large dynamic
at most two steps in the set-point were required for variations.
full adaptation, but more importantly there is no Montague and Morris (1985) report a compar-
sign of instability, unlike all the other controllers. ative study of GPC, LQG, GMV and pole-place-
ment algorithms for control of a heat-exchanger
6. CONCLUSIONS with variable dead-time (12-85s, sampled at 6s
This paper has described a new robust algorithm intervals) and for controlling the biomass of a
which is suitable for challenging adaptive control penicillin fermentation process. The controllers
applications. The method is simple to derive and were programmed on an IBM PC in pro-
to implement in a computer; indeed for short Fortran/proPascal. Their paper concludes that the
control horizons GPC can be mounted in a micro- GPC approach behaved consistently in practice
computer. A simulation study shows that GPC is and that "the LQG and GPC algorithms gave the
superior to currently accepted adaptive controllers best all-round performance", the GPC method
Generalized predictive control--Part I 147

being preferred for long time-delay processes, and e = [El¢(t + 1),E2~(t + 2). . . . . EN¢(t + N)] r.
it confirms that GPC is simple to implement and
Clearly as e is a stochastic process the expected value of the
t o use. cost subject to appropriate conditions must be minimized. The
The GPC method is a further generalization of cost to be minimized therefore becomes
the well-known GMV approach, and so can be
Jl = E{(y - w)T(y - w) + )~firfi}.
equipped with design polynomials and transfer-
functions which have interpretations as in the GMV Two different assumptions will be made in the next section
case. The companion paper Part II, which follows, about the class of admissible controllers for the minimization
explores these ideas and presents simulations which of the cost above. Only models of autoregressive type are
considered:
show how GPC can be used for more demanding
control tasks. A(q- l)y(t) = B(q- ~)u(t - 1) + ¢(t)/A.

REFERENCES In the general case of CARIMA models where the disturbances


Astrrm, K. J. and B. Wittenmark (1973). On self-tuning regula- are non-white the predictionsf(t + i) are only optimal asymptot-
tors. Automatica, 9, 185-199. ically as they have poles at the zeros of the C(q- 1) and the effect
,~strrm, K. J. and B. Wittenmark (1980). Self-tuning controllers of initial conditions is only eliminated as time tends to infinity.
based on pole-zero placement. Proc. lEE, 127D, 120-130. The closed-loop policy requires an optimal Kalman filter with
Bertsekas, D. P. (1976). Dynamic Programming and Stochatic time-varying filter gains, see Schweppe (1973); the parameters
Control. Academic Press, New York. of the C-polynomial are only the gains of the steady-state
Clarke, D. W. (1984). Self-tuning control of nonminimum-phase Kalman filter once convergence is attained. Thus the closed-
systems. Automatica, 20, 501-517. loop and the open-loop-feedback policies examined below are
Clarke, D. W. and P. J. Gawthrop (1975). Self-tuning controller. different in the case of coloured noise.
Proc. IEE, 122, 929-934.
Clarke, D. W. and P. J. Gawthrop (1979). Self-tuning control. A.1. RELATION O F G P C AND O P E N - L O O P -
Proc. IEE, 126, 633-640. FEEDBACK-OPTIMAL CONTROL
Clarke, D. W. and L. Zhang (1985). Does long-range predictive In this strategy it is assumed that the future control signals
control work? lEE Conference "Control 85", Cambridge. are independent of future measurements (i.e. all will be performed
Cutler, C. R. and B. L. Ramaker (1980). Dynamic Matrix in open-loop) and we calculate the set fi such that it minimizes
Control--A Computer Control Algorithm. JACC, San Franci- the cost J~. The first control in the sequence is applied and at
sco. the next sample the calculations are repeated. The cost becomes:
De Keyser, R. M. C. and A. R. Van Cauwenberghe (1982).
Typical application possibilities for self-tuning predictive
Jl = E{iiT(GrG + 2I)fi + 2/ir(GT(f- W) + Gre)
control. I F A C Syrup. Ident. Syst. Param. Est., Washington.
De Keyser, R. M. C. and A. R. Van Cauwenberghe (1983). + frf + ere + WTW+ 2fr(e _ w) -- 2eTw}.
Microcomputer-controlled servo system based on self-adap-
tive long-range prediction. Advances in Measurement and Because of the assumption above, E{/iTGTe} = 0; note also that
Control---MECO 1983. the cost is only affected by the first two terms. By putting the
De Keyser, R. M. C. and A. R. Van Cauwenberghe (1985). first derivative of the cost equal to zero one obtains:
Extended prediction self-adaptive control. I F A C Syrup. ldent.
Syst. Param. Est., York. fi = (GrG + 21)- IGT(w - t).
Kailath, T. (1980). Linear Systems. Prentice-Hall, Englewood
Cliffs, NJ.
A.2. RELATION O F G P C AND C L O S E D - L O O P -
Kurz, H. and W. Goedecke (1981). Digital parameter-adaptive
FEEDBACK-OPTIMAL CONTROL
control of processes with unknown dead time. Automatica,
17, 245-252. Choose the set ii such that the cost Jl is minimized subject
Montague, G. A. and A. J. Morris (1985). Application of adaptive to the condition that Au(i) is only dependent on data up to time
control: a heat exchanger system and a penicillin fermentation i. This is the statement of causality. In order to find the set ii
process. Third workshop on the theory and application of assume that by some means {Au(t), Au(t + 1). . . . . Au(t + N - 2)}
self-tuning and adaptive control, Oxford, U.K. is available.
Mosca, E., G. Zappa and C. Manfredi (1984). Multistep horizon
self-tuning controllers: the M U S M A R approach. IFAC 9th Jl = E{(Au(t) . . . . .
World Congress, Budapest, Hungary. Au(t + N - 1))(GrG + ~I)(Au(t) . . . . .
Peterka, V. (1984). Predictor-based self-tuning control. Automa-
tica, 20, 39-50. Au(t+N- 1)"r
Richalet, J., A. Rault, J. L. Testud and J. Papon (1978). + 2 i l r ( G r ( f - w))
Model predictive heuristic control: applications to industrial + 2(Au(t) . . . . . Au(t + N - 1))Gre}
processes. Automatica, 14, 413-428.
Schweppe, F. C. (1973). Uncertain Dynamic Systems. Prentice + extra terms independent of minimization.
Hall, Englewood Cliffs, NJ.
Tufts, P. S. and D. W. Clarke (1985). Self-tuning control of Note that in evaluating Au(t + N - 1) the last row Gre is
offset: a unified approach. Proc. IEE, 132D, 100-110. go~ei~(t+N-i) and E { A u ( t + N - 1)¢(t+N)} = 0 by the
Wellstead, P. E., D. Prager and P. Zanker (1979). Pole assignment assumption of partial information. Therefore Au(t + N - 1) can
self-tuning regulator. Proc. lEE, 126, 781-787. be calculated assuming ~(t + N) = 0. From general state-space
Ydstie, B. E. (1984). Extended horizon adaptive control. IFAC considerations it is evident that when minimizing a quadratic
9th World Congress, Budapest, Hungary. cost, assuming a linear plant model with additive noise, the
resulting controller is a linear function of the available measure-
A P P E N D I X A. M I N I M I Z A T I O N PROPERTIES O F G P C ments (i.e. u(t) = - k £ ( t ) where k is the feedback gain and ~(t)
is the state estimate from the appropriate Kalman filter).
Consider the performance index
Au(t + N - 1) = linear function(Au(t + N - 2),
J = (y - w)r(y - w) + 2iiTii where y = Gii + f + e
Au(t+N-3) ..... ~(t+N-1),
where y, w, fi are as defined in the main text and ~(t + N - 2). . . . . y(t),y(t - 1),...).
148 D . W . CLARKE et al.

In calculating Au(t + N 2) the following e x p e c t a t i o n s are zero: For a c o n t r o l l e r of the form Rlq ~lAu{t) = w(t) - S(q ~l,~,t~
EIAult + N 2)~(t + N)] - 0,
EfLAu(t + N 2)~{t + N 1) ~, - 0. 'SO = 'ff'~g i . iO, L,~gt

In order to w o r k out E I A u { t + N - 1)Au(t + N - 2)I, the part .~1 = Y.~,Ji,..'Zg,


of the e x p e c t a t i o n associated with {(t + N - 1) is set to zero as
the control signal Au(t + N 2) c a n n o t be a function of ro = Z ( g a 2 ,.'~.~,
5,(t+N-1). As A u ( t + N - 1 ) is a linear function of
¢ ( t + N - I) this implies that as far as calculation of r, = ~,,glgli,"~gi
Au(t + N - 2) is concerned, Au(t + N - 1) c o u l d be calculated
by a s s u m i n g that {(t + N - 1) and {(t + N) were zero. Similarly, a n d the closed-loop pole-positions are at the roots of
the same a r g u m e n t applies for the rest of control signals at each RAA + q-tSB.
step i a s s u m i n g E { A u ( t + i){(t + j ) t _ 0 f o r ) > i. This implies
that each control signal Au(t + i) is the ith control in the
sequence a s s u m i n g that ¢(t + j ) = 0 for j > i. Hence for Au(t) N2=I
the solution a m o u n t s to calculating the first control signal Au(t) = [w - 1.9y(t) + 0.9y(t - 1} - 2Au(t - 1)]
setting {(t + j) for j > 0 to zero the same as that considered RAA + q-ISB:::>(I + 2q-1).
in part I for an O p e n - L o o p - F e e d b a c k - O p t i m a l controller. Note
that in the case of N U < N 2 the m i n i m i z a t i o n is performed
subject to the c o n s t r a i n t that the last N 2 - N U + 1 control This is the m i n i m u m - p r o t o t y p e c o n t r o l l e r which, because of the
cancellation of the n o n m i n i m u m - p h a s e zero, is unstable.
signals are all equal. C o n s i d e r a t i o n of causality of the c o n t r o l l e r
implies that Au(t + N U - 1) is the first free signal that can be
calculated as a function of d a t a a v a i l a b l e up to time t + N U - 1 N 2 = 2 (i.e. g r e a t e r than deg(B))
in the sequence and the a r g u m e n t a b o v e follows accordingly.
Therefore, the G P C m i n i m i z a t i o n ( O L F O ) is equivalent to the
Au(t) = [w - 1.9y(t) + 0.9y(t - 1) - 2Au(t - 1)
closed-loop policy for m o d e l s of regression type.
+ 3.91w - 2.71y~t} + 1.71y(t - 1)
A P P E N D I X B. AN E X A M P L E F O R A F I R S T O R D E R
PROCESS - 3.8Au(t - 1))]/16.21

This a p p e n d i x e x a m i n e s the relation of N 2 a n d the closed-


loop pole position for a simple example. C o n s i d e r a n o n m i n i m - or~

urn-phase first-order process (first-order + fractional dead-time):


(1 + a l q - 1 ) y ( t } = (b o + b l q - l l u ( t - I) Au(t) = [4.9w - 12.469y(t) + 7.569y(t - 1)

11 -- 0.gq-l)y{t) = (I + 2 q - l)ult -- I).


- 16.82Au(t - 1)]/16.21

B.I. E A N D F P A R A M E T E R S
and:
F r o m the recurrence relationships in the m a i n text it follows
that:
ARA + q-ISB~(I - 0.09q- 1).
e i = 1 -- a l e i_ G.lio - 1 -- JlG.til = eiaa
eo = l:[1.O];flo = (1 - aO:[1.9];.l;~ = a , : [ - 0 . 9 ]
The closed-loop pole is within the unit circle a n d therefore the
e 1 = 1 - a l : [ l . 9 ] ; J 2 o = 1 - al{1 - a 0 : [ 2 . 7 1 ] ; closed-loop is stable. In fact it can easily be d e m o n s t r a t e d that
J21 = a d l - a 0 : [ - 1.71] for all first o r d e r processes N2 > 6 B ( q - 1 ) + k - 1 stabilizes an
/ k
e 2 = 1 - a d l - al):[2.71]; o p e n - l o o p stable plant, for s i g n ( Z g i ] = s i g n ( D . C . g a i n ).
\ /
f3o = 1 a l ( l -- at(1 -- a0):[3.439]
.131 = a d 1 - al(1 - a 0 ) : [ - 2 . 4 3 9 ] -
N2=3
B.2. C O N T R O L L E R PARAMETERS
go = bo: [1.0]; gt 1 = b~: [2.0]
Au(t) = [11.41w - 34.857y{t) + 23.447y(t - 1)
gl = bo{l - al) + bl:[3.9];g22 = bt{1 - a 0 : [ 3 . 8 ]
- 52.104Au(t - 1)]/58.591
g2 = b0(l - al(1 - a~)) + bl(1 - at):[6.51];
g33 = bl( 1 - a d l - a0):[5.42]. and:
A s s u m i n g N U = 1, the effect of N 2 on the control c a l c u l a t i o n
and the closed-loop pole p o s i t i o n is n o w examined: ARA +q ISB=*.(1-0.416q-1).

Au{t) = ( ~ , g d w , - Jioy(t - 1 ) - lily(t - 2))


The pole is a g a i n within the unit circle. N o t e that the closed-
l o o p pole is t e n d i n g t o w a r d s the o p e n - l o o p pole as N 2 increases
- g , A u t t - l)y~ (g~)2. (see Part II).

You might also like