Abstract

With the installation of solar panels around the world and the permanent fluctuation of climatic factors, it is, therefore, important to provide the necessary energy in the electrical network in order to satisfy the electrical demand at all times for smart grid applications. This study first presents a comprehensive and comparative review of existing deep learning methods used for smart grid applications such as solar photovoltaic (PV) generation forecasting and power consumption forecasting. In this work, electrical consumption forecasting is long term and will consider smart meter data and socioeconomic and demographic data. Photovoltaic power generation forecasting is short term by considering climatic data such as solar irradiance, temperature, and humidity. Moreover, we have proposed a novel hybrid deep learning method based on multilayer perceptron (MLP), long short-term memory (LSTM), and genetic algorithm (GA). We then simulated all the deep learning methods on a climate and electricity consumption dataset for the city of Douala. Electrical consumption data are collected from smart meters installed at consumers in Douala. Climate data are collected at the climate management center in the city of Douala. The results obtained show the outperformance of the proposed optimized method based on deep learning in the both electrical consumption and PV power generation forecasting and its superiority compared to basic methods of deep learning such as support vector machine (SVM), MLP, recurrent neural network (RNN), and random forest algorithm (RFA).

1. Introduction

In recent years, the electrical network benefited technical developments both in the electrical energy generation and also in the transmission and distribution side [1]. In addition, advances in the industrial and social sector have enormously increased electricity consumption. In this case, the international energy agency projects a 50% increase of electricity consumption in 2050. The overall consumption of commercial and residential infrastructure will increase by 65% between 2018 and 2050. Global CO2 emissions will double in 2050 while investments in electricity network infrastructure are estimated at 6 billion in 2030 [2]. To face these challenges, it is now necessary to use renewable sources and new information and communication technologies which make it possible to revolutionize electrical consumption using real-time management techniques in the 21st century [3]. Renewable sources such as solar and wind are also used today by end consumers, which leads to variability in the electrical network, hence the need for a more flexible system in order to balance electrical demand to electrical generation at all times.

With the integration of digital technologies, a large amount of data is produced through digital equipment, sensors, phase measurement units (PMUs), smart meters, and advanced metering infrastructure (AMI). The processing and analysis of these data represent not only the new challenge but also an opportunity for this century [4]. The concept of smart grid and the application of artificial intelligence methods based on deep learning for data analysis will help to face these challenges [5]. The principle of smart grid is based on solving energy problems by providing a two-way flow of energy and information between consumers and energy producers [6]. However, real-time data management for decision making still represents a major challenge [7]. This is why energy distributors worked in recent years to install a large number of smart meters in order to use these data for effective demand management. To date, the data are collected monthly by the meters, but with the implementation of the AMI, the meters record the data every 15–30 minutes; these data can reach the terabit [8]. The smart meters being installed throughout the world in recent years will thus allow the migration to the smart grid. Compared to the conventional network, the smart grid provides several advantages, in particular, automatic restoration, better integration of renewable energies, precise knowledge of network situation through smart meter deployment, and data analysis by deep learning and machine learning [9].

Similarly, smart meters now provide hourly and monthly readings of electricity consumption and thus collect a large amount of data [10]. Analyzing such data can help to readjust energy consumption optimization strategies by improving the accuracy of predictive models to make them more reliable [11]. The foundations of smart grids allow automatic communication with the various electrical components in order to know the future behavior of each section using intelligent computing techniques in which deep learning techniques present a wider deployment in the literature [12, 13].

However, simple machine learning models such as artificial neural network (ANN) and SVM have many limits, which explains their low use for complex problems in electrical power systems. Moreover, these models are inefficient for high-dimensional representations with high complexities. Moreover, these models cannot be improved with large amounts of data [14]. To overcome these shortcomings, learning paradigms have migrated to deep learning to take into account this abundance of data with the extraction of hierarchical components using its strong learning potential. With the complexity of smart grids, the need for deep learning is observed in the use of important data from smart meters and Internet of Things (IoT) devices [15]. For this purpose, different deep learning techniques have been reviewed and revised in [1618] for applications in the smart grid. Additional studies and research have been done in the implementation of machine learning on renewable energies, energy storage, and the smart grid. These new algorithms ensuring reliable data will improve the distribution of information between machine learning and systems. It is hoped that unsupervised learning and reinforcement learning will have a central role in the energy sector but will depend on major fields in data science such as the analysis of smart grid data [19]. These models allow having an accurate forecasting which means a prediction of the future conditions based on a large amount of digital data with the aim to make better decisions about production and consumption.

In the literature, the deep learning models are classified into individual models and hybrid models.

2.1. Individual Deep Learning Models

