Auto-Tuning Control Using Ziegler-Nichols
Auto-Tuning Control Using Ziegler-Nichols
Nichols
The classic technique for tuning a PID loop has become even
more popular with the advent of controllers capable of tuning
themselves.
Vance VanDoren, Ph.D., P.E., Control Engineering, 10/1/2006
John “Zeke” Ziegler and Nathaniel Nichols may not have invented the proportional-
integral-derivative (PID) controller, but their famous loop tuning techniques helped
make the PID algorithm the most popular of all feedback control strategies used in
industrial applications. The Ziegler-Nichols tuning techniques, first published in 1942,
are still widely used today.
Then, as now, the point of “tuning” a PID loop is to adjust how aggressively the
controller reacts to errors between the measured process variable and desired setpoint. If
the controlled process happens to be relatively sluggish, the PID algorithm can be
configured to take immediate and dramatic actions whenever a random disturbance
changes the process variable or an operator changes the setpoint.
Conversely, if the process is particularly sensitive to the actuators that the controller is
using to manipulate the process variable, then the PID algorithm must apply more
conservative corrective efforts over a longer period. The essence of loop tuning is
identifying just how dramatically the process reacts to the controller’s efforts and how
aggressive the PID algorithm can afford to be as it tries to eliminate errors.
Ziegler and Nichols proposed a two-step method for tuning a loop. They devised a test
for quantifying behavior of a process in terms of how fast and how much the process
variable changes when the control effort changes. They also developed a set of
empirical formulas for translating results of those tests into appropriate performance
settings or tuning parameters for the controller. Ziegler and Nichols actually proposed
two such techniques, both of which are described in “Loop Tuning Fundamentals,”
Control Engineering, July 2003.
Auto-Tuning
For many years, Ziegler-Nichols tuning techniques were strictly manual operations
executed whenever a new control loop was commissioned. An engineer would run a
Ziegler-Nichols test, record the control effort and resulting process variable on a strip
chart, divine the behavior of the process from trend line shapes, tune the loop to match
the process, then start production with the new loop in automatic mode.
It was tedious and repetitive work to commission every loop this way, and results
weren’t always satisfactory. Several iterations were often necessary to generate tuning
parameters that produced acceptable closed-loop performance.
To identify the ultimate period Tu and
ultimate gain Pu of the process, the
controller temporarily disables its PID
algorithm and replaces it with an ON/OFF
relay that forces the process variable to
oscillate. Those two numbers quantify the
behavior of the process well enough to
determine how the PID controller should
be tuned to obtain the desired closed-loop
performance.
In the 1970’s, as PID controllers evolved from electronic and pneumatic devices into
fully digital microprocessors, programmers automated the Ziegler-Nichols loop tuning
techniques. Theoretically, even an operator unfamiliar with tuning theory fundamentals
could press a button and let the controller conduct its own process behavior test and
select tuning parameters accordingly. If the resulting closed-loop behavior proved
unacceptable, the operator could simply push the button again.
Today, such auto-tuning or pre-tuning functions are de rigueur on commercial PID loop
controllers. A recent survey of Control Engineering subscribers who buy or specify loop
controllers indicted that a user-initiated auto-tuning function is the most important
feature of a PID controller behind the PID algorithm itself and the ability to
communicate with external devices (CE, July 2005, “Loop Controllers: Lone Logic is
More Connected”). Auto-tuning is also described as self-tuning by some vendors,
though self-tuning typically describes adaptive techniques that work not only at start-up,
but during normal process operations as well. Continuous self-tuning was ranked as the
fifth most important feature in the Control Engineering survey.
The amount by which the process variable subsequently changes and the time required
for it to reach 63.2% of its final value indicate the steady-state gain and time constant of
the process, respectively. If the sensor in the loop happens to be located some distance
from the actuator, the process’s response to such a step input may also demonstrate a
deadtime between the instant that the step was applied and the instant that the process
variable first began to react.
These three model parameters tell the Easy-Tune algorithm everything it needs to know
about the behavior of a typical process, allowing it to predict how the process will react
to any corrective effort, not just step inputs. That in turn allows the Easy-Tune
algorithm to compute tuning parameters to make the controller compatible with the
process.
The Åström-Hägglund method works by forcing the process variable into a series of
sustained oscillations known as a limit cycle. The controller first applies a step input to
the process and holds it at a user-defined value until the process variable passes the
setpoint. It then applies a negative step and waits for the process variable to drop back
below the setpoint. Repeating this procedure each time the process variable passes the
setpoint in either direction forces the process variable to oscillate out of sync with the
control effort, but at the same frequency. See the “Relay Test” graphic.
The time required to complete a single oscillation is known as the process’s ultimate
period (Tu), and the relative amplitude of the two oscillations multiplied by 4/π gives the
ultimate gain (Pu). Ziegler and Nichols theorized that these two parameters could be
used instead of the steady-state gain, time constant, and deadtime to compute suitable
tuning parameters according to their famous tuning equations or tuning rules shown in
the equation on the left.
They discovered empirically that these rules generally yield a controller that responds
quickly to intentional changes in the setpoint as well as to random disturbances to the
process variable. However, a controller thus tuned will also tend to cause overshoot and
oscillations in the process variable, so most auto-tuning controllers offer several sets of
alternative tuning rules that make the controller less aggressive to varying degrees. An
operator typically only has to select the required speed of response (slow, medium, fast),
and the controller chooses appropriate rules automatically.
To obtain more accurate results, all of these controllers stimulate the process with a
limit cycle comprised of several oscillations. Some auto-tuning PID controllers,
including Siemens’ Sipart DR19 and Ascon’s DeltaDue, can make do with just one
oscillation. See the “Single Oscillation Method” sidebar.
No Panacea
Unfortunately, even the highly successful Åström-Hägglund version of the Ziegler-
Nichols closed loop tuning technique can’t solve all PID tuning problems. Additional
enhancements are required when the sensor’s measurements are corrupted by noise, a
disturbance interrupts the test, or process behavior varies according to the direction in
which the process variable is moving.
The accuracy of an auto-tuner’s results can also be limited if process behavior is not
entirely predictable. Critics of the technology claim that only the first digit of each
computed parameter is likely to be reliable, necessitating some manual fine tuning when
the closed-loop performance is tightly specified.
The test itself poses a problem in applications where a limit cycle would disrupt the
process to an unacceptable degree. Although the Åström-Hägglund method does allow
the operator to limit amplitude of the control effort’s oscillations, there are some
situations where artificial disturbances of any kind would be undesirable. In such cases,
loop tuning is best accomplished by analyzing behavior of the process that is
demonstrated by naturally-occurring disturbances and setpoint changes.