Design and Optimization of Pid Controlle PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

IJRET: International Journal of Research in Engineering and Technology e-ISSN: 2319-1163 | p-ISSN: 2321-7308

DESIGN AND OPTIMIZATION OF PID CONTROLLER USING GENETIC


ALGORITHM

Gauri Mantri1, N. R. Kulkarni2


1
Assistant Professor, E & TC Department, Symbiosis Institute of Technology, India, 2HOD & Professor, Electrical
Department, P.E. Society's Modern College of Engineering, India, [email protected], [email protected]

Abstract
Natural evolution is mimicked by Genetic Algorithms (GAs) which is a stochastic global search method used for optimization. . In
missile control systems Proportional Integral Derivative (PID) control is widely used, but due to empirically selected parameters Kp,
Ki, Kd it is difficult to achieve parameter optimization. Genetic algorithm is a search algorithm that is based on natural selection and
genetics principles.GA is a computational algorithm which deals with genetics of the human body. It evolves with the number of
iterations. After ever iteration a better result is expected. These results are checked for the error. The fittest roots or solution are
considered for the next generation based on the selection criterion. GA randomly generates the initial population of the PID control
parameters according to the calculation of selection (Normalized Geometric Selection), crossover (Arithmetic Crossover) and
mutation (Uniform Mutation), thus optimizing the control parameters. Mean Square Error (MSE) value is chosen as the performance
assessment index. For a missile altitude control Proportional Integral Derivative (PID) controller using genetic algorithm is
implemented & compared with the classical method Zeigler-Nichols (Z-N) in the paper. Z-N method is classical method which tunes
the parameters of PID. The parameters of PID are difficult to tune. Tuned parameters give the optimum solution. Optimum solution
generally converges to a solution having minimum error. Minimum error gives a response of the system in terms of maximum over
shoot, Settling time, Rise time & Steady State Error. The designed PID with the Genetic Algorithm has much faster response than the
classical method.

Index Terms: Genetic Algorithm, Optimization, PID controller Zeigler-Nichols


-----------------------------------------------------------------------***-----------------------------------------------------------------------

1. INTRODUCTION parameters. The objective of this paper is to show that a


system can be optimized using genetic algorithm [1].
In today‟s world Proportional Integral Derivative (PID)
controller is widely used for an optimum solution. Optimum The following section II formulates the system model of a
solution gives a better efficiency. For obtaining the better Missile control system. The focus of section III is on
efficiency the actual output should match the set output. For conventional PID Controller, it‟s tuning by Ziegler Nichols
this purpose there is a need of a controller. Difficulty of using Method. A brief review of Genetic Algorithm Based PID
a controller is tuning of the parameters of the controller. These Controller along with its implementation is brought up in
days there are various methods which are used for the tuning section IV. In section V, simulation results of the
the parameters of PID controller. The classical methods for corresponding system are obtained and compared.
tuning the parameters of the PID controller are Ziegler Nichols
oscillation method, Ziegler Nichols reaction curve method,
2. SYSTEM MODEL
Cohen-Coon reaction curve method. But recent trends show
that there has been a drastic improvement in the tuning by The Missile control system along with a PID controller is
using the evolutionary algorithm. These are computational shown in the Fig 1. The PID controller used here is the
algorithms which gives better result after every iteration. Few continuous PID. The altitude of the missile is to be controlled
computational algorithms frequently used these days are Ant so the actual position is manipulated in such a way that the
Colony Optimization, Particle Swam Optimization, and missile is exactly on the required position. PID controller is
Genetic Algorithm etc. These are based on behavioural pattern used in series with the Steering Engine with a unity feedback
of a living being [5, 6, 7]. system. The Unity feedback system which gives a feedback of
the actual position sensed & can manipulate the position. The
An altitude of missile is to be controlled using the PID transfer function of the continuous PID controller is given by
controller. The high-tech missiles these days require a robust, equation (1). The transfer function of the steering engine is
intelligent & precise system. Ziegler Nichols oscillation given by equation (2).
method is used & compared with genetically tuned

__________________________________________________________________________________________
Volume: 02 Issue: 06 | Jun-2013, Available @ http://www.ijret.org 926
IJRET: International Journal of Research in Engineering and Technology e-ISSN: 2319-1163 | p-ISSN: 2321-7308

Kp=6.3843
Ki=281.25
Kd=0.01004

Transfer function of the compensator is given by

Gc(s)= (3)

Fig -1: Block Diagram of the Entire System

The transfer function of the PID controller is given as follows:

Gc(s) = K (1 + 1/sTi+ sTd) (1)

K is constant of proportionality
Ti is Integral time; it must be a real and positive value.
Td is Derivative time; it must be a real, finite, and nonnegative
value.

The transfer function of the Steering engine is given as


follows [1]: Fig-3: System with the compensator transfer function

Both the transfer functions which are in series are multiplied


