[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: [PSUBS-MAILIST] life support method?
On Sat, 5 Aug 2000 12:55:06 -0400, Karl Fuller wrote:
>Hi Sean,
>Can you please explain how PID works, obviously not my field of expertise.
>Thanks.
>Karl.
Sure thing. PID stands for Proportional Integral Differential.
Essentially, it is a PLC (programmable logic controller) program that
effects three distinct actions on a given output variable, using
negative feedback. Let's start with the P, or proportional action.
The proportional action changes the magnitude of the output according
to the magnitude of the input error (difference between actual input
and setpoint). Thus it is proportional to that error. To make this a
bit easier to understand, imagine a tank full of water, with a drain at
the bottom. The water level drops as the water drains out, and our
controller is opening a valve to let water in the top of the tank. If
the system is stable at our setpoint (desired water level), then water
coming in is equal to water leaving. Now, suppose we open the drain
valve a little further so that the water level starts to drop. Our
proportional controller detects the error and opens the fill valve
until the water level is again stable. Water in equals water out,
except now the flow rate is higher, and the stable equilibrium point is
lower, since the level dropped before the new equilibrium was
established. This is proportional control. The problem now is that
although we are keeping things moving and the level stable, the water
level is still lower than our intended setpoint. The limitation of
proportional only control is that the equilibrium point is only at the
setpoint for a single specific flow rate. To correct this error, we
now introduce the I, or integral control. What integral control does
is measure the error between the level and the setpoint, and integrate
it over a specified time interval, and use the resulting value to
control the output. In our water tank example, a new equilibrium has
been established at a lower level by the proportional controller. If
we now introduce integral control, the consistent error over time would
prompt the output to the fill valve to increase. Then the water flow
into the tank would increase, the level would rise, and during the next
integral period (time interval), the integral controller would detect a
lesser error over time and decrease the output, until eventually the
setpoint was reached, and there would be no integral output at all.
Only the proportional output would be still acting to maintain the
equilibrium between fill flow and drain flow, and producing exactly the
same output as it did before we turned on the integral control. Having
integral control is great, because not you can maintain your setpoint,
but what if keeping at the setpoint is critical? You don't want to be
off of it for very long, so you set your gains really high and use fast
acting valves to make correction take as little time as possible.
You've now introduced a new problem, because you return to the zero
error condition very quickly, and will tend to overshoot. Now we get
to the D, for differential control. Essentially, what the differential
control does is detect the rate of change of error, so that if
correction is too slow, it increases the output, or if correction is
too fast, output is reduced to avoid overshooting (or undershooting)
the setpoint. Ideally, you will end up with a system which is
critically damped, which corrects offset error quickly, but does so
without wild fluctuations (underdamped) or excessive time lag to
correction (overdamped). Combining all three of these output actions
into one controller gives us a PID.
Hope this helps.
-Sean