Technical Note 113
PID Control
Introduction
A proportional–integral–derivative controller (PID controller) is a generic control loop mechanism (controller) widely used in industrial
control systems. A PID controller calculates an "error" value as the difference between a measured process variable and a desired
setpoint. The controller attempts to minimise the error (i.e. get to setpoint) by adjusting the process control inputs. In a PID controller
you can set up different values both for the P, the I and the D. But what do these terms mean?
PID controllers
PID controllers are capable of controlling processes such as chemical dosing with a pump. They do this by turning the pump on or off,
or up and down to maintain a setpoint. This is done by using a PID control loop. PID stands for Proportional, Integral and Derivative. It
is a mathematical manipulation of a measurement signal (e.g. the actual chlorine level) and the deviation of that signal from the
setpoint (the setpoint being the desired outcome of the dosing pump control).
The output from the PID controller is simply the addition of the Proportional, Integral, and Derivative terms.
Proportional Term: Pout = Kpe(t) Integral Term: Iout = Ki∫t0e(τ)dτ
Derivative Term: Dout = Kdde(t)/dt Output = Pout + Iout + Dout
where:
Kp = Proportional gain
Ki = Integral gain
Kd = Derivative gain
e = Current error (the difference between the setpoint and the current measured value)
t = Time
τ = Variable of integration
www.processinstruments.co.uk
Understanding the PID
Proportional Gain is the simplest to understand and it simply means that the further away from the setpoint the current
measured parameter is, the bigger the output signal e.g. if the current value being measured for chlorine is a long way below
the setpoint then the pump is turned up high. As the measured value gets close to the setpoint then the pump is turned down.
For nearly all recirculating processes Proportional control IS ALL THAT IS NEEDED and Integral and Derivative control are not
needed at all. If the proportional gain is set too high then the process can be unstable with the dosing overshooting the
setpoint. If the proportional gain is set too low then the process is unresponsive and setpoint may never be achieved.
In some recirculated processes where the measured parameter is lost to the process e.g. chlorine from a pool, heat from a
boiler etc. the proportional control never quite catches up with the
setpoint and users can see that although the process approaches the
setpoint it rarely, if ever, gets to it. This is known as 'droop'. If this
'droop' is not a problem to the process then the recommendation
would be to use only the Proportional part of PID. If the user wants to
eradicate the 'droop' then the Integral part can be applied to the signal
to correct it.
Integral Gain is the bit that adds up the amount of time that the
measurement parameter has been below or above the setpoint. i.e. it
records the time and degree that the measurement parameter has
been above the setpoint and below the setpoint. It subtracts one from
the other and then adds on or subtracts an extra bit of signal. This is
the main part of PID that is used to control a process where to
maintain a steady setpoint the dosing is never "off" e.g. chlorine in a
water treatment plant (often the processes are non-recirculating).
Derivative Gain is rarely used and is set up only by expert engineers.
PID control on Pi analysers
The PID mathematical manipulation can be assigned to an analogue output or a relay where the time that the relay is on is
controlled by the PID loop. This allows for any pump or control mechanism to be controlled by the PID loop.
The relay control using the PID loop in the CRONOS® and CRIUS®4.0 can be by "pulse width modulation", (e.g. the relay can be
set to 'on' for 30 seconds, and 'off' for 30 seconds (50% output)), or pulse frequency (the relay can pulse for example 30 times
out of a possible 60 times in a given time period (50% output)).
Extra Safeguards
Whilst maintaining a setpoint with a PID loop is a huge advance over using relays to
maintain an upper and lower limit, it is sensible to control the loop with extra
safeguards, such as maximum and minimum pump outputs, ramp rate (prevents
overshoot when starting from a very large 'e' (e.g. on startup)) integral wind up
protection (sets a maximum and minimum integral value), and overfeed protection
which will turn the control off if it is having no effect after a period of time as this
might be indicative of, for example a blocked injector or a broken pump. These are
all standard features in all Pi PID controllers.
Boost
Some processes need to be boosted to a higher setpoint periodically and Pi's PID
allows a boost setpoint to be triggered manually or remotely.
www.processinstruments.co.uk