Professional Documents
Culture Documents
TRANSACTIONS
1
Predictive PID
R.M. Miller a,1, S.L. Shah a, R.K. Wood a,*, E.K. Kwok b
a
Department of Chemical and Materials Engineering, University of Alberta, Edmonton, AB, T6G 2G6, Canada
b
Department of Chemical Engineering, University of British Columbia, Vancouver V6T 1Z4, Canada
Abstract
A new stochastic, predictive, proportional-integral-derivative (PID) control law is proposed which is mathematically
equivalent to generalized predictive control (GPC) with a steady state weighting term. The main motivation of this
paper is the extension of the classical PID algorithm on industrial computers to do advanced control without
employing specialized software. The predictive PID constants and the internal model are chosen by equating the dis-
crete PID control law with the linear form of GPC. The result is a long range predictive control law with a model based
PID structure. Use of a ®rst order model yields a PI controller while a second order plant results in a PID structure.
The process model order is restricted to a maximum of two although there is no restriction on the choice of GPC
tuning parameters. Performance of the predictive PID scheme is shown, via simulation, to be identical to GPC. Results
from the use of the predictive PID algorithm for the control of an industrial heat exchanger are also presented. # 1999
Elsevier Science Ltd. All rights reserved.
Keywords: Predictive PID; Model-based control; Stochastic PID
0019-0578/99/$ - see front matter # 1999 Elsevier Science Ltd. All rights reserved.
PII: S0019 -0 578(98)00041 -X
12 R.M. Miller et al. / ISA Transactions 38 (1999) 11±23
2. Generalized predictive control (GPC) The GPC control objective is composed of a sum
of squares prediction error term and a control
Generalized predictive control (GPC) or GPC action penalty term given by
with steady state weighting is chosen as a basis for X
N2
predictive PID for two major reasons. First, the
JE ^ j j t ÿ w
t j2
y
t
receding horizon solution of GPC can be descri-
jN1
bed easily in a linear polynomial representation.
2:6
In comparison, the receding horizon form of X
Nu
2
l
ju
t j ÿ 1
DMC [5] is cumbersome because it is based on a j1
convolution model. Second, GPC is a ``general-
ized'' strategy which includes all desirable proper- where w
t j is the setpoint, l
j is the control
ties of the industry proven MPC formulations. weight, N1 is the minimum prediction horizon, N2
It is assumed that the plant is adequately repre- is the maximum prediction horizon and Nu is the
sented by the ARIMAX model control horizon. Minimization of the performance
index (2.6) with respect to future u yields the
C
qÿ1 GPC control law
A
qÿ1 y
t B
qÿ1 u
t ÿ 1
t
2:1
u~
GT G lIÿ1 GT
w ÿ f
2:7
where A, B, and C are polynomials in the backward
shift operator qÿ1 and y, u, and are the predicted
output, control input and a zero-mean white noise 3. GPC with steady state weighting (gGPC)
disturbance, respectively. The jth step ahead pre-
dictions of (2.1) require the Diophantine identities A terminal matching condition, de®ned as the
given by (the (qÿ1 ) notation is omitted for brevity): weighted square of the steady state error, is inclu-
ded in the GPC cost function (2.6) to derive GPC
C Ej A qÿj Fj
2:2 with g weighting (denoted herein as gGPC [4]).
Computation of the steady state prediction by
Ej B CG~ j qÿj G j
2:3 solving for the steady state value of (2.2) and (2.3)
yields
Long range predictions of the plant output based
on current and past data are given by F s es A
3:1
R.M. Miller et al. / ISA Transactions 38 (1999) 11±23 13
where e
tC , KPC , KIC and KDC are the error, non- 6. The PI/PID form of gGPC
interacting proportional, integral and derivative
constants and the subscript c denotes continuous It has been recognized by McIntosh [6] and
time, respectively. The non-interacting algorithm Henningsen et al. [7] that a discrete PID control
(5.1) was chosen as a basis because it is the sim- law such as (5.5) could be equivalent to standard
plest PID form and interacting forms can be easily GPC given some restrictions in the GPC formula-
derived from it. A ®rst order discretization of (5.1) tion. The conditions under which gGPC is
results in the following discrete control law equivalent to PID are determined in the current
X
t work. For the deterministic (C 1) linear gGPC
u
t KP e
t KI e
i KD e
t ÿ e
t ÿ 1 control law for a second order A polynomial and
i0 zero order B polynomial, a second order plant
5:2 model without time delay, from (4.5), it follows
where t denotes sampled time and that the linear polynomials T, R and S are of
order 0, 0 and 2, respectively, so the control law
KP KPC (4.4) can be written as
KI KIC TS
5:3
K
KD TDSC
u
t r0 w
t ÿ
s0 s1 qÿ1 s2 qÿ2 y
t
6:1
and TS is the sampling interval. The incremental
control law is determined by applying the dier- where ri and si are the coecients of the R and S
encing operator to the control output. polynomials, respectively. Recall that the T poly-
nomial has a leading 1, therefore, a zero order T
u
t
KP KI KD polynomial is unity. Equating the SPI form of the
5:4 PID control law (5.5) and the GPC controller
ÿKP ÿ 2KD qÿ1
KD qÿ2 e
t
(4.4) yields an exact match if
can be expressed in terms of the linear gGPC The GPC control law (cf. 4.2) can be expressed as
coecients by equating (5.5) with (6.1) to yield ( " #)
X
N2
KP ÿ
s1 2s2 s0 ÿ r0 ÿ s2 Cq ÿ1
G j hj G s hs u
t
KI r0
6:4 jN1
( " #) " #
K D s2 X
N2 X
N2
C hj hs w
t ÿ Fj hj Fs hs y
t
jN1 jN1
A ®rst order plant model results in a ®rst order S
polynomial and an equivalent PI controller while
7:1
a second order plant yields a PID controller from which can be rewritten as
the relations in (5.5). A comparison of GPC and
equivalent PID servo and regulatory response is ( " #)
X
N2
shown in Fig. 1 for the unstable plant: u
t C hj hs w
t
jN1
( )
ÿ0:015 X
N2
GP ÿ Fj hj Fs hs y
t
1 ÿ 1:95qÿ1 0:935qÿ2
jN1
(" # )
X
N2
A step disturbance of 0.1 is applied/removed at the ÿ G j hj G s hs
C ÿ 1 u
t ÿ 1
100/150 and 250/300 sampling instants, respectively. jN1
Fig. 1. GPC and equivalent PID control response to a discrete second order plant.
In Section 6, it was shown that the linear gGPC diers from the SPI form discussed previously.
polynomials R and S are related to the discrete The setpoint ®lter in Fig. 3 has the same eect as
PID terms GCw and GCy through (6.4), therefore, removing the proportional and derivative action
(7.3) can be expressed as follows from setpoint changes. The control performance
of GPC and the equivalent predictive PID algo-
u
t GCw w
t ÿ GCy y
t ÿ GMP GCy u
t ÿ 1 rithm is demonstrated in Fig. 4 for the second
7:4 order plant:
where eÿ5s
" # Gp
3s 1
5s 1
P
N2
G j hj G s hs
C ÿ 1
jN1 A step disturbance of 0.05 is applied/removed at
GMP
7:5
GCy the 100/150 and 250/300 sampling instants,
respectively. The simulation in Fig. 4 shows excel-
The GPC law is an optimal multistep predictive lent performance for PID on a process with a sig-
control law, therefore (7.5) is an optimal multistep ni®cant time delay. Fig. 5 shows the performance
weighted predictor when used as an internal model of the deterministic PID controller given by (7.9)
for PID control. When the model order is restric- for the plant model
ted to a maximum of two the PID controller con-
stants KP , KI and KD can be solved by (6.4).
ÿ2s 1
Gp
Fig. 2 shows the block diagram of the stochastic
6s 1
3s 1
predictive PID control loop. The stochastic pre-
dictive PID controller can also be expressed in a where plant noise is correlated by Cp 1 ÿ 0:8qÿ1
model based PID form as shown in Fig. 3. This with variance 2 0:0005. The control response is
alternative representation uses all three control satisfactory although the manipulated variable
modes (P, I and D) on setpoint changes which variance is excessive. Fig. 6 shows that the
R.M. Miller et al. / ISA Transactions 38 (1999) 11±23 17
response of the stochastic PID controller is the correlation structure in the disturbance which
slightly more sluggish than GPC for servo results in less aggressive control action. The
response. However, the regulatory response is detuned PID servo response compared with GPC
equivalent. The control variance in Fig. 6 is sig- in Fig. 6 should not be a problem for most pro-
ni®cantly smaller than the control variance in cesses because regulation is the typical control
Fig. 5. A stochastic control law compensates for objective.
R.M. Miller et al. / ISA Transactions 38 (1999) 11±23 19
8. Interpretations of the predictor, GMP compensation is not as simple as inserting a 1=C ®l-
ter in the feedback loop. All of the linear PID poly-
Conceptually, GMP can be interpreted as a long nomials, GCw , GCy and GMP are strong functions of
range predictor in comparison with gGPC. Con- Cc . The Cc polynomial has the eect of detuning all
sider the special case where g is set to zero and of the linear PID polynomials. Fig. 7 shows the PID
C 1. The resulting model based PID controller block diagram with expanded predictor GMP .
can be interpreted by expanding GMP which fol-
lows since G j contains the nB ÿ 1 jth step ahead
step response coecients for a deterministic plant 9. In®nite horizon GPC and PID
model as can be illustrated by the following
example. Let the ®rst order plus time delay plant In the practical application of GPC, it is
be given by A 1 ÿ 0:9qÿ1 and B 0:1qÿ1 (note recommended that a maximum prediction hor-
that the plant ZOH is removed from the model). izon, N2 , corresponding to 50 to 90% of the rise
The step response coecients are: 0.0, 0.100, 0.190, time of the process be used [4]. Furthermore,
0.271, 0.344, . . ., 1.000. For the ®rst step (j 1) unstable control behavior may result from an N2
G 1 0:1 and for the second step (j 2) G 2 0:19, that is too short. Setting N2 to in®nity results in
therefore, G j contains the jth step ahead prediction mean level control or steady state model inverse
and is of order nB ÿ 1. The predictor GMP can now control [10,11]. The closed loop poles of a mean level
be interpreted as an optimal weighted sum of j step controller are the same as the open loop poles [10],
ahead predictions from the minimum prediction therefore, for an open loop stable process without
horizon, N1 to the maximum prediction horizon, model plant mismatch, mean level control response
N2 . The interpretation of GMP is more dicult to see is guaranteed stable. Mean level control oers a
when the plant model is stochastic, i.e. Cc
6 1. Both conservative but robust approach to automatic
Diophantine identities (2.2) and (2.3) contain the Cc control. Removing the ®nite horizon term from the
polynomial. Therefore, the extension of the above gGPC control law (3.6) results in the mean level
interpretation to include stochastic disturbance controller (denoted as 1GPC) expressed as
Fig. 7. Block diagram of the stochastic predictive PID control loop with expanded predictor, GMP .
20 R.M. Miller et al. / ISA Transactions 38 (1999) 11±23
ÿ1 Gs C Fs The above polynomials now are independent of
Cq u
t w
t ÿ y
t
9:1
gs gs gs any GPC tuning parameters. Predictive PID con-
troller constants, KP , KI and KD can be expressed
A PID equivalent to 1GPC, denoted as 1PID, in terms of the model parameters by comparing
can be developed following the same procedure as the coecients of (9.4) with the linear relations in
in Sections 6 and 7. From (4.4), the linear poly- (6.4) which results in
nomials for 1GPC are
a1 2a2
ÿC
1
KP
G s C Fs B
1
T C qÿ1 R S
9:2
gs gs gs
C
1A
1 C
1
KI KD a2
9:5
Equating the PID polynomials in (7.9) with (9.2) B
1 B
1
along the same lines of previous sections yields
Fig. 8 shows satisfactory control response using
the 1PID controller for the same plant and dis-
C
1 Fs G s gs
C ÿ 1 turbance as presented in Fig. 6.
GCw GCy GMP
gs gs Fs The 1PID controller de®ned by (9.5) no longer
9:3 requires the solution of the Diophantine identities
as was the case in the predictive PID controller
Substitution of the relations in Section 3 into (9.3) developed in Section 7. This has several advan-
gives tages. Implementation of this control law is very
C
1A
1 C
1 simple and easy to understand. The fact that the
GCw GCy A Diophantine identities are not required also means
B
1 B
1
that the execution of the 1PID controller is very
B
1C ÿ C
1B B
1
C ÿ 1 ecient in comparison to GPC or DMC. The
GMP
9:4
C
1A adaptive implementation will also be very ecient
because only simple multiplications are required ambient air temperature. E1 and E2 use process
to compute the control law. This adaptive imple- steam which has a signi®cantly higher variance in
mentation is discussed in Miller [12] and Miller et pressure than utility steam. Furthermore, the
al. [13,14]. temperature transmitter, TT2, is located several
metres downstream of the E2 parallel con®gura-
tion which results in a signi®cant time delay for
10. Industrial application of predictive PID the TC2 control loop.
TC2 was chosen to upgrade to predictive PID
Predictive PID was implemented in a Honeywell because the existing PID controller was known to
TDC2000 control computer for control of a key cause increased variability in the catalyst tem-
unit in a fertilizer plant. Fig. 9 shows the simpli®ed perature of R3. PID controller constants and the
process and instrument diagram of the process. internal model, GMP , were computed using an
Sub-cooled liquid ammonia is vaporized by E1 open loop model of E2 and (6.4) and (7.12),
and superheated to about 300 F by the E2 con®g- respectively. Predictive PID was implemented by
uration. Superheated ammonia and compressed means of a conventional TDC2000 PID control
air enter the highly exothermic reactor, R3 which loop with the addition of a simple user de®ned
produces NO2 in a yield of less than 50%. The function for GMP and the removal of proportional
existing controllers for TC1, TC2 and TC3 are and derivative terms from setpoint changes (a
PID, PID and DMC, respectively. built in option). The total time required for this
The undesired byproducts, NOx (other than implementation was about one hour not including
NO2), are produced in signi®cant quantities if the process identi®cation.
catalyst temperature of R3 drops below 1495 F, A comparison of predictive PID and the exist-
while the catalyst degrades prematurely if the ing PID during nominal operating conditions is
temperature exceeds 1505 F. Control of the cata- shown in Fig. 10. The variance of the ammonia
lyst temperature is further complicated by var- temperature is signi®cantly higher when E2 is
iance in the ammonia temperature and the controlled by the PID controller compared to the
Fig. 9. Simpli®ed schematic and instrument diagram for the NO2 process.
22 R.M. Miller et al. / ISA Transactions 38 (1999) 11±23
Fig. 10. Comparison of PID and predictive PID for control of the NO2 process.
period that is controlled by the predictive PID con- A mean level formulation of PID is determined
troller. The FCOR method described by Huang et by setting the ®nite horizon weight to zero in the
al. [15] was used to assess the performance of PID predictive PID control law. The resulting 1PID
and predictive PID in Fig. 10 relative to minimum controller can be expressed as a simple function of
variance. An FCOR measure of 1.0 indicates ARIMAX model parameters.
minimum variance type control performance while Implementation of the predictive PID controller
measures approaching zero indicate poor perfor- on a TDC2000 control computer for control of a
mance. The PID controlled response resulted in an key heat exchanger in a fertilizer plant required only
FCOR measure of 0.14 while predictive PID yiel- one hour. The performance of the predictive PID
ded a measure of 0.26 which represents an 86% scheme was demonstrated to be superior to the
improvement relative to minimum variance. existing PID controller for a series of disturbances to
the steam pressure and during nominal operation.
Long range predictive stochastic PI and PID The ®rst author (R.M.M.) would like to thank
control laws are determined by equating the linear NSERC (Natural Sciences and Engineering
polynomials in GPC with PID constants plus an Research Council of Canada) for ®nancial support
internal model for ®rst and second order plants, in the form of a postgraduate scholarship.
respectively. The internal model GMP, which can
be interpreted as a multistep weighted predictor, References
exists for models with time delay. There are no
restrictions on the gGPC tuning parameters N1 , [1] S.L. Shah, Model-based predictive control: theory and
implementation issues, Presented at ADCHEM '94,
N2 , Nu , l,
y and
from which the predictive PID
Kyoto Research Park, Kyoto, Japan, 1994.
controller is based. Predictive PID is equivalent to [2] D.W. Clarke, C. Mohtadi, P.S. Tus, Generalized pre-
GPC for all cases except for an approximation of dictive controlÐpart I. The basic algorithm, Automatica
stochastic servo control. 23 (2) (1987) 137Ð148.
R.M. Miller et al. / ISA Transactions 38 (1999) 11±23 23
[3] K. Kwok, Long range adaptive predictive control, Ph.D. [9] O.J.M. Smith, Closer control of loops with dead time,
thesis, University of Alberta, 1992. Chemical Engineering Progress 53 (5) (1957) 217±219.
[4] K. Kwok, S.L. Shah, Long range pedictive control with a [10] D.W. Clarke, C. Mohtadi, P.S. Tus, Generalized pre-
terminal matching condition, Chemical Engineering Sci- dictive control part II. Extensions and interpretations,
ence 49 (9) (1994) 1287±1300. Automatica 23 (2) (1987) 137±148.
[5] C.R. Cutler, B.L. Ramaker, Dynamic matrix controlÐa [11] A.R. McIntosh, S.L. Shah, D.G. Fisher, Analysis and
computer control algorithm, Proceedings of the 1980 Joint tuning of adaptive generalized predictive control, The
Automatic Control Conf. Pt. 1, WP5-B, San Francisco, Canadian J. of Chemical Engineering 69 (1991) 97±110.
CA, 1980. [12] R.M. Miller, Adaptive Predictive PID, M.Sc. thesis, Uni-
[6] A.R. McIntosh, Performance and tuning of adaptive gen- versity of Alberta, 1995.
eralized predictive control, M.Sc. thesis, University of [13] R.M. Miller, S.L. Shah, R.K. Wood, Adaptive predictive
Alberta, 1988. PID, Proc. ISA/95, pp. 1±10 Toronto, 25±27 April 1995.
[7] A. Henningsen, A. Christensen, O. Ravn, A PID auto- [14] R.M. Miller, K.E. Kwok, S.L. Shah, R.K. Wood,
tuner utilizing GPC and constraint optimization, Proc. Development of a stochastic predictive PID controller,
29th IEEE Conf. on Decision and Control, Honolulu, HI, Proc. 1995 American Control Conference, pp. 4204±4208,
pp. 1475±1480, 1990. Seattle, WA, 1995.
[8] T.J Harris, J.F. MacGregor, J.D. Wright, An overview of [15] B. Huang, S.L. Shah, K.E. Kwok, On-line control per-
discrete stochastic controllers: generalized PID algorithms formance monitoring of MIMO processes, Proc. 1995
with dead-time compensation, Can. J. of Chem. Eng. 60 American Control Conference, pp. 1250±1254, Seattle, WA,
(1982) 425±432. 1995.