0% found this document useful (0 votes)
191 views

Ziegler-Nichols Tuning Method: Understanding The PID Controller

This document discusses speed control of a DC motor using a PID controller and the Ziegler-Nichols tuning method. It provides the mathematical modeling of a DC motor, including its transfer function and state space representation. It then describes proportional, integral, and derivative controllers and how they are combined in a PID controller to control motor speed. The Ziegler-Nichols tuning method is used to determine the PID parameters for optimal control.

Uploaded by

Saran Selvan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
191 views

Ziegler-Nichols Tuning Method: Understanding The PID Controller

This document discusses speed control of a DC motor using a PID controller and the Ziegler-Nichols tuning method. It provides the mathematical modeling of a DC motor, including its transfer function and state space representation. It then describes proportional, integral, and derivative controllers and how they are combined in a PID controller to control motor speed. The Ziegler-Nichols tuning method is used to determine the PID parameters for optimal control.

Uploaded by

Saran Selvan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Ziegler–Nichols Tuning Method∗

Understanding the PID Controller

Vishakha Vijay Patel

The objective of this article is to study the speed control of a


DC motor using PID controller and understand the Ziegler–
Nichols (ZN) tuning method for a PID controller. PID con-
trollers are widely used in many industries such as paper mill,
cotton textile industries. PID controller also finds its appli-
cations in drones. The usefulness of PID lies in its general
applicability.
Vishakha Patel has completed
her BE Electrical and
1. Introduction Electronics Engineering from
the CMR Institute of
Speed control of DC motors finds applications in various industries– Technology, Bangalore. Her
cotton mills to space applications. In various applications, due to work interests are in the
domain of control systems,
fluctuations in load, the speed of the motor varies. DC motor has
especially controls in
desirable characteristics, such as high starting torque and a wide aeronautical and biomedical
range of speed control, due to which it is used in many indus- fields.
tries. A PID controller is used widely in the speed control of a
motor—over half the industries use PID controllers or their mod-
ified forms. It is required to control the motor speed as per need
to ensure higher efficiency and optimum performance. The use-
fulness of PID is due to its general applicability to various control
systems. They are feasible, easy to design, and implement. They
combine the advantage of proportional, derivative, and integral
control actions. Keywords
D C Motor, PID controller, Ziegler–
Nichols technique, MATLAB.
2. Mathematical Modelling of DC Motor

Transfer function is defined as the ratio of Laplace transform of


the output variable to Laplace transform of the input variable, as-
suming all initial conditions to be zero.

Vol.25, No.10, DOI: https://doi.org/10.1007/s12045-020-1058-z

RESONANCE | October 2020 1385


Figure 1. DC motor dia-
gram depicting armature cir-
cuit as a KVL loop and rotor
as the free body diagram.

Moment of inertia of rotor J = 0.02 Kg − m2 /s2


Damping co-efficient of mechanical system b = 0.2N s/m
Electromotive force and torque constant Kt = Ke = K = 0.1
Armature resistance R R = 2Ω
Armature inductance L L = 0.5H
Input Voltage source V (volts)
Output Speed at which motor runs θ̇ (rps)

Table 1. The physical pa-


rameters considered for the
analysis of DC motor.
2.1 Transfer Function Modeling

Consider a DC motor as shown in Figure 1. The rotor is mechan-


ically coupled, and its free body diagram is shown. The armature
is represented as an electrical circuit.
The input voltage V is applied to the field winding which has a
resistance and inductance of R and L respectively. The armature
is supplied with a constant armature current, and thus the motor
shaft is controlled by the input voltage. The field current produces
a flux in the machine, which in turn produces a torque at the motor
shaft [1].
The physical parameters considered for the analysis are as shown
in Table1 1 [4]. The symbols used in the article are listed in Table
2.
In a DC motor, the torque T is directly proportional to the arma-

1386 RESONANCE | October 2020


Current i (Ampere)
Angular shaft velocity θ̇ (Revolutions per second − rps)
Proportional gain constant Kp
Integral time constant T i (Second)
Derivative time constant T d (Second)
Integral gain constant Ki
Derivative gain constant Kd

Table 2. Symbols used in


the article.

ture current i

T ∝i.
Therefore, T = Kt i , (1)

And the back emf e is directly proportional to the angular shaft


velocity θ̇

e ∝ θ̇ .
Therefore, e = Kb θ̇ . (2)

Applying Newton’s law to the rotor system

