A PID Controller
A PID Controller
process variable and a desired setpoint. The controller attempts to minimize the
error by adjusting the process control outputs.
P depends on the present error I on the accumulation o! past errors and D is a
prediction o! future errors based on current rate o! change.
"#$
The weighted sum o!
these three actions is used to adjust the process via a control element such as the
position o! a control valve a damper or the power supplied to a heating element.
%ome applications may re&uire using only one or two actions to provide the
appropriate system control. This is achieved by setting the other parameters to
zero. A PID controller will be called a PI PD P or I controller in the absence o! the
respective control actions. PI controllers are !airly common since derivative action
is sensitive to measurement noise whereas the absence o! an integral term may
prevent the system !rom reaching its target value due to the control action.
Control loop basics
A familiar example of a control loop is the action taken when adjusting hot and cold faucets to
fill a container with water at a desired temperature by mixing hot and cold water. The person
touches the water in the container as it fills to sense its temperature. Based on this feedback they
perform a control action by adjusting the hot and cold faucets until the temperature stabilizes as
desired.
The sensed water temperature is the process variable (!". The desired temperature is called the
setpoint (#". The input to the process (the water valve position"$ and the output of the %&
controller$ is called the manipulated variable ('!" or the control variable ((!". The difference
between the temperature measurement and the setpoint is the error (e" and )uantifies whether the
water in the container is too hot or too cold and by how much.
After measuring the temperature (!"$ and then calculating the error$ the controller decides how
much to change the tap position ('!". Because the taps can be adjusted for anything from cool
water through to very hot$ this is an example of proportional control. %n the event that water in
the container is not heating )uickly enough$ the controller may try to speed up the process by
opening up the hot water valve )uite wide for a while. This is an example of derivative action.
*dubious discuss+
%f the temperature of the container is settling out too low$ despite a good flow of
warm water$ the controller may open the hot valve more and more as time goes by. This is an
example of an integral control.
'aking a change that is too large when the error is small will lead to overshoot. %f the controller
were to repeatedly make changes that were too large and repeatedly overshoot the target$ the
output would oscillate around the setpoint in either a constant$ growing$ or decaying sinusoid. %f
the amplitude of the oscillations increase with time then the system is unstable$ whereas if they
decrease the system is stable. %f the oscillations remain at a constant magnitude the system is
marginally stable.
%n the interest of achieving a gradual convergence to the desired temperature (#"$ the controller
may damp the anticipated future oscillations by tempering its adjustments$ or reducing the loop
gain.
%f a controller starts from a stable state with zero error (! , #"$ then further changes by the
controller will be in response to changes in other measured or unmeasured inputs to the process
that affect the process$ and hence the !. !ariables that affect the process other than the '! are
known as disturbances. -enerally controllers are used to reject disturbances and to implement
setpoint changes. (hanges in feedwater temperature constitute a disturbance to the faucet
temperature control process.
%n theory$ a controller can be used to control any process which has a measurable output (!"$ a
known ideal value for that output (#" and an input to the process ('!" that will affect the
relevant !. (ontrollers are used in industry to regulate temperature$ pressure$ flow rate$
chemical composition$ weight$ position$ speed and practically every other variable for which a
measurement exists.