Ai Pid PDF

You might also like

Download as pdf
Download as pdf
You are on page 1of 6
Proceedings of the American Coto! Conference (Chicago, nas = bane 2000 Self-Tuning of PID Controllers by Adaptive Interaction. ! Feng Lin, Robert D. Brandt, and George Saikalis Abstract ‘We propose a new self-tuning or adaptation algorithm for PID controllers based on a theory of adaptive inter- action, The theory develops a simple and effective way to perform gradient descent in the parameter space. One version of the tuning algorithm requires no knowl edge of the plant to be controlled. This makes the algo- rithm robust to changes in the plant. Tt also makes the algorithm universally applicable to linear and nonlinear plants. ‘The algorithm achieves the tuning objective by ‘minimizing an error function. Because ofits simplicity, the overhead for adding self-tuning is negligible. We applied this algorithm in an automotive product man- Lfactured by Hitachi to satisfy performance require- ents for both cold start and normal operation. Simu- lation results are presented to show the validity of the approach. Keywords: PID controller, adaptive control, self- tuning 1 Introduction Although control theory has made grest- advance in the Iast few deeades, which has led to many sophis- tieated control scheanes, PID control still remains the most popular type of control being used in industries today. This popularity is partly due to the fact that PID controllers have simple structures and very well understood principles, Furthermore, a well-tuned PID controller can have excellent performance. Here, the words “well-tuned” must be emphasized because the performance of a PID controller is erucially dependent fn the tuning process. For the convenience of discussion, we would like to elas- sify PID tuning into two (perhaps overlapping) classes: () initial “off-line” tuning and (2) continuous “on-line” self-tuning. Since our approach is more likely to be used for the second class, we will focus our discussions ‘on this class. We believe that there are at least two rea- sons for having an on-line self-tuning. First, the objec- tives and hence requirements of a PID controller often ‘changes during the different stages of control. ‘This is ‘quite evident from our experience with automotive con- trol systems. The control objectives during the “cold start” is often different from the“normal operation” "This resarch is wupported in part by the National Scence Foundation under grant ECS 9515844, Pong Lin ie withthe De partinent of Hlctjeal and Computer Bngincering, Wayne State Unlveraity, Devo, MI 48202" Tee 3185778408, Fans SiS. S77H101, imi AinGocaong wayne aie. Robert 1D. Brandt i te Inalgnnt Dever, Ine 468 Whittier Avenue, Cle TGo1s7. Cooege Salta with Hitachi, 24800 ‘Aver Parringeo ii, Mi 48335, ‘We believe that this is also true for many general sys- tems. For example, we often want a system to have fast response time initially, but then put more emphasis on reducing steady-state error. Fast response time and small steady-state error are often conflicting objectives ‘and require different set of parameters for the PID con- troller. Therefore, PID control can be improved greatly if we will sot the parameters initially to ensure fast re- sponse time and then tune the parameters to reduce steady-state error. We indeed applied this self-tuning. PID controller in an automotive product manufactured by Hitachi, ‘The result ia a much improved controller. ‘The second reason for on-line self-tuning is that the plant to be controlled often changes from time to time. ‘This is especially true if the plant is a nonlinear ystems with changing operation points. When this is the case, our approach provides a simple and effective method for adaptation of such changes. ur approach is based on a recently developed theory of adaptive interaction {6} (8). Using this theory, the con- trolled system is decomposed into four subsystems eon- sisting the plant, the proportional, integral and deriva- tive control. The parameters of the PID control, Ky Ky, and Kp are viewed a the interactions belween these four subsystems. A general adaptation algorithm developed in the theory of adaptive interaction is ap- plied to seltuning these coefficients. The algorithm is Simple and effective ‘To apply this self-tuning algorithm, the only informe tion needed about the plant is its Fréchet derivative For linear systems, the Fréchet derivatives can be easily, calculated. Furthermore, simulation results show that in many cases, the Fréchet derivative ean be replaced by a constant that is then absorbed into the adaptation coefficient. Using this approximated self-tuning algo- rithm, we ean eliminate any dependence on the plant model and hence make the algorithm universal to a large class of systems. ‘Another way to investigate our self-tuning algorithm is to to view the self-tuning PID controller as a non- linear controller because the parameters Kp, Ky, and Kp are changing continuous according to the adapta- tion dynamics. In general, we do not require that Kp, Ky, and Kp convergent to some constants. In fact, ‘we will let them change as the inputs or disturbances change. Because of this property, our self-tuning PID controllers can do more’ than conventional PID con- trollers. For example, they can stabilize systems than, ‘cannot be stabilized by conventional PID controllers. ‘We investigated the effectiveness of our self-tuning PID controllers by simulation for a large class of ystems, in- cluding linear and nonlinear plants, stable and unstable plants, and plants with delays. We also simulated sys- (0-7803-5518-9/00 $10.00 © 2000 ACC. 3676 tems with noise and saturation. In the simulations, wwe used both the Fréchet self-tuning algorithm and the approximated self-tuning algorithm. In all these simu- lations, we have not found any case where the closed- Toop systems is unstable. We encourage the readers to try for themselves. ‘This introduction will not be completed without gi ing references to other approaches to PID tuning. They are listed at the end of the paper. To compare our ap- proache to other approaches is however a difficult task for two reasons: First, there are just too many ap- proaches to PID tuning; and secondly, our approach is ‘quite different from conventional approaches, ‘There- fore, any omission in this regard is not intentional. This paper is organized as follows, In Section 2, we will, briefly present the theory of adaptive interaction that forms the basis of our approach. In Section 3, we derive the Fréchet self tuning algorithm and the approximated self-tuning algorithm. We also prove the stability of the closed-loop system with the self-tuning PID controller. In Section 4, we present some simulation results for various types of systems 2 Theory of Adaptive Interaction ‘The theory of adaptive interaction considers a complex system consisting of N subeystems which we called de- views. Each device (indexed by n €.N:= {1,2 ..N}) hhas an integrable output signal ya and an integrabie in- put signal 24, The dynamics of each device is deseribed by a (generaliy nonlinear) causal? functional Fain Yn NEN, where 4% and Jn are the input and output spaces re- spectively. ‘That is, the output y(t) of the nth device relates to its input a(t) by alt) =(Fuotn)(t) = Fultn(H], EN, where © denotes composition. We assume the Fréchet derivative of Fa exists?, We further assume that each device isa single-input single- output syste ‘An interaction between two devices consists of a (gener- ally non-exclusive) functional dependence of the input of one of the devices on the outputs of the others and is mediated by an information carrying connections de- noted by c. The set of all connections is denoted by C. A Tunctional yA ~+ Yn ie causal ify (8) depends only on the previews history of za, (Za(7)=7 St} Behe Fréchet derivative [13), Fala, of Fal functional sick that Wale +4) Fils} 0ll defined at Firma -o0 The aseumption of single-input single-output Is not as re- steitve ac tay cot. This is becaaee the partition of eyetem Into deviees arbitrary and up tothe designer. Therefore, one ‘can often partition a msltvingut maltnowtpu system into sow ‘ral snglenput single-output systems ‘We assume that there is at most one connection from one device to another. Let prec be the device whose ‘output is conveyed by connection ¢ and poste the de- Vice whose input depends on the signal conveyed by connection ¢. We denote the set of input interactions for the nth device by In = {e" pree =n} and the set of output interactions by On = {e = moa typical system is illustrated in Figure 1. In the figure, for example, the set of input interactions of Device 3 is fy = {ersey) and the set of output interactions is 1 = {eq}. "Also, ¢, connects Device 1 to Device 2, therefore prec, = 1,poste, = 2 For the purpose of this paper, we consider only linear interactions, that is, we assume that the input to a device is a linear combination of the output of other devices via connections in Jy and possibly an external input signal u(t): En(t) = un(t) + Y> aretprec(t), nEN, where ais the connection weights With this linear interaction, the dynamics ofthe system is described by Wal) = Falta) + aetpe(th we. a ‘To simplify the notation, in the rest of the paper, we will eliminate when appropriate the explicit reference to time ¢ ‘The goal of our adaptation algorithm is to adapt the connection weights av so that some performance index BUits yt tye tg) a a funtion of the external in- pute and outputs will be minimized. "The algorithm is fiven in the following theorem [8 ‘Theorem 1 For the system with dynamics given by th = Falta + So eetprah mEN, if connection weights ac are adapted according to af © Fron lptl Fron rt Ven OE Bigaa,) °Frontclpnt teres, EC, ‘and the above equation has a unique solution, then the performance index E will decrease monotonically with fame. In fact, the following is always satisfied where 7 > 0 is some adaptation coefficient. ‘The above theorem can be applied to a very general clase of systems. For example, ite application to neural 3677 networks was reported in (5-8). Using this algorithm, a neural network can adapt without the need ofa feed back network to back-propagate errors. The algorithm hence provides a biologically plausible mechanism for adaptation in biological neurons. Since the PID control system is special case of the sys- tems amendable to the above adaptation algorithm, the algorithm can be significantly simplified as shown in the next section. 3 Tuning Algorithm For a PID control system, we decompose the system into four devices as shown in Figure 2: Device 1 is the proportional part with transfer function 1; Device is the integral part with transfer function s~?; De- vice 3s the derivative part. with transfer function #; and Device 4 is the plant. In some implementations, the differentiation and integration are often modified to improve the performances. For example, differen- tiation is often preceded by a low-pass filter. As we shall see, our algorithm applies equally well to such modifications. In any case, there are three adaptive connections: a. = Kp, Kr, ot Kp. Since for all these connections, Opoye, = 01’ = 0, the adaptation algo- rithm of the previous section reduces to © Fonte [Zponte] © Ypre. We take our goal as to minimize the error* Ba 8 = (u-w) ‘We then obtain the following Fréchet tuning algorithm Kp = —2lu ~ w) Filed] om ~2reFileal om Similarly, we have Ky Kp ~2yeFi lea] om ~2yeFiize| nn Note that the self-tuning algorithm for P, T and D all hhave the same form: It depends on the error e, the échot derivative F{[z4), and the output of the device = 1,2,3. It is independent of the natural of the Ys device, whether itis P, I, D, or anything else. ‘There- fore, any modification of differentiation or integration will not change the adaptation algorithm, ‘To caleulate the Fréchet derivative, let us consider the functional y = F[z| of the following form Flal= [ slote).r)t Other performance index can also be tod, resulting in di ferent self-tuning algoritns It can be shown ([18), page 175) that the Fréchet dif ferential of F is equal to its Gateaux differential which is given by srtaim) fsa, ated, where fz = $£. Therefore, the Fréchet derivative of F at z is given by Fistoh= f° sla(o.r)Mr\Mr, For a linear time-invariant plant with transfer funetion G(s), F is given by the convolution Fla] = a(t) +2(0) | * a(r)alt —n)dr, where g(t) is the Fréchet derivative Flejo [at-nmenar alt) # he) By simulation, we found that for many practical sys- tems the Fréchet derivative can be approximated by Fizloh= ph, where 6 is some constant. Substitute the above approximation into the Fréchet tuning algoritia, we obtain the following modified tun- ing algorithm. Kp = are: Here we have absorbed 26 into the adaptation coeffi- cient 7. This modified algorithm can be implemented as shown in Figure 3. 4 Simulation Results ‘We performed various simulations which show excellent properties of our tuning algorithm. All the simulations are performed using SIMULINK. Stable Plant we started our simulation with a linear stable plant having the following transfer function : 5000 © GF I+ 5)@ + 100) we first applied the modified tuning algorithm, which worked very well. Figure 4 shows the results of a simu- lation with the input u being esquare wave of frequency w = Land magnitude=1. The adaptation coefficient 3678 G(s) 1 =0.08. As shown in the figure, after tuning, the rise time and overshoot are excellent For comparison, we also simulated the system using the Fréchet tuning algorithm. We found that the re- sults are very similar. In other words, the modified algorithm worked very wel. In the simulation, we randomly picked the initial PID gains Kp, Ky, Kp. In fact, for the values we picked, the closed-loop system is not stable initially. How- fever, since our algorithm converges fast, it stabilizes the system very shortly as shown in Figure 4. This is significant because it may be dificult to determine 2 nally sabe PID guna the eater complex Adaptation under noise In order to study the effectiveness of our tuning al- gorithm under noisy environment, we superimposed ‘white noise signal with power=0.01 to the input 2¢ of the plant. Simulation results show that noise has only small effect on the tuning process Unstable Plant We also simulated a plant with the following transfer function +5000 SEF 5)(s + 100) ‘This plant is open-loop unstable because of the pole ‘at the origin. For unstable plants, we cannot use the Fréchet tuning algorithm, because the Fréchet deriva- tive g(t)h(t) is unstable. However, using the modified tuning algorithm, we still obtained excellent results. Gs) Systems with Time Delay ‘Our tuning algorithm also applies to systems with time delay. By adding a delay of 0.2 second before the plant with transfer function G(s), we obtained simulation results shown in Figure 3, where the input is a sine wave of frequency «= 1 and magnitude=1. The adap- tation coeflicient = 0.3. We used the modified tuning algorithm in our simulation. As shown in the figure, the ‘error decreases as tuning taking place. ‘Nonlinear Systems If the plants nonlinear, then it may be dificult to find ita Fréchet derivative. However, our modified tuning algorithm can ail be used. In Figure 6, we shown sme “lation results of a nonlinear plant with the following djynasaic. ta = —Bya + + 2, Again the input isa sine wave of frequency w = 1 and magnitude=1. The adaptation coefficient ~ 10 5 Conclusion ‘The PID tuning algorithm proposed in this paper has ‘many advantages in applications, most notably, its sim- plicity and independence of the plant model. The sim- tlation results shows that it performs very well un- der various situations: linear or nonlinear planta; with ‘or without noise; stable or unstable plants; and with ‘or without time delay. In all these cases, the tuning mechanism remains unchanged, a further proof of this, applicability. Because of the proprietary nature of the Information, we cannot report the application of this approach to the Hitachi product at this time. How: ‘ever, we hope to do this in the near future. References (1) KJ. Astrom, 7, Hagglund, 1984, Automatic tun- ing of simple regilators with specifications. on phase fsnd amplitude margine Automation, 20, 45-651 [2] Kd. Astrom, T: Hagelund, 1988, Automatic Tan- tng of PID Controlers, TSA (8|_ KJ. Astrom, C.C.Hang, P Persson and W.K. Ho, 1992. Towards intelligent PID control. Automatica, 28, 1 [8] Kt. Astron, ‘T. Haglund C.CHang and WK Ho, 1903. Automatic tuning and adaptation Tor PID controllers ~ survey. Control Engineering Practice, 1, 90.714 [5] RD. Brandt and F. Lio, 1994. Supervised lenen- ing in neural networks without explict error back propagation. Proceedings of the 32nd Annual Allerton Conference on Commutation, Control and Comput. sng, pp 294-308, [6] RD. Brandt and F. Lin, 1996, Can super ‘ised leaning be achieved without explicit eror back propagation? Proceedings of the International Confer- ‘ence on Neural Networks, pp. 300-305, [7] RD. Brandt and F. Lin, 1996, Supervised learn. ingin neural networks without feedbeck network. 1996 IEEE International Symposium om Intelligent Control, pp. 86-00 (8) RD. Brandt and F. Lin, 1998. Theory of Adap- five Interaction, ABT Press, 1 appeat {9} D.W. Clark, 1986, Automatic tuning of PID reg- lators Tn Expert Systems and Optimization in Process Contr Technical Pres, 85-104 [10], C.C. Hang, K.J. Astrom and W.K. Ho, 1998. Re lay auto-tuning in the presence of static load distur Dance. Automation, 29, 563-568 (01) WK. Ho, C.C. Hang and TS. Cao, 1995. Tun- ing of PID controllers based on gain and phase margin specication. Automation, 21, 407-502, (P21 3 slo, 1. Tanta ag TN, Kai, 1988 expert systema for tuning PID controllers’ Proc ‘American Control Conference, 261-262. [13]. J. Lit, 1991, Am expert system to perform om-ine contrlier ting. BBE Control Systems Magazin, 11, 1828 {14} L, Loron, 1907. Tuning of PID controllers by the nom-aymmetrical optimum method, Automation, $3, 108-107 {151 D. G. Luenberger:1968. Optimization by Vector Spoce hiethods, John Wiley & Sons. 3679 [16] _Y. Nishikawa, N. Sannomiya, T. Ohta and H. ‘Tanaka, 1984. A method for auto-tuning of PID control 41-53, 768. OO ———— i Secretion as ein (ae ee a eng iepmgetate etre , = Terese eee ee iy ee ee ee eee ieee e ee) 20] _J.G. Ziegler and N.B. Nichols, 1942. Optimal set- 2 10 20 30 40 ting for automatic controllers. ASME Trans., 64 759- Time oe 10002 & 1.001 : a a ime te : — 2 os oa 7 pe | 0 0 20 30 40. Tie _— . & wt 2 Lo = : oa) ‘Time: Figure 3: PID Self-tuning 3680 Figure 4: Stable plant ko ot 0.08 | 0.09 0.08| 0.07; 0.06| 0.08] 0.04 0.03! ‘Output Signal 2 20, 7 £10 : 3] - Wi Avrwrnnel aN a a We ee a ; . Q1 . 7 ta ce : it 3 5, 7 _ ee Se 3681

You might also like