Next Article in Journal
Backfill for Advanced Potash Ore Mining Technologies
Previous Article in Journal
Distributed Ledger Technology in Healthcare: Enhancing Governance and Performance in a Decentralized Ecosystem
Previous Article in Special Issue
Analysis and Optimization of DC-DC Converters Through Sensitivity to Parametric Variations
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Enhancing Electricity Load Forecasting with Machine Learning and Deep Learning

1
Faculty of Electrical and Computer Engineering, University of Pristina, Bregu i Diellit, p.n., 10000 Pristina, Kosovo
2
Faculty of Computer Systems and Technologies, Technical University of Sofia, 8 Kl. Ohridski Blvd, 1000 Sofia, Bulgaria
3
Faculty of Electronic Engineering and Technologies, Technical University of Sofia, 8 Kl. Ohridski Blvd, 1000 Sofia, Bulgaria
*
Authors to whom correspondence should be addressed.
Technologies 2025, 13(2), 59; https://doi.org/10.3390/technologies13020059
Submission received: 22 November 2024 / Revised: 28 December 2024 / Accepted: 20 January 2025 / Published: 1 February 2025
(This article belongs to the Collection Selected Papers from the MOCAST Conference Series)

Abstract

:
The electricity load forecasting handles the process of determining how much electricity will be available at a given time while maintaining the balance and stability of the power grid. The accuracy of electricity load forecasting plays an important role in ensuring safe operation and improving the reliability of power systems and is a key component in the operational planning and efficient market. For many years, a conventional method has been used by using historical data as input parameters. With swift progress and improvement in technology, which shows more potential due to its accuracy, different methods can be applied depending on the identified model. To enhance the forecast of load, this paper introduces and proposes a framework developed on graph database technology to archive large amounts of data, which collects measured data from electrical substations in Pristina, Kosovo. The data includes electrical and weather parameters collected over a four-year timeframe. The proposed framework is designed to handle short-term load forecasting. Machine learning Linear Regression and deep learning Long Short-Term Memory algorithms are applied to multiple datasets and mean absolute error and root mean square error are calculated. The results show the promising performance and effectiveness of the proposed model, with high accuracy in load forecasting.

1. Introduction

Load forecasting is the method used to make sure that adequate electricity is available at all times to meet consumption necessities. An accurately forecasted electricity load makes it possible for the electrical system to run efficiently, with minimal waste of electricity, avoid outages, and reduce the risk of system failure.
As power generation costs increase and market competition intensifies, load demand forecasting is becoming increasingly important; accurate forecasts are crucial for energy systems in scheduling generator maintenance and selecting the optimal capacity. Three main problems are discussed in load forecasting literature: long-term forecasts for system planning, medium-term forecasts for maintenance programs, and short-term predictions for the day-to-day operation, scheduling, and load-shedding plans of power utilities. The load curve is the key factor in the daily load demand pattern, which describes the amount of energy consumed to satisfy the load demand of customers over the course of the day.
The forecasts relate the need for load to the economic activities of the country and temperature fluctuations, assuming that sensitivity to price is not the case. In general, based on time frame, the load forecasting can be classified into three groups [1,2,3]:
  • Short-term forecasting (STF): the time frame of STF starts from a few minutes or hours ahead, up to one day or a week ahead. The purpose of this group of forecasting is economic dispatching and optimum generator unit obligation, and it also supports security analyses and real-time operation.
  • Medium-term forecasting (MTF): the time period of MTF starts from a week up to one year ahead. The purpose of this group of forecasting is to support scheduling maintenance, coordination of dispatching load and price settlement, and balanced load and generation.
  • Long-term forecasting (LTF): the time period of LTF starts from a few years up to 10 years ahead. The scope of this type of forecasting is system planning, like the generation, transmission, and distribution, and further induces investment in new generating units.
