You are on page 1of 73

UNIVERSITY OF NAIROBI

SCHOOL OF ENGINEERING
DEPARTMENT OF ELECTRICAL AND INFORMATION
ENGINEERING
OPTIMAL SOLUTION TO ECONOMIC LOAD DISPATCH USING
MODIFIED PARTICLE SWARM OPTIMIZATION METHOD
PROJECT INDEX: 77
BY
MUTHIANI DANSON KIMANTHI
F17/30046/2009
SUPERVISOR: DR.N.O. ABUNGU
EXAMINER: Prof. MBUTHIA
PROJECT REPORT SUBMITTED IN PARTIAL FULFILLMENT OF
THE
REQUIREMENT FOR THE AWARD OF THE DEGREE
OF
BACHELOR OF SCIENCE IN ELECTRICAL AND ELECTRONIC
ENGINEERING OF THE
UNIVERSITY OF NAIROBI 2014
DATE SUBMITTED: 28/April/2014
DECLARATION OF ORIGINALITY

NAME OF STUDENT: MUTHIANI DANSON KIMANTHI


REGISTRATION NUMBER: F17/30046/2009
COLLEGE: Architecture and Engineering
FACULTY/SCHOOL/INSTITUTE: Engineering
DEPARTMENT: Electrical and Information Engineering
COURSE NAME: Bachelor of Science in Electrical and Electronic Engineering
TITLE OF WORK: OPTIMAL SOLUTION TO ECONOMIC LOAD
DISPATCH USING MODIFIED PARTICLE SWARM OPTIMIZATION
METHOD
1) I understand what plagiarism is and I am aware of the university policy in
this regard.
2) I declare that this final year project report is my original work and has not
been submitted elsewhere for examination, award of a degree or publication.
Where other people’s work or my own work has been used, this has properly been
acknowledged and referenced in accordance with the University of Nairobi’s
requirements.
3) I have not sought or used the services of any professional agencies to
produce this work.
4) I have not allowed, and shall not allow anyone to copy my work with the
intention of passing it off as his/her own work.
5) I understand that any false claim in respect of this work shall result in
disciplinary action, in accordance with University anti-plagiarism policy

Signature:…………………………………………………………………………
Date:…………………………………………………………………………….

ii
DEDICATION

I dedicate this work to my beloved parents and brothers.

iii
CERTIFICATION

It is certified that Mr. MUTHIANI DANSON KIMANTHI REGISTRATION No.


F17/30046/2009, student at University of Nairobi, Department of Electrical and Information
Engineering, has submitted the project entitled “OPTIMAL SOLUTION TO ECONOMIC
LOAD DISPATCH USING MODIFIED PARTICLE SWARM OPTIMIZATION
METHOD’’ under my guidance towards partial fulfillment of the requirements for the award
of the undergraduate degree of BSC in Electrical and Electronic Engineering.

This is a record of project work carried out by him under my guidance and supervision. His
work is found to be outstanding and has not been done earlier.

I wish him success in all his endeavors.

Dr. N. O. ABUNGU

Electrical and Information Engineering


University of Nairobi

Signature: ……………………………………………………………

Date: ………………………………………………………………….

iv
ACKNOWLEDGEMENT

I wish to appreciate the Almighty God for His amazing grace throughout my life. His love and
guidance has propelled me to this far.

I extend my gratitude and thanks to my guides’ Dr. ABUNGU and MR. MOSES MUSAU, for
their constant support and motivation throughout the course of my project besides them being
great mentors. I am indebted to them for always being there to help me shape the problem and
provide insights towards the solution. Obviously the progress I have made now would have
been uncertain without their guidance. I also appreciate the teaching staff and non-teaching
staff at the University of Nairobi, Department of Electrical and Information Engineering for
their selfless effort that enabled be achieve my academic goals during the entire course of my
studies.

I would also like to appreciate MR. MARK MUSEMBI, RAPHAEL NYAMAI and DAMARIS
THITU for their constant encouragement and helpful discussions throughout the course of this
work. I appreciate my parents and my siblings for their love and encouragement.

v
ABSTRACT

The modern power system around the world has grown in complexity of interconnection and
power demand. The focus has shifted towards the enhanced performance, increased customer
focus, low cost, reliable and clean power. In this changed perspective, scarcity of energy
resources, increasing power generation cost, environmental concern necessitates optimal
economic dispatch. In reality power stations neither are at equal distances from load nor have
similar fuel cost functions. Hence for providing cheaper power, load has to be distributed
among the various power stations in a way which results in lowest cost of generation. Practical
economic dispatch (ED) problems have highly non-linear objective function with equality and
inequality constraints. Conventional methods such as lambda iteration method and gradient
method have been applied to solve the Economic Load Dispatch (ELD) problem. However this
techniques don’t give optimal solution because they require incremental fuel cost curves which
are piecewise linear and monotonically increasing to find the global optimal solution. Artificial
Intelligent (AI) techniques like Particle Swarm Optimization (PSO) method do give optimal
solution. PSO is applied to allocate the active power among the generating stations satisfying
the system constraints and minimizing the cost of power generated. The ELD problem is solved
for IEEE 30 bus test network with six generating units using Modified Particle Swarm
Optimization (MPSO) method. The results obtained using MPSO method are comparable with
those of Genetic Algorithm (GA) [33]. For example the fuel cost for a power demand of
600MW using MPSO is 32094.72 / while that of GA is 32098.8 / and when the
power demand is 700MW fuel cost using MPSO is 36913.20 / and that of GA is
36913.7 / .

vi
Contents
DECLARATION OF ORIGINALITY ............................................................................................... ii
DEDICATION...................................................................................................................................... iii
CERTIFICATION ............................................................................................................................... iv
ACKNOWLEDGEMENT ............................................................................................................................ v
ABSTRACT .......................................................................................................................................... vi
LIST OF FIGURES .............................................................................................................................. x
LIST OF TABLES ...................................................................................................................................... xi
LIST OF ABBREVIATION ........................................................................................................................ xii
CHAPTER.1 .......................................................................................................................................... 1
INTRODUCTION................................................................................................................................. 1
1.1 What is Economic Load Dispatch? ............................................................................................... 1
1.2 What is Economic Load Dispatch Problem? ................................................................................ 2
1.3 Solution to Economic Load Dispatch ........................................................................................... 3
1.3 Survey of Earlier Work ................................................................................................................. 4
1.3.1 Artificial Neural Networks......................................................................................................... 4
1.3.2 Simulated Annealing .................................................................................................................. 5
1.3.3 Genetic Algorithm ..................................................................................................................... 5
1.3.4 Tabu Search ............................................................................................................................... 7
1.3.5 Anti-Colony Optimization ......................................................................................................... 7
1.3.6 Particle swarm optimization method.......................................................................................... 8
1.3 Problem Statement ........................................................................................................................ 8
1.4 Objectives ..................................................................................................................................... 8
Organization of Report ....................................................................................................................... 9
CHAPTER 2 ........................................................................................................................................ 10
BACKGROUND AND LITERATURE REVIEW........................................................................... 10
2.1 Literature Review of Economic Load Dispatch .......................................................................... 10
2.2 Thermal Power Plant................................................................................................................... 10
2.3 Operating Cost of a Thermal Power Plant .................................................................................. 11
2.4 Calculation of Input-Output Characteristic Parameters .............................................................. 12
2.5 System Constraints...................................................................................................................... 12
2.5.1Equality Constraints .................................................................................................................. 13
2.5.1.1 Active power balance equation ............................................................................................. 13
2.5.2 Inequality Constraints .............................................................................................................. 13

vii
2.5.2.1 Power generator constraints .................................................................................................. 13
2.6 Optimum Load Dispatch ............................................................................................................. 15
2.7Cost Function ............................................................................................................................... 15
2.8 Particle Swarm Optimization ...................................................................................................... 16
2.8.1 Description of PSO Terminologies .......................................................................................... 17
2.8.3 Particle Swarm Parameter Selection ........................................................................................ 18
2.8.3.1 Swarm size ............................................................................................................................ 18
2.8.3.2 Iteration numbers .................................................................................................................. 18
2.8.3.3 Velocity Components............................................................................................................ 19
2.8.3.4 Acceleration coefficients....................................................................................................... 20
2.8.3.5 Selection of constriction factor or inertia constant ............................................................... 21
2.8.3.5.1Constriction Factor.............................................................................................................. 21
2.8.3.5.2 Inertia Weight .................................................................................................................... 22
2.8.3.6 The convergence criterion of PSO ........................................................................................ 23
CHAPTER 3 ........................................................................................................................................ 25
METHOGOLOGY ............................................................................................................................. 25
3.1. Formulation of Economic Load Dispatch .................................................................................. 25
3.1.1 Objective function.................................................................................................................... 25
3.1.2 Single objective problem formulation...................................................................................... 25
3.1.3 Simplified economic cost function .......................................................................................... 25
3.1.4Economic cost function with multiple fuels.............................................................................. 27
3.2 Economic Load Dispatch Neglecting Network losses ................................................................ 27
3.3Economic Load Dispatch with Network losses ........................................................................... 28
3.4 The Transmission Loss Equation ................................................................................................ 31
3.5 Formulation of PSO .................................................................................................................... 32
3.5.1 Global Best PSO ...................................................................................................................... 34
3.6 Application of PSO Method to Economic Load Dispatch .......................................................... 35
3.7 Flow Chart .................................................................................................................................. 38
CHAPTER 4 ........................................................................................................................................ 39
RESULTS AND ANALYSIS ............................................................................................................. 39
4.1 30 Bus Test Network .................................................................................................................. 39
4.2Results .......................................................................................................................................... 41
4.2.1 Case Study: Six Unit Thermal System neglecting transmission losses ................................... 41
4.3Results Analysis ........................................................................................................................... 43
CHAPTER 5 ........................................................................................................................................ 52
CONCLUSION AND RECOMMENDATIONS .............................................................................. 52

viii
5.1Conclusion ................................................................................................................................... 52
5.2Recommendations for Further Work ........................................................................................... 52
REFERENCES .................................................................................................................................... 54
APPENDIX .......................................................................................................................................... 58

