Copyrighl © IF AC Idemificalion and Syslcm Parameler [slim'lion 1982. W .,hinglOn D.e.. L:SA 1982
SELF-TUN IN G REG ULATO RS II
DESIGN OF SELF-ADJUSTING CONTROLLERS K. A. Fegley*, G. I. Baldvinsson** and H. Chen*** *Depart ment of System s Engineering, Moore School of Electrical Engin eering, University of Pennsylvan-ia, Pht"ladelpht"a, PA 19104, USA ** Orkustofnun, 105 R eykj avik, Iceland *** Second Departm ent; No rth west T elecommunications Engin eering Institute, X z"'a n, Shaanxl~ Cht"na
Abstract . The control of temperature, pressure , flow and any of an array of other physical quantities is frequently realized by application of a proportional-plus - integral- plus - derivative (PID) controller. The values to which the three adjustable parameters of a PID controller are set are critical to the proper operation of the process being contr olled . In order to maintain near optimal control of the process , t he settings of the three parameters should be adjusted to reflec t any substantial changes in process dynamics . An important aspect in the design of an adaptive PID con t rolle r is the continuing identification of the changing process . This paper considers the overall design of the adaptive controller with particular emphasis on process identification . Keywords . Controller ; adaptive, self - adjusting ; self - tuning ; linear programming ; identification ; PID controller . INTRODUCTION The control of temperature, flow and any of an array of other physical quantities is frequency realized by application of a proportional- plus - integral - plus - derivative (PID) controller. Fig . 1 illustrates the use of such a controller to control the temperature of a furnace . In this application it is desired to bring the furnace temperature to to a desired value td and then to hold it at this temperature. The input to the controller, q(t) is equal to the difference between the input reference value r (t) (which is proportional to the desired temperature t ), d and the measured value met) of the furnace temperature to' The controller moves a value which controls the flow of fuel to the furnace . The performance of the controller depends on its parameter settings. Several authors have dealt with the problem of choosing these optimal parameter settings (Hazenbroek and van der Waerden, 1950; Hazenbroek and van der \\Taerden, 1950; Pessen , 1953 ; Ziegler , 1942) . The parameter values these authors suggest depend upon the dynamic charact~ris tics of the process to be controlled. Because of this dependence of the desired controller settings on the process dynamic characteristics, the controller settings should be changed as the dynamic characteris tics of the process change . A cont r oller capable of s~ch change is said to be
adap t ive , self - tuning, or self - adjus t ing . This paper tr ea t s t he design of such a cont rolle r . The parame t e r se tt ings of the controller are those of Ziegler and Nichols (1977) . To properly adjust the con tr oller parameters , the dynamic characteris t ics of t he pr ocess must be de t ermined . The process can be conveniently represented by a disc r e t e model . The parameters of t he d i screte mode l can then be identified by a variety of me t hods (Sage and Melsa 1977) . This study will comparative l y evaluate two methods , one based on wor k of Kalman (1958) and t he other an i t erative method due t o St e i glitz and McBride (1965) . Bo t h of these me t hods will be implemented using linear programming . Linea r programming has been previously applied t o system design and i den t ifica tion by Fegley (1964) , Burns (1969) , and Harrison (1968) . THE PID- CONTROLLER The propo r tional- integral- de r ivative (PID) controller is also r efer eed t o as a t hree mode controller. Its ou t put as a func t ion of the error input (see Fig . 1) can be written : x(t)
=
Kl[q(t) + K2
I
q( t )d t +
K~l 3
dt
(1)
1378
K. A. Fegley , G. I. Baldvinsson and H. Chen
where K , K , and K3 are controller con2 l stants that are adjustable.
design taks . It is quite possible, however, that a design based upon these assumptions will yield an adap tive controller that will adequa tely accommodate processes that do not satisfy the assumptions .
Laplace transforming Eq . (1) yields : (2)
Equation (2) can be represented by the parallel arrangement of Fig . 2 or by the series arrangement of Fig . 3 . In Fig. 2 the parameter adjustments are non-interacting since K K and K can each be changed l' 2' 3 independently . Such non-interacting adjustment of the modes is not possible with the series arrangement of Fig. 3 .
The assump ti ons are : 1 . The pr ocess to be controlled can be r epresented by the transfer function: G(s)
K o
(ST
(3)
+ 1) (sT + 1) a b
where Ko represents process gain ; and, Ta and Tb represent process lags . 2.
In designing a controller, the parameter settings sought are those that yield a quick start -u p without large overshoot and which keep the controlled variable close to the desired level in the event of disturbances in the process . To maintain a near- optimal control of a process, the settings of the controller should be adjusted to reflect any substantial changes in the dynamic characteristics of the process . Thus, a self-adjusting controller is needed which will automatically adjust the parameters K , K , and K3 as 2 l required to maintain proper operation of the controlled process. This is especially true in the case of large load disturbances in the process. The design of adaptive controllers has been previously discussed in the literature (Astrom and colleagues 1977) . A process controlled by a self - adjusting PID- controller can be represented as shown in Fig. 4. In this figure an adaptor element has been added to the conventional PID-controller to form the adaptive controller . In this study the adaptor operates with discrete values of the output and input of the process. By taking measurements of the input and output of the process at discrete points in time and by using a suitable identification method, the parameters of a discrete model for the process are estimated . Based on the discrete model obtained in this way, the desired settings of the PIDcontroller are determined. These desired settings are then automatically introduced into the PID- controller .
The parameters K , T , and T in o a b Eq. 3 are cons tant or change slowly with time . That is, the time requir ed for a change of 20% in the value of any parameter is larger than the initial shortes t time constant of the system. 3 . Ta2-Tb '
4 . For a particular process, the pa r a meters Ko' Ta' and Tb do not change by a factor of more than three. Assumptions 2 , 3, and 4 serve to bound the r ange of adaptability required of the controller . They also simplify the task of verifying the adequacy of the design.
A DISCRETE MODEL FOR THE PROCESS It has been assumed that th e process can be represented by a second order tr a nsfer function . It has also been indicated that the process will be represent ed by a discre te model. Letting x repre sent th e input function and y the outpu t function, the follOWing second ord e r difference equation will be used to represent the process .
(4)
By introducing the first order delay -1 12 operator Z , Eq. (4) can be written as
alz
-1
~
+ a 2z
-2
x
k Yk + blz
THE CONTROLLED PROCESS It is desirable that a self-adjusting controller be suitable for use with a broad range of processes . For purposes of design and analysis, however, it is convenient to limit the generality of the processes considered . Therefore, several assumptions are made about the processes to be controlled . While these assumptions may not be met in practice, their specification provides a starting point for a logical approach to the
-1
Yk + b 2 z
-2 Yk (5)
or ~(alz
-1
+ a 2z
-2
) Yk(l + blz
-1
+ b 2z
-2
)
(6)
Design of Self-Adjusting Controllers The co rresponding discrete transfer function is :
N
Minimize x , where z
~
I
~ ,t k _ N+j
I
(ll)
J (7)
In identify ing the process by use of its discrete model it is necessary to measure the input and output of the process at dis crete points in time. In order -.to get a meaningful identification, the sampling rate should be gr eater than the Nyquist rate . Also, the number of samples used should be greater than the number of coefficients t o be estimated anQ large enough so that the time interval over which the samples are taken is equal to the time that covers the main portion of the transient response of the process to be identified.
The linear programming co nstraints will be made up of the individual error equations . Writing t he error e~uation for each iter ation , N equati ons in all , the following set of const r aints are obtained:
tk- N+l
+ a 2x k _ N_ l - Yk- N+l
alz k _ N
- blY k N t k - N+2
alx k _ N+l + a 2x k _ N -
-
b~Yk- N- l
- Y- + k N 2
blYk- N+l - b 2Yk - N
LINEAR PROGRAMMING APPROACH TO IDENTIFICATION A.
(12)
Non- iterative Method (Kalman Method) a x _ l k 2
Rear r anging Eq. (6) it can be seen that Yk
+ a 2x k _ 3
- Y k l
- b Yl k 2
- b 2Yk - 3
+ a 2x k _ 2
- Y k
can be expressed in terms of previous inputs and output s .
alx _ k l
(8 )
Kalman used this form of equation and linear r egr ess i on to obtain estimates for the coeff i cients aI ' a , b , and b (Kalman 2 l 2 1958). Denoting aI' ~2 ' b , and b as the l 2 es tima t ed values of the parameter s at the kth sampling instant, Kalman computed Yk* as
Rearranging Eq. (12) and writing it in matrix form yields :
Xa
Yd
t
(13 )
0
where matrices are
(9)
As a measure of the accuracy of the parameter estima t es, Kalman proposed using the mean squared value of the errors tk at the sam-
X
pl ing points , where :
al~_l
. + a2xk_2- Yk- blYk _l
- b 2Yk - 2
Y
x _ k N
x k - N- l
x _ k 2
x _ k 3
x _ k l
~-2
Yk - N+ l
Yk - N
Yk - N- l
Yk - l
Yk - 2
Yk - 3
Yk
Yk - l
Yk - 2
(10)
The mean square error is not a suitable performance cri terion when using linear programming . A suitable criterion to use with ..I
_
~
_
.!
_ _ ..... .! _ _ _
~
K. A. Fegley, G. I. Baldvinsson and H. Chen
1380
D.* (z -1 )
1 b
d
tk-N+l t
l
~
D*_ (z -1 ) and Eq. (17) reduces to i l
*
xkN (z
t k - N+ 2
-1
)
(18) D*(z-l)
°2
tk
Since all linear programming variables must be non-negative, let: a
+
filtered input and output values respectively, Eq. (17) can be written
d
d
The division by the term D*_ (z -1 ) can be i l looked upon as prefiltering of the input and output values. If x~ and Y~ denote the pre-
(14)
+ + + where ~ , ~ , ~ , ~ , ~ , and t have only non-negative components. It is convenient to let d
and.!:. = (1 written:
x + a
+.!:., where d'
d
=
0
O)t.
= (0 b b )t 2 l Then Eq. (13) can be
Yd'+ + Yd'
X
a
y
(15) The objective function of Eq. (11) can be modified to ensure that in identifying the parameters of the discrete model of the plant, the minimum number of non-zero parameters are obtained. The new objective function may be written: Minimize z,
(16)
+
+
+ where E.t ' E.a' and ~ are row vectors whose elements are all chosen as unity and b is a small positive value -- selected in this study to be 0.001 as recommended by Harrison (1968). Note that the first term on the right hand side corresponds to Eq. (11) and that the remaining terms are intended to avoid any unnecessary parameters in the discrete model of the process.
(19) This is the same form for an error equation as used for the non-iterative method. Therefore the same linear programming equations apply in this case as in the former one, except that the prefiltered values of the input and output are used in the matrices X and Y instead of the original measured values of input and output. TUNING ALGORITHM (ZIEGLER-NICHOLS METHOD) Ziegler and Nichols (1942) developed formulas which enable the controller settings to be determined from the characteristics of the unit step response of the process to be controlled (Ziegler and Nichols 1942). Figure 6 shows a typical step response for a process which is overdamped. In Fig. 6, R represents the maximum slope of the step response and L is the intercept of the tangent to the maximum slope. The Ziegler-Nichols formulas for good settings for a PID controller are:
Kl
K2
K3 B.
Iterative Method
The idea of the iterative procedure is shown diagrammatically in Fig. 5,
D~(z-l) is the ~
estimate of D(z-l) after the !th iteration. The equation representing the error between the discrete model and the process response can be written as
*
~Ni(z
*
Di_l(z
-1 -1
1. 2/
(RL) 0.5/ L 0.5/ L
(20)
(21)
(22)
To obtain estimates for the controller parameters, it is necessary to calculate the step response of the process to be controlled. For this purpose the difference equation version of the discrete model is used, or
) (17) )
When the iterative method converges, then
(23) where ~k represents sampled values of a unit step and C is a calculated value of the k
Design of Self-Adjusting Controllers step response. By using Eq . (23) the approximate step response of the process if calculated . Then the maximum slope is approximately found by finding the maximum value of (24)
1381
iterative method it can be seen that the difference in the parameter values is not very great . Likewise, if the sum of the absolute value of the er r or obtained by the two methods is compa r ed , the difference is small : Non-i ter ative method:
Ll l I k
where T is the sampling time. The formula for the tangent is easily found; and from it, the values of RL and L which are then used in Eqs. (20 , 21, and 22). SIMULATION OF KNOWN SYSTEMS Simulation runs were made to compare the two identification methods. The plant was represented by the sec ond order process having the transfer function : 1
(25)
(Ss + l)(lOs + 1)
G(s) ;
The simulation program first provided estimates by the method based on the Kalman approach. these estimates were then used as a first guess for the iterative method. The iterative method is then used until it converges. The parameter estimates for the discret e model , using the non-it erative (Kalman) app r oach , are 0 . 01702 -0.0001
b b
l 2
-1. 72212 0.73904
The results for the iterative method are: Iteration
a
1 2 3 4
0 . 01679 0 . 01655 0 . 01648 0 . 01646
A
l
a
2
0.00092 0.00118 0.00126 0 . 00128
bl -1. 70071 -1. 70469 - 1. 70394 - 1. 70370
b
2
0.72457 0 . 72214 0.72138 0 . 72114
Comparing the values from the fourth iter ation and those obtained with the nonTime Sec . 1 2 3 4 5 6 7 8 9 10 11 12 13
Step Response Non-iterative Iterative Method Method 0 . 0170 0 . 0464 0 . 0843 0 . 1279 0.1750 0 . 2239 0.2733 0 . 3223 0.3701 0.4161 0 . 4602 0.5021 0.5416
0 . 0165 0 . 0458 0.0839 0.1276 0 .1 747 0.2233 0.2722 0.3205 0.3674 0 . 4126 0 . 4558 0 . 4967 0 . 5352
Iterative method:
II I I k
0 . 0055
k
0 . 0044
k
The objective of obtaining the parameter estimates for the discrete model of the process is to be able t o calculate the values of the controller parameters . The Ziegler - Nichols values for the cont r oller parameters are obtained by using the characteristics of t he step re sponse of the process . The step responses corresponding to the two methods fo r calculating the parameters of the discrete model for the plant of Eq. (25) are tabulated below . The corresponding values for the con tr oller settings a r e : Non- iterative method : K ; 16 . 56 l K ; 0.733 3
K ; 0 . 341 2
K ; 17 .10 l K ; 0.717 3
K ; 0.348 2
Iterative method:
The difference in each of the controller parameter values is within 4% . A small difference like this does not grea t ly affect the closed loop response of the whole system (Hazenbroek and van der Waerden 1950). That is, whethe r the controller parameters obtained in the case of the non-iterative method or the iterative method are used in the controller, the performance of the closed loop system will be eseentially the same. Hence, it may be concluded that there is no advantage in using the iterative method over the non-iterative method in the case when noise can be neglected in the system . The table on the following page gives a Time Sec . 14 15 16 17 18 19 20 21 22 23 24 25 26
Step Response Non-it erative Iterative Method Method 0 . 5787 0 . 6135 0 . 6458 0.6759 0 . 7038 0 . 7296 0.7534 0 . 7753 0 . 7955 0.8141 0.8311 0 . 8468 0.8611
0.5715 0 . 6054 0.6370 0 . 6664 0 . 6938 0.7191 0 . 7426 0 . 7643 0 . 7844 0 . 8029 0 . 8201 0 . 8358 0.8506
1382
K. A. Fegley, G. I. Baldvinsson and H. Chen
Pr ocess Pa r ame ters 5 6 7
10 12 14
Controller Parameters Calculated Estimated
1 12.42 0 . 259 0 . 966 16.46 0 . 348 0 . 781 1 12 . 42 0 . 216 1.159 15.71 0 . 273 0.918 1 12.42 0 . 185 1 . 350 15 . 33 0.227 1.100
t ab ulati on of results for a process of the fo rm of Eq . (3) but with changing parameters Ta and Tb' Two sets of controller para me t e rs are given. The "calculated" values a r e the corre c t values as determined by the Zi eg ler-Nichols formulas. The "estimated" values c orrespond t o c alculations using the s ame formulas but with the step response de termined from the parameters of the disc rete model as obtained by the nun-iterative id e ntifi c ation method. The sampling inter val used was one second and the number of samples was 20. The stimulating signal for th e identification was a ramp that continued fo r the duration of the identification period (20 seconds). While there is considerable differen c e between the c al c ulated and estimated values for the controller parameters, the c losed loop response of the system is relativel y accurate when using the esti mated parameters. For the closed loop r e sponse for the three pairs of time constants given in the above table, the relative overshoot corresponding to the estimated parameters is always within 8 % of th e overshoot corresponding to the calculated parameters . Decreasing the sampling period from one second to 0.5 seconds further decreases the errors.
Hazenbroek, P. and B. L. van der Waerden (1950). Theoretical c onsiderations on the optimum adjustment of regulators . Trans. A. S . M. E. , 72, 309-315. Kalman, R.E. (1958). Design of self - optimiz ing control system. Trans. A. S . M. E. , 80, 468-478. -Pessen, D.W. (1953) . Optimum three-mode controller settings for automatic start - up . Trans. A.S.M . E. , 75, 843-849 . Sage, A.P . and J . L. Melsa (1977) . System Identification. Academic Press. Steiglitz, K. and L. E. McBride (1965) . IEEE Trans . Autom. Control, 10, 461- 464. Ziegler, J . G. and N.B. Nichols (1942). Optimum settings for automatic controllers. Trans. A. S . M. E. , ~, 759-768. x (t)
Cu~t r oa c r
met)
Senso r
';VilLi..: .... t i" n .):: d PlU cont r o::'lcr te:;J,~'o:'rilture c.untrol .
Fip. . 1.
(ur'1act!
~ . . L2J~
~ (5)
1-.q, . _ .
Re p r CSl'ut
Fig • .) .
Kcpresecnt'1tiun of a PI n cont r olll! f by a ser i.;,. n~tw .... :· k.
.:l
Pro cOiltroller by .J
CONCLUSION r
Th i s paper has presented a design for an adaptive PID controller . Other designs using a l ternative identification a180rithms and/or alternative controller parameter value s e lection algorithms are also practical and readil y implemented with a standard PID controller and a microcomputer or microprocessor.
fl'!
F ~; .
!.
.
r---
-_. _---
--,
.\;1 ad,lptivc cont r oller .
. ;dt)
REFERENCES
-
Rc ... l
v(t)
Pro c. e:.s
Astr om, K.J . , U. Borisson, L. Ljung, and B. Wittenmark (1977). Theory and applica ti ons of self-running regulators . Automatic a, 13, 457 - 476. Burns, J . F. (1969). A mathematical programming identifi cation system. Ph.D. Dissertation, Universit y of Pennsylvania, Philadelphia, PA . Fe gley , K.A . (1964) . Designing sampled - data contr ol s y stems by linear programming . IEEE Trans. Application and Industry, ~, 198- 200 . Ha rris on, R. W. (196 3 ). Identification of linear systems using mathematical pro gramming . Master Thesis, Universit y of Pennsylvania, Philadelphia, PA. Ha ze nbroek, P. and B. L. can der Waerden (1950). The optimum adjustment of regulat ors. Trans . A. S.}!.E . , ~, 317 - 322 .
. .,
Ai (z ")
-.--·-1 01 _ 1 (z
Fig . S.
)
Nod el t o represen :. the it(:rdt i vc pr('lcess