The development of the electricity market nowadays has also enabled very short-term forecasts with timescales of a few minutes and the ability to send them to the operator in real time.
Conventional load forecasting techniques have been widely used over the past years. Different methods can be applied depending on the model identified. For short-term forecasting, most authors use the regression-based approach, artificial neural networks, time series analysis, support vector machines, fuzzy logic, and expert systems, while medium and long-term load forecasting rely on techniques such as trend analysis, neural network techniques, multiple linear regressions, end-use analysis, and econometric analysis.
In statistical studies, a mathematical model that shows load as a function of different factors such as time, weather, and customer class is frequently required. Mathematical models can be divided into two categories: additive models, which are the sum of a number of components, and multiplicative models, which are the product of a number of components, respectively. The additive model involves predicting load as a function of four components [4]:
L = Ln + Lw + Ls + Lr
where L is the total load, Ln is the normal part of the load and is a set of standardized load shapes for each type of day that has been identified as occurring throughout the year, Lw represents the weather-sensitive part of the load, Ls is a special event component that creates a deviation from the usual load pattern, and Lr is a completely random term.
More authors among a lot of them have discussed how to accurately predict future load consumption due to its importance. It is difficult to build a sophisticated forecasting model based on an AI technique; the prediction performance improved when using transfer learning compared to the basic Deep Neural Network (DNN) [5]. The Convolutional Neural Networks (CNN) model presents promising results, as it was the most consistent method in obtaining reduced forecasting errors for the analyzed testing period [6]. New hybrid methods could be developed which embed the best-performing regression-based methods with other contending methods such as the XGBoost Machine Learning (ML) algorithm [7]. The Short-Term Load Forecasting (STLF) methods that utilize patterns and local modeling outperform conventional models like AutoRegressive Integrated Moving Average (ARIMA) and exponential smoothing in application examples, particularly for shorter horizons [8]. The use of Support Vector Machine (SVM), a new learning technique, has been successful in load forecasting [9]. The development and regular updating of multilinear regression models for short-term load forecasting is relatively simple with widely available commercial computational software like Microsoft Excel 2016 [10]. The combination of long short-term memory (LSTM) networks and convolutional neural network (CNN) models shows good performance for short-term load forecasting [11]. Recurrent neural network (RNN) can be trained on a dataset of electricity load data and is able to accurately predict future load forecasts [12]. The LSTM model with genetic algorithm (GA) and particle swarm optimization (PSO) shows good results regarding load forecasting [13]. On the LSTM model for load forecast day ahead, the effect of the dataset is also important [14]. The integration of the model using CNN and LSTM network shows accuracy on STLF [15]. The LSTM model with weather parameters is reviewed for residential load forecasting [16]. The hybrid Long Short-Term Memory-Neural Prophet (LSTM-NP) model provides higher accuracy on three types of forecasting [17]. The use of different ML algorithms to predict the day ahead of photovoltaic plants shows overall improvement [18]. Also, for the forecast of load to households, the Recursive Least Squares (RLS) and linear quantile regression show good results [19]. The approach of Online Adaptive RNN for load forecasting achieves high accuracy [20]. LSTM-based forecasts show better results on short-term load forecasting [21].
The research used in ML and Deep Learning (DL) algorithms that have been reviewed are summarized in Table 1.
The accuracy of load forecasting is influenced by several elements, including models that utilize historical data, weather factors like wind and temperature, the hour of the day, the day of the week, particular events, and so forth. On the other hand, the demand fluctuations and the unpredictability of Renewable Energy Sources (RES), like solar and wind power supply, make challenges for Transmission System Operators (TSOs) in maintaining the security and reliability of the grid. Therefore, managing uncertainty has emerged as the TSOs’ biggest task. In addition to wind and solar uncertainty, there are a number of other uncertain power system characteristics that need to be considered like outages. The traditional techniques of load forecasting require an extensive amount of computation time. Thus, load forecasting, which is a complicated task and is dependent on the season and other factors, as demonstrated in our case study, has evolved. The evaluations of reviewed research papers provide valuable insights into the potential benefits of mindfulness management techniques; however, additional studies are necessary to address these limitations and underscore the necessity for ongoing research. In this sense, the manuscript proposes a rational approach based on the application of artificial intelligence techniques, which combines good forecast accuracy and relatively lower computational complexity compared to the applied approaches.
The presented work proposes utilizing the LSTM algorithm as a form of DL and the Linear Regression (LR) algorithm as a form of ML to enhance the accuracy of load forecasting on a short-term time scale in the Pristina district, Kosovo. To improve comparative results, two computational experiments were carried out. Forecasting load in this district is challenging due to the intricate nature of loads that fluctuate based on temperature and seasons. In the first phase, a graph database has been established, which gathers and stores vast amounts of data. The data comprises historical data on load, temperature, and additional electrical parameters (including active power, reactive power, voltage, amps, etc.), from 1 January 2019 to 31 December 2022. The data set used consists of a week (or 168 h) for two seasons: winter and summer. The experiments indicate that LR models yield better results in our case study. In summary, this research paper intends to present the following contributions:
  • A methodology for forecasting load on a short-term time frame. This methodology relies on innovative LR and LSTM algorithms.
  • The methodology was created to improve load forecasting accuracy and will be used in the Pristina district of Kosovo. This methodology avoids using traditional techniques that use historical data and need a significant amount of computing time.
The rest of the paper is organized as follows: Section 2 presents a brief explanation of LR and LSTM algorithms, and the evaluation index. Section 3 presents the dataset and the proposed methodology. Section 4 shows two models of the proposed methodology, talks about the work, and explains the experimental results, Section 5 shows comparison results of the proposed model and results from paper’s reviewed, while Section 6 presents a conclusion and future work.

2. Linear Regression, Long Short-Term Memory, and Evaluation Index

In recent years, the analyses of data and computing have seen a rapid increase in the application of Artificial Intelligence (AI) and notable ML, which typically allows devices to function smarter.

2.1. Linear Regression Algorithm

ML is the computing models that permit computers to include patterns, and predictions, or make decisions based on data without the need to develop programming.
The most popular types of ML algorithms are as follows:
  • Supervised Learning: in this algorithm, we put data labeled as input, where the output values are already known beforehand, and the ML algorithms learn the mapping function from input to output. The usually supervised algorithms are two forms: Classification (Naive Bayes, Logistic Regression, SVM, etc.) which uses an algorithm to accurately assign test data to specific categories; and Regression (Linear Regression, Random Forest Regression, etc.) which is employed to comprehend how dependent and independent variables relate to one another.
  • Unsupervised Learning: it is a type whereby there are input data to put, but we don’t have associated output data. The usual unsupervised algorithms are three types: Clustering (k-Means, Hierarchical Clustering, etc.) which groups a set of objects in a way that objects in the same group are more comparable to each other than to those in other groups; Dimensionality Reduction (PCA—Principal Component Analyses, LDA—Linear Discriminant Analysis etc.) which is a method to reduce the total dimensions and analyze the data; Association (Apriori Algorithm, Eclat Algorithm) is about discovering rules to explain large pieces of data.
  • Reinforcement Learning: this algorithm is qualified as human learning, and acts as a virtual agent in the known spaces where agents choose possible options to act. There are three types: Model-Free Methods (Q-Learning, Deep Q-Network, etc.); Model-Based Methods (Deep Deterministic Policy Gradient, etc.); and Value-Based Methods (Monte Carlo Methods, etc.).
  • Semi-supervised Learning: in this category, only part of the given data input has been labeled.
