You are on page 1of 5

An Effective Approach to ANN-Based Short-Term

Load Forecasting Model Using Hybrid Algorithm


GA-PSO

Manh-Hai Pham, T-A-Tho Vu, Thu-Huyen Dang, The-Vinh Nguyen


Duc-Quang Nguyen, Viet-Hung Dang, Ngoc-Trung Faculty of Electrical Engineering
Nguyen Quang Ninh University of Industry
Faculty of Electrical Engineering Quang Ninh, Viet Nam
Electrical Power University vinhnt@qui.edu.vn
Ha Noi, Viet Nam Van-Duy Pham
haipm@epu.edu.vn Institute of Energy Science
phamvanduy@ies.vast.vn

Abstract— In recent years, research of optimal algorithms for III) and our effective hybrid algorithm GA-PSO for ANN
short-term load forecasting has become popular. Optimal training (Part IV). The conclusion will be made clear in Part V.
algorithms can improve forecast results in two main directions:
precision and speed of convergence. To achieve both of these goals, II.   METHODOLOGY OF SHORT-TERM LOAD FORECASTING
researchers often use a combination of different algorithms. This
paper describes a new combination of two optimal algorithms: A.   Selecting the model of STLF
Genetic Algorithm (GA) and Particle Swarm Optimization (PSO). This research selects the model described in [12]. This
The forecasting of the 24-hour daily-load on the normal working model includes three independent parts: The maximum load
day of the SPC-Southern Power Corporation (a big local Vietnam power (peak load) forecasting, the minimum load power (valley
Company) showed a significant improvement in the error as well load) forecasting and the identified day types. The overview of
as the speed of convergence with several selected days. In the most this model is showed in the following figure:
accurate case, the average error of prediction reaches 1.15% while
the biggest error is 3.74% and the smallest is 0.02%

Keywords—short-term load forecasting, GA, PSO, 24-hour daily


load.

