You are on page 1of 7

Energy market price forecasting for predictive

maintenance using deep learning


Dasmit Sethi, TNM107: Seminarium 3
January 12, 2024

1 Introduction
In the Nordic countries the electricity market is liberalized where companies can buy, sell
or trade electricity as any other commodity on the Nordic power exchange Nord Pool
[1], where electricity is traded using spot and derivative contracts. However, electricity
is a unique commodity because it is not storable which means it must be produced
and consumed simultaneously [2]. The electricity market is also a day-ahead market, as
opposed to a continuous trade market.
Holmen Paper, one of Sweden’s major electricity consumers purchases over 3 TWh
of electricity through Nord pool’s spot market to sustain the company’s two paper mills
every year. The process of purchasing electricity is an auction-based procedure with price
dependent bids, where different entities bid the price they are willing to pay for a certain
volume of energy the next day [3]. As Holmen Paper adapts to operate flexibly within
the energy market, the bidding strategy becomes increasingly important.

1.1 Motivation
At Nord Pool, the price of electricity is published every day at around 13:00 Central Eu-
ropean Time (CET) [3], which poses challenges as it allows limited time for maintenance
planning for the two paper mills.
Thus, in order to plan maintenance and improve bidding strategy it becomes impor-
tant to forecast future energy prices. A range of implementations, including statistical
methods such as ARMA, ARIMA, regression to machine learning (ML) methods such as
support vector machines, artificial neural networks and hybrid methods have been used
for this purpose over the years with varying degrees of success [2]. Deep learning (DL),
a subfield of ML, has seen promising results on a wide number of applications today
ranging from natural language, computer vision and time series forecasting [4].
While early methods within DL were based on Feedforward Neural Network (FNN)
[5], the field has seen impressive results in recent years with Long short-term Memory
(LSTM) [6] being one of the most prominent method for time series forecasting. In 2017,
Transformer [7] was introduced which has gained popularity in recent years due to its
implementation in natural language processing [8].
The existing forecasting methods employed by Holmen Paper lack the precision and
are not useful to provide an important basis for decision regarding price dependent bidding
or to predict maintenance on days where electricity costs the highest.

1
To mitigate risks and optimize energy consumption companies such as Holmen Pa-
per can utilize deep learning methods which have showcased superior performance in
forecasting electricity prices [4].

1.2 Aim
The aim of this thesis to implement two different DL models to forecast weekly energy
prices on the Nord Pool SE3 bidding zone and estimate the day where which the price
of electricity is highest and lowest based on historical market data and to explore factors
such as temperature, wind, sun and other factors such as transmission availability and
consumption patterns.

1.3 Research questions


This thesis focuses on the following research questions:

1. What are the most important factors behind short-term energy prices?

2. Can deep learning methods be implemented to accurately forecast spot price levels
on the nordic energy market Nord Pool?

3. How accurate do more established time series forecasting methods within deep
learning such as LSTM compare to a more recent Transformer-based model for
electricity price forecasting?

1.4 Delimitations
This thesis main focus is on the development of a model for forecasting week-ahead
electricity price on the Nord Pool market for Holmen Paper. Because of this, the study
will also focus on the bidding zone SE3 in Sweden. The model will be developed using
two different types of neural network architectures; LSTM and Transformer. LSTM are
well established and researched while Transformer have only been recently introduced
and implemented within time series forecasting. While there are many different types of
methods within time series forecasting that are not ML-based e.g. traditional statistical
models, such methods will not be the focus in this study as they have been exhaustively
been researched in other studies.
The thesis will be based on data from the Nord Pool spot market. There are many
factors that affect electricity price in Sweden. The data will include historical electricity
prices, weather data such as temperature, wind speed, precipitation etc and other factors
related to load profile.

2 Theory
2.1 The Swedish electricity market and Nord Pool
The Swedish energy market was deregulated in 1996 which means that electricity went
from being regulated to being exposed to competition [9]. The Norweigan energy market
was also deregulated around the same time in 1991, where both countries established
the power exchange Nord Pool [10]. Over time, Denmark joined the power exchanged

