Sie sind auf Seite 1von 5

Tuning of PID Controller with Genetic Algorithm in

an AVR System
C.Ismayil, Jisma M,
Department of Electrical and Electronics Engineering
Govt. Engineering College, Thrissur
Kerala, India
( ismayilc@gmail.com)

Abstract— This paper describes a novel design method for the parameters should be optimally designed. These parameters
optimal tuning of PID controller in AVR system and the can be optimally obtained via Particle swarm Optimization
optimum parameters are determined using Genetic Algorithm (PSO) and Genetic Algorithm (GA) [8].
based technique. A performance criterion in the time domain is GA is a general purpose optimization technique which
proposed for evaluating the performance of the proposed PID uses a direct analogy of natural evolution where stronger
controller. Simulations were carried out and the performance would likely be the winners in a competing
of proposed controller and conventional controller using environment[14].The GA method is faster and hence it has
Ziegler Nichols method of tuning is compared. The results
shows a better performance for the proposed controller in
received great attention in control systems such as the search
settling time ,rise time ,steady state error and maximum of optimum PID controller parameters. Unlike traditional
overshoot. techniques, GA works on a coding of the parameters to be
optimized, rather than the parameters themselves. Also, it
Keywords— Genetic Algorithm, AVR system, PID Controller. employs search procedures based on the mechanism of
natural selection and survival of the fittest. So it can
I. INTRODUCTION converge to the global optimum solution[15]
Power system control requires a continuous balance In this paper, Genetic Algorithm based technique is used
between electrical generation and a varying load demand, for the tuning of optimal PID controller parameters of an
while maintaining system frequency and voltage levels. AVR system. A simple performance criterion in time domain
Many industrial plants are heavily influenced by the is proposed for evaluating the performance of the proposed
disturbances occurring in the power system. An Automatic PID controller that was applied to the complex control
Voltage Regulator (AVR) is used to provide constant system. The performance measure to be minimized contains
terminal voltage at generator during normal small and slow the maximum overshoot, rise time, settling time and the
changes in the load. The terminal voltage is continuously steady state error.
sensed, rectified, and smoothed. This dc signal, proportional
to V, is compared with Vref . The resulting error voltage after II. MODELLING OF AUTOMATIC VOLTAGE REGULATOR
amplification is fed to the exciter which finally delivers the
voltage v f to the generator field winding [1]-[2].Thus the The basic role of the AVR is to provide constancy of the
generator terminal voltage during normal small and slow
main objective of AVR is to control the terminal voltage by changes in the load. It consists of a comparator, amplifier,
adjusting the generator exciter voltage[1]. exciter, generator and a sensor.A linearized model of an
In literature various methods have been proposed to AVR system with PID controller is shown in Fig.1. The PID
control the AVR system [1], [2] – [5]. But the classical is used to control the AVR system.
proportional-integral-derivative controller remain the
controllers of choice to due to its simple construction and
robust performance for wide range of operating conditions.[] Vref Ve ki VR KA VF KE Vg KG Vt
kp + + kd s
Thus in a typical AVR system the voltage control loop is s 1 + TA s 1 + TE s 1 + TG s
realised using a PID controller .The most critical step in the + -
application of PID controller is the parameter tuning. In a Vt PID Controller Amplifier Exciter Generator
PID controller, each mode (proportional, integral and
derivative mode) has a gain to be tuned, giving as a result
KA
three variables involved in the tuning process.
There have been a lot of approaches to search the 1 + TA s

parameters of PID controllers.[6]-[12].The earlier method


