Chapter PID Con trol Base on survey of over eleven thousand ontr ol lers in the ening chemi als and pulp and ap er industries  of gulatory ontr ol lers utilize PID fe db ack

Chapter PID Con trol Base on survey of over eleven thousand ontr ol lers in the ening chemi als and pulp and ap er industries of gulatory ontr ol lers utilize PID fe db ack - Description

Desb orough Honeyw ell 2000 This hapter describ es the PID con troller whic unquestionably the most common of solving practical con trol problem Practical implemen tation issues are also discussed particularly mec hanisms for oiding in tegrator wind ID: 26345 Download Pdf

121K - views

Chapter PID Con trol Base on survey of over eleven thousand ontr ol lers in the ening chemi als and pulp and ap er industries of gulatory ontr ol lers utilize PID fe db ack

Desb orough Honeyw ell 2000 This hapter describ es the PID con troller whic unquestionably the most common of solving practical con trol problem Practical implemen tation issues are also discussed particularly mec hanisms for oiding in tegrator wind

Similar presentations


Download Pdf

Chapter PID Con trol Base on survey of over eleven thousand ontr ol lers in the ening chemi als and pulp and ap er industries of gulatory ontr ol lers utilize PID fe db ack




Download Pdf - The PPT/PDF document "Chapter PID Con trol Base on survey of o..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.



Presentation on theme: "Chapter PID Con trol Base on survey of over eleven thousand ontr ol lers in the ening chemi als and pulp and ap er industries of gulatory ontr ol lers utilize PID fe db ack"— Presentation transcript:


Page 1
Chapter PID Con trol Base on survey of over eleven thousand ontr ol lers in the eˇning, chemi- als and pulp and ap er industries, 97% of gulatory ontr ol lers utilize PID fe db ack. Desb orough Honeyw ell, 2000. This hapter describ es the PID con troller whic unquestionably the most common of solving practical con trol problem. Practical implemen tation issues are also discussed particularly mec hanisms for oiding in tegrator windup. Metho ds for automatic tuning of PID con troller are also dis- cussed. 8.1 In tro duction The PID con troller is far the most common con

trol algorithm. Most practical feedbac lo ops are based on PID con trol or some minor ariations of it. Man con trollers do not ev en use deriv ativ action. The PID con trollers app ear in man di˛eren forms, as stand-alone con trollers, they can also part of DDC (Direct Digital Con trol) pac age or hierarc hical distributed pro cess con trol system or they are built in to em edded systems. Thousands of instrumen and con trol engineers orldwide are using suc con trollers in their daily ork. The PID algorithm can approac hed from man di˛eren directions. It can view ed as device that can

op erated with few empirical rules, but it can also approac hed analytically This hapter giv es an in tro duction to PID con trol. The basic algorithm and arious represen tations are presen ted in detail. description of the prop erties of the con troller in closed lo op based on in tuitiv argumen ts is giv en. The phenomenon of reset windup, whic ccurs when con troller 201
Page 2
202 CHAPTER 8. PID CONTR OL with in tegral action is connected to pro cess with saturating actuator, is discussed, including sev eral metho ds to oid it. Filters to reduce noise in—uence and means to impro

reference resp onses are also pro vided. Implemen tation asp ects of the PID con troller are presen ted in Chap- ter ?? 8.2 The PID Con troller The textb ok ersion of the PID con troller is d de dt (8.1) where is the con trol signal and is the con trol error ). The reference alue is also called the setp oin t. The con trol signal is th us sum of three terms: the P-term (whic is prop ortional to the error), the I-term (whic is prop ortional to the in tegral of the error), and the D-term (whic is prop ortional to the deriv ativ of the error). The con troller parameters are prop ortional gain in

tegral gain and deriv ativ gain The con troller can also parameterized as d de dt (8.2) where is called in tegral time and deriv ativ time. The prop ortional part acts on the presen alue of the error, the in tegral represen and erage of past errors and the deriv ativ can in terpreted as prediction of future errors based on linear extrap olation, see Figure 8.1. Prop ortional Action Figure 8.2 sho ws the resp onse of the output to unit step in the command signal for system with pure prop ortional con trol. The output nev er reac hes the steady state error. Let the pro cess and the con troller