2
which integrated the Nordic countries into one common Nordic market [10]. Later on
in the 2010s Estonia, Latvia and Lithuania joined Nord Pool following a deregulation as
well [11]. Today, the Nordic market is compromised by Finland, Sweden, Denmark and
Norway that share the Nordic market [10].
The Nordic electricity market is divided into the physical market and the financial
market [12]. The physical consists of the day-ahead market, the intra-day market and
the balancing market [12]. The scope of the thesis is the day-ahead and the intra-day
market. Trading on the day-ahead and intraday market is provided by Nord Pool Spot
[12], who calculates the price based on the balance between bids and offers from market
participants. Additionally, the Swedish market divided in several bidding areas as seen
in Figure 1 due to supply and demand.

Figure 1: Caption

According to Nord Pool, ”The different bidding areas help indicate constraints in
the transmission systems, and ensure the regional market conditions are reflected in the
price” [13]. When there are constraints in the transmission capacity between two bidding
areas, power will then transfer from the low price area to the high price area to satisfy
the area with the highest demand to prevent bottlenecks [13].
Nord Pool calculates the price for each bidding zone for each hour of the following day
based on supply and demand [1]. For instance, in Sweden the electricity price is lower
in the SE1 and SE2 bidding zones compared to SE3 and SE4 bidding zones [13]. The
SE1 and SE2 bidding zones produce more electricity than they consume, which causes
electricity to be transported from those zones to SE3 and SE4 [13].

3
2.2 Deep Learning in Time Series Forecasting
While the concept of deep learning has been around since the 1950s, the availability
of large amounts of data and computational power made deep learning become more
popular during the 2010s in image recognition tasks [14]. Since then, deep learning has
seen promising results across diverse applications including natural language processing,
computer vision, and time series forecasting [14]. Due to the ability to model

2.3 Electricity price forecasting


The benefits of deep learning in time series forecasting have been heavily used to better
model the nonlinear relations between electricity price and the factors that drive them
like weather conditions.
Electricity price forecasting (EPF) is a branch of time series forecasting, focusing on
prediction of events through a sequence of time. Over the last 25 years, there have been
various methods applied to intraday and day-ahead EPF. It was until the 2010s that the
field was mostly dominated by early machine learning methods such as linear regression
and single-output shallow neural networks [15]. As previously mentioned, as more data
and computational power became available the field has seen deeper and more complex
networks being applied in EPF [15].
Deep learning is particularly well-suited to EPF as they can learn complex non-linear
mappings, which makes them suitable to approximated virtually any type of non-linear
relationship that is often found in EPF [16][15].
LSTM, known for its effectiveness in capturing long-range dependencies, has been
extensively used in EPF and time series forecasting in general [17]. While the emergence
of Transformers in 2017 which was originally designed for natural language processing, has
also shown promise in computer vision and handling sequential data, prompting further
investigation in EPF [18].

3 Method
3.1 Data
Nord Pool provides historical market data from 2013 to present date at their website
[19]. The relevant types of data that were identified for this report were the historical
electricity price spot prices, transmission flows, wind power and production. Weather
data such as temperature, precipitation and wind speed will be investigated as relevant
factors. Furthermore, the total electricity production is made up mostly by renewable
sources at around 60% and nuclear power at around 30% which also makes nuclear power
production a relevant factor to analyze.

3.2 Model implementation


Using the available data, two different models will be implemented based on LSTM and
Transformer architectures. Because hyperparameter selection is a complex process in deep
learning, they will be selected by a combination of research other similar experiments and
by performing sensitivity analysis to get the best prediction accuracy.

4
3.3 Evaluation
To evaluate the results, different performance metrics are considered in evaluating forecast
accuracy of the models. For regression problems, it is common to use Mean Squared Error
(MSE). MSE calculates the average squared predictive error given n samples, as shown
in Equation 1.
m
1 X
(yi − ŷi )2 (1)
m j=1

Where , is the number of samples, yi is the actual value and ŷi is the predicted value.
The error is squared to consider the relative difference between the values at all times,
which means that poor prediction results in poor MSE value.
To analyze the most important factors that affect future electricity price, a correlation
analysis is considered. Pearson’s correlation coefficient is used for this purpose as shown
in Equation 2.
cov(X, Y )
(2)
σX σY
Where the the covariance of the two variables X and Y divided by the product of
their standard deviations. The result is a value between -1 and 1. Correlation equal to 1
implies perfect correlation and -1 perfect negative correlation, while a value of 0 implies
no correlation between the dependent variables.

5
4 Timeplan

2024

January February March April May June

Project plan

Litterature review

