<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Comparative analysis of models for short-term forecasting of electricity consumption⋆</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Mykola Korablyov</string-name>
          <email>mykola.korablyov@nure.ua</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Igor Kobzev</string-name>
          <email>ikobzev12@gmail.com</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Oleksandr Chubukin</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Danylo Antonov</string-name>
          <email>danylo.antonov@nure.ua</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vladyslav Polous</string-name>
          <email>vladyslav.polous@nure.ua</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Oleksandr Tkachuk</string-name>
          <email>alexander.k.tkachuk@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Kharkiv National University of Radio Electronics</institution>
          ,
          <addr-line>Kharkiv 61166</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Simon Kuznets Kharkiv National University of Economics</institution>
          ,
          <addr-line>Kharkiv 61166</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
      </contrib-group>
      <fpage>1</fpage>
      <lpage>4</lpage>
      <abstract>
        <p>Forecasting electricity consumption is an urgent task, and the solution significantly affects the efficiency of the use of energy resources. The paper considers short-term forecasting of electricity consumption, which predicts the amount of energy that will be used in a short period, from several hours to several days in advance. There are various short-term forecasting models, so it is important to reasonably choose a model that provides analysis and effective forecasting of electricity consumption to optimize the use of energy resources. The purpose of the work is to analyze the main forecasting models, such as statistical models (autoregressive model, moving average, exponential smoothing, moving average with autoregression and integration) and deep learning models (artificial neural network, recurrent neural network, long short-term memory, transformer), indicating their advantages and disadvantages, and choosing the best of them. The experimental results of a comparative analysis of power consumption forecasting models are presented, which showed that the transformer model was 1.5% - 2% more effective in power consumption forecasting according to various metrics. Its higher level of accuracy, reflected in low error values and high coefficient of determination, indicates its high adaptability to the dynamics of electricity consumption.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Forecasting</kwd>
        <kwd>time series</kwd>
        <kwd>power consumption</kwd>
        <kwd>model</kwd>
        <kwd>neural network</kwd>
        <kwd>deep learning</kwd>
        <kwd>accuracy</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        The energy sector is critical to economic development and social well-being as it provides the energy