ha transfer functions and ). The transfer function from reference to output is (8.3) The steady state gain with prop ortional con trol is (0) (0) (0)
Page 3
8.2. THE PID CONTR OLLER 203 Figure 8.1: PID con troller tak es con trol action based on past, presen and prediction of future con trol errors. The steady state error for unit step is th us (1 (0). or the system in Figure 8.2 with gains 1, and the steady state error is 0.5, 0.33 0.17. The error decreases with increasing gain, but the system also ecomes more oscillatory Notice in the ˇgure that the initial alue of the con

trol signal equals con troller gain. oid ha ving steady state error the prop ortional con troller can hange to (8.4) where is bias or reset term whic is adjusted to giv the desired steady state alue. In tegral Action In tegral action guaran tees that the pro cess output agrees with the reference in steady state. This can sho wn as follo ws. Assume that the system is in steady state with constan con trol signal and constan error 0. It follo ws from Equation (8.1) that t: The left hand side is constan but the righ hand side is function of th us ha con tradiction and ust zero. Notice that in this

argumen the only assumption made is that there exist steady state. Nothing sp eciˇc is said ab out the pro cess, it can for example nonlinear.
Page 4
204 CHAPTER 8. PID CONTR OL 10 15 20 0.5 1.5 10 15 20 −2 PSfrag replacemen ts PI PID 10 15 20 0.5 1.5 10 15 20 PSfrag replacemen ts PI PID 10 15 20 0.5 1.5 10 15 20 PSfrag replacemen ts PI PID Figure 8.2: Resp onses to step hanges in the command signal for prop or- tional (left), PI (middle) and PID con trollers (righ t). The pro cess has the transfer function 1) the con troller parameters are (dashed), and (dash-dotted) for

the con troller, 1, (dashed), 0.2, 0.5 and (dash-dotted) for the PI con troller and 5, and (dashed), 1, 2, and (dash-dotted) for the PID con troller. Figure 8.3: Implemen tation of in tegral action as automatic bias adjustmen t. Another argumen is that the transfer function of con troller with in te- gral action has inˇnite gain at zero frequency (0) ). It then follo ws from (8.3) that (0) 0. This argumen requires ho ev er that the system is linear. In tegral action can also view ed as metho for generating the bias term in the prop ortional con troller (8.4) automatically This is

illustrated in Figure 8.3, where the bias is generated lo pass ˇltering the output. This implemen tation, called automatic eset as one of the early in en tions of in tegral con trol. The transfer function of the system in Figure 8.3 is obtained lo op tracing. Assuming exp onen tial signals and tracing them
Page 5
8.2. THE PID CONTR OLLER 205 around the lo op giv es sT u: Solving for giv es sT sT sT whic is the transfer function of PI con troller. The prop erties of in tegral action are illustrated in Figure 8.2. The pro- ortional gain is constan t, 1, and the in tegral gain is

hanged. The case corresp onds to pure prop ortional con trol, with steady state error is 50%. The steady state error is remo ed when in tegral gain is increased. The resp onse creeps slo wly to ards the reference for small alues of The approac is faster for larger in tegral gains but the system also ecomes more oscillatory Deriv ativ Action Figure 8.2 sho ws that deriv ativ action can impro the stabilit of the the closed-lo op system. The input-output relation of con troller with prop or- tional and deriv ativ action is de dt de dt where =d is the deriv ativ time. The action of con troller

with prop ortional and deriv ativ action can in terpreted as if the con trol is made prop ortional to the pr dicte pro cess output, where the prediction is made extrap olating the error time units in to the future using the tangen to the error curv (see Figure 8.1). Figure ?? illustrates the eha viour of system with PID con troller. The system is oscillatory when not deriv ativ action is used and it ecomes more damp ed as deriv ativ gain is increased. Filtering the Deriv ativ dra wbac with deriv ativ action is that an ideal deriv ativ has ery high gain for high frequency signals. This means