The types of ML algorithms and their usage can be depicted in Figure 1.
The popularity trend for four ML algorithms (supervised, unsupervised, semi-supervised, and reinforcement) in the last 5 years is shown in Figure 2 [22].
Although the ML algorithms have advantages and disadvantages, this paper has used LR, as an algorithm that provides scientific calculation to identify and predict the outcomes. The LR is a usual formula that is used in various machine learning models for predictive analyses; there are two variables, the first one is considered as an independent variable, and the second one is a dependent variable. The architecture of LR is shown in Figure 3.
Linear regression estimates the linear relationship among the dependent variable and one or more independent features by becoming a linear equation to monitor data, and the purpose is to minimize discrepancies between predicted and actual output values by fitting a straight line.
Regression analysis is a form of modeling technique which examines the equation between a dependent and independent variable, known as predictors. By this, the issue is to establish a relationship between variable y and predictors x1, x2, …, xn, and to predict variable y based on a set of values x1, x2, …, xn.
LR analysis results from a mathematical equation, as a linear model, which estimates variable y from a set of predictor variables or regressors x, and is given by [23]:
y = b0 + b1x1 + b2x2 + … + bkxk + e
where b0 is intercepted, the b next to each x is called the regression coefficient, regression slope, or simply regression weight; e is a random error and y is the estimation variable. These regression weights are derived by an algorithm that produces a mathematical equation or a model for y that best fits the data. The parameters B on the MLR model are computed using the leas squares method:
B = X T X   1   X T Y
B = b 0 b 1 b k ,   = y 1 y 2 y n ,   X = 1   x 1.1     x 1 , 2       x 1 , k 1   x 2.1     x 2,2       x 2 , 1                       1   x n . 1     x n , 2       x n , k
where B, X, and Y as explained above, are matrices for regression coefficients, independent variables, and predicted variables, respectively.

2.2. Long Short-Term Memory Algorithm

DL is a model of ML that applies the Artificial Neural Networks (ANN) functioning of performing advanced computations on a vast amount of data.
The structure of the human brain and its function are the basis of DL work. DL models have several algorithms. Among the most popular DL algorithms are either following:
  • CNN has multiple layers, and it is used mostly for image processing and object detection.
  • Recurrent Neural Networks (RNN) recognize patterns in data sequences such as time series, natural language, etc.
  • Long Short-Term Memory Networks it is a special type of RNN, that is designed to avoid long-term dependency issues.
  • Generative Adversarial Networks (GAN) generate the data using training of two neural networks in competitions.
  • Autoencoders: it is a type of feed-forward neural network in which both input and output are identical.
Figure 4 illustrates the many types of DL algorithms and how they are used.
The trend of popularity for four DL algorithms (CNN, RNN, LSTM, Generative Adversarial, and Autoencoders) in the last 5 years is shown in Figure 5 [22].
The RNN is a form of ANN that uses time series data, and the output from the previous step is used for the current step. LSTM is a popular RNN algorithm, which can solve short-term dependency based on the parameters of long-term dependencies. In our study, we use the LSTM model.
The architecture of LSMT is shown in Figure 6. The main components are the input gate, forget gate, output gate, and a memory cell. The entire LSTM model (all gates and memory cells) can be referred to as the LSTM cell.
The LSTM works in a three-step process. The first step decides which data to eliminate from the cell, that is determined by the sigmoid function (σ). In the second step, there are two parts, the sigmoid function (decides which value to let, between 0 and 1), and the tanh function (gives weightage to the values which are passed, between −1 and 1). The third step decides what output will be produced.
The formulas that represent LSTM cells have been shown in the following equations [24]:
ft = σ (Wf * [ht−1, xt] + bf)
it = σ (Wi * [ht−1, xt] + bi)
C′t = tanh (WC * [ht−1, xt] + bc)
ot = σ (Wo * [ht−1, xt] + bo)
ht = ot * tanh (Ct)
where ft, it, C′t, ot, and ht represent forget gate, input gate, cell state, output gate, and hidden gate, respectively; ht−1 is a hidden state; Wf, Wi, WC, and Wo are the weights matrices; bf, bi, bc, and bo are bias matrices; xt is the current time step.
Weights are numerical values linked to the relationships between neurons. They dictate the strength of these relationships and consequently, the effect that one neuron’s output has on the input of another neuron. Weights are coefficients that adjust the impact of incoming data. They can increase or decrease the significance of particular information. During the training phase of a neural network, these weights are adjusted iteratively to minimize the difference between the network’s predictions and the real results. This procedure resembles refining the network’s capability to generate precise predictions. The biases add an essential layer of adaptability to neural networks. Biases are fundamentally constants linked with each neuron. In contrast to weights, biases do not connect to particular inputs but instead are added to the output of the neuron. Biases function as a kind of offset or threshold, enabling neurons to activate even when the weighted total of their inputs alone is inadequate. They contribute a level of adaptability that guarantees the network to learn and make predictions successfully. Weights and biases as arrays, are calculated using the Python Keras library.
The input gate allows the data to flow into a network based on its significance in the current step; the forget gate allows and decides which information to delete that is not important from the previous state; the memory cell holds the hidden units of information; and the output gate allows the information to be output to the screen. In this paper, we used the LSTM algorithm which is particularly effective as an algorithm used to learn, process, and classify sequential data of load. It can learn long-term dependencies between time steps of those data.

2.3. The Evaluation Index of Forecast Model

