EETimes

Embedded Systems October 2000 Vol13_11

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

Contents of this Issue

Navigation

Page 99 of 181

FIGURE' P.recision actuator whh proportional feedback vs. time .' 2 , c 1.5 1- ,g 'iii ~ II 1 1~ Ii I 0.5 ' -- o L-__ ~====~==~~----------~L- - ' . ,: , ~ I , ,, o .. : 0.5 , ' 1.5 2 Time 2.5 3 3.5 4 I --'~-","- - .. '- ,: , • I : I , ~ , " , 1 __ ~~~~~~ __ ~~~~ ____ ~~~ __ ~~ :/A ,: , . . : , I' _.- .. ,.,. .... -__ <.. .1_ --:---- , : : , ___ f ___ , , , , , : , '- ~ I __ I I I I ' , ,- , " : , .. , , "- I .. , ... , ./. -- up ver), far and the system star ts set- tling out at five seconds, and fini shes at around six seconds. Note that with the code example above you must scale iMin and iMax whenever you change the integrator gain. Usually you can just set the in te- grator minimum and maximum so that the integrator output matches the drive minimum and maximum. If you know your disturbances will be small and you want quicker settling, you can limit the integrator furth er. Differential I didn 't even show the precision actua- tor in tlle previous section. This is because the precisio n actuator cannot be stabilized with PI controL In gener- al, if you can't stabilize a plant witll propo rtional control, YOll can't stabi- lize it with PI controL We know that proportional control deals with the present behavior of the plant, and that integral control deals witll the past behavior of the plant. If we had some clement that predicts the plant behavior th en this might be used to stabilize the plant. A differe ntiator will do the trick. The code below shows th e diffe l-- t""Clorr 0" WI RE LESS doubLe dTerm; For more information, contad us at infoOzucoHo.com, or toll free at 877-Zucotto. dTerm = pid- >dGain * (pid->dState - position); pid->dState = position; ential term of a PID controller. J pre- fe r to lise the actual plant positio n rather than the error because thi s makes fo r smoother transitions when the command value changes. The dif- fere ntial term itself is th e last value of the position minus the current value of the positio n. This gives you a rough estimate of th e velocity (delta position/ sample time), which pre- dicts whe re the positio n will be in a while_ 98 OCTOBER 2000 Embedded Systems Programming

Articles in this issue

Archives of this issue

view archives of EETimes - Embedded Systems October 2000 Vol13_11