Ga2 PDF
Ga2 PDF
Ga2 PDF
SCHOOL OF ENGINEERING
DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING
By
F56/74802/2014
A thesis Submitted in Partial Fulfillment for the Degree of Master of Science in Electrical and
Information Engineering, in Department of Electrical and Information Engineering of
University of Nairobi
November, 2018
DECLARATION
I STEPHEN TABAN INYASIO, hereby declare that this thesis is my original work and it has
not been submitted for examination, for any a degree award in this or other any university.
This Thesis has been submitted for Examination with our approval as University Supervisors.
First Supervisor
ii
DEDICATION
This work is dedicated to my late father Inyasio may His soul rest in peace, my family, and
friends.
iii
ACKNOWLEDGEMENT
God bless those who endeavor to achieve the best of their ability. I thanks to God for guiding me
through this tedious task in good health. This work would have not been completed without Him.
I must in a strong term recognize the support and patient portrayed by my dear wife Josephine
Iromo. She had endured much during difficult times of balancing work, studies and the crisis in
the country.
I would like to appreciate my beloved mother Regina Jibrato, and all the family members for
their great moral support during this research project.
My deepest gratitude goes to my supervisors Prof. Nicodemus Abungu Odero and Dr. Cyrus
Wekesa for their support and patient guidance in the completion of this research work.
Finally, it is worthy to acknowledge all Staff members and supporting staffs in the Department of
Electrical & Information Engineering, University of Nairobi for their tireless efforts in bringing
the best out of students under their patronage.
iv
ABSTRACT
Short-term load forecasting (STLF) has emerged as one of the most important fields of study for
power system operation for system efficiency and reliability. It plays a significant role in load
flow analysis, contingency analysis, planning, scheduling and maintenance of power systems
facilities; therefore, the system cost-effectiveness is determined by accurate load forecast.
Numerous researchers have been done to improve the accuracy of the conventional methods such
as time series, regression analysis or autoregressive moving average (ARMA) and the use of
Artificial Neural Networks (ANNs) in load forecasting. ANN has shown more accurate results
than the others. But the training of ANNs, with a back-propagation algorithm or gradient
algorithms, requires long processing time has the difficulty in selecting the optimal order of the
components and trapping in local minima. This research aimed at solving this problem by
proposing a hybrid method based on Genetic Algorithm (GA) and Particle Swarm Optimization
(PSO) for training and optimizing the weights of ANN. The proposed hybrid method enables a
reduction in the search space and the iteration time. The proposed algorithm was tested in
MATLAB 2016® software using 24 hourly load data of different days (i.e. weekdays and
weekends) from Juba Power Plant (JPP), South Sudan. PSO, GA and a hybrid of genetic
algorithm with particle swarm optimization (HGAPSO) and ANN were studied and the resulting
mean absolute percentage error (MAPE) found to be range from 1.9% to 3.40%, 2.23% to 3.65%
and 1.47% to 1.98% respectively. The results obtained were compared and it was observed that
HGAPSO-ANN method has a better performance in reducing and improving forecast error
compared to PSO-ANN and GA-ANN methods. Therefore, a hybridized HGAPSO algorithm
with ANN improves forecast accuracy.
v
TABLE OF CONTENTS
DECLARATION .......................................................................................................................... ii
ACKNOWLEDGEMENT........................................................................................................... iv
ABSTRACT ................................................................................................................................... v
CHAPTER 1: INTRODUCTION................................................................................................ 1
vi
2.4.3 Genetic Algorithm ........................................................................................................ 16
2.4.3.4 Elitism:....................................................................................................................... 18
3.5 Input and output for the hybrid HGAPSO model ................................................................... 36
vii
CHAPTER 5 : CONCLUSION AND RECOMMENDATIONS ............................................ 58
REFERENCES............................................................................................................................ 60
APPENDINCES .......................................................................................................................... 66
APPENDIX A ............................................................................................................................... 66
APPENDIX B ............................................................................................................................... 71
GA CODE.............................................................................................................................. 71
APPENDIX C ............................................................................................................................... 77
viii
LIST OF TABLES
ix
LIST OF FIGURES
x
Figure 4-11: 24-Actual And Forecasted Load Profile For 22th July 2010 ................................... 55
Figure 4-12: 24-Actual And Forecasted Load Profile For 23th July 2010 ................................... 56
Figure 4-13: 24-Actual And Forecasted Load Profile For 24th July 2010 ................................... 56
Figure 4-14: Comparison Of Average Error Of Different Methods ............................................. 57
xi
LIST OF ABBREVIATIONS
xii
PSO-ANFIS Particle Swarm Optimization- Adaptive Neuro-Fuzzy Inference
PSO-GA-RBF Particle Swarm Optimization-Genetic Algorithm- Radial Basic Function
RMSE Root Mean Square Error
RNN Recurrent Neural Network
SA Simulated Annealing
SOM Self-Organizing Map
STLF Short-Term Load Forecasting
SVM Support Vector Machine
SVR Support Vector Regression
T&D Transmission and Distribution
TS Tabu Search
TV Television
WT Wavelet Transform
xiii
CHAPTER 1 INTRODUCTION
1.1 Background
Load forecasting (LF) is a prediction of load demand to help an electric utility in the areas of
generations, distributions, and operators in planning, economic dispatch, and management of
power systems. It plays a great role in power system planning, operation, and control[1, 2].
Load forecasting is the basic and maybe the most importance module of power systems planning
software. It helps an electric utility to make decisions in unit commitment that is which units are
to be available, when and where to allocate them so as to meet demand and have acceptable
reserve capacity.
This would help schedule plans for maintenance for unit to be taken offline for maintenance,
while to be online, reduction of generation cost as well as improving power system reliability.
Load forecasting has numerous timeframes depending on driving factors affecting load, this
include Short-Term Load Forecasting (STLF), Mid-Term Load Forecasting (MTLF), and Long-
Term Load Forecasting (LTLF) [2]. These driving factors are
• Times, such as
– Day or night hours
– Weekday or weekend
– Season of the year
• Weather condition, such as temperature and relative humidity
• Types of consumers such as residentials areas, commercial centers, industry, agricultural
farm, public, etc.
• Occasions, public holidays, TV programs, etc.
1
• Increase in Economy such as income per capita, Gross National Product (GNP), Gross
Domestic Product (GDP), etc.
• Tendencies in upcoming technology
• Price of electricity
As cited above, load predicting approaches are classified into Short-Term, Medium-Term and
Long-Term. The STLF is hourly prediction, whereas MTLF and LTLF are for daily and seasonal
predictions respectively [2]. Show in Figure1-1,
Electric load prediction is a critical step for electric power companies in the process of planning.
The purpose of load forecasting is to meet future demand, reduce unforeseen cost and provide a
possible input to the decision such as systems reliability, efficiency, distribution, transmission
(T&D) and the cost [3-6]. In order to plan for an effectivepower systems operation and control,
the utility company must be able to anticipate the consumers future demand, how to deliver it,
where and when[3, 7].Since the number of customers connected to a network increases
continually, demand increases, necessitating upgrade of facilities to greater capacity [7]. This
requires earlier planning, hence the role of load forecasting
To come out with appropriate approach for future demand prediction, there are a lot of
challenges electric companies in deregulated markets face such as weather prediction difficulty,
2
inability to store electricity, mass customer switching, different meter types, new or lost
contracts, data problems, models, etc. On the other hand, electricity moves at the speed of light,
making it faster to drop off at customer's end in a millisecond and possible to deliver in no time.
Therefore, because of all this, the customers’ demand load needs to forecast every hour; on a
continuous basis and any forecast error in Electricity Company resulted to very high cost.
In the effort to improve load forecasting, many researchers have utilized different methods such
as statistical methods, computational methods, and artificial intelligence optimizations methods
to enhance the forecast accuracy, minimize error, schedule maintenance as well as reduction of
the generation cost. However, these methods have presented significant results with some
limitations. Therefore, there is a need to explore new methods to come up with better solutions.
Some of the deficiencies reviewed in the literature review which need to be addressed to improve
the load forecast accuracy are:
Statistical Methods
1. Their performance deteriorates when a sudden change in variables that affect load
patterns happens.
2. They only consider static load data
3. Have a large number of complex equations, accompanied by long computation time, and
may result in numerical uncertainties.
Artificial Intelligence
3
1.4 Objective
The Overall objective is to develop a hybrid model based on Genetic Algorithms with Particle
Swarm Optimization (GAPSO) for training Feed Forward Neural Network (FNN) to forecast
next 24-hourly loads.
2. To apply actual historical load data obtained from Juba Power Plant (JPP) to
predict next 24-hour load profile using the developed models.
Load forecasting is an important tool to the electric utility for power systems planning such as
unit commitment, reduction of the reserve power, scheduling maintenance as well as reduction of
the generation cost. It is a multi-tasks practice. Artificial neural network techniques are superior
to statistical techniques for STLF. However, design of best possible network structures has not
yet been successful. Artificial Intelligence requires optimal design of network structure and
suitable training algorithm, in order to enhance the precision of the forecast as well as network
performance.
4
5. Will the hybrid model produced have any challenges or weaknesses?
6. What other constraints may be added to improve the new approach?
7. What parameters will be varied in the program and how will they affect the output of the
program?
8. Will the new approach be applied to real systems?
9. How significant is the research to Load prediction?
This thesis is organized in Five Chapters, as follow: Chapter One describes research background,
problem statement, deficiencies/gaps, objectives, scope of the work, and research questions.
Chapter Two reviews of related studies and this include load forecasting, load forecasting
methods such as statistical and computational methods. Chapter Three explains the methodology
and the proposed method respectively. Chapter Four elaborate results and discussion. Finally,
Chapter Five is conclusion and the recommendations.
5
CHAPTER 2 : LITERATURE REVIEW
To develop an appropriate forecast model which incorporate all factors affecting load such is not
an easy task [1,3]. Therefore, in order to develop an accurate forecasting tool, it is essential to
understand the characteristics of a power system load, the factors that affect the shape of a load
profile and all the parameters involved in load demand. Figure2-1Shows the trend in the supply
of electrical demand over a time period[9].
Time: The power system load behaves differently at various times in a day over a 24-hour
period. The load at midnight is different from the load at peak hours of the same day as well as in
evening as show in Figure 2-1.
6
Figure 2-1: Daily load profile for 24 hours [3]
Day type: Weekday and weekend has a relatively high influence on the energy consumption as
mostly a weekend load is lower than a weekday load. Therefore, the load of weekday is
relatively different from weekend.
Weather Factors: Temperature, moisture, rain, wind speed, cloud cover etc., have influences
the load profile. The change in weather such as a hot day or cold day will result in the use of
electric machines either switching on the air conditioner on a heater.
Seasonality: The Seasons of the year have an influence on the energy consumption of a
customer.
Economic: The GDP and GNP of a country influence the utilization of electricity, if the
economic factors i.e. GDP, GNP shows a promising future, and the new electricity-based
appliances are coming up in the market, the electricity consumption may increase as well in all
classes of the consumers. In short-term load forecast the economic inductors such as GDP and
GNP are ineffective; however, they may have strong effective on MTLF and LTLF.
Electricity Pricing: The price of electricity has a major role in electric energy consumption by
the customer. The increase in electricity prices may resulted in a reduction of forecast load, as
many customers may control their electricity consumption[2]. Vice versa, if the electricity prices
are predicted to be low, customers demand will increase.
7
Special Occasions: (TV programs, public holidays, etc.)
Holidays: Demand on public holidays is not the same as on “working days”. They have different
forecast models. All the factors mentioned above can be incorporated together to design load
forecaster model that based on historical data, however, irregularities do occur which could
cause deterioration in the accuracy of the forecast. These are a few factors that are difficult to
incorporate into short-term forecasting model, such GNP, GDP, etc. they are ineffective to be
incorporate in STLF forecaster.
A large variety of Statistical and artificial intelligence techniques have been developed for Short-
Term load forecasting [10]. The statistical load forecasting methods exploit time
series[11].These methods used static load data with regular distribution features to correlate the
relationships of the electricity consumption and other factors. The statistical methods have
disadvantages because it used the historical data for future load predation and incapability to
adapt with dynamic load series. Since the load is dynamic, a difference between current load and
past load data present will result to large forecasting errors [12].
The application of computational intelligence techniques has been widely studied in electric load
forecasting. They are essentially circuit dynamically adaptable and have demonstrated capacity
to do non-linear carve fitting and forecasting error is less as compared with statistical forecasting
techniques. Computational intelligence techniques can be combined as Hybrid methods to
enforce a load forecasting techniques [8,9 ,10]
8
A. Jain and B Satish, et al (2009) [14] applied fuzzy to provides load prediction data for load
economic dispatch, generation scheduling at all time. A. Jain compared forecasted load with the
conventional methods forecasted values. The estimated load matches the actual load within ±3%.
A. Kumluca and I. Erkmen, et al (2003) [15] Used hybrid learning approach of recurrent neural
network which have one or more feedback loops to forecast one day in advance. The authors
expressed that the model can be applied to real-time application that has historical load data, the
recent observed data can be supported by online learning phase of weights update within certain
periods. The author described that, the proposed model shows considerably better results.
J.Nowicka zagrajek, R. Weron et al (2002)[17] applied ARMA with hyperbolic noise to forecast
real data of the California System Operator (CAISO) using new seasonality removal technique,
the authors tested the effectiveness of the method by comparing the real load data with the
predicted values. The approach produces a 1.2–1.25% APE difference, whereas the CAISO
returnederror is 1.7%.
H. NieG.Liu, X. Liu, et al (2012)[18] appliedthe combination ARIMA and SVM to predict load,
where ARIMA model was applied to forecast static part of the load and the SVM was employed
to handle nonlinear load, the authors’ stated as a hybrid model ARIMA –SVMs, produced better
results. The Error analysis for model ARIMA, SVMs, and ARIMA-SVMs MAPE are 4.50%,
4.00%, and 3.85% respectively and the RMSE (MW) 43.4, 38.77 and 35.72 respectively.
9
2.4 Computational Intelligence Techniques
Artificial Neural Network (ANN) is an Artificial Intelligence derived from biological natural
systems of human brain[52], McCulloch and Pitts were the first to introduce Artificial Neural
Network in (1943) [53]. The ANN processing components called input, hidden and output layers
or nodes interconnected with synapses weights [54]. The ANN synapses control the inputs and
nonlinear characteristic of the transfer function in hidden neurons [24]. The neural networks
consist of input and a hidden layer as well as the output layer as shown in Figure 2-2.
The Figure 3-2 depicted, Three-layer Forward Neural Network to interchange data received and
handle it accurately and effectively[25].
10
Figure 2-4: Three-layer Forward Neural Network.
From the above Figure 2-4, the n set of problems to network is expressed as linear combination n
inputs. Therefore, for the n-inputs and output, signals X1, X2, --------------, Xn flows via neurons at
hidden layers and to the output signal flow Yo. The output equation is formulated as
n
Y0 = f i xi i = 1, 2.......n (2.1)
i =1
Where, w = 1,2 .....n R n is called the weights vector? The weight (i )
n
i =1 assign to each
input synapse. It may be positive or negative. f is transfer function and, n is the input number,
ij the weighted link to the inputs ith to jth hidden layers, and j is the threshold hidden
layer. Assuming that the transfer function at the hidden layer is tan sigmoid, the linear output
can be formulated as follow:
f (H j ) =
1
(H j )
, j = 1, 2................................m
1 + exp (2.2)
n
Hi =
i =1
ij * xi − j (2.3)
11
yo = (wkj * f (H j )) + , k = 1, 2 ………0
m
(2.4)
j =1
Where, kj is a weight link vector between the jth hidden layers and kth outputs layers. For n
inputs, and n outputs of network, such as = x1 , x2 ,...., xn input vectors and the vector weights
W = 1 , 2 , 3 ,.....n , and Yo is the output. Suppose the sets of training inputs i.e.
1 = (11 , 21 ,.......... n1 ) → y 1
2 = (12 , 22 ,.......... n2 ) → y 2
: (2.5)
:
k = (1k , 2k ,.......... nk ) → yk
For given input , the resultant learning error and mean percentage error can be discribe to
measure the effectiveness and response of the network system as follows
1 n Ek
MSEError =
n k =1 yi
(2.6)
The objective function is expressed with the mean absolute percentage error (MAPE) as
1
Objfunc. = (2.7)
(1 + MAPE )
1 n yi − d i
MAPE = * 100 (2.8)
n i =1 yi
S. Quaiyum, Y. Khan, S. Rahman, et al.(2011) [26] conducted the study on different methods of
short-term hourly load prediction using different types of ANNs, such as RNN, PSO, ERNN, and
PSO-ERNN. According to their discussion and the comparison, The Elman Weather sensitivity
model gives a good result; however, it has longer processing time compared to ENN and PSO
with recurrent neural networks which are faster but slightly more prone to errors.
12
I. Ibraheem, D.Ph, M. Ali et al (2014) [27] described ANNs as one of main tool applicable in
machine learning. As the name neural suggested, the neural network is brain inspired systems
which are intended to replicate the way that human learn. The learning capability of ANN is
attained by regulating the weights according to the chosen learning algorithm [28].
Li, Song Wang, Peng Goel, Lalit et al (2015)[30] developed hybrid model based on Wavelet
Transform Extreme Learning Machine (ELM) and partial least squares regression. The
individual forecasts models were derived from combinations of WT with different levels of
decomposition, for each sub-section from WT decomposition consist of 24 parallel ELM
invoked to forecast hourly load of the next-day. The numerical result shows the proposed method
significantly improved forecasting performance.
Fuzzy Logic concept started in the mid-1960 initiated by Dr. L.A. Zadeh. It is based on
computational set of rules and thinking. Ithelpsin solving logical problems and gives
decisions[31].
Assemblyof the Fuzzy Logic Inference comprises of three theoretical parts, i.e.
• Rule part, where ‘if conditions’ are set to carryout logical statements
• Databank or database defines the relationship of the functions.
• Intellectual tool: it does the inference process depend on the rules set for it and derives a
rational output and conclusions.
I. Harrison, et al (2014)[32] conducted a study on an hour ahead load for the company located in
the north eastern of Nigeria based on adeptive neuro-fuzzy inference system (ANFIS). From the
13
results obtained by ANFIS model, the author concluded that the ANFIS is a better model for one
hour ahead load forecast.
S. Pandian, S. Duraiswamy, K Asir, C Christopher. et al. (2006)[35] applied Fuzzy Inference and
the fuzzy rules for STLF, the method was simulated in MATLAB and using data obtained from
Neyveli Thermal Power Station in India. According to the authors, the results show theerror
±3%.
A. Ghanbari, N. Kandil. M. Saad et al. (2010)[38] conducted a study to compare the Artificial
Intelligence techniques for short-term load prediction, the AIs such as (ANN), (ANFIS) and
Genetic Algorithm (GA).The results of approaches were compared using Means Absolute
14
Percentage Error (MAPE). The authors described that the ANFIS output result is approximate to
real load than ANN and GA. ANFIS are anappropriate tool for STLF problems.
M. Othman, I. Musin, Q. Razaet al. (2012)[39] tested the application of ANNs to STLF. The
author’s observation of the pure ANN models that were constructed and tested was that there
was room for improved forecasting which lead to the introduction of an expert system. The
resulting forecasting errors ranged from 0.5% to 2.5%.
A. Badri, Z. Ameli, Z, A. Birjandi et al. (2012)[40] proposed fuzzy logic system with a network
structure and learning steps similar to neural network thus giving it the name Fuzzy Neural
Network (FNN). The authors discovered that the FNN could forecast the future load with
accuracy similar to that of neural network. The error ranged from 2.43% to 3.06% for the FNN
while their ANN error ranged between 2.3% and 3.14%
M. Buhari, S. Adamu, et al. (2010)[42] applied ANN to forecast the daily load of the 132/33kV
sub- Station, Kano, Nigeria, the Levenberg-Marquardt optimization technique as (BPA) was
applied to learned ANN. The authors reported that the method is recommended for future load
demand prediction.
G. Liao, T. Tsao, et al. (2004) [43] discussed on integration of the fuzzy neural network, with the
simulated annealing and evolutionary programming(EP) to forecast load, FHRCNNs was
applied for searching optimal parameter of EP. The authors described evolutionary programming
is capable of getting global best value, however, inability to get the local best pointsearch and the
simulated annealinghelps in local optimal search.
P. Li, Y. Li, Q, Xiong et al. (2014) [44] introduced genetic algorithm to obtain suboptimal
structure of hybrid Quantized Elam Neural Network (HQENN) to forecast hourly load, using the
inputs data such as historical data, predicted temperature and time index. The authors applied
quantum law to describe the interface of qubit neurons and the classic neurons.
15
2.4.3 Genetic Algorithm
Genetic Algorithm (GA) is heuristic search computation based techniques inspired from natural
biological selection by Holland, 1975 [44], which based on mechanism of the biological
organism that has been adopted and prospered in the highly competitive changing environment,
according to theory of survival of the fittest by Darwinian [45], or simulates the process of
natural evolution [46]. Genetic algorithm (GA) optimization is applicable in any control
processes for parameters optimization, via the mutation and crossover operators to select the
optimized values[47]. The proper selection of the crossover and mutation values depend on the
problem requirements and the encoding methods[38].
The genetic algorithm looks for solutions in large spaces using the operators by crossing the
parents, mutation, and selection, whereby the probability of global increasing as well as the
convergence [34]. The results of the crossovers are the offspring. In mutation, GA randomly
changes some of the genes values of the parents [7, 38]. In general, this work presents genetic
algorithm as optimization technique which has ability to search a solution in a vast region to
come up with optimal results.
GA search starts with the set of solutions representing the chromosomes called population; the
solutions are taken from one generation to form new generation with the motivation that the
possibility of the new generation will be better than previous generation. Further solutions were
selected based on their fitness f(x) to formed a new solution called offspring.
Where, = 1 , 2 ,......, n , represent the vectors of the optimal parameters. The building
block of the Genetic Algorithm is formed of chromosomes where genes are concatenation in the
form of binary strings Chrom = S11 S 21 ..., S 11 , S12 S 22 ...S 22 ,....., S1n S 2n ....S nn = 1 , 2 ,......, n ,
th
Where S li is gene string, i the code length of gene string, i optimization parameters &
16
Figure 2-5 shows the flowchart representation for a basic GA algorithm.
The n-chromosomes is initially created randomly as vectors n-gene, each vector represent a point
search solution in the search space of the problem.
2.4.3.2 Selection
The selection of best genes according to their objective functions and generates temporary
population, is done by selection operator, such as tournament, random and roulette wheel
selection. In the roulette wheel, each solution candidates are sort according to fitness of the
function which reflects the function of the previous solutions candidates.
17
2.4.3.3 The Crossover and Mutation
These operators are a basic component of genetic algorithm; crossover may be of single, multi
and uniform point crossover.
2.4.3.4 Elitism:
Elitism is the process of keeping the best genes or chromosome from generation to generation
and replaced worst gene, or chromosome from the old generation with the newly created from
the old generation. Therefore, the process of conserving the elite parent is called elitism.
The fundamental components for genetic algorithm implementation that should be considered
are the population, parameters and the GA operators. The following procedures for implementing
genetic algorithm are specified below:
3. The selection: The selection of best two individual parents from the population to mate,
depending on individual fitness, and check the stopping criteria.
4. Crossover and mutation. The probability of the crossover, the two-parent crossover to
produced new offspring’s called children. If the crossover is not happened, the
offspring’s is copy of the parents, while in the mutation mutate a new offspring at each
point.
5. Accepting. Place new offspring in the new population to next generation.
18
6. New population: Discard the non-elite population members and replace with the new
children
7. Repeating steps 4 and 5 number of times to generate number of candidates at mating
pool
8. Elitism: keep the best for next generation and discard worst.
9. Check the convergence criterion at certain iteration; if the end condition is satisfied stop
and return the best solution in current population, keep the solution as final result. Or else
return to step 2
B. Islam, Z. Baharudin, Q. Raza el at. (2013)[50] integrated Genetic Algorithm with Artificial
Neural Networks for STLF, the Genetic Algorithm was used for initial weight selection and
structure optimization of FFNN. The authors expressed that the forecast precision of the
approach is enhanced.
F. Yu, X. Xu, et al. (2014) [51] Proposed a combination of Back-Propagation Neural Network
with Genetic Algorithm for STLF. GA was used to train and decide the initial weight of BP
neural network, such as not to stuck in local minima.
S. Yu, K. Wang, Y. Wei, et al. (2015)[54] applied hybrid of artificial intelligent algorithm such
as genetic algorithm and particle swarm to improvethe Radial Basis Function, the model was
used to forecastyearly energy consumption in Wuhan. Authors describe the model as
unsupervised prediction model. The combined PSO-GA gives an advantage in searchability both
at global and local search.
19
2.4.4 Particle Swarm Optimization
Particle Swarm Optimization (PSO) is evolution algorithms developed by Eberhart and Kennedy
which based on optimization theory of swarm intelligence algorithm [55]. The particles in the
swarm compete amongst themselves to created intelligence of particle [55]. In the Swarm, each
particle fly search solution in space with velocity and position [56]. At a time of convergence,
every particle converges to the best position attained by previous particles, and the global best
positionof swarm. The particles movement and locations experienced is calculated iteratively
[45,46]. The process involves the updating of a particle velocity and position with time until the
best solution is obtained. The velocity of a particle is update depend to three factors, such as the
velocity, the best position moved or experienced and the best position of the whole swarm has
experienced as depict in the Figure 2-6 and 2-7.
20
Figure2-7 Velocity updating in PSO
In the process of "particle" finding the optimal solution, its velocity Vi ( t ) , direction, and position
i ( t + 1) = i ( t ) + Vi ( t + 1) (2.10)
is the inertia weight for learning equilibrium between local and global search.
21
2.4.4.1 PSO Parameters
In the equation (2.9) and (2.10), the position of a particle at time (t) is i ( t ) and Vi ( t ) the
velocity. pbest ( t ) , a particle best position attained, and gbest ( t ) is the global best position
experienced by a particle in a swarm. C1 and C2 are initial values of learning coefficients factors
influencing the pbest ( t ) , and gbest ( t ) position of the particle, 𝑟1and 𝑟2 are the random values
within the range (0,1) . , is the inertia weight which provides learning equilibrium between
local and global search, formulated as follows:
max − min
= max − * It (2.11)
Itmax
Where, ωmax and ωmin are the maximum and minimum inertia weight respectively, It iteration at
time t=0, and Itmax the maximum of allowable iteration. The equation (2.12) indicated the
particle best position of the particle i, which is the best position that the particle has visited and
equation (2.13) is a single best solution found called the global best particle, in the entire particle
in the swarm.
22
2.4.4.2 PSO implementation Steps
In the PSO algorithms, the population particles in the swarm represent sets m possible solution.
1. Initialization
Initialize the population of particles with random position and the velocity, inertia weight,
acceleration constants in the swarm
2. Fitness
For n number of the particles, evaluate the objective function and the fitness of particles
using the Equation (3.5).
3. Compare the fitness value of each particle (3.11) using objective function and save as
best for each particle, choose the best as the value obtained.
The position update and the velocity of the particles is obtained using the equations (3.7)
and (3.8)
Evaluating the fitness values of the particles and updating gbest andpbest values using
equations (3.11) and (3.12)
One the stop conditions are met proceed to step 7, otherwise return to step 2.
7. End simulation.
Figure 2-8 depicted the flow chart of a basic Particle Swarm Optimization algorithm.
23
Figure 2-8: Flowchart for basic PSO Algorithm
P. Duan, K. Xie, T. Guo, et al. (2011)[56] applied a combined fuzzy logic FCM, artificial
intelligence PSO with time series SVR techniques in short-term load forecast, The authors firstly
used Support Vector Regression to forecast the load separately, while the same data were applied
to PSO-SVR, the results found for PSO-SVR and FCM are 1.443% and 1.066% respectively.
Z. Bashir, et al. (2009) [58] trained Adaptive Artificial Neural Network (ANN) with Particle
Swarm Optimization (PSO) and BP to adjust weights ANN. The author described that method
has a higher load forecasting accuracy compared to BP.
H. Pousinho, V. Mendeset al. (2011)[59] presented a hybrid artificial intelligence (AI) of PSO
with ANFIS, for daily wind energy prediction. Authors outline the proposed method is
innovative and effective, with MAPE of %.41% and less computational time compared to
ARIMA, NN, NNWT, WNF,and HPA.
Despite of variousmethods which have been studied to improving the precision of the load
forecasting methods, the design the optimal ANN topology, as well as the number of neuron,
long processing time and stuck at local minima, [23,26]still challengeable. The factors that affect
24
the demand are either unknown or random; in particular the forecasting of a load for special
occasion days such as holidays, days on which strikes occur or extreme weather conditions,[60].
Hence the current research is interested at improving the error accuracy in STLF using hybrid of
GA-PSO model.
25
CHAPTER 3 : RESEARCH METHODOLOGY
The current trend in the technologies with advances in computing, the system complexity
became more complex especially in electric power systems where the generations, distribution
and customers system growing rapidly. To handle these very large scale problems it requires
different optimization techniques to be incorporated [28], theseoptimizationtechniquesare
Artificial Intelligence and Evolutionary Algorithms. They are often hybridized with several
heuristic approaches to facilitate and solve the complex optimization task[28]. The studies have
been carried out on applications of these Artificial Intelligence and Evolutionary Algorithms
techniques. However, there are different optimizations techniques which can be used in
enhancingthe forecaster precisionso as to improve the accuracy. Hence, a lot of optimization
techniques need to be explores.
In the past decade witnesses the exciting advance in applications of artificial network for solving
many optimization problems in power systems such as load forecasting [19, 20], fault diagnosis
[61], construction cost estimations [62], there are many algorithms used for learned artificial
neural network, such as Back Propagation [33][38][43] Genetic Algorithm [39], Simulating
Annealing [21], Particle Swarm Optimization [54][58].
So far, the most functional learning algorithm for Artificial Neural Network is the gradient-based
backpropagation (BP). Although back propagation has been used for learned ANN to solve many
problems, it has some limitations, firstly BP algorithms easily get stuck at local minima,
secondly, slow in convergence as compare to conventional computation system, which may be
good at accurate and exact computation, however, weak in operations. Evolutionary computation
provides a more robust and efficient approach for solving complex problems [63].
26
Although, researchers revealed that evolutionary algorithms, such as GA and PSO have been
proposed for learned the ANN. Meanwhile, the GA and PSO are the heuristic and Stochastic
search algorithms, they have less tendency to get stuck in local minima, and both are population
based of group of individuals particles with a specified similar to biological phenomenon. These
similarity phenomena let to increasingly development of EA computation very interesting field.
Furthermore, a possible disadvantage of PSO is premature convergence, because it requires an
additional momentum. By incorporate of the genetic operators in the PSO may provide the
balance between the global search of GA and social thinking ability in PSO will improve the
ability of hybrid algorithm.
The Genetic Algorithm search end solution negatively since they are discarded progressively
during iterations. In other way, the strength of Particle Swarm Optimization and its flexibility to
absorb other parameters are presented. Therefore, genetic algorithm was adopted be used in
initial stages for exploration and then a Particle Swarm Optimization improved by incorporating
the GA’s operators was selected to be used later for exploitation determination. The
hybridization of two optimization techniques strength was believed to over excellent results.
There are several ways to incorporate the advantage of GA and PSO to come out with a better
technique for learned ANN. Recently, hybridization of GA and PSO is become popular dur to
their abilities to handle several-real world problem which are more complex, uncertain and
imprecision. Figure 3-7 depicted the flow chart of proposed algorithm.
The concept behind these hybrid algorithms is to combine the search abilities of the algorithms
to optimizing the weights and the bias of ANN. The hybridization of GA and PSO optimization
technique strength provides exploration for global search and the exploitation of local search in
different undiscovered regions.
The proposed hybrid method works as follows. First, initialization of population n-pop of n
candidate solutions is generated randomly within the interval [xMax, xMin], for each iteration
(It ) of algorithm. Using GA selection and recombination operations were applied in n-pop to
27
produce new solutions in current population. The current population n-popt-1 was enhanced and
evaluated according to the objective function and best solutions are recorded.
After the new generation is created, particle swarm optimizations enhance individuals’ particles
by interchanging the social information among them and the learned knowledge. The improved
ones are reproduced and selected for crossover. Offspring’s reproduced from improved ones are
expected to have better performance than the old population, hence the weak performance
individuals will be discarded from generation to generations. This hybrid iterative search process
continues until specified stopping criteria was satisfied.
The total number of the weight of ANN depends on input nodes, hidden nodes and output nodes,
which are formulated below,
T.N.Ws = ( Inn + 1) H n + ( H n + 1) On
(3.1)
Whereas Inn are the input nodes, H n , the number hidden nodes which correspond to the weight
The initial weights were randomly initialized within the interval [xMax, xMin], and each weight
are weighted link between the neurons of the layers to another. In the research, we have
represented the individuals such that each individuals chromosome contain a number of gene
representing the weights of ANN
The fundamental components for genetic algorithm implementation that should be considered
were the population, parameters and the GA operators. The following procedures for
implementing GA are specified below:
The n-chromosomes GA was initialized randomly as vectors n-genes within the interval [xMax,
xMin], these-vectors represent a possible solutions of the problem.
28
3.2.4 Roulette Wheel Selection Method
In the roulette wheel approach, a probability of selection pi assigns to each individual q. Each
individual is selected according to their fitness which reflects the fitness of the previous
individual chromosome. So, a series of N-random numbers is generated and compared against
n
the cumulative probability cpi = pi of the population. Roulette wheel selection method was
q =1
develop by Holland at el[64], state that if the fitness of individual i in the population is fi(x), its
chance of being selected to next generation is
f i ( ) (3.2)
Pi = n
f q ( )
q =1
Whereas, the n is the total number of the individual in a population and f ( ) , is objective
function of the individual i. Thus, each individual has a chance to become a parent in next
generation according to its fitness. In other selection methods, the individuals with better fitness
have highest chances of selection which is biased. It may neglect the best individuals of a
population, therefore, there is no assurance that, the best one will pass to succeeding generation.
The roulette wheel selectionmethod, the parent is selected according to the fitness. Each
individual is designated to a slice of roulette wheel, the slices sizes are proportion to the
individual’s fitness, therefore, the bigger the value the larger the slice size. However, individual
with best or worst fitness has chances to be selected for next generation. This is a merit,
however, the solution may be having weak results, but it could be useful for following
regeneration process.
In this research work, the algorithm employed GA to do exploration while roulette wheel
selection techniques were used for selection, thus making the process the most complimentary.
29
of the same similarities in early stage of evolution[64]. However, crossover operation of the
parents could not generate different offspring, because they acquired the same information which
is applied to crossover the chromosomes. Whereas an alternate operator, called mutation can
help in exploration new areas compared to the crossover. Therefore, the crossover is used for
exploitation while the mutation is applied for exploration new one.
In this research crossover and mutation operators has been used to both Genetic Algorithm and
Particle Swarm Optimization of the hybridized algorithms. The operators help to avoiding early
convergence, partial optimism and thus enhance the performances of the algorithms. Boden hofer
et al 2004 [65] assumed that handling n-dimensional optimal problems, i.e. = R n . Then, then-
dimensional vector of individual is denoted as real numbers.
a = (1 , 2 ......, n )
( ) (
Given two parents a 1 = 1 ,......, n and a 2 = 1 ,......, n
1 1 2 2
)
(
)
To reproduce the new offsprings a = 1 ,......, n for all i=1, 2………, n. Arithmetic
crossover applied to calculate mean of the parents.
Where βi a uniformly distributed random value from the unit interval is used to compute the
offspring,
3.2.7 Mutation:
If the element X is selected for mutation, the resulting offspring is given by;
30
x k = x k + Δx k (3.5)
ψ
Δx k = +( xMax − x k )(1 − rand (1−It/MaxIt) ) (3.6)
The xMaxis a maximum limit of search space, xMin is the minimum limit of search space, It is
initial iteration at time t=0, MaxIt is a maximum limit of the iteration, ѱ is a parameter
determining the degree of iterations.
In proposed GA algorithm flat crossover and mutation was employed to avoid the process of
encoding and decoding of the chromosomes, thus, speed-up the algorithm and facilitated in less
computational time.
Siriwardere et al. (2006) [66] presented the variation and probability selection of crossover and
mutation for urban drainage model optimization. The authors describe that 80%probability work
best for crossover and 1% is the best figures to work for mutation. Therefore, 80% crossover and
1% mutation profanities have been used in this research work.
The PSO developed to enhances individuals reproduced from GA by both sharing information
between each other and their individually learned knowledge. Then, these enhanced individuals
are reproduced and selected as parents for crossover operation. The process involves adjustment
of velocity and position of particles involved towards the best particles position, the global best
position experienced by particle, hence the updating the velocity and position involves the
equation (3.7) and (3.8) as illustrated below.
i ( t + 1) = i ( t ) + Vi ( t + 1) (3.8)
This research work proposes the use of a hybrid of Genetic Algorithm (GA) and Particle Swarm
Optimization (PSO) for optimizing Artificial Neural Network (ANN). The ANN is considered to
forecast next day load profile with the aim of reducing and improving forecast error.
31
The Figure 3-7 show flow chart of a hybrid Genetic Algorithm (GA) and Particle Swarm
Optimization algorithm (PSO)
32
3.3 Prediction and Data Processing
The ANNs input data fitting requires a proper selection to minimize the variation of sampled
input and output data to improve the accuracy, first, the original data set needs to be normalized.
In this research, the linear transformation technique is used to normalize the data, shown as
follows:
i − min
n = , i = (1,2,..................................n )
max − min (3.9)
Where max is a maximum and min is minimum value, n is the matrix data vector
In this project, the data sets, historical load data and weather data for analysis were obtained
from Juba Power Station (JPS) and Juba International Air Weather Station (JIAWS) for the year
2010 are used to build the GA-PSO with ANN to predict daily electric demand. The data from
January to April was used for validation of the proposed method. The data was grouped into
weekday load data and weekend load data because the weekday and weekend have different load
activity.
DeCoursey at el. 2003[67] conducted studies on correlation analysis on two dependent variables
of X and Y to determine the relationships. Peter X-K, Song atel. 2007[68], both the authors
expressed that if the variables are dependent, they are linearly correlated. The measure of
correlation coefficient relationship of two variables can be calculated as follows;
n
S xx = (x i − x )
2
i =1 (3.10)
n
S yy = ( yi − y )
2
i =1 (3.11)
33
n
S xy = (xi − x ) ( yi − y )
2 2
i =1 (3.12)
S xy
rxy = (3.13)
S xxS yy
Whereis co-variance of x and y. Sxx and S yy is the mean deviation of x and y, rxy is correlation
coefficient.
Correlation (X, Y)
rxy =+1 Positive correlation
rxy =-1 Negative correlation
rxy =1 Perfect correlation
rxy =0 No correlation between the variables’ and y
The samples of load data and weather data were used to get information about the correlation
between load data and the weather variables. The regression analysis presumes that the
independent variable has no error and the dependent variable has a random error.
Correlation analysis was done to correlate the weather variablesand the load, and determine
which weather variables have significant effect on loading substation. The weather variables
which were taken into account are daily observed Temperature and daily observed Relative
Humidity; other variables are not included because of data inadequacy. The Table 3.2 shows the
correlation results.
From the Table 3.2 of correlation analysis above, shows the temperature has significant effect on
the load contrast to relative humidity, hence, temperature will be include in load forecasting.
34
Figure 3-2: Total Load and Relative Humidity
From the Figure 3-2 depicted, load varies, while the relative humidity seems constant.
From the Figure 3-3 depicted, the total load varies relatively with increase in temperature, thus
indication that temperature play significant role on load profile, therefore, temperature has
impact on load forecasting.
35
Figure 3-4: Daily load curves for one week.
Table 3-3: PSO and GA optimal parameters
Thehistorical load data and weather data for analysis were obtained of Juba Power Station (JPS)
and Juba International Airport Weather Station (JIAWS) for the year 2010. The data were
clustered as weekdays from Monday through Friday, Saturday and Sunday as weekend due to the
36
different load profile of weekday and weekend, the weekdays load curves have relatively similar
shape for different weeks. Figure 3-4show daily load curves for one week from, Monday to
Sunday. The inputs to hybrid model used 24 hours load of day, the previous day, 168-hour load
for the week and the previous week. One layer for output representing time ahead 24 hoursload
forecast for next day.
The idea behind clustering the data and taking specific inputs was to consider the number of
hours of the day, the effect of the temperature variation on the load, weekday and weekend and
how they reflect on load pattern.
The simulation process for getting the forecast results, which is the network learning process, can
be summarized below:
a) The load historical data was read and loaded from excel data sheet (Datafile.xlsx’) and
it’s then normalized to the range of 0-1.
c) The ‘Datafile.xlsx’ file is read using ‘xlsread’ function load inputs and target.
d) The network is then created ‘fit net’, with number of inputs and output. Since there are no
rules set for determining the structures of the artificial neural network, therefore, in this
proposed model, the numbers of the neurons at the hidden nodes were determined by trial
error. The appropriate numbers of neurons for the proposed hybrid model are 30 neurons
used in the hidden layers which producedbetter MAPE and APE, as shown in Figure 3-5.
e) The data from May-July 2010 was applied for learning the neural network and from the
July 2010 data were used for neural network validation.
f) The output results of the ANN were renormalized and a compared with the input data of
neural network.
37
In this research, the designs of ANN, GA, PSO, and HGAPSO were simulated and the sequence
results are show in tables, Table 3-4, Table 3-5 and Table 3-6.The values in the Table 3-3 were
adopted by Mishra et al 2008[69] and validated by experimentation with other values.
The ANN with 24 inputs, 5 nodes at hidden layer and output layer i.e. N=30 are all connected,
the hidden nodes were increases to obtain the minimum neurons at hidden nodes that would
produce the lowest MSE and MAPE. The network design configuration was taken based on the
results
The network topology is taken from the best performing approach as it is illustrate in Table 3-4,
Table 3-5 and Table 3-6 and performances were compared.
38
Figure 3-5: HGAPSO-ANN Performance Nodes Based on MAPE
39
Table 3-5: PSO-ANN Model Performance
40
Figure 3-8: PSO-ANN Model Performance Nodes Based on the MSE
41
Figure 3-9: HGA-ANN Model Performance Based on the MAPE
42
CHAPTER 4 : RESULTS AND DISCUSSION
This chapter presents the result obtained for different 24-hour load forecast using learned ANNs.
MAPE and MSE for the forecaster inputs are presented showing significance of the approaches
and graph plots for the forecaster inputs were also presented to visualized the relationships
between the forecast load and the real load. To simplify the size of the forecaster discussion, the
correlation analysis results for chosen 24-hour load forecast days are tabularized and discussed.
Load forecast results are presented along with 24-hour load forecast profile plots for selected
days.
The Tables from 4-1 to 4-3 show the MAPE and MSE obtained by different approaches for
different days respectively. The GAPSO-ANN showed the best performances for working and
weekend day. Tables4-4 to 4-5 show the daily load correlations for various approaches which
indicated a positive correlation between the actual and forecast loadand Table 4-6 presented one
Week Forecast models comparison of the forecasters.
43
Table 4-2: MAPE (25/07/2010 to 31/07/2010)
44
Table 4-4: Correlation R (04-10/01/2010) and Correlation R (06-13/11/2010)
45
Table 4-6: One Week Forecast models comparison
Week Forecast
NETWORK MAPE APE R
PSO-ANN 0.002 0.276 0.992
GA-ANN 0.010 1.691 0.990
HGAPSO-ANN 0.000 0.009 0.987
The 24-hour-ahead load forecast results for selected days from a week are tabularized in Tables
4-7 to 4-11. The MAPE results in Tables 4-7 to 4-11 for forecasters (PSO-ANN, GA-ANN, and
HGAPSO-ANN have an approximate average range of 1.99% to 3.04 %, 2.23% to 2.64%, and
1.47% to 1.98% respectively. The results obtained are compared to MAPE results found in the
STLF [70][71][72][73].
The higher error values highlighted with a yellow colour and the minimum error value
highlighter with a green colour represent hours where the actual load profile experienced a
planned or unexpected outages or other abrupt load change of the system.
46
Table 4-7: 24-Hourly forecast results date 19/07/2010
47
Table 4-8:24-Hourly forecast results date 20/07/2010
48
Table 4-9: 24-Hourly forecast results date 22/07/2010
49
Table 4-10: 24-Hourly forecast results date 28/07/2010
50
Table 4-11: 24-Hour forecast hourly results date 30/07/2010
51
Figures 4-1 through 4-13 illustrate the forecasted and actual load shapes for the 24-hour period.
These plots also show the absolute percent error (APE) profile over the 24-hour period.
Tables 4-7 through 4-11 lists the hourly actual load, predicted load, and associated with each
absolute percent errors (APE) forecasted load profile, in Figures 4-1 through 4-013 show the
load get peak between 05:00-07:00 hours and 15:00- 17:00 hours, when the load advanced
toward the peakfrom minimum load levels, and leftward the peak to minimum load levels.
The higher error values on 19 July 2010 occurred during peak load level and on 28 July 2010
occurred during minimum load level. This demonstrates the chaotic load profiles experienced
during the weekdays. The weekdays load profiles are not as smooth as the profiles during the
weekend load profiles, so the artificial neural network ANN has a drawback in predicting the
changes in the load profile.
Figure 4-1: 24-Actual and forecasted load profile for 8th February 2010
Figure 4-2: 24-Actual and forecasted load profile for 9th February 2010
52
Figure 4-3: 24-Actual and forecasted load profile for 10th February 2010
Figure 4-4: 24-Actual and forecasted load profile for 11th February 2010
Figure 4-5: 24-Actual and forecasted load profile for 12th February 2010
53
Figure 4-6: 24-Actual and forecasted load profile for 13th February 2010
Figure 4-7: 24-Actual and forecasted load profile for 14th February 2010
Figure 4-8: 24-Actual and forecasted load profile for 19th July 2010
54
Figure 4-9: 24-Actual and forecasted load profile for 20th July 2010
Figure 4-10: 24-Actual and forecasted load profile for 21th July 2010
Figure 4-11: 24-Actual and forecasted load profile for 22th July 2010
55
Figure 4-12: 24-Actual and forecasted load profile for 23th July 2010
Figure 4-13: 24-Actual and forecasted load profile for 24th July 2010
Table 4-12 and Figure 4-14 show the comparison of mean average percentage errors of
respective days for different methods. This comparison is for checking which method gives best
results, the GAPSO based ANN model results has lowest minimum MAPE as compared to the
other methods.
56
Table 4-12: Comparison of MAPE of different methods
1
0.5
0
19 20 22 28 30
Representitive days
57
CHAPTER 5 : CONCLUSION AND RECOMMENDATIONS
5.1 Conclusion
The planning, control, and operation of electric power utilities involve various elements which
determine the degree and the performance of power systems, load prediction is of one these
elements. It’s most essential in electric utilities as it allows power system operators to control
and plan for their power system operations. The necessity of the prediction is that the forecaster
should have an accurate error precision as possible; this will ensure that a utility is able to
minimize its generation costs by providing the operators with necessary information for making
decisions regarding scheduling equipment for maintenance as well as energy purchasing.
Therefore, a large load forecast error may affect the economic viability of the Power Company as
well as reliability of power systems.
In this research, the main objective was to develop a hybrid forecaster of Genetic Algorithm with
Particle Swarm Optimization for learned Artificial Neural Network. The models HGAPSO, PSO
and GA-ANN were tested using data obtained from Juba Power Station (JPP) and JIAWS and
final results were obtained. The HGAPSO, PSO and GA-ANN results were compared to
determine the best model and their performances wereassessed using the meanabsolute
percentage error (MAPE). The resulting mean absolute percentage error (MAPE) of HGAPSO
found to be range from 1.47% to 1.98%.Therefore, a hybridized HGAPSO algorithm with ANN
improves forecast accuracy.
A hybrid PSO-ANN and GA-ANN resulting mean absolute percentage error (MAPE) was found
to be range from 1.9% to 3.40%, and 2.23% to 3.65% respectively. Therefore, by introducing
hybridization concept, the minimum forecast error results can be obtained.
The observation from this work is that a hybrid of GAPSO-ANN has better forecasting results,
by comparing results of these three modeling functions. Thus, concluded that the hybrid
HGAPSO-ANN has lower mean absolute performance error (MAPE) in all selected days, and it
was established that the lowest mean absolute percentage error (MAPE), is about 1.47% and
1.98%. Therefore, a hybridized HGAPSO algorithm with ANN improves forecast accuracy.
58
5.2 Beneficiaries of this work
The beneficiaries of this work both directly and indirectly, are Power systems operators,
distribution and retail energy providers in price settings. The direct beneficiaries from this work
include;
• This research work will help Electric Power Generation Company in reducing both
generations cost and spinning reserve in their networks. This reduction in generation cost
will enable them to enhance the transmission cost, distribution cost and hence
improvement in their profits.
• The research work will also ensure that the Power System Operators will carry on their
dailyactivity effectively, such as avoiding overloading and reduce occurrences of
equipment failures, schedule spinning reserve allocation properly.
• Other beneficiaries of this research work are the end users who will have enough supply
demand for their uses.
5.2 Recommendations
The research recommendations in this study have been based on the limitations of the study and
they are:
1. There is a need to investigate the application of the proposed model for Mid-Term and
Long-Term Load forecasting
2. There is a need to incorporate weather uncertainty factors such Dewpoint, Wind
Speed/Wind Direction, Dry and wet bulb, and Sky Cover to proposed model
3. The study should be carry on application of HGAPSO for different classes of customer
such as commercial, residential, and industrials load forecast.
4. More study should carry on how to determining the hidden neuron of ANN,
59
REFERENCES
[1] D. . K. and I. . Nagrath, Modern Power System Analysis, Third Edit. New Delhi: Tata
McGraw Hill Education Private Limited, 2003.
[2] Hossein Seifi and Mohammed Sadegh Sepasian, Electric Power System Planning, S.
Springer Heidelberg Dordrecht London New Yerk, 2011.
[3] H. L. Willis, Spatial Electric Load Forecasting, Second Edi. New York.: Marcel Dekker,
Inc., 2002.
[4] F. Javed, N. Arshad, F. Wallin, I. Vassileva, and E. Dahlquist, “Forecasting for demand
response in smart grids: An analysis on use of anthropologic and structural data and short
term multiple loads forecasting,” Appl. Energy, vol. 96, pp. 150–160, 2012.
[5] E. a Feinberg and D. Genethliou, “Load Forecasting,” Appl. Math. Restructured Electr.
Power Syst., pp. 269–285, 2005.
[7] F. Elkarmi and N. Abu Shikhah, Power System Planning Technologies and Applications.
2012.
[8] E. Almeshaiei and H. Soltan, “A methodology for Electric Power Load Forecasting,”
Alexandria Eng. J., vol. 50, no. 2, pp. 137–144, 2011.
[9] P. S. R. Murty, Power System Analysis. Giriraj Lane, Sultan Bazar, BS Publications, 2007.
[10] M. C. W Charytoniuk, “Very Short term load forecasting using Artificial Neural
Networks”, IEEE Transactions on Power Systems,” IEEE Trans. Power Syst., vol. Vol.15,
no. No. 1, p. PP .263 – 268.
[11] J. Automation, S. L. Forecasting, U. Time, and A. Moving, “2 . Time Series and Data
Mining 3 . Forecasting Methods,” vol. 3, pp. 122–132, 2014.
60
[13] M. Ghofrani, M. Ghayekhloo, A. Arabali, and A. Ghayekhloo, “A hybrid short-term load
forecasting with a new input selection framework,” Energy, vol. 81, pp. 777–786, 2015.
[14] A. Jain and B. Satish, “Integrated Approach for Short Term Load Forecasting using SVM
and ANN,” no. March, pp. 1–6, 2009.
[15] A. K. Topalli and I. Erkmen, “A hybrid learning for neural networks applied to short term
load forecasting,” Neurocomputing, vol. 51, pp. 495–500, 2003.
[16] S. A. H.M. Al-Hamadi, Soliman, “Short-term electric load forecasting based on Kalman
filtering algorithm with moving window weather and load model,” Electr. Power Syst.
Res., vol. 68, 2004.
[18] H. Nie, G. Liu, X. Liu, and Y. Wang, “Energy Procedia Hybrid of ARIMA and SVMs for
Short-Term Load Forecasting,” Int. Conf. Futur. Energy, Environ. Mater., vol. 16, no.
2011, pp. 1455–1460, 2012.
[19] M. De Felice, A. Alessandri, and P. M. Ruti, “Electricity demand forecasting over Italy :
Potential benefits using numerical weather prediction models,” Electr. Power Syst. Res.,
vol. 104, pp. 71–79, 2013.
[21] A. Krenker, J. Bešter, and A. Kos, “Introduction to artificial neural networks.,” Eur. J.
Gastroenterol. Hepatol., vol. 19, no. 12, pp. 1046–1054, 2011.
[25] A. P. Alves and L. S. Moulin, “Confidence Intervals for Neural Network Based Short-
Term Load Forecasting,” IEE Trans. Power Syst., vol. 15, no. 4, pp. 1191–1196, 2000.
[26] S. Quaiyum, Y. I. Khan, S. Rahman, and P. Barman, “Artificial Neural Network based
Short Term Load Forecasting of Power System,” Int. J. Comput. Appl., vol. 30, no. 4, pp.
1–7, 2011.
61
[27] I. K. Ibraheem, D. Ph, and M. O. Ali, “Short Term Electric Load Forecasting based on
Artificial Neural Networks for Weekends of Baghdad Power Grid,” Int. J. Comput. Appl.,
vol. 89, no. 3, pp. 30–37, 2014.
[29] I. Drezga, “Input Variable Selection For Ann-Based Short-Term Load Forecasting,” IEE
Trans. Power Syst., vol. 13, no. 4, pp. 1238–1244, 1998.
[30] L. Li, Song Wang, Peng Goel, “Short-term load forecasting by wavelet transform and
evolutionary extreme learning machine,” Electr. Power Syst. Res., vol. 122, pp. 96–103,
2015.
[31] S. a. Soliman, Fuzzy Regression Systems and Fuzzy Linear Models. 2010.
[32] I. O. Harrison, “Short Term Electric Load Forecasting of 132 / 33KV Maiduguri
Transmission Substation using Adaptive Neuro-Fuzzy Inference System ( ANFIS ),” Int.
J. Comput. Appl., vol. 107, no. 11, pp. 23–29, 2014.
[34] B. Wang, N. Tai, H. Zhai, J. Ye, J. Zhu, and L. Qi, “A new ARMAX model based on
evolutionary algorithm and particle swarm optimization for short-term load forecasting,”
Electr. Power Syst. Res., vol. 78, pp. 1679–1685, 2008.
[35] C. C. Pandian, S Chenthur Duraiswamy, K Asir and N. Kanagaraj, “Fuzzy approach for
short term load forecasting,” Electr. Power Syst. Res., vol. 76, pp. 541–548, 2006.
[37] A. Abdoos, M. Hemmati, and A. A. Abdoos, “Knowledge-Based Systems Short term load
forecasting using a hybrid intelligent method,”Knowledge-Based Syst., no. December
2014.
62
[39] M. M. Othman and I. Musirin, “Expert Systems with Applications A new hybrid Modified
Firefly Algorithm and Support Vector Regression model for accurate Short Term Load
Forecasting,” Expert Syst. Appl., vol. 41, no. 13, pp. 541–548, 2012.
[40] A. Badri, Z. Ameli, and A. M. Birjandi, “Application of Artificial Neural Networks and
Fuzzy logic Methods for Short Term Load Forecasting,” Energy Procedia, vol. 14, no.
2011, p. 1, 2012.
[41] S. S. Pappas et al., “Electricity demand load forecasting of the Hellenic power system
using an ARMA model,” Electr. Power Syst. Res., vol. 80, no. 3, pp. 256–264, 2010.
[42] M. Buhari and S. S. Adamu, “Short-Term Load Forecasting Using Artificial Neural
Network,” Proceeding Int. MultiConference Eng. Comput. Sci., vol. I, 2012.
[43] G. Liao and T. Tsao, “Application of fuzzy neural networks and artificial intelligence for
load forecasting,” Electr. Power Syst. Res., vol. 70, pp. 237–244, 2004.
[46] Q. Zhu and A. T. Azar, Complex System Modelling and Control Through Intelligent Soft
Computations, vol. 319. 2015.
[50] B. Islam, Z. Baharudin, Q. Raza, and P. Nallagownden, “Hybrid and Integrated Intelligent
System for Load Demand Prediction,” in B. Islam, Z. Baharudin, Q. Raza el at., 2013, no.
June, pp. 178–183.
[51] F. Yu and X. Xu, “A short-term load forecasting model of natural gas based on optimized
genetic algorithm and improved BP neural network,” Appl. Energy, vol. 134, pp. 102–113,
2014.
63
[52] P. Li, Y. Li, Q. Xiong, Y. Chai, and Y. Zhang, “Electrical Power and Energy Systems
Application of a hybrid quantized Elman neural network in short-term load forecasting,”
Int. J. Electr. Power Energy Syst., vol. 55, pp. 749–759, 2014.
[54] S. Yu, K. Wang, and Y. Wei, “A hybrid self-adaptive Particle Swarm Optimization –
Genetic Algorithm – Radial Basis Function model for annual electricity demand
prediction,” Energy Convers. Manag., vol. 91, pp. 176–185, 2015.
[55] A. Jain, M. B. Jain, and E. Srinivas, “A Novel Hybrid Method for Short Term Load
Forecasting using Fuzzy Logic and Particle Swarm Optimization,” in International
Conference on Power System Technology, 2010, pp. 1–7.
[56] P. Duan, K. Xie, T. Guo, and X. Huang, “Short-Term Load Forecasting for Electric Power
Systems Using the PSO-SVR and FCM Clustering Techniques,” Energies, vol. 4, pp.
173–184, 2011.
[60] D. K. Chaturvedi, A. P. Sinha, and O. P. Malik, “Electrical Power and Energy Systems
Short term load forecast using fuzzy logic and wavelet transform integrated generalized
neural network,” Int. J. Electr. POWER ENERGY Syst., vol. 67, pp. 230–237, 2015.
[62] G. Feng and L. Li, “Application of Genetic Algorithm and Neural Network in
Construction Cost Estimate,” in Proceedings of the 2012 2nd International Conference on
Computer and Information Application (ICCIA 2012), 2012, no. Iccia, pp. 1036–1039.
64
[63] K. A. Tolosa and M. Daño-Luna, “Scoping study on the readiness of the PNP for ISO,
focus on the PRO ARMM,” vol. 34, no. 2, pp. 997–1006, 2015.
[65] U. Bodenhofer, Genetic Algorithms: Theory and Applications, Third Edit. Fuzzy Logic
Laboratorium-Hagenberg, 2004.
[66] N. R. Siriwardene and B. J. C. Perera, “Selection of genetic algorithm operators for urban
drainage model parameter optimisation,” vol. 44, pp. 415–429, 2006.
[68] Peter X.-K. Song, Springer Series in Statistics, 2nd ed. Springer Science+Business Media,
LLC, 2007.
[69] S. Mishra and S. K. Patra, “Short term load forecasting using neural network trained with
genetic algorithm & particle swarm optimization,” Proc. - 1st Int. Conf. Emerg. Trends
Eng. Technol. ICETET 2008, pp. 606–611, 2008.
[70] Y. Shangdong, “A New ANN Optimized By Improved PSO Algorithm Combined With
Chaos And Its Application In Short-term Load Forecasting,” 2006, pp. 945–948.
[71] N. K. Singh, A. K. Singh, and M. Tripathy, “Short Term Load Forecasting using
Genetically Optimized Radial Basis Function Neural Network,” in IEEE Power
Engineering Internationalconference, 2014, no. October, pp. 1–5.
[73] X. Sun et al., “An Efficient Approach to Short-Term Load Forecasting at the Distribution
Level,” vol. 31, no. 4, pp. 2526–2537, 2016.
65
APPENDICES
APPENDIX A
PSO CODE
clc
tic
close all
clear up
rng default
Input Data
Loading Data Form Xlsx Data Sheet
Loaddata = 'datafile.xlsx';
Traininputdata = 'Sheet1';
Trdatatarget = 'Sheet2';
day_aheat_Data = 'Sheet3';
input = xlsread(Loaddata,Traininputdata,'A1:Z10000');
target = xlsread(Loaddata,Trdatatarget,'A1:Z10000');
Actual_load = xlsread(Loaddata,day_aheat_Data,'A1:Z10000');
inputs=input';
targets=target';
n_input=length(inputs(:,1));
n_output=length(targets(:,1));
hiddenlayersize=45;
net=feedforwardnet(hiddenlayersize,'trainlm');
net=configure(net,inputs,targets);
kk=(n_input*hiddenlayersize)+(hiddenlayersize+hiddenlayersize)+hiddenlayersize+n_output;
66
end
end
NRun=1;
for Run=1:NRun
Problem Definition
objfun=@(x) myfunc(x,hiddenlayersize,n_input,n_output,net,inputs,targets); % Cost Function
Vel=0.1*x; % velocity
for z=1:npop
fn(z,1)=objfun(x(z,:));
end
[fminX,index]=min(fn);
pbest=x; % particles best position
gbest=x(index,:); % global best position
It=1; MaxIt=50; Tol=1; % Maximum Number of Iterations
while It<=MaxIt && Tol>1e-14
w_max=0.9;
w_min=0.4;
w=0.1+rand*0.4; % Randon Weight
initialization
for q=1:kk
Vel(z,q)= w*Vel(z,q)+C1*rand*(pbest(z,q)-x(z,q))+C2*rand*(gbest(1,q)-x(z,q));
% Velocity Limit check
if Vel(z,q)>MaxVel
Vel(z,q)=MaxVel;
elseif Vel(z,q)<MinVel
Vel(z,q)=MinVel;
Vel;
end
end
67
if x(z,q)>MaxX(q)
x(z,q)=MaxX(q);
elseif x(z,q)<MinX(q)
x(z,q)=MinX(q);
end
end
end
end
end
Loop End
xo=gbest;
Eval=objfun(xo);
Xbest(Run,:)=xo;
68
Ybest(Run,1)=objfun(xo);
disp(sprintf('+++++++++++++++++++++++++++++++++++++++++++'));
disp(sprintf('Iteration Evalute ObjFunc.Va'));
disp(sprintf('Maxrun%4g Eval%9f Best Cost %12g',Run,Eval,Ybest(Run,1)))
end
toc
69
Visualization
Results Plot
hold all
plot(Actual_load, 'g--') % plot in red, circles connected with lines
plot(Forecast_load, 'b-') % plot in green, circles connected with lines
plotregression(targets,Tr.net(inputs))
legend('Actual', 'Forecast') % legend text
xlabel('Time (Hours)')
ylabel('Actual & Forecast Load (KW)')
day=clock;
disp(datestr(datenum(day(1),day(2),day(3),day(4),day(5),day(6)),0))
70
APPENDIX B
GA CODE
clc
tic
close all
clear up
rng default
Input data
Loading data from xlsx data sheet
Loaddata = 'datafile.xlsx';
Trdatainput = 'Sheet1';
Trdatatarget = 'Sheet2';
day_aheat_Data = 'Sheet3';
input = xlsread(Loaddata,Trdatainput,'A1:Z10000');
target = xlsread(Loaddata,Trdatatarget,'A1:Z10000');
Actual_load = xlsread(Loaddata,day_aheat_Data,'A1:Z10000');
inputs=input';
targets=target';
n_input=length(inputs(:,1));
n_output=length(targets(:,1));
hiddenlayersize=30;
net=feedforwardnet(hiddenlayersize,'trainlm');
net=configure(net,inputs,targets);
kk=(n_input*hiddenlayersize)+(hiddenlayersize+hiddenlayersize)+hiddenlayersize+n_output;
GA Parameter Initialization
beta=8; % SELECTION PRESSURE
npop=30; % POPULATION SIZE
mp = 0.01; % MUTATION PERCENTAGE
cp = 0.8; % CROSSOVER PERCENTAGE
nm = round(npop * mp); % NUMBER OF MUTANTS
nc = round(npop * cp); % NUMBER OF OFFSPRINGS
mu=0.1; % MUTATION RATE
Keep = 10; % HOW MANY OF THE BEST INDIVIDUALS TO KEEP FROM GENERATION TO THE NEXT
nVar=10;
It=1;
MaxIt=20;
Npso=28;
for q=1:kk
MinX(1,q)=-1;
MaxX(1,q)=1;
end
71
Population Size (Swarm Size)
for z=1:npop
for q=1:kk
R0(z,q)=MinX(1,q)+rand*(MaxX(1,q)-MinX(1,q));
end
end
NRun=1;
for Run=1:NRun;
objfun=@(x) myfunc(x,hiddenlayersize,n_input,n_output,net,inputs,targets);
x=R0;
for z=1:npop
f0(z,1)=objfun(x(z,:));
end
% SORT POPULATION
[fmin,indeR0]=min(f0);
pbest=R0;
gbest=R0(indeR0,:);
BestSol=f0(1);
WorstCost=max(f0);
Main Loop
Calculate Selection Probabilities
Pb=exp(-beta*f0/WorstCost);
Pb=Pb/sum(Pb);
indeR0=find(Pb==min(Pb));
% BEGIN SELECTION/CROSSOVER LOOP
for t=Keep+1:2:npop
% SELECT TWO PARENTS TO MATE AND CREATE TWO OFFSPRINGS ROULETTE SELECTION
mate=[];
for selParents=1:2
Random_Cost=rand*sum(Pb);
Select_Cost=Pb(1);
Sel_index=1;
while Select_Cost<Random_Cost
Sel_index=Sel_index+1;
if Sel_index>=npop
break;
end
Select_Cost=Select_Cost+Pb(Sel_index);
end
mate=[mate Sel_index];
end
xNew(1,:)=x(mate(1),:);
xNew(2,:)=x(mate(2),:);
% Crossover
if cp> rand
Xover_Pt1 = ceil(rand * npop);
Xover_Pt2 = ceil(rand * npop);
72
if Xover_Pt1 > Xover_Pt2
temp = Xover_Pt2;
Xover_Pt2 = Xover_Pt1;
Xover_Pt1 = temp;
end
offs(t-Keep, :) = [xNew(1, 1:Xover_Pt1) xNew(2, Xover_Pt1+1:Xover_Pt2)
xNew(1, Xover_Pt2+1:npop)];
offs(t-Keep+1, :) = [xNew(2, 1:Xover_Pt1) xNew(1, Xover_Pt1+1:Xover_Pt2)
xNew(2, Xover_Pt2+1:npop)];
else
offs(t-Keep, :) = xNew(1,z);
offs(t-Keep+1, :) = xNew(2,z);
end
% UNIFORM CROSSOVER
for z = 1 : npop
if cp > rand
offs(t-Keep, z) = xNew(1, z);
offs(t-Keep+1, z) = xNew(2, z);
else
offs(t-Keep, z) = xNew(2, z);
offs(t-Keep+1, z) = xNew(1, z);
end
73
Evaluating Fitness
for z=1:Npso
x(z)=offs(sl(z));
fn(z,1)=objfun(x(z,:));
end
[fmin, index]=min(fn);
pbest=x;% Initial Best
gbest=x(index, :); % Initial gbest
for z= 1:nc
if fn(z,1)<f0(z,1)
f0(z,1)=fn(z,1);
pbest(z,:)=x(z,:);
end
end
% UPDATING pbest AND FITNESS
[ofgbest, index]=min(fn); % Sort out the best particle
gfmin(It,Run)=ofgbest; % Stored
ffIt(Run)=It; % Stored the iteration
% Update the global and best-fit particle
if ofgbest<fmin
gbest=pbest(index,:);
fmin=ofgbest;
end
% CALCULATE THE TOLERANCE
if It>20;
tol=abs(gfmin(It-20,Run)-fmin);
end
end
Algorithm End
xo=gbest;
Fval=objfun(xo);
Xbest(Run,:)=xo;
Ybest(Run,1)=objfun(xo);
disp(sprintf('+++++++++++++++++++++++++++++++++++++++++++'));
disp(sprintf('Iteration Evalute ObjFunc.Va'));
disp(sprintf('Maxrun%4g Eval%9f Best Cost %12g',Run,Fval,Ybest(Run,1)))
74
end
toc
75
Visualization
Results Plot
figure
hold all
plot(Actual_load, 'g--') % plot in red, circles connected with lines
plot(Forecast_load, 'b-') % plot in green, circles connected with lines
plotregression(targets,Tr.net(inputs))
legend('Actual', 'Forecast') % legend text
xlabel('Time (Hours)')
ylabel('Actual & Forecast Load (KW)')
day=clock;
disp(datestr(datenum(day(1),day(2),day(3),day(4),day(5),day(6)),0))
76
APPENDIX C
HGAPSO CODE
clc
tic
close all
clear up
rng default
Input Data
Loading Data for Xlsx Data Sheet
Loaddata = 'datafile.xlsx';
Trdatainput = 'Sheet1';
Trdatatarget = 'Sheet2';
day_aheat_Data = 'Sheet3';
input = xlsread(Loaddata,Trdatainput,'A1:Z10000');
target = xlsread(Loaddata,Trdatatarget,'A1:Z10000');
Actual_load = xlsread(Loaddata,day_aheat_Data,'A1:Z10000');
inputs=input';
targets=target';
n_input=length(inputs(:,1));
n_outpu=length(targets(:,1));
hiddenlayersize=45;
net=feedforwardnet(hiddenlayersize,'trainlm');
net=configure(net,inputs,targets);
kk=(n_input*hiddenlayersize)+(hiddenlayersize+hiddenlayersize)+hiddenlayersize+n_outpu;
77
w_min=0.4;
for q=1:kk
MinX(1,q)=-1;
MaxX(1,q)=1;
end
GA Population Initialization
for z=1:npop
for q=1:kk
R0(z,q)=MinX(1,q)+rand*(MaxX(1,q)-MinX(1,q));
end
end
Problem Definition
NRun=1;
for Run=1:NRun;
objfun=@(x) myfunc(x,hiddenlayersize,n_input,n_outpu,net,inputs,targets);
x=R0;
for z=1:npop
f0(z,1)=objfun(x(z,:));
end
% Sort Population
[fmin0,indeR0]=min(f0);
pbest=R0;
gbest=R0(indeR0,:);
BestSol=f0(1);
WorstCost=max(f0);
Main Loop
Calculate Selection Probabilities
p = [];
Pb=exp(-beta*f0/WorstCost);
Pb=Pb/sum(Pb);
indeR0=find(Pb==min(Pb));
% Begin Selection/Crossover Loop
for t=Keep+1:2:npop
% Select Two parents to mate and Create two offspring-roulette wheel selection
mate=[];
for selParents=1:2
Random_Cost=rand*sum(Pb);
Select_Cost=Pb(1);
Sel_index=1;
while Select_Cost<Random_Cost
Sel_index=Sel_index+1;
78
if Sel_index>=npop
break;
end
Select_Cost=Select_Cost+Pb(Sel_index);
end
mate=[mate Sel_index];
end
xNew(1,:)=x(mate(1),:);
xNew(2,:)=x(mate(2),:);
% Crossover
if cp> rand
Xover_Pt1 = ceil(rand * npop);
Xover_Pt2 = ceil(rand * npop);
if Xover_Pt1 > Xover_Pt2
temp = Xover_Pt2;
Xover_Pt2 = Xover_Pt1;
Xover_Pt1 = temp;
end
offs(t-Keep, :) = [xNew(1, 1:Xover_Pt1) xNew(2, Xover_Pt1+1:Xover_Pt2)
xNew(1, Xover_Pt2+1:npop)];
offs(t-Keep+1, :) = [xNew(2, 1:Xover_Pt1) xNew(1, Xover_Pt1+1:Xover_Pt2)
xNew(2, Xover_Pt2+1:npop)];
else
offs(t-Keep, :) = xNew(1,z);
offs(t-Keep+1, :) = xNew(2,z);
end
% uniform crossover
for z = 1 : npop
if cp > rand
offs(t-Keep, z) = xNew(1, z);
offs(t-Keep+1, z) = xNew(2, z);
else
offs(t-Keep, z) = xNew(2, z);
offs(t-Keep+1, z) = xNew(1, z);
end
79
for q=1:npop
offs(offs(t)<MinX(q))=MinX(q);
offs(offs(t)>MaxX(q))=MaxX(q);
end
end
end
domin=(1-It/MaxIt)*(npop-Npso)+Npso;
selt=randperm(round(domin));
sn=selt(1:Npso);
for q=1:kk-1
Vel(z,q)= w*Vel(z,q)+C1*rand*(pbest(z,q)-x(z,q))+C2*rand*(gbest(1,q)-x(z,q));
% Velocity Limit
if Vel(z,q)>MaxVel
Vel(z,q)=MaxVel;
elseif Vel(z,q)<MinVel
Vel(z,q)=MinVel;
end
end
80
end
end
% CHECK FOR ANY CORRECTION ERRORS
for z=1:Npso
for q=1:kk-1
if x(z,:)>MaxX(q)
x(z,:)=MaxX(q);
elseif x(z,:)<MinX(q)
x(z,:)=MinX(q);
end
end
end
end
end
81
Algorithm End
xo=gbest;
Fval=objfun(xo);
Xbest(Run,:)=xo;
Ybest(Run,1)=objfun(xo);
disp(sprintf('+++++++++++++++++++++++++++++++++++++++++++'));
disp(sprintf('Iteration Evalute ObjFunc.Va'));
disp(sprintf('Maxrun%4g Eval%9f Best Cost %12g',Run,Fval,Ybest(Run,1)))
end
toc
82
RMSE=sqrt(MSE)
MAPE=sum(abs(((Actual_load')-(Forecast_load))/Actual_load')/length(Actual_load))*100
APE=abs(((Actual_load')-(Forecast_load))/Actual_load')*100
R=corr2(Forecast_load,Actual_load')
performance1 = perform(Tr.net,targets,inputs);
performance2 = perform(Tr.net,Actual_load,Forecast_load);
Visualization
Results Plot
figure
hold all
plot(Actual_load, 'g--') % plot in red, circles connected with lines
plot(Forecast_load, 'b-') % plot in green, circles connected with lines
legend('Actual', 'Forecast') % legend text
xlabel('Time (Hours)')
ylabel('Actual & Forecast Load (KW)')
plotregression(targets,Tr.net(inputs))
day=clock;
disp(datestr(datenum(day(1),day(2),day(3),day(4),day(5),day(6)),0))
83
APPENDIX D
Objective Function
84