that high frequency measure- men noise will generate large ariations of the con trol signal. The e˛ect of measuremen noise reduced replacing the term sT (8.5)
Page 6
206 CHAPTER 8. PID CONTR OL PSfrag replacemen ts 1+ sT Figure 8.4: Implemen tation of the transfer function sT (1 sT whic ap- pro ximates deriv ativ action. This can in terpreted as an ideal deriv ativ that is ˇltered using ˇrst- order system with the time constan or small the transfer function is appro ximately and for large it is equal to =T The appro ximation acts as deriv ativ for lo w-frequency

signals and as constan gain for the high frequency signals. The high-frequency gain is =T The ˇltering time is hosen as =k with in the range of to 20. The transfer function of PID con troller with ˇltered deriv ativ is sT sT sT (8.6) The high-frequency gain of the con troller is (1 ). Instead of ˇltering just the deriv ativ it is also ossible to use an ideal con troller and ˇlter the measured signal. The transfer function of suc con troller with the ˇlter is then sT sT (1 sT (8.7) where second order ˇlter is used. An early implemen tation of deriv ativ action is

sho wn in Figure 8.4. In this system the deriv ativ is sho wn as the di˛erence et een the signal and ˇltered ersion of the signal. The transfer function for the system is sT sT sT (8.8) The system th us has the transfer function sT (1 sT ), whic ap- pro ximates deriv ativ for lo frequencies. Notice that this implemen tation giv es ˇltering automatically
Page 7
8.3. INTEGRA TOR WINDUP 207 Set oin eigh ting The con trol system in (8.1) is called system with err or fe db ack ecause the con troller acts on the error, whic is the di˛erence et een the reference and the

output. In the sim ulation of PID con trollers in Figure 8.1 there is large initial eak of the con trol signal, whic is caused the deriv ativ of the reference signal. The eak can oided mo difying the con troller (8.1) to d dr dt dy dt (8.9) In this con troller prop ortional and deriv ativ action only acts on fractions and of the reference. In tegral action has to act on the error to mak sure that the error go es to zero in steady state. The closed lo op systems obtained for di˛eren alues of and resp ond to load disturbances and measuremen noise in the same The resp onse to reference

signals is di˛eren ecause it dep ends on the alues of and whic are called efer enc weights or setp oint weights Figure 8.5 illustrates the e˛ects of set oin eigh ting on the step re- sp onse. The ˇgure sho ws clearly the e˛ect of hanging The ersho ot for reference hanges is smallest for 0, whic is the case where the refer- ence is only in tro duced in the in tegral term, and increases with increasing arameter it ypically in the range of to and is normally zero to oid large transien ts in the con trol signal when the reference is hanged. The con troller giv en (8.9) is sp

ecial case of the general con troller with degrees of freedom in Figure ?? The transfer functions are 8.3 In tegrator Windup Man asp ects of con trol system can understo from linear mo dels. There are, ho ev er, some nonlinear phenomena that ust tak en in to ac- coun t. There are ypically limitations in the actuators: motor has limited sp eed, alv cannot more than fully op ened or fully closed, etc. or con trol system with wide range of op erating conditions, it ma happ en that the con trol ariable reac hes the actuator limits. When this happ ens
Page 8
208 CHAPTER 8. PID CONTR OL

0.5 1.5 −0.5 0.5 1.5 PSfrag replacemen ts i! ur i! 10 −1 10 10 10 −1 10 10 −1 10 10 10 −1 10 PSfrag replacemen ts i! ur i! Figure 8.5: Time and frequency resp onses for system with PI con troller and setp oin eigh ting. The curv es on the left sho resp onses in pro cess output and con trol signal and the curv es on the righ sho the gain curv es for the transfer functions and ur ). The pro cess transfer function is =s the con troller gains are and 1, and the setp oin eigh ts are (dashed) 0.2, 0.5 and (dash dotted). the feedbac lo op is brok en and the system runs

in op en lo op ecause the actuator will remain at its limit indep enden tly of the pro cess output as long as the actuator remains saturated. or con troller with in tegral action the in tegral term ma ecome ery large. When this happ ens the error ust hange sign for long erio efore the in tegrator winds do wn. The conse- quence is that there ma large transien ts. This is collo quially referred to as inte gr ator wind up The wind-up e˛ect is illustrated in Figure 8.6, whic sho ws con trol of an in tegrating pro cess with PI con troller. The initial reference signal is so large that the

actuator saturates at the high limit. The in tegral term increases initially ecause the error is ositiv e; it reac hes its largest alue at time 10 when the error go es through zero. The output remains saturated at this oin ecause of the large alue of the in tegral term. It do es not lea saturation un til the error has een negativ for sucien tly long time. Notice that the con trol signal ounces et een its limits sev eral times. The net e˛ect is large ersho ot and damp ed oscillation where the con trol signal —ips from one extreme to the other as in rela oscillations. The output

ˇnally comes so close to the reference that the actuator do es
Page 9
8.3. INTEGRA TOR WINDUP 209 10 20 30 40 50 60 70 0.5 1.5 10 20 30 40 50 60 70 −0.1 −0.05 0.05 0.1 10 20 30 40 50 60 70 −5 PSfrag replacemen ts Figure 8.6: Illustration of in tegrator windup. The plots sho pro cess output reference in the upp er plot, con trol signal in the middle plot, con troller output (full) and in tegral part and con trol error (dashed) in lo er part. (dash dotted). not saturate and the system then eha es linearly and settles quic kly There are man ys to oid windup, one

metho is illustrated in Figure 8.7. The system has an extra feedbac path that is generated measuring the actual actuator output, or the output of mathematical mo del of the saturating actuator, and forming an error signal as the di˛erence et een the output of the con troller and the actuator output ). The signal is fed to the input of the in tegrator through gain =T The signal is zero when there is no saturation and the extra feedbac lo op has no e˛ect on the system. When the actuator saturates, the signal is di˛eren from zero. The normal feedbac path around the pro cess is brok

