4.2.2. Zeigler-Nichols Tuning Algorithms

Based on empirical observations of PID tuning strategies for process control, Zeigler and Nichols have proposed two methods of choosing the first-pass settings for PID compensators. The methods only need measured system responses and are generally applicable to type 0 systems of any order that are commonly found in process control applications (i.e. control of level, temperature, pressure, flow, etc.).

Lecturer

Set up MATLAB

cd matlab
pwd
clear all
imatlab_export_fig('print-svg')  % Static svg figures.
format compact
Copy to clipboard
ans =
    '/Users/eechris/code/src/github.com/cpjobling/eglm03-textbook/04/1/matlab'
Copy to clipboard

4.2.2.1. Step Response Method

Zeigler-Nichols’ step response method will work on any system that has an open-loop step response that is an essentially critically or overdamped damped character like that shown in Figure 1.

Open-loop step response for a typical process control system Figure 1: Open-loop step response for a typical process control system

From this response it is necessary to determine only two parameters.

  • The slope R of the tangent to the steepest part of the rising edge.

  • The “apparent dead-time” L (which is the intersection of the tangent with the time axis).

Given that a=RL, the PID parameters are then tuned according to Table 1.

Table 1 Tuning parameters for Zeigler-Nichols’ time response method

Type

Kprop

TI

TD

P

1/a

PI

0.9/a

3L

PID

1.2/a

2L

0.5L

Provided that the open-loop response is stable, it is possible to measure the apparent time constant T. For a second order system it can be shown that the settling time (to 98% of the final value) of an overdamped system is approximately 4T. We thus take this as an approximation for any higher-order system that has the general shape indicated in Figure 1. Thus

TTs4.

Given the apparent time constant, Zeigler-Nichols’ step response tuning method works reasonably well for

$0.15LT0.6.$ .

Under these conditions, the choice of tuning parameters indicated in Table 1 would give a closed-loop system with good load-disturbance rejection properties. Zeigler-Nichols tuning methods, however, tend to produce systems whose transient response is rather oscillatory and so will need to be tuned further prior to putting the system into closed-loop operation.

4.2.2.2. Ultimate sensitivity method

This tuning algorithm works for type 0 systems that have order > 2. It can also be adapted to work in auto-tuning implementations of PID compensators2. The tuning method relies on being able to find the gain at which the Nyquist response crosses the critical point or equivalently when the root locus crosses the imaginary axis. It can be found experimentally, but requires that the gain be increased in closed-loop operation until the response becomes a sustained oscillation. This may be a dangerous mode of operation in some process control applications! The gain at which the system becomes marginally stable is called Ku. The period of oscillation of this frequency is Tu.

Once these two parameters are known, the PID parameters are selected according to Table 2.

Table 2 Tuning parameters for Zeigler-Nichols’ ultimate sensitivity method

Type

$Kprop$

$TI$

$TD$

P

0.5 Ku

PI

0.45 Ku

Tu/1.2

PID

0.6 Ku

Tu

Tu/8

The static gain for the open-loop system is

Kp=G(s)H(s)|s=0

The ultimate sensitivity tuning method works well if:

2<KpKu<20

but again, the closed-loop response tends to be somewhat under-damped.

4.2.2.3. Examples

To illustrate the application of the Zeigler-Nichols tuning rules we take the plant:

$G(s)=6(s+1)(s+2)(s+3)$ .

G = zpk([],[-1;-2;-3],6)
Copy to clipboard
G =
Copy to clipboard
          6
Copy to clipboard
  -----------------
Copy to clipboard
  (s+1) (s+2) (s+3)
Copy to clipboard
Continuous-time zero/pole/gain model.
Copy to clipboard

The feedback:

H=1; 
Copy to clipboard

Loop transfer function:

GH=G*H;
Copy to clipboard

4.2.2.3.1. Time response method

The open-loop step response of the system is

step(GH)  
Copy to clipboard
../../_images/zeigler_12_0.svg

From this figure, we determine that settling time:

Ts = 4.95; 
Copy to clipboard

so

T = Ts/4; 
Copy to clipboard

The tangent seems to cross the time axis at

cmin = 0; tmin = 0.42; 
Copy to clipboard

and the final value at

cmax=1; tmax = 2.674;
Copy to clipboard

Let us add this information to the step response:

[c,t]=step(GH,6);
plot([tmin,tmax],[cmin,cmax],'r-'),axis([0,6,0,1]),hold on,...
plot([0,6],[0.98,0.98],'g--',[Ts,Ts],[0,0.98],'g--',[Ts],[0.98],'b*'),...
title('Zeigler-Nichols Step Response Method'),plot(t,c),hold off  
Copy to clipboard
../../_images/zeigler_22_0.svg

The slope of the tangent is

R = (cmax-cmin)/(tmax-tmin)  
Copy to clipboard
R =
    0.4437
Copy to clipboard

The parameter

L = tmin;
L/T 
Copy to clipboard
ans =
    0.3394
Copy to clipboard

is in the rquired range so

a=R*L;   
Copy to clipboard

and the PID parameters are

Kprop = 1.2/a; Ti = 2*L; Td = 0.5*L;  
Copy to clipboard

