Ziegler–Nichols method
# Ziegler–Nichols method

The Ziegler–Nichols tuning method is a heuristic method of tuning a PID controller. It was developed by John G. Ziegler and Nathaniel B. Nichols. It is performed by setting the I (integral) and D (derivative) gains to zero. The "P" (proportional) gain, $K_{p}$ is then increased (from zero) until it reaches the ultimate gain $K_{u}$, at which the output of the control loop has stable and consistent oscillations. $K_{u}$ and the oscillation period $T_{u}$ are then used to set the P, I, and D gains depending on the type of controller used and behaviour desired:

Ziegler–Nichols method :

| Control Type | $K_{p}$ | $T_{i}$ | $T_{d}$ | $K_{i}$ | $K_{d}$ |
| - | - | - | - | - | - |
| P | $0.5K_{u}$ | – | – | – | – |
| PI | $0.45K_{u}$ | $0.8{\overline {3}}T_{u}$ | – | $0.54K_{u}/T_{u}$ | – |
| PD | $0.8K_{u}$ | – | $0.125T_{u}$ | – | $0.10K_{u}T_{u}$ |
| classic PID | $0.6K_{u}$ | $0.5T_{u}$ | $0.125T_{u}$ | $1.2K_{u}/T_{u}$ | $0.075K_{u}T_{u}$ |
| Pessen Integral Rule | $0.7K_{u}$ | $0.4T_{u}$ | $0.15T_{u}$ | $1.75K_{u}/T_{u}$ | $0.105K_{u}T_{u}$ |
| some overshoot | $0.3{\overline {3}}K_{u}$ | $0.50T_{u}$ | $0.3{\overline {3}}T_{u}$ | $0.6{\overline {6}}K_{u}/T_{u}$ | $0.1{\overline {1}}K_{u}T_{u}$ |
| no overshoot | $0.20K_{u}$ | $0.50T_{u}$ | $0.3{\overline {3}}T_{u}$ | $0.40K_{u}/T_{u}$ | $0.06{\overline {6}}K_{u}T_{u}$ |

The ultimate gain $(K_{u})$ is defined as 1/M, where M = the amplitude ratio, $K_{i}=K_{p}/T_{i}$ and $K_{d}=K_{p}T_{d}$.

These 3 parameters are used to establish the correction $u(t)$ from the error $e(t)$ via the equation:

    $u(t)=K_{p}\left(e(t)+{\frac {1}{T_{i}}}\int _{0}^{t}e(\tau )\,d\tau +T_{d}{\frac {de(t)}{dt}}\right)$

which has the following transfer function relationship between error and controller output:

    $u(s)=K_{p}\left(1+{\frac {1}{T_{i}s}}+T_{d}s\right)e(s)=K_{p}\left({\frac {T_{d}T_{i}s^{2}+T_{i}s+1}{T_{i}s}}\right)e(s)$

## Evaluation

The Ziegler–Nichols tuning (represented by the 'Classic PID' equations in the table above) creates a "quarter wave decay". This is an acceptable result for some purposes, but not optimal for all applications.

This tuning rule is meant to give PID loops best disturbance rejection.

It yields an aggressive gain and overshoot – some applications wish to instead minimize or eliminate overshoot, and for these this method is inappropriate. In this case, the equations from the row labelled 'no overshoot' can be used to compute appropriate controller gains.

