Back to Basics in process control
Closing the loop in PID Control Systems


Carl Ljungholm, Control Engineer, National Instruments

Despite recent advances in control theory into adaptive, predictive and optimal control, the most widely controller remains the PID controller. Its success can be explained by characteristics such as simplicity and good results in many applications. What are the basic principles behind the use of PID controller? How does a PID controller work? Some considerations for implementing a PID controller by Control Engineer Carl Ljungholm of National Instruments.


Take the example of the flow rate of a fluid running through a pipe. The fluid in the pipe represents the plant or system we want to control and the process variable is the flow rate we want to control. The plant is controlled by a compensator consisting of a PID controller and an actuator, in this case a valve. The PID controller outputs a signal that opens or closes the valve. The opening and closing of the valve affects the flow rate through the pipe. The valve position is the compensator output. Finally, we need a sensor to measure the flow rate in the pipe so the measurement is fed back and compared to the desired flow rate or set point (figure 1)

Open- and Closed Loop
Feedback distinguishes a closed loop system from an open-loop system. An open-loop control system is similar to trying to walk across a room blind-folded. With out the blind-fold we get feedback from our surroundings creating a closed loop system. Also present in the system are disturbances in the form of leaks or variations in the supply pressure. We want the process variable, the flow rate, to depend only on the set point while ensuring the disturbances have no affect on results. Closed-loop systems can reject disturbances by measuring the output. The comparison of the set point with the current value of the process variable gives the error. The goal of the control system is to make the error zero. (Figure 2)
In a PID controller this is done through the combination of its three terms: proportional, integral and derivative. The first term is the proportional term, which produces a signal that is proportional to the error. The valve is opened if the flow rate is too small and is closed if the flow rate is too high. Increasing the proportional gain generally increases the performance of the control system. As the proportional gain increases, the response to change in the input becomes faster while the affect of a disturbance decreases. However, a gain that is too high will make the system unstable.
The integral term sums the error over time. The output from the controller is only constant if the error is zero. Therefore, the integral term continues to adjust the actuator until there is zero error. The integral is useful for rejecting disturbances. Decreasing integral time (Ti) increases the rate at which the system reacts to a disturbance. Too small of an integral time will give overshoot, which occurs when the controller over adjusts the output after a change in the set point. The process variable temporarily exceeds the set point before settling in. A small amount of overshoot is often desirable as it will give a faster response to a change in the set point.

The last term is the derivative. If the output of the system is approaching the set point quickly, then the derivative term reduces the signal to the actuator. Increasing the derivative time (Td) tends to make a system more stable and reduce overshoot. However, in practice, the range for the derivative term is limited due to the amplified noise in the measurement of the output variable. A filter can remove the high frequencies noise from the measured signal.

Implementing a PID controller
Determining the parameters of the PID is only a small part of implementing a control system. We must also measure the process variable, output a control signal, and evaluate the PID calculation. Even a poorly implemented PID controller can increase quality and yield in a production process, but to get the full advantage, we must consider the way it is implemented. The performance of the PID controller is affected by the chosen loop rate in addition to the accuracy of the measurement, calculation and controller output.
The first step in implementing the PID controller is determining an appropriate loop rate. Most control systems are discrete, meaning they measure the pro­cess variable and update their outputs at a fixed rate. The output remains constant in between updates. Although a faster loop rate has better performance, it also requires more expensive hardware. The necessary loop rate depends on how quick the system responds to changes. For example, a large tank that takes several minutes to undergo a temperature change requires a slow loop rate compared to the loop rate speed necessary to control an unstable airplane. A rule of thumb is that the rate of the controller should be ten to fifteen times faster than the time constant of the system. Increasing the loop rate beyond this will not significantly increase the performance of the system. For many industrial processes the required loop rate is less than 100 Hz.
Accuracy in the process measurement variable, PID calculation, and output of the compensator is also an important consideration. A sensor will measure the process variable and output a voltage, current or pulse-width modulated signal that can be measured by the controller. Both the accuracy of the sensor as well as the accuracy of the measurement is important, since control systems cannot adjust for errors in the measurement of the process variable. The precision of the measurement is, in part, measured in bits. An 8 bit measurement will only allow the controller to distinguish between 256 different levels of the process variables, where as a 16 bit measurement will give over 65,000 levels. The same applies to the output of the controller. A small resolution on the output will limit the compensators ability to precisely control the plant. Finally the accuracy of the measurement must be maintained in the PID calculations. A floating point processor is ideal for doing the calculations needed for PID control. A fixed point processor can be used, but care must be taken to preserve the accuracy.

PC based control systems
PC based control systems allow for a more capable control system. Higher loop rates are now possible, multiple PID loops can run on the same controller, and precision of measurements have increased. The cost of both analog input and output has dropped as much as 70%. Higher precision measurements, while once too costly to ascertain, are now affordable. As a result, 8 bit measurements are no longer considered adequate, and 12 and 16 bit measurements are becoming increasingly common. Control systems are also performing tasks beyond strict control. For example, a control system can now do data logging which can later verify that the process is operating within the limits. Additionally, it can tune the PID loop or to predict maintenance. Having the same hardware performing both control and data logging reduces the cost of the overall system.
However, in industrial environments the PC may not be adequately rugged. PLCs have the required ruggedness, but do not have the flexibility and functionality of a PC. The new Programmable Automation Controllers (PACs) emerged to combine the benefits of a PC with the benefits of a PLC. PACs integrate the ruggedness and durability of a PLC, with the analysis and measurement capabilities of a PC making PACs ideal for industrial control applications.

A closed loop control system can increase quality and yield from a production line, by maintaining operation conditions at a desired set point. The PID controller is the most common controller, because it is simple and produces good results in most situations. The output of the PID controller is defined by three terms: proportional, integral and derivative. When implementing a PID control system, chosen hardware must maintain the necessary loop rate, and produce adequate precision measurements and calculations. <<

 

©