This article will help to understand Zeigler-Nichols Rule. This rule applicable to PID controllers is explained with example. How it can be implemented in MATLAB and how to analyze it.
The Zeigler-Nichols is a heuristic approach for tuning the parameters of PID controller gain parameters:
- Kp – the controller path gain
- Ti – the controller’s integrator time constant
- Td – the controller’s derivative time constant
Given two measured feedback loop parameters derived from measurements:
- The period T0 of the oscillation frequency at the stability limit.
- The gain margin Kp0 for loop stability.
The main goal is to achieve good regulation in the system for rejecting the disturbance produced in the system.
When to use the Zeigler-Nichols
Tuning rules work well when the controller required is analog, system is linear, monotonic and a response that is dominated by a single-pole exponential “lag”.
Actual plants are unlikely to have a perfect first-order lag characteristic. Higher-order poles will introduce an extra phase shift, phase shift matters a lot to loop stability. You can’t depend upon the single “lag” pole to match both the amplitude roll-off and phase shift accurately.
So the ZN model presumes an additional fictional phase adjustment that does not distort the assumed magnitude roll-off. At the stability margin there is a 180 degree phase shift around the feedback loop which is the Nyquist’s stability criteria. A first order lag can contribute no more than 90 degrees of that phase shift.
To summarize, then, the Ziegler-Nichols rule assumes that the system has a transfer function of the following form:
= (Ke^-sT)/ (a+s)
The model matches the system response at frequencies 0 and at the stability limit.
How do you measure response parameters?
Given the magnitude and phase open-loop response curves of the plant, you can fit the assumed model in the following manner.
- The ratio of output level to input level at low frequencies determines the gain parameter K of the model.
- Observe the frequency F0 at which the phase passes through -pi radians (-180 degrees). The inverse of this frequency is the period of the oscillation, T0.
- Observe the plant gain Kc that occurs at the critical oscillation frequency Fu. The inverse of this is the gain marginK0.
The given transfer function is:
Gp = 1/s(s+11.6+5.8i)(s+11.6-5.8i)
den=conv([1 0],conv([1 11.6+5.8i],[1 11.6-5.8i]));
rlocus(num,den) %frequency response of the system
T0=(2*pi)/13; % Measuring the period T0 at the stability limit
Kp0=3900; % Measuring the gain margin Kp0 for loop stability
Ti=0.5*T0; % Calculating the tuning parameters
numgc=kp*[Td*Ti Ti 1]; %Numerator of PID transfer function
dengc=[Ti 0]; %denominator of PID transfer function
gc=tf(numgc,dengc); % PID controller’s transfer function
t=gf/(1+gf); %Closed loop transfer function
Kp0 = 3900
Td = 0.0604
T0 = 0.4833
Ti = 0.2417
kp = 2340
kd = 141.3717
ki = 9.6830e+003