en ecause the pro cess input remains constan t. The feedbac around the in tegrator will act and it attempts to driv to zero. This implies that con troller output is ept close to the saturation limit and in tegral windup is oided. The rate at whic the con troller output is reset is go erned the
Page 10
210 CHAPTER 8. PID CONTR OL Figure 8.7: PID con troller with an ti-windup. 10 15 20 25 30 0.5 1.5 10 15 20 25 30 −0.05 0.05 0.1 0.15 10 15 20 25 30 0.5 PSfrag replacemen ts Figure 8.8: Con troller with an ti-windup applied to the system of Figure 8.6. The plots sho pro cess output

reference in the upp er plot, con trol signal in the middle plot, con troller output (full) and in tegral part and con trol error (dashed) in lo er part. (dash dotted).
Page 11
8.4. TUNING 211 feedbac gain, =T where the trac king time constan can in terpreted as the time constan t, whic determines ho quic kly the in tegral is reset. short long time constan giv es slo reset and short time constan short reset time. Measuremen error can cause an undesirable reset if the time constan is to short. reasonable compromise is to ho ose as fraction of for prop ortional con trol and as for PID

con trol. Figure 8.8 sho ws what happ ens when con troller with an ti-windup is applied to the system sim ulated in Figure 8.6. The output of the in tegrator is quic kly reset to alue suc that the con troller output is at the saturation limit, and the in tegral has negativ alue during the initial phase when the actuator is saturated. This eha vior is drastically di˛eren from that in Figure 8.6, where the in tegral as ositiv during the initial transien t. Also notice the drastic impro emen in erformance compared to the ordinary PI con troller used in Figure 8.6. 8.4 uning There are man ys

to tune PID con troller. raditional con trol tec h- niques based on mo deling and design can used, but there are also sp ecial metho ds for direct tuning based on simple pro cess exp erimen ts. few meth- ds are describ ed in this section. PI Con trol of First Order Systems The dynamics of man systems can appro ximated ˇrst order system with the transfer function The appro ximation is reasonable for systems where storage of mass, momen- tum and energy can captured one state ariable. ypical examples are elo cit of car on the road, con trol of elo cit of rotating system, electric systems

where energy is essen tially stored in one comp onen t, incompressible —uid —o in pip e, lev el con trol of tank, pressure con trol in gas tank, temp erature in dy with essen tially uniform temp erature distribution. PI con troller with set oin eigh ting is describ ed sk
Page 12
212 CHAPTER 8. PID CONTR OL and the transfer function of the closed lo op system from reference to output is bk bk The closed lo op system has the haracteristic olynomial bk bk Assuming that the desired haracteristic olynomial is (8.10) ˇnd that the con troller parameters are giv en (8.11) The parameter