required for various activities. However, power supply is often unstable and there is a need for
accurate power consumption forecasting to balance the power system [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. There is no efficient way
to store large amounts of electrical energy. Therefore, the total amount of consumed electricity must
be balanced with the generated. In industrial enterprises that use electricity as the main raw material,
there may be a shortage of capacity if the consumption of electricity exceeds the established norms.
On the other hand, when the electricity consumption is less than the established norms, there may
be a waste of money.
      </p>
      <p>
        The task of planning and forecasting electricity consumption is quite significant in the power
industry. Timely receipt of information about the future load allows you to choose the optimal
operating mode of the system. Forecasting is an important factor in drawing up the electricity
balance in the power system, influencing the choice of mode parameters and estimated electrical
loads. The balance of electricity is necessary to ensure the stable operation of the power system. If
the balance is not maintained, the quality of electricity suffers (the frequency and voltage deviate
from the required values). The accuracy of forecasting allows for the optimization of the operation
of the electrical system. Forecasting electricity consumption is a complex task that is influenced by
many factors. Short-term, medium-term, and long-term forecasting of electricity consumption are
distinguished. The work deals with short-term forecasting, which predicts the amount of energy that
will be used in a short period, from several hours to several days in advance. The main advantage of
short-term forecasting is that it can help optimize power generation, transmission, and consumption
in real-time. On the other hand, short-term forecasting of electricity consumption has some
limitations. It is susceptible to sudden changes in weather, human behavior, and other external
factors that can lead to inaccurate forecasts. One of the main requirements for forecasting methods
in the power industry is the calculation of electricity consumption volumes in different time
intervals. If until now it was possible to get by with a simple method of linear regression or a method
of daily comparison of indicators, now there is a need to take into account the non-linear effects of
external factors, which requires the use of intelligent information processing methods. The accuracy
of forecast calculations is determined by the correspondence of the mathematical models of the
process of power consumption fluctuations. These fluctuations represent a complex non-stationary
random process that has certain cycles [
        <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
        ]. When applying mathematical models and software,
company specialists are usually limited to values averaged over past periods ("manual forecast").
Simplified, "manual" forecasting of consumption can give quite high values of the mathematical
expectation of errors, and a wide confidence interval and is practically not used for quick operational
calculations at the pace of the process. When solving the problem of forecasting electricity
consumption, the question of choosing a mathematical forecasting model arises. The adequacy of
this model affects the accuracy of determining the planned electricity consumption during the
formation of a price request for the purchase and sale of electricity [
        <xref ref-type="bibr" rid="ref2 ref4">2, 4</xref>
        ]. The error of forecast
estimates determines the adequacy of the used mathematical models for the process of fluctuation of
electricity consumption. The purpose of this study is to conduct a comparative analysis of various
models of short-term forecasting of electricity consumption and to determine the best of them, which
contributes to balancing and optimizing the use of the energy system, which is an urgent task.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Analysis of models for short-term forecasting of electricity consumption</title>
      <p>For short-term forecasting of electricity consumption, a large number of approaches and methods
can be applied using different technologies, such as statistical approach, machine and deep learning,
expert systems, etc. Accordingly, there are various short-term forecasting models such as statistical
models (autoregressive model, moving average, exponential smoothing, moving average with
autoregression and integration), deep learning models (artificial neural network, recurrent neural
network, long short-term memory, transformer), etc. It is important to reasonably choose a model
that provides analysis and effective forecasting of electricity consumption in order to optimize the
use of energy resources. We will analyze the main forecasting models that can be used to forecast
electricity consumption.</p>
      <sec id="sec-2-1">
        <title>2.1. Statistical models</title>
      </sec>
      <sec id="sec-2-2">
        <title>2.1.1. Auto regression (AR) model</title>
        <p>
          It assumes that there is a linear relationship between energy consumption and the independent
variables used in the analysis, which are described by the expression [
          <xref ref-type="bibr" rid="ref5 ref6 ref7">5-7</xref>
          ]:
 =  1 ×  +  ,
(1)
where  1 is the regression coefficient;  is the value of the feature factor;  is a free term, a
constant.
        </p>
        <p>The AR model also assumes that the historical data used in the analysis are representative of
future consumption patterns. The accuracy of forecasts depends on the reliability of historical data
and the extent to which the relationships between variables remain stable over time. One of the main
advantages of the autoregressive model is that it provides a clear and quantitative understanding of
the factors that affect electricity consumption.</p>
        <p>By identifying and quantifying the relationships between various factors, it enables energy
companies to make informed decisions about supply and demand. An autoregression model can also
help identify trends and patterns in energy consumption that can be used for long-term planning
and investment decisions.</p>
        <p>One of the main limitations of the autoregressive model is that it assumes a linear relationship
between electricity consumption and independent variables. In reality, the relationship between
power consumption and variables can be non-linear or complex, which can lead to inaccuracies in
forecasts. Another limitation is that the autoregressive model is based on historical data, which may
not accurately reflect future consumption patterns. This may lead to forecast errors and inaccuracies,
particularly if there are changes in the market or regulatory environment. Therefore, the AR model
is useful for forecasting electricity consumption based on historical data. However, its accuracy
depends on the reliability of historical data and the stability of relationships between variables over
time.</p>
      </sec>
      <sec id="sec-2-3">
        <title>2.1.2. Moving Average (MA) model</title>
        <p>
          This model is based on the average value of previous electricity consumption and assumes that future
electricity consumption will be the same as in the past. In this model, the moving average is
calculated as the average of a fixed number of consecutive historical data points. The resulting value
is then used as a forecast for the next period and is described by the expression [
          <xref ref-type="bibr" rid="ref5 ref6 ref7">5-7</xref>
          ]:
+
  = ∑    + , (2)
        </p>
        <p>=−
where   is a time series;   is the sum of weights.</p>
        <p>However, the MA model also has limitations. One of them is that it strongly depends on the length
of the moving average interval. If it is too short, the forecast may be too volatile and not reflect
longterm trends. On the other hand, if the interval is too long, the forecast may be too smooth and ignore
short-term fluctuations. Therefore, determining the appropriate period size for a given data set can
be challenging. Another limitation of the moving average model is that it assumes a constant nature
of electricity consumption over time. This may not be true in cases where there are significant
changes in the structure of electricity consumption. In such cases, the MA method may be inaccurate
and must be combined with other forecasting methods.</p>
        <p>Thus, the MA method is a simple and useful tool for forecasting electricity consumption, but it
has its limitations.</p>
        <p>It is important to carefully consider the appropriate size of the window and take into account all
factors that can affect the structure of electricity consumption over time. By combining the moving
average method with other forecasting methods, you can develop a more accurate and reliable
forecast of electricity consumption.</p>
      </sec>
      <sec id="sec-2-4">
        <title>2.1.3. Exponential smoothing</title>
        <p>
          Assumes that future values of a series are based on past observations and that recent observations
are more important than previous ones [
          <xref ref-type="bibr" rid="ref6 ref7">6, 7</xref>
          ]. This means that the weights assigned to the prior
values decrease exponentially. Exponential smoothing works by calculating a forecast based on
previous observations and an exponentially weighted average of past observations. The weight
assigned to each observation decreases exponentially as the observations age. Exponential
smoothing is described as follows [
          <xref ref-type="bibr" rid="ref6 ref7">6, 7</xref>
          ]:
  +1 =    + (1 −  )  ,
(3)
where   +1 is the forecast for the next period;  is the smoothing constant;   is the observed
value of the series for period t;   is the old forecast for period t.
        </p>
        <p>One of the main advantages of exponential smoothing is its simplicity, and it also does not require
a large amount of historical data, making it useful for short-term forecasting. Furthermore, it is
flexible enough to be adapted to a wide range of time series data. Exponential smoothing has several
limitations, including that it is best suited for data with a smooth trend, seasonal patterns or cycles,
and limited random fluctuations. It also assumes that forecast errors are normally distributed and
independent of each other, which may not always be the case in practice. Finally, it can be sensitive
to outliers, so it is important to remove them or adjust the weights accordingly.</p>
        <p>Hence, exponential smoothing is a popular time series forecasting method that is easy to use and
adaptable to a wide range of data. Although it has its limitations, it can be a powerful tool for
shortterm forecasting when used correctly.</p>
      </sec>
      <sec id="sec-2-5">
        <title>2.1.4. Autoregressive Integrated Moving Average (ARIMA) model</title>
        <p>
          Is an extension of the autoregressive moving average (ARMA) models for non-stationary time series,
which can be made stationary using the operation of taking differences of a certain order  from the
original time series. In the ARIMA (d, p, q) model, the future value of the process is a finite linear
combination of its previous values and errors, and can be written as [
          <xref ref-type="bibr" rid="ref7 ref8 ref9">7-9</xref>
          ]:
  =  1γ −1 +  2γ −2 + ⋯ +   γ − + ⋯ + ε − β1ε −1 − ⋯ − β ε − ,
(4)
where   is the current value of the process; ε random error at time  ;   , β coefficients;  ,
 are integers corresponding to the orders of autoregression and moving average, respectively.
        </p>
        <p>
          Using the lag shift operator L, the general form of the model can be written as [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]:
β( )  = β( )∇   =  0 + α( )  ,
β( ) = 1 − β1 − β2 2 − ⋯ − β   ,
α( ) = 1 − α1 − α2 2 − ⋯ − α   ,
(5)
here α( ) = ∇  ( ) is an autoregression operator, which is a non-stationary operator for which
 roots of the equation  ( ) = 0 are equal to one;  ( ) is a moving average operator, that is, the roots
of the equation  ( ) = 0 are located outside the unit circle.
        </p>
        <p>In general, among the statistical models, the ARIMA model received the greatest distribution. It
has demonstrated an effective ability to generate short-term forecasts and often outperforms
complex structural models in short-term forecasting results.</p>
      </sec>
      <sec id="sec-2-6">
        <title>2.2. Deep learning models in electricity consumption forecasting</title>
        <p>
          One of the main approaches that can be used to implement a short-term forecast of electricity
consumption is based on the use of artificial neural network models [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ], which include a multilayer
perceptron, recurrent neural network (RNN), long-short-term memory (LSTM), convolutional neural
networks (CNN), transformers (autoencoders), etc. Let's analyze the most important models.
        </p>
      </sec>
      <sec id="sec-2-7">
        <title>2.2.1. Artificial neural network (ANN)</title>
        <p>
          It is a powerful model for predicting energy consumption. An ANN is a model (multilayer
perceptron) that learns relationships in data without taking into account time dependencies. ANNs
consist of several layers of interconnected nodes, or neurons, that process information and learn
patterns from historical data to make predictions about future electricity consumption [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ].
        </p>
        <p>One of the key advantages of ANN is its ability to handle non-linear relationships and complex
patterns in data. It can capture subtle and complex relationships that may be missed by traditional
forecasting methods such as moving averages and exponential smoothing. The ANN is also highly
adaptable and can be easily customized to meet specific electricity forecasting needs.</p>
      </sec>
      <sec id="sec-2-8">
        <title>2.2.2. Recurrent neural network (RNN)</title>
        <p>
          It is a deep learning model that is trained to process and transform a sequential set of input data into
a sequential set of output data. In other words, RNN is an architecture that can work with sequential
data. It uses a re-entry mechanism that allows it to take into account previous states and use them
when processing input data (Figure 1) [
          <xref ref-type="bibr" rid="ref12 ref13">12, 13</xref>
          ]. RNN is called recurrent because it performs the same
task for each element of the sequence, and the output depends on previous calculations. RNN is a
use information in arbitrarily long sequences, but in practice, they are limited to only a few steps.
        </p>
        <p>Unlike a traditional deep neural network, which uses different parameters in each layer, an RNN
has the same parameters (U, V, W) at all stages. This means that the same task is performed at each
step, using only different inputs. This significantly reduces the number of parameters that need to
be fitted. The main feature of RNNs is the hidden state, which contains some information about the
sequence.</p>
        <p>Although the RNN should work with the entire sequence, unfortunately, there i</p>
      </sec>
      <sec id="sec-2-9">
        <title>2.2.3. Long short-term memory (LSTM) model</title>
        <p>
          vanishing gradient problem
memory). LSTM is not fundamentally different from RNN, but it uses a different function to calculate
the hidden state (Figure 2) [
          <xref ref-type="bibr" rid="ref14 ref15 ref16 ref17">14-17</xref>
          ].
        </p>
        <p>
          LSTM is an extension of RNNs designed to overcome the problems of loss and gradient shifts. It