used the classical tuning rules proposed by Ziegler and Sensor
Nichols. In general, it is often hard to determine optimal or
near optimal parameters with the Ziegler-Nichols formula in Fig.1.Block diagram of AVR system with PID controller
many industrial plants [6].Many Artificial Intelligence (AI)
techniques like neural network, fuzzy logic systems have The exciter is the main component in the AVR
been used widely for tuning the parameters [6]. In any system[2].The linearized mathematical modelling of all the
classical PID control problem, the required controller components when there is no PID controller is as follows:[2]
For the comparator we have The feed back loop consists of a sensor for continuous
Vref − Vt = Ve voltage sensing from the generator terminal.Its transfer
function can be written as
Vs ( s )
And for amplifier
KR
VR = K AVe = (4)
Vt ( s ) 1 + TR s
where K A is the amplifier gain
The above two equations yields where KR is the generator gain
VR ( s) TR is the time constant of the generator
GA = = KA
Ve ( s) The control in the above model is achieved using a PID
controller. The PID controller is used to improve the
where GA is the amplifier transfer function. But dynamic response as well as to reduce or eliminate the steady
amplifier will have a time delay that can be represented by a state error. The PID controller transfer function is
time constant TA and the transfer function can be rewritten ki
C (s) = kp + + kd s
as s (5)
V ( s) KA
GA = R = (1)
Ve ( s) 1 + sTA where
Then across the main field the exciter produces K1 k p =proportional gain constant
armature volts per ampere of field current I E , therefore w ki =integral gain constant
have k d =derivative gain constant
VF = K1iE
For voltage equilibrium at exciter III. PROBLEM FORMULATION
d
VR = ReiE + Le (iE )
dt The determination of tuning parameters of PID controller
From the above two equations we obtain in an AVR system is formulated as an optimisation problem.
The performance measure to be minimized contains the
VF ( s ) KE following objectives of PID controller,
GE = = (2) 1. Minimize steady state error ,the difference between the
VR ( s) 1 + sTE input and output of the system in the limit as time goes to
infinity
where GE is the exciter transfer function 2. Minimize the rise time ,the time required for the system
response to rise from: 10% to 90%(over damped);5% to
KE is the exciter gain 95%;0% to 100%(under damped) of the final steady state
TE is the time constant of the exciter value of the desired response.
3. Minimize the maximum overshoot, maximum overshoot
is the maximum peak value of the response curve
At generator terminal voltage equals the internal emf measured from the desired response of the system.
minus the voltage drop across the internal impedance.KVL 4. Minimize the settling time ,time required for the
to the field winding yields response to reach and stay within 2% of final value
d
VF = R f iF + L ff (iF ) In this paper, a simple performance criterion is used for
dt
evaluating the tuning parameters of PID controller. The
 L fa iF
But Vt = = niF performance measure can be formulated as:
−
2 Min W ( K ) = (1 − e )( M p + Ess ) + e −  (ts − tr )
Therefore generator transfer function can be written as where (6)
K:= [ k p , ki , kd ]
Vt ( s ) KG
= (3) M p is the maximum overshoot
VF ( s ) 1 + sTG
Ess is the steady state error
where KG is the generator gain t s is the settling time
TG is the time constant of the generator t r is the rise time and
The open loop transfer function is given by  is the weighting factor.
K A K E KG In this paper  is set in the range 0.8 to 1.5.
G ( s) =
(1 + sTA )(1 + sTE )(1 + sTG )
A. Chromosome Definition
Each individual in the genetic population represents a
IV. A BRIEF DESCRIPTION ABOUT GENETIC ALGORITHM(GA)
candidate solution. For the PID controller tuning problem,
Genetic algorithms are probabilistic search approaches the elements of the solution consist of proportional
which are founded on the ideas of evolutionary processes.
gain( K p ), integral gain( K i ), derivative gain( K d ).Each set
The GA procedure is based on the Darwinian principle of
survival of the fittest[9]. An initial population is created of solution is termed as a chromosome. A group of
containing a predefined number of individuals or solutions, chromosomes is called population. Each chromosome
each represented by a genetic string incorporating the consists of combinations of individual solutions, called genes.
variable information. Each individual has an associated Genes are normally represented in binary form. In this work,
fitness measure, typically representing an objective value. each element is coded as 8 bit unsigned binary number and
The concept that fittest individuals in a population will as such each chromosome has a bit length of 24.
produce fitter offspring is then implemented in order to
B. Fitness Function
reproduce the next population. Selected individuals are
chosen for reproduction or crossover at each generation, with The performance of each individual in the population is
an appropriate mutation factor to randomly modify the genes evaluated according to its ‘fitness’, which is defined as the
of an individual, in order to develop the new population. The non–negative figure of merit to be maximised. It is
result is another set of individuals based on the original associated directly with the objective function value.
subjects leading to subsequent populations with better Evaluation of the individual is accomplished by calculating
individual fitness. Therefore, the algorithm identifies the the performance criteria given by (6) for the problem using
individuals with the optimizing fitness values, and those with the parameter set. The result of the performance criteria
lower fitness will naturally get discarded from the calculation is used to calculate the fitness value of the
population.Fig.2. gives the flowchart of a GA[9] individual.The fitness function is the reciprocal of the
performance criteria given by (6).Hence, the minimisation of
performance criteria given by (6) is transformed to a fitness
function to be maximised as
Gen=1

