Content uploaded by Nadeem Javaid
Author content
All content in this area was uploaded by Nadeem Javaid on Dec 13, 2019
Content may be subject to copyright.
1
Data Analytics for Short Term Price and Load
Forecasting in Smart Grids using Enhanced
Recurrent Neural Network
Muhammad Usman1, Zahoor Ali Khan2, Inam Ullah Khan3, Sakeena Javaid1and Nadeem Javaid1,∗
1COMSATS University Islamabad, Islamabad 44000, Pakistan
2CIS, Higher Colleges of Technology, Fujairah 4114, United Arab Emirates
3COMSATS University Islamabad, Lahore 54000, Pakistan
*Correspondence: nadeemjavaidqau@gmail.com, www.njavaid.com
Abstract—In this paper, an artificial neural network (ANN)
based methodology is proposed to forecast electricity load and
price. The performance of an ANN forecast model depends on
appropriate input parameters. Parameter tuning of ANN is very
important to increase the accuracy of electricity price and load
prediction. This is done using mutual information and decision
tree. After selecting best features for forecasting, these features
are given to forecasting engine working on principles of recurrent
neural network (RNN). For simulations, dataset is taken from
national electricity market (NEM), Australia. Results show that
the methodology has increased the accuracy of electricity load
and price forecast. Whereas, the error rate of forecasting is lower
than the other models for electricity load and price.
Index Terms—Smart grid, Data analytics, Artificial neural
network, Long short term memory, Forecasting, Short term
forecasting.
I. INTRODUCTION
With the passage of time, human population is increasing
significantly with which demand of electricity also increases.
To meet such huge demand of electricity traditional grid are not
efficient. Due to poor performance and increasing maintenance
cost of traditional grid electricity prices also increased. To
overcome the limitation of traditional grid smart grids (SG) are
introduced. Success of smart girds relies on the information
they gather. If SG has good quality of data then it become easy
to forecast load demand and price through different techniques.
As it is known excess electricity generation results in high
cost therefore system operators must know how much energy
is to generate during certain periods to meet the demand and
not exceed this demand significantly. Precisely predicting
1
the
load and price can provide useful information to reduce the
generation and maintenance costs and help in planing and
operations of a SG. With the help of data analytics in SG
extracting useful information become easier this information
helps in forecasting. With the help of data analysis on big
data previously unknown hidden patterns,energy consumption
trends and other important information is extracted. The term
big data refers to huge amount of data [
1
]. Big data have some
characteristics which are refereed as 4 V’s of big data:
Volume refers to huge amount of data generated. Huge amount
of data from grid and smart meters are recorded every minute.
1Prediction and forecasting are used alternatively
Velocity refers to speed at which new data is generated. Data
is recorded a very high speed in girds having sensitive sensor.
Variety refers to different type of data like structured and
unstructured data. Data from different sensor and devices are
also recorded.
Veracity refers to accuracy or trustworthiness of the data.
In data analytics different techniques are used on data. There
are different classifier for prediction which are used in field
of data analytics to extract useful in formation. GS used these
techniques for prediction of load demand. artificial neural
network (ANN) techniques are very helpful in when dealing
when big data because they have computational power to handle
big data and it gives better results.
A. Problem Statement and Contributions
In ANN, there are many classifiers which are used for
forecasting. One of them is recurrent neural network (RNN),
which is usually used for text generation. The basic problem
in RNN is gradient vanishing and gradient exploding. Model
is not properly trained and layered in the beginning of the
neural network and do not give good prediction due to these
two problems [
2
]. Vanishing gradient is a problem in which
gradient based learning algorithms found difficulty in training
network. In gradient based learning algorithm, weights are
updated in each epoch by taking partial derivative of the error
with respect to its weight. In some cases, gradient become
too small after sufficient iteration that it prevents the weight
from updation. Sometimes training completely stops due to
vanishing gradient. There is another problem in RNN that
it can not process log sequences of input and it can not be
used in deep neural networks (DNNs) because of activation
function used in RNN. Activation functions like tanh contribute
in loss of gradient [
3
]. To overcome the limitations of RNN,
an enhanced recurrent neural network (ERNN) is proposed to
address these problems in this work.
In this paper, we highlight the electricity price and load
forecasting problem. The objective of our work is to predict
the accurate load and price using data analytics on SG. To
solve this problem, we have applied RNN to forecast load
and price. RNN is a classifier that uses its previous hidden
states to predict next state. There are different parameters in
2
RNN, which are used for tuning purpose. RNN is a good
classifier; however, challenges are needed to overcome its
accuracy. Many techniques have been proposed over the last
years, both statistical and machine learning [
4
]-[
11
]. In this
paper, an enhanced RNN is used, which is the combination
of long short term memory (LSTM) and FFNN to increase
efficiency and to give better results. This paper proposes a
comprehensive load and price forecasting method based on
RNN, which can generate complete map of future demand. The
obtained results from two case studies show that the quality
of forecasting has been significantly improved as compared to
FFNN and RNN models.
II. PRO PO SE D SYS TE M MOD EL
In this section detail description of techniques are given
which is used in the proposed model shown in Fig. 1 to forecast
load and price. As it is known NEM dataset is used in this
system. Step wise description of techniques are as follows.
A. Feature Selection and Extraction
In first step, 2 stage feature selection, decision tree and
recursive feature elimination (RFE), is used. Decision tree (DT)
algorithm is very popular it is computationally fast. Besides
forming interpretable classification rules it can select features
on its own. DT tells about all possible outcomes. DT helps
in determining worst, best and expected values for different
scenarios. It can also combine with other decision techniques.
In second step, conditional mutual information (CMI) is used
for feature extraction. MI is the one of the most effective
techniques for feature extraction. However, sometimes it not
easy to get accurate estimation for high dimensional data.
The optimal feature extraction, in case of MI, is done when
a feature is created from a feature set where two features
are the least important for the value of the target and have
high redundancy among each other. In RFE, most important
features are selected from feature vector by reducing feature
set model become computationally fast. RFE reduce dimension
and redundancy of features. Which is common method for
removing redundancy.
B. Enhanced Recurrent Neural Network(ERNN) Prediction
Model
Recurrent neural network (RNN) is used for price and load
forecasting. RNN are the state of the art algorithm because
it is the first algorithm that remembers its input, due to an
internal memory. In RNN information cycle through a loop
means that hidden state of cell is also input for next cell with
its input which hepls RNN to make better decision, it takes into
consideration the current input and also what it has learned from
the input it received previously which make it perfectly suited
for machine learning problems with sequential data. There are
some limitations in RNN like vanishing and exploding gradient
due to which training of deep RNN is difficult. RNN also can
not deal with long sequence of data.
For forecasting of load and price in this paper ERNN is
used. which is an enhanced form of RNN. Purpose of using
enhanced scheme is that in RNN there is a problem of vanishing
gradient and RNN can not remember long sequences of input
so predicting ahead becomes difficult. In vanishing gradient
the value of gradient become to small that is does not train
the layers at the beginning properly. In LSTM there cell initial
state and hidden state initialized as zero then for every input
we call LSTM cell to which hidden state and cell state is
given with current input. Previous hidden state and current
input is combined and stored in combine then combine is given
to forget layer. In forget layer irrelevant data is removed. A
candidate layer is added using combine . This layer have values
which are added to cell state. Combine layer is also given to
input layer. This layer decide which values should be added
to new cell state. when forget layer, candidate layer and the
input layer is computed then cell state is calculated. In the end
output is calculated. point-wise multiplication of output and
new cell state gives new hidden state which is then given to
next cell of ERNN.
In ERNN, there are different gates input gate ,output gate, forget
gate and cell state. These gates determine which input is to keep
and which input is not important and need to discard. ERNN
takes input vector, previous cell state and previous hidden state
and apply different operations on it and gives output and cell
state. Different activation functions are used in ERNN like
Sigmoid and Tanh these functions help in maintaining cell
state.
III. SIMULATION RESULTS
In this section results are discussed for experiment we use
dataset with attributes and techniques as mentioned above.
In the beginning dataset is loaded into system then data is
split into training and testing. MI is applied on it which give
values to features accordingly. While predicting load it gives
more importance to scheduled generation as compare to other
features. After that Features are given to DT which tells about
the importance of each feature accordingly. After which RFE is
applied on feature and most relevant three features are selected,
which are then given to classifier which training on those
feature an forecast results. Which are then compare to actual
results and performance metric are computed.
A. Dataset Description
In this proposed scheme data is taken from regional market
of National Electricity Market (NEM), Australia [
12
]. This
dataset is of a grid in New South Wales (NSW) region. NEM
dataset has many attributes from which six attributes time,
dispatch price or spot price, scheduled demand, scheduled
generation, semi scheduled generation and net import are used.
The data has the attributes: dispatch price ($/MWh), scheduled
demand (Wh), scheduled generation (MW), semi scheduled
generation (MW) and net import (MW). NEM dataset has data
of 2 days from 15 October 2018 21:00 to 17 October 2018
20:55 of NSW region in Australia. This dataset is of 5 min
intervals which has total of 576 instances. Data is split into
two parts. 75% training data is used for training and 25% is
used for testing. This means that 36 hours data is used for
training and 12 hours data is for prediction. Data is split in
same way for both load and price prediction.
B. Data Preprocessing
In data preprocessing data is loaded into system and
unnecessary columns are removed. Then data is normalize and
3
Data Set
Recursive Feature
Elimination
2 Stage Feature
selection
Feature
Extraction
Decision Tree
Recurrent Neural Network
X
Y
RNN
Input
Output
Model
Evaluation
Predicted Load
And Price
Conditional Mutual
Information
XOOXXOXO
XXXXX
XXXX
Features
Fig. 1: System Model
decimal values are converted into integers. Mutual formation
is then applied to data. MI then give importance to features
according to their correlation as shown in Fig. 2 and Fig. 3.
After which these values are given to decision tree which gives
best features from dataset as shown in Fig. 2 and Fig. 3. RFE
is then applied to feature to removes redundancy from features.
C. Load Forecasting
Selected features are then given to classifier which forecast
load. Here in load forecasting, we have also compare FFNN
and RNN techniques with ERNN. Which shows that ERNN
gives better result then remaining two techniques. Results are
given in Fig. 4 and Fig. 5. These graphs show forecasting of
load for 12 hour ahead and 1 hour ahead, respectively.
D. Price Forecasting
In price forecasting we have same steps of feature selection
and feature extraction after which features are given to same
forecasting engine as given to load forecasting made by
classifier is given in Fig. 6 and Fig. 7. In Fig. 6, twelve hours
TABLE I: Load Forecasting Performance Evaluators
Techniques MSE MAE RMSE MAPE
ERNN 11.7 29.15 34.26 8.89
RNN 64.48 77.65 80.30 9.10
FFNN 113.84 149.91 150.89 14.22
TABLE II: Price Forecasting Performance Evaluators
Techniques MSE MAE RMSE MAPE
ERNN 9.68 17.44 31.11 44.97
RNN 19.28 17.29 31.05 40.54
FFNN 27.00 21.45 36.74 45.08
of prediction is made after training of 36 hours from Fig. 6 it is
clear that performance of FFNN is not that much good. RNN
and ERNN is giving good prediction. In Fig. 7, one hour of
price forecasting is shown. One hour of forecasting shows that
ERNN shows better prediction then RNN and FFNN. These
graph shows that our proposed scheme performs better then
benchmark techniques.
4
Dispatch Price (
$/MWh)
Scheduled Generation (MW)
Semi Scheduled Generation (MW)
Net Import (MW)
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Importance
DTC
MI
Fig. 2: MI and DT feature importance for load
Scheduled Demand (MW)
Scheduled Generation (MW)
Semi Scheduled Generation (MW)
Net Import (MW)
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Importance
DTC
MI
Fig. 3: MI and DT feature importance for price
E. Performance Evaluation
To Evaluate the performance, four evaluator are used:
Root Mean Square Error (RMSE), Mean Average Percentage
Error(MAPE), Mean Square Error(MSE) and Mean Absolute
20 40 60 80 100 120 140
5 Minutes Interval
5500
6000
6500
7000
7500
8000
8500
Load (MW)
Actual
ERNN
RNN
FFNN
Fig. 4: Load Forecasting Comparison of 12 Hours
2 4 6 8 10
5 Minutes Interval
5500
6000
6500
7000
7500
8000
8500
Load (MW)
Actual
FFNN
RNN
ERNN
Fig. 5: Hour Ahead Load Forecasting Comparison
Error (MAE). MAPE has the lowest value in load forecasting;
however, in price forecasting MAPE has high values as shown
in Table I and Table II and its graphical presentation is shown
in Fig. 8 and Fig. 9.
20 40 60 80 100 120 140
5 Minutes Interval
50
100
150
200
250
300
Price ($/MWh)
Actual
ERNN
RNN
FFNN
Fig. 6: Price Forecasting Comparison of 12 Hours
5
2 4 6 8 10
5 Minutes Interval
50
75
100
125
150
175
200
225
Price ($/MWh)
Actual
FFNN
RNN
ERNN
Fig. 7: Hour Ahead Price Forecasting Comparison
MAE MSE MAPE RMSE
0
20
40
60
80
100
120
140
Error Value
ERNN
RNN
FFNN
Fig. 8: Load Forecasting Error Comparison
MAE MSE MAPE RMSE
0
10
20
30
40
Error Value
ERNN
RNN
FFNN
Fig. 9: Price Forecasting Error Comparison
IV. CONCLUSION
An efficient technique is proposed to forecast load and price
of electricity using data analytics. Enhanced RNN is proposed
in this paper for short term price and load forecasting. The
proposed model consists of data preprocessing. It is done by
eliminating irrelevant features using RFE and DTC. It reduces
redundancy by MI. The proposed model trains and tests data
using LSTM. Experimental results prove the effectiveness of
proposed scheme. Performance results show that our proposed
scheme has less MAPE as compared to FFNN and RNN. NEM
data set is used for training and testing of data for forecasting.
REFERENCES
[1]
Y. Zhang, T. Huang, and E. F. Bompard, “Big data analytics in smart
grids: a review,” Energy Informatics, vol. 1, no. 1, p. 8, 2018.
[2]
J.-B. Fiot and F. Dinuzzo, “Electricity demand forecasting by multi-task
learning,” IEEE Transactions on Smart Grid, vol. 9, no. 2, pp. 544–551,
2018.
[3]
H. Shi, M. Xu, and R. Li, “Deep learning for household load forecast-
ing—a novel pooling deep rnn,” IEEE Transactions on Smart Grid, vol. 9,
no. 5, pp. 5271–5280, 2018.
[4]
B. Stephen, X. Tang, P. R. Harvey, S. Galloway, and K. I. Jennett,
“Incorporating practice theory in sub-profile models for short term
aggregated residential load forecasting,” IEEE Transactions on Smart
Grid, vol. 8, no. 4, pp. 1591–1598, 2017.
[5]
S. ZAKARYA, H. ABBAS, and M. BELAL, “Long-term deep learning
load forecasting based on social and economic factors in the kuwait
region.” Journal of Theoretical & Applied Information Technology,
vol. 95, no. 7, 2017.
[6]
A. Tajer, “Load forecasting via diversified state prediction in multi-area
power networks,” IEEE Transactions on Smart Grid, vol. 8, no. 6, pp.
2675–2684, 2017.
[7]
P. Vrablecov
´
a, A. B. Ezzeddine, V. Rozinajov
´
a, S.
ˇ
S
´
arik, and A. K.
Sangaiah, “Smart grid load forecasting using online support vector
regression,” Computers & Electrical Engineering, vol. 65, pp. 102–117,
2018.
[8]
P. Lusis, K. R. Khalilpour, L. Andrew, and A. Liebman, “Short-term
residential load forecasting: Impact of calendar effects and forecast
granularity,” Applied Energy, vol. 205, pp. 654–669, 2017.
[9]
C. Tong, J. Li, C. Lang, F. Kong, J. Niu, and J. J. Rodrigues, “An
efficient deep model for day-ahead electricity load forecasting with
stacked denoising auto-encoders,” Journal of Parallel and Distributed
Computing, vol. 117, pp. 267–273, 2018.
[10]
H. Jiang, Y. Zhang, E. Muljadi, J. J. Zhang, and D. W. Gao, “A short-term
and high-resolution distribution system load forecasting approach using
support vector regression with hybrid parameters optimization,” IEEE
Transactions on Smart Grid, vol. 9, no. 4, pp. 3341–3350, 2018.
[11]
M. Rafiei, T. Niknam, J. Aghaei, M. Shafie-khah, and J. P. Catal
˜
ao,
“Probabilistic load forecasting using an improved wavelet neural network
trained by generalized extreme learning machine,” IEEE Transactions
on Smart Grid, 2018.
[12]
National electricity market – australian energy market operator. Australia.
[Online]. Available: https://www.aemo.com.au/Electricity/National-
Electricity-Market-NEM