ix
LIST OF FIGURES
Figure 2.1 energy conversion of thermal power plant .......................................................... 10
Figure 2.2 Input Output characteristics of generator unit ..................................................... 11
Figure 3.1Piecewise quadratic and incremental fuel cost function ....................................... 26
Figure 3.2 flow chart of PSO for implementing ELD [20]. ................................................. 38
Figure 4.1 30 bus IEEE test network with six generating units[34] ..................................... 39
Figure 4.2: Convergence Characteristics of PSO Method for 30 bus with six generating unit,
power demand 585MW ....................................................................................................... 44
Figure 4.3 Convergence Characteristics of PSO Method for 30 bus with six generating unit
System, power demand of 600MW ..................................................................................... 45
Figure 4.4 Convergence Characteristics of PSO Method for 30 bus with six generating unit
System, power demand of 700 MW..................................................................................... 46
Figure 4.5 Convergence Characteristics of PSO Method for 30 bus with six generating unit
System, power demand of 800 MW..................................................................................... 47
Figure 4.6 Convergence Characteristics of PSO Method for 30 bus with six generating unit
System, power demand of 1000 MW................................................................................... 48
Figure 4.7 Convergence Characteristics of PSO Method for 30 bus with six generating unit
System, power demand of 1200 MW................................................................................... 49
Figure 4.7 Convergence Characteristics of PSO Method for 30 bus with six generating unit
System, power demand of 1250MW.................................................................................... 50
Figure 4.8: Variation of Power loss with the Load Demand for Six unit system ................... 50
Figure 4.9: Variation of Cost with Power Demand Curve for Six unit system ...................... 51

x
LIST OF TABLES
Table 4.1 Generator cost coefficient ................................................................................... 39
Table 4.2 B-Coefficient Matrix .......................................................................................... 40
Table 4.3 PSO method parameters used in this project ....................................................... 40
Table 4.4 Optimal Scheduling of Generators of a Six-unit system by PSO Method (Loss
included case) ..................................................................................................................... 41
Table 4.5: Six unit system comparison of cost in different method, demand of 600mw....... 42
Table 4.6: Six unit system comparison of cost in different method, power demand of 700mw
........................................................................................................................................... 42
Table 4.7: Six unit system comparison of cost in different method, power demand of 800mw
........................................................................................................................................... 43

xi
LIST OF ABBREVIATIONS

ACO Anti colony optimization


AIS Artificial Immune System
ANN Artificial Nueral Network
BTU British Thermal Units
CEED Combined Emission Economic Dispatch
DE Differential Evolution
DP Differential Programming
ELD-VPL-MF Economic Load Dispatch with valve point loading effect and multiple
fuel option
ED Economic Dispatch
ELD Economic Load Dispatch
ELD-VLP Economic Load Dispatch with valve point loading effect
EP Evolution Programming
GA Genetic Algorithm
GBEST Global Best
IEEE Institute of Electrical and Electronic Engineering
LP Linear Programming
MAEED Multi-Area Emission Economic Dispatch
MIP Mixed Integer Programming
MW Mega Watts
PBEST Personal Best
PSO Particle Swarm Optimization
QP Quadratic Programming
SA Simulated annealing
TB Tabu Search
UC Unit Commitment

xii
CHAPTER.1
INTRODUCTION

A good business practice is the one in which the production cost is minimized without
sacrificing the quality of product. This is not any different in the power system sector as well.
The main aim here is to reduce the production cost while maintaining the varying load demand
at any time of the day. A power plant has to cater to load conditions all throughout the day. It
is therefore illogical to assume that the same level of power must be generated at all time. The
power generation must vary according to the load pattern, which may in turn vary with season.
Therefore the economic operation must take into account the load condition at all times.

In an early attempt the economic operation of power plant to meet the varying power demand
was decided by supplying power from the most efficient plant at light load conditions. As the
load increased, the power was supplied by the most efficient plant till the point of maximum
efficiency of this plant was reached. With further increase in load, the next most efficient plant
would supply power till its maximum efficiency is reached. In this way the power would be
supplied by the most efficient to the least efficient plant to reach the peak demand.
Unfortunately however, this method failed to minimize the total cost of electricity generation.
For instance as the load on the system varies at different times of the day, there is a considerable
period during the day when the load on the system would be much less than the peak load.
During this light load period the generating unit may be running at say fifty percent or less of
the rated output at all times under conditions best suited for its operation to give maximum
efficiency. So generating cost per unit would be high. Therefore the need arises for alternative
method which takes into account the total cost generation of all the units of a plant that is
supplying a load. [1] [2] [3]

1.1 What is Economic Load Dispatch?

Any power generating plant may be hydro, thermal, gas, nuclear or any other type. Generating
plants have different characteristics which give different generating costs at any load. Therefore
proper scheduling of plants for minimum cost of optimal operation becomes important. And

1
because the cost characteristics of each generating unit is non-linear the problem of achieving
the minimum cost becomes non-linear problem [1].

The optimal system operation, in general, involves the consideration of economy of operation,
system security, emissions at certain fossil-fuel plants, and optimal releases of water at hydro
generation, etc. All these considerations may make conflicting requirements and usually a
compromise has to be made for optimal system operation. The optimum load dispatch problem
of power generation involves the solution of two different problems. The first of these is the
Unit Commitment (UC) or pre-dispatch problem wherein it is required to select optimally out
of the available generating sources to meet the expected load and provide a specified margin
of operating reserve over a specified period time [1] [2].The second aspect of load dispatch is
the on-line Economic Dispatch(ED) wherein it is required to distribute the load among the
generating units paralleled with the system in such manner so as to minimize the total cost of
operation [1] [2] [3]. Economy dispatch is naturally predominant in determining allocation of
generation each station for various system load levels [1] [3].

1.2 What is Economic Load Dispatch Problem?

The economic load dispatch (ELD) of power generating units has always occupied an
important position in the electric power industry. ELD is a computational process where
the total required generation is distributed among the generation units in operation, by
minimizing the selected cost criterion, subject to load and operational constraints. For
any specified load condition, ELD determines the power output of each plant (and each
generating unit within the plant) which will minimize the overall cost of fuel needed to serve
the system load [1] [3] [2] [4]. ELD is used in real time energy management power system
control by most programs to allocate the total generation among the available units. ELD
focuses upon coordinating the production cost at all power plants operating on the system. In
practical power systems which are capable of feeding a bounded range of electrical load
demand, optimizing the operation costs of the generation units is very important from an
economic perspective. Hence, usually Economic Dispatch (ED) techniques are used to
determine a condition with the lowest possible generation costs. The load demand, transmission
power losses, power generating limits and generation cost coefficients are the parameters which
must be taken into account for any ED technique [1] [3] [2].

2
1.3 Solution to Economic Load Dispatch

Economic load dispatch tries to minimize the total operating cost of generating units while
satisfying system equality and inequality constraints. Therefore the main objective of the
optimization of ED problem is to reduce the total generation cost of units while satisfying
constraints [5] [6] [1] [7]. Various mathematical approaches have been suggested to solve the
multi-objective optimization of power plant such as reduction of fuel cost and minimization of
the transmission losses.

In the past decade, many efforts have been focused towards solving the ED problem,
incorporating different kinds of constraints through the various optimization techniques such
as conventional methods which include lambda iteration method, base point and participation
factor method, gradient method, Newton based method, Nonlinear programming (NLP), Linear
programming (LP) [3], Quadratic programming (QP) [3], Mixed-Integer programming (MIP)
[3].

In lambda iteration and gradient based methods, the solution to ELD is obtained by
approximately representing the cost function for individual generators in terms of single
quadratic function. These techniques require incremental fuel cost curves which are piecewise
linear and monotonically increasing to find the global optimal solution. For generators with
non-monotonically incremental cost curves, conventional methods ignores or flattens out
portions of incremental cost curve that are not continuous or monotonically increasing [8].

These limitations of conventional methods were overcome by modern meta-heuristic


approaches like Artificial Neural Networks (ANN), Genetic Algorithms (GA), Tabu Search
(TS), Simulated Annealing (SA), Particle Swarm Optimization (PSO),Ant colony optimization
(ACO),Artificial immune systems (AIS), Differential Evolution (DE), Bacterial Foraging
Algorithm (BFA), Artificial bee colony (ABC) algorithms. Though these methods are not
capable in attaining global best optimal solutions to the ELD problems, to a great extent they
produce near optimal solutions [8] [4].

3
1.3 Survey of Earlier Work

Since the cost characteristics of each generating unit is non-linear solution to ED using
conventional methods becomes a big setback as they require incremental fuel cost curves [1].
In order to overcome this problem, several alternative methods have been developed such as;
 Artificial Neural Networks (ANN),
 Genetic Algorithms (GA),
 Tabu Search (TS),
 Simulated Annealing (SA),
 Particle Swarm Optimization (PSO),
 Ant colony optimization (ACO),
 Artificial immune systems (AIS),
 Differential Evolution (DE).

1.3.1 Artificial Neural Networks

Artificial neural networks is a computational model inspired by animal central nervous system
(in particular the brain) that are capable of machine learning and pattern recognition. They are
usually presented as systems of interconnected ‘neurons’ that can compute values from inputs
by feeding information through the network. For example, in a neural network for handwriting
recognition, a set of input neurons may be activated by the pixels of an image representing a
letter or digit. The activation of the these neurons are then passed on, weighted and transformed
by some function determined by the network’s designer to other networks etc. until finally an
output neuron is activated that determines which character was read. ANN is used to solve wide
tasks that are hard to solve using ordinary rule- based programming, including computer vision
and speech recognition. Network in the term ANN refers to the interconnection between the
neurons in the different layers of each system. An example system has three layers. The first
layer has input neurons, which send data via synapses to the second layer of neurons, and then
via more synapses to the third layer of output neurons. The synapses store parameters called
‘weights’ that manipulate data in the calculation. An ANN is typically defined by three types
of parameters.one, the interconnection pattern between different layer of neurons, the learning
process for updating he weights of the interconnections, and the activation function that
converts a neuron’s weighted input to its output activation. Although ANN is widely used to

4
solve tasks which are hard it does not guarantee the function converges when far away from a
local minimum and also require large diversity of training for real world operation.

1.3.2 Simulated Annealing

Simulated Annealing is basically a stochastic optimization technique inspired by the natural


process of crystallization i.e. gradual cooling of metal. Annealing (in metallurgy & material
science) is a process involving heating and controlled cooling of a material to get perfect crystal
with minimum defects. The name and inspiration come from annealing in metallurgy, a
technique involving heating and controlled cooling of a material to increase the size of
its crystals and reduce their defects, both are attributes of the material that depend on
its thermodynamic free energy. Heating and cooling the material affects both the temperature
and the thermodynamic free energy. While the same amount of cooling brings the same amount
of decrease in temperature it will bring a bigger or smaller decrease in the thermodynamic free
energy depending on the rate that it occurs, with a slower rate producing a bigger decrease.

This notion of slow cooling is implemented in the Simulated Annealing algorithm as a slow
decrease in the probability of accepting worse solutions as it explores the solution space.
Accepting worse solutions is a fundamental property of meta-heuristics because it allows for a
more extensive search for the optimal solution. Searching for neighbors of a state is
fundamental to optimization because the final solution will come after a tour of successive
neighbors. Simple heuristics move by finding best neighbor after best neighbor and stop when
they have reached a solution which has no neighbors that are better solutions. The problem
with this approach is that the neighbors of a state are not guaranteed to contain any of the
existing better solutions which means that failure to find a better solution among them does not
guarantee that no better solution exists [4] [9].

