Next Article in Journal
Enhancing Sustainability in Health Tourism through an Ontology-Based Booking Application for Personalized Packages
Previous Article in Journal
Visualization and Analysis of Hotspots and Trends in Seafood Cold Chain Logistics Based on CiteSpace, VOSviewer, and RStudio Bibliometrix
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Hybrid Deep Learning Model to Estimate the Future Electricity Demand of Sustainable Cities

Department of Industrial Engineering, Faculty of Engineering, Bursa Uludağ University, 16059 Bursa, Türkiye
*
Author to whom correspondence should be addressed.
Sustainability 2024, 16(15), 6503; https://doi.org/10.3390/su16156503 (registering DOI)
Submission received: 18 June 2024 / Revised: 26 July 2024 / Accepted: 28 July 2024 / Published: 30 July 2024

Abstract

:
Rapid population growth, economic growth, and technological developments in recent years have led to a significant increase in electricity consumption. Therefore, the estimation of electrical energy demand is crucial for the planning of electricity generation and consumption in cities. This study proposes a hybrid deep learning model that combines convolutional neural network (CNN) and long short-term memory (LSTM) techniques, both of which are deep learning techniques, to estimate electrical load demand. A hybrid deep learning model and LSTM model were applied to a dataset containing hourly electricity consumption and meteorological information of a city in Türkiye from 2017 to 2021. The results were evaluated using mean absolute percent error (MAPE), root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R2) metrics. The proposed CNN-LSTM hybrid model was compared to the LSTM model, with lower MAPE, MAE, and RMSE values. Furthermore, the CNN-LSTM model exhibited superior prediction performance with an R2 value of 0.8599 compared to the LSTM model with an R2 value of 0.8086. These results demonstrate the effectiveness of the proposed deep learning model in accurately estimating future electrical load demand to plan electricity generation for sustainable cities.

1. Introduction

