PID Design Example

This chapter continues to develop the example of proportional, integral, and derivative control. The analysis illustrates the classic responses to a step change in input and a temporary impulse perturbation to input. The techniques for analyzing and visualizing dynamics and sensitivities are emphasized, particularly the Bode gain and phase plots.

I illustrate the principles of feedback control with an example. We start with an intrinsic process .
This process cascades two exponential decay systems, each with dynamics as in Eq. 2.8 and associated transfer function as in Eq. 2.9. For example, if the input into this system is a unit impulse at time zero, then the system output is expressing the cascade of two exponentially decaying processes.
(4.2) We assume during system analysis and design that Eq. 4.1 describes the process, but in fact Eq. 4.2 is actually the true process. Put another way, the difference between the two processes may reflect uncertain information about the true process or unknown disturbances that alter the process. Thus, we may consider how a system performs

(a) (b) (c)
Process PID feedback PID w/filter Fig. 4.1 Response of the system output, η = y, to a sudden unit step increase in the reference input, r , in the absence of disturbance and noise inputs, d and n. The x-axis shows the time, and the y-axis shows the system output. a Response of the original process, P(s), in Eq.4.1 (blue curve) and of the process with altered parameters,P(s) in Eq. 4.2 (gold curve). b System with the PID controller embedded in a negative feedback loop, with no feedforward filter, F(s) = 1, as in Fig. 3 when it was designed, or evolved, in response to a process, P, and the underlying system becomesP.
In this example, the problem concerns the design of a negative feedback loop, as in Fig. 3.2a, that uses a controller with proportional, integral, and derivative (PID) action. Many methods derive PID controllers by tuning the various sensitivity and performance tradeoffs (Åström and Hägglund 2006;Garpinger et al. 2014  .1 illustrates various system responses to a unit step increase from zero to one in the reference input signal, r . Panel (a) shows the response of the base process, P, by itself. The blue curve is the double exponential decay process of Eq. 4.1. That process responds slowly because of the first exponential process with time decay a = 0.1, which averages inputs over a time horizon with decay time 1/a = 10, as in Eq. 2.8.

Output Response to Step Input
The gold curve, based on Eq. 4.2, rises even more slowly, because that alternative process,P, has an even longer time horizon for averaging inputs of 1/a = 100. Panel (b) shows the response of the full feedback loop of Fig. 3.2a with the PID controller in Eq. 4.3 and no feedforward filter, F = 1. Note that the system responds much more rapidly, with a much shorter time span over the x-axis than in (a). The rapid response follows from the very high gain of the PID controller, which strongly amplifies low-frequency inputs.
The PID controller was designed to match the base process P in Eq. 4.1, with response in blue. When the actual base process deviates as inP of Eq. 4.2, the response is still reasonably good, although the system has a greater overshoot upon first response and takes longer to settle down and match the reference input. The reasonably good response in the gold curve shows the robustness of the PID feedback loop to variations in the underlying process.
Panel (c) shows the response of the system with a feedforward filter, F, from Eq. 4.4. Note that the system in blue with the base process, P, improves significantly, with lower overshoot and less oscillation when settling to match the reference input. By contrast, the system in gold with the alternative base process,P, changes its response very little with the additional feedforward filter. This difference reflects the fact that feedforward works well only when one has very good knowledge of the underlying process, whereas feedback works broadly and robustly with respect to many kinds of perturbations.

Error Response to Noise and Disturbance
Figure 4.2 illustrates the system error in response to sensor noise, n, and process disturbance, d. Panel (a) shows the error in response to a unit step change in n, the input noise to the sensor. That step input to the sensor creates a biased measurement, y, of the system output, η. The biased measured value of y is fed back into the control loop. A biased sensor produces an error response that is equivalent to the output response for a reference signal. Thus,Fig. 4.2a matches Fig. 4.1b. Panel (b) shows the error response to an impulse input at the sensor. An impulse causes a brief jolt to the system. The system briefly responds by a large deviation from its setpoint, but then returns quickly to stable zero error, at which the output matches the reference input. An impulse to the reference signal produces an equivalent deviation in the system output but with opposite sign.
The error response to process disturbance in panels (c) and (d) demonstrates that the system strongly rejects disturbances or uncertainties to the intrinsic system process. Error response, r − η, of the PID feedback loop to sensor noise, n, or process disturbance, d, from Eq. 3.9. Blue curve for the process, P, in Eq. 4.1 and gold curve for the altered process,P, in Eq. 4.2. a Error response to sensor noise input, n, for a unit step input and b for an impulse input. c Error response to process disturbance input, d, for a unit step input and d for an impulse input. An impulse is u(t)dt = 1 at t = 0 and u(t) = 0 at all other times. The system responses in gold curves reflect the slower dynamics of the altered process. If the altered process had faster intrinsic dynamics, then the altered process would likely be more sensitive to noise and disturbance

Fig. 4.3
System response output, η = y, to sine wave reference signal inputs, r . Each column shows a different frequency, ω. The rows are (Pr) for reference inputs into the original process, P orP, without a modifying controller or feedback loop, and (Rf) for reference inputs into the closed-loop feedback system with the PID controller in Eq. 4.3. The green curve shows the sine wave input. The blue curve shows systems with the base process, P, from Eq.4.1. The gold curve shows systems with the altered process,P, from Eq. 4.2. In the lower left panel, all curves overlap. In the lower panel at ω = 1, the green and blue curves overlap. In the two upper right panels, the blue and gold curves overlap near zero Figure 4.3 illustrates the system output in response to fluctuating input (green). The top row shows the output of the system process, either P (blue) orP (gold), alone in an open loop. The system process is a cascade of two low-pass filters, which pass low-frequency inputs and do not respond to high-frequency inputs.

Output Response to Fluctuating Input
The upper left panel shows the response to the (green) low-frequency input, ω = 0.1, in which the base system P (blue) passes through the input with a slight reduction in amplitude and lag in phase. The altered systemP (gold) responds only weakly to the low frequency of ω = 0.1, because the altered system has slower response characteristics than the base system. At a reduced input frequency of ω = 0.01 (not shown), the gold curve would match the blue curve at ω = 0.1. As frequency increases along the top row, the processes P andP block the higher-frequency inputs.
The lower row shows the response of the full PID feedback loop system. At a low frequency of ω ≤ 0.1, the output tracks the input nearly perfectly. That close tracking arises because of the very high gain amplification of the PID controller at low frequency, which reduces the system tracking error to zero, as in Eq. 3.5.
At a higher frequency of ω = 10, the system with the base process P responds with a resonant increase in amplitude and a lag in phase. The slower altered process,P, responds only weakly to input at this frequency. As frequency continues to increase, both systems respond weakly or not at all.
The system response to sensor noise would be of equal magnitude but altered sign and phase, as shown in Eq. 3.7.
Low-frequency tracking and high-frequency rejection typically provide the greatest performance benefit. The environmental references that it pays to track often change relatively slowly, whereas the noisy inputs in both the reference signal and in the sensors often fluctuate relatively rapidly. Figure 4.4 provides more general insight into the ways in which PID control, feedback, and input filtering alter system response.

Insights from Bode Gain and Phase Plots
Panels (a) and (b) show the Bode gain and phase responses for the intrinsic system process, P (blue), and the altered process,P (gold). Low-frequency inputs pass through. High-frequency inputs cause little response. The phase plot shows that these processes respond slowly, lagging the input. The lag increases with frequency. Panels (c) and (d) show the responses for the open loop with the PID controller, C, combined with the process, P orP, as in Fig.2.1b. Note the very high gain in panel (c) at lower frequencies and the low gain at high frequencies.  PID controllers are typically designed to be used in closed-loop feedback systems, as in Fig. 2.1c. Panels (e) and (f) illustrate the closed-loop response. The high openloop gain of the PID controller at low frequency causes the feedback system to track the reference input closely. That close tracking matches the log(1) = 0 gain at low frequency in panel (e). Note also the low-frequency phase matching, or zero phase lag, shown in panel (f), further demonstrating the close tracking of reference inputs. At high frequency, the low gain of the open-loop PID controller shown in panel (c) results in the closed-loop rejection of high-frequency inputs, shown as the low gain at high frequency in panel (e).
Note the resonant peak of the closed-loop system in panel (e) near ω = 10 for the blue curve and at a lower frequency for the altered process in the gold curve. Note also that the altered process,P, in gold, retains the excellent low-frequency tracking and high-frequency input rejection, even though the controller was designed for the base process, P, shown in blue. The PID feedback loop is robust to differences in the underlying process that varies from the assumed form of P. Panels (g) and (h) show the PID closed-loop system with a feedforward filter, F, as in Fig. 3.2a. The feedforward filter smooths out the resonant peak for the blue curve, so that system does not amplify inputs at resonant frequencies. Amplified resonant inputs may lead to instabilities or poor system performance. Note that the feedforward filter does not have much effect on the altered process in gold. Feedforward modifiers of a process typically work well only for a specific process. They often do not work robustly over a variant range of processes. Figure 4.5 illustrates the sensitivities of the system error output, r − η, to inputs from the reference, r , sensor noise, n, and load disturbance, d, signals, calculated from Eq. 3.9. Figure 3.2a shows the inputs and loop structure.

Sensitivities in Bode Gain Plots
The blue curve of panel (a) shows the error sensitivity to the reference input. That sensitivity is approximately the mirror image of the system output response to the reference input, as shown in Fig. 4.4e (note the different scale). The duality of the error response and the system response arises from the fact that the error is r − η, and the system response is η.
Perfect tracking means that the output matches the input, r = η. Thus, a small error corresponds to a low gain of the error in response to input, as occurs at low frequency for the blue curve of Fig. 4.5a. In the same way, a small error corresponds to a gain of one for the relation between the reference input, r , and the system output, η, as occurs at low frequency for the blue curve of Fig. 4.4e.
The noise sensitivity in the green curve of Fig. 4.5a shows that the system error is sensitive to low-frequency bias in the sensor measurements, y, of the system output, η. When the sensor produces a low-frequency bias, that bias feeds back into the system and creates a bias in the error estimate, thus causing an error mismatch between the reference input and the system output. In other words, the system is sensitive to errors when the sensor suffers low-frequency perturbations. The PID system rejects high-frequency sensor noise, leading to the reduced gain at high frequency illustrated by the green curve.
The disturbance load sensitivity in the red curve of Fig. 4.5a shows the low sensitivity of this PID feedback system to process variations. This PID feedback system is very robust to an altered underlying process, as shown in earlier figures. Here, Fig. 4.5b illustrates that robustness by showing the relatively minor changes in system sensitivities when the underlying process changes Bode gain plots for the error output, r − η, in response to reference input, r (blue), sensor noise, n (green), and load disturbance, d (red), from Eq. 3.9. The systems are the full PID-controlled feedback loops as in Fig. 3.2a, with no feedforward filter. The PID controller is given in Eq. 4.3. a System with the base process, P, from Eq. 4.1. b System with the altered process,P, from Eq.4.2 from P toP. However, other types of change to the underlying process may cause greater changes in system performance. Robustness depends on both the amount of change and the kinds of change to a system.
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made. The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.