1.3.3 Genetic Algorithm

Genetic algorithm is a search heuristic that mimics the process of natural selection. It belongs
to a group of class of evolutionary algorithms which generate solutions to optimization problem
using techniques inspired by natural evolution, such as inheritance, mutation, selection and
crossover. In GA, a population of candidate solution (called individuals, creatures,) to an

5
optimization problem is evolved toward better solution. Each candidate solution has a set of
properties (its chromosomes) which can be mutated and altered. Initially many individual
solution are randomly generated to form an initial population. The population size depends on
the nature of the problem but typically contains several hundreds or thousands of possible
solutions. During each successive generation, a proportion of the existing population is selected
to breed a new generation. Individual solution are selected through a fitness based process,
where the fitness solution (as measured by the fitness function) are typically more likely to be
selected. The fitness function is defined over the genetic representation and measure the quality
of the represented solution. The fitness function is always problem dependent .For each new
solution to be produced a pair of ‘parents’ solution is selected for breeding from the population
selected previously. By producing a new solution using methods of mutation and crossover, a
new solution is created which typically shares many of the characteristics of its ‘parents’ .New
parents are selected for each new child, and the process continues until a new population of
solutions of appropriate size is generated. These processes ultimately result in the next
generation population of chromosomes that is different from the initial generation. Generally
the average fitness will have increased by this procedure for the population, since only the best
organism from the first generation are selected for breeding, along with a small portion of less
fit solutions. These less fit solutions ensure genetic diversity within the genetic population of
the parents. This generation process is repeated until a termination condition is reached.

GA is a search technique used in computer science and engineering to find the approximate
solutions to optimization problems. GA represents a particular class of evolutionary algorithms
that uses techniques inspired by evolutionary biology such as inheritance, mutation, natural
selection, and recombination (or crossover). While it can rapidly locate good solutions, even
for difficult search spaces, it has some disadvantages associated with it: 1) unless the fitness
function is defined properly, GA may have a tendency to converge towards local optima rather
than the global optimum of the problem; 2) operating on dynamic data sets is difficult; and 3)
for specific optimization problems, and given the same amount of computation time, simpler
optimization algorithms may find better solutions than GAs [10] [11] [12].

6
1.3.4 Tabu Search

Tabu search, created by Fred W. Glover in 1986 and formalized in 1989, is a meta-
heuristic search method employing local search methods used for mathematical optimization.
Local (neighborhood) searches take a potential solution to a problem and check its immediate
neighbors (that is, solutions that are similar except for one or two minor details) in the hope of
finding an improved solution. Local search methods have a tendency to become stuck in
suboptimal regions or on plateaus where many solutions are equally fit. Tabu search enhances
the performance of these techniques by using memory structures that describe the visited
solutions or user-provided sets of rules. If a potential solution has been previously visited
within a certain short-term period or if it has violated a rule, it is marked as "Tabu" (forbidden)
so that the algorithm does not consider that possibility repeatedly .Current applications of TS
span the areas of resource planning, telecommunications, VLSI design, financial analysis,
scheduling, space planning, energy distribution, molecular engineering, logistics, pattern
classification, flexible manufacturing, waste management, mineral exploration, biomedical
analysis, environmental conservation and scores of others.

1.3.5 Ant Colony Optimization

The Anti-Colony Optimization (ACO) algorithm is a probabilistic technique for solving


computational problems which can be reduced to finding good path through graphs. It was
proposed by Marco Dorigo in1992 in his PhD thesis, in which algorithm was aiming to search
for an optimal path in a graph, based on the behavior of ants seeking a path between their
colony and a source of food. In the natural world, ants wander randomly, and upon finding
food return to their colony while laying down pheromone trails. If the ants find such a path,
they are likely not to keep travelling at random, but to instead follow the trail, returning and
reinforcing it if they eventually find food.

Over time, however, the pheromone trail starts to evaporate, thus reducing its attractive
strength. The more time it takes for an ant to travel down the path and back again, the more
time the pheromones have to evaporate. A short path, by comparison, gets marched over more
frequently, and thus the pheromone density becomes higher on shorter paths than longer ones.
Pheromone evaporation also has the advantage of avoiding the convergence to a locally optimal
solution. If there were no evaporation at all, the paths chosen by the first ants would tend to be

7
excessively attractive to the following ones. In that case, the exploration of the solution space
would be constrained.

Thus, when one ant finds a good (i.e. short) path from the colony to a food source, other ants
are more likely to follow that path, and positive feedback eventually leads to all the ants'
following a single path. The idea of the ant colony algorithm is to mimic this behavior with
"simulated ants" walking around the graph representing the problem to solve.

For some versions of the algorithm, it is possible to prove that it is convergent (i.e., it is able to
find the global optimum in finite time). The first evidence of a convergence ant colony
algorithm was made in 2000, the graph-based ant system algorithm, and then algorithms for
ACS. Like most meta-heuristics, it is very difficult to estimate the theoretical speed of
convergence.

1.3.6 Particle swarm optimization method

Particle Swarm Optimization (PSO) method was first introduced by Dr. Kennedy and Dr.
Eberhart is a flexible, robust, population based algorithm. This method solves a variety of
power systems problems due to its simplicity, superior convergence characteristics and high
solution quality. PSO has been covered in details in section 2.8.

1.3 Problem Statement

The main goal of this project is to understand economic operation of power system and come
up with an effective and reliable Particle Swarm Optimization method (PSO) to solve the
Economic Load Dispatch Problem. The operation and operators of PSO method are to be
understood in detail and be used to write a software program in MATLAB programming
software package to solve the Economic Load Dispatch (ELD) problem. The effectiveness of
PSO is verified on an IEEE 30 bus, with 6 unit generating system, to give an optimal solution.

1.4 Objectives

The objectives of carrying out this project can be stated as;

 To find solution of economic load dispatch problem so that the total fuel cost is
minimized while satisfying the power system constraints

8
 To understand Particle Swarm Optimization method and use it to find the optimal
solution for ED of a 30 bus lossy system and 30 bus lossless system

Organization of Report

In Chapter 1 the definition of ELD and various methods which have been employed to solve
the ELD problem have been discussed. It also covers the problem statement, objective of the
project and the simulation method which will be used to solve the ELD problem.

Chapter 2 discusses review of economic load dispatch and PSO method. PSO concept is
explained, its benefits over conventional methods are briefed. Basic parameters of PSO are
looked at in order to understand how the swarm searches food.

In Chapter 3, Economic load dispatch problem formulation for the case without losses and
with losses are discussed. Formulation of PSO and its implementation to solve the Economic
load dispatch and Flow chart are also covered.

In Chapter4, One line diagram of IEEE 30 bus test network and its data, simulation results
obtained from programming in MATLAB are analyzed and tabled. The results obtained using
PSO are compared GA to show the effectiveness of PSO in solving ELD problem.

9
CHAPTER 2
BACKGROUND AND LITERATURE REVIEW

2.1 Literature Review of Economic Load Dispatch

Economic Load Dispatch (ELD) can be defined as the process of allocating generation levels
to the generating units, so that the system load is supplied entirely and most economically [1]
[4] [9] [13] [5] [14]. That is to determine the generations of different plants such that the total
operating cost is minimum, and at the same time the total demand and the losses at
any instant are met by the total generation. For an interconnected system, it is necessary to
minimize the expenses. The economic load dispatch is used to define the production level of
each plant, so that the total cost of generation and transmission is minimum for a prescribed
schedule of load. The method of economic load dispatch for generating units at different loads
must have total fuel cost at the minimum cost [15] [13] [11].

2.2 Thermal Power Plant

A thermal power plant is a power plant in which its prime-mover is driven by steam. Water is
the working fluid. It is heated at the boiler and circulated with energy to be expanded at the
steam turbine to give work to the rotor shaft of the generator. After it passes through the turbine,
it is condensed in a condenser and then pumped to feed the boiler where it is heated up. For
simplification, thermal power plants can be modelled as a transfer function of energy
conversion from fossil fuel to electricity as described in Fig. (2.1) [16] [3].

Steam
Boiler Generator
Turbine

Figure 1 2.2 energy conversion of thermal power plant

10
The thermal unit system generally consists of the boiler, the steam turbine, and the generator.
The input of the boiler is fuel, and the output is the volume of steam. The relationship of the
input and output can be expressed as a convex curve. The input of the turbine-generator unit is
the volume of steam and the output is electrical power, the overall input-output characteristic
of the whole generation unit can be obtained by combining directly the input-output
characteristic of the boiler and the input-output characteristic of the turbine-generator unit. It
is a convex curve [3] [11].

2.3 Operating Cost of a Thermal Power Plant

The factors influencing power generation are operating efficiencies of generators, fuel cost and
transmission losses. The total cost of generation is a function of the individual generation of
the sources which can take values within certain constraints. The problem is to determine the
generation of different plants such that total operating cost is minimum. The input to the
thermal plant is generally measured in / and the output power is the active power in
MW. A simplified input-output curve of a thermal unit known as heat-rate curve.
)
Fuel Cost ($/

PMIN PMAX

Output power in Megawatts


Figure 2.2 Input Output characteristics of generator unit
In all practical cases, the fuel cost of any generator unit ‘I’ can be represented as a quadratic
function of the real power generation [4] [17] [9] [18] [10] [5] [19].

11
( )= + + (2.1)

: cost function of generating unit;


, , = Cost coefficients of generator ;
= Power of generator ;
N = Number of generators.

The incremental fuel-cost curve is a measure of how costly it will be to produce the next
increment of power [1] [2] [3].

= + (2.2)

2.4 Calculation of Input-Output Characteristic Parameters

The parameters of the input-output characteristic of any generating unit can be determined by
the following approaches;

 Based on the experiments of the generating unit efficiency.


 Based on the historic records of the generating unit operation.
 Based on the design data of the generating unit provided by manufacturer.

In the Practical power systems, we can easily obtain the fuel statistics data and power
output statistics data. Through analyzing and computing data set ( ), we can determine the
shape of the input-output characteristic and the corresponding parameters [3] [11].

2.5 System Constraints

Broadly speaking there are two types of system constraints;

1. Equality constraints
2. Inequality constraints

12
2.5.1Equality Constraints

2.5.1.1 Active power balance equation

For power balance equation, equality constraints should be satisfied. The total generated power
should be the same as total load demand plus the total line loss [4] [17] [5] [20].

∑ = + (2.3)

Where , the total system demand and is the total system loss. To calculate system
losses, Method based on constant loss formula coefficient or B coefficient are used. The
transmission loss equation expressed as [1] [3] [2] [19] [12].

=∑ ∑ +∑ + (2.4)

The B terms are called loss coefficients or B-coefficients. The units of the loss coefficients are
reciprocal megawatts when the power generated to are expressed in megawatts, in
which will be in megawatts also. The units of match those of while is
dimensionless.

For the system for which they are derived B-coefficients yield the exact loss only for the
particular load and operating conditions used in the derivation. Hence the constant values for
the loss coefficients yields reasonably accurate results when the coefficients are calculated for
some average operating conditions. [1] [2] [3].

2.5.2 Inequality Constraints

2.5.2.1 Power generator constraints

Generator output of each generator should be laid between maximum and minimum limits. The
corresponding inequality constraints for each generator are [21] [9] [17] [7];

13
< < . (2.5)

Where and are the minimum and maximum output of generator

2.5.2.2 Reservoir storage limits

< < (2.6)

Where , X, are the minimum value of reservoir storage, maximum value of


reservoir storage, reservoir storage at the starting of time horizon, reservoir storage at end of
time horizon respectively.

2.5.2.3 Generator ramp rate limits

One of the impractical assumption has taken in conventional economic dispatch problem is that
the adjustment of power output are instantaneous. But in practical circumstances ramp rate
limit restricts the operation of all online units. The generation may decrease or increase within
corresponding range so that the units are constrained due to the ramp rate limits as below [4]
[17];

_ ≤U
(2.7)
- ≤D
To incorporate the ramp rate constraints in the real power output limits the real power outputs
are modified as follows;

= ( , − )
(2.8)

= ( , − )

Where U , D are the upward and downward ramp rate limit of generator.

14
2.5.2.4 Transmission line flow constraints

≤ (2.9)
Where the real power of line K and F is the number of transmission lines and

the maximum loading capacity of the line.

2.5.2.5 Running Spare Capacity Constraints

These constraints are required to meet;


a) The forced outages of one or more alternators on the system.
b) The unexpected load on the system.

