0% found this document useful (0 votes)
30 views7 pages

Control of DC Motor Using Genetic Algorithm Based PID Controller

This document summarizes a research paper that used a genetic algorithm to optimize PID controller parameters for controlling the speed of a DC motor. The paper compares the genetic algorithm approach to the traditional Ziegler-Nichols tuning method. A genetic algorithm was applied to minimize error metrics like mean squared error and integral of time multiplied by absolute error to determine optimized PID parameters. Simulation results showed that the genetic algorithm approach provided better performance than the Ziegler-Nichols method in terms of reducing overshoot, rise time and settling time.

Uploaded by

Khiêm Nguyễn
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)
30 views7 pages

Control of DC Motor Using Genetic Algorithm Based PID Controller

This document summarizes a research paper that used a genetic algorithm to optimize PID controller parameters for controlling the speed of a DC motor. The paper compares the genetic algorithm approach to the traditional Ziegler-Nichols tuning method. A genetic algorithm was applied to minimize error metrics like mean squared error and integral of time multiplied by absolute error to determine optimized PID parameters. Simulation results showed that the genetic algorithm approach provided better performance than the Ziegler-Nichols method in terms of reducing overshoot, rise time and settling time.

Uploaded by

Khiêm Nguyễn
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/ 7

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/330847332

Control of DC Motor Using Genetic Algorithm Based PID Controller

Conference Paper · October 2018


DOI: 10.23919/ICUE-GESD.2018.8635662

CITATIONS READS

9 584

5 authors, including:

Shubham Tiwari Ankit Bhatt


Asian Institute of Technology Asian Institute of Technology
7 PUBLICATIONS   14 CITATIONS    7 PUBLICATIONS   98 CITATIONS   

SEE PROFILE SEE PROFILE

Arjun C Unni Jai Govind Singh


Asian Institute of Technology Asian Institute of Technology
8 PUBLICATIONS   31 CITATIONS    107 PUBLICATIONS   883 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Optimization View project

Optimized Generation View project

All content following this page was uploaded by Shubham Tiwari on 19 January 2020.

The user has requested enhancement of the downloaded file.


ICUE 2018 on Green Energy for Sustainable Development
Thavorn Palm Beach Resort Karon, Phuket, Thailand. 24 – 26 October 2018

Control of DC Motor Using Genetic Algorithm


Based PID Controller
Shubham Tiwari*, Ankit Bhatt, Arjun C. Unni, Jai Govind Singh, Weerakorn Ongsakul
Department of Energy, Environment and Climate Change
School of Environment Resources and Development, Asian Institute of Technology, Pathum Thani, Thailand – 12120
*[email protected]