J θ̈ = T − bθ̇ .

Substitute for T from (1)

⇒ J θ̈ = Kt i − bθ̇ . (3)

Applying KVL to the armature circuit

di
V −e= L + Ri .
dt

Substitute for e from (2)

di
⇒ V − K θ̇ = L + Ri . (4)
dt

RESONANCE | October 2020 1387


Performing the Laplace transformation on (3)

sJ θ̇(s) = KI(s) − Bθ̇(s) ,


!
θ̇(s)(sJ + B)
⇒ I(s) = . (5)
K

Performing the Laplace transformation on (4)

V(s) − K θ̇(s) = [sL + R] I(s) . (6)

Substitute for I(s) from (5) in (6)


(sJ + B)
V(s) − K θ̇(s) = (sL + R) θ̇(s) ,
K !
(sL + R)(sJ + B)
⇒ V(s) = θ̇(s) + K ,.
K

Thus, the transfer function G(s) can be written as


θ̇(s) K
Therefore, G(s) = = . (7)
V(s) (sL + R)(sJ + B) + K 2

2.2 State Space Modeling

Consider the DC motor and define its state variables as


x1 = i and x2 = θ̇
Rewriting equations (3) and (4)
1
ẋ1 = (−Rx1 − K x2 − V) ,
L
1
ẋ2 = (K x1 − bx2 ) . (8)
J

Let the output to be the angular speed of shaft θ̇


y = x2 .
Writing the above equations in matrix form of state space

   −R −K   
  1   
 x˙1   L L   x1 
 L  V  h i  x1 
  =  K −b    +     [y] = 0 1  
    (9)
x˙2 J J x2 0 0 x2 .

1388 RESONANCE | October 2020


Figure 2. Proportional
controller in a feedback con-
trol loop.

3. PID Controller

3.1 Proportional Controller

In a proportional (P) (Figure 2) controller, the control output is


proportional to the error signal. The error signal is defined as the
difference between the output (or feedback signal) and the ref-
erence signal. Proportional controller amplifies the control sig-
nal. The controller will push harder for a given error, and the
closed-loop system will react quickly with an increase in over-
shoot. P controller does reduce the steady-state error, but does
not eliminate it. Changing the control parameter K p can change
the closed-loop dynamics.

3.2 Integral Controller

The integral controller (Figure 3) acts on the history of response


error. The control signal at any instant is the area under the
actuating-error-signal curve up to that instant. This leads to the
conclusion that even when the error signal has become zero, the
control signal u will have a non-zero value. The control sig- The integral controller is
nal will consist of the addition of the area under the error signal used to eliminate the
offset error. When there
before it became zero [1].
is a persistent (constant)
Hence, the integral controller is used to eliminate the offset error. steady-state error, the
integrator builds and
When there is a persistent (constant) steady-state error, the inte-
builds, thereby
grator builds and builds, thereby increasing the control signal and increasing the control
driving the error down. signal and driving the
error down.
The control signal increases continuously. The integral controller

RESONANCE | October 2020 1389


Figure 3. Integral con-
troller in a feedback control
loop.

Figure 4. Proportional
derivative controller in a
feedback control loop.

increases the overshoot, and also makes the system sluggish, as


the error signal changes sign, it takes a while for the control signal
to change path. It is unable to eliminate the oscillations from the
system.
The integral controller acts on the history of response error. The
control signal at any instant is the area under the actuating-error-
signal curve up to that instant.

3.3 Derivative Controller

The derivative (D) controller (Figure 4), as the name suggests


acts on the rate of change of error signal. The controller predicts
how the error will be (future) and acts accordingly in the present.
Prevention is better than cure.
The controller takes action even before the error has become too
big or severe. Because the derivative controller operates on the
Derivative control rate of change of error, and not on the error itself, D controller is
anticipates the actuating never used alone. It is always used in combination with P or PI
error, initiates an early
controller.
corrective action and
tends to increase the Derivative control thus anticipates the actuating error, initiates an
stability of the system.
early corrective action and tends to increase the stability of the
system [1]. Derivative controller adds on to the damping, which

1390 RESONANCE | October 2020


Figure 5. PID controller
in a feedback control loop.
The PID controller’s mathe-
matical equation can also be
written as K p + Ksi + sKd .

Close-Loop Response Rise time Overshoot Settling time Steady state error
P controller ↓ ↑ ∼ ↓
I controller ↓ ↑ ↑ ↓
D controller ∼ ↓ ↓ ∼