Energy demand is growing rapidly around the world, driven by population growth, urbanization, industrialization, and technological advancement. Global electricity demand, which decreased in 2020 due to the COVID-19 epidemic, increased by approximately 5.5% in 2021 and 2% in 2022. The majority of this growth was observed in Asia and the United States. In Europe, electricity consumption decreased by 2.9% due to rising electricity prices, mild weather conditions, and energy-saving efforts that led to reduced industrial and residential demand [1]. However, according to the International Energy Agency 2024 report, the global electrical energy demand is predicted to increase by an average of 3.4% annually until 2026 [2]. The electrical energy consumption of Türkiye reached 332,871 billion kWh which increased by 8.7% in 2021. According to the Turkish Electricity Transmission Corporation’s 10-year forecast report, the electricity consumption of Türkiye in 2032 is expected to exceed 258 billion kWh with an average increase of 2.1% in the low scenario, 287 billion kWh with an average increase of 2.8% in the base scenario, and 319 billion kWh with an average increase of 3.4% in the high scenario [3]. These increases in energy consumption lead to problems such as the depletion of existing energy resources and pollution caused by the use of fossil fuel-based electricity generation infrastructure. In this case, producers and consumers tend to use renewable energy sources. With the increases in electricity consumption and the acceleration of the transition to renewable energy sources, accurate electrical load demand forecasting has become a crucial area of research to achieve higher efficiency and reliability in the planning and operation of power generation, transmission, and distribution systems. The dynamic, non-linear, and complex nature of energy consumption data, along with seasonal and irregular patterns, climatic conditions, socio-economic factors, and its dependency on various external factors make accurate and reliable energy demand forecasting a challenging research problem [4].
The energy strategies of Türkiye for the future aim to ensure a sustainable energy supply by diversifying resources, minimizing the impact of energy generation on the environment, utilizing renewable energy resources, and increasing energy efficiency. This article focuses on forecasting electrical energy demand to plan renewable energy sources that can provide the required electrical energy needed for sustainable cities. An electrical energy demand forecasting model must have an hourly frequency and predict a medium/long-term period in order to be used effectively in planning renewable energy resources. The literature research highlighted the novelty and necessity of our study, allowing us to identify the gap our research addressed. The originality and novelty of this article is that this electrical energy demand forecasting model makes a medium-term forecast with an hourly frequency in order to eliminate the problems in planning traditional renewable energy sources. This forecasting model will help make decisions for new facility establishment, capacity increase, storage, etc. However, obtaining and organizing hourly meteorological and electricity energy demand data of a city reveals the challenge of working with big data. In this article, deep learning methods were used to overcome the complexity of electricity consumption data and the difficulty of working with big data. To effectively predict electrical energy demand, a long-short term memory (LSTM) and then a hybrid deep learning model combining a convolutional neural network (CNN) and an LSTM were studied. The hybrid deep learning model can extract complex features among variables and store irregular trends for electricity demand forecasting. In this way, it overcomes the complexity of the electrical energy demand forecasting problem. The CNN performs data pre-processing to identify local features in time series data, allowing higher-level features to be extracted. The LSTM is used to model time information and electricity consumption trends using important features of electricity demand obtained through the CNN [5]. Therefore, this study considered a hybrid CNN-LSTM model as an effective method for forecasting electricity demand. The general framework of an electrical energy demand forecasting model (EEDFM) which is presented in this study, is given in Figure 1. The results obtained from the EEDFM show that the model overcomes the hourly and medium-term complexity of electrical energy demand forecasting and represents a new contribution to the field by providing an effective tool in renewable energy resource planning.
Effective planning of electricity generation and distribution requires the accurate forecasting of electrical energy demand. Numerous approaches have been proposed to examine electrical energy demand forecasting. Statistical methods and artificial intelligence-based methods are frequently used when making time series forecasts. The most commonly used statistical methods in electrical energy demand forecasting are linear regression (LR) [6,7,8] and the autoregressive integrated moving average (ARIMA) [9]. The most commonly used artificial intelligence-based methods in electrical energy demand forecasting are artificial neural networks (ANNs) [10,11,12] and deep neural networks (DNNs) [13,14,15,16]. The most frequently used neural networks are multilayer perceptron (MLP), radial basis function networks (RBFNs), deep belief networks, CNNs, and LSTM networks. MLP is made of at least three layers called an input, hidden, and output layer. An RBFN is a type of feedforward neural network which uses the radial basis function as the activation function [17,18]. A deep belief network is a class of deep neural networks, which is composed of multiple latent layers and each layer is connected, but the units within each layer are not related [19]. A CNN is feedforward neural network that is able to extract features from data [20]. The LSTM architecture consists of a set of recurrently connected networks, known as memory blocks [21].
Al-Hamadi and Soliman [6] presented a long/medium-term electrical load forecasting method to forecast hourly daily load demand. The short-term correlation of load behavior is used to achieve the desired outcome, along with consideration of its annual growth. Garcia and Mate [11] modified a vector autoregressive model (VARM) to predict the hourly electricity demand in Spain between 2006 and 2007 using interval time series. Apadula et al. [8] developed a multiple linear regression (MLR) model to study the relationships between meteorological variables and electricity demand, and to estimate monthly electrical energy demand up to one month in advance. Ahmad et al. [22] published a review article on electrical energy forecasting methods, including support vector machine (SVM) and ANN methods for buildings and demonstrated that hybridizing artificial intelligence methods has the potential to produce more accurate results. Huang et al. [23] developed a new mathematical modeling scheme using the Holt–Winters exponential smoothing model to investigate the short-term modeling and forecasting of one-month electricity demand. Fan et al. [24] presented a hybrid model that combines a phase space reconstruction (PSR) algorithm and a bi-square kernel (BSK) regression model for electrical load forecasting. Elamin and Fukushige [25] proposed a method using a seasonal autoregressive integrated moving average model (SARIMA) to predict hourly load demand data. Ayoub et al. [10] presented a short-term supply and demand model for forecasting using hourly collected annual consumption data from a micro-grid used in a commercial building. In this study, they used an ANN model to estimate electricity production capacity and demand within 24 h. Çevik et al. [26] used a hybrid model, an ANN, and particle swarm optimization (PSO), for short-term electrical energy prediction of the next 24 h. Behm et al. [27] presented a model using an ANN for the hourly, long-term estimation of weather-dependent, annual electrical load profiles for European countries. Liu and Li [28] proposed a load forecasting system based on a wavelet least-squares SVM and a sperm whale algorithm (SWA) to improve forecasting accuracy. Yuan et al. [12] proposed a feedforward ANN trained with the Levenberg Marquardt algorithm (LMA) to predict seasonal hourly electrical energy demand for different areas of a university in Japan. Ahmad and Chen [6] used linear model stepwise regression (LMSR), a nonlinear autoregressive model (NARM), and random forest approaches to examine medium and long-term electrical load forecasts for utilities, independent power producers, and industrial customers to explore climate change and its impact on energy use. Pegalajar et al. [17] used LR, the random forest approach, gradient boosting regression (GBR), regression trees, MLP, a Jordan neural network (JNN), a gated recurrent units neural network (GRU-NN), and an LSTM model to predict electricity demand in the Spanish electricity network using data from 2007 to 2019. Shaikh et al. [29] proposed a method for short-term electrical load forecast using an LSTM model. Mujeeb et al. [30] proposed an LSTM model for electricity energy demand and price estimation for big datasets. Mounir et al. [31] proposed an electricity forecasting method based on empirical mode decomposition (EMD) and a bidirectional LSTM model.
Wan He [13] applied a CNN and a recurrent neural network (RNN) for short-term load prediction using hourly electricity consumption data of a city in Northern China from 2009 to 2012. The study compared various methods including LR, an SVM, a DNN, and a hybrid CNN and RNN approach. Le et al. [32] proposed a hybrid method for forecasting electrical energy consumption that used a combination of CNN and bi-directional LSTM models. The experimental results demonstrated that the proposed hybrid model performed better than linear regression and LSTM models. Kim and Cho [33] proposed a CNN-LSTM network for predicting residential electricity consumption. The model was compared to LR, decision tree regression, random forest regression, and MLP models. The authors found that the CNN-LSTM model had the lowest mean square error (MSE) value compared to the other machine learning methods. Ren et al. [15] proposed a hybrid CNN-LSTM model to investigate the characteristic information contained in an electrical load sequence and compared the performance of LSTM, CNN, ARIMA, and backpropagation models for a 24 h load data forecast. Rafi et al. [14] studied the combination of CNN and LSTM models for short-term load prediction. The effectiveness of the proposed approach was verified by comparing it with the performance metrics of other approaches such as LSTM models, RBFNs, and extreme gradient boosting (XGBoost) algorithms. The applicability of the CNN-LSTM model was demonstrated through MAPE and RMSE metrics. Li et al. [34] developed a deep learning-based interval forecasting model that combined fuzzy information granulation and an LSTM model to predict building energy consumption and to present future uncertainties as intervals. Javanmard and Ghaderi [9] presented an integrated approach to estimate electrical energy demand in seven sectors in Iran up to 2040. They applied machine learning algorithms (ANN, AR, ARIMA, SARIMA, SARIMAX, and LSTM) and optimization methods.
A summary of the literature is given in Table 1, which includes the authors of the articles, the method, the dataset, the forecast term, and the performance metrics. As is seen in Table 1, many methods have been used to estimate electrical energy demand. However, it is seen that hybrid deep learning methods give better results [16,26,31].
This article considers the use of a hybrid deep learning model combining a CNN and an LSTM model for forecasting the future electricity demand of sustainable cities applied in a sample city in Türkiye. The reason for using this method is that the LSTM method has fast convergence and can learn long-term dependencies while preserving both long and short-term states. Therefore, it is considered a suitable solution for estimating electrical load demands over a longer period. On the other hand, CNNs have been used as a powerful tool to select features to improve prediction accuracy [35]. The literature mainly focuses on short-term forecasting using hourly data, while long-term forecasting typically involves daily, monthly, or daily peak load data. This article presents medium-term forecasting using hourly electricity consumption and meteorological data over five years. The fact that the electrical energy demand forecast obtained is hourly and medium-term enables it to be used effectively in renewable energy planning. The training data consisted of four years, while the test data consisted of 11 months of the fifth year. The last month was used as an unseen dataset to see how the model would perform in future situations.
This paper is structured as follows: Section 2 presents a detailed description of the CNN, LSTM, and CNN-LSTM hybrid model, Section 3 gives the proposed hybrid deep learning model, with experimental results and conclusions in Section 4.