uses special memory blocks that allow storing and updating information for a long time. The LSTM
model is described by equations [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ]:


 ̃ = 
 = σ(  [ ℎ −1,   ] +   ) ,
 = σ(
        </p>
        <p>[ ℎ −1,   ] +   ) ,
ℎ(  [ ℎ −1,   ] +   ) ,
  =   ⨯   −1 +   ⨯  ̃ ,
  = σ(  [ ℎ −1,   ] +   ) ,
ℎ
 =   ⨯ 
ℎ(  ) .</p>
        <p>(6)
where   is an input vector; ℎ is an output vector;   is a vector of states;   ,   ,   ,   are
parameter matrices;   ,   ,   ,   are parameter vectors;   ,   are valve vectors, σ is a sigmoidal
activation function;</p>
        <p>ℎ is a hyperbolic tangent activation function.
memory to keep and which to erase.</p>
        <p>The memory in LSTM is represented by cells that can be thought of as black boxes that take the
previous state ℎ −1 as input and the current input parameter   . Inside, these cells decide which</p>
        <p>
          Then they combine the previous state, the current memory, and the input parameter. It turns out
that these types of units are very effective in capturing (storing) long-term dependencies. LSTM
models read the input data sequentially. If you need an architecture in which the sequence is
processed simultaneously so that there is no loss of information, then such an architecture is
implemented in the transformer model encoder [
          <xref ref-type="bibr" rid="ref18">18, 19</xref>
          ], which allows you to study the context of a
