Académique Documents
Professionnel Documents
Culture Documents
Ziegler–Nichols Tuning
March 07, 2016 by Robert Keim (/author/robert-keim)
Before we get started, here is the PID control system diagram presented
previously:
It should come as no surprise that the people designing jet fighters and Mars
rovers need something way better than guess-and-check. Sophisticated PID
software packages or simulation environments are probably the method of
choice for most modern control systems; we, on the other hand, will use a
simple, time-tested technique known as the Ziegler–Nichols method.
Ziegler–Nichols
This procedure was first described in a paper published in 1942—credit to
Ziegler and Nichols for coming up with a tuning method that has survived
almost 75 years of overwhelming technological development. The process
starts with a proportional-gain-only system. You increase the P gain until the
system exhibits oscillations that are sustained (i.e., stable in terms of
amplitude) and regular (i.e., stable in terms of period); the oscillation does not
need to be centered around the setpoint. This is the only tiresome part of the
Ziegler–Nichols method. The rest is just math.
Once you have sustained, regular oscillation, you record the proportional gain
and measure the oscillation period. These values are referred to as the
ultimate gain (KU) and the ultimate period (PU), respectively. Now you
calculate KP, KI, and KD according to the following table:
KP TI
Note that the integral and derivative columns are labeled TI and TD instead of
KI and KD. These “T” variables refer to the time constant used when
calculating the integral or derivative. For our discrete-time controller, we use
the following relationships to determine KI and KD:
KI = KP ( ) KD = KP ( )
T TD
TI T
where T is the PID interval, i.e., the amount of time between successive
executions of the routine that calculates the PID output and updates the
control circuitry. The current version of our temperature controller uses a PID
interval of 2 seconds.
Seeking Oscillation
So first we need to find the ultimate gain and period. Feedback systems often
burden engineers with the problem of preventing oscillation; there is
something relaxing about encouraging oscillation and even feeling a sense of
satisfaction when it occurs with sufficient regularity.
In the previous article we saw that a P-only system with KP = 70 does not
produce stable oscillation:
So let’s increase KP to 90 and see what happens.
This is looking better, but the amplitude of the oscillations clearly decreases
over time. Let’s try KP = 100:
I would consider this borderline. The oscillations are regular but not quite
sustained (the decreasing amplitude is not really apparent until the last three
cycles). Here’s KP = 110:
This looks good to me. I don’t notice any significant irregularity or reduction in
amplitude. So we will say that the ultimate gain is 110.
TU = 55 seconds
Calculations
The first table shows the Ziegler–Nichols values for the proportional gain,
integral time constant, and derivative time constant assuming KU = 110 and
TU = 55 seconds. The second table has gain values instead of time constants
for the integral and derivative terms, assuming that the PID interval is 2
seconds. All values in the second table are rounded to the nearest integer;
these are the values that we will actually use in the system, which does not
support non-integer gains.
KP TI
P-only control 55
PI control 50 45.8
KP KI KD
P-only control 55
PI control 50 2
Results
We will compare the performance of different system configurations based on
convergence time, which we will define as follows: the interval between the
time at which the measured temperature first reaches the setpoint and the
time at which the measured temperature remains directly on top of or
immediately adjacent to the setpoint line. (This convergence criterion
corresponds to a range of about 1°C above or below the setpoint
temperature.) We want the interval to begin when the measured temperature
first reaches the setpoint (rather than at the beginning of the control run)
because this should minimize errors associated with variations in the initial
system state (the dominant concern being variations in the measured
temperature at the beginning of the control run).