You are on page 1of 5

Proceedings of 2014 IEEE

International Conference on Mechatronics and Automation


August 3 - 6, Tianjin, China

Tuning of PID Controller of Synchronous


Generators Using Genetic Algorithm
1,2
Naeim Farouk Mohammed Enzhe Song Xiuzhen MA andQaisar Hayat
1
School of Power and Energy Engineering School of Power and Energy Engineering
1
Harbin Engineering University, Harbin, Heilongjiang,
China, 150001
Harbin Engineering University, Harbin,
2 Heilongjiang, China, 150001
Faculty of Engineering, Red Sea University, Port
Sudan, Sudan,
{maxiuzhen & sez2005}@hrbeu.edu.cn,
naeemgely@yahoo.com
mqhayat@yahoo.com

Abstract - Control of synchronous generators such as II. AVR SYSTEMS MODELING AND SIMULATION
automatic voltage regulators have been developed to maintain
stability and to improve damping of power systems. When an There are five models: (a) PID Controller Model, (b)
operating condition changes greatly, however, such controllers Amplifier Model, (c) Exciter Model, (d) Generator Model, and
may become less effective because of nonlinearity of the power (e) Sensor Model.
system. The mathematical model of AVR system has been Their transfer functions are described as follows:
established for control and analysis using a flexible and fast tuning
method based on genetic algorithm (GA) technique. Tuning with A. PID Controller Model:
different population size and generations number have been used The transfer function of PID controller is
to determine the optimal values of the PID controller parameters
to improve the transient response of the system. G(s) = k p + kd (s) + ki
s (1)
Index Terms –Synchronous Generator, Root locus, PID
Controller, Genetic Algorithm. B. Amplifier Model:
The transfer function of amplifier model is
I. INTRODUCTION
V R
= KA
(s) (s) (2)
One of the most important elements of electric power
system is synchronous generator, because it is the source of
V E
(s) 1+ T A (s)
electrical energy. It is normally equipped with an automatic
voltage regulator, which is responsible for keeping the track of Where the value of KA is in the range 10 to 400 and the
the generator terminal voltage all the time and under any load value of the amplifier time constant TA is in the range 0.02s to
condition, working in order to keep the voltage within 0.1s. In our simulation, KA was set to 5 and TA was set to 0.1s.
pre-established limits. Based on this, it can be said that the AVR C. Exciter Model:
also controls the reactive power generated and the power factor
of the machine once these variables are related to the generator The transfer function of exciter model is:
excitation level [1]. V (S ) K (S ) (3)
F
= E

The AVR quality influences the voltage level during steady V R


(S ) 1 + T E (S )
state operation, and also reduce the voltage oscillations during Where KE is a gain and TE is a time constant. The value of the
transient periods, affecting the overall system stability. exciter time constant is in the range 0.5s to 1s. In our simulation,
Excitation systems for synchronous generators may be KE was set to 1 and TE was set to 0.4s.
classified in the meaning of construction in two categories:
static and rotating excitation systems. Static excitation systems D. Sensor Model:
consist of thyristor or Transistor Bridge and transformer. The transfer function of sensor model is:
Energy needed for excitation is brought to generator field V S
( s)
= K R
(s) (4)
winding via slip rings with carbon brushes from diode, thyristor V T
(s) 1 + T R (s)
or Transistor Bridge and transformer [2, 3]. Where the gain KR is usually kept 1 and the time constant TR
is very small, ranging from 0.01s to 0.06s. In our simulation, KR
was set to 1 and TR was set to 0.01s.
Block diagram of the whole system is given in Figure 1.

978-1-4799-3979-4/14/$31.00 ©2014 IEEE 1544


Root Locus

40

30

20

10

Im a gina ry Ax is
0

-10

-20

-30

Fig. 1 Block diagram of AVR system -40


-40 -30 -20 -10 Real Axis 0 10 20 30

Fig. 2 Root locus of AVR with PI controller


III. SIMULATION OF THE AVR WITHOUT CONTROLLER
From these we can conclude that the system will be unstable
The open loop transfer function of the AVR is:
when closing the loop.
K K K K (5)
G(S ) H ( S ) = A E G R
k
(1 + S T )(1 + S T )(1 + S T )(1 + S T ) G(S ) H ( S ) = (7)
By expanding equation (5), we get:
A E G R
(1 + 0.1S )(1 + 0.4S )(1 + S )(1 + 0.05S )
§ 1 ·
G(S ) H (S ) = a 1 (6) 1.9¨1 + ¸
4 3 2 ҏ © 0.1S ¹ (8)
a s + b s + c s + ds + 1 =
(S + 10)(S + 2.5)(S + 1)(S + 20)
We note the system is type four:
950 S + 9500 (9)
a1 = K A K E K G K R G(S ) H (S ) = 5 4
( 3 2
)
a = T AT E T G T R s + 33.5 s + 307.5 s + 775 s + 500S
IV. FREQUENCY RESPONSE
b = T AT E (T R + T G ) + T G T R (T A + T E )
ҏ The transfer function of AVR without PID controller is
c = T A T E + T R T G + T R T G (T A + T E ) given by
d = T R +T A +T G +T E G(s) (10)
We have used values mentioned in Table 1 to obtained the 1 + G ( s) H ( s )
constants a1, a, b, c and d.
G (s) = K K K K (1 + S T )
P A E G I
(11)
Table 1, shows the constants that are used in equation (6) for S T (1 + S T )(1 + S T )(1 + S T
I A E G
)
obtain the root locus. K (12)
Table I. Root locus result H (S ) = R