I.   INTRODUCTION
In recent years, research of optimal algorithms for STLF has
become popular. In particular, the GA and PSO used to be
applied separately like a training method for the Artificial
Neural Network. The GA integration on STLF can be find in
many publications, as in [1]–[7]. In these articles, the authors
selected the most suitable parameters of GA to improve the
result’s accuracy. While the GA focus on improving accuracy,
the PSO makes training faster[8]. In other hand, the accuracy is
affected by different parameters and one of which is the method Fig. 1.   The overview of STLF model
of combination of algorithms. The combined method is
described clearly like in [9][10]. The authors in [9] implemented Caused by characteristics of SPC’s Load, we classify the
a study using GA-PSO to solve a non-linear optimization hourly load pattern types into 8 groups: 5 working day groups
problem. With this method, the authors used GA to optimize (from Monday to Friday), 2 weekend groups (Saturday and
each individual. Accordingly, the GA must be implemented Sunday), 1 holidays (or special-event day) group. The evidence
continuously with both crossover and mutation operations. This of load’s characteristics can be clearly seen in the case of one
will greatly increase the number of steps, thus, leading to the week on the figure 2 (from 29/8/2016 to 3/9/2016). This case
run-time increasing. With the same inconvenience about the includes a holiday (Friday 2/9 is the Vietnam Nation day). What
run-time, the authors in [11] also use hybrid algorithms GA- is striking this figure is the difference between 3 groups:
PSO, in which GA executes repeatedly. So, this paper describes working days, weekend and holidays.
an effective method that GA is implemented only one time.
Continuously, this work will provide an overview of the STLF
methodology (Part II), the input data and materials using (Part

978-1-5386-5186-5/18/$31.00 ©2018 IEEE


P,(MW)
8500 Working( Group temperature on each area is also different. However, we only use
the average temperature of the whole region in our algorithm.
8000

A.   The datasheet of input data


7500

The input data of Nov. 19, 2016 was prepared in Excel’s


7000
datasheet like table I (for peak load) and table II (for valley
6500
Weekend( load). These tables show 28 days from 28/10/2016 to
Group
18/11/2016 on 28 rows and it has 15 columns that describes 13
6000
parameters (or 13 neurons on output layout):
5500
Holiday(
Group TABLE I.   THE INPUT DATA FOR PEAK LOAD FORECASTING
5000

Tpmax- Tpmax-
Day’s Tpmax Ppmax-1 Ppmax-7
Date 1 7 o Encryption
4500 Notation o o C MW MW
C C
Monday,(29/8/2016) Tuesday,(30/8/2016) Wednesday, (31/8/2016)
Thusday,(01/9/2016) Friday,(2/9/2016) Saturday,(3/9/2016) Saturday 22/10/2016 32 33 32 8020 7874 0 0 0 0 0 0 1 0
Sunday,(4/9/2016) (Daily,hour)
4000 Sunday 23/10/2016 32 33 33 7569 6248 0 0 0 0 0 0 0 1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Monday 24/10/2016 33 32 31 6113 8007 0 1 0 0 0 0 0 0
Tuesday 25/10/2016 31 31 30 7961 8115 0 0 1 0 0 0 0 0
Wednesday 26/10/2016 30 32 33 7873 7873 0 0 0 1 0 0 0 0
Thursday 27/10/2016 33 30 34 8014 7935 0 0 0 0 1 0 0 0
Fig. 2.   The daily load of one week on August 2016 Friday 28/10/2016 34 32 33 8184 8020 0 0 0 0 0 1 0 0
Saturday 29/10/2016 33 32 33 8031 7569 0 0 0 0 0 0 1 0
Sunday 30/10/2016 33 33 31 7505 6113 0 0 0 0 0 0 0 1
B.   Calculating the 24h hourly load forecasting from peak Monday 31/10/2016 31 31 32 6164 7961 0 1 0 0 0 0 0 0
load, valley load and load pattern Tuesday 01/11/2016 32 30 32 7775 7873 0 0 1 0 0 0 0 0
Wednesday 02/11/2016 32 33 32 7926 8014 0 0 0 1 0 0 0 0
The peak load and the valley load will be forecasted firstly Thursday 03/11/2016 32 34 30 7950 8184 0 0 0 0 1 0 0 0

like description in the Part III and the Part IV. Friday
Saturday
04/11/2016
05/11/2016
30
29
33
33
29
27
7320
7725
8031
7505
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
Sunday 06/11/2016 27 31 28 7311 6164 0 0 0 0 0 0 0 1
We use two following equations to calculate 24 hours daily Monday 07/11/2016 28 32 34 5953 7775 0 1 0 0 0 0 0 0

load: Tuesday
Wednesday
08/11/2016
09/11/2016
34
32
32
32
32
33
7725
7774
7926
7950
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
%& '%()&* Thursday 10/11/2016 33 30 34 8264 7320 0 0 0 0 1 0 0 0
𝑃"# = (1) Friday 11/11/2016 34 29 34 8109 7725 0 0 0 0 0 1 0 0
%()+, '%()&* Saturday 12/11/2016 34 27 34 7976 7311 0 0 0 0 0 0 1 0
Sunday 13/11/2016 34 28 34 7828 5953 0 0 0 0 0 0 0 1
𝑃# = 𝑃-.#" − (𝑃-.12 − 𝑃-.#" )×𝑃"# (2) Monday 14/11/2016 34 34 35 7725 7725 0 1 0 0 0 0 0 0
Tuesday 15/11/2016 35 32 34 8052 7774 0 0 1 0 0 0 0 0
Wednesday 16/11/2016 34 33 35 8382 8264 0 0 0 1 0 0 0 0
Where: Thursday 17/11/2016 35 34 33 8290 8109 0 0 0 0 1 0 0 0
Friday 18/11/2016 33 34 33 8197 7976 0 0 0 0 0 1 0 0
•   Pni: Normalized load for hour I (this normalization
increases the execution speed of algorithms)
TABLE II.   THE INPUT DATA FOR VALLEY LOAD FORECASTING
•   Ppmax, Ppmin: Real average Peak load and valley load
of past days which is in the same group with the Day’s
Date
Tpmin-1
o
Tpmin-7
o
Tpmin
o
Ppmin-1 Ppmin-7
Encryption
forecast day (the number of similar days is 5 by Notation C C C MW MW

Saturday 22/10/2016 24 25 25 6052 6043 0 0 0 0 0 0 1 0


experience when we tried to change it in on Sunday 23/10/2016 25 24 24 5775 5268 0 0 0 0 0 0 0 1
forecasting.). Monday 24/10/2016 24 24 24 5135 5205 0 1 0 0 0 0 0 0
Tuesday 25/10/2016 24 25 24 5299 6006 0 0 1 0 0 0 0 0
•   Pi: Forecast Load result of hour i Wednesday 26/10/2016 24 25 25 5961 6079 0 0 0 1 0 0 0 0
Thursday 27/10/2016 25 24 25 5989 5914 0 0 0 0 1 0 0 0

•   Pfmax, Pfmin: Peak load and valley load result Friday 28/10/2016 25 24 24 6088 6052 0 0 0 0 0 1 0 0
Saturday 29/10/2016 24 25 24 6031 5775 0 0 0 0 0 0 1 0
Sunday 30/10/2016 24 24 24 5256 5135 0 0 0 0 0 0 0 1
Monday 31/10/2016 24 24 24 4966 5299 0 1 0 0 0 0 0 0
Tuesday 01/11/2016 24 24 23 5210 5961 0 0 1 0 0 0 0 0
III.   PREPARE INPUT DATA AND MATERIALS Wednesday 02/11/2016 23 25 24 5919 5989 0 0 0 1 0 0 0 0

This paper explores a large input data of a Vietnam big local Thursday 03/11/2016 24 25 25 5980 6088 0 0 0 0 1 0 0 0
Friday 04/11/2016 25 24 24 5830 6031 0 0 0 0 0 1 0 0
power company (SPC). In this section, the datasheet stopped on Saturday 05/11/2016 24 24 24 5984 5256 0 0 0 0 0 0 1 0
Nov. 18, 2016 and was required to forecast a daily power load Sunday 06/11/2016 24 24 24 5734 4966 0 0 0 0 0 0 0 1

of Nov. 19. We will further forecast on Nov. 16 (not holidays) Monday 07/11/2016 24 24 25 5005 5210 0 1 0 0 0 0 0 0
Tuesday 08/11/2016 25 23 25 5984 5919 0 0 1 0 0 0 0 0
to confirm the accuracy of forecasting methods. All results are Wednesday 09/11/2016 25 24 24 5812 5980 0 0 0 1 0 0 0 0
compared and discussed. As the same implementation, we Thursday 10/11/2016 24 25 25 6006 5830 0 0 0 0 1 0 0 0

thoroughly describe the input data for Nov. 19, 2016 (just giving Friday 11/11/2016 25 24 25 6104 5984 0 0 0 0 0 1 0 0
Saturday 12/11/2016 25 24 25 6125 5734 0 0 0 0 0 0 1 0
the result of Nov.16, 2016 to compare with). The daily high Sunday 13/11/2016 25 24 25 6109 5005 0 0 0 0 0 0 0 1
temperature will be employed as the weather parameters for Monday 14/11/2016 25 25 25 5984 5984 0 1 0 0 0 0 0 0

peak load and the daily low temperature for valley load. The Tuesday 15/11/2016 25 25 26 5270 5812 0 0 1 0 0 0 0 0
Wednesday 16/11/2016 26 24 25 6358 6006 0 0 0 1 0 0 0 0
temperature variables of all past days and forecast day are Thursday 17/11/2016 25 25 26 6387 6104 0 0 0 0 1 0 0 0
collected from the public webpage “weather.com”. Note that the Friday 18/11/2016 26 25 26 6283 6125 0 0 0 0 0 1 0 0

SPC’s Load spread over 21 provinces with large area, so the


Where: and the crossover-features; the mutation can best be listed as
follows: Unbiased and Biased. Finally, these parameters were
•   Tpmin-1, Tpmax-1: Minimum and maximum fixed as bellows:
Temperature of the day before one day of the
current day. -   Crossover method: Crossover-weights
•   Tpmin-7, Tpmax-7: Minimum and maximum -   Mutation method: Biased (with fixed probability
Temperature of the day before seven days of the 0.1)
current day.
B.   The PSO
•   Ppmin-1, Ppmax-1: Valley and Peak Load of the day The construction of PSO was first articulated by J. Kennedy
before one day of the current day. and R. Eberhart (1995)[15] and improved step by step in their
publications later. The authors in [16][17] investigated an
•   Ppmin-7, Ppmax-7: Valley and Peak Load of the day
advanced PSO called by SPSO and observed considerable
before seven days of the current day.
differences (advantages and disadvantages) between the basic
•   Encryption: Includes 8 bits representing 8 day PSO and the SPSO.
types: from Monday to Sunday and holiday.
The basic PSO is defined by equations:
B.   The datasheet of predicted data
𝑉#678 = 𝑉#6 + 𝐶8 ×𝑅8 × 𝑃#6 − 𝑥#6 + 𝐶= ×𝑅= × 𝐺 6 − 𝑥#6
After ANN training process, the optimal weights of ANN (3)  
𝑥#678 = 𝑥#6 + 𝑉#678
will be used to predict the peak and valley load. The table III
and IV show the datasheets prepared for the forecasting of the
date 19/11/2016: Where:

TABLE III.   PREDICTED DATA FOR PEAK LOAD OF 19/11/2016


-   𝑉#6 : velocity of particle i at the loop k
-   𝑥#6 : position of particle i at the loop k
Day’s Tmax-1 Tmax-7 Tmax Pmax-1 Pmax-7
Date o o o Encryption
Notation C C C MW MW
-   𝐶8 ,  𝐶= : learning factors
Saturday 19/11/2016 33 34 34 8173 7828 0 0 0 0 0 0 1 0
-   𝑅8 ,  𝑅= : random values between (0,1)
-   𝑃#6 : best position of particle i at the loop k
TABLE IV.   PREDICTED DATA FOR VALLEY LOAD OF 19/11/2016
-   𝐺 6 : best position of swarm at the loop k
Day’s
Date
Tmin-1
o
Tmin-7
o
Tmin
o
Pmin-1 Pmin-7
Encryption The SPSO is defined by equations:
Notation C C C MW MW

Saturday 19/11/2016 26 25 26 5830 6109 0 0 0 0 0 0 1 0 𝑉#678 = 𝑋× 𝑉#6 + 𝐶8 ×𝑅8 × 𝑃#6 − 𝑥#6 + 𝐶= ×𝑅= × 𝐺 6 − 𝑥#6
  (4)
𝑥#678 = 𝑥#6 + 𝑉#678
Where:
Note that the past temperatures are always real values but
which of current day is predicted value. =
-   𝑋= :  constriction  factor  
='A' AB 'CA
C.   Materials for forecasting
-   𝜑 = 𝐶8 + 𝐶= , 𝜑 > 4  
We use the MATLAB version 2014 with ANN toolbox to
implement the STLF. One Macbook Pro with processor Intel After testing, we decided to use the basic PSO in our hybrid
Core i7 2 GHz, 8 GB memory 1600 MHz DDR3 is exploited to Algorithm.
ensure the execute speed.
C.   The used hybrid Algorithm GA-PSO
IV.   USING EFFECTIVE HYBRID ALGORITHM GA-PSO FOR In view of all that has been mentioned and tested so far, we
STLF build one effective hybrid algorithm showed as in figure 3.
As explained in the introduction, it is clear that our hybrid This hybrid algorithm is embedded in the ANN structure as
algorithm uses two singles: GA and PSO. However, there are follows:
many improved algorithms from the basic. This part will
describe more details what is the improved algorithm be used -   Structure type: feedfoward network
and how it worked together. -   Neuron’s Quantity of input layer: 13
A.   The GA -   Neuron’s Quantity of output layer: 1
The hybrid algorithm uses basic GA with three basic
-   Quantity of hidden layers: 1
operators: reproduction, crossover and mutation. In each
operator, it’s very important to choose special parameters. As in -   Neuron’s Quantity of hidden layer: 5
[13][14], the encryption is of two kinds: encryption by binary
string and encryption by real value; the crossover consists of -   Fitness function in GA-PSO: MSE (Mean Square
two types, which are the crossover-weights, the crossover-nodes Error)
Start Accordingly, the results exceeded the allowable error in three
times (12h, 14h and 22h). However, the average error is still
Error calculation,
Update the velocity,
position of each particles
updating the Pbest, Gbest within the allowable range. So we suggest these results for the
values
Evaluate, align the errors
of each particle
grid operation.
Update the Pbest, Gbest Evaluation
Eliminate incompatible
No values of each particles of adaptation Turning now to the experimental evidence on Nov. 16, 2016,
particles
Initiate velocity, initial Yes the result is not good. The figure 6 and 7 show that it exists
constants, number of
Random crossover to moves
Natural evolution of each
particle
weak-points of the hybrid algorithm.
generate k new particles No

Mutation with a fixed Yes Check the


Check the No number of
probability to create a number of
new generation loops and
loops and
No errors
errors
Yes Yes

Evaluation Natural evolution of each Updating Gbest final value


of adaptation particle

Stop

Fig. 3.   The Schema of hybrid algorithm GA-PSO

D.   Results and Discussing


After training ANN and executing the hybrid algorithm,
values of peak load and valley load forecasting on Nov.19, 2016 Fig. 6.   Results of Nov.16, 2016
are respectively: 7769,8 MW and 6134,1 MW. Using equations
1 and 2 in part II, the results are interestingly showed in
following figures:

Fig. 7.   Distribution of forecast errors of Nov.16, 2016 Forecasting


Fig. 4.   Result of Nov.19, 2016
The biggest error is 6.57% at 21h, the smallest is 1.47% at
7h AM and the average is 3.87%. This result is not allowable for
the load forecasting. This exceeded error can be explained by
two reasons. The first, it dues the load’s variation of similar days
in processing of hourly load pattern forecasting. The second, it
dues the difference between local temperatures of 21 provinces.
V.   CONCLUSION
The main goal of the current study was to build an effective
STLF method and evaluate the hybrid algorithm GA-PSO. The
results of this investigation show that our hybrid algorithm is
effective with small error in case of Nov.19,2016. However, the
generalizability of these results is subject to certain limitations
(for instance the case of Nov. 16,2016).
There are still many unanswered questions about these bad
Fig. 5.   Distribuion of forecast errors of Nov.19, 2016 Forecasting
errors and the effectiveness of our hybrid algorithm. However,
As in figure 5, the largest error is 3.736% at 12h, the smallest this is an important issue for future research. In future
is 0.018% at 4h AM and the average error is 1.153%. With this investigations, it might be possible to use more neurons in the
distribution, we find that all large error (more than 2%) are not input layer to represent more local temperatures. Moreover, a
in the rush-hour of load. Looking to provisions in the Decision further study with more focus on determining hourly load
No. 7 of the Electricity Regulatory Authority of Vietnam, it pattern is suggested.
allows the error of 2% for the daily load forecasting.
REFERENCES 2008, pp. 606–611.
[9] H. Garg, “A hybrid PSO-GA algorithm for constrained optimization
[1] M. Mustapha, M. W. Mustafa, S. N. Khalid, I. Abubakar, and H. problems,” Appl. Math. Comput., vol. 274, pp. 292–305, 2016.
Shareef, “Classification of electricity load forecasting based on the [10] Q. Zhang, R. M. Ogren, and S. Kong, “A comparative study of
factors influencing the load consumption and methods used: An- biodiesel engine performance optimization using enhanced hybrid
overview,” in 2015 IEEE Conference on Energy Conversion PSO – GA and basic GA,” Appl. Energy, vol. 165, pp. 676–684,
(CENCON), 2015, pp. 442–447. 2016.
[2] A. Baliyan, K. Gaurav, and S. Kumar, “A Review of Short Term [11] L. Sahoo, A. Banerjee, and A. Kumar, “An ef fi cient GA – PSO
Load Forecasting using Artificial Neural Network Models,” approach for solving mixed-integer nonlinear programming problem
Procedia - Procedia Comput. Sci., vol. 48, no. Iccc, pp. 121–125, in reliability optimization,” Swarm Evol. Comput., pp. 1–9, 2014.
2015. [12] Y.-Y. Hsu and C.-C. Yang, “Design of artificial neural networks for
[3] J. Y. Fan and J. D. McDonald, “A real-time implementation of short- short-term load forecasting. Part I: Self-organising feature maps for
term load forecasting for distribution power systems,” IEEE Trans. day type identification,” IEE Proc. C [Generation, Transm. Distrib.,
Power Syst., vol. 9, no. 2, pp. 988–994. vol. 138, no. 5, pp. 407–413, 1991.
[4] M. Q. Raza and Z. Baharudin, “A review on short term load [13] D. Whitley, T. Starkweather, and C. Bogart, “Genetic algorithms and
forecasting using hybrid neural network techniques,” in Power and neural networks: optimizing connections and connectivity,” Parallel
Energy (PECon), 2012 IEEE International Conference on, pp. 846– Comput., vol. 14, no. 3, pp. 347–361, 1990.
851. [14] D. J. Montana and L. Davis, “Training Feedforward Neural Networks
[5] P. Ray, D. P. Mishra, and R. K. Lenka, “Short term load forecasting Using Genetic Algorithms,” in Proceedings of the 11th International
by artificial neural network,” in 2016 International Conference on Joint Conference on Artificial Intelligence - Volume 1, 1989, pp.
Next Generation Intelligent Systems (ICNGIS), 2016, pp. 1–6. 762–767.
[6] H. S. Hippert, C. E. Pedreira, and R. C. Souza, “Neural networks for [15] J. Kennedy and R. Eberhart, “Particle swarm optimization,” Neural
short-term load forecasting: a review and evaluation,” Power Syst. Networks, 1995. Proceedings., IEEE Int. Conf., vol. 4, pp. 1942–
IEEE Trans., vol. 16, no. 1, pp. 44–55. 1948 vol.4, 1995.
[7] A. K. Singh, I. Ibraheem, S. Khatoon, M. Muazzam, and D. K. [16] E. Ozcan and C. K. Mohan, “Particle swarm optimization: Surfing
Chaturvedi, “Load forecasting techniques and methodologies: A the waves,” Proc. 1999 Congr. Evol. Comput. CEC 1999, vol. 3, no.
review,” in Power, Control and Embedded Systems (ICPCES), 2012 2, pp. 1939–1944, 1999.
2nd International Conference on, pp. 1–10. [17] M. Clerc and J. Kennedy, “The particle swarm - explosion, stability,
[8] S. Mishra and S. K. Patra, “Short term load forecasting using neural and convergence in a\nmultidimensional complex space,” IEEE
network trained with genetic algorithm & particle swarm Trans. Evol. Comput., vol. 6, no. 1, pp. 58–73, 2002.
optimization,” in Proceedings - 1st International Conference on
Emerging Trends in Engineering and Technology, ICETET 2008,

You might also like