The basics of control system design: Part 3 - Tuning a PI Controller
PI controllers have two zones: high and low. The high zone is served by Kp and the low by K. As Figure 6-6 below shows, the process for setting the proportional gain is the same as it was in the P controller, described earlier in Part 2.
Figure 6-6. Tuning a PI controller
After the higher zone is complete, KI can be tuned. Here it is raised for 15% overshoot to a square wave. Again, a square wave is an unreasonably harsh command to follow perfectly; a modest amount of overshoot to a square wave is tolerable in most applications.
As Figure 6.6 in Part 2 and Figures 6-7 and 6-8 below show, the PI controller is similar to the P controller, but with slightly poorer stability measures. The integral gain is high enough to cause a 15% overshoot to a step. The bandwidth has gone up a bit (from 186 Hz to 206 Hz), but the peaking is about 1.3 dB. The PM has fallen 9°, and the Gain Margin (GM) is nearly unchanged, just down 0.4 dB to 11.7 dB.
|Figure 6-7. Closed-loop Bode plot for a PI controller (206-Hz bandwidth, 1.3dB of peaking).|
|Figure 6-8. Open-loop plot of PI controller (56°, PM 11.7dB GM).|
Analog PI Control
A simple analog circuit can be used to implement PI control. As shown in the schematic of Figure 6-9 below, a series resistor and capacitor are connected across the feedback path of an op-amp to form the proportional (RL) and integral (CL) gains.
Clamping diodes clamp the op-amp and prevent the capacitor from charging much beyond the saturation level. A small leakage path due to the diodes is shown as a resistor. The input-scaling resistors are assumed here to be equal (RC = RF).
|Figure 6-9. Schematic for analog PI controller.|
The control block diagram for Figure 6-9 is shown in Figure 6-10 below. Note that the gains in this figure are constructed to parallel those of the general PI controller in Figure 6-5 in Part 2. Tuning the analog controller is similar to tuning the general controller.
Short (remove) the capacitor to convert the system to a P controller, and determine the appropriate setting of RL, as was done for KP. Then adjust CL for 15% overshoot. The analog controller will behave much like the digital controller.
|Figure 6-10. Block diagram of analog PI controller.|
One compromise that must be made for analog PI control is that op-amps cannot form true integrators. The diodes and capacitor will have some leakage, and, unlike a true integrator, the op-amp has limited gains at low frequency.
Often, the PI controller is modeled as a lag network, with a large resistor across the op-amp feedback path, as shown in Figure 6-9. This "leaky" integrator is sometimes called a lag circuit.
In some cases a discrete resistor is used to cause leakage intentionally. This is useful to keep the integral from charging when the control system is disabled. Although the presence of the resistor does have some effect on the control system, it is usually small enough and at low enough frequency not to be of much concern.
As the name indicates, PI+ control is an enhancement to PI. Because of the overshoot, the integral gain in PI controllers is limited in magnitude. PI+ control uses a low-pass filter on the command signal to remove overshoot.
In this way, the integral gain can be raised to higher values. PI+ is useful in applications where the rejection of DC disturbances is paramount, for example, in a motion controller driving a high-friction mechanism such as a worm gear. The primary shortcoming of PI+ is that the command filter also reduces the controller's command response.
|Figure 6-11. Block diagram for PI + control|
The PI+ controller is shown in Figure 6-11 above. The system is the PI controller of Figure 6-5 in Part 2 with a command filter added. The degree to which a PI+ controller filters the command signal is determined by the gain KFR.
As can be seen in Figure 6-11 above, when KFR is 1, all filtering is removed and the controller is identical to a PI controller. Filtering is most severe when KFR is zero. As can also be seen in Figure 6-11, when KFR is zero, command is filtered by K1/(s + KI), which is a single-pole low-pass filter at the frequency KI (in rad/sec).
This case will allow the highest integral gain but also will most severely limit the controller command response. Typically, KFR = 0 will allow an increase of almost three times in the integral gain but will reduce the bandwidth by about one-half when compared with KFR = 1 (PI control).
Finding the optimal value of KFR depends on the application, but a
value of 0.65 has been found to work in many applications. This value
typically allows the integral gain to more than double while reducing
the bandwidth by only 15%-20%.
One question about PI+ that naturally arises is why to select KI as the frequency of the command low-pass filter? Why not set that frequency either higher or lower? The reason is that this frequency is excellent at canceling the peaking caused by the integral gain.
One way to look at PI+ control is that it uses the command filter to attenuate the peaking caused by PI. The peaking caused by KI can be canceled by the attenuation of a low-pass filter with a break of KI.
|Figure 6-12. Alternative implementation for PI + control, a PDFF controller.|
Comparing Pl+ and PDFF
Pl+ is often referred to as PDFF (pseudo-derivative feedback with feed-forward) by the author and others such as D.Y. Ohm. This method is shown in Figure 6-12 above. Although the equivalence between Figures 6-11 and 6-12 above is not obvious, upon inspection construction of the control law for Figure 6-11 is:
And of the control law for Figure 6-12 is:
With some algebra, Equation 6.1 reduces to Equation 6.2.
PDFF is an extension of a control method developed by R.M. Phelan in Automatic Control Systems (Cornell University Press), called PDF, which is equivalent to PDFF with KFR set to 0. PDFF is an alternative way to implement PI+; it is useful in digital systems because there are no multiplications before the integral.
Multiplication, when not carefully constructed, causes numerical
noise. That noise prior to the integrator may cause drift in the
control loop as the round-off error accumulates in the integrator. PDFF
has a single operation, a subtraction, which is usually noiseless,
before the integration and thus easily avoids such noise.
(Editor's Note: Experiments 6A-6F
All the examples in this series of articles were run on Visual Mode1Q. Each of the six experiments, 6A-6F, models one of the six methods, P, PI, PI+, PID, PID+, and PD, respectively.
These are models of digital systems, with sample frequency defaulting to 2 kHz. If you prefer experimenting with an analog controller, set the sample time to 0.0001 second, which is so much faster than the power converter that the power converter dominates the system, causing it to behave like an analog controller.
The default gains reproduce the results shown in this series, but you can go further. Change the power converter bandwidth and investigate the effect on the different controllers.
Assume noise is a problem, reduce
the low-pass filter on the D gain (fD), and observe how this reduces
the benefit available from the derivative-based controllers (PID, PID+,
and PD). Adjust the power converter bandwidth and the sample time, and
observe the results. )
George Ellis is senior scientist at Danaher Motion. He has designed and applied motion control systems for over 20 years and has written for Machine Control Magazine, Control Engineering, Motion Systems Design, Power Control and Intelligent Motion, EDN Magazine. In addition to Control System Design Guide, he is also the author of Observers in Control Systems (Academic Press).