2. Materials and Methods

In this study, an electrical energy demand forecasting model (EEDFM) using a hybrid deep learning model is presented and compared with an LSTM model. The methodology is described in the following sections.

2.1. Convolutional Neural Network

CNNs are a special type of neural network for processing data with a known grid-like topology. These topologies can be in the form of time series data as a 1-dimensional grid, image data as a 2-dimensional pixel grid, or video data as a 3-dimensional pixel grid [36].
The dataset, consisting of electrical energy consumption and variables affecting consumption, is represented as a matrix with a variable axis and a time axis. The 1-dimensional convolutional neural network (1D-CNN) is more suitable than other CNNs in time series problems like this. One of the most important features of a 1D-CNN is that for time series data, the filter field moves only in the time direction [37]. Therefore, the correlation between local variables can be deduced [38].
Convolution operations are employed as a data pre-processing step to identify local features in the sequence data. As a result, the sequence data are transformed into shorter sequences of higher-level features [39].
CNNs apply a process of convolution to produce a representative output by sliding a fixed-length filter (kernel) over the input vector. The convolution operator multiplies the elements of the input vector with the predefined filter and summarizes the results, creating a feature map at the end of the process [16].
Figure 2 presents red, green, and yellow filters moving in the time direction on the input data which is a multidimensional matrix, and columns of the feature map. The red, green, and yellow filters represent different filters. A single filter creates columns of the feature map by moving over all input data in the time direction. The other filter creates columns of a different feature map. The size of the feature map is N × 1 after convolution with one filter. The value of N is related to the number of input data and the filter size. When the number of filters is M, the feature map size is N × M [40].
Each convolution layer consists of several convolution units whose weights are optimized using backpropagation algorithms [41].
The process of the convolution layer can be represented as in Equation (1).
x j l = f ( i M j x i l 1 × k i j l + b j l )
where x i l 1 is the input, k i j l is the weight of the filter (kernel), b j l is the bias, f(.) is the activation function and x j l is the output of the jth filter in the ith convolution layer [37].
After convolution, the resulting feature maps are fed into the pooling layer. This layer reduces the dimensionality of the feature maps by eliminating redundant information while preserving important details. By compressing the input feature map, the computational complexity of the model is reduced [4].

2.2. Long Short-Term Memory

RNN is efficient in modeling sequential data because it has the ability to remember the relationships between variable length inputs in its memory [13]. However, RNNs are subject to a vanishing gradient problem. To address this issue, a different RNN architecture called LSTM has been proposed [5]. LSTM networks overcome the vanishing gradient problem of RNNs by using gate units and memory cells [42]. LSTM networks have feedback connections different from standard feedforward neural networks. LSTM networks are well suited for classification and predictions based on time series data. Besides these advantages, LSTM networks also have some disadvantages. LSTM networks have more computational complexity than other neural network architectures [43]. Therefore, the training of LSTM networks can be slower.
LSTM networks possess the capability to retain or discard long-term information. This is achieved through the use of gates that function as a form of activation. The formulas used for the iterative update of the LSTM architecture are shown in Equations (2)–(6) [4,15]. The input gate decides the information of input to be stored in the cell state. C t ~ is the candidate state for new cells calculated with the tanh activation function. The new cell state C t   is created by combining the previous cell state and candidate cell state with the impact of the forget gate and input gate. The forget gate f t determines the forgotten information based on the input data x t , the cell state C t 1 , and the hidden state h t 1 from the previous moment. The activation function σ is used when performing this process. Finally, the output gate decides whether the information stored in memory will be the output [15]. The output gate o t determines the information in the cell state that generates the output. The activation function determines the decision to transfer information [42]. This approach eliminates long-term dependencies and ensures the continuous maintainability of datasets.
i t = σ ( W i h t 1 + U i x t + b i )
C t ~ = tan h ( W c h t 1 + U c x t + b c )
C t = C ~ t × i t + C t 1 × f t
o t = σ ( W o h t 1 + U o x t + b o )
h t = o t × tan h ( C t )
where W i , W c , W o , U i , U c , and U o are the weight matrices, and b i , b c , and b o are the bias vectors.

2.3. The Hybrid Deep Learning Model