we construct the PID compensator

Prop = tf(1,1);
Integ = tf(1,[Ti,0]);
Deriv = tf([Td,0],1);
PID1 = Kprop*(Prop + Integ + Deriv)  
Copy to clipboard
PID1 =
Copy to clipboard
  1.136 s^2 + 5.41 s + 6.44
Copy to clipboard
  -------------------------
Copy to clipboard
           0.84 s
Copy to clipboard
Continuous-time transfer function.
Copy to clipboard
PID1z = zpk(PID1) 
Copy to clipboard
PID1z =
Copy to clipboard
  1.3524 (s+2.381)^2
Copy to clipboard
  ------------------
Copy to clipboard
          s
Copy to clipboard
Continuous-time zero/pole/gain model.
Copy to clipboard

Let us examine the root-locus. The closed-loop poles are:

Gc1 = feedback(PID1*G,H);
[poles,zeros,gain]=zpkdata(Gc1,'v');  
Copy to clipboard

So the root-locus (with closed-loop poles superimposed)

rlocus(PID1*GH),hold on,plot(poles,'*'),...
    title('Zeigler Nichols: Root Locus for Step Response Method'),hold off  
Copy to clipboard
../../_images/zeigler_37_0.svg

and the step response

step(Gc1),title('Zeigler Nichols: Step Response for Step Response Method')  
Copy to clipboard
../../_images/zeigler_39_0.svg

4.2.2.3.2. Ultimate sensitivity method

The open-loop transfer response of the system is KG(s)H(s). We use the Routh-Hurwitz criterion for determine the “ultimate” gain Ku.

The closed-loop transfer function is:

\begin{align}\begin{aligned}\begin{equation}G_c(s)=\frac{6K}{s^3+6s^2+11s+6(1+K)}.\end{equation}$$     .                            \\So the closed-loop characteristic equation is:\\$$\begin{equation}s^3+6s^2+11s+6(1+K)=0.\end{equation}\end{aligned}\end{align}

The routh array is

Order|s3|111s2|66(1+K)s1|10Ks0|6(1+K)

So the ultimate gain Ku=10.

When K=Ku the s1 row is zero and the previous row represents a factor of the characteristic equation. Hence

6s2+6(1+K)=06s2+66=0s2=11s=±j11

The ultimate frequency and ultimate period:

ωu=11
Ku = 10; Tu = 2*pi/sqrt(11);  
Copy to clipboard

To check the validity of this design:

Kp = dcgain(GH)
Kp*Ku  
Copy to clipboard
Kp =
     1
Copy to clipboard
ans =
    10
Copy to clipboard

… which is in the suggested range.

The PID parameters are

Kprop = 0.6*Ku; Ti = Tu/2; Td = Tu/8;  
Copy to clipboard

We again construct the PID compensator

Prop = tf(1,1);
Integ = tf(1,[Ti,0]);
Deriv = tf([Td,0],1);
PID2 = Kprop*(Prop + Integ + Deriv)  
PID2z = zpk(PID2)  
Copy to clipboard
PID2 =
Copy to clipboard
  1.346 s^2 + 5.683 s + 6
Copy to clipboard
  -----------------------
Copy to clipboard
         0.9472 s
Copy to clipboard
Continuous-time transfer function.
Copy to clipboard
PID2z =
Copy to clipboard
  1.4208 (s+2.111)^2
Copy to clipboard
  ------------------
Copy to clipboard
          s
Copy to clipboard
Continuous-time zero/pole/gain model.
Copy to clipboard

Let us examine the root-locus. The closed-loop poles are:

Gc2 = feedback(PID2*G,H);
[poles,zeros,gain]=zpkdata(Gc2,'v');  
Copy to clipboard

So the root-locus (with closed-loop poles superimposed)

rlocus(PID2*GH),hold on,...
    plot(poles,'*'),...
    title('Zeigler Nichols: Root Locus for Ultimate Sensitivity Method'),hold off  
Copy to clipboard
../../_images/zeigler_51_0.svg

and the step response

step(Gc2),title('Zeigler Nichols: Step Response for Ultimate Sensitivity Method')  
Copy to clipboard
../../_images/zeigler_53_0.svg

4.2.2.4. Discussion

Comparison of the two designs:

[y1,t1]=step(Gc1,10);
[y2,t2]=step(Gc2,10);
plot(t1,y1,t2,y2),legend('Step response','Ultimate sens.'),...
    title('Comparison of results')  
Copy to clipboard
../../_images/zeigler_55_0.svg

There is actually very little difference in these two responses. We might choose the result of the ultimate sensitivity as it has a slightly lower peak overshoot. However, it is likely that we can do much better by taking these results as a staring point.

4.2.2.5. Footnotes

[1] Integral action is hardly ever added to systems of type 1 or greater. The additional pole at the origin is usually extremely destabilising.

[2] An auto-tuner is a PID compensator that can choose its own parameters. It is naturally a digital device and consists of a microcontroller with some built-in tuning algorithms. Such devices are available commercially.

4.2.2.6. Resources

An executable version of this document is available to download as a MATLAB Live Script file zeigler.mlx.