Hundreds of thousands of PID controllers are used each year to control industrial processes, and it is important to become familiar with their operation.
What is a process controller? In simple terms, it's a device that measures an input and then tries to maintain it at a desirable value by adjusting an output device. Two controllers that we are familiar with in everyday life are the home thermostat and the automotive cruise control. The quantity that is measured and controlled is called the process variable (PV). For the home thermostat, the process variable is the temperature of the home; for the cruise control, it's the speed of the car.
The desirable value at which the process variable is to be maintained is called the setpoint (SP). We adjust the setpoint of our home thermostat to indicate the temperature, and we push the setpoint button on our cruise control to indicate the speed at which we want the car to be controlled.
Controllers change the value of the process variable by adjusting the control output (CO). A thermostat turns the furnace or air conditioner on or off to control temperature; cruise control adjusts the throttle to control speed. An industrial process controller typically uses a control output to drive a control valve to control a process variable like tank level, fluid flow, pressure, or temperature to a desired setpoint.
Most process controllers don't work directly with the process variable and setpoint, but rather work with an error signal (e) that is calculated from them. The error represents the deviation of the process variable from the setpoint, and it's calculated using the following equation:
e = PV - SP
A positive error indicates that the process variable is above the setpoint, and a negative error indicates that it's below the setpoint. Because the process variable information is fed back from the process being controlled, this type of process controller is sometimes called an error feedback controller. The controller uses the value of the error to determine the control output necessary to maintain the process variable at the setpoint. A block diagram of a typical controller is shown in Fig. 1.
ON/OFF controllers
The simplest types of controllers are called ON/OFF controllers, because they simply turn an output device ON or OFF depending on the value of the e. Most home thermostats are ON/OFF controllers. In the heating mode, a thermostat will turn the furnace ON when the error is negative and OFF when the error is positive. To keep the output from cycling rapidly ON and OFF, most ON/OFF controllers incorporate a deadband. The controller output remains in the current state until the error moves out of the deadband. In the case of the thermostat, for example, the deadband may be 4 [degrees] F. In this case, the error would have to be negative by 2 [degrees] F before the furnace would turn ON, and the error would have to reach a positive 2 [degrees] F before the furnace would shut down. Because of deadband, the process variable controlled by an ON/OFF controller is always cycling back and forth around the setpoint, as shown in Fig. 2. ON/OFF control is often called "bang-bang" control because the control output is cycled between two extremes.
Continuous controllers
Most industrial processes use continuous controllers, in which the control output is an analog value that is continuously adjusted. This has the obvious advantage of eliminating all of the ups and downs in the process variable that are experienced with ON/OFF control. Most continuous controllers used in industry today use proportional, integral, and derivative action, and are thus called PID (proportional-integral-derivative) controllers. Each of these controller actions is explained in detail next.
Proportional controllers. These controllers get their name from the fact that the control output is proportional to the error signal. A large error generates a large control output, and a small error generates a small control output.
If a positive error increases the control output, the controller is said to be direct acting. In the opposite case, when a positive error decreases control output, the controller is said to be reverse acting.
Whether a controller needs to be direct or reverse acting is determined by the configuration of the process. In the case of a tank level control, for example, it depends on the placement of the control valve. If the valve controls the flow out of the tank, we would want a positive error (level too high) to increase the control output, opening the valve and letting more fluid out of the tank; thus, a direct acting controller would be used. If the valve controls the flow into the tank, however, a reverse acting controller would be used, which would respond to a high level by closing the valve and reducing the flow into the vessel.
An offset value determines what control output will be generated when the error is zero. This is often set to 50% so that the control device will be 50% open with zero error. A proportional gain determines the amount of control action that will be generated by a given error signal: A small gain value will result in little control output change for a given change in the error signal, while a large gain value will result in a large change in the control output for the same change in the error signal.
The primary problem with proportional control is that some non-zero error signal is usually required to generate the control output necessary to stabilize the process at the setpoint, so the process cannot be controlled precisely. The control output required to achieve the setpoint would have to be exactly equal to the offset value (50% in the above example) for the control to be accurate at the setpoint. In any other situation, there would be a non-zero error signal required to generate the appropriate control output, and this would result in a process that was always off of the setpoint, as shown in Fig. 3. This phenomenon is called steady-state error.
Proportional-integral (PI) controllers. Integral action was added to proportional controllers primarily to solve the steady-state error problem.
Integral action eliminates the need for an offset value, and also deals with the problem of steady-state error. Since error is continuously added up over time, the control output of a controller with integral action will continue to change as long as the error is non-zero, and will cease to change only with zero error. If the process being controlled is stable, integral action will guarantee that the steady-state error eventually becomes zero, as shown in Fig. 4.
Proportional-integral-derivative (PID) controllers. Derivative action was added to continuous controllers to help them deal with sluggish processes. Processes with a great deal of mass that must be accelerated, decelerated, heated up, or cooled down tend to require controllers with derivative action.
Derivative action reacts to the rate of change of the error over time. This has the effect of reducing the control output to minimize overshoot, anticipating that the process is soon to reach the setpoint. When controlling the temperature of a large tank, for example, an increase in the setpoint may require the control output to be 100 % for a long period of time to heat up the contents rapidly. Once the effects of the heating begin to be sensed, however, the heat needs to be sharply reduced to avoid the temperature overshooting the setpoint. Derivative action is effective in controlling processes of this type.
Controller tuning
The process of determining gains that will best control a given system is called controller tuning. Gains that are too high will result in wild swings in the control output and unstable process variable behavior, while gains that are too low will result in sluggish control output response and poor control. When the gains are ideally adjusted, the process under control will respond smoothly and rapidly to changes in setpoint and recover quickly from process upsets.
Changing all of the gains in a similar manner is not enough, however. The proper mix of proportional, integral, and derivative action must be achieved, and this is dependent on the characteristics of the process being controlled. High proportional action is best for processes that react predictably to control output changes. Processes that react in an unreliable manner or contain noise in the process variable measurement, will not behave well when controlled with high proportional gain. Tank level control and temperature control are typical examples where high proportional gains usually work well, whereas flow or pressure control processes usually react very quickly and contain process variable noise, and so require lower proportional gains.
Integral action behaves almost the opposite of proportional action. Because it adds up the error over time, integral action is fairly immune to noise in the process variable. The additive action also means that integral control does not react immediately to changes in the process, but reacts more slowly. These facts make integral action ideal for fast-responding, somewhat noisy processes like flow and pressure control, and integral gains should be somewhat higher than proportional gains when controlling these processes.
In temperature control and level control, the effect of the control output is added up over time within the process. Heat added to a process will eventually increase the temperature, as fluid added to a tank will eventually increase the level. Because of this built-in integral action, these processes require little or no integral action in the controller, and integral gains should be kept low.
Some caution must be used in the application of derivative action in practice, however. First, derivative gains should be adjusted carefully. Second, derivative action should be avoided in processes in which the process variable contains noise. Noise in the PV will cause the error to bounce up and down, resulting in rapidly changing positive and negative slope values. These changes are magnified by derivative action, which almost always result in unstable control in the presence of significant PV noise. Derivative action should be carefully applied to processes that are slow reacting and where the process variable measurement is dependable and noise-free. Temperature control processes often meet these criteria.
Several disclaimers must be issued at this point. First, you need to have specific knowledge of the controller being used and the process under control in order to effectively set controller gains to ideal values. Furthermore, each controller manufacturer implements continuous control equations differently, so the gains may not behave like they do in the examples given here. Some have you adjust proportional action by setting a percent proportional band, and integral action may be adjusted in units of repeats per minute or minutes per repeat, each of which has the opposite effect. To further confuse the issue, proportional, integral, and derivative action are often called gain, reset, and rate in older literature. To be safe, consult the information provided by controller manufacturers.
Ryan G. Rosandich is Assistant Professor, Engineering Management, University of Kansas Regents Center.