The hybrid deep learning model for predicting electrical energy demand using a CNN-LSTM hybrid model includes a series connection of CNN and LSTM models. This hybrid approach can discover complicated features among variables and store irregular trends for electricity demand forecasting. The hybrid CNN-LSTM model utilizes the convolution layer of the CNN to extract high-level features of the input data and preserve relationships between different variables. It then employs the LSTM layer to model time information and complex energy consumption trends using the extracted features [5].
The first block of the hybrid deep learning model is a CNN. The CNN contains an input layer, convolution layers, pooling layers, and a flatten layer that transfers features to the LSTM layer. Typically, the CNN includes layers where multiple convolutions are executed to obtain significant features from the input variables. The convolution layer conducts convolution and activation operations using input variables. In this way, it creates a feature map. After the convolution is completed, the pooling layer uses the obtained feature maps as input. This layer reduces the size of feature maps and computational complexity by removing unnecessary features while preserving essential information [33]. The LSTM network, the second block of the CNN-LSTM hybrid model, stores time information about important features of electricity demand obtained by the CNN. The CNN and LSTM blocks are connected with a flatten layer to enable the LSTM network to process the data. To address the common issue of overfitting in deep neural networks, the model employs dropout [40]. The last layer of the CNN-LSTM hybrid model is the fully connected layer. The fully connected layer is used to connect neighbor layers by integrating features to obtain the linear output as a result of regression problems [4].
There are many hyperparameters that affect the model in deep learning. In deep learning applications, since processing all the data in the dataset at once is time-consuming and memory intensive, the dataset is divided into small groups, and the learning process is performed on these selected mini-batches. It is acknowledged that choosing a large mini-batch size reduces the training time of deep learning models. However, larger mini-batch sizes have worse generalization ability. At the expense of higher training time, small batch sizes have the advantage of offering better generalization [44]. The optimal value of the mini-batch should be determined to be neither too small nor too large. The value of the learning rate is also important for the performance of the model. While higher learning rates cause the system to diverge in terms of the objective function, lower values cause long learning times, as they progress in small steps [45]. As the most appropriate weights are calculated step by step in the solutions of DNN, the performance is low in the first epochs, and the success increases as the number of epochs increases. However, when a certain number of epochs is reached, the learning speed of the model decreases extremely. It is for this reason that choosing the optimal number of epochs is important for the model. Dropout is a regularization technique that drops certain nodes in the network by adding noise in the data to avoid overfitting the network to the data [46].
The structure of the proposed model to estimate electrical energy demand is shown in Figure 3.
There are two convolution layers in the CNN block of the hybrid deep learning model, where convolution is performed with the help of the kernel filter. The first convolution layer reads the input vectors and transfers their sequences onto the feature maps. The second convolution layer is operated for intensifying the features obtained from the first layer [14].

3. Proposed Hybrid Deep Learning Model

The data collected for electrical energy demand forecasting and the performance of the proposed hybrid deep learning model are described in the following sections.

3.1. Data Collection and Proposed Hybrid Deep Learning Model Structure

Electrical energy consumption data for a province in Türkiye for the 5 years between January 2017 and December 2021 were obtained from an electricity distribution company. The meteorological data to be used as features for forecasting demand were obtained from the Turkish State Meteorological Service. The meteorological data included were temperature, pressure, humidity, wind speed, solar radiation, intensity of solar irradiance, and sunshine duration with an hourly frequency between January 2017 and December 2021. There are 13 inputs and one output in the dataset as shown in Table 2. The type of time information is integer numeric data. The type of weather information and output values is real numeric data. Linear interpolation was used in the pre-processing of the dataset to fill one hour of missing data, but data that could not be obtained over a longer period were excluded from the dataset [47].
The model was trained using data from the first four years (from January 2017 to December 2020). The 11 months (from January 2021 to November 2021) of the 5th year were used as a test dataset. The last month (December 2021) of 2021 was used as unseen data to evaluate the performance of the proposed hybrid deep learning model in predicting future electrical energy demand.

3.2. The Results of the Proposed Hybrid Deep Learning Model

The results of experiments are evaluated with the methods of MAPE, MAE, RMSE, and R 2 . The mathematical formulas of performance metrics are given in Equations (7)–(10).
M A P E = 1 n i = 1 n y ^ i y i y i × 100 %
M A E = 1 n i = 1 n y ^ i y i
R M S E = i = 1 n ( y ^ i y i ) 2 n
R 2 = 1 i = 1 n ( y ^ i y i ) 2 ( y i y i ¯ ) 2
where n is the number of data points, y ^ i   is the forecasted load, and y i is the actual load. The decrease in MAPE, MAE and RMSE values and the R 2 value approaching 1 indicate that the model has a better performance than other models.
MATLAB R2022 was used for the proposed hybrid deep learning model and LSTM model development. Experiments were performed using different hyperparameter values in the proposed hybrid deep learning model. Table 3 shows the best experimental results obtained by different numbers of neurons and hyperparameter values of the hybrid model. According to the performance metrics of the different experiments, Experiment_10 has minimum RMSE (~24.95), minimum MAE (~19.32), and maximum R 2 (~0.86) values. The MAPE value of Experiment_9 is lower than Experiment_10, but Experiment_9 has higher RMSE, MAE, and lower R 2 values.
The LSTM model was also studied for different neurons and hyper parameters on the same dataset. The results of the LSTM model are shown in Table 4. According to the results, Experiment_10 has minimum RMSE (~30.38), minimum MAE (~23.49), and maximum R 2 (~0.81) values. Although the MAPE value of Experiment_2 is lower than Experiment_10, Experiment_2 has higher RMSE, MAE, and lower R 2 values.
To test the future performance of the proposed hybrid deep learning model and LSTM model, additional experiments were performed on the data not used for training or testing which are called unseen data. Table 5 includes the comparison of the performance metrics of the developed models with the test data and unseen data. According to the comparison of the performance metrics in Table 5, it can be seen that the proposed hybrid deep learning model gives even better results than the LSTM model in both cases.
The forecasting performance of the developed hybrid deep learning model and the LSTM model is shown in Figure 4 and Figure 5. The fitted line graphics of the proposed hybrid deep learning model with a R 2 value of 0.8599 and the LSTM model with 0.8086 for test data are shown, respectively, in Figure 4a,b. When Figure 4a,b are compared, it is seen that the predicted values and actual values in Figure 4a are more regularly distributed around the regression line. The fitted line graphics of the proposed hybrid deep learning model with an R 2   value of 0.9244 and the LSTM model with 0.8721 for unseen data are shown, respectively, in Figure 5a,b. When Figure 5a,b are compared, it is seen that the predicted values and actual values in Figure 5a are more regularly distributed around the regression line. When Figure 4 and Figure 5 are examined separately, it is seen that the CNN-LSTM hybrid deep learning model makes more accurate predictions.
Electrical energy demand forecasts obtained with the proposed hybrid deep learning model were compared with the actual electrical energy consumption data. Eleven-month forecasts with an hourly frequency obtained from the test data are shown in Figure 6.
The data for December 2021 were separated from the dataset as unseen data. The electrical energy demand forecast obtained for December was compared with the actual electrical energy consumption. The prediction results obtained from the proposed hybrid deep learning model and actual electrical energy consumption data are shown in Figure 7.

4. Conclusions