Abstract—The paper deals with the optimized tuning of P.I.D given control system have their certain limitations.
controller which is used to control the D C Motor. In this Therefore, this paper develops a design using Genetic
research work different PID tunings techniques are discussed. Algorithm (G.A) in MATLAB tool box. A genetic
D.C Motor due to its very simple regulated characteristics is algorithm (G.A) is an experimental quest or search model
used in this paper. Due to this fact D.C. Motors are widely used that is motivated by Charles Darwin’s theory of natural
in many industrial applications like steel mills, electric trains evolution. This algorithm has a set of rules that gives the
and many more. Here G.A-P.I.D (Genetic Algorithm – P.I.D) information of natural process of selection in which the best
with different performance indices namely Mean Square Error or fittest entities are designated work of reproduction to
(M.S.E) and Integral of Time multiplied by Absolute Error
produce new offspring for the next generation.
(I.TA.E) optimization technique is compared with standard
P.I.D parameter adjustment technique i.e. Ziegler & Nichols By using genetic algorithms for tuning the controller will
method. Comparison of results are based on standard step provide the best and most optimized result for the given
responses parameters i.e. maximum overshoot, steady state and control system when being evaluated every time. The main
rise time. objective of this research is to reveal that when GA is
employed for tuning purpose to any system , an optimized
Index Terms— DC Motor position control, PID parameters tuning parameter values can be realized. To show this,
tuning by G.A, Ziegler Nichols Method.
results obtained from GA optimized system and the
I. INTRODUCTION classically tuned system (Ziegler Nichols Method) are
compared and discussed. Subsequent section II gives the
PID control strategy is a regular feedback controlling
information of D.C Motor modelling and its parameters. The
technology and it covers 90% of regular controllers in
section III highlights on orthodox PID Controller tuning
engineering sector. The function of the controller is to
technique by Ziegler Nichols Method and Genetic Algorithm
implement an algorithm based on the control input and
optimization technique is briefed in this same section.
therefore output is maintained at certain point to make
Section IV enlightens the results by comparing different
negligible discrepancy between the system method variable
simulations of each technique which are discussed in section
and the setpoint[1]. Due to their functional simplicity and
III . Finally, section V contains conclusion and discussion
reliability PID controllers delivers consistent and robust
part.
performance for almost every system dynamics and thus it
can be tuned to guarantee an acceptable closed loop II. MODELLING OF SEPERATELY EXCITED D.C MOTOR
performance [2]. By using a PID controller transient
To realize the D.C Motor drive as a control system
response of a system improves by decreasing the rise time,
transfer function, following steps to be done in MATLAB:
eliminating the peak overshoot and shortening the settling
First step is to characterize the equivalent DC motor circuit
time of a system [3]. Proper functioning of a system highly
diagram. Then step 2 is to characterize system equations
depends on PID parameters, so they should be optimized and
from the circuit diagram. Subsequently, step 3 is to derive
tuned wisely. Many standard methods are introduced for
transfer function from derived system equations. After that
parameter tuning includes Ziegler-Nichols Ultimate-cycle
Step 4 is the Realization of the equivalent block diagram of
tuning [4], Cohen-Coon’s [6], Astrom and Hagglund [5] and
system drive. Finally, in step 5 .m file is created for model
others.
simulation and to analyze the results.
The fact that D.C Motors have outstanding speed
A. DC Motor Equivalent Circuit
regulation and simple characteristics, these motors are
broadly used in many industrial applications such as To execute the simulation of separately excited DC motor
tractions, rolling mills etc. This encourage many researchers drive [9], the equivalent circuit diagram of motor’s
to develop several algorithms and techniques associated to mechanical part and electrical portion must be obtained first
speed and position control of D.C Motor. usually, a as shown in Fig.1. Here left model represents the armature
prohibitive performing motor drives system should have circuit of D.C motor and right model represents the field
excellent dynamic response to enact angle and speed circuit which is separately excited.
tracking. In addition to this motor drive should also follow Field excitation parameters are assumed to be fixed as it
real time load change[7, 8]. Proportional-Integral Derivative is separately excited. Therefore, to make this model simple
(PID) controllers because of their easy and good controlling to study and execute, here field excitation parameters of
performance are used for this purpose. motor are not taken into account while analyzing the
Conventional methods like Ziegler-Nichols, frequency simulation model of motor.
domain and Time domain approaches of tuning PID for a
ICUE 2018 on Green Energy for Sustainable Development
Thavorn Palm Beach Resort Karon, Phuket, Thailand. 24 – 26 October 2018

Ia = Armature Current (A)


Ra = Armature Resistance (ohm)
J = Mechanical Inertia (kg-m2)
eb = Back EMF (V)
Kf = Friction Coefficient (N-m/ rad/ sec)
Td = Torque Disturbance (N-m)
Km = Motor Torque Constant (N-m/ rad)
𝜔 = Angular Speed (rad/sec)
Kb = Back EMF Constant (V/rad/sec)
Tm = Mechanical Torque Developed (N-m)

The block diagram developed from previously stated


equivalent circuit equations is as shown in Fig. 2.

Figure 1. Equivalent DC Motor circuit.

B. DC Motor Equivalent Circuit