2.6 Optimum Load Dispatch

The optimum load dispatch problem of power generation involves the solution of two different
problems. The first of these is the Unit Commitment (UC) or pre dispatch problem wherein it
is required to select optimally out of the available generating sources to meet the expected load
and provide a specified margin of operating reserve over a specified period time[1][2] .The
second aspect of load dispatch is the on-line Economic Dispatch (ED) wherein it is required to
distribute the load among the generating units paralleled with the system in such manner so as
to minimize the total cost of operation. Economy dispatch is naturally predominant in
determining allocation of generation each station for various system load levels [1] [3] [2].

2.7 Cost Function

Let represent the cost, expressed in Rs per hour, of producing energy in the ℎ generator.

FT=∑ Rs per hrs. The generated real power has a major influence on the cost
function. The individual real power generation can be raised by increasing the prime mover
torque which requires an increased expenditure of fuel. The reactive generations do not

15
have any significant influence on because they are controlled by controlling the field
excitation. The individual production cost of generator units is therefore for all practical
purposes considered a function only of and for the overall production cost FT, we thus have
[7] [22] [2] [9] [8] .

FT= ∑ ( ) (2.10)

2.8 Particle Swarm Optimization

PSO is a biologically inspired computational search and optimization technique developed by


Eberhart and Kennedy, in 1995, which was inspired by the social behavior of bird flocking and
fish schooling in search of food without a leader [8] [4] [23] [13]. PSO has its roots in artificial
life and social psychology, as well as in engineering and computer science. It utilizes a
“population” of particles that fly through the problem hyperspace with given velocities. At each
iteration, the velocities of the individual particles are stochastically adjusted according to the
historical best position for the particle itself and the neighbourhood best position. Both the
particle best and the neighbourhood best are derived according to a user defined fitness
function. The movement of each particle naturally evolves to an optimal or near-optimal
solution. The word “swarm” comes from the irregular movements of the particles in the
problem space, now more similar to a swarm of mosquitoes rather than a flock of birds or a
school of fish [11].

Most of the conventional computing algorithms are not effective in solving real-world
problems because of having an inflexible structure mainly due to incomplete or noisy data and
some multidimensional problems. Artificial intelligent computing methods are best suited for
solving such problems. PSO is a computational intelligence-based technique that is not largely
affected by the size and nonlinearity of the problem, and can converge to the optimal solution
in many problems where most analytical methods fail to converge. It can, therefore, be
effectively applied to different optimization problems in power systems. A number of papers
have been published in the past few years that focus on this issue. Moreover, PSO has some
advantages over other similar optimization techniques such as GA, namely the following.
 PSO is easier to implement and there are fewer parameters to adjust.

16
 In PSO, every particle remembers its own previous best value as well as the
neighborhood best; therefore, it has a more effective memory capability than the GA.
 PSO is more efficient in maintaining the diversity of the swarm (more similar to the
ideal social interaction in a community), since all the particles use the information
related to the most successful particle in order to improve themselves, whereas in GA,
the worse solutions are discarded and only the good ones are saved; therefore, in GA
the population revolves around a subset of the best individuals [24] [25] [24].

2.8.1 Description of PSO Terminologies

Particle (X): It is a candidate solution represented by an m-dimensional vector, where m is


the number of optimized parameters. At time t, the ℎ particle ( ) can be described as ( )
=[ ( ) 2( ) … ( )], where X are the optimized parameters and ( ) is the position of
the ℎ particle with respect to the ℎ dimension; i.e. the value of the ℎ optimized parameter
in the ℎ candidate solution.

Population: Pop (t): It is a set of n particle at time , i.e. Pop (t) =[ ( ), ( )… ( )]

Swarm: It is an apparently disorganized population of moving particles that tend to cluster


together towards a common optimum while each particle seems to be moving in a random
direction. A large number of particles may reduce the number of iteration needed to obtain a
good optimization result. In contrast, huge amount of particles increases the computational
complexity per iteration and more time consuming. From a number of empirical studies, it has
been shown that most of the PSO implementation use an interval of between (20, 60) for the
swarm size.

Personal best (Pbest): The personal best position associated with ℎ particle is the best
position that the particle has visited yielding the highest fitness value for that particle.

Global best (Gbest): The best position associated with ℎ particle that any particle in the
swarm has visited yielding the highest fitness value for that particle. This represents the best
fitness of all the particles of a swarm at any point of time. The optimization process uses a
number of particles constituting a swarm that moves around a pre-defined search space looking
for the best solution. Each particle is treated as a point in the D-dimensional space in which the

17
particle adjusts its “flying” according to its own flying experience as well as the flying
experience of other neighbouring particles of the swarm. Each particle keeps track of its
coordinates in the pre-defined space which are associated with the best solution (fitness) that it
has achieved so far. This value is called . Another best value that is tracked by the PSO
is the best value obtained so far by any particle in the whole swarm. This value is called .
The concept consists of changing the velocity of each particle toward its pbest and the gbest
position at the end of every iteration. Each particle tries to modify its current position and
velocity according to the distance between its current position and pbest, and the distance
between its current position and gbest [24].

2.8.3 Particle Swarm Parameter Selection

There are some parameters in PSO algorithm that may affect its performance. For any given
optimization problem, some of these parameter’s values and choices have large impact on the
efficiency of the PSO method, and other parameters have small or no effect [9]. The basic PSO
parameters are swarm size or number of particles, number of iterations, velocity components,
and acceleration coefficients. In addition, PSO is also influenced by inertia weight, velocity
clamping, and velocity constriction [26].

2.8.3.1 Swarm size

Swarm size or population size is the number of particles in the swarm. A big swarm generates
larger parts of the search space to be covered per iteration. A large number of particle may
reduce the number of iterations needed to obtain a good optimization result. In contrast, huge
amounts of particles increase the computational complexity per iteration, and more time
consuming [26].

2.8.3.2 Iteration numbers

The number of iterations to obtain a good result is also problem-dependent. A too low number
of iterations may stop the search process prematurely, while too large iterations has the
consequence of unnecessary added computational complexity and more time needed [26].

18
2.8.3.3 Velocity Components

The velocity components are very important for updating particle’s velocity. There are three
terms of the particle’s velocity [24]:

 The term provides a memory of the previous flight direction. This component

represents as a momentum which prevents to drastically change the direction of the


particles and to bias towards the current direction.
 The term ( , - ) is called cognitive component which measures the
performance of the particles relative to past performances. This component looks like
an individual memory of the position that was the best for the particle. The effect of the
cognitive component represents the tendency of individuals to return to positions that
satisfied them most in the past.
 The term ( - ) global best PSO or for local best PSO is called social
component which measures the performance of the particles relative to a group of
particles or neighbors. The social component’s effect is that each particle flies towards
the best position found by the particle’s neighbourhood.

2.8.3.4 Selection of maximum velocity

At each iteration step, the algorithm proceeds by adjusting the velocity that each particle moves
in every dimension of the problem hyperspace. The velocity of the particle is a stochastic
variable and is, therefore, subject to creating an uncontrolled trajectory, making the particle
follow wider cycles in the problem space. In order to damp these oscillations, upper and lower
limits can be defined for the velocity ;

If > then =
Else if <− then =− (2.11)

19
Most of the time, the value for is selected empirically, according to the characteristics
of the problem. It is important to note that if the value of this parameter is too high, then the

particles may move erratically, going beyond a good solution. On the other hand, if is
too small, then the particle’s movement is limited and the optimal solution may not be reached.

A dynamically changing has been found to improve the performance of the PSO
algorithm and in order to ensure uniform velocity throughout all dimensions the maximum
velocity is given by [21].

=( − )/ (2.11)

Where N is the number of intervals in the ℎ dimension selected by the user

and , are maximum and minimum values found so far by the particles.

2.8.3.4 Acceleration coefficients

The acceleration coefficients , together with the random values ,


maintain the stochastic influence of the cognitive and social components of the particle’s
velocity respectively. The constant expresses how much confidence a particle has in itself,
while expresses how much confidence a particle has in its neighbors. There are some properties

of and :

 When = = 0, then all particles continue flying at their current speed until
they hit the search space’s boundary. The velocity update equation is calculated as;

= . (2.13)

 When >1 = 0 , all particles are independent. The velocity update


equation will be ;

= + ( , - ) (2.14)

20
 On the contrary, when =0 > 1, all particles are attracted to a single point
in the entire swarm and the update velocity will become;

= + ( - ) (2.15)

 When = , all particles are attracted towards the average of ,


and .

 When ≫ , each particle is more strongly influenced by its personal best


position, resulting in excessive wandering. In contrast, when ≫ then all
particles are much more influenced by the global best position, which causes all
particles to run prematurely to the optima [21] [20].

Normally, and are static, with their optimized values being found empirically. Wrong
initialization of and may result in divergent or cyclic behavior. From the different
empirical researches, it has been proposed that the two acceleration constants should be;

= = 2.

2.8.3.5 Selection of constriction factor or inertia constant

Empirical studies performed on PSO indicate that even when the maximum velocity and
acceleration constants are correctly defined, the particles may still diverge, i.e., go to infinity;
a phenomena known as “explosion” of the swarm. Constriction factor and inertia weight are
used in the PSO algorithm in order to control the explosion.