Estimating electricity demand has become an important issue in planning electrical energy generation in line with the global increase in electricity consumption and the predictions of major organizations regarding the increase in future electrical energy consumption. In particular, increased energy consumption leads to the depletion of existing energy resources and air pollution caused by electricity generation based on fossil fuels. As a result, consumers are increasingly turning to renewable energy. Estimating the electricity demand is crucial for planning renewable energy sources as it increases efficiency and reliability. It is important to have prior knowledge of the electricity demand to plan resources effectively. The energy strategies of Türkiye aim to ensure sustainable energy supply by diversifying resources and increasing energy efficiency. This study is focused on estimating the electrical energy demand of sustainable cities to plan renewable energy sources that will provide the energy requirements. A hybrid deep learning model combining CNN and LSTM models was proposed to estimate the future electricity demand of a city in Türkiye. CNNs are a powerful tool for selecting features while the LSTM model is a good deep-learning model for longer-term prediction of electrical energy demands. In the literature, short-term forecasting has generally been carried out using hourly data. This study presents a medium-term forecast using hourly electricity consumption and weather data. The results show that the medium-term electricity demand forecast which was obtained with the proposed hybrid model can be used in the planning of production in existing electricity generation facilities and new facilities to be established. Therefore, with the forecasting, the installation of facilities that will produce an excess of electricity can be prevented. Thus, savings can be achieved in the industry from installation costs, operating costs, and storage costs.
The challenge of working with a large dataset was revealed when obtaining and organizing hourly weather parameters and electricity energy demand data for a city. However, the hourly frequency of the data is advantageous to provide a more accurate forecast of future electricity demand.
The proposed hybrid deep learning model was compared with the LSTM model. When the performance metrics for the test data were examined, the best LSTM model had values of 30.38 RMSE, 7.30 MAPE, 23.49 MAE, and 0.81 R 2 , and the best CNN-LSTM model had values of 24.95 RMSE, 6.05 MAPE, 19.32 MAE, and 0.86 R 2 . When the performance metrics for the unseen data were examined, the LSTM model had values of 23.47 RMSE, 5.59 MAPE, 18.46 MAE, and 0.87 R 2 , and the CNN-LSTM model had values of 15.28 RMSE, 3.35 MAPE, 11.67 MAE, and 0.92 R 2 . The results demonstrate that the proposed hybrid model outperforms the LSTM model in terms of MAE, RMSE, MAPE, and R 2 values. Therefore, the proposed hybrid deep learning model can be used to estimate the future electrical energy demand of sustainable cities with greater accuracy. The study was conducted for a sample city, but the performance of the hybrid model was measured with data not used in training; it was seen that it could predict the electrical energy demand for different cities and different feature values of various sizes.
A hybrid deep learning model can be developed to make long-term forecasts in future studies. This would enable more accurate and comprehensive planning for providing the entire city’s electrical energy demand from renewable energy sources.

Author Contributions