Three statistical evaluations have been computed for this study in order to appropriately assess the forecasting model’s performance: Mean Absolute Error (MAE), Mean Squared Error (MSE), and Root Mean Square Error (RMSE) [25]. By computing these statistical analyses, the predicted load and measured load are compared.
The MAE measures the average magnitude of the errors and can be calculated as follows:
M A E = i = 1 n | Y i Y i | n
where Y′t presents the prediction, Yt presents the true value, and n shows the number of measurement points.
Mean Squared Error measures the number of errors in statistical models. It assesses the average squared difference between the observed and predicted values. When a model has no errors, the MSE equals zero. As the model’s errors increase, its value increases. MSE is calculated by the following formula:
M S E = 1 n   i = 1 n ( Y i Y i ) 2
where Y′t presents the prediction, Yt presents the observed value, and n shows the number of measurement points.
The Root Mean Square Error measures the standard deviation of the residuals, which are in fact prediction errors. The residuals are a measure of how far the data points are from the regression line. RMSE can be calculated as follows:
R M S E = i = 1 n ( Y i Y t ) 2 n
where Y′t presents the prediction, Yt presents the true value, and n shows the number of measurement points.
The accuracy metrics used to evaluate the load forecasting are as follows: MAE is a positive value, as a smaller value indicates a successful model; a larger MSE indicates that the data points are dispersed widely around its central moment (mean), whereas a smaller MSE shows the opposite; RMSE is a positive value, and a smaller value indicates a good model; MSE is the square of RMSE, and a smaller value presents a successful model.

3. Data Collection, Load Forecast Approach and Model Creation

3.1. Data Collection

Electrical load and temperature data have been collected and stored in a graph database for four years, covering all electrical substations in the Pristina region, Kosovo. The data that was collected includes electricity usage on an hourly basis, as well as temperature and other electrical parameters (including active power, reactive power, voltage, amps, etc.), starting from 01 January 2019 till 31 December 2022. The data are acquired from Kosovo Transmission, System and Market Operator j.s.c., which ensures a secure and reliable operation of the Transmission System, security of supply, as well as efficiency of the electricity market [26].
The paper continues by reviewing and analyzing several research paper in the regard of short term load forecasting [27,28,29,30,31,32,33,34].

3.2. Load Forecast Approach and Model Creation

This research proposes two algorithms to improve load forecasting: the deep learning LSTM algorithm and the machine learning LR algorithm.
The proposed methodology is demonstrated in the following phases:
  • Phase 1: Data collection. Different types of data have been gathered and stored in the graph database: load data (MWh) and temperature (°C) as meteorological data as main parameters; the next step is preparing necessary files in csv format.
  • Phase 2: Choosing models. The LR model and LSTM model have been selected for load forecasting.
  • Phase 3: Input parameters. The parameters for load are prepared and inputted on the LR and LSTM model.
  • Phase 4. Model creation. LR and LSTM models have been trained and tested.
  • Phase 5. Results. The outcomes of the LSTM method and LR are analyzed.
  • Phase 6. The load forecast’s accuracy is based on the outcomes of two algorithms, selecting the approach with the highest accuracy.
The diagram of the proposed load forecast model is presented in Figure 7. The graph database has been used to archive the data. A graph database archives and stores data in a graph, and has attributes to represent any kind of data in a highly accessible way. The records in a graph database are nodes. Nodes and relationships have properties which in fact are key-value pairs. The graph database has been used to collect waste amounts of data from different datasets: load data, temperatures, and other electrical parameters.
The load forecast file must then be prepared in comma-separated values (.csv) format so that it may be included in both the LR and LSTM models. A file for the winter week and another for the summer week have been prepared. The models will use these two files independently. The results of the load forecast calculation for a weekly period will be implemented. Both the LR and LSTM models’ accuracy of results was assessed for two weeks in the summer and winter, respectively.

3.3. Dataset Analyses

The load, temperature, and other electrical parameter data are considered as time series and have their own characteristics. Due to their features, our study reviewed the load and temperature time series prior to forecasting. In some time-dependent scenarios, the data shows a linear trend. Figure 8 displays load and temperature data for a number of years, including 2019, 2020, 2021, and 2022, or for 8760 h annually, accordingly. The highest and lowest values for peak loads are as follows: 295.65 MWh and 52.10 MWh in 2019, 286.40 MWh and 49.17 MWh in 2020, 338.19 MWh and 51.25 MWh in 2021, 358.42 MWh and 65.30 MWh on 2022, respectively, on a daily basis. In terms of temperature, summertime highs throughout these four years range from 32 to 37 (°C), while wintertime lows range from −13 and −21 (°C). The load is increased in the summer of 2022, although during winter the highest load is in 2021.
Figure 9 shows graphically the total load for the period 2019–2022 on a monthly basis.
In our model, two techniques, the LR and LSTM have been implemented in the Python programming language, running on Jupyter Notebook, as a web-based interactive platform. For the LR model, we use Python libraries, Pandas for data manipulation, NumPy for mathematical calculation, MatplotLib and Seaborn for visualization data, and Sklearn libraries for Machine Learning operations. We also used Keras as a multi-layer LSTM model. In two seasons, one week in the winter and one week in the summer, the model is designed to observe data for a total of seven days, or 168 h. The primary goal is to use the historical load data and weather forecast data to forecast load values for the upcoming week.

4. Results and Discussions

The comprehensive experimental results are shown in this section. The dataset spans four years (2019–2022) and includes load, temperature, and other electrical factors. The data are utilized by Kosovo System, Transmission, and Market Operator [26]. The load forecasting for the weeks of 17–23 January 2022, during the winter season, and 20–26 June 2022, during the summer season, is included in the dataset that has been created for LR and LSTM. In all combinations, we utilize 20% of the dataset as the test set and 80% of the dataset as the training set in each of those pairings. Additionally, the proposed methodology can be applied to medium-term and long-term load forecasting.

4.1. LR Results