1
f = (7)
Specify the parameters for GA W (K )
Where W(K) the evaluation value of each individual in
population.
Generate initial population C. Evolution of GA Population
The evolution of GA population starts from “selection”
process. The individuals from the population are selected
according to their fitness: the higher the fitness value, the
Apply GA operators(selection,
more probability to be chosen to be parents. In this paper
cross over and mutation)
Roulette wheel method is utilised. It is the most common and
easy-to-implement selection mechanism. A virtual wheel is
implemented for this selection process. Each chromosome is
Create the current population assigned a sector in this virtual wheel and the area of the
sector is proportional to their fitness value. Thus the
chromosome with largest fitness value will occupy largest
area, while the chromosome with a lower value takes the slot
Yes of a smaller sector.
Following the selection of parent population, offspring
Stop
Gen=Genmax population is generated by performing cross over and
mutation. In this paper uniform cross over is applied. The
No gene in the offspring is created by copying the corresponding
gene from one or the other parent chosen according to a
randomly generated cross over mask. When there is 1 in the
Gen=Gen+1
mask, the gene is copied from the first parent and when there
is 0, the gene is copied from the second parent. The process
is repeated with the parents exchanged to produce the second
offspring. The mutation process is then accomplished by
Fig.2.Flow chart of GA. randomly switch a bit in some offspring chromosome with a
specified probability.
D. Proposed PID Controller
V. FORMULATION OF PROPOSED PID CONTROLLER
In this paper, PID controller is developed using Genetic
algorithm.
This paper presents a PID controller for searching the
optimal or near optimal controller parameters k p , ki , k d
using genetic algorithm.
The searching procedures of the proposed PID controller
were described as below.
Step1: Specify the lower and upper bounds
of k p , ki , k d as shown in table.I.and also
specify the cross over rate , mutation rate and
elitism rate.
Step2: Create an initial population of chromosomes
randomly.
Step3: Calculate the fitness value using (7).
Step4: Perform a selection process to the current
generation.
Step5: Perform cross over operation on selected Fig.3.Step Response of an AVR system without PID
chromosomes. controller.
Step6: Apply a mutation operator.
Step7: Perform an elitism mechanism. After the simulation we found that maximum peak
Step8: Replace the current population with the new overshoot as 1.5065,steady state error as 0.1748,rise time as
population. 0.3s and settling time as=1s.
The GA parameters used for verifying the performance of
Step9: If termination criterion is reached then end the the proposed PID controller in searching the PID controller
program. Otherwise goto step3. parameters are shown in Table.III.

TABLE IIII
VI. COMPUTED RESULTS
GA PARAMETERS
Dedicated software is developed in MATLAB
programming language to implement the controller design Population size 50
based on GA.A practical higher order system shown in Fig.1. Chromosome length 24
was tested.The AVR system parameters used were tabulated Number of generations 200
in Table 1. Selection Scheme Roulette wheel
TABLE I Cross over type Uniform cross over
AVR SYSTEM PARAMETERS Cross over rate 0.6
Parameters value Mutation rate 0.01
Amplifier gain,KA 10 Elitism rate 20%
Amplifier time constant,TA 0.1s Termination criteria 200 generations
Exciter gain,KE 1 The PID controller in Fig.1. is then replaced with the GA-
Exciter time constant,TE 0.4s PID controller with the parameters obtained from the GA
Generator gain,KG 1 method.The step response of the system while using a GA-
Generator time constant,TG 1s PID and conventional PID controller using Ziegler Nichols
Sensor gain,KR 1 method for tuning is compared in Figure.4.
Sensor time constant,TR 0.01s

The lower and upper bounds of the three controller


parameters were as shown in Table II.
TABLE II
RANGE OF THREE CONTROLLER PARAMETERS

Controller Min value Max value


