Pros and cons of autotuning control: Part 2

Proportional-integral-derivative (PID) controllers that can automatically select their own tuning parameters sound good, but face challenges.

By Control Engineering August 2, 2018

Part 1 of this article (Control Engineering, June 2018) presented the basic concepts of autotuning control and some of the simplest autotuning techniques. Perhaps the most common of these automates the step tests an operator might perform manually.

The relay tuning method extends the basic step test by stimulating the process with a sustained series of step changes in the control effort rather than just one. These are applied to the process in such a way as to cause the process variable to oscillate between its high and low limits in a sustained limit cycle. This test can be used to characterize the behavior of the process simply by measuring the process’s ultimate period and ultimate gain as shown in Figures 1 and 2.

Even though the relay tuning method relies on a series of step tests, it does not generate an explicit estimate of the process’s deadtime, time constant, or gain the way a basic step test does. It skips the modeling operation altogether and translates the ultimate gain and ultimate period of the limit cycle directly into tuning parameters using the formulas of the Ziegler-Nichols tuning rules (see Figure 3).

Doing so makes this technique less vulnerable to measurement noise but not entirely immune. Noisy process variable measurements can obscure the true shape of the limit cycle and skew the autotuner’s estimate of its amplitude (labeled "b" in the graphic).

The test itself poses a problem in applications where a limit cycle would disrupt the process to an unacceptable degree. In such cases, loop tuning is best accomplished by analyzing the process behavior observable during naturally-occurring disturbances and setpoint changes.

On the other hand, the relay tuning method has the advantage of allowing the operator to limit the amplitude of the process’s oscillations by limiting the amplitude of the pulses the controller applies to the process (labeled "a" in the graphic). Those pulses need only be large enough to make the limit cycle distinguishable from the measurement noise. This allows an autotuner to learn all it needs to know about the process’s behavior with minimal disruptions. 

Mathematical modeling

Perhaps the most rigorous approach to autotuning control, and certainly the most complex, is numerical curve fitting—computing the parameters of a process model that best fits the available input/output data. The appropriate tuning parameters for the controller can be derived from the process model. Such techniques extend basic step test analysis to cover process models more elaborate than deadtime, time constant, and gain.

Autotuning PID controllers that use numerical curve-fitting techniques are examples of the more general model predictive control strategies that are still the subject of considerable academic research (see "Model-predictive control looks to the future," Control Engineering, August 2003).

Some autotuners in this category also can generate a confidence factor that indicates how well the model’s predictions compare to the actual behavior of the controlled process. A close match between the model’s predictions and the process variable’s actual trajectory indicates a high degree of confidence in the accuracy of the model and in the tuning parameters based on the model.

For systems with appreciable deadtime or transport lag, some autotuning controllers also can be configured to implement an Inferential Smith Predictor. A traditional Smith Predictor uses a process model to mathematically remove the deadtime from the closed loop so the PID controller can be tuned as if there were no deadtime at all. An Inferential Smith Predictor continually updates the process model to improve the accuracy of the deadtime compensation. 

Challenges

Unfortunately, the added computational complexity of a strictly mathematical tuning technique doesn’t solve all PID tuning problems. Perhaps the most significant challenge is an unpredictable or nonlinear process.

Virtually all PID tuning techniques, either manual or automatic, assume future values of the process variable can be predicted from a weighted sum of the last few process variable measurements and the last few control efforts (see "Process Controllers Predict the Future," Control Engineering, March 2008). A basic step-test autotuner makes do with the single most recent historical values of those two variables, though there’s no limit on the number of historical data points that can be incorporated into a process model to improve its predictive abilities.

More is not always better. Unknown disturbances can make predicting future values of the process variable difficult enough, but even when the disturbances are negligible, a simple weighted sum of the past control efforts and past process variables does not always yield an accurate estimate of where the process variable is headed.

The problem is not all processes can be adequately characterized by that kind of weighted-sum or linear process model. For example, the behavior of a process measured in terms of pH can only be approximated with a linear model and usually only if the pH remains within a narrow range of values.

If an autotuner depends implicitly or explicitly on a linear process model, its results will be skewed to the degree that the process actually behaves in a nonlinear way. There are mathematical work-arounds to deal with nonlinear processes, but it’s not always obvious which one is required for a particular application, and they tend to be difficult to implement in any event. 

Advantages

On the other hand, curve-fitting autotuners have the advantage of being able to track the behavior of a process that varies over time. For example, consider the problem of controlling the water level in a spherical tank. A gallon of water added to or subtracted from the tank has a much greater effect on the water level when the tank is almost empty versus half full. That is, the process gain varies over time as the process variable goes up and down (see "How gain scheduling works," Control Engineering, December 2010).

A curve-fitting autotuner that continuously updates its process model according to the latest input/output data should be able to identify the process gain no matter how full the tank is at any given time. A more basic autotuner that performs its tuning operations only when the controller is commissioned would find its tuning to be too conservative or too aggressive when the water level is lower or higher than it was at commissioning time.

Autotuners in this category are more commonly referred to as "adaptive" controllers (see "Adaptive Controllers Work Smarter, not Harder," Control Engineering October 2002).

Unfortunately, adaptive controllers aren’t foolproof, either. If the process’s behavior varies too rapidly, such as when a spherical water tank is filling rapidly, the online modeling won’t be able to keep up. And if the process variable isn’t changing at all because the controller has successfully matched it to the setpoint, the online modeling will fail for lack of any useful data from which to glean a process model. An infinite number of mathematical models would fit the input/output data when it is lined out.

For all these reasons, the single best way to implement autotuning or adaptive control remains elusive even as PID control has come to dominate the field of industrial process automation.

Control Engineering, www.controleng.com; edited by Jack Smith, CFE Media content manager, jsmith@cfemedia.com.

MORE ANSWERS: Autotuning, PID

The relay tuning method extends the basic step test by stimulating the process with a sustained series of step changes in the control effort rather than just one.

Perhaps the most rigorous approach to autotuning control, and certainly the most complex, is numerical curve fitting-computing the parameters of a process model that best fits the available input/output data.

The single best way to implement autotuning or adaptive control remains elusive even as PID control has come to dominate the field of industrial process automation.

CONSIDER THIS

Does autotuning tune your controllers adequately?


Related Resources