BASIC KNOWLEDGE - PID CONTROLLER PID Controller - Definition and explanations
What is a PID controller used for and how does it work? For decades, PID has been established as the most popular form of process control – but why is this? The answer, as explained in this article, is that it overcomes the deficiencies of other control types. The explanation includes a discussion of how PID controllers relate to other control methods, what the PID terms mean, and how the controllers operate.
A control system hierarchy
Control systems are ubiquitous in industrial, medical, military, automotive, utility and many other applications - and sometimes appear in our daily lives. However, they come in many types, of which PID control is just one, albeit the most sophisticated. Accordingly, we start by explaining the control system hierarchy that exists today, and showing how PID control fits into this. Then, we focus in on PID controllers and how they operate.
Open loop control – the most basic type. One example is a garden hose, connected to a tap. Although the tap can be operated by a user to regulate water flow, the hose has no feedback mechanism to ‘close the loop’ for automatic regulation.
On/off or ‘Bang-Bang’ control - this is the simplest form of closed loop control, and is exemplified by a domestic heating system with a room thermostat. The thermostat compares the room temperature measured value (MV) with its setpoint (SP) as adjusted by its user. The system uses the MV feedback to close the loop. If the temperature is too low, it turns on the central heating to heat the room until it reaches SP temperature. If the temperature exceeds the SP, the heating will be turned off, and, possibly, air conditioning will be started for active cooling.
Practical thermostats have a hysteresis, or dead-band. This could typically be 4 °C, so for a setpoint of 20 °C, the thermostat turns on at 18 °C and below, and off at 22 °C and above. This exposes the limitations of on/off control; without hysteresis, the thermostat would switch continuously, which may cause excessive wear and tear, and possibly intrusive audible noise. Conversely, if the hysteresis gap is too wide, the room temperature will be sub-optimal for much of the time.
Additionally, in some industrial systems, a sudden and full load turn-on could lead to issues with inrush currents.
Proportional control is a continuous control method that offers more nuanced, robust and better quality performance than the relatively crude on/off approach. However, designing and optimizing a control loop for a particular application is not without some challenges. It is usually desirable if not essential to achieve the fastest possible response time and greatest steady-state accuracy, without creating a risk of instability. Once set up, the loop must maintain its optimum performance even during unpredictable and changing process conditions.
Below, we look at how proportional control systems operate, and how their performance can be assessed. Then we introduce the concepts of the Integral (I) and Derivative (D) functions, and explain their essential role in optimizing closed loop control performance for PID controllers. We see how the functions can be tuned to best balance response time and accuracy against stability under all conditions.
Today, most proportional and PID controllers are implemented either using embedded microprocessors or microcontrollers, or as software running on a PLC or larger supervisory control and data acquisition (SCADA) system. However, there are exceptions. Analogue PID controllers are still used for high bandwidth and low noise applications, and pneumatic systems are still available .
Note that, irrespective of the PID controller’s technology, the input and output variables are usually analogue.
In this configuration, the process variable is the system parameter that needs to be controlled, such as temperature, pressure or flow rate. The sensor measures this variable and feeds back a corresponding signal, which is usually electrical in a modern process control system; typically, 4 – 20mA. This is compared with the setpoint value, which could be adjusted by a user as in the thermostat example. However, in an industrial system, it may be set by another process, or by a programmable logic controller (PLC) control program.
The output from this comparison is the Error signal, which is used by the controller to calculate its output to the process. The controller’s proportional gain (Kp) determines the ratio of output response to the error signal.
In any case, the controller’s output is used to drive an actuator – which could be a heater in an industrial process for example. Accordingly, as the process heats towards the setpoint, the error signal is reduced as its temperature approaches its desired level. However, proportional control alone cannot provide perfectly accurate control; it cannot, by itself, completely eliminate the error signal, as the output becomes negligible as the error signal approaches zero. Additionally, the actuator output is often not the only influence on the system.
For instance, in a temperature chamber there might be a source of cool air that sometimes blows into the chamber and changes the temperature. This is called a disturbance. Additionally, the system’s response to a control output may change over time or in response to some variable. For example, a chamber partially filled with fluid will exhibit a much faster response to heater output when nearly empty than it will when nearly full of fluid. This creates a nonlinear system in which the control parameters that produce a desired response at one operating point might not produce a satisfactory response at another operating point.
Deadtime, caused by factors like delays arising from fluid flowing through pipes, can be another issue. Accordingly, control systems should be designed to minimize the effects of disturbances on the process variable, nonlinear processes, and deadtime.
The control design process
The control design process begins by defining the performance requirements. Control system performance is often measured by applying a step function to the set point input, and then measuring the response of the process variable. This is commonly quantified by measuring defined waveform characteristics.
Rise time is the amount of time the system takes to go from 10 % to 90 % of the steady-state, or final, value. Percent overshoot is the amount that the process variable overshoots the final value, expressed as a percentage of the final value. Settling time is the time required for the process variable to settle to within a certain percentage (commonly 5 %) of the final value. Steady state error is the final difference between the process variable and set point. Note that the exact definition of these quantities will vary in industry and academia.
What is a PID controller?
We will now look at the effects of varying the Proportional component of the controller’s output, and of introducing Integral (I) and Derivative (V) terms.
If we have just a Proportional (P) controller, we can start by setting the Kp gain to a modest value, such as 10 (K is dimensionless). After applying the step input, the output will be stable, but will approach the desired value slowly. If Kp is increased to, say, 100, both the steady state error and the rise time will be reduced – so far, so good. However, if we increase Kp to 200, although the rise time and steady state error are further reduced, overshoot starts to appear.
From here on, further increasing Kp merely increases overshoot, with no further reductions in rise time or steady state error. And overshoot may eventually become underdamped oscillation, meaning that the system will be unstable.
The industry’s solution to this has been to add Integral (I) and Derivative (V) components to the controller’s Proportional (P) output, to build a PID controller.
The Integral component sums the error term over time. The result is that even a small error term will cause the integral component to increase slowly. The integral response will continually increase over time unless the error is zero, so the effect is to drive the steady state error to zero. A phenomenon called integral windup results when integral action saturates a controller without the controller driving the error signal toward zero.
Although integral action can eliminate the steady state error, it can strongly contribute to controller output overshoot and possible instability. Nevertheless, PI control can be suitable for some processes, where system speed is not important. However, where instability is a potential concern, the solution is to implement a PID controller by adding a Derivative component.
Derivative components act on the rate of change of the error signal. The more error changes or the longer the derivative time, the larger the derivative factor becomes. The effect of this is to counteract the overshoot caused by P and I. When the error is large, the P and the I will push the controller output. This controller response makes error change quickly, which in turn causes the derivative to counteract the P and the I more aggressively. A properly used derivative allows for more aggressive proportional and integral factors. Larger derivative time makes the derivative more aggressively dampen P and I.
Watch also this video to get PID Controller explained!
Tuning a PID controller
Establishing the optimum combination of P,I and D parameters for a specific control loop is done by tuning – and three approaches to tuning are possible: manual, heuristic (‘Rule of thumb’), and automated.
Manual PID tuning is done by setting the reset (integral) time to its maximum value and the rate (Derivative) to zero, and increasing the gain until the loop oscillates at a constant amplitude. (When the response to an error correction occurs quickly a larger gain can be used. If response is slow a relatively small gain is desirable). Then set the gain of the PID controller to half of that value and adjust the reset time so it corrects for any offset within an acceptable period. Finally, increase the rate of the PID loop until overshoot is minimized.
Zeigler and Nichols’ two heuristic methods of tuning a PID controller were first published in 1942. These work by applying a step change to the system and observing the resulting response. The first method entails measuring the lag or delay in response and then the time taken to reach the new output value. The second depends on establishing the period of a steady-state oscillation. In both methods, these values are then entered into a table to derive the values for gain, reset time and rate for the PID controller.
Most PID controllers sold today incorporate auto-tuning functions. Operating details vary between manufacturers, but all follow rules similar to those described above. Essentially, the PID controller “learns” how the process responds to a disturbance or change in set point, and calculates appropriate PID settings.
OMEGA’s Platinum series of temperature controllers are examples of devices with auto-tuning capability.
What are PID tuning parameters? Find the answers in this video!
Designing PID based control systems – from your computer
NI’s LabVIEW toolset features a wide variety of Virtual Instruments (VIs) that greatly help in the design of a PID based control system . PID VIs allow development of Proportional (P); proportional-integral (PI); proportional-derivative (PD); and proportional-integral-derivative (PID) algorithms.
In this article, we have seen how PID controllers can be used to optimize control loops for response time, accuracy, and stability under all process conditions – and how the I and D terms provide a level of controllability not possible with the Proportional term alone.