Data extraction

Data exploration

Data pre-processing

Model implementation

Halftime

Model implementation

Model evaluation

Gather results and bugfixing

Report writing

Presentation

Figure 2: Time plan

References
[1] The Power Market. https://www.nordpoolgroup.com/en/the-power-market/.
Accessed 2023-11-17.
[2] Rafal Weron. “Electricity price forecasting: A review of the state-of-the-art with a
look into the future”. In: International Journal of Forecasting 30.4 (2014), pp. 1030–
1081. issn: 0169-2070. doi: https://doi.org/10.1016/j.ijforecast.2014.08.
008.
[3] Day-ahead market. https://www.nordpoolgroup.com/en/the-power-market/
Day-ahead-market/. Accessed 2023-11-17.
[4] Arkadiusz Jedrzejewski, Jesus Lago, Grzegorz Marcjasz, and Rafal Weron. “Elec-
tricity Price Forecasting: The Dawn of Machine Learning”. In: IEEE Power and
Energy Magazine 20.3 (May 2022), pp. 24–31. issn: 1558-4216. doi: 10.1109/mpe.
2022.3150809. url: http://dx.doi.org/10.1109/MPE.2022.3150809.
[5] D. Graupe. Principles of Artificial Neural Networks. Advanced series in circuits and
systems. World Scientific, 2013. isbn: 9789814522748.

6
[6] Sepp Hochreiter and Jürgen Schmidhuber. “Long Short-Term Memory”. In: Neural
Comput. 9.8 (Nov. 1997), pp. 1735–1780. issn: 0899-7667. doi: 10.1162/neco.
1997.9.8.1735.
[7] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan
N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention Is All You Need. 2017.
arXiv: 1706.03762 [cs.CL].
[8] Transformer: A Novel Neural Network Architecture for Language Understanding.
https : / / blog . research . google / 2017 / 08 / transformer - novel - neural -
network.html. Accessed 2023-11-17.
[9] Elmarknaden i Sverige. https://www.energimarknadsbyran.se/el/elmarknaden/
elmarknaden-i-sverige/. Accessed 2023-12-04.
[10] History. https://www.nordpoolgroup.com/en/About- us/History/. Accessed
2023-12-04.
[11] The power market. https://www.nordpoolgroup.com/en/the-power-market/.
Accessed 2023-12-04.
[12] An overview of the Nordic Electricity Market. https://www.nordicenergyregulators.
org/about-nordreg/an-overview-of-the-nordic-electricity-market/. Ac-
cessed 2023-12-04.
[13] Bidding areas. https : / / www . nordpoolgroup . com / en / the - power - market /
Bidding-areas/. Accessed 2023-12-04.
[14] Haohan Wang and Bhiksha Raj. On the Origin of Deep Learning. 2017. arXiv:
1702.07800 [cs.LG].
[15] Arkadiusz Jedrzejewski, Jesus Lago, Grzegorz Marcjasz, and Rafal Weron. “Elec-
tricity Price Forecasting: The Dawn of Machine Learning”. In: IEEE Power and
Energy Magazine 20.3 (May 2022), pp. 24–31. issn: 1558-4216. doi: 10.1109/mpe.
2022.3150809. url: http://dx.doi.org/10.1109/MPE.2022.3150809.
[16] Ian Goodfellow, Yoshua Bengio, and Aaron Courville. Deep Learning. http://www.
deeplearningbook.org. MIT Press, 2016.
[17] Andreas Wagner, Enislay Ramentol, Florian Schirra, and Hendrik Michaeli. “Short-
and long-term forecasting of electricity prices using embedding of calendar informa-
tion in neural networks”. In: Journal of Commodity Markets 28 (2022), p. 100246.
issn: 2405-8513. doi: https://doi.org/10.1016/j.jcomm.2022.100246. url:
https://www.sciencedirect.com/science/article/pii/S2405851322000046.
[18] Yong Liu, Tengge Hu, Haoran Zhang, Haixu Wu, Shiyu Wang, Lintao Ma, and
Mingsheng Long. iTransformer: Inverted Transformers Are Effective for Time Se-
ries Forecasting. 2023. arXiv: 2310.06625 [cs.LG].
[19] Data Portal. https://www.nordpoolgroup.com/en/services/power- market-
data-services/dataportalregistration/. Accessed 2023-12-04.

You might also like