In the current research methodology, D.C motor model is
modeled in which the rotor is assumed to be a single coil
having equivalent inductance expressed as La and equivalent
resistance as Ra, therefore representing generated back
E.M.F represented as eb. In separately excited dc motor, flux
remains constant. The electrical model of separately excited
D.C Motor are described by following dynamic equations:
𝑑𝑖𝑎
𝑒𝑎 = 𝑒𝑏 + 𝑖𝑎 . 𝑅𝑎 𝐿𝑎 . (1)
𝑑𝑡
The analogy between generated torque Tm and armature
current ia is given by following equation:
Figure 2. Block Diagram of DC Motor.
𝑇𝑚 = 𝐾𝑚 . 𝑖𝑎 (2)
Control system closed loop system shown in Fig. 2 has
The relation between generated back E.M.F eb and the the mechanical system Laplace function and electrical
angular speed is given by the following equation: system Laplace function stated separately. They are further
𝑒𝑏 = 𝐾𝑏 . 𝜔 (3) combined to realize the output motor speed (𝜔) and from
which we can estimate the position of rotor. From this
from equation (1) and (3), we get transfer function we can also study about output armature
𝑑𝑖𝑎 current of motor. Transfer thus obtained is of second order
𝑒𝑎 = 𝐾𝑏 . 𝜔 + 𝑖𝑎 𝑅𝑎 𝐿𝑎 (4) system. Then to control this control system, P.I.D. controller
𝑑𝑡
used in forward path.
The equivalent dynamic equation for mechanical system
of motor is as follows: From motor equivalent equations and by using specific
𝑑𝜔 standard values of parameters, D.C motor model is realized.
𝑇𝑚 = 𝐾𝑚 𝑖𝑎 = 𝐽 + 𝐾𝑓 𝜔 + 𝑇𝑑 (5) The D.C motor parameters used in this research paper are
𝑑𝑡
defined in equation (10).
C. Model Block Diagram
Using Laplace transformation technique for equation (4) Kf = .018,
and (5), following equations are derived: Km = Kb = 1.4,
Ra = 2 ohms,
𝑒𝑎 (𝑠) = 𝐾𝑏 . 𝜔(𝑠) + 𝑖𝑎 (𝑠). 𝑅𝑎 + 𝐿𝑎 (𝑠). 𝑖𝑎 (6)
La = 16.2 mH, (10)
and subsequently J = 0.117 KgM2,
𝑇𝑚 (𝑠) = 𝐾𝑚 . 𝑖𝑎 (𝑠) = 𝐽. 𝜔(𝑠) + 𝐾𝑓 . 𝜔(𝑠) + 𝑇𝑑 (𝑠) (7) Va = 220 volts,
Td = 1 N-m,
Therefore, from equation (6), armature current is
expressed as Thus, the final of transform function is shown in equation
(11).
𝑖𝑎 (𝑠) = [𝑒𝑎 (𝑠) − 𝐾𝑏 . 𝜔(𝑠)]⁄[𝑅𝑎 + 𝐿𝑎 (𝑠)] (8)
1.4
and from equation (7), output speed is represented as: 𝜔= (11)
𝑠 2 (0.001895) + 0.2349𝑠 + 1.996
𝜔(𝑠) = [𝑇𝑚 − 𝑇𝑑 (𝑠)]⁄�𝐽 + 𝐾𝑓 � (9)
By equation (11) the expression of rotor position of
Where, motor is also calculated. Analyzing the position of rotor of
ea = Armature Voltage (V) D.C Motor is also a very keen aspect and difficult because
La = Armature Inductance (H) the transfer function of position is of third order control
ICUE 2018 on Green Energy for Sustainable Development
Thavorn Palm Beach Resort Karon, Phuket, Thailand. 24 – 26 October 2018