Conceptualization, G.Y.D.; Methodology, G.Y.D.; Data curation, G.Y.D.; Writing—original draft, G.Y.D., A.A. and N.Ö.; Writing—review & editing, G.Y.D., A.A. and N.Ö.; Visualization, A.A.; Supervision, N.Ö. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Data sharing is not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Enerdata. World Energy & Climate Statistics Yearbook. 2023. Available online: https://yearbook.enerdata.net/electricity/electricity-domestic-consumption-data.html (accessed on 6 March 2024).
  2. International Energy Agency. Electricity Report—Analysis and Forecast to 2026. 2024. Available online: https://www.iea.org/reports/electricity-2024 (accessed on 6 March 2024).
  3. Turkish Electricity Transmission Corporation. 10 Yıllık Talep Tahminleri Raporu. 2023. Available online: https://www.teias.gov.tr/ilgili-raporlar (accessed on 6 March 2024).
  4. Somu, N.; Raman, G.; Ramamritham, K. A deep learning framework for building energy consumption forecast. Renew. Sustain. Energy Rev. 2021, 137, 110591. [Google Scholar] [CrossRef]
  5. Kim, T.Y.; Cho, S.B. Particle Swarm Optimization-based CNN-LSTM Networks for Forecasting Energy Consumption. In Proceedings of the IEEE Congress on Evolutionary Computation (CEC), Wellington, New Zealand, 10–13 June 2019; pp. 1510–1516. [Google Scholar] [CrossRef]
  6. Ahmad, T.; Chen, H. Nonlinear autoregressive and random forest approaches to forecasting electricity load for utility energy management systems. Sustain. Cities Soc. 2019, 45, 460–473. [Google Scholar] [CrossRef]
  7. Al-Hamadi, H.M.; Soliman, S.A. Long-term/mid-term electric load forecasting based on short-term correlation and annual growth. Electr. Power Syst. Res. 2005, 74, 353–361. [Google Scholar] [CrossRef]
  8. Apadula, F.; Bassini, A.; Elli, A.; Scapin, S. Relationships between meteorological variables and monthly electricity demand. Appl. Energy 2012, 98, 346–356. [Google Scholar] [CrossRef]
  9. Javanmard, M.E.; Ghaderi, S.F. Energy demand forecasting in seven sectors by an optimization model based on machine learning algorithms. Sustain. Cities Soc. 2023, 95, 104623. [Google Scholar] [CrossRef]
  10. Ayoub, N.; Musharavati, F.; Pokharel, S.; Gabbar, H.A. ANN Model for Energy Demand and Supply Forecasting in a Hybrid Energy Supply System. In Proceedings of the 6th IEEE International Conference on Smart Energy Grid Engineering, Oshawa, ON, Canada, 12–15 August 2018; pp. 25–30. [Google Scholar]
  11. Garcıa-Ascanio, C.; Mate, C. Electric power demand forecasting using interval time series: A comparison between VAR and iMLP. Energy Policy 2010, 38, 715–725. [Google Scholar] [CrossRef]
  12. Yuan, J.; Farnham, C.; Azuma, C.; Emura, K. Predictive artificial neural network models to forecast the seasonal hourly electricity consumption for a University Campus. Sustain. Cities Soc. 2018, 42, 82–92. [Google Scholar] [CrossRef]
  13. He, W. Load Forecasting via Deep Neural Networks. Procedia Comput. Sci. 2017, 122, 308–314. [Google Scholar] [CrossRef]
  14. Rafi, S.H.; 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]
  15. Ren, C.; Jia, L.; Wang, Z. A CNN-LSTM Hybrid Model Based Short-term Power Load Forecasting. In Proceedings of the Power System and Green Energy Conference (PSGEC), Shanghai, China, 20–22 August 2021; pp. 182–186. [Google Scholar] [CrossRef]
  16. Yazici, I.; Beyca, O.F.; Delen, D. Deep-learning-based short-term electricity load forecasting: A real case Application. Eng. Appl. Artif. Intell. 2022, 109, 104645. [Google Scholar] [CrossRef]
  17. Pegalajar, M.C.; Ruiz, L.G.B.; Cuéllar, M.P.; Rueda, R. Analysis and enhanced prediction of the Spanish Electricity Network through Big Data and Machine Learning Techniques. Int. J. Approx. Reason. 2021, 133, 48–59. [Google Scholar] [CrossRef]
  18. Ahmadian, A.S. Numerical Modeling and Simulation. In Numerical Models for Submerged Breakwaters; Ahmadian, A.S., Ed.; Elsevier: Amsterdam, The Netherlands, 2016; pp. 109–126. [Google Scholar] [CrossRef]
  19. Fu, Y.; Downey, A.R.J.; Yuan, L.; Zhang, T.; Pratt, A.; Balogun, Y. Machine learning algorithms for defect detection in metal laser-based additive manufacturing: A review. J. Manuf. Process. 2022, 75, 693–710. [Google Scholar] [CrossRef]
  20. Li, Z.; Liu, F.; Yang, W.; Peng, S.; Zhou, J. A Survey of Convolutional Neural Networks: Analysis, Applications, and Prospects. IEEE Trans. Neural Netw. Learn. Syst. 2022, 33, 6999–7019. [Google Scholar] [CrossRef] [PubMed]
  21. Graves, A. Long Short-Term Memory. In Supervised Sequence Labelling with Recurrent Neural Networks; Graves, A., Ed.; Springer: Berlin/Heidelberg, Germany, 2012; pp. 37–45. [Google Scholar] [CrossRef]
  22. Ahmad, A.S.; Hassan, M.Y.; Abdullah, M.P.; Rahman, H.A.; Hussin, F.; Abdullah, H.; Saidur, R. A review on applications of ANN and SVM for building electrical energy consumption forecasting. Renew. Sustain. Energy Rev. 2014, 33, 102–109. [Google Scholar] [CrossRef]
  23. Huang, J.; Srinivasan, D.; Zhang, D. Electricity Demand Forecasting Using HWT model with Fourfold Seasonality. In Proceedings of the International Conference on Control, Artificial Intelligence, Robotics & Optimization, Prague, Czech Republic, 20–22 May 2017; pp. 254–258. [Google Scholar] [CrossRef]
  24. Fan, G.; Peng, L.; Hong, W. Short term load forecasting based on phase space reconstruction algorithm and bi-square kernel regression model. Appl. Energy 2018, 224, 13–33. [Google Scholar] [CrossRef]
  25. Elamin, N.; Fukushige, M. Modeling and forecasting hourly electricity demand by SARIMAX with interactions. Energy 2018, 165, 257–268. [Google Scholar] [CrossRef]
  26. Çevik, H.H.; Harmancı, H.; Çunkaç, M. Forecasting Hourly Electricity Demand Using a Hybrid Method. In Proceedings of the International Conference on Consumer Electronics and Devices, London, UK, 14–17 July 2017; pp. 8–12. [Google Scholar] [CrossRef]
  27. Behm, C.; Nolting, L.; Praktiknjo, A. How to model European electricity load profiles using artificial neural networks. Appl. Energy 2020, 277, 115564. [Google Scholar] [CrossRef]
  28. Liu, J.; Li, C. The Short-Term Power Load Forecasting Based on Sperm Whale Algorithm and Wavelet Least Square Support Vector Machine with DWT-IR for Feature Selection. Sustainability 2017, 9, 1188. [Google Scholar] [CrossRef]
  29. Shaikh, H.A.; Rahman, M.A.; Zubair, A. Electric Load Forecasting with Hourly Precision Using Long Short-Term Memory Networks. In Proceedings of the International Conference on Electrical, Computer and Communication Engineering (ECCE), Cox’sBazar, Bangladesh, 7–9 February 2019. [Google Scholar] [CrossRef]
  30. Mujeeb, S.; Javaid, N.; Ilahi, M.; Wadud, Z.; Ishmanov, F.; Afzal, M.K. Deep Long Short-Term Memory: A New Price and Load Forecasting Scheme for Big Data in Smart Cities. Sustainability 2019, 11, 987. [Google Scholar] [CrossRef]
  31. Mounir, N.; Ouadi, H.; Jrhilifa, I. Short-term electric load forecasting using an EMD-BI-LSTM approach for smart grid energy management system. Energy Build. 2023, 288, 113022. [Google Scholar] [CrossRef]
  32. Le, T.; Vo, M.T.; Vo, B.; Hwang, E.; Rho, S.; Baik, S.W. Improving Electric Energy Consumption Prediction Using CNN and Bi-LSTM. Appl. Sci. 2019, 9, 4237. [Google Scholar] [CrossRef]
  33. Kim, T.Y.; Cho, S.B. Predicting residential energy consumption using CNN-LSTM neural networks. Energy 2019, 182, 72–81. [Google Scholar] [CrossRef]
  34. Li, Y.; Tong, Z.; Tong, S.; Westerdahl, D. A data-driven interval forecasting model for building energy prediction using attention-based LSTM and fuzzy information granulation. Sustain. Cities Soc. 2022, 76, 103481. [Google Scholar] [CrossRef]
  35. Athiwaratkun, B.; Kang, K. Feature Representation in Convolutional Neural Networks. arXiv 2015, arXiv:1507.02313. [Google Scholar]
  36. Kizilkan, Z.; Sivri, M.; Yazici, İ.; Beyca, O. Neural Networks and Deep Learning. In Business Analytics for Professionals; Ustundag, A., Cevikcan, E., Beyca, O.F., Eds.; Springer: Cham, Switzerland, 2022; pp. 127–151. [Google Scholar] [CrossRef]
  37. Niu, J.; Liu, C.; Zhang, L.; Liao, Y. Remaining Useful Life Prediction of Machining Tools by 1D-CNN LSTM Network. In Proceedings of the IEEE Symposium Series on Computational Intelligence (SSCI), Xiamen, China, 6–9 December 2019; pp. 1056–1063. [Google Scholar] [CrossRef]
  38. Lee, K.B.; Cheon, S.; Kim, C.O. A Convolutional Neural Network for Fault Classification and Diagnosis in Semiconductor Manufacturing Processes. IEEE Trans. Semicond. Manuf. 2017, 30, 135–142. [Google Scholar] [CrossRef]
  39. Fan, C.; Wang, J.; Gang, W.; Li, S. Assessment of deep recurrent neural network based strategies for short-term building energy predictions. Appl. Energy 2019, 236, 700–710. [Google Scholar] [CrossRef]
  40. Li, T.; Hua, M.; Wu, X. A Hybrid CNN-LSTM Model for Forecasting Particulate Matter (PM2.5). IEEE Access 2020, 8, 26933–26940. [Google Scholar] [CrossRef]
  41. Kiranyaz, S.; Avci, O.; Abdeljaber, O.; Ince, T.; Gabbouj, M.; Inman, D.J. 1D convolutional neural networks and applications: A survey. Mech. Syst. Signal Process. 2021, 151, 107398. [Google Scholar] [CrossRef]
  42. Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
  43. Gers, F.A.; Schmidhuber, J. Recurrent nets that time and count. In Proceedings of the IEEE-INNS-ENNS International Joint Conference on Neural Networks, Como, Italy, 27 July 2000; pp. 189–194. [Google Scholar] [CrossRef]
  44. Qian, X.; Klabjan, D. The Impact of the Mini-batch Size on the Variance of Gradients in Stochastic Gradient Descent. arXiv 2020, arXiv:2004.13146. [Google Scholar] [CrossRef]
  45. Zeiler, M.D. ADADELTA: An Adaptive Learning Rate Method. arXiv 2012, arXiv:1212.5701. [Google Scholar] [CrossRef]
  46. Shah, D.; Campbell, W.; Zulkernine, F.H. A Comparative Study of LSTM and DNN for Stock Market Forecasting. In Proceedings of the IEEE International Conference on Big Data, Seattle, WA, USA, 10–13 December 2018. [Google Scholar] [CrossRef]
  47. Utama, C.; Troitzsch, S.; Thakur, J. Demand-side flexibility and demand-side bidding for flexible loads in air-conditioned buildings. Appl. Energy 2021, 285, 116418. [Google Scholar] [CrossRef]