2.8.3.5.1 Constriction Factor

This method controls “explosion” of the swarm by introducing a constriction coefficient to the
velocity update equation as shown in equation (2.22).

( )= ( )+ (t) (2.16)

21
= + ( , - )+ ( - ) (2.17)

Where;

= , + = > 4.0 (2.18)


| |

Typically is set to 4.1 and the constant is thus 0.729. This results in the previous velocity
being multiplied by 0.729 and each of the two ( − ) terms being multiplied by 1.49445 i.e.
(2.05*0.729).

In general, the constriction factor improves the convergence of the particle over time by
damping the oscillations once the particle is focused on the best point in an optimal region. The
main disadvantage of this method is that the particles may follow wider cycles and may not

converge when the individual best performance is far from the neighborhood’s best

performance .

2.8.3.5.2 Inertia Weight

The inertia weight is multiplied with the velocity × which plays the duty of inertia
part. The task of this part is ensuring that the particles move in the same direction. The inertia
weight has great effect on acceleration of particles on their original path. This parameter can
be interpreted as an inertia constant , which results in the modified equation for the velocity
of the particle.

( )= ( )+ (t) (2.19)

= + ( , - )+ ( - ) (2.20)

W= − *Iter (2.21)

22
Where w is the inertia weight factor

= The maximum value weight factor


= The minimum value of weight factor
= The maximum iteration number
= Current iteration number

The inertia constant can be either implemented as a fixed value or can be dynamically changing.
Essentially, this parameter controls the exploration of the search space, therefore an initially
higher value (typically 0.9) allows the particles to move freely in order to find the global
optimum neighborhood fast. Once the optimal region is found, the value of the inertia weight
can be decreased (usually to 0.4) in order to narrow the search, shifting from an exploratory
mode to an exploitative mode. A linear decreasing inertia weight has produced good results in
many applications; however, the main disadvantage of this method is that once the inertia
weight is decreased, the swarm loses its ability to search new areas because it is not able to
recover its exploration mode.

2.8.3.6 The convergence criterion of PSO

Generally, the definition of convergence is that a system or process reaches a stable state. For
the population-based optimization algorithm, the convergence of algorithm can be defined in
terms of either individual or the whole swarm. Van den Bergh gave the convergence definition
of PSO in [10], stated as follows.

Definition 1.Given a particle position x (t) and an arbitrary position P in search space, the
convergence is defined as,

Lim x (t) = P
T ∞

This definition implies that the convergence of particles is that the particle ultimately stops at
a certain position P in search space. By analyzing the trajectories of particles, Van den Bergh
concludes that all the particles are convergent to the positions of the global best solutions. This

23
conclusion is of significance, since it reveals an important feature of PSO, i.e., gbest is the
attractor of the whole swarm. If all the particles achieve the convergence, the swarm does not
change any more, which is the stable state. Thus, it can be stated that the PSO algorithm has
achieved convergence. Accordingly, gbest will not change.

Definition 2.Given that the best position of PSO in time t or in tth generation is gbest (t),
gbest* is a fixed position in search space, the convergence definition is written as,

Lim ( )= ( )
T ∞

This definition implies that, if gbest output by PSO does not change any more, then
convergence is achieved. If the gbest is the global best solution, then the algorithm attains the
global best convergence. Otherwise, the algorithm is stuck in local optima [24] [27]

24
CHAPTER 3

METHOGOLOGY

3.1. Formulation of Economic Load Dispatch


The formulation of practical ED problem is a judicious process therefore it can be formulated
in various kinds. It can be formulated as a single objective and or as a multi-objective problem
which are nonlinear and non-convex in nature. Single objective problem can be formulated as
Economic Load Dispatch (ELD) without valve point loading effect, ELD with valve point
loading effect (ECD-VLP), ECD with valve point loading effect and multiple fuel option
(ECD-VPL-MF). Multi-objective formulation includes combined emission economic dispatch
CEED, multi-area emission economic dispatch MAEED, power generation under different
utilities and maximization of generated [4] [17] [9] [13].

3.1.1 Objective function

The primary objective of the Economic Dispatch Problems (EDPs) of electric power generation
is to schedule the committed generating units outputs so as to meet the required load demand
at minimum operating cost while satisfying all units and system equality and inequality
constraints [1] [2] [3] [12].

3.1.2 Single objective problem formulation

Single objective ED problem can be formulated as fuel cost function or emission of greenhouse
gases as an objective function. The fuel cost and emission of greenhouse gases mathematically
can be represented as a quadratic polynomial of generated power. To get more practical results,
fuel cost function modified with the inclusion of valve point loading effect and multiple fuel
options.

3.1.3 Simplified economic cost function

Simplified economic dispatch problem can be represented as a quadratic fuel cost objective
function as described in Eq. (3.1) [9] [5] [15] [14]

25
Min FT= ∑ ( ) (3.1)

Subject to ∑ = +

And < <

The fuel input-power output cost function of the unit is given as;

( )= + + (3.2)

Where FT: total generating cost;


: cost function of ℎ generating unit;
, , : Cost coefficients of generator ℎ;
: Power of generator ℎ;
N: number of generators.
$/MW

Cost 2 Cost 3
Cost1

PMIN P1 P2 PMAX

Figure 3.1Piecewise quadratic and incremental fuel cost function

26
3.1.4 Economic cost function with multiple fuels

The different type of fuels can be used in thermal generating unit, hence fuel cost objective
function can be represented with piecewise quadratic function reflecting the effect of fuel type
changes.

( )= + + if ≤ ≤

+ + if ≤ ≤

+ + if ≤ ≤ (3.3)

3.2 Economic Load Dispatch Neglecting Network losses

Neglecting the constraints of power output the equal incremental principle is used for a system
with thermal -generating units. Given that the input-output characteristics of generating
units are ( ) ( ) … ( ), the total system load is . The problem is to
minimize total fuel consumption subject to the constraint that the sum of the power generated
must equal the received load [1] [3] [2].

F= ( )+) ( ) +…+ ( )= ∑ ( ) (3.4)

Such that

∑ = (3.5)

This is a constrained optimization problem, and it has been proposed to be solved by the
Lagrange multiplier method. The Lagrange function is formed by adding the constraint
function to the objective function after the constraint function has been multiplied by an
undetermined multiplier [4] [2] [1].

Min F=f +λ( −∑ ) (3.6)

27
Where λ is the Lagrange multiplier.
The necessary conditions for the extreme value of the Lagrange function are to set the first
derivative of the Lagrange function with respect to each of the independent variables equal to
zero [1] [2] [3].

= − =0 = 1,2, … , (3.7)

Or

= = 1,2, … , (3.8)

Since the fuel consumption function of each generating unit is only related to its own power
output equation (3.7) can be written as: [1] [2] [3]

= = 1,2, … , (3.9)

Or

= =⋯= = (3.10)

Therefore the incremental fuel cost will be given by;

λ= = + (3.11)

3.3 Economic Load Dispatch with Network losses

In determining the economic distribution of load between plants, we encounter the need to
consider losses in the transmission lines. Although the incremental fuel cost at one plant bus
may be lower than that of another plant for a given distribution of load between the plants, the
plant with the lower incremental cost at its bus may be much farther from the load center .The

28
losses in transmission from the plant having the lower incremental cost may be so great that
economy may dictate lowering the load at the plant with the lower incremental cost and
increasing it at the plant with the higher incremental cost. Thus, we need to coordinate
transmission loss into the scheduling of the output of each plant for maximum economy at a
given level of system load. For a system with N generating units let [1] [2] [3];

F= ( )+) ( ) +… ( )= ∑ (3.12)

Where F is the cost function giving the total cost of all the fuel for the, entire system and is the
sum of the fuel costs of the individual units , ,…, .The total megawatt power input to
the network from all the units is the sum [1] [2] [3].

+ +⋯ =∑ (3.13)

Where … are the individual outputs of the units injected into the network. The
total fuel cost of the system is a function of all the power plant outputs. The constraining
equation on the minimum value of F is given by the power balance of Eq. (3.5), which for the
present purpose we rewrite in the form,

+ −∑ =0 (3.14)

Our objective is to obtain a minimum cost for a fixed system load demand subject to the power-
balance constraint of Eq. (3.14). We now present the procedure for solving such minimization
problems called the method of Lagrange multipliers. The new cost function F is formed by
combining the total fuel cost and the equality constraint of Eq. (3.14) in the following manner,
[1] [3] [2]

F= ( + +⋯ + )+λ( + −∑ ) (3.15)

The augmented cost function is often called the lagrangian, and the parameter λ, is the
effective incremental fuel cost of the system when transmission-line losses are taken in to
account. When is given in dollars per hour and is in megawatts, and λ are expressed in

29
dollars per hour and dollars per megawatt hour, respectively. The original problem of
minimizing subject to Eq. (3.1) is transformed by means of Eq. (3.15 ) into an
unconstrained problem in which it is required to minimize with respect to the generator
outputs. Therefore, for minimum cost the derivative of with respect to each Pgi must be equal
to zero [1] [2] [3].

= + −1 =0 (3.16)

Rearranging and recognizing that changing the output of only one plant can affect the cost of
only that plant we have

+ − =0 (3.17)

OR

= (3.18)

We can write this equation as;

= (3.19)

Where = and is the penalty factor of the ith plant. (3.20)

Equation (3.19) means that minimum fuel cost is obtained when the incremental fuel cost of
each unit multiplied by its penalty factor is the same for all generating units in the system. The

penalty factor ; depends on ;, which is a measure of the sensitivity of the transmission

system losses to changes in alone .Generating units connected to the same bus within a
particular power plant have equal access to the transmission system, and so the change in

30
system losses must be the same for a small change in the output of any one of those units.
This means that the penalty factors are the same for such units located in the same power plant.
Therefore, for a plant having, say, N generating units with outputs of , , , ,
the penalty factors , are equal, and Eq. (3.20) [1] [2] [3]Then shows that;

= = =⋯= (3.21)

3.4 The Transmission Loss Equation

The partial derivative from equation (3.20) is referred to as the incremental transmission

loss (ITL), associated with the generating plant. Thus to solve the optimum load scheduling
problem, it is necessary to compute ITL for each plant implying we have to determine the
functional dependence of transmission loss on real powers of generating plants. There are
several methods, approximate and exact, for developing a transmission loss model. One of the
most important, simple but approximate, methods of expressing transmission loss as a
function of generator powers is through B-coefficients. This method is reasonably adequate
for treatment of loss coordination in economic scheduling of load between plants. The general
form of the loss formula using B-coefficients is [1] [14] [2] [3].

=∑ ∑ +∑ + (3.22)

Where B is the loss coefficients which are constants under certain assumed operating

condition and P is the real power generated by the unit. The transmission loss equation
may be written in the matrix form as; [2].

= + + (3.23)

31
Where;