system. Position of rotor is expressed as ϴ expressed and its complicated spheres and in addition to it does not encounter
transfer function is expressed in equation (12). any issues regarding abnormal dimensionality, which may
befall in other techniques like gradient decent or derivative
1.4
𝛳= (12) information methods.
𝑠 3 (0.001895) + 0.2349𝑠 2 + 1.996𝑠
Genetic Algorithm in this research is used for the
Thus, this paper uses the transfer function of rotor following two determinations:
position of motor as its plant function and to this PID
controller is attached to control the position of motor. 1. To determine the optimized value of PI controller
parameters namely Kp, Ki and Kd.
III. PID PARAMETER TUNING STRATEGIES
2. To reduce the error value between given higher order and
In this section two PID parameter tuning strategies obtained reduced order models.
namely Ziegler Nichols Method and Genetic Algorithm
which are discussed in this section. The objective function is the most important and decisive
part of Genetic algorithm to get the most optimized results.
A. Conventional Approach - Ziegler Nichols Method The objective function is employed in this algorithm to know
The extremely substantial step for operating the PID how the individual parameters will perform for given
controller is the adjusting of its parameters. The control objective. For minimization challenge, individuals which
dynamics of any system provides very poor performance have the minimum numerical value according to the
result and its characteristics comes out to be impractical, if predefined objective function are selected.
proper optimize tuning of controller is not done. Sometimes
a stable control function becomes unstable system.
Therefore, for proper and good performance proper choice of
tuning parameters is a necessity of system.
Tuning of parameters includes the identification of best Initialize Population
values of Kp, Ki, Kd when P.I.D controller is used in system.
Identification of parameters generally is a subjective and
iterative process and highly depends on the type of system
and process therefore change and need to tune them
accordingly. Ziegler Nichols Method is a broadly
acknowledged technique mainly used for adjusting
Evaluate Fitness Function
parameters. The idea is very simple and easy to implement.
Initially there is a need to adjust only P (proportional gain
Kp) to a minimal value. Now after this by changing load to a
small value, results thus obtained are analyzed. If output
result is very inactive or not up to mark this means Kp value
is low. Then to make response active, value of parameter Kp
needs to be increased by some multiple factor generally two
and again analyze the response by changing load to small Select the Best or Fittest
value. This process keeps on repeating until the output
response of system becomes incessant oscillatory.
During this whole process the Integration and Derivative
controller gain constants are adjusted to zero. The value of
Kp at which system gives consistent oscillatory response is
marked as Ultimate Gain of system (Kc). Oscillating period Mutation
at this gain is termed as Period of Oscillation (Pu). Now from
this Ultimate Gain and Period of Oscillation, value of Kp,
Ki, Kd. The value of these parameter for the given D.C
Motor control system transfer function is given in result
section.
Crossover / Reproduction
B. Genetic Algorithm for Optimal Tuning
The genetic algorithm begins with zero prior inputs or
any predefined information of the precise result and rely
totally on outputs from its surroundings and progression No Optimal Solution
parameters like reproduction, crossover and mutation to get
the best possible optimized result. By initializing with
different self-supporting objectives and hunting parallelly,
the procedure thus escapes i.e. it does not stop at local Optimal Solution
minima value of system and therefore it converges to some
semi optimized solutions. Research describes about the two types of function
shown in Table I. Figure 3. Flow chart of G.A.
By this procedure, GAs shows its capability of finding
possible areas which have maximum performance index in
ICUE 2018 on Green Energy for Sustainable Development
Thavorn Palm Beach Resort Karon, Phuket, Thailand. 24 – 26 October 2018

IV. RESULTS AND DISCUSSIONS


TABLE I. OBJECTIVE FUNCTIONS In this section, first all simulations and their respective
output response is shown for each technique used in this
FUNCTION NAME FUNCTION DEFINITION research paper. Further a comprehensive comparison is done
by putting all data in a tabular format.
Integral of Time Multiplied 𝜏 A. Conventional Approach - Ziegler Nichols Method
by Absolute Error (ITATE) 𝑓 = � |𝑡 𝑒(𝑡)𝑑𝑡 The output step response of D.C Motor is calculated after
0
doing extensive fined tuning by Z.N Method by following
Mean of Squared Error the procedure described in previous section, for this
1 𝜏
(M.S.E) 𝑓= � (𝑒(𝑡))2 𝑑𝑡 SISOTOOL Box in MATLAB software is used to perform
𝑡 0 Ziegler Nichols Method.
The flow chart shown in Fig. 3 explains the summary and The transfer function of P.I.D controller (C) founded by
step by step execution of Genetic Algorithm for a given applying this technique comes out to be as shown in equation
system. Following is the procedure included for executing (13).
and realizing genetic algorithm:
𝐶 = 61.764 + ((1 + 0.12𝑠) ∗ (1 + 0.12𝑠))⁄𝑠 (13)
1. Produce starting arbitrary group of individuals of a
predefined size. From this P.I.D parameters are evaluated and are found to be