The individual models consider a single artificial intelligence technique and do not include optimization algorithms. In occurrence, these methods basically include multilayer perceptron (MLP), convolutional neural network (CNN), deep neural network (DNN), recurrent neural network (RNN), shallow neural network (SNN), graph neural network (GNN), SVM, LSTM, auto encoder (AE), generative adversarial network (GAN), restricted boltzmann machines (RBM), deep reinforcement learning (DRL), gated recurrent unit (GRU), generator network (GN), and capsule networks (CNs). Deep learning models have been further evaluated in [20] for multivariate probabilistic energy forecasting. ANNs have been implemented in [21] for solar PV forecasting. In this paper, some climatic factors are proposed to predict PV generation using real-time data from solar panels in Konya, Turkey. MATLAB software was used to train the model of the ANN through three learning algorithms, namely, Levenberg–Marquardt, Bayesian regularization, and scaled conjugate gradient. The Bayesian regularization test results gave a mean square error (MSE) of 0.00589 and a regression of 0.99999. By the Levenberg–Marquardt, the MSE and the regression are 869.15896 and 0.999642, respectively. By the scaled conjugate gradient, they obtain a MSE of 2357036.87842 and a regression of 0.6742. Similarly, a new ANN model has been developed in [22] for electricity demand forecasting enhanced by population-weighted mean temperature and the unemployment rate. In order to fit a function for the monthly oscillations, a linear function based on the weighted average temperature was created. Thus, average temperatures are used as input parameters. For this purpose, records of average temperature values for cities in Turkey were used as additional input data from January 2000 to November 2019. MSE coefficients were calculated for training, validation, and test, respectively, for 3.77%, 2.02%, and 1.95%.

In [23], the CNN was proposed for the identification of consumer sociodemographic information. The structure of the CNN model considers two factors, the first for the behavior of electricity consumers and the second for the number of training samples. In this article, the CNN is tested on the dataset from the Electricity Regulatory Commission of Ireland using Python software on a Core i7-4770MQ 2.410 GHz computer with 8.0 GB of RAM. This dataset contains smart meter data from 4232 residential consumers over 536 days in a 30 minute interval. For the smart meter data, 80% are used for training, the rest for model testing. The proposed method is compared with 7 other methods including SVM, biased guess (BG), manual feature selection (MF), LS, PS, SS, and CS. The results obtained show better accuracy than other models. In [24], a practical and efficient monitoring solution to estimate energy consumption has been proposed. The model adopted for this purpose is an approach based on the deep convolutional neural network (DCNN). The effectiveness of this technique is evaluated on a public dataset from the United Kingdom with an F1-score of 0.916. Similarly, a CNN architecture has been proposed in [25] for forecasting the production of renewable energies with a storage system. The authors in [26] presented a framework for short-term residential demand forecasting as well as a method based on deep neural network and iterative resblock (IRBDNN). Data acquisition collects measurement data from household smart meters. Data preprocessing enables data cleaning, data integration, and data transformation. The training model uses the IRBDNN for learning the correlation between consumption behaviors and the forecast of short-term electricity demand, allowing the learning of the nonlinear relationship between input and output values. In addition, an optimization step is included to improve the learnability of the proposed model. At the end, the proposed model can calculate the predicted values for each consumer. Real-world measurement data was used to evaluate the performance of the proposed model. Compared to existing models, the proposed approach presents a reduction of RMSE, MAE, and MAPE, respectively, from 20.00% to 3.89%, from 22.58% to 2.18%, and from 32.78% to 0.69%.

A deep network detection scheme was presented in [27] to deal with attacks on data integrity in AC power networks. The proposed method is based on deep reinforcement learning to avoid the problems on the dimensions that most conventional learning methods encounter. To improve the learning efficiency, the authors proposed the quantization of the observation space and the concept of the sliding window. This method is evaluated on the IEEE 9, 14, and 30 bus test networks. The initial state vector is determined using MATPOWER software. The performance of the proposed scheme is evaluated using the DAE, FAE, and DF indicators. Thus, the DAE of the continuous attack detection model is 0.0237, 0.0240, and 0.1249, respectively, for the IEEE 9, 14, and 30 bus networks. The DAE of the discontinuous attack detection model is 0.1357, 0.0490, and 1.4430, respectively, for IEEE 9, 14, and 30 bus networks.