A data plot for our input data preparation is shown in Figure 10; it contains 168 h of data for the winter week of 17–23 January 2022.
In the dataset, 80% of the dataset’s rows, or 134 rows total, are used for the training set. Next, 34 rows, or 20% of the total, are utilized to prepare the input data for the test set. According to our results, the standard deviation parameter for variable x1 in the training set is 0.042, for variable x2 it is 0.032, and for variable x3 it is 0.021. The accuracy of the model is 99.87%. The actual load is compared to the forecast load in Figure 11, and the actual load is compared to the forecast load in the bar for a period of 72 h in Figure 12.
The standard deviation (STD) parameter for the test set is 0.083 for variable x1, 0.065 for variable x2, and 0.037 for variable x3. The accuracy of the model is 99.87%. Figure 13 presents a scatter plot, which is a diagram in which the numbers are represented by dots, while Figure 14 displays the diagram of actual against forecast load in bars.
Figure 15 shows a data plot for our input data preparation, which contains 168 h of data for the summer week of 20–26 June 2022.
The standard deviation (STD) parameter for variable x1 is 0.043, for variable x2 it is 0.033, and for variable x3 it is 0.017. These findings pertain to the training set during the summer week. The accuracy of the model is 99.69%. A scatter plot, in which the values are represented by dots, is displayed in Figure 16. The actual load against the predicted load is depicted in a bar for a period of 72 h in Figure 17.
The standard deviation (STD) parameter for variable x1 is 0.057, for variable x2 it is 0.032, and for variable x3 it is 0.029 for the testing set for the summer week.
Model accuracy is 99.67%. Figure 18 presents a scatter plot, a diagram in which the values are represented by dots, and Figure 19 shows the diagram of actual against forecast load in the bars.
Table 2 displays the evaluation index for our results for the LR model for the training and test sets, as well as for the winter and summer periods.

4.2. LSMT Results

The dataset diagram for the same winter week, 17–23 January 2022, which is ready for the LSTM model, is shown in Figure 20.
Using an LSTM model, Figure 21 displays the training data, actual data, and prediction data for the winter week between 17 and 23 January 2022, accordingly.
The dataset diagram for 168 h, created for the LSTM model, is shown in Figure 22 for the same summer week (20–26 June 2022).
Figure 23 displays the training data, actual data, and predicted data, respectively, for the 168 h LSTM model during the summer week of 20–26 June 2022.
For the LSTM model, in the winter week model, the Mean Absolute Error (MAE) is 6.231, the Mean Squared Error (MSE) is 70.873, and the Root Mean Squared Error (RMSE) is 8.418. The Mean Absolute Error (MAE) is 9.305, the Mean Squared Error (MSE) is 117.639, and the Root Mean Squared Error (RMSE) is 10.846, for the summer week. These are displayed in Table 3.
The Keras deep learning library and Adam as an optimizer have been used in our LSTM model. Because we only employed a small number of data sets for a single week (168 h), the LSTM model findings for our case study did not demonstrate good prediction results.
The outcomes for both algorithms, LR and LSTM, for our case study, are shown in Table 4.
Table 4 indicates that the LR model for our case study performs better than the LSTM model.

5. The Comparison Results of the Proposed Model and Results from Paper’s Reviewed

Evaluating and comparing research helps determine model performance and data effectiveness. A comparison of outcomes should be done with attention to similar data. Choosing the right machine learning and deep learning model for load forecasting is crucial for achieving accurate results. Although we were unable to use the same datasets, we attempted to compare the results from our paper with the findings from the reviewed paper.
It is important to recognize that when utilizing machine learning and deep learning techniques, choosing the right method based on the data at hand is the crucial aspect of the analysis. To illustrate the performance of the proposed models in this paper, Table 5 presents the outcomes of the methods employed in this study along with the results from other research that we reviewed. The comparison presented in Table 5 shows the effectiveness and precision of the proposed model for predicting the short-term load.

6. Conclusions

An adequate forecasted electricity load ensures that enough electricity is available all the time to meet consumption necessities and ensures the operation of the electrical system runs efficiently. In order to enhance load forecasting, this work proposes using the Linear Regression and LSTM models in short-term time frames. The models have been examined for two different data sets of forecasts: one week ahead for the winter season (168 h) and one week ahead for the summer season (168 h). Performance metrics are used to examine the outcomes. The summary results for both models are shown in Table 4. The Linear Regression model that we created performs as follows: MAE of 0.340 and RMSE of 0.367 for the winter week, and MAE of 0.297 and RMSE of 0.343 for the summer week. MAE of 6.231 and RMSE of 8.418 for the winter week and MAE of 9.305 and RMSE of 10.846 for the summer week are results of the Long Short-Term Memory model’s performance. Results from the data set show that, in terms of prediction forecast for our case study, the Linear Regression approach seems to perform better than the LSTM technique. This is because we only used the 168-row data set for one week. Although the results of the models are generally accepted, special days of the week, socioeconomic variables, and other meteorological phenomena like wind all affect how accurate short-term load forecasting is. The main advantage of the proposed approach is the combination of very good forecast accuracy and low computational power requirements. In this way, a rational approach has been formulated that can be applied to other purposes, such as forecasting prices in a liberalized energy market, and assessing the efficiency and profitability of investments and reserved capacity in the energy sector. Future research can use LR and LSTM at the national level to produce short-term load predictions.

Institutional Reviewed Board Statement

Not applicable.

Author Contributions

A.P., D.M. and N.H. were involved in the full process of producing this paper, including the conceptualization, methodology, modeling, validation, visualization, and preparation of the manuscript. All authors have read and agreed to the published version of the manuscript.

Funding