determines the resp onse sp eed and determines the damping. The same approac can used to ˇnd the parameters of PID con troller for pro cess with dynamics of second order. Lo op Shaping Since PI con troller has parameters it is ossible to shap the lo op transfer function sp ecifying one oin on the Nyquist curv e. or example, can ho ose con troller gains to giv sp eciˇed phase margin at giv en crosso er frequency sp eciˇc let the pro cess transfer function ). The frequency resp onse of the lo op transfer function with PI con trol is i! i! ib where Re i! cos and Im i! sin Requiring

that the phase margin is get cos sin
Page 13
8.4. TUNING 213 Solving this equation giv es the con troller parameters cos sin cos sin cos sin (8.12) ha arg i! arg i! since PI con troller has phase lag et een and ˇnd that the gain crosso er frequency ust hosen so that arg i! (8.13) It follo ws from(8.12) that in tegral gain is zero at the lo er limit and pro- ortional gain is zero at the higher limit. Figure 8.9 sho ws the Nyquist plots for the lo op transfer function for di˛eren for system with the transfer function 1) With phase margin (8.13) ecomes 13 tan 24 tan 58 The lo

er limit corresp ond to purely in tegrating con troller and the upp er limit is purely prop ortional con troller. In Section ?? it as sho wn that is go measure for load disturbance atten uation and that the stabilit margin is go robustness measure. These measures are sho wn in Figure 8.9. The largest alue 30 is obtained for 36, the largest stabilit margin 48 is obtained for 18. Reasonable alues of the gain crosso er frequency are et een 0.18 and 0.36. or get 71, 29 and 67 and for 36 get 96, 30 and 55. Ziegler-Nic hols' uning Metho ds Tw sp ecial metho ds for tuning of PID con trollers dev elop

ed Ziegler and Nic hols in the 1940s are still commonly used. They are based on the follo wing idea: Mak simple exp erimen t, extract some features of pro cess dynamics from the exp erimen tal data, and determine con troller parameters from the features. One metho is based on the op en-lo op step resp onse, whic is harac- terized parameters and del as sho wn in Figure 8.10. The step
Page 14
214 CHAPTER 8. PID CONTR OL PSfrag replacemen ts Re i! Im i! 0.2 0.4 0.6 0.2 0.4 0.6 0.8 PSfrag replacemen ts Re i! Im i! Figure 8.9: The left ˇgure sho ws the lo op transfer functions for PI

con- trollers gain crosso er frequencies are 13 (dashed), 0.3, 0.4, 0.5 (full) and 0.58 (dash-dotted). The righ ˇgure sho ws con troller gains (full), (dashed) and stabilit margin (dash-dotted) as functions of the phase margin resp onse is haracterized parameters and del whic are the in tercepts of the steep est tangen of the step resp onse with the co ordinate axes. a- rameter del at is an appro ximation of the time dela of the system and a=T del is the steep est slop of the step resp onse. Notice that it is not necessary to ait un til steady state to ˇnd the parameters, it

suces to ait un til the resp onse has had an in—ection oin t. The con troller parameters are giv en in able 8.1. Another metho is based on frequency resp onse features as also de- elop ed Ziegler and Nic hols. Pro cess data is obtained connecting able 8.1: Con troller parameters for the Ziegler-Nic hols step resp onse metho d. arameter is an estimate of the erio of damp ed oscillations of the closed lo op system. Con troller ak =T del =T del =T del PI 0.9 5.7 PID 1.2 /2 3.4
Page 15
8.4. TUNING 215 PSfrag replacemen ts del Figure 8.10: Characterization of the unit step resp

onse parameters and del whic are the in tercepts of the steep est tangen to the resp onse with the co ordinate axes. The oin where the tangen is steep est is mark ed with small circle. able 8.2: Con troller parameters for the Ziegler-Nic hols frequency resp onse metho whic giv es con troller parameters in terms of critical gain and critical erio arameter is an estimate of the erio of damp ed oscillations of the closed lo op system. Con troller =k =T =T =T 0.5 1.0 PI 0.4 0.8 1.4 PID 0.6 0.5 0.125 0.85 feedbac lo op with prop ortional con trol. The gain of the con troller is increased un til the