variable taking into account its environment. In addition, it is often faster than RNNs.
        </p>
      </sec>
      <sec id="sec-2-10">
        <title>2.2.4. Transformer (autoencoder)</title>
        <p>
          The original architecture of the transformer is an autoencoder. The encoder receives as input a
sequence with positional information. The decoder receives as input a part of this sequence and the
output of the encoder (Figure 3) [
          <xref ref-type="bibr" rid="ref19">20</xref>
          ].
        </p>
        <p>On the left in Figure 3, the encoder processes the input sequence to create a hidden representation.
On the right in Figure 3, the decoder uses the output of the encoder to generate the output sequence.
In this case, the decoder works as an autoregressive model, using previously generated samples as
additional input to generate the next output sample. Thus, the transformer model consists of input
vector transformation, positional coding, normalization, forward propagation layers, linear layers,
and attention layers.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Results of comparative analysis of electricity consumption models</title>
      <p>To perform a comparative analysis of electricity consumption forecasting models and determine the
best system was created, consisting of the following main modules:</p>
      <p>Data set module. Collects the necessary information for training and testing forecasting
models.</p>
      <p>Data preparation and analysis module. The collected data is normalized, formatted,
reconciled, processed, and prepared for analysis and modeling.
3. Forecasting module. Based on artificial intelligence methods, electricity consumption
forecasting models are analyzed, the best one is selected, and the forecast is executed.
Results analysis module. The trained prediction model is evaluated on a test dataset to
measure its performance.</p>
      <p>Module of forecasting results. The forecast results allow managers and utilities to optimize
operations, resources, and system reliability.</p>
      <p>Kaggle online resource, which consists of data from PJM Interconnection, a regional electricity
transmission organization that is part of the Eastern Interconnection network that manages the
electricity transmission system in the United States.</p>
      <p>Hourly data on electricity consumption are shown in Figure 4 and are indicated in megawatts
(MW). The system's data preparation and analysis module uses a systematic approach to data
processing and analysis, creating a solid foundation for further study and understanding of electricity
consumption dynamics in the broader context of the energy sector. The initial stage of data
preparation involves examining the dataset to provide an initial overview of the structure.</p>
      <p>Next, to enable effective time-based analysis, the data is converted to a single structure where a
column over time is set as an index. The resulting dataset with a time index is fundamental for
studying and analyzing the dynamics of electricity consumption over time. This makes it possible to
examine long-term trends in detail and identify factors that affect energy performance.</p>
      <p>The next step in data processing is to use methods to ensure consistency and homogeneity. An