Table 3. Comparative
study of the characteristics
results in the decrease in overshoot, and hence decrease in the of a step response for a sec-
settling time. ond order system for P, I,
and D controller.

3.4 PID Controller

PID controllers (Figure 5) are most popular due to their general


applicability in various control domains. It is used for its zero
steady error, fast response, no oscillations, high stability, and
elimination of overshoot.
From the understanding of the different controllers, one can con-
clude and compare the P controller, I controller and D controller
as shown in Table 3.

4. Ziegler–Nichols First Tuning Method

Ziegler–Nichols (ZN) rules are widely used to tune PID con-


trollers for which the plant dynamics are precisely not known, it
can also be applied to plants of known dynamics. Ziegler and
Nichols proposed rules for determining values of proportional
gain K p , integral time T i , and derivative time Td based on the
transient response characteristic of a given plant [1].

RESONANCE | October 2020 1391


Figure 6. S-shaped step re-
sponse of a plant. The tan-
gent to the curve is drawn at
the point of inflection, to cal-
culate the delay time L and
time constant T .

Type of Controller Kp Ti Td
T
P L ∞ 0
PI 0.9 TL L
0.3 0
PID 1.2 TL 2L 0.5L

Table 4. Gain parame-


ter calculation for ZN tuning
method 1, according to the 1
PID controller is defined as K p (1 + Ti s + T d s).
values of L and T obtained.

The first tuning method is applied for plants that show an S-


shaped characteristic for their step response. The S-shaped curve
is characterized by two constants—the delay time, L and time
constant, T. A tangent is drawn to the S-shaped curve at the point
of inflection (Figure 6). The delay time, L is determined by the in-
tersection of the tangent line with the time axis and time constant,
T is determined by intersection of tangent line with final value of
step response c(t)=K. Ziegler and Nichols suggested setting the
values of the parameters K p , T i , and T d according to Table 4.
The real usefulness of ZN tuning method is seen when the plant
dynamics are unknown. The main advantage provided by ZN tun-

1392 RESONANCE | October 2020


Figure 7. The step re-
sponse of the DCM plant
is obtained as an S-shaped
curve. The code to draw the
tangent at the point of inflec-
tion is build and executed in
MATLAB.

Figure 8. Step response


plotted for the DCM with
PID parameters as calcu-
lated from Table 4, accord-
ing to Ziegler–Nichols first
tuning method.

ing rules is that they provide a starting point for the determination The real usefulness of
of the parameter values. Once we have obtained these parameter ZN tuning method is
values (Kp , Ti , and Td ), we can always further fine-tune the plant’s seen when the plant
dynamics are unknown.
closed loop response by changing the values, so as to obtain a The main advantage
satisfactory transient response. On an average, 25% overshoot is provided by ZN tuning
obtained when tuning by the ZN method. rules is that they provide
a starting point for the
MATLAB code to draw the tangent line to the S-shaped curve determination of the
(Figure 7) and also obtain the parameters L and T is given in the parameter values.
Appendix. Based on Table 4, the PID parameters are calculated,
and the step response is plotted (Figure 8).
Observe that the step response is oscillatory in the time domain.

RESONANCE | October 2020 1393


Table 5. Gain parame- Parameters values ZN first method Fine tuning
ter values as found from Proportional Gain K p 12.919 8.346
Ziegler–Nichols tuning Integral Gain Ki 154.168 36.94
method, and then fine tuning Derivative Gain Kd 0.27 0.399
those parameters for a better
response.

Table 6. Characteristics Characteristics ZN method Fine-tuning


from Ziegler–Nichols tuning Rise Time 0.112 seconds 0.243 seconds
method, and then fine tuning Overshoot 50.7% 7.04%
those parameters for a better Settling Time 1.81 seconds 0.817 seconds
response.

Figure 9. Step response


plotted for the DCM with
ZN tuning method and the
tuning method for PID con-
troller. The fine-tuned curve
(pid) is less oscillatory in the
time domain giving a more
desirable response.

To further tune this, the MATLAB tool is used. Utilize the ob-
tained parameter values as the initial values, and then tune each
parameter till the desired result is obtained. Comparison of the
PID parameters and the characteristic of the step responses is
shown in Table 5 and Table 6.
Fine-tuning the parameters obtained provides a better result. The
oscillation’s, maximum overshoot is reduced, and the character-
istics are practical values that can be implemented.
However, ZN tuning rules can only be applied to a plant exhibit-
ing S-shaped behavior for a unit step unit or exhibiting sustained
oscillation for any gain K. In some cases, for a plant having an
integrator, the ZN rules may not be applicable as it won’t satisfy