system reac hes the stabilit oundary the gain of the con troller and the erio of the oscillation is observ ed. The con troller parameters are then giv en able 8.2. Impro ed Ziegler-Nic hols Rules There are dra wbac ks with the Ziegler-Nic hols rules, to little pro cess information is used and the closed lo op systems obtained lac robustness. Substan tially etter tuning is obtained ˇtting the mo del sT sT (8.14)
Page 16
216 CHAPTER 8. PID CONTR OL PSfrag replacemen ts del 63 63 Figure 8.11: Finding the parameters of the mo del (8.14) from unit step resp onse. to the step resp

onse. simple to do this is illustrated in Figure ?? The steady state gain of the pro cess is determined from the steady state alue of the step resp onse. The time dela del is determined from the in tercept of the step est tangen to the step resp onse as in Figure 8.10 and the time 63 is the time where the output has reac hed 63% of its steady state alue. arameter is giv en 63 del Notice that the exp erimen tak es longer time than the exp erimen in Figure 8.10 ecause it is necessary to un til the steady state has een reac hed. The follo wing tuning form ulas ha een obtained tuning con trollers

to large set of pro cesses ypically encoun tered in pro cess con trol min 25 del max del (8.15) Figure 8.12 illustrates the relations et een the con troller parameters and the pro cess parameters. The con troller gain is normalized ultiplying it either with the static pro cess gain or with the parameter del =T In tegral gain is normalized ultiplication with del and in tegration time division del The con troller parameters in Figure 8.12 are plotted as functions of the normalized time dela del del ). min 25 del max del (8.16) Notice that the impro ed form ulas ypically giv lo er con troller

gain than the Ziegler-Nic hols metho d, but that in tegral gain is higher particularly for
Page 17
8.4. TUNING 217 0.2 0.4 0.6 0.8 10 −1 10 10 0.2 0.4 0.6 0.8 10 −1 10 10 0.2 0.4 0.6 0.8 10 −1 10 10 0.2 0.4 0.6 0.8 10 −1 10 10 PSfrag replacemen ts ak del =T del Figure 8.12: Prop ortional and in tegral gains for PI con trollers giv en the Ziegler-Nic hols rule (dotted), the impro ed rule giv en ?? (dashed) and con troller designed for kno wn transfer functions ). systems with dynamics that is dela dominated. The ˇgure also sho ws that signiˇcan impro

emen ts are obtained haracterizing dynamics three parameters. There are also impro ed tuning form ulas for the frequency resp onse metho d. In this case it is con enien to haracterize the pro cess crit- ical gain critical erio and static pro cess gain One impro ed form ula that is applicable for is 25 (1 (8.17) Rela eedbac The exp erimen in Ziegler-Nic hols frequency resp onse metho giv es the fre- quency where the pro cess has phase lag of 180 and the gain of the pro cess transfer function at that frequency Another to obtain this information is to connect the pro cess in feedbac lo op with

rela as sho wn in Fig- ure 8.13. This has een used to dev elop metho ds for automatic tuning of PID con trollers. or man systems there will then an oscillation, as
Page 18
218 CHAPTER 8. PID CONTR OL oc es el Figure 8.13: Blo diagram of pro cess with rela feedbac k. 10 15 20 25 30 −1 −0.5 0.5 PSfrag replacemen ts Figure 8.14: Pro cess output (solid) and rela output (dashed) for system under rela feedbac k. Notice that the signals are out of phase. The pro cess has the transfer function 1) sho wn in Figure 8.14, where the con trol signal is square and the pro- cess output

is close to sin usoid. Notice that the pro cess input and output ha opp osite phase and that stable oscillation is established quic kly explain ho the system orks, assume that the rela output is ex- panded in ourier series and that the pro cess atten uates higher harmonics e˛ectiv ely It is then sucien to consider only the ˇrst harmonic comp onen of the input. The input and the output then ha opp osite phase, whic means that the frequency of the oscillation 180 is suc that the pro cess has phase lag of 180 If is the rela amplitude, the ˇrst harmonic of the square input