Root KA KR KE KG TA 1+ ST R
locus By expanding this equation we get;
2
Witho 5 1 1 1 0.1
G( S ) H ( S ) = a s +a S +b 0 1 (13)
ut PID 5 4 3 2
a s + a s + a s + a s + a s +b
2 3 4 5 6 1
Poles
TE TG Kd Kp Ki
location
Using the same value in Table (1), the transfer function in
S=-1±j1 equation (13), we get:
0.05 0.4 1 - - Near the 2
0 .99 s + 28 .9 s + 190 (14)
G(S )H (S ) =
jw axis
(0.5 s + 16.75 s + 153 .75 s + 387 .53 s + 269 s + 190 )
5 4 3 2

There are two closed poles lies on the jw axis at ±j5 and also
two complex conjugate poles on the right half s-plane at From the equation (14) the frequency response was obtained
s=6±j10 as shown in Figure 2. by using MATLAB. The time responses are shown in Figure 3
with rise time of 1.86, settling time of 13.4, maximum
overshoot of 27.4 at peak time of 4.58 and steady state of 1

1545
Step Response
1.4
Over Shoot =27.1%

1.2

1
A m p litu d e

0.8

0.6

0.4

0.2

0
2 4 6 8 10 12 14 16 18 20
Time (sec)

Fig. 3 The step response of the AVR system without controller

V. GA-BASED PID CONTROLLER TUNING


The basic principles of GA were first proposed by Holland
[4]. Genetic algorithm is a robust optimization technique based
on natural selection. The major objective of the GA is to
determine the optimal values of the PID controller parameters to
improve the transient response of the system. To achieve this,
the algorithm considers the maximization of an objective
function. This objective function provides a means for
evaluating the performance of the PID controller with the
determined gain parameters, so that an optimized controller
would be developed by the best individual. When applied to the
PID controller design problem, the genes are the gain values of
the controller KP, KI, and KD which are to be determined. Each Fig. 4 Flow Diagram of genetic algorithm
chromosome contains a complete set of the genes needed to
define uniquely a trial solution. The fitness of each chromosome VI. GENETIC OPERATORS
is evaluated using the error criterion, which is used as the basis
of selection for the chromosomes in the next generation [5], [6], A. Selection
[7]. There are many mating techniques available to pick two
The steps involved in creating and implementing a genetic parent chromosomes to produce child chromosome.
algorithm are as follows:
1) Generate an initial, random population of individuals for B. Roulette Wheel selection
a fixed size (according to conventional methods KP, TI, TD Parents are selected according to their fitness. The better
ranges declared). chromosomes are, the more chances to be selected they have.
2) Evaluate their fitness (to minimize integral square error). Imagine a roulette wheel where are placed all chromosomes in
3) Select the fittest members of the population. the population, every have its place big accordingly to its fitness
4) Reproduce using a probabilistic method (e.g. roulette function [8].
wheel).
5) Implement crossover operation on the reproduced C. Rank Selection
chromosomes (choosing probabilistically both the crossover Rank selection first ranks the population and then every
site and the ‘mates’). chromosome receives fitness from this ranking. The worst will
6) Execute mutation operation with low probability. have fitness 1, the second worst 2 etc, and the best will have
7) Repeat step 2 until a predefined convergence criterion is fitness P (where P is the number of chromosomes in population).
met. After this all the chromosomes have a chance to be selected [9].
The summary of the process will be described in Fig.4 below D. Crossover
The crossover operator combines the features of two parents
to create new solutions. One or several crossover points are
selected at random on each parent and then, complementary
fractions from the two parents are spliced together to form a
new chromosome [10], [11], [12]
Variations in the crossover operator in the literature include
not only modifications to the operator itself but also to its
probability of occurrence.

1546
E. Mutation At first: Generation was varied from 50 to 150 with a step
After a crossover is performed, mutation takes place. This is size of 50 while population size was kept constant at 30. The
to parent falling all solutions in population into a local optimum best output response of GA-PID is shown in Fig 6.
of solved problem. Mutation changes randomly the new
offspring (children).There are many types of accomplishing
mutation (binary mutation, and real mutation). Real mutation is
used according to the following equation:
i
( 0 0
)
d = r l , u if z ≤ p , d otherwise
/ /
m i
(15)

