# De-mystifying PID feedback loop control

### People are mystified by the full spelling of the acronym PID, which stands for proportional integral derivative.

These terms are borrowed from calculus so it is little wonder that people are frightened at the thought of grappling with the complexities of feedback control.

If you were to call a PID loop a compensator instead, nobody apart from the most pedantic academic could take issue with you. OK, some engineers can get quite technical and start talking about lead-lag compensation and suchlike, but the principle is the same.

A PID controller examines signals from sensors placed in a process, called feedback signals. When a feedback signal is received, it is compared with the desired value, or set-value, and a calculation is made of what the necessary response is in order to make the feedback signal, also known as the ‘error’ signal because of its deviation from the set-value, match the set-value.

Process controllers generally work on the principle of a ‘closed-loop’. Taking a typical application like an oven (see diagram), the measured temperature, referred to as the process value (PV), is fed into the controller and compared to the users set value (SV), which is the desired final temperature value. As the temperature is seen to rise, the power to the oven is reduced by the controller until a power level which can maintain the desired temperature is reached. By continuing to monitor and adjust the power level, accurate control is achieved.

Most industrial processes such as plastic extrusion require a stable 'straight-line' control of the temperature. The PID control algorithm, referred to as 'three-term' control provides exactly that. The output of the controller is the sum of the three terms. The combined output is a function of the magnitude and duration of the error signal and the rate of change of the PV.

The PID controller will automatically control process variables such as temperature, pressure and flow - in fact almost any physical variable that can be represented as an analogue signal. The example shown assumes that the variable is temperature, which is the most common, but the principles are equally applicable to all analogue variables.

The ‘official’ PID explanation goes something like this:

? ‘P’ stands for proportional and is the factor which determines the basic rate of change at the output in response to changes in the input.

? This proportional element is modified by the ‘I’, which stands for integral and is based on the time that a difference between set-value and process-value exists.

? Finally, the ‘D’ is the derivative, a function of the rate of change whilst the process value is moving with respect to the set-value.

Proportional control varies the amount of power supplied to the heating elements in direct proportion to the difference (the error) between the actual process temperature value and the required set-value. The integral function prevents the initial overshoot on power-up, while the derivative function eliminates the temperature instability over time once the set-value is achieved and the process is under control.

Most heating applications can be handled by proportional control only. A proportional controller has the ability to vary its output between 0-100 percent. This enables it to continuously adjust the output so that the power input to the process is in balance with the process demand. The range, or band, where the output power is adjusted is called the proportional band (PB). At the bottom of the PB, power output is 100%, at the top the power output is 0%. Between top and bottom the PB is equally divided into percentage power levels so at the half way point, for example, the power level is 50%.

In theory, to maintain the set-value, an output of 50% will be required with the SV positioned in the centre of the proportional band. This would be an ideal situation but regrettably such cases are rare. Reasons for this could be the design of the process hardware, changing the set-value or variations in the load condition.

The PV will increase or decrease from SV, varying the output power until a balance is reached. The difference between the stabilised PV and SV is called ‘offset’ and can be reduced by narrowing the proportional band, however the proportional band can only be reduced so far before instability occurs. This is where the Integral term comes in.

Integral, also called ‘reset’, has one primary function, to eliminate offset. Reset pushes the actual temperature (PV) towards the set-value (SV) temperature until both are equal. This eliminates the temperature offset condition caused by proportional control on system start-up. To reduce or eliminate overshoot, we must use the D or derivative term of PID control.

In many thermal systems, overshoot (or undershoot) of the set-value temperature is perfectly acceptable. However, in some systems this can produce poor quality products or perhaps even damage expensive equipment. So derivative has one main job - to prevent or greatly reduce overshoot and undershoot. It does this by measuring the rate of temperature change, that is how fast the temperature is rising or falling. If the temperature rise is too fast, it will begin switching the heater off to prevent overshoot. If the temperature is falling too fast, it will begin switching the heater on longer to prevent undershoot.

Another way to think of derivative is that it opposes change. For example, if the temperature suddenly drops below the SV, derivative opposes the rapid drop by turning the heater full on. It does this instead of waiting for the temperature to fall to the bottom of the proportional band - by then it would be too late to avoid a big undershoot.

Luckily for us, most PID controllers come with automatic PID tuning but if you’re ever feeling brave and want to have a go, remember the following:

1. Increasing the PB will result in tighter control but give a slower response, taking longer to reach the set value.

2. A narrow PB generates a smaller offset than a wide PB.

3. Too fast a reset (integral) causes overshoot, while too slow a reset delays recovery.

4. A long rate (derivative) time may cause overshoot, while a short rate time may cause a delay in recovery.

Figure 1 PID block diagram

Figure 2 CD Automation’s REVO TC controller reduces wiring cost, installation time and cabinet size