P B ⋯ B
P = P And B= ⋮ ⋱ ⋮ (3.24)
⋮ B ⋯ B

Is the transpose of real power generated by the plant [2].With system power loss we
have, [1] [3] [2]

= [∑ ∑ +∑ + ] (3.25)

= ∑ +∑ +∑ +
(3.26)

Since = we have;

=∑ 2 +∑ (3.27)

3.5 Formulation of PSO

In a physical dimensional search space, the position and velocity of the particle are

represented as the vectors of =[ , ,. . ., ] and =[ , ,. .


., ] in the PSO algorithm. Let = [ , ,… , ]
and =[ ... ] be the best position of particle and its
neighbours best position so far respectively. The modified velocity and position of each particle
can be calculated using the current velocity and the distance from Pbest and Gbest as follows:
[4] [14] [6] [19]

32
( )= ( )+ (t) (3.28)

The information available for each individual is based on its own experience and the knowledge
of the performance of other individuals in its neighborhood. Since the relative importance of
these two factors can vary from one decision to another, it is reasonable to apply random
weights to each part, and therefore the velocity will be determined by (3.29).

= + ( , - )+ ( - ) (3.29)

Where;

= Velocity vector of particle in dimension at time .

= Position vector of particle in dimension at time .

, = Personal best position of particle in dimension found from initialization through

time .

= Global best position of particle in dimension found from initialization through


time .

= Acceleration constants which are used to level the contribution of the


cognitive and social components respectively.

= Random numbers from uniform distribution (0 1) at time .

w= − *Iter …………………………………………….. (3.31)

Where w is the inertia weight factor

Is the maximum value weight factor


Is the minimum value weight factor
Is the maximum iteration number
Iter is the current iteration number [10] [6] [20] [7]

The velocity update equation in (3.29) has three major components.

33
 The first component is referred to as “inertia,” It models the tendency of the particle to
continue in the same direction it has been traveling. This component can be scaled by
a constant as in the modified versions of PSO [6].
 The second component is called the cognitive element. This section plays the significant
role because it manages memory of the particles. Also the task of this part is casing to
particles after search in neighbourhood place return to the best position that has the

better individual fitness i.e. the best position ever found by the given particle:

(whose corresponding fitness value is called the particle’s best ). The value of
the cognitive coefficient is 2 because value of 2 or close to that influence on the periods
of particles need to arrive at the best individual fitness function pbest. R1 is a random
value that causes the shift of particles to place with individual best fitness [6].
 The third component of the velocity update equation is known as the social component
and plays the end task because in this step all particles that gathered in defined place
with high individual fitness value now shift to the next and finest place with peak fitness
value. That is why all particles get together in preferred place. in this part is the
social coefficient and its value is 2 or close to that because this value has great effect
on period of this step that particles shift toward the best global fitness function gbest.
R2 same as R1 is a random coefficient. The random value as coefficient for this part is
important as it decides the movement of particles. In summary the social element has a

linear attraction towards the best position found by any particle (whose

corresponding fitness value is called global best ) [6].

3.5.1 Global Best PSO

The global best PSO is a method where the position of each particle is

influenced by the best-fit particle in the entire swarm. In this method each individual particle,

[1 … ] has a current position in search space, a current velocity, and a personal best
position in search space. The personal best position corresponds to the position in search space
where particle had the smallest value as determined by the objective function, considering a
34
minimization problem. In addition, the position yielding the lowest value amongst all the
personal best is called the global best position which is denoted [4 5 7 11 15]. The
following equations (3.31) and (3.32) define how the personal and global best values are

updated, respectively. Considering minimization problems, then the personal best ,


position at the next step, ( + 1) is calculated as; [24]

, > ,
, = (3.32)
( )≤ ,

The global best position at time step t is calculated as

= , , ℎ [1, … ] >1 (3.33)

Therefore it is important to note that the personal best , is the best position that the
individual particle has visited since the first time step. On the other hand, the global best
position is the best position discovered by any of the particles in the entire swarm [24].

3.6 Application of PSO Method to Economic Load Dispatch

Steps of Implementation
1. Specify the maximum and minimum limits of power generation of each generating unit,
maximum number of iteration to be performed, the B coefficients for computation of
power loss and the fuel cost coefficients of each unit.
2. Initialize randomly the individual of the population of all units according to limits of
each unit.
3. To each individual population of the population array, employ B coefficients loss
formula to compute the transmission power loss.

=∑ ∑ +∑ +

35
4. Calculate the evaluation value (cost function) of each generating unit PG using the
equation.

= + +
Calculate price penalty factor using the equation

= = +

5. Compute the new value of the equation (evaluate the objective function)

= + + + ( + −∑ )
6. Compare each generation evaluation value with its personal best, the best evaluation
value among the personal best is the global best.

, > ,
, =
( )≤ ,
Find the global best by

= , , ℎ [1, … ]
7. Update the velocity and the position of each member according to;

= + ( , - )+ ( - )

Where w= − *iter

= +
8. If the evaluation of each generation is better than the previous personal best the current
value is set to be personal best. If the personal best is better than the global best the
value is set to be global best.
9. If the number of iteration reaches the maximum then go to step 3 otherwise end.

36
10. The individual that generate the latest global best is the optimal generation power of
each unit.

37
3.7 Flow Chart
START

Initialize max and min power of each generator,


Initialize PSO parameters, Initialize pop of all
units.c1, c2, w, iteration

iter = 0

Compute power loss, Compute fitness function f .Fitness=fitness pbest

Iteration iter=iter+1

Calculate fitness for each population

If fitness pbest (i)> fitnesspbest (i-1)


Yes

No
Pbest (i) = pbest (i-1)
Pbest (i) = pbest (i)

Compute gbest (i) = min (pbest)

Yes
Gbest (i) =
If gbest (i)> gbest (i-1) gbest (i-1)

No

Gbest (i) = gbest (i) No

Update particle velocity and particle position

Check stopping criteria according to error limit

Yes

Gbest is the optimal solution

END

Figure 3.2 flow chart of PSO for implementing ELD [20].

38
CHAPTER 4
RESULTS AND ANALYSIS

4.1 30 Bus Test Network

The one line diagram of an IEEE-30 bus system is shown in Fig. 4.I. The generator cost
coefficients, and generating unit’s data are provided in Table 4.2. The B-loss coefficients
matrix of the system is given in Table 1.2.

Figure 4.1 30 bus IEEE test network with six generating units [34]

Table 4.1 Generator cost coefficient


Unit (MW/$) (MW/$) ($) (MW) (MW)
1 0.15240 38.53973 756.79886 10 125
2 0.10587 46.39655 451.32513 10 150
3 0.02803 40.39655 1049.9977 35 225

39
4 0.03546 38.32782 1243.5311 35 210
5 0.02111 36.32782 1658.5596 130 325
6 0.01799 38.27041 1356.6592 125 315

Table 4.2 B-Coefficient Matrix


B= [0.000140 0.000017 0.000015 0.000019 0.000026 0.000022
0.000017 0.000060 0.000013 0.000016 0.000015 0.000020
0.000015 0.000013 0.000065 0.000017 0.000024 0.000019
0.000019 0.000016 0.000017 0.000071 0.000030 0.000025
0.000026 0.000015 0.000024 0.000030 0.000069 0.000032
0.000022 0.000020 0.000019 0.000025 0.000032 0.000085];

PARTICLE SWARM OPTIMIZATION METHOD:


PSO was applied to the above system for obtaining economic load dispatch of various loads.
PSO was implemented according to the flow chart shown.

Table 4.3 PSO method parameters used in this project

Population size 100


Maximum number of iteration 1000
Inertia weight (w) 0.9 and =0.4
Acceleration constants C1=2 and c2=2
Convergence 1e-6

The optimal power generations for power demands of; 585MW, 600MW, 700MW, 800MW,
1000MW, 1200MW and 1250MW respectively together with the minimum fuel cost in /
and power loss in megawatts for the 30 bus test network with six generating units system using
PSO are shown in Table 4.4. The comparison for PSO method used in this project and GA from

40
[33] is shown in Table 4.5, 4.6 and 4.7 for power demands of 600MW, 700MW and 800MW
respectively.

4.2 Results

4.2.1 Case Study: Six Unit Thermal System neglecting transmission losses

Table 4.4 Optimal Scheduling of Generators of a Six-unit system by PSO


Method (Loss included case)

S/ Demand P1 P2 P3 P4 P5 P6 Loss Total Cost


no (MW) (MW) (MW) (MW) (MW) (MW) (MW) (MW) (MW)
( / )

1 585 23.20 10.00 92.22 98.02 198.66 176.47 13.53 598.53 31386.
45

2 600 23.86 10.00 95.64 100.70 202.83 181.19 14.23 614.23 32094.
72

3 700 28.29 10.00 118.96 118.67 230.76 212.74 19.43 719.43 36912.
. 20

4 800 32.58 14.48 141.54 136.04 257.66 243.00 25.76 825.33 41896.
70

5 1000 41.16 27.28 186.56 170.57 310.83 302.58 39.48 1039.4 52361.
8 30

6 1200 84.48 93.32 225.00 210.00 325.00 315.00 1252.8 52.80 64083.
11

7 1250 105.6 125.4 225.00 210.00 325.00 315.00 1306.0 56.05 67736.
0 5 5 30

41
Table 4.5: Six unit system comparison of cost in different method, demand of
600mw

s/no PSO GA[33] PSO[33]