Where
Z/ is random number.

r (L0, U0) is random number with limited range (L0, U0).

di is the value of genetic before mutation.


Fig.6 Response of PID at population size is 30 and generation is 50
d/i is the value of genetic after mutation.
The best fitness function J as shown in Fig. 7.
Pm is probability of mutation equal to (0.5% to1%).

VII. SIMULATION RESULT


Block diagram of the whole system after tuning by GA is
given in Figure 5.

Fig.7 Fitness function’s evolution


At second: Population size was varied from 20, 30 and
 50 with a step size of 10 while generation was kept constant at
Fig. 5 Block diagram of AVR system
50 and the best output response of GA-PID is shown in Fig 8.
The size of population and number of generations are the
most significant parameters of GA since they have direct
influence on the convergence of the GA to the optimal solution.
Table 2 and 3 shows the best values of Kp. Ki, Kd and J for
different size of population and generations number.

Table 2: GA’s Results with population size (S=30)


Generations Kp Ki Kd Fitness
Function (J)
50 1.4400 1.1441 0.7271 0.8557
100 1.5849 1.3801 0.7213 0.8597
150 1.6821 1.3717 0.7485 0.8685

Table 3: GA’s results with generation (G=50) Fig.8 Response of PID at generation is 50 and population size is 50
Size Kp Ki Kd Fitness
Function (J)
20 1.4734 1.9295 1.0157 0.9398
30 1.8787 1.3901 0.9266 0.9218
40 1.6558 1.4873 0.7998 0.8730
50 1.3643 1.1168 0.6467 0.8509

The best fitness function J as shown in Fig. 9.

1547
[10] Back, T., Evolutionary Algorithms in Theory and Practice, Oxford
University Press, New York, 1996.
[11] Liu Sheng, Li Gao-yun, Song Jia, Sun Tian-ying, Research on
Optimization Efficiency of Genetic Algorithms , 2nd International
Symposium on Systems and Control in Aerospace and Astronautics,
ISSCAA, 2008.
[12] Arumugam, M. S., Rao, M.V.C., Palaniappan, “New hybrid genetic
operators for real coded genetic algorithm to compute optimal control of
aclass of hybrid systems,” Applied Soft Computing Journal, 6(1), pp.
38-52, 2005.

.
Fig.9 Fitness function’s evolution
From first and second steps the best output response of
GA-PID at 50 generation and 50 population size as shown
above in Fig 8 and the best fitness function J as shown above in
Fig. 9.

VIII. CONCLUSIONS
The genetic algorithm based PID tuning provides much
better results compared to the conventional methods.
The conventional method is good for getting the initial
values of the PID tuning which needs to be modified.
In this study, genetic algorithm is used to tuning PID
parameters of AVR system with different size of population and
generations number.
The AVR is very stable after applied GA and the
overshooting was minimized because of GA-PID tuning. And
the results of the simulation show that the PID controller based
on a genetic algorithm has faster speed and stronger
adaptability.

IX. ACKNOWLEDGMENT
This work is supported by the Program for New Century
Excellent Talents in University (NCET-11-0826), National
Natural Science Foundation of China (NSFC 51279037), the
Research Project of Chinese Ministry of Education, (No
113060A).

X. REFERENCES
[1] Kirshnan R (2001), Electric motor drives modeling, analysis, and control.
Prentice Hall, Upper Saddle River, NJ.
[2] S. Chapman, “Electric Machinery Fundamentals,” McGraw-Hill, 1985.
[3] Ching-Chang Wong, Shih-An Li and Hou-Yi Wang, “Optimal PID
Controller Design for AVR System,”Tamkang Journal of Science and
Engineering, Vol. 12, No. 3, pp. 259-270, 2009.
[4] J. H. Holland (1975). Adaptation in Natural and Artificial Systems,
University Michigan Press. Ann Arbor.
[5] C. R. Houck, J. Joines. and M.Kay. A genetic algotithm for function
optimisation: A Matlab implementation. ACM Transactions on
Mathematical Software, 1996.
[6] Dounias G.Tsakonas A., and Jantzen J. Genetic Programming for the
Generation of Crisp and Fuzzy Base in Classification and Diagnosis of
Medical Data, 2001.
[7] Brindle, A.,Genetic Algorithms for Function Optimization, PhD Thesis,
University of Alberta, Edmonton (Canada), 1981.
[8] Goldberg D.E, Ā Genetic Algorithms in Search, Optimization, and
Machine Learningā, Addison-Wesley, 1989.
[9] Jain, L.C., and Jain R.K, ĀHybrid Intelligent Engineering Systemsā,
World ScientificPublishing, 1997.

1548

You might also like