2. Then fitness of the individuals is being analyzed. KP = 14.5 ; KI = 61.8 ; KD = 0.855

3. Now, the fittest members from population are selected. The step response after using this controller is shown in Fig..4

4. Reproduction for next generations are then done by


method of probability.
5. Afterwards, carry out the crossover strategy on generated
chromosomes
6. Further, there is a need to apply mutation strategy with
less probabilistic values.
7. Finally, to find pre stated convergence condition repeat
rule 2 until final optimized solution not achieved.
Values of parameter used in evaluating Genetic Algorithm
to find optimize results in this research are given in table II.

TABLE II. G.A PARAMETERS

GA PROPERTY FUNCTION
DEFINITION

POPULATION SIZE
40
MAXIMUM GENERATIONS Figure 4. Step Response output using Z.N Method.
100
PERFORMANCE INDEX Table III shows the values of different step response
M.S.E / I.T.A.T.E
parameter related to Fig. 4.
SELECTION FUNCTION
Stochastic Uniform TABLE III. PERFORMANCE OF CLASSICAL Z-N METHOD
PROBABILITY OF SELECTION
0.05
PARAMETERS VALUES
CROSSOVER METHOD
Scattederd
Maximum Peak
ELITE COUNT Overshoot 3.64%
2
CROSSOVER FRACTION Rise Time
0.85 0.0235 secs

MUTATION METHOD Settling Time


Adaptive Feasible 3.64 secs

MIGRATION These values are further compared with results of Genetic


Both Sides
Algorithm.
ICUE 2018 on Green Energy for Sustainable Development
Thavorn Palm Beach Resort Karon, Phuket, Thailand. 24 – 26 October 2018

B. Genetic Algorithm Method b) Integral of Time Multiplied by Absolute Error (I.T.A.T.E)


In Genetic Algorithm as described in this research uses objective function.
two objective or fitness function which are I.T.A.E and Step response of D.C Motor control by using Genetic
M.S.E. The step response and their respective parameter Algorithm with (I.T.A.T.E) objective or fitness function is
values are stated as follows . discussed here. Values of PID control parameters in this case
are evaluated and have following values.
a) Mean of Squared Error (M.S.E) objective function.
KP = 11.7964 ; KI = 12.1647 ; KD = 13.5420
Step response of D.C Motor control by using Genetic
Algorithm with M.S.E as objective function is discussed. The step response after using this controller is shown in
Values of PID control parameters in this case are evaluated Fig..6.
and have following values
KP = 14.463 ; KI = 12.046 ; KD = 15.9012
The step response after using this controller is shown in Fig..5

Figure 6. Step Response output using G.A using I.T.AT.E function.


Figure 5. Step Response output using G.A using M.S.E function.
Table V describes the values of step response parameter
Table IV describes the values of step response parameter related to Fig. 6.
related to Fig. 5.
TABLE V. PERFORMANCE OF I.T.A.T.E FUNCTION
TABLE IV. PERFORMANCE OF M.S.E FUNCTION

PARAMETERS Z.N G.A G.A


PARAMETERS VALUES METHOD M.S.E I.T.A.T.E
KP 14.5 14.463 11.796
Maximum Peak KI 61.8 12.046 12.164
38.4%
Overshoot KD 0.855 15.901 12.542
Maximum Peak
Rise Time 38.4 3.64 0.408
0.141 secs Overshoot (%)
Settling Time
1.5 secs Rise Time (secs) 0.141 0.0235 0.0202

The values stated in Table IV are evaluated by M.S.E Settling Time