1394 RESONANCE | October 2020


Figure 10. Load distur-
bance applied to a DC mo-
tor plant. For further under-
standing of load disturbance,
refer MATLAB documenta-
tion.

Figure 11. Unit step input


provided for a durationof 9
seconds with a load distur-
bance of −0.5 amplitude for
2.5 seconds.

Figure 12. Comparison of


the behavior of controllers in
the presence of distrubance.
Open-loop and closed-loop
controller is the most af-
fected due to disturbance.
PID minimizes the fluctua-
tion in speed due to distur-
bance.

the above conditions.


On comparing this design of PID controller with an open-loop

RESONANCE | October 2020 1395


One must understand and closed-loop response, the PID controller is seen to be better
that controller design suited (Figure 9). It prevents the change in speed better in the
depends entirely on the presence of a load disturbance. One must understand that con-
plant modelling and
users requirement. Here, troller design depends entirely on the plant modelling and users
the PID controller works requirement. Here, the PID controller works better providing a
better providing a satisfactory response.
satisfactory response.
To understand the performance of the system under an applied
disturbance, a model (Figure 10) is implemented and studied.
Load disturbance, as described in Figure 11, is applied, and the
responses of open-loop, closed-loop, and PID controlled systems
are compared (Figure 12).

5. Conclusion

The individual working of proportional, integral, and derivative


controller part in a PID controller is attempted to understand through
this paper. PID controller can be used to deal with higher-order
system and tuning with the Ziegler–Nichols method, which pro-
vides an educated guess to further tune the PID parameters. The
Ziegler Nicholas method gives 10% to 60% overshoot and can be
used when dealing with non-complex dynamic systems exhibiting
S-shaped step response or continuous oscillating response. Sys-
tems exhibiting a continuous oscillating response require tuning
by the second ZN method. Based on the different industrial ap-
plications of the DC motor, the controller should be chosen and
appropriately tuned.

Suggested Reading

Address for Correspondence


[1] K Ogata, Discrete–Time Control Systems, University of Minnesota, Prentice
Vishakha Patel
Hall, 1987.
Villa 12, Neeraja Halcyon
[2] N Adhikari, M Choubey and R Singh, DC motor control using Ziegler–Nichols
Horamavu
and genetic algorithm technique, International Journal of Electrical, Electron-
Bangalore 560 043, India.
ics and Computer Engineering, April 2012.
Email:
[3] Abdulameer M Sulaiman, MSM Aras and D Saleem, Tuning methods of PID
vishupatel97@gmail.com
controller for DC motor speed control, Indonesia Journal of Electrical Engi-
neering and Computer Science, Vol.3 No.2, Aug 2016.

1396 RESONANCE | October 2020


[4] MATLAB help document “DC motor control”
https://in.mathworks.com/help/control/examples/dc-motor-control.html
https://in.mathworks.com/help/control/examples/dc-motor-control.html

Box 1. Appendix: MATLAB Code

% ZN first method of tuning


K=0.1;R=2;L=0.5;J=0.02;b=0.2;
num=[K];
den=[(L*J) ((L*b)+(R*J)) (R*b)+Kˆ2];
G=tf(num,den) %Plant Transfer function
[Y t]=step(G); % Plant step response
M=gradient(Y,t); % Gradient/slope at each point of step response
[m i]=max(M);% Max slope (at point of inflection)
c=Y(i)-(m*t(i));
figure(7);plot(t,Y,t,(m*t)+c,’--’,t(i),Y(i),’s’);
grid on;axis([0 1.2 -0.2 0.6]);
L=-c/m % Delay constant
T=((Y(end)-c)/m)-L % Time constant
%Construct PID Controller
Kp=1.2*(T/L);
Ti=2*L;
Td=0.5*L;
s=tf(’s’);
PIDc=Kp*(1+(1/(Ti*s))+Td*s);% PID controller
sys pid=feedback(PIDc*G,1);% Closed loop system
figure(8);step(sys pid);grid on;
%Display PID parameters Kp, Ki and Kd
Kp
Ki=Kp/Ti
Kd=Kp*Td [2]

RESONANCE | October 2020 1397

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy