Auto-Tuning Control Using Ziegler-Nichols

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.

By Vance VanDoren, Ph.D., P.E., Control Engineering October 1, 2006


Auto-tuning defined




Sidebars: Single oscillation method

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.


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.

Automatic step tests

One of the earliest auto-tuning controllers still on the market is the 53MC5000 Process Control Station from MicroMod Automation. It uses the Easy-Tune algorithm originally developed at Fischer & Porter (now part of ABB) in the early 1980s. It automatically executes a step test similar to the open-loop Ziegler-Nichols method that forces the controller to make an abrupt change in its control effort while sensor feedback is disabled.

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.

Some auto-tuning PID controlers can make do with just one isolation.

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.

Closed loop tests

In 1984, Karl Åström and Tore Hägglund of the Lund (Sweden) Institute of Technology published an improved version of Ziegler and Nichols’ closed-loop tuning method. Like the open-loop method, this technique excites the process to identify its behavior, but without disabling sensor feedback.

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 (T u ), and the relative amplitude of the two oscillations multiplied by 4/π gives the ultimate gain (P u ). 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.

Tuning rules.The PID algorithm (top) determines the control effort CO(t) from the process variable PV(t) and the error e(t) between the process variable and the setpoint. The controller can be made more or less aggressive by modifying the three tuning parameters– the controller gain P, the integral time TI and the derivative time TD. The Ziegler-Nichols tuning rules (bottom) can be used to compute modestly aggressive values for the tuning parameters according to the values of the process’s ultimate period Tu and ultimate gain Pu.

Commercial auto tuners

Variations on the relay method have become a de facto standard for commercial auto-tuning controllers, though vendors rarely mention which technology they use. All of Emerson Process Management’s auto-tuning controllers from the DPR900 single loop controller introduced by Fisher Controls in 1987 through the Intelligent Tuner of Fisher’s legacy distributed control system Provox and the present-day DeltaV Tuner use the Åström-Hägglund technique.

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.

Auto-tuners that use single or multi-oscillation versions of the Åström-Hägglund relay test are also available from Invensys Eurotherm and Red Lion Controls. All Watlow controllers equipped with Tru-Tune perform the relay test with two complete oscillations. Commercial auto-tuners can be found in single-loop and multi-loop controllers, distributed control systems, programmable logic controllers, and PC-based controllers.

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.

Read the complete 3 Part PID Guide

Control Engineering Reference Guide to PID Tuning (Part 1) PID (proportional-integral-derivative) control has been the state of the controller art since the 1950s and is still the predominant method in use today. Control Engineering is republishing, online, its original collection of articles on PID tuning techniques in three installments. Part 1 contains the original article, ‘Optimum Settings for Automatic Controllers,’ by J.G. Ziegler and N.B. Nichols.

Control Engineering Reference Guide to PID Tuning (Part 2) The second in our 3-part installment reprinting Control Engineering’s “Reference Guide to PID Tuning.” This second installment contains comparisons of controller tuning techniques and PID control algorithms; how to do PID tuning without the math; and helps answer the question: How good is that PID tuning, really?

Control Engineering Reference Guide to PID Tuning (Part 3) The 3rd installment reprinting Control Engineering’s “Reference Guide to PID Tuning.” This final installment contains information about the tuning of PID controls for different structures; background on how pneumatic instruments gave birth to automatic control; and how to perform PID controller tuning using standard form optimization.

Single oscillation method

For some applications where the process behaves in a very consistent manner, only a single oscillation is required to identify the ultimate period T u and the ultimate gain P u . Ascon’s DeltaDue temperature controller can perform a single-oscillation test whenever the operator requests a setpoint change greater than 5%. It interrupts the controller’s initial reaction to the setpoint change to conduct a loop tuning test by the relay method. After one complete oscillation of the process variable, it computes a new set of tuning parameters then reactivates the PID algorithm. By the time the process variable reaches the setpoint, the controller will have been tuned to produce a quick response with minimal overshoot. If the setpoint change is less than 5%, the DeltaDue controller will perform a multi-oscillation version of the Åström-Hägglund relay test. Both methods are available, depending upon customer preference.