(secs) 1.5 3.64 0.917
function therefore it is foremost important to state here the
value of error in this control system i.e. value objective
function. The value of fitness or objective function in this Error Value 11.89 0.01883 1.7469
case is given in equation (14).
f = 1.7469 (14)
The values stated Table V are evaluated by I.T.A.T.E
This value also helps to compare the error function value function therefore it is foremost important to state here the
between two objective function used in this research. value error in this control system i.e. value objective function.
The value of fitness or objective function in this case is stated
in equation (15).
ICUE 2018 on Green Energy for Sustainable Development
Thavorn Palm Beach Resort Karon, Phuket, Thailand. 24 – 26 October 2018

f = 0.01883 (15) V. CONCLUSION


The value of error in case of I.T.A.E function comes out P.I.D controller constructed in this paper with GA has far
to be less than M.S.E function. swifter response when being compared with standard or
classical method. The classical method can be used to
Following are the main discussion points that can be generate the initial values of P.I.D parameters which then
made from the following results of this study. used to evaluate optimized parameters through G.A based
1. Comparing with Z.N Method which have maximum controller designed by using different objective functions give
overshoot in all the research simulations. Overshoot of the better results in terms of maximum overshoot and rise
any control system function is a keen parameter as it time. By analyzing the results and discussions stated in this
decides the performance of system. Overshoot ideally research, Genetic Algorithm is the finest algorithm for precise
should not be more than 5% for a stable function. position or speed control of D.C Motor.
Through G.A algorithm this is achieved and is even less
than that. REFERNCES
[1] M. Araki, “Control systems, Robotics and Automation”, Vol. II– PID
2. Similarly, G.A proves to be very good for rise time and Control, Kyoto University, Japan.
settling time. For comparison purpose all values of [2] K. D. Hwa and P.J. Ill, “Intelligent PID Controller Tuning of AVR
conventional tuning method and G.A algorithm are listed system using GA and PSO”, Springer-Verlag Berlin Heidelberg: ICIC
in Table 7. G.A due to its heuristic searching technique 2005, Part II, LNCS 3645, pp. 366- 375, 2005.
[3] K.J Astrom and T. Hagglund, “The future of PID control”, Control Eng.
found parameters that give very fast response having rise Pract. 9. 11. Pp.1163–1175. 2001.
time very less than when compared to rise time in Z.N [4] G. Ziegler and N. B. Nichols, “Optimum settings for automatic
method. controllers”, Trans. ASME, 64,759-768. 1942.
[5] K.J Astrom and T. Hagglund, “Automatic tuning of simple regulators
3. When comparing within G.A on the basis of fitness or with specifications on phase and amplitude margins”, Automatica, 20,
objective function, I.TA.T.E function better than M.S.E pp.645-651. 1984.
function. Results shows that in case of I.T.A.T.E [6] G.H Cohen and G.A Coon, “Theoretical Consideration of Retarded
function the maximum overshoot has value which is Control”, Trans ASME 75, pp.827/834. 1953.
[7] Y. Tipsuwan and M-Y. Chow “Fuzzy Logic Microcontroller
much lower than M.S.E function. Implementation for DC Motor Speed Control”, IEEE Trans. syst., pp.
4. The importance objective function in this algorithm is 1271-1276, 1999.
[8] S. P. Kumar, S. K.Veni, Y.B. Venugopal and Y. S. Kishore Babu, “A
high because mainly it finds best possible optimized Neuro-Fuzzy based Speed Control of Separately Excited DC Motor”,
parameters by minimizing the feedback error of control IEEE Transactions on Computational Intelligence and Communication
system. Here I.TA.T.E has error value stated in equation Networks, pp. 93-98, 2010.
(13) which has far much lower value when compared to [9] S.R. Kapoor, M.K. Lalwani and Shubham Tiwari, “Harmonic Analysis
objective function value of M.S.E, having its value and Reduction of Separately Excited D.C Motor, 4th International
conference “Advance Trend in Engineering, Technology and Research
shown in equation(14).
(ICATETR-2015)”, pp. 179 – 185, 2015.

TABLE VI. COMPARISION TABLE

PARAMETERS VALUES
Maximum Peak
Overshoot 0.408%

Rise Time
0.0202 secs
Settling Time
0.917 secs

View publication stats

You might also like