You are on page 1of 29

Department of Electrical and Electronic Engineering

Jessore University of Science & Technology

PERFORMANCE IMPROVEMENT OF PID CONTROLLER FOR


AVR SYSTEM USING PARTICLE SWARM OPTIMIZATION

SUBIR SARKAR MD. ESTIAK KABIR

ID:111124 ID:121106

NOVEMBER, 2017
A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE
REQUIREMENTS FOR THE DEGREE OF
BACHELOR OF SCIENCE
IN

ELECTRICAL AND ELECTRONIC ENGINEERING

SUPERVISED BY:

SOURAV ROY

LECTURER

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING

JESSORE UNIVERSITY OF SCIENCE & TECHNOLOGY

ii
Abstract

A novel time-domain fitness function for determining the parameters of an optimum


proportional integral derivative (PID) controller for an automatic voltage regulator (AVR)
system using Particle Swarm Optimization (PSO) Algorithm approach is presented. An
algorithm of employing proposed approach to minimize the maximum percentage overshoot, the
rise time, the settling time, and the steady-state error of the terminal voltage of the synchronous
generator is presented. From the MATLAB simulation results, it can be settled that the proposed
approach has superior features, including fast tuning of PID parameters, stable convergence
characteristic, and good computational efficiency. The results obtained from proposed PSO-PID
controller are compared with that of estimated by genetic algorithm (GA) and PSO with different
fitness functions and is found to have better performance. The outcome of this paper would be a
boost to design robust AVR system with improved step-response.

iii
Acknowledgement

The real spirit of achieving a goal is through the way of excellence and austere discipline. I
would have never succeeded in completing my task without the cooperation , encouragement and
help provided to our by various personalities.

With deep sense of gratitude I express my sincere thanks to my esteemed and worthy supervisor
SOURAV ROY , Department of Electrical & Electronic Engineering , Jessore University of
Science & Technology, for his valuable guidance in carrying out this work under his effective
supervision, encouragement, enlightenment and cooperation. Most of the novel ideas and
solutions found in this thesis are the result of our numerous stimulating discussions. His
feedback and editorial comments were also invaluable for writing of this thesis.

iv
TABLE OF CONTENTS
ABSTRACT ..................................................................................................................................iii
ACKNOWLEDGEMENT ........................................................................................................... iv
TABLE OF CONTENTS..v
LIST OF FIGURES. vi
LIST OF TABLES...vii

CHAPTER 01: INTRODUCTION.......8


1.1 Motivation..8
1.2 Thesis objectives9
1.3 Thesis overview.9

CHAPTER 02: THERITICAL OVERVIEW...........10


2.1 PID Controller. 10
2.2 Linearized Model of an AVR System..................................................................................11
2.3 Introduction of PSO12
2.4 Introduction to Genetic Algorithm(GA)..13

CHAPTER 03: PSO METHOD.14


3.1 PSO Algorithm....................................................................................................................14
3.2 Proposed fitness function16

CHAPTER 04: SIMULATION RESULT17


4.1 AVR MODEL.......................................................................................................................17
4.2 The terminal voltage step response of this AVR system without PID controller...18
4.3 Case Study.. 19
4.4 The terminal step response of the AVR with PID controller voltage 20
4.5 Convergence Tendency of PSO-PID controller..21
4.6 Terminal voltage step response of AVR with PID for different weight factors.22
4.7 Performance Analysis.. ...23
4.8 Comparison of the performance of GA-PID and PSO-PID.....24
4.9 Terminal voltage step response with different fitness..24
4.10 Performance comparison of each function for different system25

CHAPTER 05: CONCLUSION26

v
LIST OF FIGURES
Fig. 1 Block diagram of PID based unity feedback system 10

Fig. 2 Block diagram of AVR system with PID controller 17

Fig. 3 Terminal voltage step response without PID controller 18

Fig. 4 Terminal voltage step response with PID controller 20

Fig. 5 Convergence Tendency of PSO-PID controller 21

Fig. 6 Terminal voltage step response of the AVR with PID controller for different 22
weight factors

Fig. 7 Terminal voltage step response of the AVR with GA & PSOMethod 23
(population=50, number of generation= 100).

Fig. 8 Terminal voltage step response with different fitness 24

vi
LIST OF TABLES
Table-I Transfer function of AVR components 17
Table-II Comparison of performance of GA-PID and PSO-PID 23
Table-III Performance Comparison of each function of different system 24

vii
Chapter 01

Introduction

1.1 Motivation:

Synchronous generators have a significant role in providing energy for electrical networks. Their
efficient control is crucial as they are mostly responsible for maintaining stability and security of
the power systems. An Automatic Voltage Regulator (AVR) is used in conjunction with
synchronous generator to regulate reactive power and voltage level under normal operating
conditions at various load levels. The AVR controls the terminal voltage by adjusting the exciter
voltage of the generator. During the past decades, numerous control methods such as adaptive
control, fuzzy logic and neural network have been developed to improve the efficiency of
process control in the industries. In despite of many efforts, the proportionalintegral-derivative
(PID) controller continues to be the main component for the AVR system because of its simple
structure and robust performance within a wide range of operating condition.

Though it is popular, it has been quite difficult to tune properly the gains of PID controllers
because many industrial plants are often burdened with problems such as high order, time delays,
and nonlinearities. Several methods have been developed in literatures for determining the PID
parameters. The first method is the Ziegler Nichols method. In general, it is difficult to determine
optimal PID parameters with the Ziegler-Nichols formula in many industrial plants and the
designer has to depend on his experience for obtaining the best performance. Artificial
intelligence (AI) techniques such as neural network, fuzzy system, and neural-fuzzy logic have
been used also for proper tuning. But, the artificial neural networks suffer from the convergence
time and the length of the training process. Also, the fuzzy logic systems depend on the
experience of the designer. Furthermore, evaluation and tuning of robust PID controllers have
been proposed by using a lambda tuning approach. Then, different random search methods, for
example, genetic algorithm (GA), simulated annealing (SA) and Chaotic algorithm have been
introduced to get the optimal design of the PID controller. Though the GA methods have been
implemented successfully to solve complex optimization problems, the crossover and mutation
operations are unable to ensure better fitness. This is because chromosomes in the population

8
have similar structures and their average fitness is high toward the end of the evolutionary
process.

The PSO algorithm, proposed by Kennedy and Eberhart in 1995, is another popular optimal
algorithm. It was developed through simulation of a simplified social system, and has been found
to be robust in solving continuous nonlinear optimization problems. The PSO technique can
generate a high-quality solution within shorter calculation time and stable convergence
characteristic than other stochastic methods. In 2004, Gaing presented the PSO algorithm to
optimize PID controller parameters of an AVR system. Many researchers provided many
improvement methods to improve the search performance of the PSO-PID controller where
different fitness function has been used. Unfortunately; those have the disadvantage of slow
convergence and poor performance.

1.2 Thesis Objectives:

In this thesis a new fitness function of the PSO-PID controller for high-order AVR system in
time domain is introduced to overcome the disadvantages of previous studies. Parameters of
proposed approach can yield a good step response that ensures the optimization of performance
criteria such as rise time, settling time, overshoot and steady-state error.

1.3 Thesis Overview:

This thesis has the following discussions. Section II discusses the algorithm of particle swarm
optimization and the proposed fitness function. The AVR model and the technique used in the
optimal design of PID parameters are discussed, and the results are presented in Section III. This
section also focuses on the advantages of the proposed function in comparison to the previous
similar work. Conclusively, a summary is depicted in Section IV.

9
Chapter 02

Theoretical Overview

2.1 PID Controller:

The PID controller is used to improve the dynamic response as well as to reduce or eliminate the
steady-state error. The derivative controller adds a finite zero to the open-loop plant transfer
function and improves the transient response. The integral controller adds a pole at the origin,
thus increasing system type by one and reducing the steady-state error due to a step function to
zero. The PID controller transfer function is

.(1)

Fig.1: Block diagram of PID based unity feedback system

10
2.2 Linearized Model of an AVR System :

The role of an AVR is to hold the terminal voltage magnitude of a synchronous generator at a
specified level. A simple AVR system comprises four main components, namely amplifier,
exciter, generator, and sensor. For mathematical modeling and transfer function of the four
components, these components must be linearized, which takes into account the major time
constant and ignores the saturation or other nonlinearities. The reasonable transfer function of
these components may be represented, respectively, as follows .

Amplifier model.

The amplifier model is represented by a gain KA and a time constantA ; the transfer function is

.(2)

Typical values of are in the range of 10 to 400. The amplifier time constant is very small ranging
from 0.02 to 0.1 s.

Exciter model.

The transfer function of a modern exciter may be represented by a gain KE and a single time
constant

.(3)

Typical values of are in the range of 10 to 400. The time constant is in the range of 0.5 to 1.0 s.

11
Generator model.

In the linearized model, the transfer function relating the generator terminal voltage to its field
voltage can be represented by a gain K G and a time constant

.(4)

These constants are load dependent, may vary between 0.7 to 1.0, and . between 1.0 and 2.0 s
from full load to no load.

