Short Term Electricity Price Forecasting
Through Convolutional Neural Network (CNN)
Zahoor Ali Khan, Sahiba Fareed, Mubbashra Anwar, Afrah Naeem, Hira Gul,
Arooj Arif and Nadeem Javaid
Abstract High price ﬂuctuations have a direct impact on electricity market. Thus,
accurate and plausible price forecasts have been implemented to mitigate the con-
sequences of price dynamics. This paper proposes two techniques to deal with the
Electricity Price Forecasting (EPF) problem. Firstly, Convolutional Neural Network
(CNN) model is used to predict the EPF. Secondly, a principle component analysis
model is used for the feature extraction. We have conducted simulations to prove
the effectiveness of the proposed approach, which show that CNN based approach
outperforms the multilayer perceptron model.
Short term price forecasting has become the crucial issue in electricity market .
Electricity Price Forecasting (EPF) has been classiﬁed into ﬁve categories: (1) self-
organized system, (2) fundamental models, (3) non-structured methods, (4) statis-
tical models, and (5) computational intelligence approaches. Computational intelli-
gence models are also referred to as artiﬁcial intelligence models . The Artiﬁcial
Intelligence (AI) model is able to deal with complex systems including nonlinear
and statistical systems. Convolution Neural Network (CNN), Artiﬁcial Neural Net-
work (ANN) and Recurrent Neural Network (RNN) have been extensively used as
classiﬁers in literature and real-time applications. ANN is the widely used method
for forecasting short term electricity load and price forecasting. However, it uses
Zahoor Ali Khan
Faculty of Computer Information Science,
Higher Colleges of Technology, Fujairah 4114, United Arab Emirates
Sahiba Fareed, Mubbashra Anwar, Afrah Naeem, Hira Gul, Arooj Arif and
Nadeem Javaid (corresponding author), e-mail: firstname.lastname@example.org
COMSATS University Islamabad, Islamabad 44000, Pakistan
2 Sahiba et.al
back propagation algorithm, which increases the complexity of algorithm. ANN
takes too many features which cause the problem of overﬁtting. ANN can easily
trap in local minima. It takes greater time in testing the data. According to the his-
torical study, the lack of feature selection, data extraction, and efﬁcient training pro-
cedures have become a major problem for accurate price forecasting . However,
advancement in neural networks have a major impact on reducing such problems.
The development in neural networks progresses to make an accurate measurement
with less computational time. Therefore, the main purpose of this literature is to
propose the ﬁnest model for Electricity Price Forecasting (EPF). CNN is the intel-
ligent classiﬁer for the prediction. Some external and internal features can easily
affect the EPF. Internal factors such as balance in supply, demand and EPF have an
immense effect on price forecasting. Market design, weather conditions, humidity
and temperature are the external factors affecting the price forecasting.These factors
have an important affect on the EPF shown in Fig. 1.
Fig. 1: Factors Affecting EPF
2 Related Work
In , authors use fundamental models for forecasting purpose in electricity market.
These models accurately forecast the electricity price as model depicts its demand
Short Term Electricity Price Forecasting 3
and supply. Recently, econometric time series models and machine learning meth-
ods, including Artiﬁcial Neural Networks (ANN) have been developed. However,
ANN model gets trapped in local minima, which is considered the biggest drawback
of this model. In , owing to complex drivers and sharp changes of electricity price,
forecasting electricity price accurately becomes a difﬁcult task. Two main problems
are found in existing relevant models. Firstly, a hybridized model combined with
Empirical Mode Decomposition (EMD) suffers from its limitation, results in re-
ducing the accuracy of the model. Secondly, the aforementioned model is not able
to classify the features of electricity price, when it combined with linear and non-
linear models . However, improved EMD has a mode mixing problem. In , as
the increase in integration of Renewable Energy Resources (RER), it increases the
volatility of price, hence; there is unpredictable change in the market agent’s behav-
ior, so sudden drops in production and consumption occur more likely. However, this
imbalance increases the electrical grids unstability. In , the ANN model is used
for the prediction of electric load forecasting. Some optimization technique can be
applied to increase efﬁciency of deep learning model. In , authors have proposed
a framework for the prediction of over voltage. Sparse auto-encoder is used for the
forecasting. Single layer sparse auto-encoder is used for the dimensionality reduc-
tion and automate feature extraction. In , EMD is used to denoise input electrical
load signal. The processed data is transferred to mixed-Extreme Learning Machine
(ELM) for forecasting. Mixed kernel combines Radial Basis Function (RBF) ker-
nel and Unscented Kalman Filter (UKF) kernel. However, EMD has mode mixing
problem. ELM performs forecasting in one go as it is single feed forward neural
network, though, it cannot tune parameters effectively. So, accuracy of such models
is questionable. In , they proposed two stage model, the ﬁrst is Simple Moving
Average (SMA) and second one is Random Forest [RF]. Although, the number of
decision trees increase in RF, it causes over ﬁtting problem. RF does not perform
well in this work, when the number of trees are greater than 128. SMA predicts load
on previous trends. Although, there is more volatility in short time frames as com-
pared to long time frames. So, it does not show good results in short time frame.
In , they deal with the problem of feature selection. Feature selection is the key
concept for the accurate results. In many cases, load and price forecast methods face
the problem of appropriate feature selection techniques. In , the traditional short
term load forecasting is conducted by deterministic theories, i.e., Gray Model (GM),
time series method, Support Vector Regression (SVR), and Back-Propagation Neu-
ral Network (BPNN) model. However, all of these techniques have few limitations,
which are enlisted below.
•The simulations of the interrelated parameters of loads and mathematical model’s
parameters become complex.
•Enhancements are required in the forecasting accuracy.
•There are not satisfactory forecasting effects.
•These models are not able to reﬂect the actual load in real time environment.
4 Sahiba et.al
The techniques - are also developed for the energy management in different
perspectives. By following all the aforementioned techniques, we have proposed a
new technique in order to overcome their trade-offs.
3 Proposed Methodology
In this paper, the proposed model is used for electricity price forecasting. In the pro-
posed model, three modules are used. In the ﬁrst module, Mutual Information (MI)
is used for feature selection. In the second module, Principal Component Analysis
(PCA) is used for feature extraction. In the third module, CNN is used for electricity
Fig. 2: Overview of System Model
3.1 Data Processing
CNN requires the best selection of input data. The dataset includes the feature of
weather conditions which require normalization and standardization. These pro-
cesses provide a common scale to input data. Seasonality is removed through nor-
3.2 Feature Selection
Feature selection is the process, which reduces the complexity of model and makes
it easier to interpret. It provides more accuracy to the model, if input data is correct
according to the situation. In paper , MI provides the best detection over the non-
Short Term Electricity Price Forecasting 5
3.3 Feature Extraction
In the proposed model, PCA is used for feature extraction. This provides the less
computational time and more accuracy. PCA reduces the over ﬁtting problem and
dimensionality by denoising the data. Data normalization is important for perform-
3.4 Price Forecasting
The appropriate methods for electricity prices have considered the deterministic pat-
ters. CNN is used for electricity price forecasting. CNN consists of the multiple hid-
den layers. The ﬁrst layer is called the convolution layer. Convolution layer contains
the ﬁlters used for mapping input data and prioritizing them. Relu function applies
the kernel ﬁlter to the matrices and assigns them weights in the ﬁrst layer. The
neurons in this layer connect to other neurons and pass the information to hidden
layers. The second layer is pooling, which takes information from the convolution
layer, calculates the average and the maximum value of a class. It also reduces the
dimensionality. There are two types of pooling, one is large and other is small. Small
pooling covers little area of the ﬁeld. Secondly, the pooling layer is used to extract
these features with high priority, which also processes the noise suppression. The
third layer is dense layer, in which each neuron is connected to the neuron of the
other layers. The structure of dense layer is similar to multiple layer perceptron. The
dense layer uses the matrix form of data and converts it into the vector form. The
fourth layer is dropout layer, which is a regularization technique aims to reduce the
complexity of the model with the goal to prevent over ﬁtting.
4 Simulation Results
The ﬁnal results of the prediction have been discussed in this section. Importance of
selected features is calculated by MI. A threshold value is deﬁned for the selection
of the best features. Features that have importance smaller than or equal to a thresh-
old value as shown in Fig. 4, are selected for the prediction results. Some features
are highly important for the prediction, i.e., RT-LMP, RT-EC. Some features have
importance greater than 0.15. However, the value of the threshold is taken as 0.15.
The features that have greater values than the threshold, are dropped. PCA is used
for the extraction, which deals with dimensionality reduction, as shown in Fig. 5.
The appropriate methods for electricity prices have considered the deterministic
patters as well as stochastic components. CNN is used for EPF.
6 Sahiba et.al
Fig. 3: Flow Chart of CNN
Fig. 4: Feature Selection using MI
Short Term Electricity Price Forecasting 7
Fig. 5: Feature Extraction Using PCA
Fig. 6: Electricity Price Forecasting Using CNN
CNN is the widely used method for forecasting short term EPF. ANN is used for
classiﬁcation; however, it uses back propagation algorithm, which increases the
complexity of algorithm. ANN takes too many features, which cause the problem of
overﬁtting. ANN can easily trap in local minima. In this paper, we have proposed a
model for short term EPF using CNN with PCA. The proposed model is compared
with benchmark methods from the results and it is concluded that proposed model
performs better than the benchmark method.
8 Sahiba et.al
1. Keles, D., Scelle, J., Paraschiv, F., and Fichtner, W. (2016). Extended forecast methods for
day-ahead electricity spot prices applying artiﬁcial neural networks. Applied energy, 162,
2. Wang, J., Liu, F., Song, Y., and Zhao, J. (2016). A novel model: Dynamic choice artiﬁcial neu-
ral network (DCANN) for an electricity price forecasting system. Applied Soft Computing,
3. Zhang, J. L., Zhang, Y. J., Li, D. Z., Tan, Z. F., and Ji, J. F. (2019). Forecasting day-ahead elec-
tricity prices using a new integrated model. International Journal of Electrical Power Energy
Systems, 105, 541-548.
4. Gao, W., Darvishan, A., Toghani, M., Mohammadi, M., Abedinia, O., and Ghadimi, N.
(2019). Different states of multi-block based forecast engine for price and load prediction.
International Journal of Electrical Power Energy Systems, 104, 423-435.
5. Wang, K., Xu, C., Zhang, Y., Guo, S., and Zomaya, A. Y. (2017). Robust big data analytics
for electricity price forecasting in the smart grid. IEEE Transactions on Big Data, 5(1), 34-45.
6. Qiu, X., Ren, Y., Suganthan, P. N., and Amaratunga, G. A. (2017). Empirical mode decom-
position based ensemble deep learning for load demand time series forecasting. Applied Soft
Computing, 54, 246-255.
7. Chinnathambi, R. A., Mukherjee, A., Campion, M., Salehfar, H., Hansen, T. M., Lin, J., and
Ranganathan, P. (2018). A Multi-Stage Price Forecasting Model for Day-Ahead Electricity
Markets. Energies, 1(1), 1-21.
8. Fan, G. F., Guo, Y. H., Zheng, J. M., and Hong, W. C. (2019). Application of the Weighted
K-Nearest Neighbor Algorithm for Short-Term Load Forecasting. Energies, 12(5), 1-19.
9. Chen, Y., Kloft, M., Yang, Y., Li, C., and Li, L. (2018). Mixed kernel based extreme learning
machine for electric load forecasting. Neurocomputing, 312, 90-106.
10. Qiu, X., Suganthan, P. N., and Amaratunga, G. A. (2018). Ensemble incremental learning
random vector functional link network for short-term electric load forecasting. Knowledge-
Based Systems, 145, 182-196.
11. Alanis, A. Y. (2018). Electricity prices forecasting using artiﬁcial neural networks. IEEE Latin
America Transactions, 16(1), 105-111.
12. Guo, Y., Han, S., Shen, C., Li, Y., Yin, X., and Bai, Y. (2018). An adaptive SVR for high-
frequency stock price forecasting. IEEE Access, 6, 11397-11404.
13. Hameed, A. R., Javaid, N., Islam, S. U., Ahmed, G., Qasim, U., and Khan, Z. A. (2016,
September). BEEC: Balanced energy efﬁcient circular routing protocol for underwater wire-
less sensor networks. In 2016 International Conference on Intelligent Networking and Col-
laborative Systems (INCoS) (pp. 20-26). IEEE.
14. Zain-ul-Abidin, M., Khan, M. A., Javaid, N., Khizar, M., Khan, Z. A., and Qasim, U. (2016,
March). Enhanced single chain-based scheme in cylindrical underwater wireless sensor net-
works. In 2016 30th International Conference on Advanced Information Networking and Ap-
plications Workshops (WAINA) (pp. 343-348). IEEE.
15. Hafeez, T., Javaid, N., Hameed, A. R., Sher, A., Khan, Z. A., and Qasim, U. (2016, July).
AVN-AHH-VBF: Avoiding void node with adaptive hop-by-hop vector based forwarding for
underwater wireless sensor networks. In 2016 10th International Conference on Innovative
Mobile and Internet Services in Ubiquitous Computing (IMIS) (pp. 49-56). IEEE.
16. Shah, M., Javaid, N., Tariq, S., Imran, M., and Alnuem, M. (2015, September). A balanced
energy consumption protocol for underwater ASNs. In 18th IEEE International Conference
on Network-Based Information Systems (NBiS-2015), Taipei, Taiwan.
17. Fahim, H., Javaid, N., Qasim, U., Khan, Z. A., Javed, S., Hayat, A., ... and Rehman, G.
(2015, July). Interference and bandwidth aware depth based routing protocols in underwater
WSNs. In 2015 9th International Conference on Innovative Mobile and Internet Services in
Ubiquitous Computing (pp. 78-85). IEEE.
18. Awais, M., Javaid, N., Shaheen, N., Iqbal, Z., Rehman, G., Muhammad, K., and Ahmad, I.
(2015, September). An efﬁcient genetic algorithm based demand side management scheme
Short Term Electricity Price Forecasting 9
for smart grid. In 2015 18th International Conference on Network-Based Information Systems
(pp. 351-356). IEEE.
19. Ashraf, H., Hassan, A., Khurshid, U., Mahmood, A., Shaheen, N., Khan, Z. A., ... and Javaid,
N. (2015, July). Peak load shaving model based on individual’s habit. In 2015 Ninth Inter-
national Conference on Complex, Intelligent, and Software Intensive Systems (pp. 276-282).