[THIS METHOD]
P1(MW) 23.86 22.8 23.8
P2(MW) 10 10 10.0
P3(MW) 95.64 103.3 95.7
P4(MW) 100.07 98.9 100
P5(MW) 202.83 194.23 202.6
P6(MW) 181.19 187.5 181.2
Total power(MW) 614.23 616.73 614.3
Loss(MW) 14.23 14.2 14.24
COST(( / ) 32094.72 32098.6 32091.68

Table 4.6: Six unit system comparison of cost in different method, power
demand of 700mw

s/no PSO GA[33] PSO[33]


P1(MW) 28.29 29.09 28.2
P2(MW) 10.00 10 10
P3(MW) 118.96 116.64 118.53
P4(MW) 118.67 123.43 118.53
P5(MW) 230.76 226.4 230.2
P6(MW) 212.74 213.7 214.16
Total power(MW) 719.43 719.23 719.62
Loss(MW) 19.43 19.4 19.4
COST( / ) 36912.20 36913.7 36912.22

42
Table 4.7: Six unit system comparison of cost in different method, power
demand of 800mw
s/no PSO GA[33] PSO[33]
P1(MW) 32.58 32.5 31.95
P2(MW) 14.48 12.4 10.8
P3(MW) 141.54 140.51 153.2
P4(MW) 136.04 136.2 151.8
P5(MW) 257.66 258.28 247.3
P6(MW) 243.00 245.3 229.69
Total power(MW) 825.33 825.19 824.74
Loss(MW) 25.76 25.44 24.95
COST( / ) 41896.70 41925.28 41896.2

4.3Results Analysis

Figures 4.2, 4.3, 4.4. 4.5, 4.6,and 4.7 shows the convergence characteristics of the PSO method
used in this project for power demand of 585MW, 600, 700MW, 800MW, 1000MW, 1200MW
and 1250MW respectively. It can clearly be seen form the graphs that the PSO method
convergences after around two hundred iteration irrespective of the power demand. This shows
the effectiveness of PSO in solving the ELD problem. Figure 4.8 shows that the cost of
generation varies linearly with the power loss. Figure 4.9 also shows that the cost of generation
varies proportionally with power demand.

43
Figure 4.2: Convergence Characteristics of PSO Method for 30 bus with six
generating unit, power demand 585MW

44
Figure 4.3 Convergence Characteristics of PSO Method for 30 bus with six
generating unit System, power demand of 600MW

45
Figure 4.4 Convergence Characteristics of PSO Method for 30 bus with six
generating unit System, power demand of 700 MW

46
Figure 4.5 Convergence Characteristics of PSO Method for 30 bus with six
generating unit System, power demand of 800 MW

47
Figure 4.6 Convergence Characteristics of PSO Method for 30 bus with six
generating unit System, power demand of 1000 MW

48
Figure 4.7 Convergence Characteristics of PSO Method for 30 bus with six
generating unit System, power demand of 1200 MW

49
Figure 4.7 Convergence Characteristics of PSO Method for 30 bus with six
generating unit System, power demand of 1250MW

Figure 4.8: Variation of Power loss with the Load Demand for Six unit system

50
Figure 4.9: Variation of Cost with Power Demand Curve for Six unit system

51
CHAPTER 5
CONCLUSION AND RECOMMENDATIONS

5.1Conclusion

PSO method was successfully employed to solve the ELD problem. The comparison of results
for the test case of IEEE 30 bus test network clearly shows that the PSO method was indeed
capable of obtaining high quality solution efficiently for ELD problems. Fig (4.2-4.7) shows
the convergence characteristics of the 30 bus test network at different demand loads. The
convergence is good since the algorithm takes few numbers of iterations to converge hence less
computation time. The power loss and fuel cost are observed to vary linearly with load demand
Fig 4.8. The reliability of the algorithm for different runs of the program is highly reliable,
implying that irrespective of the runs of the program it is capable of obtaining same result for
the problem. PSO is thus an effective method in solving economic load dispatch problem since
it works with progressive improvement and it has the advantage of converging to a global point.
The convergence to a global point leads to cost savings and hence profits maximization. The
algorithm thus, is relatively simple, reliable and efficient hence suitable for practical
applications.

5.2Recommendations for Further Work

1. Hybrid methodology is the useful tool for efficient solution by exploiting the strengths of
PSO with the powers of other techniques. By appropriate integration of both the approaches to
solve ELD problems, better results can be obtained within less computational time.

2. Bus data and line data of the system can be taken as input along with the load demand to
obtain the minimization function with constraints on voltage and reactive power at various
points of the system.

3. Economic dispatch problem has become a crucial task in the operation and planning of power
system. The primary objective of ED is to schedule the committed generating units output so
as to meet the required load demand at minimum cost satisfying all unit and system operational
constraints. Improvement in scheduling the unit outputs can lead to significant cost saving.
Initially, ED problem was formulated as economic cost dispatch (ELD), but further due to the

52
amendment of clean air act in 1990s, Existence of Emission Dispatch (EMD) leads to the
formulation of Combined Emission Economic Dispatch (CEED) and emission Controlled
Economic Dispatch (ECED) problem formulation. In future this problem could be solved as
individual optimization of these two contradictory objective.

53
REFERENCES

[1] J. John j. Greinger. & William D. Steveson, Power System Analysis, singapore: Mc
Graw Hill, 1994, pp. 531-562.

[2] D. K. &. I. Nagrath, Modern Power System Analysis, New Delhi: Tata Mc Graw Hill,
2003, pp. 258-280.

[3] J. Zhu, Optimization of Power System Operation, Hoboken, New Jersy: John Wiley &
Son.inc, 2009.

[4] S. S. &. V. V. V. Karthikeyan, "A New Approach To The Solution of Economic Load
Dispatch Using Particle Swarm Optimization with Simulated Annealing," International
Journal on Computational Science& Application (IJCSA), vol. 3, no. 3, pp. 37-41, June
3 2013.

[5] V. P. R. Amita Mahor, "Economic dispatch using particle swarm optimization: A


review," in Renewable and Sustainable Energy Reviews , India, 2009.

[6] M. M. G. Baskar, "Contingency constrained economic load dispatch using improved,"


in Electric Power Systems Research, Tamil Nadu, India, 2009.

[7] J. Y. M. Hardiansyah, "Solving Economic Load Dispatch Problem Using Particle


Swarm Optimization Technique," I.J. Intelligent Systems and Applications, pp. 12-18,
2012.

[8] Mohn Faazi, Othman,Rubiyan,Mayzuki Khalid, "Solving Economic Load Dispatch


Using Particle Swarm Optimization," Journal of Theoritical &Applied Information
Technology, vol. 46, no. 2, pp. 526-535, 31st-Dec-2012.

[9] H. M. D. ,. M. P. &. B. K. P. Kamlesh Kumai Vishwakama, "Simulated Annealing For


Solving Economic LOad Dispatch Problem with Valve Point Loading Dispatch
Problem," International Journal of Engineering, Science & Technology, vol. 4, no. 4,
pp. 60-72, 2012.

54
[10] P. A.-D.-. V. ,. P. M. Sudhakaran, "Application of Particle Swarm Optimization for
Economic Load Dispatch Problem," in The 14th International Conference on Intelligent
System Applications to Power Systems,ISAP, Kaohsiung, Taiean, NOV 4-8 ,2007.

[11] S. SARANGI, "Particle Swarm Optimization Apllied To Economic load Dispatch," A


THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR
THE DEGREE OFMaster of Technology in Power Control and Drives , 2009.

[12] K. P. ,. D. Naveen Kumar, "A Genetic Algorithm Approach for the Solution of
Economic Load Dispatch Problem," International Journal on Computer Science and
Engineering (IJCSE), vol. 4, no. 6, pp. 1063-1067, June 2012.

[13] O. P. M. M. G. Ravinder Singh Maan, "Economic Load Dispatch Optimization of Six


Interconnected Generating Units Using Particle Swarm Optimization," IOSR Journal of
Electrical and Electronics Engineering (IOSR-JEEE), vol. 6, no. 2, pp. 21-27, May-
June 2013.

[14] J. S. &. A. Mohan, "Particle Swarm Optimizatiom Approach for Economic Load
Dispatch," International Journal of Engineering Research & Appplication, vol. 3, no. 1,
pp. 013-022, 2013.

[15] S. G. S. P. G. B. Shaw, "Solution of Economic Load Dispatch Problems by a Novel,"


International Journal on Electrical Engineering and Informatics ,, vol. Volume 3, no.
1, pp. 26-36, 2011.

[16] S. Sarangi, "Particle Swarm Optimization Applied To Economic Load Dispatch


Problem," 2009.

[17] N. A. R. ,. A. B. H. M. Mohd Noor Abbullah, "Efficient Evolution Particle Swarm


Optimization Approach For Non Convex Economic Load Dispatch Problem," vol. 89,
no. 2a, pp. 139-143, 2013.

[18] O. P. M. M. G. Ravinder Sighn Maan, "Solurion to Economic Load Dispatch Problem


with Improved Computational Performance Using Particle Swarm Optimization,"
International Journal Of Engineering Science Invetion , vol. 2, no. 6, pp. 01-06, June
2013.

55
[19] P.-D.-V. R. I.D.Soubache, "Unified Particle Swarm Optimization to Solving,"
International Journal of Innovative Technology and Exploring Engineering (IJITEE),
vol. 2, no. 4, pp. 280-283, March 2013.

[20] A. K. G. C. Shubham Tiwari, "Economic Load Dispatch Using Particle Swarm


Optimization," International Journal of Application & Innovation in Engineering &
Management, vol. 2 , no. 4, pp. 2391-4847, April 2013.

[21] T. Bommirani.B, "Optimization Technique For The Economic Dispatch in Power


System Operation," International Journal of Computer and Information Technology
(ISSN: 2279 – 0764), vol. 02, no. 01, pp. 158-162, January 2013.

[22] C.-S. L. Leandro dos Santos Coelho, "Solving economic load dispatch problems in
power systemsusing chaotic and Gaussian particle swarm optimization approaches,"
Electrical Power and Energy Systems 30, p. 297–307, 2008.

[23] Q. Bai, "Analysis of Particle Swarm Optimization Algorithm," Journal of Computer &
Information Science , vol. 3, no. 1, pp. 180-182, feb 2010.

[24] S. Talukder, "Mathematical Modelling and Applicationsof Particle Swarm


Optimization," Master’s Thesis Mathematical Modelling and Simulation, Feb 2011.

[25] D. V.Selvi, "Comparative Analysis of Ant Colonyand Particle Swarm Optimization


Techniques," International Journal of Computer Applications , vol. 5, no. 4, pp. 1-5,
August 2010.

[26] A. Lazinica, Particle Swarm Optimization, Vienna, Austria: In-Tech, 2009.

[27] J. ,. Y. J. Y. H. M. Xueming Yang, "A Modified Particle Swarm Optimization With


Dynamic Adaption," Applied Mathematics & Computation, pp. 1205-1213, 2007.

[28] T. S. K. B. S. Soodabesh Darzi, "Overview of Particle Swarm Optimization on the


Application & Methods," Australian Journal on Basic &Applied Science, vol. 7, no. 2,
pp. 490-499, 2013.

56
[29] Y. K. C. Vinod Puri, "A Solution to Economic Dispatch Problem Using Augmented
lagrangian Particle Swarm Optimization," International Journal of Emerging
Technology and Advanced Engineering, vol. 2, no. 8, pp. 511- 576, August 2012.

[30] S. M. I. G. K. V. S. M. I. M. S. M. I. J.-C. H. S. M. I. a. G. H. F. I. Yamille del Valle,


"Particle Swarm Optimization: Basic Concepts,Variants and Applications in Power
Systems," IEEE TRANSACTIONS ON EVOLUTIONARY COMPUTATION, vol. 12, no.
2, p. 171, April 2008.

[31] Y. S. Russel .C. Eberhert, "Particle Swarm Optimization , Development, Application &
Resources," pp. 81-84, 2001.

[32] Y. S. Y. C. G. W. Ying Tan, Advances in Swarm Intelligence, Chongqing, China:


Springer, June 2011.

[33] A. Y. Saber, "Economic dispatch using particle swarm optimization with bacterial
foraging effect," Electrical Power and Energy Systems, vol. 34 , p. 38–46, 2012.

[34] Appendices, "Appendix," pp. 123-159.

57
APPENDIX

Test.m xlswrite(filename,a);
fclose all;
clear toc
clc;
tic;
format long; eld.m
global data B Pd
%30 bus with six gen units data function[ F, Pg, PT, Pl,error]=psoeld(x)
data=[0.15247 38.53973 756.79886 10 125 global data B Pd
0.10587 46.15916 451.32513 10 150 n=length(data(:,1));
0.02803 40.3965 1049.9977 35 225 [m, n]=size(x);
0.03546 38.30553 1243.5311 35 210 P=x(1:m,2:n);
0.02111 36.32782 1658.569 130 325 B11=B(1,1);
0.01799 38.27041 1356.6592 125 315]; B1n=B(1,2:n);
B=1e-4*[1.4 .17 .15 .19 .26 .22; Bnn=B(2:n,2:n);
.17 .60 .13 .16 .15 .20; A=B11;
.15 .13 .65 .17 .24 .19; %calculate penalty factor
.19 .16 .17 .71 .30 .25; BB1=2*B1n*P';
.26 .15 .24 .30 .69 .32; B1=(BB1-1)';
.22 .20 .19 .25 .32 .85]; %calculate incremental power loss
%585MW, 600MW, 700MW & 800MW C1=(P*Bnn*P');
Pd=600; C1=diag(C1);
pmin=data(:,4)'; C=Pd-(sum(P'))'+C1;
pmax=data(:,5)'; A=A*ones(m,1);
gen=[pmin' pmax']; % x1=zeros();
n=length(data(:,1)); x2=zeros();
Pstd = [100 1000 10 2 2 0.9 0.4 1500 1e-6 0]; for i=1:m
[OUT]=psocode('psoeld',n,1,gen,0,Pstd); y=[A(i) B1(i) C(i)];
out=abs(OUT); x1(i,:)=roots(y);
Pg=out(1:n); x2(i)=(abs(min(x1(i,:))))';
[F,F1, Pg,PT,Pl, error]=psoeld(Pg'); %power generation enforcement
if x2(i)>data(1,5)
x2(i)=data(1,5);
%%%%%%%%%%%%%%%%%%%%%%%% else
%%%%%%%%%%%%%%%%%%%%%%%% end
%%%%%%%% if x2(i)<data(1,4)
x2(i)=data(1,4);
else
% fprintf('Active power balance check =%g',error);
end
for i=1:n
end
Pg=[x2' P];
fprintf('Power generated(%d)= %d %fuel cost coefficient
MW\n',i,Pg(i)); a1=data(:,1);
b1=data(:,2);
end c1=sum(data(:,3));
fprintf ('power demamd=%d MW\n', Pd); %calculation of fuel cost for lossless system
fprintf('Total Power Loss= %d MW\n',Pl); F=Pg.*Pg*a1+Pg*b1+c1;
%evaluation of fuel cost for lossy system
fprintf('Total power generated=%d MW\n', PT); Pl1=(Pg*B*Pg').';
fprintf('Fuel cost=%d Rs/Hr\n',F ); Pl=diag(Pl1);
filename='ELD.xlsx'; PT=sum(Pg')';
a=[Pg,Pl,F,error]; error=abs(PT-Pd-Pl);

58
%compute objective functionS % construct random population positions bounded
F=(F)+1000*error; by VR
pos(1:popsize,1:D) =
Pso.m normmat(rand([popsize,D]),VR',1);

function [OUT]=psocode(obj,D,varargin) if PSOseed == 1 % initial positions


% sets up default pso parameter tmpsz = size(PSOseedValue);
swarm = 100; pos(1:tmpsz(1),1:tmpsz(2)) = PSOseedValue;
max_iter= 1000; end
popsize = 30; % initial pbest positions values
ac1 = 2; pbest = pos;
ac2 = 2;
iw1 = 0.9; % vectorize cost function
iw2 = 0.4; out = feval(obj,pos); % returns column of cost
iwe = 1500; values (1 for each particle)
errd = 1e-6; pbestval=out; % initially, pbest is same as pos
PSOseed = 0; [gbestval,idx1] = min(pbestval);

% preallocate variables for speed up % keep track of gbest for all iters
iter = ones(1,max_iter)*NaN; bestpos = zeros(max_iter,D+1)*NaN;
gbest = pbest(idx1,:);
%set max velocity and position parameters bestpos(1,1:D) = gbest;
if nargin == 6
mv=varargin{1}; % start iteration
if isnan(mv) vel=0;
mv=4; for i=1:max_iter
end out = feval(obj,[pos;gbest]);
VR=varargin{2}; out = out(1:end-1,:);
elseif nargin == 7 iter(i+1) = gbestval;
mv=varargin{1}; bestpos(i,1:D+1) = [gbest,gbestval];
if isnan(mv)
mv=4;
% plot gbest value versus iteration during each
end
iterations
VR=varargin{2};
elseif nargin == 8
mv=varargin{1}; if (mod(i,swarm) == 0 ) || (i==max_iter) ||
if isnan(mv) (i==1)
mv=4; fprintf(message,i,gbestval);
end
VR=varargin{2}; % plot
PSOseedValue = varargin{6};
else semilogx(iter(~isnan(iter)),'color','m','linewidth',2)
end xlabel('iteration','color','b')
ylabel('fuelcost.','color','b')
if length(mv)==1
minvel = -mv*ones(popsize,D); %text on top of graph
maxvel = mv*ones(popsize,D); top=sprintf('cost=%11.6g',gbestval);
else title(top,'color','b','fontweight','bold');
end grid on
minpos = repmat(VR(1:D,1)',popsize,1);
maxpos = repmat(VR(1:D,2)',popsize,1); end

% output on the sreen


message = sprintf('PSO: %%g/%d iterations, % check if gbest changes more than some
GBest = %%10.10d.\n',max_iter); threshold value
% for the same location
% initialize population of particles and their rstflg = 0;
velocities at time zero
if rstflg==0;

59
pbest = pos; pos = ( minpos_throwaway.*maxpos ) + (
pbestval = out; minpos_keep.*pos );
pos = ( maxpos_throwaway.*minpos ) + (
% recalculate best values maxpos_keep.*pos );
[gbestval,idx1] = min(pbestval); % bounce method
gbest = pbest(idx1,:); pos = ( minpos_throwaway.*minpos ) + (
end minpos_keep.*pos );
pos = ( maxpos_throwaway.*maxpos ) + (
% find gbest and gbestval maxpos_keep.*pos );
if rstflg == 0
[tempi] = find(pbestval>=out); vel = (vel.*minpos_keep) + (-
pbestval(tempi,1) = out(tempi); vel.*minpos_throwaway);
pbest(tempi,:) = pos(tempi,:); vel = (vel.*maxpos_keep) + (-
vel.*maxpos_throwaway);
[iterbestval,idx1] = min(pbestval);
%check stopping criterion
if gbestval >= iterbestval if abs(gbestval== errd)
gbestval = iterbestval; fprintf(message,i,gbestval);
gbest = pbest(idx1,:); disp(' ');
end disp('gbest hasn''t changed');
end break
end
end
% get velocities, positions
% output & return
r1 = rand([popsize,D]); OUT=[gbest';gbestval];
r2 = rand([popsize,D]); return
% get inertia weight
iwt=zeros();
if i<=iwe normmatt.m
iwt(i) = ((iw2-iw1)/(iwe-1))*(i-1)+iw1; function
else [out,varargout]=normmat(x,newminmax,flag)
iwt(i) = iw2; if flag==0
end
% random number including acceleration a=min(min((x)));
constants b=max(max((x)));
ac11 = r1.*ac1; if abs(a)>abs(b)
ac22 = r2.*ac2; large=a;
small=b;
%evaluate velcity else
vel = iwt(i).*vel+ac11.*(pbest- large=b;
pos)+ac22.*(repmat(gbest,popsize,1)-pos); small=a;
end
% limit velocities temp=size(newminmax);
vel = ( (vel <= minvel).*minvel ) + ( (vel > if temp(1)~=1
minvel).*vel ); end
vel = ( (vel >= maxvel).*maxvel ) + ( (vel < den=abs(large-small);
maxvel).*vel ); range=newminmax(2)-newminmax(1);
if den==0
out=x;
% update new position else
pos = pos + vel; y=(x-a)/(den);
out=y*range+newminmax(1)*ones(size(y));
% limit positions to desired search space end
minpos_throwaway = pos <= minpos;
minpos_keep = pos > minpos; %%%%%%%%%%%%%%%%%%%%%%%%
maxpos_throwaway = pos >= maxpos; %%%%%%%%%%%%%%%%%%%%%%%%
maxpos_keep = pos < maxpos; %%%%%%%%%%
elseif flag==1
% wraparound method a=min(x,[],1);

60
b=max(x,[],1); elseif temp(2)>2
for i=1:length(b) else
if abs(a(i))>abs(b(i)) newminmaxA=newminmax;
large(i)=a(i); end
small(i)=b(i);
else range=newminmaxA(:,2)-newminmaxA(:,1);
large(i)=b(i); for j=1:length(x(1,:))
small(i)=a(i); for i=1:length(b)
end if den(i)==0
end out(i,j)=x(i,j);
den=abs(large-small); else
temp=size(newminmax); y(i,j)=(x(i,j)-a(i))./([forcecol(den(i))]);
if temp(1)*temp(2)==2
out(i,j)=y(i,j).*range(i,1)+newminmaxA(i,1);
newminmaxA(1,:)=newminmax(1).*ones(size(x(1,: end
))); end
end
newminmaxA(2,:)=newminmax(2).*ones(size(x(1,:
))); end
elseif temp(1)>2 %%%%%%%%%%%%%%%%%%%%%%%%
else %%%%%%%%%%%%%%%%%%%%%%%%
newminmaxA=newminmax; %%%%%%%%%%%%%%%%%%%%%%
end varargout{1}=a;
varargout{2}=b;
range=newminmaxA(2,:)-newminmaxA(1,:);
for j=1:length(x(:,1)) return
for i=1:length(b)
if den(i)==0
out(j,i)=x(j,i);
else
y(j,i)=(x(j,i)-a(i))./(den(i));

out(j,i)=y(j,i).*range(1,i)+newminmaxA(1,i);
end
end
end
%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%
elseif flag==2
a=min(x,[],2);
b=max(x,[],2);
for i=1:length(b)
if abs(a(i))>abs(b(i))
large(i)=a(i);
small(i)=b(i);
else
large(i)=b(i);
small(i)=a(i);
end
end
den=abs(large-small);
temp=size(newminmax);
if temp(1)*temp(2)==2

newminmaxA(:,1)=newminmax(1).*ones(size(x(:,1
)));

newminmaxA(:,2)=newminmax(2).*ones(size(x(:,1
)));

61

You might also like