Sensor model.

The sensor is modeled by a simple first-order transfer function, given by

.(5)

is very small, ranging from of 0.001 to 0.06.

2.3 Introduction of PSO :

In 1995, Kennedy and Eberhart first introduced the particle swarm optimization (PSO) method.
It is one of the optimization techniques and a kind of evolutionary computation technique. The
method has been found to be robust in solving problems featuring nonlinearity and non
differentiability, multiple optima, and high dimensionality through adaptation, which is derived
from the social-psychological theory. The features of the method are as follows

The method is developed from research on swarm such as fish schooling and bird flocking.
It can be easily implemented, and has stable convergence characteristic with good
computational efficiency.

Instead of using evolutionary operators to manipulate the particle (individual), like in other
evolutionary computational algorithms, each particle in PSO flies in the search space with
velocity which is dynamically adjusted according to its own flying experience and its

12
companions flying experience. Each particle is treated as a volume less particle in -dimensional
search space.

Each particle keeps track of its coordinates in the problem space, which are associated with the
best solution (evaluating value) it has achieved so far. This value is called pbest. Another best
value that is tracked by the global version of the particle swarm optimizer is the overall best
value, and its location, obtained so far by any particle in the group, is called gbest.

2.4 Introduction to Genetic Algorithm(GA) :

A genetic algorithm (GA) is a method for solving both constrained and unconstrained
optimization problems based on a natural selection process that mimics biological evolution. The
algorithm repeatedly modifies a population of individual solutions. At each step, the genetic
algorithm randomly selects individuals from the current population and uses them as parents to
produce the children for the next generation. Over successive generations, the population
"evolves" toward an optimal solution.

You can apply the genetic algorithm to solve problems that are not well suited for standard
optimization algorithms, including problems in which the objective function is discontinuous,
nondifferentiable, stochastic, or highly nonlinear.

Generates a population of points at each iteration. The best point in the population
approaches an optimal solution
Selects the next population by computation which uses random number generators.

13
Chapter 03

PSO METHOD

3.1 PSO Algorithm

A PID controller using the PSO algorithm is developed to improve the step transient response of
AVR of a generator. The PSO algorithm is used to determine three optimal controller parameters
kp, ki and kd to obtain a good step response output of the system. Each individual k contains
three members kp, ki and kd. The matrix representation of the initial population with its
dimension is n3.

The optimization method of the PSO-PID controller is shown below:

1. Specify the boundary of the three controller parameters and initialize randomly the
individuals of the population including searching points, velocities, pbests and gbest.

2. Find out the values of the four performance criteria in the time domain, namely Mp, Ess,
ts and tr.

3. Calculate the evaluation value of each individual and compare each individuals
evaluation value with its pbest. The best evaluation value among the pbest is denoted as
gbest.

4. Modify the member velocity v of each individual k according to the equation (1):