important element of this approach is normalization, which allows you to create a standardized data
format, facilitating further comparison and analysis. At the end of this stage, the importance of visual
interpretation of the data was taken into account. Graphs are used not only to illustrate changes in
electricity consumption but also to highlight key patterns and trends. This contributes to a deeper
understanding of the dynamics of energy consumption.</p>
      <p>One of the main modules of the system is the forecasting module, the quality of the results of
electricity consumption forecasting depends on the efficiency of its functioning. This system module
conducts a practical analysis of various machine and deep learning models on specific data sets to
select the best one for forecasting.</p>
      <p>With the constant evolution of technology and the demands of the modern world, determining
the accuracy of a model becomes an important task. To quantify the errors of forecasting models,
various accuracy metrics have been calculated, namely:</p>
      <p>Mean square error (MSE):
Mean absolute error (MAE):
=

1

 =1
∑ ∣   −  ̂</p>
      <p>∣ × 100 ,
,
(8)
(9)
(10)</p>
      <p>Mean absolute percentage error (MAPE):
in question.
system.
frameworks.
predicted value of the i-th observation.</p>
      <p>1.</p>
      <p>Coefficient of determination  2:
where  is the number of observations;   is the actual value of the i-th observation;  ̂ is the
where  ( ) =   2 is the variance of the random variable y;  ( / ) = σ2 is the conditional
variance of the dependent variable (variance of the model error).</p>
      <p>This indicator, which is used in statistical models, measures the extent to which changes in the
independent variables affect the dependent variable. That is, it shows how accurately the model
explains the variation in the dependent variable.</p>
      <p>The coefficient of determination  2 can take values from 1 to 0 in a classical linear multiple
regression, where a higher value of the coefficient indicates a better fit of the model to the
observations.
technological evolution.
picture of forecasting performance.</p>
      <p>All these indicators allow us to analyze the accuracy of models in the face of constant
Taking into account both absolute accuracy and percentage deviations, you can get a complete
The use of MSE, MAE, and MAPE allows for a deeper study of various aspects of errors and their
impact on the model.</p>
      <p>The coefficient of determination  2, in turn, becomes a key indicator in determining how well
the model adapts to the data. Overall, by taking these metrics into account, an objective analysis can
be made and an informed decision can be made about the effectiveness and suitability of the model
The last module of the system highlights the forecasting results that have been obtained by the
They are presented in the form of graphs and tables that are used by managers to optimize
operations, resources, and reliability of the electricity system.</p>
      <p>When performing experimental research, the main tool for software development was the Python
programming language, its NumPy and Pandas libraries, as well as the Scikitlearn and TensorFlow</p>
      <p>To conduct a comparative analysis of electricity consumption forecasting models, the best models
from the respective groups were selected: from statistical models</p>
      <sec id="sec-3-1">
        <title>ARIMA model, from recurrent models LSTM model, from deep learning models transformer model.</title>
        <p>The results of predicting electricity consumption at different time intervals using these models
are given in Table 1, and the results of their comparative analysis according to the selected indicators
are given in Table 2.
accuracy.
At the same time, when analyzing and comparing the results of this study, it was found that the
transformer model was the most effective in predicting energy consumption. Its high level of
accuracy, reflected in the low values of the mean square error, the mean absolute error, and the high
coefficient of determination, indicates its high adaptability to the dynamics of energy consumption.</p>
        <p>For a better visual analysis and comparison of energy consumption forecasting results, several
detailed graphs were created for different parts of the time series, shown in Figure 5 and Figure 6,
respectively.</p>
        <p>They show the actual energy consumption data along with the predicted values obtained using
the ARIMA, LSTM, and transformer models.</p>
        <p>Each figure allows you to perform a visual comparative analysis, where you can see the deviation
between the actual and predicted values for each model. This allows for a visual assessment of the
accuracy and performance of each model at different points in the time series. This visual approach
contributes to a better understanding of trends and the overall adaptability of the models to changes
in time-based energy consumption. These graphs are an important tool for making informed
conclusions and determining the most effective model to use in forecasting.</p>
        <p>Figures 5 and 6 show that the predicted values using the Transformer model are almost always
near the line of actual electricity consumption, or even these values overlap.</p>
        <p>Based on careful comparisons with other models, the transformer model appears to be not only
the most accurate (by all metrics it is 1.5% - 2% better than other models), but also the most versatile
model in different conditions. Its ability to adapt to changes in the time series and its high accuracy
make it the most effective for accurate forecasting of electricity consumption. This conclusion is
supported by both quantitative data from the tables and graphs presented and conclusions drawn
from the visual analysis. All these factors make the transformer model the most promising choice
for further applications in the field of electricity consumption forecasting.</p>
        <p>Prospects for further research include hybrid models that combine statistical methods, machine
