EETimes

Embedded Systems October 2000 Vol13_11

Issue link: http://dc.ee.ubm-us.com/i/71842

Contents of this Issue

Navigation

Page 109 of 181

FIGURE 17 P.recision actuator with PID control , " , , 0.8 :;:; 0.6 c.. c: 0 'iii 0 V> btl !! 0.4 ., 0.2 I •.• o 0.1 _~ 0,2 Time " , , . , .- ,-, , .. .. ... ."",--------- ' . ,.., , , , : --, .- -. t I I I ' tl - - __ -.... -~. FIGURE 18 Heater with PID control , ..,--., ... -~-- 0.8 I I!!- 0.4 ' II E ~ ., " Q. , , , 0.2 0 0 0.5 Time Sampling rate So far J've only talked abo ut sample rates in terms of how consistent Lhey need to be, but I haven 't told you how to decide ahead of time what Llle sam- ple rate needs to be. If your sampling rate is too low you may not be able to achieve the performance you want, because of the added delay of the sam- pling. If your sampling rate is too high you will create problems with noise in your differentiator and overflow in your integrator. The .-ule of Lllumb [o r digital con- trol systems is that the sample time sho uld be between 1/ lOth and 108 oaOBER 2000 Embedded Systems Programming 1.5 2 I' - - Command • pGain = 20. iGain = 0.5. dGain = 100 • pGain = 20. iGain = 0.1, dGain = 100 pGain = 10. iGain = 0.1, dGain = 50 - - • pGain = 5, iGain = 0.1, dGain = 50 ~ 0.6 1 I , , , , I ' -... -...... ,. ., ........ - - • dGain = 2000, pGain - - • dGain = 2000, pGain Command dGain = 5000, pGain dC. " 0.3 ~ 5000. pC." 0.4 = 200 = 500 ~ 1: j ! = 1000 ' 2000 ... ' II ~ 0.5 .' ' , . . . . 1/ 100th of the desired system setLling time . System settling time is th e amoun t of time from the moment Llle drive comes o ut of aturation until the control system has effectively se tLled out. [f you look at Figure 16, the con- troller comes o ut of saturation at about 5.2s, and has se tLled out at around 6.2s. If you can live with the one second settling time you could get away with a sampling rate as low as 10Hz . Yo u sho uld treat th e sampling ra te as a flexible quantity. Anything that might ma ke th e co ntrol pro blem more di ffi cult would indicate that you sh o uld raise the sampling rate , Factol's su ch as having a difficult plant to control, or needing diffe re n- tial control, 0 1' needing ve ry precise control wo uld all ind icate ra ising lh e sampling rate. [[ you have a very easy comrol pro blem you could get away wilh lowe rin g th e sampling ra te somewhat (1 would hesita te to length en th e sample time to more than one-fifth of the desired settling time). If you are n 't using a diffe re n- ti ato r and you a l'e careful about using eno ugh bi ts in your in tegl'alor you can get away with sampling ra les 1,000 tim e fas te r tha n the intended settling time. Exert control This covers the basics of implement- ing and tuning PID controllers. With this information, you should be able to attack the next control problem that comes your way and get it under control. esp Tim Wescoll has a master's degrf'e in elec- trical mgineering and has been working in industry for rnore than a decade. His eX/le- l" ience has inclu.dpd a number of control lOOl)S closed in software using 8- to 32-bit rni~~"opmcesson~ DSPs, assembly language, C, and C++. !-If' is cUTTently involved in control systems design at FLIR Systems when' he st)ecijies mf'chanical, electrical, and soflwaTe -requinmzents and does electri- cal and soflwa-re design. You can contact him at robintim@teleport. com.

Articles in this issue

Archives of this issue

view archives of EETimes - Embedded Systems October 2000 Vol13_11