(t+1) = w, (t) + ,rand()( - (t)+ ,rand()(gbest - (t)(6)

Where,j=1,2,...,n and g=1,2,3

14
C1=C2= constant
rand() is the random number.
And w=inertia weight= - * iter ..(2)

Where is the maximum number of iterations


(generations), and iter is the current number of iterations.
5. If ( t+1 ) > then ( t+1 ) =
If ( t+1 ) < then ( t+1 ) =
6. Find the updated position of each individual k according to (3)

(t+1) = (t) + (t+1)(3)

(t+1)) +

7. This process continues and the individual that generates the latest gbest is an optimal
controller parameter.

15
3.2 Proposed fitness function

The proposed fitness function is defined as follows:

J (k) =p(Mp+e)+q(ts-tr). (4)

Where p & q are weighting factor and

.(5)

Here, e is the root-mean-square of steady-state error over the generation (n). Using the fitness
function we can control the values of Mp, tr and ts. The most important parameter in this fitness
function is e. Here, this parameter influences the other parameters to be optimum. For example,
to have a minimum e the other parameters have to be in their optimal values. i.e. We would
prefer to minimize Mp, tr and ts directly in the function and indirectly by minimizing e. Firstly,
Mp, tr and ts are initialized randomly and e as zero. Then we get a value of the fitness function
J(k). This value uses in the AVR model introduces the steady state error. But we have to make
the error zero. In each step, we take root mean square of the error and compare with the previous
one to go towards the zero. If we take average or squared value of error there is a possibility of
divergence of the error form the zero.
If we take average or squared value of error there is a possibility of divergence of the error form
the zero. It is required to modify the value of Mp, tr & ts which in turn modify the J(k). On the
other hand, J(k) specifies the output of the controller. So, the convergence or divergence of e is
strictly bound with the output performance of the PID controller. Here the divergence of error
from zero is rejected and only the convergence is taken in account. When the steady state error of
the AVR becomes zero we can consider the parameters of the PID controller optimal.

Chapter 04

16
SIMULATION RESULTS

4.1 AVR MODEL

A simple AVR system consists of four main components, viz., amplifier, exciter, generator,
and sensor. The block diagram of an AVR system with PID controller is illustrated inFigure
1. Mathematical modelling of these components needs to consider their transfer functions
linearized. The transfer function of these components and the range of the time constants and
gains of all components are given in Table I.

Fig. 2 Block Diagram of AVR system with PID controller

17
4.2 The terminal voltage step response of this AVR system without PID controller

The terminal voltage step response of this AVR system without PID controller is shown in
Figure 2. By simulating this case with the help of MATLAB, we found that Mp= 65.7%, Ess=
0.091, tr= 0.261(s), ts= 6.99(s).

Fig. 3: Terminal voltage step response without PID controller

This kind of voltage oscillation and large overshoot is unsafe for power systems stability. So,
the terminal voltage should be controlled.

18
4.3 Case Study

Consider a system with the following PSO parameters:

Population Size= 50
Number of generation= 100
w can be measured from Equation (2) with the values
Wmax= 0.9 and Wmin = 0.4
C1=C2= 2
Weight factors p= 1 & q= 0.25

Using the above parameters the simulation result that shows the best solution is [kp, ki, kd] =
[0.6478, 0.5245, 0.2388]. The terminal voltage response of the AVR system i.e. the optimum
response is presented in figure 3. This figure shows that Mp= 1.0759%, Ess= 0, tr= 0.2596(s)
and ts= 0.3933(s). This result shows that the steady state error becomes zero and the other
parameters are improved.

19
4.4 The terminal voltage step response of the AVR with PID controller

Figure 4: Terminal voltage step response with PID controller

20
4.5 Convergence Tendency of PSO-PID controller

Figure 5 represents the convergence characteristic of the PSO-PID controller. In this figure
we can see that through 10 steps, the PSO algorithm can prompt convergence and obtain good
evaluation value. This result shows that this PSO-PID controller needs less execution time
and can obtain optimal PID controller parameters quickly and efficiently.

Figure 5: Convergence Tendency of PSO-PID controller

21
4.6 Terminal voltage step response of the AVR with PID controller for different weight
factors.

Fig 6: Terminal voltage step response of the AVR with PID controller for different weight
factors

22
4.7 Performance Analysis

To observe the efficiency of the proposed PSO-PID controller, the obtained result is
compared with the GA-PID
controller. In figure 6 the terminal voltage step response of the AVR system for the two
different algorithms are shown. We can see from the figure that the PSO-PID controller has a
better step response than the GA-PID controller. Table II shows further proof of improved
performance of PSO-PID in which PSO shows better percentage overshoot, settling and rise
time than that of GA.

In order to emphasize the efficiency of proposed fitness function, we should compare the
performance of the fitness functions described in previous studies [16-18].The proposed
function shows better performance than each of the previous ones. The comparison among
the function in [16] (Let PSO1) & the function in [18] (Let PSO2) with the proposed function
(Let PSO3) is shown in Figure 8 and Table III. Both the figure and the table show that the
proposed fitness function has better performance than that of others.

Figure 7: Terminal voltage step response of the AVR with GA & PSOMethod
(population=50, number of generation= 100).

23
4.8 Comparison of the performance of GA-PID and PSO-PID

4.9 Terminal voltage step response with different fitness

Figure 8: Terminal voltage step response with different fitness

24
4.10 Performance comparison of each function for different system

The optimum result is obtained with proposed fitness function J(k) after 10 iterations. On the
other hand, the fitness function at [16] and [18] reach their optimum result after 34 and 18
iterations, respectively. The comparison result shows that the proposed fitness function can
find an optimal PID control parameters faster than the other fitness functions.

25
Chapter 05

CONCLUSION

In this thesis, a PSO algorithm with a novel fitness function are proposed to optimally design
a PID controller for the AVR system to improve the step response of terminal voltage. The
proportional gain, the integral gain, the derivative gain, and the saturation limit were chosen
to define the search space for the optimization problem. The simulation result depicts that the
proposed fitness function can let PSO algorithm find a high-quality PID control parameter set
with better computation efficiency so that the controlled AVR system has more robust
stability and can solve the searching and tuning problems of PID controller parameters more
easily and quickly than the other methods. This result regards that the proposed approach
would be a boost in raising the precision of optimization of PSO-PID controller for an AVR
system.

26
REFERENCE

[1] A. H. M. S. Ula and A. R. Hasan, Design and implementation of a personal computer


based automatic voltage regulator for a synchronous generator, IEEE Trans. Energy
Convers., vol. 7, no. 1, pp. 125131 , Mar. 1992.

[2] K. J. Astrom and T. Hagglund, The future of PID control, Control Eng. Practice, vol. 9,
no. 11, pp. 11631175, 2001.

[3] A. Visioli, Tuning of PID controllers with fuzzy logic, IEE Proc. Control Theory Appl.,
vol. 148, no. 1, pp. 18, Jan. 2001.

[4] Y. Li, K. H. Ang, and G. C. Y. Chong, PID control system analysis and design,
problems, remedies, and future directions, IEEE Control Syst. Mag., vol. 26, no. 1, pp. 32
41, 2006.

27
[5] A. Rubaai, M. J. Castro-Sitiriche, and A. R. Ofoli, Design and implementation of parallel
fuzzy PID controller for high-performance
brushless motor drives: An integrated environment for rapid control prototyping, IEEE
Trans. Ind. Appl., vol. 44, no. 4, pp. 10901098 ,
Jul.Aug. 2008.

[6] A. Rubaai and P. Young, EKF-based PI-/PD-like fuzzy-neuralnetworkcontroller for


brushless drives, IEEE Trans. Ind. Appl., vol. 47,
no. 6 , pp. 23912401, Nov.Dec. 2011.

[7] B. Lennartson and B. Kristiansson, Evaluation and tuning of robust PID controllers, IET
Control Theory Appl., vol. 3, no. 3, pp. 294302, 2009.

[8] R. A. Krohling and J. P. Rey, Design of optimal disturbance rejection PID controllers
using genetic algorithms, IEEE Trans. Evol. Comput. vol. 5, no. 1, pp. 7882, Feb. 2001.

[9] J. Zhang, J. Zhuang, H. Du, and S. Wang, Self-organizing genetic algorithm based tuning
of PID controllers, Inform. Sci., vol. 179, no. 7,pp. 10071018, Mar. 2009.

[10] Ching-Chang Wong, Shih 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.

[11] R. C. Eberhart and Y. Shi, Comparison between genetic algorithms and particle swarm
optimization, in Proc. IEEE Int. Conf. Evol. Comput. Anchorage, AK, May 1998, pp. 611
616.

[12] J. Kennedy and R. Eberhart, Particle swarm optimization, in Proc. IEEE Int. Conf.
Neural Networks, vol. IV, Perth, Australia, 1995, pp. 19421948.

[13] Y. Shi and R. Eberhart, A modified particle swarm optimizer, in Proc. IEEE Int. Conf.
Evol. Comput. Anchorage, AK, May 1998, pp. 6973.

28
[14] Y. Shi and R. C. Eberhart, Empirical study of particle swarm optimization, in Proc.
IEEE Int. Conf. Evol. Comput., Washington, DC,
July 1999, pp. 19451950.

[15] P. J. Angeline, Using selection to improve particle swarm optimization, in Proc. IEEE
Int. Conf. Evol. Comput. Anchorage, AK,
May 1998, pp. 8489.

[16] Zwe-Lee Gaing, A Particle Swarm Optimization Approach for Optimum Design of PID
Controller in AVR System, IEEETransactions on Energy Conversion, Vol. 19, No. 2,
pp.384-391, June 2004.

[17] M. L. Amer, H. H. Hassan, and Hosam. M. Youssef, Modified Evolutionary Particle


Swarm Optimization for AVR-PID tuning,
Communications and Information Technology, Systems and Signals 2008, Marathon Beach,
Attica, Greece, pp.164-173, June 2008.

[18] Mohammad Sadegh Rahimian and Kaamran Raahemifar, Optimal PID Controller
Design for AVR System using Particle Swarm Optimization Algorithm, in Proc. IEEE
Canadian Conf. on Electr. and Comput. Eng., Niagara Falls, Canada, May 2011, pp. 337-340.

[19] M. Zamani, M. K. Ghartemani, N. Sadati, M. Parniani, "Design of fractional order PID


controller for AVR using particle swarm
optimization,", Control Eng. Practice, Vol. 17, No. 12, pp. 1380-1387, Dec 2009.

[20] M.B. Bayram, H.I. Bulbul , C. Can and R. Bayindir, Matlab/GUI based basic design
principles of PID controller in AVR, in Proc. Energy and Electr. Drives, 4th Int. Conf. on
Power Eng., Istanbul, Turkey, May 2013, pp. 1017-1022.

29

You might also like