genetic algorithms

FUNCTION DEVELOPMENT FOR LOAD FORECASTING
USING GENETIC ALGORITHMS
Man Mohan, D. K. Chaturvedi
&
Electrical Engineering Department
Faculty of Engineering
Dayalbagh Educational Institute
Dayalbagh, Agra 282 005
Fax: 0562 281226
E-mail: [email protected] (D.K.Chaturvedi)
P. K. Kalra
Electrical Engineering Department
Indian Institute of Technology
Kanpur 208016
ABSTRACT
Genetic Algorithms (GAs) are gaining popularity in many Engineering and scientific
applications due to their enormous Advantages such as adaptability, ability to handle non-linear, ill
defined and probabilistic problems. In this paper, an attempt has been made to develop a Function
for long-term load Forecasting using Genetic Algorithms. It does not require any previous
assumption of a function for load forcasting, further also it does not need any functional
relationship between dependent and independent variables. The results obtained by this method are
compared with the Central Electricity Authority (CEA) forecasted data to demonstrate the
effectiveness of the proposed method.
KEY WORDS: Load forecasting, Genetic Algorithms, Evolutionary Programs.
INTRODUCTION
During the last few years there has
been a growing interest in algorithms which
rely on analogies to natural processes. The
emergence of massively parallel computers
made these algorithms of practical interest.
There are various well known programs in
this class like evolutionary programs, genetic
algorithms,simulated annealing, classifier
systems, expert systems, artificial neural
networks and fuzzy systems. This paper
discusses a genetic algorithm - which is based
on the principle of evolution (survival of
fittest). In such algorithms a population of
individuals (potential solution) undergoes a
sequence of transformations like mutation
type and crossover type. These individuals
strive for survival; a selection scheme, biased
towards fitter individuals, selects the next
generation. After some number of generations
the program converges to the optimal value.
Genetic algorithm has been applied to
various problems in electrical power systems
such as generation scheduling [34, 35, 36],
Economic load dispatch [37], reactive power
optimization [31], distribution network
planning [32], alarm Processing [38].
Electrical long term load-forecasting [33].
Genetic algorithm is best suited for
the problems like load forecasting. Load
forecasting plays an important role in power
system planning, designing, operation and
control. The load at the various load buses is
required to know a few seconds to several
minutes before to plan the generation and
distribution schedules, contingency analysis
and for checking the system security (known
as very short time load forecasting). For the
allocation of the spinning reserve, it would be
necessary to predict the load demands at least
half an hour to a few hours ahead (known as
short term load forecasts). On the other hand
preparing to meet the load requirements at the
height of the winter or summer season may
require a load forecast to made a few days to
few weeks in advance. Forecasts with such
lead time constitute medium term load
forecasts. Finally to plan the growth of the
generation capacity, it would be necessary to
make 'long term' load prediction which may
involve a lead time of a few months to a few
years. Long term load forecasting of a future
demands on a realistic basis is important in
power planning.
Major power projects have long
gestation periods which may extend to 10
years or more. Therefore decisions on
investment have to be taken in advance for
demands, if the energy benefits are to
materialize at appropriate time needed. Thus
it is necessary not only to have demand
forecast covering a 15 - 20 years period but
only to update the same every 3-5 years in
order to fit into the five years plan.
LOAD FORECASTING – STATE
OF ART
Many techniques and approaches have
been investigated to tackle electric power
demand forecasting problems in the last few
decades [8]. These are often different in
nature and apply different engineering
considerations and economic analyses.
Traditional approaches [4] such as sectional
methods
or
load
survey
methods,
mathematical methods like correlation or
extrapolation methods (linear growth pattern,
exponential growth pattern, parabolic growth
pattern, or sigmoidal growth pattern) or
combination of both and mathematical
methods considering economic parameters. In
these methods regression and time series
analysis may not give sufficiently accurate
results. Conversely, complex mathematical
models for load forecasting are cumbersome
and time consuming, as they require a lot of
information about variables on which load
forecasting depends. Therefore, sometimes
either these model converge slowly or may
diverge in certain cases.
The information regarding variables
may be incorrect, improper and insufficient,
causing error in forecasting; more the number
of such variables, higher may be the error in
forecasting. Therefore a method is required
which can forecast the power demand with
minimum number of variables giving
sufficient accuracy. At the same time the
method is not quite complex and
cumbersome. All these properties are
possessed by GAs. Here an attempt has been
made to develop a function for long-term load
forecasting from the available data of peak
demand using GAs.
GENETIC ALGORITHMS
Genetic Algorithms (GAs) are inspired from
phenomena found in living nature. The
phenomena incorporated so far in GA models
include phenomena of natural selection as
there are selection and the production of
variation by means of recombination and
mutation, and rarely inversion, diploid and
others. Most Genetic Algorithms work with
one large panmictic population, i.e. in the
recombination step each individual may
potentially choose any other individual from
the population as a mate. Then GA operators
are performed to obtain the new child
offspring; the operators are:
i.
Crossover,
ii.
Mutation,
iii.
Selection and survival of fittest
[11-22, 24].
CROSSOVER AND MUTATION
The task of crossover is the creation of a new
individual out of two individuals of the
current population. The newly created
individuals have no new inheritance
information and the number of alleles is
constantly decreasing. This process results in
the contraction of the population to one point,
which is only wished at the end of the
convergence process, after the population
works in a very promising part of the search
space. Diversity is necessary to search a big
part of the search space. It is one goal of the
learning algorithm to search always in regions
not viewed before. Therefore, it is necessary
to enlarge the information contained in the
population. One way to achieve this goal is
Mutation.
The
mutation
operator
M(chromosome) selects a gene of that
chromosome and changes the allele by an
amount called the mutation variance (mv),
this happens with a mutation frequency (mf).
The parameter mutation variance and
mutation frequency have a major influence on
the quality of learning algorithms.
SELECTION
FITTEST
AND
SURVIVAL
OF
As in natural surroundings it holds on
average: "the better the parents, the better the
offsprings" and "the offspring is similar to the
parents". Therefore, it is on the one hand
desirable to choose the fittest individuals
more often, but on the other hand not too
often, because otherwise the diversity of the
search space decreases [10]. In our
implementation of Genetic algorithm we
select the best individuals using roulette
wheel with slot sized according to fitness, so
that the probability of selection of best
strings are more.
Further more we only accept an
offspring as a new member of the population,
if it differ enough from the other individuals,
that means here its fitness differ from all
other individuals at least by some significant
amount. After accepting a new individual we
remove one of the worst individual (i.e. its
fitness value is quite low) from the population
in order to hold the population size constant.
To maximize the efficiency of GAs,
three inherent parameters of GAs are to be
optimized, the mutation probability Pm, the
crossover probability Pc, and the population
size POPSIZE.
For GA parameter
optimization several results have been
obtained over the last few years. DeJong and
Schuster proposed heuristics for an optimal
setting of the mutation probability Pm [2425], Fogarty and Booker investigated time
dependencies of the mutation and the
crossover probability respectively [26-27],
Greffenstette Schaffer and Jong found
optimal settings for all three parameters of the
GA by experiment [28-29,30]. The brief
description of these parameters are given
below –
POPSIZE
As discussed by De Jong and Spears [30] that
the choice of population size has a strong
interacting effect on the results. Smaller
population
size
tends
to
become
homogeneous more quickly. With large
population size the crossover productivity
effect is much less dramatic.
Usually the population size for GA
varying from 10 - 100 and it is noted that this
parameter is mostly problem dependent. If the
problem in hand is simpler then smaller
population size can also serve the purpose,
but if the problem is complex, large
population size is required and it is also
necessary to run for large number of
generations.
CROSSOVER PROBABILITY
For better results, it is advisable to
select the crossover rate quite large than
mutation rate. This is the usual practice to
take crossover rate 20 times greater than the
mutation rate [14]. Crossover rate generally
ranging from 0.25 to 0.95.
MUTATION PROBABILITY
Schaffer [7] found experimentally that
mutation probability (Pm) is approximately
inversely proportional to the population size.
Mutation rate generally varying from 0.001 to
0.03.
MAXIMUM
GENERATIONS
NUMBER
OF
The selection of maximum number of
generations is a problem dependent
parameter.
For complex problems, the
maximum number of generations is large
enough, so that the results should converge to
optimal value [28].
Length of Chromosome (Lchrome)
The value of lchrome is dependent to
the precision required and can be calculated
with the help of the following expression [12,
13] –
lchrome
2
r
=(Maxparm - Minparm) * 10
Where,
r is number of places after decimal, up to
which the precision is required.
Maxparm – Upper bound of parameter
Minparm – Lower bound of parameter
FUNCTION
USING GA
DEVELOPMENT
A function or expression is composed
of three parts (genes):
Variables (x1,x2,x3…………),
Constants (k1,k2,k3…………) and
Operators (o1,o2,o3…………).
The operators connect the variables
and constants constituting a function.
Therefore, a function or expression is a string
of variables, constants and operators arranged
in a proper way as given below:
F (x1,x2………)= x1 o1 k1 o2 x2 o3 k2 o4
x3 o5 k3 ……………
In the above string, the constants
(k1,k2,k3……………) may be real or
integers; the operaters (o1,o2,o3…………)
are mathematical operaters like '+', '-', '/',
'exp', 'log', '*' etc.
The step wise procedure of Function
development for load forecasting problem
through GA is given belowSTEP - 1:
The input parameters to the GA
program are given as follows:
Chromosome length lchrome = 22
Population size = 60
Maximum number of generation
maxgen = 20
Crossover probability Pc = 0.5
Mutation probability Pm = 0.002
STEP - 2
Generate randomly the initial
population of size equal to population size as
given in step-1.
STEP -3
Decode the constants as well as the
operators and develop the function
corresponding to each string of population.
The variables considered in the function
development for load forecasting using GA
are time (in years), which is independent
variables and demand of previous year as
dependent variable. A developed function
from the corresponding string of population is
shown below for example:
crossover site
After crossover :
P1= (x+1)*(x/4) * (x+3)-(x-4)
P2= (x*3)*(x+2) + (x-1)-(x*3)
Mutation in a string P1 is shown below:
P1= (x+1)*(x/4) *(x + 3)-(x-4)
Population String
00 11 01 00 10 10 11
operators
01 11 01 10;
Constants
mutation site
After mutation :
P1= (x+1)*(x/4) *(x-3)-(x-4)
Developed Function
STEP-6
Repeat step-3 to 5 till you do not find
function of best fitness value.
F(n) = (x+1)*(x/4)+(x-1)-(x * 3)
STEP-4
Corresponding to all developed
functions predict the demand as well as error
in prediction and select the functions showing
lower errors in forecast on the basis of
survival of the fittest modifing the initial
population. Now new (child) population of
better strings is ready for crossover and
mutation.
STEP-5
Perform crossover and mutation
operations among strings of population
according to their probability to obtain new
population of better strings.
Two parent strings for crossover are
given below:
P1 = (x+1)*(x/4) + (x-1)-(x*3)
P2 = (x*3)*(x+2) * (x+3)-(x-4)
The
program
for
function
development of load forecasting problem has
been written in MATLAB 5.1.
RESULTS AND DISCUSSION
Genetic algorithms claim to provide
near optimal or optimal solution for
computationally
intensive
problems.
Therefore, the effectiveness of genetic
algorithm solutions should always be
evaluated by experimental results. For load
forecasting problem, the results obtained by
the developed function through genetic
algorithm (FDGA) are compared with the
results given by Annual Power Survey (APS)
carried out by CEA as mentioned in Table -1.
The curve is also drawn between the above
mentioned data as shown in Figure 1.
S.No.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Table - 1 Comparative results of Load forecasting By APS and GA
Year
APS (MW)
FDGA(MW)
Error (%)
0.9802
1985-86
2528
2508
0.7911
1986-87
2885
2998
-3.9168
1987-88
4341
4011
7.6019
1988-89
4779
4783
-0.0837
1989-90
5251
5307
-1.0665
1990-91
5721
5785
-1.1187
1991-92
6322
6314
0.1265
1992-93
6992
6943
0.7008
1993-94
7738
7651
1.1243
1994-95
8570
8486
1.1599
1995-96
9397
9288
0.8996
1996-97
10338
10245
1.7149
1997-98
11371
11176
1.5751
1998-99
12507
12310
1.4609
1999-2000
13759
13558
1.3347
2000-01
15134
14932
CONCLUSION
20000
15000
10000
5000
0
APS
FDGA
19
85
19 8 6
88
19 8 9
91
19 9 2
94
19 9 5
97
20 9 8
00
-0
1
Forecasted demand
Fig.1 Forecasted Peak Demand
Year
Fig. 2 Percentage Error in
Forecasting
The idea of producing a function for
non-linear variations has a vast application
area in the field of science and engineering.
This technique may also be used for
5
-5
15
13
11
9
7
5
3
0
1
Error (%)
10
The Genetic Algorithm, which is
inspired from the biological genetics, is
simple, powerful, domain free and
probabilistic approach to general problem
solving technique. It is best suited for the
problems like load forecasting for electrical
power demand that is a type of non-linear
variations. The Load curve obtained from
developed function through FDGA is much
closer to the demand curve obtained by APS
data. Therefore, It is capable to produce a
function for non-linear variations from the
available data, which can save a lot of lobour
and complexity during analysis of any type of
non-linear variations.
meteorological forecasting where historical
data is available.
Supply Industry"; Proc.IEEE, Vol. 115,
No.10, Oct. 6.,
ACKNOWLEDGEMENTS
7. Mbamalu, M.E. & Hawary, E.L.; " Load
Forecasting Via Sub optimal Seasonal Auto
regressive Models and Iterative Reweighted
Least Squares Estimation"; IEEE Trans. on
PWRS, Vol. No.1, Feb.1993.,
The authors are extremely thankful to
Prof. P.S. Satsangi, Director, Dayalbagh
Educational Institute, Dayalbagh, Agra for
continuous help and encouragement. The
authors wish to express their heartiest
gratitude to AICTE, New Delhi for providing
the financial support for carrying out this
work.
REFERENCES
1. Mahalanbis, A.K.; Kothari, D.P. & Ahson,
S.I.; 4"Computer Aided Power System
Analysis and Control"1; Tata McGraw-Hill
Publishing Company Ltd., New Delhi, 1991,
pp.93-124.
2. Stanton, K.N. & Gupta, P.C.;"Forecasting
Annual or Seasonal Peak Demand in Electric
Utility System"; IEEE Trans. Vol. PAS-90,
pp.591-599,1971.
3. Taraore, C.O.; Torres, G.L.; Lagoce, P.J. &
Mukhedkar, D.; "Applications of Neural
Networks For Load Forecasting"; 6th
National Power System Conf., Bombay,
TMH, pp. 417-422, 1990.
4. Ashraf, S.A.; Khan M.R. & Basu K.P.;
"Load Forecasting Using Artificial Neural
Network"; National Systems Conf. 1993, IIT,
Kanpur, pp. 127-130, 1993.,
5. Georg Gross; Galiana, "Short Term Load
Forecasting"; Proc. IEEE, Vol. 75, No.12, pp.
155-1573, Dec.1987.
6. Matthewman, P.D. & Nicholson, H.;
"Techniques for Load Prediction in Electric
8. IEEE Committee Report, "Load
Forecasting: Bibliography, Phase - 1", IEEE
Trans. on Power Apparatus & systems, Vol.
PAS-99, No.1, pp. 53-55, 1980.
9. IEEE Committee Report, "Load
Forecasting: Bibliography, Phase - 2", IEEE
Trans. on Power Apparatus & systems, Vol.
PAS-99, No.1, pp. 3217-3220,1981.
10. Braun, H; "On Solving Travelling
Salesman Problems By Genetic Algorithms";
Lecture Notes in Computer Sciences, Vol.
496, Springer Verlag, 1990, pp 129-133.
11. Heistermann; "The Applications of a
Genetic Approach As An Algorithms";
Lecture Notes in Computer Sciences, Vol.
496, Springer Verlag, 1990, pp 297-301.,
12. Goldberg, D.E. & Holland,J.H.; "Genetic
Algorithms, in Search, Optimization and
Machine Learning"; Addison Wesley, 1989.
13. Goldberg, D.E. & Holland, J.H.; "Genetic
Algorithms and Machine Learning"; Vol.3,
Kluwer Acedamic Publisher, 1988.
14. Mishra, R.K.; "Genetic Algorithms As
Function Optimizer and The Effects of
Crossover, Mutation & Popsize", M.Tech.
Dissertation, Dayalbagh Educational Institute,
Dayalbagh, Agra, 1993.
15. Agarwal, A.K; "Applications of Genetic
Algorithms to Optimization of Multi Variable
Problems"; M.Tech Dissertation, Dayalbagh
Educational Institute, Dayalbagh, Agra, 1994.
16. Short term Course on "Artificial Neural
Network Applications to Power Systems",
IIT, Kanpur, June 14-19, 1993, pp. E1-E34.,
17. Michalewiccz, Z.; "Genetic Algorithms +
Data Structure = Evolution Programs";
Springer Verlag, Berlin Heidelberg, New
York, 1992.
18. Suh, Y.H. & Gucht Van; "Incorporating
Heuristic Information into Genetic Search";
Proc.of 2nd Int. Conf. on Genetic Algorithms,
pp.100-107, Lawrence Emlbaum Associates,
1987.
19. Muzhlenbein, H.; "Parallel Genetic
Algorithms, Population Genetics and
Combinatorial Optimization"; Proc. of 3rd
Int. Conf. on Genetic Algorithms, Morgan
Kaufmann, 1989.
20. Holland, J.H.; "Outline for a Logical
Theory of Adaptive Systems", Journal of
ACM, 3:297-314,1962.
21. Holland, J.H.; "Genetic Algorithms and
the Optimization Allocation of Trails";
SIAM, J. Computer.,2:88-180, 1973.,
22. Chandy, K.M. & Mishra, J.; "Parallel
Programming Design - A Foundation";
Addison Wesley, 1988.
23. Brill, F.Z., Brown , D.E. & Martin, W.M.;
"Fast Genetic Selection of Features For
Neural Network Classifier"; IEEE Trans. on
Neural Networks, pp:324-333, 1992.,
24. Nowack, M. & Schuster, P.; "Error
Thresholds of Replication in Finite
Populations Mutation Frequencies and the
Onset of Muller's Rutchet", J. Theor. Biol.
Vlo. 137, 1989,pp.375-395.
25. Schuster, P.; "Effects of Finite Population
size and Other Stochastic Phenomena in
Molecular Evolution"; Complex System
Operational
Approaches
Neurobiology,
Physics
and
Computers,
Springer,
Heidelberg, 1985.
26. Fogarty,T.C.; "Varying the Probability of
Mutation in the Genetic Algorithm";
J.D.Schaffer, Proc. 3rd Int. Conf. on Genetic
Algorithms & Applications, Arlington, VA,
pp. 104-109,1989.
27. Booker, L.; "Improving Search in Genetic
Algorithms"; L.Davis,Genetic Algorithms
and Simulated Annealing, Pitman, London,
1987.
28. Greffensette, J.J.; "Optimization of
Control Parameters for Genetic Algorithms";
IEEE Trans. on Systems Man and
Cybernetics, Vol. SMC- 16, No. 1, pp. 122128,1981.,
29. Schaffer, J.D.; Caruna, R.A.; Eshelman,
L.J. & Das, R.; "A study of Control
Parameters Affecting On line Performance of
Genetic
Algorithms
for
Function
Optimization"; J.D.Schaffer, Proc. 3rd Int.
Conf. Genetic Algorithms & Applications,
Arligton, VA. pp. 51-60, 1989.
30. De Jong, K.A. & Spears, W.M.; "An
Analysis of Interacting Role of Popsize and
Crossover in Genetic Algorithms", Lecture
Notes in Computer Sciences, Vol. 496,
Springer Verlag, 1990.
31. Iba K., "Reactive Power Optimization by
Genetic Algorithm", IEEE Trans. PWRS, No.
9, pp. 685-692, 1994.
32. Miranda V., Ranito J.V., Proenca, L.M.,
"Genetic Algorithms in Optimal Multistage
distribution Network Planning", IEEE Trans.
PWRS, No. 9, pp. 1927-1933, 1994.
33. Chaturvedi D.K. Mishra R.K. & Agarwal
A.; "Load forecasting using genetic
algorithms", I.E.(India), vol.76, November
1995, pp 161-165.
34. Orero, S.O. and Irving M.R., "A Genetic
Algorithms for generational Scheduling in
power Systems", Int. J., Electric power and
Energy Systems", Vol. 18, No. 1, 1996, pp.
19-26.
35. Huang S.J., "Hydroelectric Generation
Scheduling – An Application of genetic –
Embedded Fussy System Approach", Electric
Power Systems Research Vol. 48, pp. 65-72,
1998.
36. Orero, S.O. and Irving M.R., "Genetic
Algorithms Modelling Framework and
Solution Technique for Short Term for
Optimal Hydrothermal Scheduling", IEEE
Trans. On Power Systems, Vol. 13, No. 2,
May 1998, pp. 501-518.
37. SongY.H., and Xuan, Q.Y., "Combined
Heat and Power Economic Dispatch using
Genetic Algorithm Based Penalty Function
Method", Electric Machines and Power
Systems, Vol. 26, pp. 363-372, 1998.
38. Wen F., Chang C.S. and Fu W., "New
Approach to Alarm Processing in Power
Systems Based on the set Covering Theory
and a refined Genetic Algorithm", Electric
Machine and Power System, Vol. 26, 1998,
pp. 53-67.