Part 1 of this FAQ looked at the strengths and weaknesses of basic on/off control as well as the performance improvements that the proportional, integral, and derivative (PID) control algorithm provides.
PID analysis
PID performance and its setup has been the subject of countless articles, Ph.D. dissertations, tutorials, books, and courses which span qualitative, mostly intuitive explanations to other based on advanced and complicated mathematics. The formal basic PID equation has the control output Kc is determined by:
Kc = (K1 × P) + (K2 × I) + (K3 × D)
where K1, K2, and K3 are the independent coefficients of the P, I, and D terms, respectively. In a general qualitative sense, the proportional factor P primarily focuses on the present value of the error, integral term I is related to the past values of the error, and derivative term D corresponds to predicted future values of the error.
It is not necessary to employ all three terms. PI-only controllers are fairly common, since the integral term helps the closed-loop control system reach its target value, while the derivative term is often unneeded and may actually be detrimental as it is sensitive to unavoidable system and sensor noise.
Setting the coefficients Obviously, the general objective of a closed-loop PID system is to minimize error and achieve optimum performance under various operating conditions, Figure 1. But there is no single right answer, since what is “optimum” is determent by the system’s priorities. For some applications, it means minimizing total error; for others, it is limiting overshoot or maximum error; and for others, it is minimizing the time to recover from an upset and get back within the allowed error band.
PID tuning
In the earliest days of PID control, when control systems were largely pneumatic (almost nothing electric), the setting of the coefficients – called PID tuning – was a time-consuming, frustrating, and iterative process. The situation improved as control systems advanced to analog electronics with electrical sensors and actuators, but was still challenging.
Now, almost all system PID controllers are based on software and microcontrollers (with A/D converters for the sensor inputs and D/A converters for the actuator outputs). As a consequence, these controllers also implement a variety of auto-tuning algorithms, where the user defines what the performance priorities are desired, and can even predefine shifts in these priorities as circumstances change.
In autotuning mode, the controller sends some small “test” actuation signals and observes the outcome at the process, then uses the acquired data build a model of the system. It next sets the PID coefficients which optimize performance of the system it has just modeled in the context of the user’s stated preferences; these smart controllers can even dynamically change the PID coefficients if desired.
The resultant performance is orders of magnitude more sophisticated, flexible, accurate, and convenient than the earliest systems. It also supports performance which “ekes out” the final few percent of what theory said could be done, and those few percentage points can make the difference between profit, or reaching versus missing a target.
References
◊◊◊