An LSTM method was adopted in [28] to solve anomaly detection problems through consumer profiles based on their recent past consumptions. The proposed model is tested on a real dataset of 370 customers from 2011 to 2014. The training of the model is carried out from January to December 2014. Subsequently, the authors selected anomaly profiles representing 14% of the dataset for anomaly detection. The results obtained are evaluated in terms of accuracy and recall on the number of anomalies detected correctly. Similarly, the authors in [29] developed a DNN method using LSTM as a learning model to ensure accurate prediction of renewable energy generation. The input values of the neural architecture are irradiance, air temperature, panel temperature, wind speed, wind direction, and precipitation. The activation functions used in the forecasting process can be hyperbolic tangent functions and rectified linear unit (ReLU) functions. The simulation results give a MAE of 0.035 and a MSE of 0.0023. These results are better than those of MA and ARIMA methods.

2.2. Hybrid Deep Learning Models

Hybrid models are based on the original models and optimization techniques. In [30], a new hybrid model for short-term electricity demand forecasting has been proposed. This hybrid model is a framework that integrates a modified mutual information (MMI), the factored conditional restricted Boltzmann machine (FCRBM), and the genetic wind-driven optimization (GWDO). The MMI allows preprocessing and feature selection. FCRBM is a machine-based deep learning model for training and forecasting future electrical energy demand. The GWDO makes it possible to refine the adjustable parameters of the model. The accuracy of the proposed model is evaluated through historical data of hourly consumption in three electrical networks in the USA. In addition, the proposed model is compared with four other recent models including Bi-level, MI-ANN, AFC-ANN, and LSTM. In terms of accuracy, the proposed model exceeds the MI-ANN by 31.2%, the Bi-level by 17.3%, and the AFC by 4.7%. The execution time of the proposed model is 52s, on the other hand, that of the AFC-ANN is 58s, the Bi-level is 102s, and the LSTM is 63s.

A combined technique using LSTM and a learning transfer approach based on XCORR has been proposed in [31] for short-term electricity demand forecasting. The XCORR is applied between the data of the buildings to be estimated and the data of each building to be transferred. The LSTM is trained with standardized data from these buildings. Thus, the performance values of this model are obtained through the test data. A dataset of electricity demand of buildings of Bandırma Onyedi Eylu University with a resolution of 15 minutes was used to validate the proposed model. The accuracy of the model is evaluated using the RMSE, MAE, and MAPE with the respective values of 736.706, 352.176, and 8.145. In addition, this model has been compared with methods such as RFA, extreme gradient boosting (XGB), and light gradient boosting machine (LGBM), thus presenting better results.

To understand the effectiveness of different deep learning techniques, several architectures such as CNN, RNN, I-RNN, LSTM, and GRU have been studied in [32]. The CNN architecture consists of a number of convolutional layers, down sampling layers, and fully connected layers. The RNN is an extension of the feed-forward network (FFN) in which the output of a state is taken as input to the loop structure. The I-RNN is an extension of the RNN architecture in which the initialization of the weight matrix differs from the traditional RNN. LSTM is a variant of RNN with a gated architecture, thus capturing long-term time dependencies and avoiding gradient problems. LSTM blocks are memory cells with multiplicative adaptive gates such as input, output, and forget gates. GRU is similar to LSTM except that it has gate units to pass information between units. Thus, the authors, therefore, proposed a hybrid architecture based on the CNN-LSTM combination. The proposed technique makes it possible to characterize and classify disturbances on the quality of energy in the smart grid. To this end, simulations were conducted to propose this optimal deep learning architecture with specific network topologies. The CNN-LSTM architecture obtained an accuracy of 0.984 with a loss of 0.15. From these results, it appears that the hybrid model is better compared to other models implemented.

The authors in [33] proposed a novel cluster-based deep learning approach for short-term power consumption forecasting at distribution transformers. The first dataset contains 10 transformers while the second has 1000 transformers which make 24 million records. The performances of the proposed model are compared with the individual models. The precision evaluation indices are the RMSE and the MAPE. The performances of the models are evaluated using the training and execution time. For the first dataset, the values of RMSE, MAPE, training time, and execution time are, respectively, 2.6874 kWh, 15.9380%, 10.76 s, and 0.1070 s. For the second dataset, the values are, respectively, 21.2596 kWh, 7.2271%, 4644.82 s, and 4.57 s. In [34], a combined deep learning approach based on CNN and LSTM was proposed to detect injected measurement data in order to deal with fake data injection attacks. The proposed method consists of offline training based on measurement data and online detection. This dynamic detector can thus recognize the high-level time series characteristics of the attacks of the injected false data. An IEEE 39 bus network is used to test the fake injected data detection system. The simulation results show a precision between 0.8 and 1 for the detection of false data injected into the various compromised buses. Moreover, the authors in [35] proposed an LSTM-CNN model for short-term load forecasting. LSTM and GBR models have been adopted in [36] to assess the uncertainties in the prediction of short-term electrical demand. Data collected by the Eastern Slovakia Electricity Corporation were used to validate the consumption forecasting models. RMSE and MAPE coefficients were used to verify the performance of the models. The LSTM model presents a RMSE of 18.025 and a MAPE of 0.023, and the GBR model gives a RMSE of 17.42 and a MAPE of 0.023.

