# PID : What does « ultimate gain Ku » in Ziegler–Nichols method mean?

According to the PID controller wikipedia page, in its subsection Ziegler-Nichols method, as in its Ziegler-Nichols page, it is said that using "ultimate gain Ku" could help to tune a PID.

Unfortunately, I'm not sure to understand well what is the "ultimate gain Ku".

Is the "ultimate gain Ku", the highest value that could reach the system ?

Or, is the "ultimate gain Ku", the largest error value between the targeted value and the value delivered by the system ?

For example, if we want to target a value of 17 volts, and if we want to accept only a maximum of 24 volts, which means the highest error will be a positive +7 volts, is the "ultimate gain Ku": 24 volts ? or 7 volts ?

Let we take for example a P-controller, which is simpler to understand. The output of the controller is the amplified error. $Y_{\text{out}}=K(X_{\text{SP}}-X_{\text{PV}})$ Where $K$ is the gain, $X_{\text{SP}}$ is the setpoint value and $X_{\text{PV}}$ is the process value.

The error will tend to be lower as much gain you will apply, but because the system has a lag it will start to oscillate. The ultimate gain $K_u$ is the marginal gain, a point of non return. It is the gain where the system STARTS to oscillate. With big letters it starts, because that is the real ultimate gain, giving more gain than ultimate is it obviously that will oscillate, too. But if you lower the gain from ultimate gain, then the system will be brought to a stable condition, back.

Well, in short: It's the gain when the system starts to oscillate.

An analogue depiction would be like black hole. When you come close to it, it will attract and you will fall into it. The speed that will allow you to spin around without falling into it, is the critical speed. You can't go back, but you will not fall into, something like satellites that are orbiting around the Earth.

The depiction is the type of response: a- stable, b-non stable, c- on the margin (controller response with adjusted ultimate gain)

OK. Then, here are the answers to my two questions:

Question 1 was: Is the "ultimate gain Ku", the highest value that could reach the system ?

Answer is: no, the "ultimate gain Ku", IS NOT the highest value that could reach the system.

Question 2 was: Or, is the "ultimate gain Ku", the largest error value between the targeted value and the value delivered by the system ?

Answer is: no, the "ultimate gain Ku", IS NOT the largest error value between the targeted value and the value delivered by the system

The "ultimate gain Ku", of the Ziegler–Nichols PID tuning method, is an amplifier of the error, but not the error, nor the highest acceptable value. To explain this, according to classic Ziegler–Nichols PID tuning, when Ki and Kd are equal to zero, it shows what Ku is: commande = 0.6*Ku*(error), where error = (target - value).

According to this, "Ku" (as "Tu", the other parameter of Ziegler–Nichols PID tuning method) has to be determined regarding experience of the system, or using a "calculation model".

Here is an example of a calculation model using a spreadsheet in Libre Office. The highest limit value is 24. The target is at 17. Equation of classic Ziegler–Nichols PID tuning method is the basis of the calculation. Choosing different values of "Ku" and "Tu", gives a variation input in the value for the next round. Depending to values of "Ku" and Tu", the curve will be different, and corrected values made by the PID, will be in an acceptable range or not. Varying those "Ku" and "Tu", goes to a model wished.

• The ultimate gain is the value that renders the closed loop system critically stable. – Chu Feb 16 '17 at 17:44

I would like to add extra small thing on marko's answer. Imagine we have this system

Its a type zero 2nd order system. You are given only a proportional controller and you can't decide what value of $K$ should be in the system.

You probably know that in this prop. controller changing the gain will change how the system responds to this step input and will also change the system steady state error.

This is the relation between the system steady state error and the prop. gain constant

$e_{ss}=\frac{1}{1+K_p}$ where $K_p$ is the static position error constant $K_p = \frac{K}{15}$; Its quite obvous that increasing the gain is a good thing since it will lower the system steady state error but looking at the system root locus will tell you the gain limit that increasing your system gain more than this value will result instability.

You can tell from the root locus that a gain equals or more than 195 will lead to instability, but below 195 your systems is stable.

The value that the root locus intersects the imaginary axis at is the ultimate gain. You can also get this value using Routh–Hurwitz

• The gain for critical stability is obtained directly from the transfer function as $K_p =9\times 23 - 15= 192$ which is much easier to derive and more accurate (for a 3rd order TF) than going through the root locus procedure. – Chu Feb 16 '17 at 17:32