PID CONTROLLER
The proportional–integral–derivative (PID) controller is often referred to as a ‘three-term’ controller. It is currently one of the most frequently used controllers in the process industry. In a PID controller the control variable is generated from a term proportional to the error, a term which is the integral of the error, and a term which is the derivative of the error.
• Proportional: the error is multiplied by a gain K p . A very high gain may cause instability, and a very low gain may cause the system to drift away.
• Integral: the integral of the error is taken and multiplied by a gain Ki . The gain can be adjusted to drive the error to zero in the required time. A too high gain may cause oscillations and a too low gain may result in a sluggish response.
• Derivative: The derivative of the error is multiplied by a gain Kd . Again, if the gain is too high the system may oscillate and if the gain is too low the response may be sluggish.
Figure 9.23 shows the block diagram of the classical continuous-time PID controller. Tuning the controller involves adjusting the parameters K p , Kd and Ki in order to obtain a satisfactory
This form of the PID controller is known as the velocity PID controller. Here the current control action uses the previous control value as a reference. Because only a change in the control action is used, this form of the PID controller provides a smoother bumpless control when the error is small. If a large error exists, the response of the velocity PID controller may be slow, especially if the integral action time Ti is large.
The two forms of the PID algorithm, (9.18) and (9.20), may look quite different, but they are in fact similar to each other. Consider the positional controller (9.18). Shifting back one sampling interval, we obtain
Saturation and Integral Wind-Up
In practical applications the output value of a control action is limited by physical constraints. For example, the maximum voltage output from a device is limited. Similarly, the maximum flow rate that a pump can supply is limited by the physical capacity of the pump. As a result of this physical limitation, the error signal does not return to zero and the integral term keeps adding up continuously. This effect is called integral wind-up (or integral saturation), and as a result of it long periods of overshoot can occur in the plant response. A simple example of what happens is the following. Suppose we wish to control the position of a motor and a large set- point change occurs, resulting in a large error signal. The controller will then try to reduce the error between the set-point and the output. The integral term will grow by summing the error signals at each sample and a large control action will be applied to the motor. But because of the physical limitation of the motor electronics the motor will not be able to respond linearly to the applied control signal. If the set-point now changes in the other direction, then the integral term is still large and will not respond immediately to the set-point request. Consequently, the system will have a poor response when it comes out of this condition.
The integral wind-up problem affects positional PID controllers. With velocity PID con- trollers, the error signals are not summed up and as a result integral wind-up will not occur, even though the control signal is physically constrained.
Many techniques have been developed to eliminate integral wind-up from the PID con- trollers, and some of the popular ones are as follows:
• Stop the integral summation when saturation occurs. This is also called conditional integra- tion. The idea is to set the integrator input to zero if the controller output is saturated and the input and output are of the same sign.
• Fix the limits of the integral term between a minimum and a maximum.
• Reduce the integrator input by some constant if the controller output is saturated. Usually the integral value is decreased by an amount proportional to the difference between the unsaturated and saturated (i.e maximum) controller output.
• Use the velocity form of the PID controller.
Derivative Kick
Another possible problem when using PID controllers is caused by the derivative action of the controller. This may happen when the set-point changes sharply, causing the error signal to change suddenly. Under such a condition, the derivative term can give the output a kick, known as a derivative kick. This is usually avoided in practice by moving the derivative term to the feedback loop. The proportional term may also cause a sudden kick in the output and it is common to move the proportional term to the feedback loop.
PID Tuning
When a PID controller is used in a system it is important to tune the controller to give the required response. Tuning a PID controller involves selecting values for the controller param- eters K p , Ti and Td . There are many techniques for tuning a controller, ranging from the first techniques described by J.G. Ziegler and N.B. Nichols (known as the Ziegler–Nichols tuning algorithm) in 1942 and 1943, to recent auto-tuning controllers. In this section we shall look at the tuning of PID controllers using the Ziegler–Nichols tuning algorithm.
Ziegler and Nichols suggested values for the PID parameters of a plant based on open-loop or closed-loop tests of the plant. According to Ziegler and Nichols, the open-loop transfer function of a system can be approximated with a time delay and a single-order system, i.e.
where TD is the system time delay (i.e. transportation delay), and T1 is the time constant of the system.
Open-Loop Tuning
For open-loop tuning, we first find the plant parameters by applying a step input to the open- loop system. The plant parameters K , TD and T1 are then found from the result of the step test as shown in Figure 9.24.
Ziegler and Nichols then suggest using the PID controller settings given in Table 9.1 when the loop is closed. These parameters are based on the concept of minimizing the integral of the absolute error after applying a step change to the set-point.
Example 9.7
The open-loop unit step response of a thermal system is shown in Figure 9.25. Obtain the transfer function of this system and use the Ziegler–Nichols tuning algorithm to design (a) a proportional controller, (b) to design a proportional plus integral (PI) controller, and (c) to design a PID controller. Draw the block diagram of the system in each case.
Solution
From Figure 9.25, the system parameters are obtained as K = 40◦C, TD = 5s and T1 = 20 s, and the transfer function of the plant is
Closed-Loop Tuning
The Ziegler–Nichols closed-loop tuning algorithm is based on plant closed-loop tests. The procedure is as follows:
• Disable any derivative and integral action in the controller and leave only the proportional action.
• Carry out a set-point step test and observe the system response.
• Repeat the set-point test with increased (or decreased) controller gain until a stable oscillation is achieved (see Figure 9.29). This gain is called the ultimate gain, Ku .
• Read the period of the steady oscillation and let this be Pu .
• Calculate the controller parameters according to the following formulae: K p = 0.45Ku , Ti = Pu /1.2 in the case of the PI controller; and K p = 0.6Ku , Ti = Pu /2, Td = Tu /8 in the case of the PID controller.