parameters
kp 0 1.50
ki 0 1.0
kd 0 1.0
The block diagram shown in Fig.1. is then modelled in
MATLAB Simulink.
The Fig.3. shows the original terminal voltage step
response of AVR system without a PID controller. Fig.4.Step response of an AVR system with proposed PID
controller and conventional PID controller
It is evident from the figure.4 that there is an system Stability”, 2009 6th International Multi-Conference on
improvement in the performance of the system. A noticeable Systems,Signals and Devices
reduction is observed in the maximum overshoot and [16] N.Nimpitiwan and C.Chaiyabut “Centralized Control of
settling time. Syatem Voltage/Reactive Power Using Genetic Algorithm”,
[17] C.S.HoongS Taib SIEEE,K.S Rao and I Daut,”Development of
Automatic Voltage Regulator for Synchronous
generation.”,National Power and Energy Conference,2004 Proc.
VII. CONCLUSION
[18] K. Sundareswaran and Merugu Vasu “Genetic Tuning of PI
This paper has proposed a genetic algorithm based Controller for speed control of DC motor Drive.”, Proceeding of
approach for the tuning of optimum controller parameters for IEEE International conference on Industrial technology 2000
a PID controller in an AVR system. The determination of Volume 1 of 2,p-p 521-525
tuning parameters is framed as an optimisation problem. A [19] N.Subrahmanyam,Suresh K Damodaran “Particle Swarm
performance criterion in the time domain is proposed for Optimisation for combined emission and economic dispatch
problem”
evaluating the performance of PID controller. It includes the
overshoot Mp , rise time tp , settling time ts , and steady-state
error Ess. According to the simulation results, it is seen that
the proposed PID controller performs better than the
conventional PID controller in settling time and maximum
overshoot.

VIII. REFERENCES
[1] D.Devaraj,B.Selvabala”Real-coded genetic algorithm and fuzzy
logic approach for real time tuning of proportional-integral-
derivative controller in automatic voltage regulator system”, IET
generation,Transmission & Distribution
[2] Olle.I.Elgerd”Electric Energy Systems Theory”,Tata McGraw
Hill Publishing company limited,New Delhi.
[3] C S Hoong, S Taib, K S Rao and I Daut”Development of
Automatic Voltage Regulator for Synchronous Generator”,
National Power and Energy Conference 2004 Proceedings Kuala
Lumpur,Malaysia.
[4] B.H.Kwon,J.H.Youm,J.H.Choi”Automatic voltage regulator
with fast dynamic speed”, IEE Proceedings,1999
[5]Saiful Jamaan, Md Shah Majid Mohd Wazir Mustaffa, Hasimah
aaaaaabdul Rahman”A omparative Study of PI and Fuzzy Logic
Automatic Voltage Regulator of a Micro-Alternator System”,
National Power and Energy Conference 2004 Proceedings Kuala
Lumpur,Malaysia.
[6] Zwe-Lee Gaing, “A Particle Swarm Optimization Approach for
Optimum Design of PID Controller in AVR System”,IEEE
Transactions on Energy Conversion,vol.19,No.2,June 2004 .
[7] T. L. Seng, M. B. Khalid, and R. Yusof, “Tuning of a neuro-
fuzzy controller by genetic algorithm,” IEEE Trans. Syst., Man,
Cybern. B, vol. 29, pp. 226–236, Apr. 1999.
[8] You-Bo-Wang,Xin Peng,ben Sheng Wei, “A New Particle
Swarm Optimization Based Auto Tuning of PID Controller”,Proc.
Of Inter National conf on Machine Learning and cybernatics,July
2008,p.p.no:1818-1822.
[9] Adel.A.A.El-Gammal,.Adel.A.El-Samahy,”A Modified Design
of PID controller for DC Motor Drives Using Particle Swarm
Optimisation.”, Power Engg ,2009.pp.419-422.
[10A Visioli,”Tuning of PID Controllers with Fuzzy Logic”, IEE
Proc,2001.
[11] Nelendran Pillay,Poobalan Govinder,”A Particle Swarm
Optimisation for Model Independent tuning of PID Control loops.”
[12] Renato O Krohling.Joost P Ray,”Design Of Optimal
Disturbance Rejection using PID Controllers for Genetic
Algorithm”,IEEE Trans of evolutionary
Computation,vol.5,No.1,Feb 2001.
[13] J.Bastin Solai Nazaran,P.S.Kannan, “Particle Swarm
Optimization based fuzzy controller design for SVC to enhance
power system damping”,Indian Institute of Technology Madras
[14] David E. Goldberg, “Genetic Algorithms in Search,
Optimization & Machine Learning”, Pearson Education, Edition
2003.
[15] Kahouli.A,Guesmi.T,Hadj Abdallah.H and Ouali.A. “A
Genetic Algorithm PSS and AVR Controller for Electrical Power

Das könnte Ihnen auch gefallen