has amplitude d= Let the amplitude of the pro cess output. The pro cess gain at 180 is then giv en 180 (8.18) Notice that the rela exp erimen is easily automated. Since the amplitude of the oscillation is prop ortional to the rela output, it is easy to con trol it adjusting the rela output. Notice in Figure 8.14 that stable oscillation is
Page 19
8.5. COMPUTER CONTR OL 219 Figure 8.15: PID con troller with automatic tuning. established ery quic kly The amplitude and the erio can determined after ab out 20 only in spite of the fact that the system is started so far from the

equilibrium that it tak es ab out to reac the correct lev el. The erage residence time of the system is 12 s, whic means that it ould tak ab out 40 for step resp onse to reac steady state. The idea of rela feedbac has een used to implemen PID con troller with automatic tuning. An example of suc con troller is sho wn in Fig- ure 8.15. or this con troller tuning is accomplished simply pushing button whic activ ates rela feedbac k. The rela amplitude is adjusted automatically not to erturb the pro cess to uc and the con troller auto- matically rev erts to PID mo de as so on as the tuning is

accomplished. 8.5 Computer Con trol In this section will describ ho PID con troller ma implemen ted using digital computer. More material on implemen tation is giv en in Chapter 10. Most con trollers are implemen ted in computers. The computer ypically op erates erio dically signals from the sensors are sampled and con- erted to digital form the AD con erter, the con trol signal is computed, con erted to analog form for the actuators. The sequence of op eration is as follo ws:
Page 20
220 CHAPTER 8. PID CONTR OL 1. ait for clo in terrupt 2. Read analog input from sensor 3. Compute

con trol signal 4. Set analog output to the actuator 5. Up date con troller ariables 6. Go to Notice that an analog output is done as so on as the output is ailable. The time dela is minimized making the calculations in Step as short as ossible and to dela all up dates un til the analog output is commanded. Discretization As an illustration consider the PID con troller in Figure 8.7 whic has ˇl- tered deriv ativ e, set oin eigh ting and protection against in tegral windup. The con troller is con tin uous time dynamical system. implemen it us- ing computer the con tin uous time system has

to appro ximated discrete time system. The signal is the sum of the prop ortional, in tegral and deriv ativ terms (8.19) and the con troller output is sat( )) where sat is the saturation function that mo dels the actuator. The prop ortional term is sp This term is implemen ted simply replacing the con tin uous ariables with their sampled ersions. Hence, )) (8.20) where denotes the sampling instan ts, i.e., the times when the computer reads the analog input. The in tegral term is ds sat(
Page 21
8.5. COMPUTER CONTR OL 221 Appro ximating the in tegral sum giv es +1 sat( (8.21) The

deriv ativ term is giv en the di˛eren tial equation dD dt Appro ximating this equation with bac kw ard di˛erence ˇnd This can rewritten as )) (8.22) The adv an tage using bac kw ard di˛erence is that the parameter is nonnegativ and less than one for all 0, whic guaran tees that the di˛erence equation is stable. Computer Co de Reorganizing Equations (8.19), (8.20), (8.21) and (8.22) the PID con troller can describ ed the follo wing pseudo co de. "Precompute controller coefficients bi=ki*h ad=Tf/(Tf+h) bd=kd/(Tf+h) br=h/Tt "Control algorithm main loop r=adin(ch1) "read

setpoint from ch1 y=adin(ch2) "read process variable from ch2 P=K*(b*r-y) "compute proportional part D=ad*D-bd*(y-yold) "update derivative part v=P+I+D "compute temporary output u=sat(v,ulow,uhigh) "simulate actuator saturation daout(ch1) "set analog output ch1 I=I+bi*(r-y)+br*(u-v) "update integral yold=y "update old process output
Page 22
222 CHAPTER 8. PID CONTR OL Precomputation of the co ecien ts bi ad bd and br sa es computer time in the main lo op. These calculations ha to done only when con troller parameters are hanged. The main program ust called once ev ery

sampling erio d. The program has three states: yold and One state ariable can eliminated at the cost of less readable co de. Notice that the co de includes deriv ation of the pro cess output only prop ortional action on part of the error only 1), the last term in the up dating of the in tegral giv es protection against windup. 8.6 urther Reading Ziegler-Nic hols original pap er. Some pap er from industry (Honeyw ell) that describ es industrial use. Bialk wsky?. comprehensiv presen tation of PID con trol is giv en in ]. Ov erviews of industrial use of adaptiv con trol is found in [] and [].