This study was financed by the European Union-NextGenerationEU, through the National Recovery and Resilience Plan of the Republic of Bulgaria, project No. BG-RRP-2.004-0005, and the APC was funded by No. BG-RRP-2.004-0005.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

AIArtificial Intelligence
ARIMAAuto Regressive Integrated Moving Average
CNNConvolutional Neural Networks
CSVComma-Separated Value
DLDeep Learning
DNNDeep Neural Network
GAGenetic Algorithm
GANGenerative Adversarial Networks
LTFLong-Term Forecasting
LRLinear Regression
LSTMLong Short-Term Memory
LDALinear Discriminant Analyses
LSTM-NP Long Short-Term Memory- Neural Prophet
MLMachine Learning
MLRMultiple Linear Regression
MFTMedium-Term Forecasting
MAEMean Absolute Error
MSEMean Squared Error
MWhMega Wat hour
MatplotlibMATLAB, Plot, and Library
NumPyNumerical Python
PSOParticle Swarm Optimization
PCAPrincipal Component Analyses
RNNRecurrent Neural Network
RMSERoot Mean Square Error
RLSRecursive Least Squares
RESRenewable Energy Sources
STDStandard Deviation
STFShort-Term Forecasting
STLFShort-Term Load Forecasting
SVMSupport Vector Machine
TSOTransmission System Operator

References

  1. Kang, C.; Xia, Q.; Zhang, B. Review of power system load forecasting and its development. Autom. Electr. Power Syst. 2004, 28, 1–11. [Google Scholar]
  2. Shi, T.; Mei, F.; Lu, F.; Lu, J.; Pan, J.; Zhou, Y.; Wu, C.; Zheng, J. Phase Space Reconstruction Algorithm and Deep Learning-Based Very Short-Term Bus Load Forecasting. Energies 2019, 12, 4349. [Google Scholar] [CrossRef]
  3. Habbak, H.; Mahmoud, M.; Metwally, K.; Fouda, M.M.; Ibrahem, M.I. Load Forecasting Techniques and Their Applications in Smart Grids. Energies 2023, 16, 1480. [Google Scholar] [CrossRef]
  4. Chen, H.; Canizares, C.A.; Singh, A. ANN-based short-term load forecasting in electricity markets. In Proceedings of the Power Engineering Society Winter Meeting, Columbus, OH, USA, 28 January–1 February 2001; IEEE: New York, NY, USA, 2001; Volume 2, pp. 411–415. [Google Scholar]
  5. Jung, S.M.; Park, S.; Jung, S.W.; Hwang, E. Monthly Electric Load Forecasting Using Transfer Learning for Smart Cities. Sustainability 2020, 12, 6364. [Google Scholar] [CrossRef]
  6. Tudose, A.M.; Picioroaga, I.I.; Sidea, D.O.; Bulac, C.; Boicea, V.A. Short-term load forecasting using convolutional neural networks in COVID-19 context: The Romanian case study. Energies 2021, 14, 4046. [Google Scholar] [CrossRef]
  7. Lee, G.C. Regression-Based Methods for Daily Peak Load Forecasting in South Korea. Sustainability 2022, 14, 3984. [Google Scholar] [CrossRef]
  8. Dudek, G. Pattern-based local linear regression models for short-term load forecasting. Electr. Power Syst. Res. 2016, 130, 139–147. [Google Scholar] [CrossRef]
  9. Chen, B.J.; Chang, M.W. Load forecasting using support vector machines: A study on EUNITE competition 2001. IEEE Trans. Power Syst. 2004, 19, 1821–1830. [Google Scholar] [CrossRef]
  10. Amral, N.; Ozveren, C.S.; King, D. Short Term Load Forecasting using Multiple Linear Regression. In Proceedings of the 42nd International Universities Power Engineering Conference, Brighton, UK, 4–6 September 2007. [Google Scholar]
  11. Farsi, B.; Amayri, M.; Bouguila, N.; Eicker, U. On Short-Term Load Forecasting Using Machine Learning Techniques and a Novel Parallel Deep LSTM-CNN Approach. IEEE Access 2021, 9, 31191–31212. [Google Scholar] [CrossRef]
  12. Pavlatos, C.; Makris, E.; Fotis, G.; Vita, V.; Mladenov, V. Utilization of Artificial Neural Networks for Precise Electrical Load Prediction. Technologies 2023, 11, 70. [Google Scholar] [CrossRef]
  13. Bouktif, B.; Fiaz, A.; Ouni, A.; Serhani, M.A. Multi-Sequence LSTM-RNN Deep Learning and Metaheuristics for Electric Load Forecasting. Energies 2020, 13, 391. [Google Scholar] [CrossRef]
  14. Nespoli, A.; Ogliari, E.; Pretto, S.; Gavazzeni, M.; Vigani, S.; Paccanelli, F. Electrical Load Forecast by Means of LSTM: The Impact of Data Quality. Forecasting 2021, 3, 91–101. [Google Scholar] [CrossRef]
  15. Rafi, S.F.; Masood, N.A.; Deeba, S.R.; Hossain, E. A Short-Term Load Forecasting Method Using Integrated CNN and LSTM Network. IEEE Access 2021, 9, 32436–32448. [Google Scholar] [CrossRef]
  16. Wang, Y.; Zhang, N.; Chen, X. A Short-Term Residential Load Forecasting Model Based on LSTM Recurrent Neural Network Considering Weather Features. Energies 2021, 14, 2737. [Google Scholar] [CrossRef]
  17. Shohan, J.A.; Faruque, O.; Foo, S.Y. Forecasting of Electric Load Using a Hybrid LSTM-Neural Prophet Model. Energies 2022, 15, 2158. [Google Scholar] [CrossRef]
  18. Gigoni, L.; Betti, A.; Crisostomi, E.; Franco, A.; Tucci, M.; Bizzari, F.; Mucci, D. Day-Ahead Hourly Forecasting of Power Generation from Photovoltaic Plants. IEEE Trans. Sustain. Energy 2017, 9, 831–842. [Google Scholar] [CrossRef]
  19. Vinasco, J.L.; Bacher, P.; Moller, J.K. Probabilistic load forecasting considering temporal correlation: Online models for the prediction of households’ electrical load. Appl. Energy 2021, 303, 117594. [Google Scholar] [CrossRef]
  20. Fekri, M.N.; Patel, H.; Grolinger, K.; Sharma, V. Deep learning for load forecasting with smart meter data: Online Adaptive Recurrent Neural Network. Appl. Energy 2021, 282, 116177. [Google Scholar] [CrossRef]
  21. Muzaffar, S.; Afshari, A. Short-Term Load Forecast Using LSTM Networks. Energy Procedia 2019, 158, 2922–2927. [Google Scholar] [CrossRef]
  22. Available online: https://trends.google.com/trends (accessed on 2 September 2024).
  23. Olive, D. Linear Regression; Springer International Publishing: Cham, Switzerland, 2017. [Google Scholar]
  24. Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
  25. Hyndman, R.J. Another look at forecast accuracy metrics for intermittent demand. Foresight Int. J. Appl. Forecast. 2006, 4, 43–46. [Google Scholar]
  26. Available online: https://kostt.com/Home/Index (accessed on 1 August 2024).
  27. Sarker, I.H. Machine Learning: Algorithms, Real-World Applications and Research Directions. SN Comput. Sci. 2021, 2, 160. [Google Scholar] [CrossRef] [PubMed]
  28. Sevlian, R.; Rajagopal, R. A Scaling Law for Short Term Load Forecasting on Varying Levels of Aggregation. Int. J. Electr. Power Energy Syst. 2018, 98, 350–361. [Google Scholar] [CrossRef]
  29. Skowron, M.; Frankiewicz, O.; Jan Jarosz, J.J.; Wolkiewicz, M.; Dybkowski, M.; Weisse, S.; Valire, J.; Wyłomaanska, A.; Zimroz, R.; Szabat, K. Detection and Classification of Rolling Bearing Defects Using Direct Signal Processing with Deep Convolutional Neural Network. Electronics 2024, 13, 1772. [Google Scholar] [CrossRef]
  30. Taylor, W.J. Short-Term Electricity Demand Forecasting Using Double Seasonal Exponential Smoothing. J. Oper. Res. Soc. 2003, 54, 799–805. [Google Scholar] [CrossRef]
  31. Groß, A.; Lenders, A.; Schwenker, F.; Braun, D.A.; Fischer, D. Comparison of short-term electrical load forecasting methods for different building types. Energy Inform. 2021, 4, 13. [Google Scholar] [CrossRef]
  32. Nti, I.K.; Teimeh, M.; Boateng, O.N.; Adekoya, A.F. Electricity load forecasting: A systematic review. J. Electr. Syst. Inf. Technol. 2020, 7, 13. [Google Scholar] [CrossRef]
  33. Beichter, M.; Phipps, K.; Frysztacki, M.M.; Mikut, R.; Hagenmeyer, V.; Ludwig, N. Net load forecasting using different aggregation levels. Energy Inform. 2022, 5, 19. [Google Scholar] [CrossRef]
  34. Hahn, H.; Nieberg, S.M.; Pickl, S. Electric load forecasting methods: Tools for decision making. Eur. J. Oper. Res. 2009, 199, 902–907. [Google Scholar] [CrossRef]