(2) & further solved for unity feedback system. Fig 4 shows the
transfer function of the sytem with a scope as an output.
3. TUNING OF PID CONTROLLER USING
CONVENTIONAL APPROACH
3.1 Conventional Approach - Ziegler Nichols Method
A Conventional approach is used to tune the parameters of
PID. As shown in Fig 2, the parameters are obtained by using
SISO tool in MATLAB. For a system shown in Fig 1, the PID
is to be tuned .By giving a input to transfer function of the
whole system the step response is obtained in SIMULINK.

Fig-4: Block diagram with the unity feedback transfer


function

3.2 Analysis Of Conventionally Tuned PID


Controller
For the transfer function obtained a step response is applied &
the output is checked on the scope as shown in Fig 5.From the
above system the step response obtained is as follows:

Fig -2: SISO Tool Used for Tuning of Parameters Using ZN


method

Following are the values of the controller obtained from SISO


tool.

__________________________________________________________________________________________
Volume: 02 Issue: 06 | Jun-2013, Available @ http://www.ijret.org 927
IJRET: International Journal of Research in Engineering and Technology e-ISSN: 2319-1163 | p-ISSN: 2321-7308

& depending on the value it is either taken or neglected from


the population [1, 2, 3].

Given a clearly defined problem to be solved and a simple GA


works as follows [8]:
1. Start with a randomly generated population of
chromosomes i.e. candidate solutions to a problem.
Candidate Solution is the solution (values of Kp, Kd
& Ki ) after every iteration
2. Create the population size (i.e. No. of roots closer to
the required root those are Kp, Kd & Ki). The limits
of the roots (i.e. Kp, Kd & Ki) or the bounds are
specified.
3. The roots (i.e. Kp, Kd & Ki ) which are selected are
the initial values of the roots required.
4. A selection method called Normalized Geometric
Selection is applied so that any random value can be
selected. Selection is based on the fitness value of the
Fig-5: Simulation of the transfer function root.
5. Reproduce the selected roots (i.e. Kp, Kd & Ki ) so
The rise time, tr is the time taken to reach 10 to 90 % of the as to get optimized solution.
final value is about 0.047 sec. The Maximum Overshoot, Mp 6. Crossover called Arithmetic crossover & Uniform
of the system is approximately 0.75. Finally the settling time, mutation are performed so as to alter the roots to get
ts is about 0.357 sec. a optimized root (i.e. Kp, Kd & Ki)
7. Calculate the fitness ƒ(x) (using fitness function/
Table -1: Result of the Simulation performance index) of each root (i.e. Kp, Kd & Ki )
in the population.
Parameters Value 8. Repeat the following steps until „n‟ offspring have
Maximum Overshoot 0.75 been created.
Rise Time 0.047 9. Using fitness function (performance index MSE)
finds the value of the error in the generation
Settling Time 0.357
(iteration).
10. The roots having the highest fitness value are chosen.
From the analysis above, the system has not been tuned to its
11. Thus the roots obtained are the final values of Kp, Kd
optimum. In order to achieve the following parameters we go
& Ki.
for genetic algorithm approach. Table 1 illustrates the result of
12. If the obtained value are not according to the required
the simulation
ones (fitness value is not up to the mark) then go to
step 2
4. TUNING OF PID CONTROLLER USING
GENETIC ALGORITHM APPROACH Each iteration of this process is called a generation. GA is
typically iterated for anywhere from 0 to 500 or more
4.1 Overview of Genetic Algorithm generations. The entire set of generations is called a run. At
the end of a run there are often one or more highly fit
Genetic Algorithms (GAs) are a stochastic global search
chromosomes in the population. Since randomness plays a
method that mimics the process of natural evolution. It is one
large role in each run, two runs with different random−number
of the methods used for optimization. The computational
seeds will generally produce different detailed behaviours. GA
systems keep on improving & this makes GA useful for
researchers often report statistics averaged over many different
optimization. The genetic algorithm starts with no knowledge
runs of the GA on the same problem [5, 7].
of the correct solution and depends entirely on responses from
its environment and evolution operators such as reproduction,
Based on the steps flow chart for GA is as shown in Fig 6:
crossover and mutation to arrive at the best solution. By
starting at several independent points and searching in parallel,
the algorithm avoids local minima and converging to sub
optimal solutions. GA starts with an initial chromosome &
check for the fitness value. The fittest chromosomes are taken
as parents further they are reproduced, crossed over &
mutated. The offspring is checked for the value of the fitness
__________________________________________________________________________________________
Volume: 02 Issue: 06 | Jun-2013, Available @ http://www.ijret.org 928
IJRET: International Journal of Research in Engineering and Technology e-ISSN: 2319-1163 | p-ISSN: 2321-7308

Start

Create the
population size i.e
no. of roots closer to
the required root

Initialize
Generation =0

Select roots using


Normalized
Geometric Selection

Fig-7: Values of Kp, Ki & Kd over the generation


Reproduce the
population
The values of the parameters for PID controller are:
Kd = 9.5156
Kp =394.9682
Perform Arithmetic
Crossover & Ki = 395.9763
Uniform Mutation

5. ANALYSIS OF RESULT
Evaluate the Fitness
Function
The Fig 8 shows minimum error in each generation. The error
goes on reducing we get a steady state error of 0.003224 after
50 generations which remains constant further.
Check for the
Highest Fitness
Value

Obtain Kp, Kd & Ki


values

End

Fig-6: Flow chart for GA

4.2 Implementation of GA Based PID Controller


Fig-8: Minimum Error in the generation
Considering the following parameters given in Table 2 in the
genetic algorithm the values of Kp,Ki & Kd are obtained. Fig 9.shows the step response of the system with GA & Z-N
tuned PID controller. Further the values are compared &
Table-2: Parameters of GA analyzed.

GA Parameters Value/ Method


Population Size 60
Variable bounds [Kp Ki Kd] [0 400; 0 400: 0 400]
Maximum number of 100
generations
Performance Index/ Fitness Mean Square Error
function
Selection method Normalized
Geometric Selection
Crossover Method Arithmetic Crossover
Mutation method Uniform Mutation

By substituting the values in the genetic algorithm we get the


value of Kp,Ki & Kd over 100 generation as shown in Fig 7. Fig-9: Step Response of the system with GA & Z-N tuned
PID

__________________________________________________________________________________________
Volume: 02 Issue: 06 | Jun-2013, Available @ http://www.ijret.org 929
IJRET: International Journal of Research in Engineering and Technology e-ISSN: 2319-1163 | p-ISSN: 2321-7308

Following Table 3 shows the comparison of the results Japan-Egypt Conference on Electronics,
obtained from the step response of the system. The parameters Communications and Computers
considered are the Maximum Overshoot, Rise time, Settling [5]. R.Valarmathi, P.R.Theerthagiri, S.Rakeshkumar “Design
time & steady state error. Rise time, settling time & steady and Analysis of Genetic Algorithm Based Controllers for
state error shows differences. Better results are obtained using Non Linear Liquid Tank System” ISBN: 978-81-
GA than the classically tuned parameters. These results are 909042-2-3 ©2012 IEEE-International Conference On
obtained from Fig 9. Advances In Engineering, Science And Management
(ICAESM -2012) March 30, 31, 2012
Table-3: Comparison of results [6]. Rashmi A. Mahale, Prof.S.D.Chavan “ A Survey:
Evolutionary and Swarm Based Bio-Inspired
Tuning Z-N Genetic optimization Algorithm” International Journal of
Parameters Method Algorithm Scientific and Research Publications, Volume 2, Issue
12, December 2012 1 ISSN 2250-3153.
Maximum 0.997 0.990 [7]. Mohammed El-Said El-Telbany “Employing Particle
overshoot Swarm Optimizer and Genetic Algorithms for Optimal
Tuning of PID Controllers: A Comparative Study”
Rise time (sec) 0.18 0.068 ICGST-ACSE Journal, Volume 7, Issue 2, November
2007
Settling time (sec) 0.3 0.13 [8]. M. B. Anandaraju, Dr. P.S. Puttaswamy , Jaswant Singh
Rajpurohit “Genetic Algorithm: An approach to Velocity
Steady State Error 0.005 0.0001 Control of an Electric DC Motor” International Journal
of Computer Applications (0975 – 8887) Volume 26–
No.1, July.
CONCLUSIONS
The designed PID with the Genetic Algorithm has much faster BIOGRAPHIES:
response than the classical method. Classical method is good Gauri Mantri, Assistant Professor, E &
for giving the starting points of what the PID values can be. TC Department, Symbiosis Institute of
However the GA designed PID is much better in terms of the Technology, India, [email protected]
rise time & the settling time than the Z-N method. The steady
state error associated with the GA based PID is 0.0001. PID
parameters tuned by GA in this paper gives the result which is
better than the classical Z-N method.
N. R. Kulkarni, Head Of the Department
REFERENCES: & Professor, Electrical Department, P.E.
[1]. Zhu Supeng & Fu Wenxing Yang Jun Luo Jianjun Society's Modern College of Engineering,
“Applying Genetic Algorithm to Optimization India, [email protected]
Parameters of Missile Control System” 978-0-7695-
3745-0/092009 DOI 10.1109/HIS.2009.297 IEEE 2009
Ninth International Conference on Hybrid Intelligent
Systems
[2]. Neenu Thomas, Dr. P. Poongodi “Position Control of
DC Motor Using Genetic Algorithm Based PID
Controller” Proceedings of the World Congress on
Engineering 2009 Vol II WCE 2009, July 1 - 3, 2009,
London, U.K.
[3]. Mahmud Iwan Solihin, Wahyudi, M.A.S. Kamal, Ari
Legowo “Objective Function Selection of GA-Based
PID Control Optimization for Automatic Gantry Crane”
978-1-4244-1692-9/08/$25.00 ©2008 IEEE Proceedings
of the International Conference on Computer and
Communication Engineering 2008 May 13-15, 2008
Kuala Lumpur, Malaysia.
[4]. Mohamed .M. Ismail “Adaptation of PID Controller
using AI Technique for Speed Control of Isolated Steam
Turbine” 978-1-4673-0484-9/12/$31.00_c 2012 IEEE

__________________________________________________________________________________________
Volume: 02 Issue: 06 | Jun-2013, Available @ http://www.ijret.org 930

You might also like