In [37], the authors proposed a method based on deep learning for the detection of false data cyber-attacks in a smart grid. To this end, to obtain the combined artificial feed-forward network (AFN) model, several techniques have been proposed, in particular, CNN, RNN, and LSTM. This method has been implemented on an IEEE 14 bus network for the identification of cyber-attacks. The results obtained show an improvement accuracy of 98.19% in the detection of false data. In [38], the authors presented an intrusion detection system for smart grid environments that uses Transmission Control Protocol (TCP) and Distributed Network Protocol 3 (DNP3). The proposed method is called MENSA, adopting a new GAN encoder architecture. For the detection of cyber-attacks by the DNP3 protocol, the MENSA has an accuracy of 0.994, a TPR of 0.983, a FPR of 0.003, and a F1-score of 0.983. For detection in the TCP protocol, the MENSA gives an accuracy of 0.964, a TPR of 0.730, a FPR of 0.019, and a F1-score of 0.730. These results demonstrate that the MENSA model outperforms other machine learning and deep learning methods. Other authors have hybridized neural networks with fuzzy logic to improve data classification. Thus, in [39], the authors proposed an ANFIS model for the prediction of solar photovoltaic energy under different climatic conditions. Moreover, the authors in [40] developed a Mandani fuzzy logic system for predicting renewable energy production uncertainties by considering a variety of climate changes depending on the season.

In [41], the authors developed a hybrid model for the prediction of household electricity consumption in a smart grid system. Thus, a combined Grey-ANFIS-PSO model was built based on data from meters installed in households in order to improve the forecast of electrical energy consumption. Household electricity consumption data in Cameroon over a period of 24 years were used to validate the model. The accuracy of the model obtained gave an RMSE of 0.20158 and a MAPE of 0.6291%. These results are better in comparison with single methods such as SVM and ANN. In addition, deep learning tools have also been applied for the detection and classification of fault, in particular, by fuzzy logic [42], by neural networks [43, 44], by the Kalman filter [45, 46], by the wavelet transform and the SVM [47], by the technique of decision tree and variational decomposition mode [48], by machine learning [4951], by the method of reflection waves [52], and by the combination of wavelet singular entropy theory and fuzzy logic [53].

Tables 1 and 2, respectively, summarize a comparative study of deep learning applications for electrical demand forecasting and renewable energy generation forecasting in a smart grid.

In this context, we propose techniques based on deep learning for electrical consumption forecasting and photovoltaic power generation forecasting. The proposed deep learning models make it possible to generate an output prediction from climate data and socioeconomic data.

The major contribution of this work is detailed as follows:(i)We present a general review and a comparative study of individual and hybrid deep learning techniques for smart grid applications such as forecasting electrical demand and predicting solar PV power generation. In addition, we highlight the most efficient models for prediction with the highest accuracy.(ii)We developed four artificial intelligence models for deep learning applications in the smart grid. In the first model, we develop an efficient MLP architecture for data training. The second model is the SVM used for feature extraction, classification, and data optimization. The third model is the LSTM known as a variant of the RNN with input, output, and forget gates. In the fourth model, we develop an ANFIS for the classification and processing of data from smart meters; it also analyzes sequential data based on daily electricity usage records.(iii)In addition, we proposed a novel optimized hybrid deep learning model combining MLP, LSTM, and GA for solving classification and binary dynamic processing problems. In addition, this optimized hybrid model ensures high classification accuracy with reduced execution time.(iv)Subsequently, we implemented these hybrid deep learning techniques on a Cameroon dataset for the long-term electrical load forecasting and short-term photovoltaic power generation prediction.(v)Finally, we make a comparison of deep learning models implemented in our work with those in the literature using error coefficients such as RMSE, MSE, MAE, MAPE, and regression. We also implemented statistical tests using Wilcoxon and ANOVA to ensure the quality of the proposed algorithm.

The rest of the work is organized as follows. Section 3 presents the methodology and the experimental material. Here, we present prediction methods based on deep learning; we also present the proposed model. Moreover, we present the implemented software and the computer used for the implementation of the proposed hybrid method. Section 4 presents the results and the discussion, and our work is concluded in Section 5 with future directions.

3. Methodology and the Experimental Setup

3.1. Methodology