learning methods, and deep neural networks aimed at improving the reliability and accuracy of
forecasting, as well as the use of graph neural networks (GNN) for multivariate time series
forecasting.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusions</title>
      <p>Planning and forecasting of electricity consumption is quite important in the power industry. Timely
receipt of information about the future load allows choosing the optimal system operation mode.
There are short-term, medium-term, and long-term forecasting of electricity consumption. This
paper considers short-term forecasting, which predicts the amount of energy that will be used in a
short period, from several hours to several days in advance. The main advantage of short-term
forecasting is that it can help optimize the production, transmission, and consumption of electricity
in real time.</p>
      <p>When solving the problem of forecasting electricity consumption, the question arises of choosing
a mathematical forecasting model, the adequacy of which affects the accuracy of determining the
planned electricity consumption when formulating pricing policy. There are various short-term
forecasting models, so it is important to reasonably choose a model that provides analysis and
effective forecasting of electricity consumption to optimize the use of energy resources. The article
analyzes the main forecasting models, namely statistical models (autoregressive model, moving
average, exponential smoothing, moving average with autoregression and integration) and deep
learning models (artificial neural network, recurrent neural network, long short-term memory,
transformer), indicating their advantages and disadvantages.</p>
      <p>To perform a comparative analysis of electricity consumption forecasting models and determine
the best one, a corresponding system was created, consisting of the following main modules: a data
set module, a data preparation and analysis module, a forecasting module, a results analysis module,
and a forecasting results module. To forecast electricity consumption, we used the Hourly Energy
Consumption dataset from the Kaggle online resource, which consists of data from PJM
Interconnection, a regional electricity transmission organization that is part of the Eastern
Interconnection network that manages the electricity transmission system in the United States.</p>
      <p>For a comparative analysis of electricity consumption forecasting models, the best models from
the respective groups were selected: from statistical models - the ARIMA model, from recurrent
models - the LSTM model, from deep learning models - the transformer model. The experimental
results of the comparative analysis of these models by various metrics are presented, which show
that the transformer model proved to be the most effective in predicting energy consumption (by all
metrics it is 1.5% - 2% better than other models). Its high level of accuracy, reflected in low error
values and a high coefficient of determination, indicates its exceptional adaptability to the dynamics
of electricity consumption. The transformer model appears to be not only the most accurate but also
the most versatile model in different conditions. Its ability to adapt to changes in time series and
high accuracy make it the most effective for accurate forecasting of electricity consumption.</p>
      <p>Prospects for further research include hybrid models that combine statistical methods, machine
learning methods, and deep neural networks aimed at improving the reliability and accuracy of
forecasting, as well as the use of graph neural networks (GNN) for multivariate time series
forecasting.
and</p>
      <sec id="sec-4-1">
        <title>Information</title>
      </sec>
      <sec id="sec-4-2">
        <title>Technologies</title>
        <p>,</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>R.</given-names>
            <surname>Hafezi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Alipour</surname>
          </string-name>
          , Energy Security and
          <string-name>
            <given-names>Sustainable</given-names>
            <surname>Development</surname>
          </string-name>
          . In the book: Affordable and
          <string-name>
            <given-names>Clean</given-names>
            <surname>Energy</surname>
          </string-name>
          . Publisher: Springer, Cham,
          <year>2020</year>
          . DOI:
          <volume>10</volume>
          .1007/978-3-
          <fpage>319</fpage>
          -71057-0_
          <fpage>103</fpage>
          -
          <lpage>1</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Y. W.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. K.</given-names>
            <surname>Gaik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. Y.</given-names>
            <surname>Yee</surname>
          </string-name>
          , Forecasting Electricity Consumption Using Time Series Model.
          <source>International Journal of Engineering &amp; Technology 7 4</source>
          (
          <issue>2018</issue>
          )
          <fpage>218</fpage>
          -
          <lpage>223</lpage>
          . DOI:
          <volume>10</volume>
          .14419/ijet.v7i4.
          <volume>30</volume>
          .22124.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>R.</given-names>
            <surname>Adhikari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. K.</given-names>
            <surname>Agrawal</surname>
          </string-name>
          ,
          <article-title>An Introductory Study on Time series Modeling and Forecasting</article-title>
          . Publisher: LAP Lambert Academic.
          <year>2013</year>
          . DOI:
          <volume>10</volume>
          .13140/2.1.2771.8084.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>P.</given-names>
            <surname>Malik</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. S.</given-names>
            <surname>Dangi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. S.</given-names>
            <surname>Thakur</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. P. S.</given-names>
            <surname>Parihar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>U.</given-names>
            <surname>Sharma</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Mishra</surname>
          </string-name>
          ,
          <article-title>An Analysis of Time Series Analysis</article-title>
          and
          <string-name>
            <given-names>Forecasting</given-names>
            <surname>Techniques</surname>
          </string-name>
          .
          <source>International Journal of Advance Research and Innovative Ideas in Education 9</source>
          <volume>5</volume>
          (
          <year>2023</year>
          ). DOI:
          <volume>16</volume>
          .0415/IJARIIE-21608.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>A. A.</given-names>
            <surname>Mutairi</surname>
          </string-name>
          ,
          <article-title>Time-series forecasting for some statistical models</article-title>
          .
          <source>Advances and Applications in Statistics</source>
          <volume>78</volume>
          (
          <year>2022</year>
          )
          <fpage>83</fpage>
          -
          <lpage>92</lpage>
          . DOI:
          <volume>10</volume>
          .17654/0972361722051.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>J.</given-names>
            <surname>Kaur</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K. S.</given-names>
            <surname>Parmar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Singh</surname>
          </string-name>
          ,
          <article-title>Autoregressive models in environmental forecasting time series: a theoretical and application review</article-title>
          .
          <source>Environmental Science Pollution Research</source>
          <volume>30</volume>
          (
          <year>2023</year>
          )
          <fpage>19617</fpage>
          -
          <lpage>19641</lpage>
          . DOI:
          <volume>10</volume>
          .1007/s11356-023-25148-9.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>M.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , Time Series: Autoregressive models
          <string-name>
            <surname>AR</surname>
          </string-name>
          , MA, ARMA, ARIMA. University of Pittsburgh,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>V. I.</given-names>
            <surname>Kontopoulou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. D.</given-names>
            <surname>Panagopoulos</surname>
          </string-name>
          , I. Kakkos,
          <string-name>
            <given-names>G. K.</given-names>
            <surname>Matsopoulos</surname>
          </string-name>
          ,
          <article-title>A Review of ARIMA vs. Machine Learning Approaches for Time Series Forecasting in Data-Driven Networks</article-title>
          .
          <source>Future Internet 15</source>
          <volume>8</volume>
          (
          <year>2023</year>
          )
          <article-title>255</article-title>
          . DOI:
          <volume>10</volume>
          .3390/fi15080255.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>A.</given-names>
            <surname>Petrova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Deyneka</surname>
          </string-name>
          .
          <article-title>ARIMA models: modeling and forecasting prices of stocks</article-title>
          . Int https://doi.org/10.25313/
          <fpage>2520</fpage>
          -2294-2022-2.
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>C.</given-names>
            <surname>Lu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Lu</surname>
          </string-name>
          .
          <article-title>Building energy prediction using artificial neural networks: A literature survey</article-title>
          .
          <source>Energy and Buildings</source>
          , Vol.
          <volume>262</volume>
          ,
          <year>2021</year>
          . DOI:
          <volume>10</volume>
          .1016/j.enbuild.
          <year>2021</year>
          .
          <volume>111718</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>E.</given-names>
            <surname>Chianese</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Camastra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Ciaramella</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. C.</given-names>
            <surname>Landi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Staiano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Riccio</surname>
          </string-name>
          ,
          <article-title>Spatio-temporal learning in predicting ambient particulate matter concentration by multi-layer perceptron</article-title>
          .
          <source>Ecological Informatics</source>
          <volume>49</volume>
          (
          <year>2019</year>
          )
          <article-title>54 61</article-title>
          . DOI:
          <volume>10</volume>
          .1016/j.ecoinf.
          <year>2018</year>
          .
          <volume>12</volume>
          .001.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>U.</given-names>
            <surname>Ugurlu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.</given-names>
            <surname>Oksuz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Tas</surname>
          </string-name>
          ,
          <article-title>Electricity price forecasting using recurrent neural networks</article-title>
          .
          <source>Energies</source>
          <volume>11</volume>
          (
          <year>2018</year>
          )
          <article-title>1255</article-title>
          . DOI:
          <volume>10</volume>
          .3390/en11051255.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>L. G. B.</given-names>
            <surname>Ruiz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Rueda</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. P.</given-names>
            <surname>Cuéllar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Pegalajar</surname>
          </string-name>
          ,
          <article-title>Energy consumption forecasting based on Elman neural networks with evaluative optimization</article-title>
          .
          <source>Expert Systems with Applications</source>
          .
          <volume>92</volume>
          (
          <year>2018</year>
          )
          <article-title>380 389</article-title>
          . DOI:
          <volume>10</volume>
          .1016/j.eswa.
          <year>2017</year>
          .
          <volume>09</volume>
          .059.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>S.</given-names>
            <surname>Hochreiter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Schmidhuber</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Long</given-names>
            <surname>Short-Term Memory</surname>
          </string-name>
          .
          <source>Neural Computation</source>
          ,
          <volume>9 8</volume>
          (
          <issue>1997</issue>
          )
          <fpage>1735</fpage>
          -
          <lpage>1780</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>G. V.</given-names>
            <surname>Houdt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Mosquera</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Nápoles</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          <article-title>Review on the Long Short-Term Memory Model</article-title>
          .
          <source>Artificial Intelligence Review 53</source>
          <volume>1</volume>
          (
          <year>2020</year>
          ).
          <source>DOI: 10.1007/s10462-020-09838-1.</source>
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>S.</given-names>
            <surname>Arifin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. K.</given-names>
            <surname>Wijaya</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Nariswari</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Yudistira</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Suwarno</surname>
          </string-name>
          ,
          <string-name>
            <surname>D.</surname>
          </string-name>
          <article-title>Wihardini, Long Short-Term Memory (LSTM): Trends and Future Research Potential</article-title>
          .
          <source>International Journal of Emerging Technology and Advanced Engineering</source>
          (
          <year>2023</year>
          ). DOI:
          <volume>10</volume>
          .46338/ijetae0523_
          <fpage>04</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>M.</given-names>
            <surname>Korablyov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Fomichov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Antonov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Dykyi</surname>
          </string-name>
          , I. Ivanisenko,
          <string-name>
            <given-names>S.</given-names>
            <surname>Lutskyy</surname>
          </string-name>
          ,
          <article-title>Hybrid stock analysis model for financial market forecasting</article-title>
          ,
          <source>in: Proceedings of the 18th International Conference on Computer Science DOI:10.1109/CSIT61576</source>
          .
          <year>2023</year>
          .
          <volume>10324069</volume>
          .
          <article-title>Attention is All You Need</article-title>
          .
          <source>Advances in Neural Information Processing Systems</source>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>R. E.</given-names>
            <surname>Turner</surname>
          </string-name>
          . An Introduction to Transformers,
          <year>2023</year>
          . DOI:
          <volume>10</volume>
          .48550/arXiv. 2304.10557.
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>X.</given-names>
            <surname>Amatriain</surname>
          </string-name>
          .
          <article-title>Transformer models: an introduction and catalog</article-title>
          .
          <source>A Preprint</source>
          ,
          <year>2023</year>
          . DOI:
          <volume>10</volume>
          .48550/arXiv.2302.07730.
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>H.</given-names>
            <surname>Zhou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Peng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Xiong</surname>
          </string-name>
          , W. Zhang, Informer:
          <article-title>Beyond efficient transformer for long sequence time series forecasting</article-title>
          ,
          <source>in: Proceedings of the AAAI Conference on Artificial Intelligence</source>
          <volume>35</volume>
          (
          <year>2021</year>
          )
          <article-title>11106 11115</article-title>
          . DOI:
          <volume>10</volume>
          .1609/aaai.v35i12.
          <fpage>17325</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>A.</given-names>
            <surname>Casolaro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Capone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Iannuzzo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Camastra</surname>
          </string-name>
          ,
          <source>Deep Learning for Time Series Forecasting: Advances and Open Problems. Information 14 11</source>
          (
          <year>2023</year>
          )
          <article-title>598</article-title>
          . DOI:
          <volume>10</volume>
          .3390/info14110598.
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [23]
          <string-name>
            <given-names>S.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Jin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Xuan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Zhou</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y. X.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Yan</surname>
          </string-name>
          ,
          <article-title>Enhancing the locality and breaking the memory bottleneck of transformer on time series forecasting</article-title>
          .
          <source>Neural Information Processing</source>
          .
          <year>2019</year>
          ,
          <volume>32</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>H.</given-names>
            <surname>Wu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Xu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Long</surname>
          </string-name>
          , Autoformer:
          <article-title>Decomposition transformers with auto-correlation for long-term series forecasting</article-title>
          .
          <source>Neural Information Processing</source>
          <volume>34</volume>
          (
          <year>2021</year>
          ) 22419
          <fpage>22430</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>P.</given-names>
            <surname>Delgado-Santos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Tolosana</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Guest</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Deravi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Vera-Rodriguez</surname>
          </string-name>
          ,
          <article-title>Exploring transformers for behavioral biometrics: A case study in gait recognition</article-title>
          ,
          <source>Pattern Recognition</source>
          <volume>143</volume>
          (
          <year>2023</year>
          )
          <article-title>109798</article-title>
          . DOI:
          <volume>10</volume>
          .1016/j.patcog.
          <year>2023</year>
          .
          <volume>109798</volume>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>