How long do you need to tune a PID controller optimally?

by J. Schuurmans

If you are tuning a PID controller by trial and error, the tuning process can take a 'long' time (I shall quantify 'long' further down in this post).

If you use the PID Tuner, it produces a linear model of the process. Subsequently, the PID Tuner allows you to use a systematic PID tuning method based on that linear model. The result is an optimal PID setting within seconds. Hence, with the PID Tuner, the time needed for tuning is neglectable once you have the model. Most of the tuning time is needed for the step test (als known as 'bump' test) that is used to create the model.

After a step test, there is always some amount of time where the controlled process variable does not respond to the step yet . We refer to this time as the 'Delay time'. The step test should not last longer than approximately 5 times the Delay time. Hence, the tuning process with the PID Tuner usually takes approximately 5 - 10 times the Delay time. If you choose the step size (the parameter 'Amplitude' in the PID Tuner) big enough, the step experiment will show a clear response. A big enough step size is usually at least a couple of times the MV variations you saw before the step, when the process operated in closed-loop control, but you may want to discuss the step size with the operator first.

Time required with other tuning methods

Let us compare the tuning time needed (when using the PID Tuner) with a trial and error method. In the trial and error method, you need to wait after each change for some time for the loop to settle. Actually, this time is, at best, 4 times the Delay time (based on [1]); to make an estimate of the worst case is impossible. Would you be done after one trial? Unlikely! It is more likely that you want to try at least 3 times 3 (there are three PID parameters) different settings.

What about the closed loop Ziegler and Nichols method which is more systematic than trial and error? In the closed loop Ziegler and Nichols method, the loop remains closed, while you switch off integral control and increase the proportional gain until the loop oscillates steadily. Based on linear control theory (se e.g. [1]), we know that these oscillations will have a period in the order of 4 times the Delay time. Since you want to check if the oscillations dampen, you would have to wait, at best, about 16 times the Delay time.

Let us know throw in a practical example. Suppose the Delay time is 4 minutes, than the PID Tuner requires 20 minutes for tuning. With the other methods it is likely that you need at least 160 minutes. Hence, as soon as the Delay time is more than a couple of minutes, the other tuning methods take a 'long' time (at least hours). As soon as the Delay time is more than a couple of hours, the other methods can easily take weeks! Indeed, this is also what we hear from the 'field', the people who do the PID tuning in practice, using trial and error and/or Ziegler and Nichols. Tuning is often accepted as a tedious time consuming process. What a pity, it should not be like that at all! It should be fun!


[1] S. Skogestadt, “Probably the best simple PID tuning rules in the world”, Submitted to Journal of Process Control July 3, 2001