In this work, we implemented five models, namely,(i)The multilayer perceptron (MLP) which is a neural network with several hidden layers for learning [75].(ii)The support vector machine (SVM) which is developed using statistical tools, optimization, and neural networks and allows to create a hyper plane for data classification; it is used to find the most appropriate hyper plane for the distinction between the two classes for the separation of the data [76].(iii)The long short-term memory (LSTM) which is a particular type of RNN used in deep learning to address long-term dependency problems; it is also excellent in the extraction of temporal characteristics for data inputs [31].(iv)The adaptive neuro-fuzzy inference system (ANFIS) which integrates the best features of ANNs and fuzzy systems; it has both learning and reasoning capability, which improves the prediction accuracy of the model [77].(v)The genetic algorithm (GA) which is a biological technique used for optimization; it is also a stochastic search algorithm which is inspired from natural evolution principles known as the evolutionary algorithm (EA) [78].

Considering the advantages and the limitations of previously studied models in the literature, we proposed a new combined MLP-LSTM-GA method to perform power consumption forecast and renewable energy generation forecast, taking into account socioeconomic data and variability of climate conditions. Similar models have been proposed in the literature, in particular, in [79]. However, the model we proposed is completely different because in our hybrid model; the MLP is first used to extract the features from the input data and then the output of the MLP is used as the input of the LSTM. Furthermore, GA allows to optimize the predictive parameters such as the bias , the weight , the cost error , and the transfer function . This process allows reducing the processing time of the model. The MLP has 2000 neurons and the LSTM has 200 hidden units. The initialization values of MLP are climate data and socioeconomic data. The training time and validation time are, respectively, 300 s and 60 s. Figure 1 shows the proposed hybrid deep learning model.

This model works according to the following steps:(i)Input data are first introduced into the MLP to perform preprocessing and feature extraction.(ii)Subsequently, the output of the MLP is taken as the input of the LSTM to perform the processing through training and validation in order to make a final and accurate prediction. During the training stage of LSTM, the network progressively predicts and updates the trained network from the previous time. The LSTM network is trained separately for the prediction of the electrical consumption and photovoltaic power generation. The initial network allows the training of the data of the trained system. Then, the initial LSTM network is tested on the validation data. Subsequently, the LSTM network step by step predicts the output value on the validation data.(iii)After obtaining the prediction data from the LSTM network, the error coefficients are calculated. Consequently, a GA is implemented for feature optimization to improve the accuracy of the deep learning model. The parameters which are optimized by the GA are the bias , the weight , the cost error , and the transfer function . The transfer function of mapping which we have used is quadratic radial basis function. It considers a parameter associated with the radial basis function which can be tuned. Then, the GA can optimize the values , , and .(iv)Finally, the initial network relearns and readjusts the current data to the validation data until the error is minimized. Therefore, the final data are used to make the perfect forecast.

Figure 2 shows the flowchart of the general methodology of our work.

As shown in Figure 2, the historical and climate data are collected during a period and then we preprocess the data and operate the training and testing for each model implemented in our work. After data training and testing, we evaluated the precision of each model, and if the precision is not convenient, we can perform the GA and optimize values , , and . After the optimized values are reached, we can retrain and test each model to access the best value of the precision. When the best value is reach, we can validate the obtained result of electrical consumption and photovoltaic power generation forecasting.

3.2. Experimental Setup
3.2.1. Dataset
(a)Dataset for forecasting electrical consumptionIn general, electrical consumption depends on several factors including climatic factors, socioeconomic, and demographic factors. The short-term prediction considers climatic factors while the long-term prediction considers socioeconomic factors. The aim of this work is to make a long-term prediction. For this purpose, our dataset will include electrical consumption data as an output variable and socioeconomic factors such as GDP, population, number of unemployed, number of subscribers (residential, commercial, and industrial), and the price per kilowatt of electricity as input variables. These data were obtained from the World Bank, the Ministry of Water, and Energy of Cameroon, the company in charge of electricity distribution and the National Institute of Statistics from 1990 to 2020. Table 3 presents this dataset.(b)Dataset for photovoltaic power generation forecastingIn a smart grid, a consumer can choose either to expend energy from the grid or sell its energy back to the grid. On this principle, for profit maximization based on the selling price of electricity in the smart grid, smart homes with a PV system can determine whether the energy produced during the day should be consumed by the consumer overnight or stored in a storage cell for sale over the following days. A standard house can receive an average of 12 panels of 280 Wc each, covering an area of 20 m2. For this, the smart home system must predict the electrical power of the PV system for better decision making. In addition, with recent advances in sensors and data acquisition technology, solar data are measured every minute. In our work, we use a dataset over 24 hours consisting of daily input data including irradiance, temperature, solar tilt angle, wind speed, and relative humidity to make a short-term prediction of photovoltaic energy generation for the next day. They were obtained from the electricity distribution company and the meteorological station of the city of Douala. Table 4 gives the dataset for the forecast of solar PV generation.
3.2.2. Experiment Software

The software used in our work is MATLAB. MATLAB (Matrix Laboratory) is a software that was initially developed by Cleve Moler in the 1970s. MATLAB also allows programming for the intelligent resolution of data mining problems. In our work, MATLAB makes it possible to implement all deep learning techniques in the smart grid, in particular, MLP, SVM, LSTM, and ANFIS. All the simulations of this work were carried out thanks to the MATLAB R2020b 64 bit version.

3.2.3. Experiment Hardware

The hardware tool is a computer with the following specifications: icore5, 3.5 GHz, 8 GB RAM, and 500 GB hard disk with Windows 7/64 bit system.

3.2.4. Test of Performance

(1) Model Accuracy Coefficients. The accuracy of the models is measured using the following coefficients:(i)Mean square error (MSE): it measures the mean square error.(ii)Root mean square error (RMSE): it measures the square root of the mean of the square differences between the predicted and observed data.(iii)Mean absolute error (MAE): it is the absolute value of the difference between the predicted and observed data.(iv)Mean absolute percentage error (MAPE): this is the average of the absolute percentage errors of the predictions.(v)The mean bias error (MBE): it indicates whether the forecasts under- or overpredict on average.(vi)Pearson’s correlation coefficient (ρ): it reflects the association between forecasts and observations and the potential skill of the forecasts regardless of their calibration, i.e., their bias and variance.With representing the standard deviation of predicted values and the standard deviation of real values,(vii)Regression: it considers that the extent of the variability in the prediction errors is explained by the variability of the observed data. is the predicted value, is the observed value, and is the size of the dataset. is the mean of observed value.

(2) Statistical Tests(i)Analysis of variance (ANOVA): it allows verifying if the means of the group are provided by the same population. The ANOVA consists of explaining the total variance on size of samples depending of the variance of the model factors and interaction of factors with residual random variance. Therefore, we use the sum of square (SS) and the unbiased estimator () to implement the ANOVA.With as the mean value of predictions.(ii)Test of Wilcoxon–Mann–Whitney: it is a nonparametrical statistical test according to which the distribution of each of two groups of data are close. The test is built using the obtained standard deviation value () and the mean value () of the predictions.

4. Results and Discussion

This section presents the results of simulations of deep learning models implemented in our work on climate and socioeconomic dataset. The objective is to verify the performance of the models proposed in the long-term forecast of electrical consumption and the short-term forecast of solar photovoltaic generation.

4.1. Results of the Long-Term Electrical Consumption Forecast

Here, we have implemented power consumption forecasting using the models proposed in our work. Thus, Figure 3 shows the evolution of consumption over the past 30 years. There is an increase in consumption between 1990 and 1999 with consumption rising from 239 to 400 GWh. However, consumption decreased to 387 GWh in 2000 which is certainly caused by the economic crisis in Cameroon. Between 2001 and 2015, consumption increased from 387 to 1303 GWh thanks to the improvement in living conditions. Electrical consumption is stabilized around 1330 GWH in 2020.

We first tested the MLP model in MATLAB. Training the data using MLP gave Figures 4 and 5. We also trained the LSTM model to test its prediction capabilities. Figure 6 gives the evolution of the training result of the LSTM model.

In Figure 4, we observe an evolution of the MSE for the training, test, and validation data for 10 epochs. Between 0 and 4 epochs, the MSE goes from to 1540, from to 620, and from to 385, respectively, for training, test, and validation. However, the MSE stabilizes around 1532, 1420, and 24, respectively, for training, validation, and testing. Moreover, we observe that the best validation performance is obtained at the 4th iteration with an MSE of 620.8482.

In Figure 5, it is observed that the adjusted data are close to the real data. In addition, the correlation coefficient (R) is 0.99909, 0.99831, and 0.99688, respectively, for training, validation, and test. We then obtain a value of 0.99851 for the correlation coefficient of the MLP model.

In Figure 6, we observe the training process of the LSTM for 250 iterations. The RMSE goes from 1 to 0.06 between the first and the last. Moreover, the RMSE is stabilized around 0.05 around the 250th iteration.

Figure 7 gives the forecast of electrical consumption by the MLP, LSTM, SVM, and ANFIS models. Moreover, we proposed a hybrid deep learning MLP-LSTM model to improve power consumption prediction. Figure 8 presents the electrical consumption forecasting using the proposed hybrid models MLP-LSTM and MLP-LSTM-GA.

In Figure 7(a), we observe that the MLP forecast follows the actual data between 1995 and 2010. However, this forecast deviates from the actual data between 2011 and 2020 which could be caused by its slow convergence. In Figure 7(b), it can be observed that the LSTM forecast follows the actual data between 2000 and 2020 with some deviations in 2002, 2003, and 2009. Between 2015 and 2020, the LSTM forecast practically merges with the actual data. This result shows the effectiveness of the LSTM model in forecasting consumption. In Figure 7(c), it can be observed that the SVM forecast is not efficient enough because it diverges from the actual data between 1990 and 2020. In Figure 7(d), the ANFIS model gives a better forecast than the SVM but with fluctuations in some years. However, we find that ANFIS is less efficient than MLP and LSTM.

The limitations of the individual model lead us to combine the MLP and the LSTM to have a better forecast in Figure 8(a). We observe the efficiency of the hybrid MLP-LSTM model in the forecasting of electrical consumption because the forecast is essentially confused with the actual data between 2000 and 2020. Moreover, with the aim to perfectly reach the highest accuracy, we optimize our hybrid model with the GA to obtain the optimal forecasting using the MLP-LSTM-GA model as shown in Figure 8(b). This optimized hybrid model is, therefore, better than the individual models such as the SVM, the MLP, and the LSTM.

Finally, in Figure 9, we predict an increase in consumption of up to 1508 GWh in 2030.

Figure 10 gives the comparison of the obtained prediction for each model implemented in this paper.

As shown in Figure 10, we observe that the proposed hybrid model outperforms other single models implemented in this paper with the highest performance.

In addition, we made a comparison of the forecasting models using the error coefficients. Table 5 provides a comparison of electrical demand forecasting models.

We also compared our novel hybrid deep learning model with relevant recent works in the literature about electrical load forecasting as shown in Table 6.

4.2. Results of the Short-Term Photovoltaic Power Generation Forecast

The photovoltaic generation predictive neural architecture is shown in Figure 11. It can be seen that it is made up of 5 input variables, in particular, irradiance, temperature, wind speed, humidity, and angle of inclination. It also has 10 hidden layers and an output layer. The output variable being the photovoltaic energy produced.

Figures 1217, respectively, give the daily forecasts for each hour by the MLP, LSTM, SVM, ANFIS, MLP-LSTM, and MLP-LSTM-GA models.

The forecast result of the MLP model in Figure 12 shows that the forecast is close to the observed values with exceptions between 2 a.m. and 7 a.m. and 5 p.m. and 6 p.m. The regression coefficient is 0.99697; this is explained by the fact that the predicted values are quite close to the observed values. It can be seen in Figure 13 that the LSTM model gives a forecast rather close to the real values. The LSTM method gives a regression coefficient of 0.99553, which shows the efficiency of this model in the prediction of PV power. In addition, we observe in Figure 14 that the SVM model is just as effective in predicting PV power. However, there is a discrepancy between the forecast and the true values between 00 a.m and 05 a.m. But the forecast is accurate between 6 a.m. and 2 p.m. This model, despite its shortcomings, nevertheless makes it possible to have a fairly acceptable forecast with a regression coefficient evaluated at 0.99342. In Figure 15, we see that the ANFIS model has a forecasting capacity close to that of the previous models. In this case, its regression coefficient is 0.99334. The ANFIS model can also be effective for energy prediction thanks to its neuro-fuzzy inference rules. It is clearly observed in Figure 16 that the prediction ability of the deep learning hybrid model MLP-LSTM is significantly superior to the previous models with a regression of 0.99716. Finally, we improve our predictor using GA to obtain a novel hybrid model named MLP-LSTM-GA model which can perfectly forecast PV power generation as shown in Figure 17 with the highest accuracy and fast convergence. This result can be explained by the hybridization of two effective deep learning methods in forecasting to obtain a better result. This method, therefore, shows its effectiveness in the short-term prediction of PV energy generation using smart meter data and historical climate data.

Table 7 gives a comparison of PV power generation forecasting models.

As shown in Table 7, the novel algorithm gives better results than other individual model because the features are optimally chosen using the genetic algorithm.

Then, as shown in Table 8, we compared our obtained PV power generation forecasting results with those in the literature.

It can be observed that our novel hybrid model outperforms with those in the literature with an optimal accuracy and great regression.

5. Conclusion and Future Directions

This work proposed deep learning models for consumption forecasting and solar photovoltaic power generation forecasting. To this end, we made a general analysis of the original and hybrid models of deep learning implemented in smart grid applications. In addition, we have developed deep learning methods including MLP, SVM, LSTM, and ANFIS. Thus, we proposed a new hybrid model of deep learning efficient in data training and optimization of input parameters. We first implemented our deep learning models on a climate dataset of the city of Douala and then we implemented the novel models on a socioeconomic and demographic dataset of Cameroon over 30 years. Thus, the MLP-LSTM hybrid model gives a regression coefficient of 0.9998 for the forecast of electricity consumption and 0.99716 for the forecast of daily photovoltaic energy generation. In addition, the comparison of the results obtained shows the outperformance of the deep learning hybrid model MLP-LSTM in forecasting consumption and forecasting photovoltaic solar generation compared to other original models such as MLP, LSTM, SVM, and ANFIS. In our knowledge, it is the first paper which can both forecast the electrical consumption and PV power generation using large amount of historical data for long- and short-term prediction. Thus, the novel deep learning models proposed in the paper can help power companies for their network implementation and the popularization of renewable energy in the future. The limitation of this study concern the dependency of the PV power forecasting on uncertain climate conditions which can affect the accuracy of the prediction. Future works can be done on how to improve forecasting accuracy by incorporating other factors such as atmosphere pressure, precipitation, nebulosity, and sky image which their collection is difficult due to the lack of adequate sensors. Moreover, it should be interesting to explore how to combine this novel technique with other technologies such as Internet of Things for a more robust smart system.

Abbreviations

ADDPG-AEF-RIM:Novel asynchronous deep deterministic policy gradient model with adaptive early forecasting method and reward incentive mechanism
AE:Autoencoder
AFC-ANN:Accurate fast converging artificial neural network
AMI:Advanced metering infrastructure
ANFIS:Adaptive neuro-fuzzy inference system
ANOVA:Analysis of variance
ARIMA:Autoregressive integrated moving average
BG:Biased guess
BHDA:Blockchain and homomorphic encryption-based data aggregation
Bi-GRU-FCL:Bidirectional gated recurrent unit with fully connected layers
BM:Blue monkey
CNN:Convolutional neural network
CN:Capsule networks
CS:CNN + softmax
DAE:Delay-alarm error
DF:Detect failure
DNN:Deep neural network
DNP3:Distributed network protocol 3
DRL:Deep reinforcement learning
DRNN-GRU:Deep recurrent neural network-gated recurrent unit
DT:Decision tree
EA:Evolutionary algorithm
EnLSTM:Ensemble long short-term memory
FAE:False-alarm error
FCRBM:Factored conditional restricted Boltzmann machine
FFN:Feed-forward network
FPR:False positive rate
GA:Genetic algorithm
GAN:Generative adversarial network
GBR:Gradient boosting regression
GBT:Gradient boosted tree
GC-LSTM:Generalized corr-entropy assisted long short-term memory
GLM:Generalized linear model
GNN:Graph neural network
GN:Generator network
GRU:Gated recurrent unit
GWDO:Genetic wind-driven optimization
I-RNN:Identity-recurrent neural network
IRBDNN:Iterative resblocks-based deep neural network
KDE:Kernel density estimation
LGBM:Light gradient boosting machine
LGBoost:Light gradient boosting machine
LSTM:Long short-term memory
LS:L1-based feature selection + SVM
MA:Moving average
MAE:Mean absolute error
MAPE:Mean absolute percentage error
MA:Moving average
MENSA:Anomaly detection and classification
MF:Manual feature selection
MI-ANN:Mutual information-based artificial neural network
MLP:Multilayer perceptron
MMI:Modified mutual information
MSE:Mean square error
NMAPE:Normalized mean absolute percentage error
NRMSE:Normalized root mean square error
PMU:Phase measurement unit
PSO-DBN:Particle swarm optimization-deep belief networks
PS:PCA + SVM
QRLSTM:Quantile regression long short-term memory
RAM:Random access memory
RBM:Restricted Boltzmann machines
ReLU:Rectified linear unit
RF:Random forest
RMSE:Root mean squared error
RNN:Recurrent neural network
RUSBoost:Random undersampling boosting
SCADA:Supervisory control and data acquisition
SNN:Spiking neural network
SS:Sparse coding + SVM
STFFNN:Spatiotemporal feedforward neural network
SVM:Support vector machine
TCN-DNN:Temporal convolutional network with deep neural network
TCN-EMLP:Temporal convolutional network with enhanced multilayer perceptron
TCP:Transmission control protocol
TgDLF:Theory-guided deep-learning load forecasting
TPR:True positive rate
XGB:Extreme gradient boosting
XGBoost:eXtreme gradient boosting.

Data Availability

The data used to support the findings of this study are included within the article.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

The authors acknowledge the electrical engineering department of ENSET of University of Douala and the research team.