Figure 1. General framework of electrical energy demand forecasting model.
Figure 1. General framework of electrical energy demand forecasting model.
Sustainability 16 06503 g001
Figure 2. One dimensional convolutional neural network.
Figure 2. One dimensional convolutional neural network.
Sustainability 16 06503 g002
Figure 3. The structure of the proposed hybrid deep learning model.
Figure 3. The structure of the proposed hybrid deep learning model.
Sustainability 16 06503 g003
Figure 4. Fitted line graphics of test data.
Figure 4. Fitted line graphics of test data.
Sustainability 16 06503 g004
Figure 5. Fitted line graphics of unseen data.
Figure 5. Fitted line graphics of unseen data.
Sustainability 16 06503 g005
Figure 6. Comparison of actual and forecasted electrical energy demand with proposed hybrid deep learning model for test data.
Figure 6. Comparison of actual and forecasted electrical energy demand with proposed hybrid deep learning model for test data.
Sustainability 16 06503 g006
Figure 7. Comparison of actual and forecasted electrical energy demand with proposed hybrid deep learning model for unseen data.
Figure 7. Comparison of actual and forecasted electrical energy demand with proposed hybrid deep learning model for unseen data.
Sustainability 16 06503 g007
Table 1. A summary of the literature.
Table 1. A summary of the literature.
AuthorsTechniquesDatasetForecast TermMetrics
Al-Hamadi and Soliman [7]LRHourly load data in Canada for the years 1994 and 1995Long
Medium
MAE
Garcia-Ascanio and Mate [11]MLP, VARMHourly electricity consumption in Spain in the years 2000–2007Short MediumRMSE
Apadula et al. [8]MLRMonthly electricity demand and weather variables in the years 1994–2009MediumMAPE
Çevik and Harmancı [26]ANN-PSOHourly load consumption data for four yearsShortMAPE
He [13]LR, SVM, DNN, CNN, RNNHourly load and weather data of a city in North China from February 2000 to December 2012ShortMAPE
MAE
Liu and Li [28]SVM, SWAPower load data from 21 March 2015 to 30 April 2016 ShortMAPE
RMSE
Huang et al. [23]HWT Exponential SmoothingHalf-hourly electricity consumption from 2009 to 2013ShortMAPE
Yuan et al. [12]ANN-LMAHourly electricity consumption and weather data from April 2015 to March 2016Medium R 2
RMSE
Ayoub et al. [10]ANNHourly electrical energy demand data in the year 2012ShortMAPE
Elamin and Fukushige [25]SARIMAXHourly electricity generation data from January 2012 to December 2015MediumMAE
MAPE
RMSE
Fan et al. [24]PSR, BSKHourly and half-hourly electrical load data ShortMAE
MAPE
RMSE
Shaikh et al. [29]LSTMHourly electrical energy demand in the years 2011–2017ShortMAE
MAPE
RMSE
Le et al. [32]CNN with Bi-LSTMMinutely, hourly, daily, and weekly electrical energy consumption from a house in France between December 2006 and November 2010Short Medium LongRMSE
MAPE
MAE
MSE
Mujeeb et al. [30]LSTMHourly consumption of New York City from January 2006 to October 2018ShortMAE
RMSE
Ahmad and Chen [6]NARM, LMSR, Random Forest The energy consumption and weather data between January 2009 and December 2009Long MediumMAPE
MSE
Kim and Cho [33]CNN-LSTM, LR, Random Forest, Decision Tree, MLPPer-minute actual power consumption from a household in FranceShort
Medium
RMSE
MAPE
MAE
MSE
Behm et al. [27]ANN Annual peak load and weather data for Germany from 2006 to 2015LongMAPE
Rafi et al. [14]LSTM, RBFNN, XGBoost, CNN- LSTM Half-hourly electrical load data between January 2014 and December 2019Short R 2
RMSE
MAE
MAPE
Ren et al. [15]LSTM, CNN, ARIMA, Backpropagation, CNN-LSTMElectrical load data of a power station in Shanghai between June 2015 and May 2017ShortMAPE
RMSE
Pegalajar et al. [17]LR, Regression Trees, GBR, Random Forest, MLP, LSTM, GRU- NN, JNNHourly data of the Spanish Electricity Network from 2007 to 2019Medium R 2
RMSE
MAE
MAPE
Yazici et al. [16]CNN-LSTM Hourly electrical load and temperature data for Istanbul between 2015 and 2017ShortMAPE
MSE
Javanmard and Ghaderi [9]AR, ARIMA, SARIMA, SARIMAX, ANN, LSTMElectrical load data from energy consuming sectors in Iran from 1990 to 2018 LongMAPE
Mounir et al. [31]EMD and Bi-LSTMElectricity consumption and weather data with a frequency of 15 minShortMAPE
R 2
MAE: mean absolute error, MAPE: mean absolute percent error, RMSE: root mean square error, MSE: root mean square error, R2: coefficient of determination.
Table 2. Features and output descriptions.
Table 2. Features and output descriptions.
FeaturesInterval Values
Time
Information
Day1–31
Month1–12
Year2017–2021
Hour0–23
Weather
Information
Average Temperature (°C)−11.10–41.90
Maximum Temperature (°C)−10.10–42.40
Minimum Temperature (°C)−11.50–40.80
Pressure (hPA)884.20–921.40
Humidity (%)5.00–98.00
Average Wind Speed (m/s)0.00–20.70
Sunshine Duration (h)0.00–1.00
Intensity   of   Solar   Irradiance   ( c a l / c m 2 ) 0.00–93.21
Solar   Radiation   ( W / m 2 ) 0.00–1076.10
OutputElectrical Energy Consumption (MWh)160.66–504.87
Table 3. Performance metrics for different hyperparameter and neuron numbers in the proposed hybrid deep learning model.
Table 3. Performance metrics for different hyperparameter and neuron numbers in the proposed hybrid deep learning model.
LayersParametersTest Data
Performance Metric
Experiment No.Conv.LSTMDropoutMini-
Batch
EpochLearning RateRMSEMAPEMAE R 2
1646464320.50.25256500.00125.91946.599620.60780.8469
2323232320.50.5256500.00126.70376.779521.33070.8407
3646432320.50.5256500.00127.59266.864721.71240.8339
4643232320.50.564500.00132.43258.437626.06910.8310
5643232320.50.5128500.00128.34426.932222.34120.8346
6646432320.50.25256500.00130.51577.877024.12570.8326
7646464320.50.255121000.00134.19089.369328.40630.8354
81286464320.50.5256500.00126.23366.531820.76220.8394
912864128640.50.25256500.00125.79916.030020.22420.8573
106432128640.50.25256500.00124.94876.053019.31790.8599
Table 4. Performance metrics for different hyper parameter and neuron numbers in the LSTM model.
Table 4. Performance metrics for different hyper parameter and neuron numbers in the LSTM model.
LayersParametersTest Data
Performance Metric
Experiment No.LSTMDropoutMini-
Batch
EpochLearning RateRMSEMAPEMAE R 2
164640.50.5512500.0137.58579.568330.61630.7246
2128640.50.25512500.00130.07897.141627.92320.7903
364320.250.5512500.00137.97969.547730.74570.7311
464640.250.5256500.00132.93828.102226.33170.7542
564640.50.5256500.00135.25848.809728.43410.7430
664640.50.52561000.00131.44227.854525.36030.8067
764640.50.52561000.0133.52378.578727.58040.7477
864640.50.5256500.0148.458213.933342.15710.8010
9128640.50.5512500.00132.97978.328826.60890.8016
10128640.50.252561000.00130.38307.297723.48770.8086
Table 5. Comparison of LSTM model and proposed hybrid deep learning model with performance metrics.
Table 5. Comparison of LSTM model and proposed hybrid deep learning model with performance metrics.
Test Data
Performance Metric
Unseen Data
Performance Metric
MODELRMSEMAPEMAE R 2 RMSEMAPEMAE R 2
LSTM30.38307.297723.48770.808623.47025.587118.45580.8721
CNN-LSTM24.94876.053019.31790.859915.27543.352611.66590.9244
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

Yıldız Doğan, G.; Aksoy, A.; Öztürk, N. A Hybrid Deep Learning Model to Estimate the Future Electricity Demand of Sustainable Cities. Sustainability 2024, 16, 6503. https://doi.org/10.3390/su16156503

AMA Style

Yıldız Doğan G, Aksoy A, Öztürk N. A Hybrid Deep Learning Model to Estimate the Future Electricity Demand of Sustainable Cities. Sustainability. 2024; 16(15):6503. https://doi.org/10.3390/su16156503

Chicago/Turabian Style

Yıldız Doğan, Gülay, Aslı Aksoy, and Nursel Öztürk. 2024. "A Hybrid Deep Learning Model to Estimate the Future Electricity Demand of Sustainable Cities" Sustainability 16, no. 15: 6503. https://doi.org/10.3390/su16156503

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