Figure 1. Types of ML algorithms and their usage.
Figure 1. Types of ML algorithms and their usage.
Technologies 13 00059 g001
Figure 2. The popularity score of various types of ML algorithms in a range of 0 (min) to 100 (max) over time, and x-axis represents the timestamp; y-axis shows the scores.
Figure 2. The popularity score of various types of ML algorithms in a range of 0 (min) to 100 (max) over time, and x-axis represents the timestamp; y-axis shows the scores.
Technologies 13 00059 g002
Figure 3. Linear Regression components.
Figure 3. Linear Regression components.
Technologies 13 00059 g003
Figure 4. Types of DL algorithms and their usage.
Figure 4. Types of DL algorithms and their usage.
Technologies 13 00059 g004
Figure 5. The popularity score of various types of DL algorithms in a range of 0 (min) to 100 (max) over time, and x-axis represents the timestamp; y-axis shows the scores.
Figure 5. The popularity score of various types of DL algorithms in a range of 0 (min) to 100 (max) over time, and x-axis represents the timestamp; y-axis shows the scores.
Technologies 13 00059 g005
Figure 6. The architecture of LSMT.
Figure 6. The architecture of LSMT.
Technologies 13 00059 g006
Figure 7. The diagram of proposed load forecast model.
Figure 7. The diagram of proposed load forecast model.
Technologies 13 00059 g007
Figure 8. Load (MWh) and temperature (°C) data on an hourly basis for 2019, 2020, 2021, and 2022, on (ad), respectively.
Figure 8. Load (MWh) and temperature (°C) data on an hourly basis for 2019, 2020, 2021, and 2022, on (ad), respectively.
Technologies 13 00059 g008
Figure 9. The total load (MWh) data on monthly basis.
Figure 9. The total load (MWh) data on monthly basis.
Technologies 13 00059 g009
Figure 10. The plot for our data input durings the winter season.
Figure 10. The plot for our data input durings the winter season.
Technologies 13 00059 g010
Figure 11. Actual against load forecast on training set—winter week.
Figure 11. Actual against load forecast on training set—winter week.
Technologies 13 00059 g011
Figure 12. Actual against forecast load on training set in bars—winter week.
Figure 12. Actual against forecast load on training set in bars—winter week.
Technologies 13 00059 g012
Figure 13. Actual load against forecast load on test set—winter week.
Figure 13. Actual load against forecast load on test set—winter week.
Technologies 13 00059 g013
Figure 14. Actual load against forecast load on test set in bars—winter week.
Figure 14. Actual load against forecast load on test set in bars—winter week.
Technologies 13 00059 g014
Figure 15. The plot for our data input, summer season.
Figure 15. The plot for our data input, summer season.
Technologies 13 00059 g015
Figure 16. Actual load against forecast load on training set—summer week.
Figure 16. Actual load against forecast load on training set—summer week.
Technologies 13 00059 g016
Figure 17. Actual against forecast load on training set in bars—summer week.
Figure 17. Actual against forecast load on training set in bars—summer week.
Technologies 13 00059 g017
Figure 18. Actual load against forecast load on test set—summer week.
Figure 18. Actual load against forecast load on test set—summer week.
Technologies 13 00059 g018
Figure 19. Actual against forecast load on test set—summer week.
Figure 19. Actual against forecast load on test set—summer week.
Technologies 13 00059 g019
Figure 20. Data input for winter week on LSTM model.
Figure 20. Data input for winter week on LSTM model.
Technologies 13 00059 g020
Figure 21. Training, actual and predicted data for winter week.
Figure 21. Training, actual and predicted data for winter week.
Technologies 13 00059 g021
Figure 22. Data input for summer week.
Figure 22. Data input for summer week.
Technologies 13 00059 g022
Figure 23. Training, actual and predicted data for summer week.
Figure 23. Training, actual and predicted data for summer week.
Technologies 13 00059 g023
Table 1. ML and DL algorithms were reviewed in the study.
Table 1. ML and DL algorithms were reviewed in the study.
AlgorithmThe Technique UsedAuthors
ML and DLDNNJung et al. [5]
CNNTudose et al. [6]
LRLee [7], Dudek [8]
SVM, MLRChen et al. [9], Amral et al. [10]
LSTM-CNN, RNNFarsi et al. [11], Pavlatos et al. [12], Bouktif et al. [13], Fekri et al. [20]
LSTM, CNN LSTMNespoli et al. [14], Rafi et al. [15], Wang et al. [16], Shohan et al. [17], Muzaffar et al. [21]
DLGigoni et al. [18]
RLSVinasco et al. [19]
Table 2. The MAE, MSE, and RMSE for the model LR for summer week.
Table 2. The MAE, MSE, and RMSE for the model LR for summer week.
Winter WeekSummer Week
ModelMAEMSERMSEMAEMSERMSE
LR (training data)0.3550.1410.3760.3520.1400.374
LR (test data)0.3400.1340.3670.2970.1170.343
Table 3. The MAE, MSE, and RMSE for the model LSTM for winter and summer weeks.
Table 3. The MAE, MSE, and RMSE for the model LSTM for winter and summer weeks.
ModelWinter WeekSummer Week
MAEMSERMSEMAEMSERMSE
LSTM6.23170.8738.4189.305117.63910.846
Table 4. The MAE, MSE, and RMSE for the LR and LSTM models for winter and summer week.
Table 4. The MAE, MSE, and RMSE for the LR and LSTM models for winter and summer week.
ModelWinter WeekSummer Week
MAEMSERMSEMAEMSERMSE
LR0.3550.1410.3670.3520.1400.374
LSTM6.23170.8738.4189.305117.63910.846
Table 5. The evaluation indexes of outcomes for the article and reviewed articles.
Table 5. The evaluation indexes of outcomes for the article and reviewed articles.
ModelEvaluation Indexes
MAEMSERMSEMAPE
LR (this paper)0.3550.1410.367--
LSTM (this paper)6.23170.8738.418-
DNN [5] (Jongno d.)---3.74
CNN [6]10420841144.361.37
LR [7] (dynamic)17.69--1.96
LR [8] (average)---2.50
SVM [9] (winter, yes)---3.14
MLR [10] (dry season) --3.52
CNN [11] (January)567.99-8.990.911
LSTM [12] (time st. 72)0.163-0.054-
LSTM-RNN [13] (GA)231.50-311.44-
LSTM [14] (holiday r.)3.70-6.43-
LSTM [15] (January)486.49-577.945.71
LSTM [16] (aggr. build.)--1148.99.42
LSTM [17] (winter)--5.451.58
RLS [19] (k horizon)-0.325--
RNN [20]--0.68620.53
CNN LSTM [21] (7 days)--3745.97
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Perçuku, A.; Minkovska, D.; Hinov, N. Enhancing Electricity Load Forecasting with Machine Learning and Deep Learning. Technologies 2025, 13, 59. https://doi.org/10.3390/technologies13020059

AMA Style

Perçuku A, Minkovska D, Hinov N. Enhancing Electricity Load Forecasting with Machine Learning and Deep Learning. Technologies. 2025; 13(2):59. https://doi.org/10.3390/technologies13020059

Chicago/Turabian Style

Perçuku, Arbër, Daniela Minkovska, and Nikolay Hinov. 2025. "Enhancing Electricity Load Forecasting with Machine Learning and Deep Learning" Technologies 13, no. 2: 59. https://doi.org/10.3390/technologies13020059

APA Style

Perçuku, A., Minkovska, D., & Hinov, N. (2025). Enhancing Electricity Load Forecasting with Machine Learning and Deep Learning. Technologies, 13(2), 59. https://doi.org/10.3390/technologies13020059

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop