Power Load Forecasting Based on CNN-LSTM Network

Power Load Forecasting Based on CNN-LSTM Network

Meng Lei

School of Electrical Engineering, Shaanxi University of Technology

/Abstract:/

To timely grasp the changes in power load, accurate forecasting is essential. Therefore, a combined model of CNN and LSTM is explored to predict short-term fluctuations in power load from one day to one week. The CNN model is responsible for feature extraction from the input information, while the LSTM model utilizes the output information from the CNN model for load forecasting, ultimately yielding the prediction results. The publicly available power data from Spain is selected as experimental data, and the forecasting model is built using Python language, compared with single CNN and LSTM models, verifying the reliability of the proposed combined forecasting model. This model performs well in the field of short-term power load forecasting and can provide a theoretical basis for power planning by supply departments.

/ Keywords: /

Short-term load forecasting; Long Short-Term Memory Network (LSTM); Convolutional Neural Network (CNN); CNN-LSTM

Power Load Forecasting Based on CNN-LSTM Network

Classification Number: TM714; TP183

0

Introduction

Accurate short-term power load forecasting can ensure the safe, economic, and reliable operation of smart grid environments[1]. Inaccurate short-term power load forecasting can reduce the reliability of power systems and even pose safety risks, affecting power generation planning, causing resource waste and environmental pollution, making it difficult to achieve carbon peak and carbon neutrality goals[2].

In the field of power load forecasting, scholars classify forecasting methods into physical modeling, statistical methods, and artificial intelligence methods[3]. Physical modeling can predict power load, but its accuracy is low and rarely applied; statistical methods overly rely on the periodicity and outliers of historical data, making it difficult to obtain accurate predictions in the face of complex and non-linear power load data. Therefore, more and more scholars are applying artificial neural networks in the field of load forecasting, where the self-learning capability of artificial neural networks can adjust model parameters according to data conditions, making the prediction results closer to real values. Some power departments in developing countries still use traditional statistical methods such as regression analysis and Autoregressive Integrated Moving Average (ARIMA) for load forecasting[4], to formulate power generation plans and power dispatch. However, in some developed countries, artificial intelligence forecasting methods are widely used in the field of short-term power load forecasting. W. Pitts et al. proposed artificial neural networks (ANN) in 1943 and applied them to speech recognition; Saratha Sathasivam et al. proposed recurrent neural networks (RNN) in 1982 and applied them to image recognition; Deng Bin et al.[5] achieved precise predictions of medium and long-term power loads using RNN models; Sepp Hochreiter et al. proposed Long Short-Term Memory networks (LSTM) in 1997, addressing the vanishing gradient problem in RNNs during backpropagation over time and applied them to text recognition; Li Dan et al.[6] improved short-term power load forecasting efficiency by combining LSTM with quantile regression; Yann LeCun proposed Convolutional Neural Networks (CNN) in 1998; Mao Junyi et al.[7] proposed a CNN threshold model for abnormal electricity consumption detection; Guo Haiyan et al. proposed an improved BP neural network method to enhance the robustness of forecasting algorithms; literature[8] applied the CNN model to short-term power load forecasting, considering seasonal characteristics throughout the year to improve forecasting accuracy. However, the large volume of power load data, wide fluctuations, and strong instability require a combination of various models for forecasting, as single network model predictions are far from sufficient.

Given the randomness and volatility of power load data, single models cannot accurately predict short-term power loads. This paper proposes a method for forecasting short-term power loads based on a CNN-LSTM combined model, which exploits the advantages of each module and cleverly integrates them. CNN is responsible for extracting feature factors from input data, while LSTM is used for receiving CNN’s output data for forecasting. The proposed model not only has high prediction accuracy but also fits well with the peak and valley parts of the forecast. Compared to the other two forecasting models, this model exhibits the best forecasting performance.

Power Load Forecasting Based on CNN-LSTM Network

1

Power Load Forecasting Model Based on Neural Networks

1.1 Convolutional Neural Network (CNN) Model

The Convolutional Neural Network (CNN) model is a network model first proposed by LeCun in 1998. This model performs well in feature extraction, compensating for the deficiencies of other network models in this regard. The accuracy of data feature extraction directly affects the accuracy of forecasting. The CNN model consists of five functional modules: the input layer is responsible for inputting raw data; the convolutional layer extracts important features and is the most critical component of the model; the pooling layer reduces data dimensionality; the fully connected layer classifies the processed data; and finally, the results are output to the next network model. The CNN network structure is shown in Figure 1.

Power Load Forecasting Based on CNN-LSTM Network

1.2 Long Short-Term Memory Network (LSTM) Model

The Long Short-Term Memory Network (LSTM) model is a network model first proposed by Hochreiter and Schmidhuber in 1997, evolved from the RNN model. The original RNN has memory capabilities, while LSTM adds a forget gate to selectively discard less important information. Experiments show that LSTM networks perform well in multivariate, multi-input, large data predictions and excel in time series data forecasting. The LSTM model mainly consists of three gates and a storage unit: the input gate is responsible for storing input data, the forget gate can selectively forget less important information, the storage unit can store important features, and the output gate is responsible for outputting the current state. The LSTM network can leverage the important characteristics of the forget gate to selectively discard low-correlation historical information during the learning process, freeing up network space and eliminating the shortcomings of RNN networks. The memory function in LSTM models can accurately grasp the nonlinear relationship between load and input data while fully obtaining the time series characteristics of power load data, resulting in outstanding forecasting performance with higher accuracy. The LSTM network structure is shown in Figure 2.

Power Load Forecasting Based on CNN-LSTM Network

1.3 CNN-LSTM Combined Model

The CNN-LSTM model is composed of an input layer, CNN layer, LSTM layer, and output layer, as shown in Figure 3.

Power Load Forecasting Based on CNN-LSTM Network

To better predict short-term power load changes, this paper constructs a CNN-LSTM combined model, which consists of four layers: first, the processed data is input into the model through the input layer; second, the convolutional layer extracts important information from the power load data, and the pooling layer reduces dimensionality to obtain output data; then, the output data enters the LSTM layer for training; finally, the trained output data enters the output layer to obtain the output value.

Power Load Forecasting Based on CNN-LSTM Network

2

Short-term Power Load Forecasting Analysis and Result Validation

2.1 Dataset

The data used in this paper comes from the publicly available power dataset in Spain, with experimental data on power load and weather data from December 31, 2014, to December 31, 2018. The load data is sampled at hourly intervals, and related parameters include biomass power generation, fossil gas generation, fossil hard coal generation, fossil oil generation, pumped storage generation consumption, hydropower runoff and pounds, hydropower reservoirs, Valencia minimum temperature, Valencia maximum temperature, Valencia pressure, and Valencia humidity, etc.

The power data from December 31, 2014, to December 31, 2017, is selected as the training dataset, while the power data from January 1, 2018, to December 31, 2018, is used as the prediction dataset.

2.2 Experimental Data Preprocessing

Not cleaning the raw data will affect the accuracy of short-term power load forecasting. During data collection and recording, omissions may occur, leading to a few missing values in the raw data, which can be filled with the mean of the two surrounding values. If a column of data has many missing values, that column can be directly deleted. The value ranges between data are significantly different, and the differences are too large. To resolve the issue of different units among various data, normalization processing must be carried out to facilitate model prediction.

The normalization formula is as follows:

Power Load Forecasting Based on CNN-LSTM Network

2.3 Data Feature Parameter Extraction

The meteorological factors collected in this paper are important factors affecting short-term power load. However, there are many features in the meteorological data, and only those with a strong correlation to power load should be selected for input into the model for short-term load forecasting. The Pearson correlation coefficient can reflect the degree of association between variables, with values ranging from -1 to 1. The closer the absolute value is to 1, the higher the degree of correlation between the variables. A positive value indicates a positive correlation, a negative value indicates a negative correlation, and a value of 0 indicates no correlation between the two variables.

Table 1 shows the Pearson correlation coefficient values between various meteorological data features and load.

Power Load Forecasting Based on CNN-LSTM Network

As shown in Table 1, the correlation coefficient values for temperature, humidity, and wind speed are relatively high and can be used as feature factors input into the forecasting model for short-term power load forecasting, while pressure, wind direction, and cloud cover have low magnitudes and small Pearson correlation coefficient values, indicating minimal impact on power load, and can be directly deleted.

2.4 Selection of Evaluation Indicators

To clearly demonstrate the superiority of the model proposed in this paper, the Mean Absolute Percentage Error (MAPE), Root Mean Square Error (RMSE), and Mean Absolute Error (MAE) are used to evaluate the model’s forecasting results. The errors between the model’s predicted results and actual values are calculated based on formulas (2), (3), and (4). The smaller the calculated value, the lower the prediction error, indicating more accurate model predictions. The expressions are as follows:

Power Load Forecasting Based on CNN-LSTM Network

2.5 Experimental Results and Analysis

The author has created a comparison table of prediction errors for three models, as shown in Table 2.

Power Load Forecasting Based on CNN-LSTM Network

From Table 2, it can be seen that the RMSE of the CNN model is 2.359 MW, the MAE is 1.793 MW, and the MAPE is 2.601%; the RMSE of the LSTM model is 2.556 MW, the MAE is 2.041 MW, and the MAPE is 2.912%; the RMSE of the CNN-LSTM combined model is 2.198 MW, the MAE is 1.582 MW, and the MAPE is 2.311%. It can be observed that all three models have high prediction accuracy, but the CNN-LSTM combined model has the smallest values for all three error indicators, indicating higher precision in model predictions compared to the other two models.

The author has plotted the load forecasting curve for the CNN-LSTM model, as shown in Figure 4.

Power Load Forecasting Based on CNN-LSTM Network

As shown in Figure 4, the predicted values of the CNN-LSTM combined model are almost consistent with the actual values, demonstrating high prediction accuracy.

The author has created a bar chart comparing the prediction errors of the three models, as shown in Figure 5.

Power Load Forecasting Based on CNN-LSTM Network

From the comparison of the three evaluation indicators in Figure 5, it can be seen that the combined forecasting model proposed in this paper has the lowest values for all three error evaluation indicators, indicating good prediction accuracy. This result suggests that introducing CNN into the LSTM model for feature extraction yields better results in the field of short-term power load forecasting.

Power Load Forecasting Based on CNN-LSTM Network

3

Conclusion

Based on the current state of research on short-term power load forecasting both domestically and internationally, CNN and LSTM models have drawbacks such as low prediction accuracy and single model structure. This paper proposes a method for forecasting short-term power load based on a CNN-LSTM combined model, which exploits the advantages of each module and cleverly integrates them. CNN is responsible for extracting feature factors from input data, while LSTM is used for receiving CNN’s output data for forecasting. Experimental results show that the CNN-LSTM model has good forecasting capabilities for complex nonlinear problems, making it suitable for short-term power load forecasting, and can predict short-term load demand, providing theoretical support for power departments in formulating power generation plans and power dispatch.

END

Power Load Forecasting Based on CNN-LSTM Network

Long press to recognize the mini program for online reading, order for better discounts

References

[1] Cai Zhi, Zhang Guofang, Wang Miao, et al. Collaborative safety verification and correction of regional and provincial power grids under the electric power market environment [J/OL]. China Electric Power Engineering Journal: 1-11. (2022-03-23) [2022-11-04]. https://kns.cnki.net/kcms2/article/abstract?v=3uoqIhG8C45S0n9fL2suRadTyEVl2pW9UrhTDCdPD65djwFi6aRxPaR9kiqqN0VhG_99N_xklOfRDLXHiM9NpJDkmsGyc0qg&uniplatform=NZKPT.

[2] Wei Hongyi, Zhuo Zhenyu, Zhang Ning, et al. Optimization of carbon peak and carbon neutrality transition paths and analysis of influencing factors for China’s power system [J]. Electric Power System Automation, 2022, 46(19): 1-12.

[3] MA Y J, ZHAI M Y. Day-ahead prediction of microgrid electricity demand using a hybrid artificial intelligence model [J]. Processes, 2019, 7(6): 320.

[4] Zhu Jianfei, Chen Wengang, Zai Hongtao, et al. Comparative discussion on ARIMA and LSTM in power load forecasting [J]. Electrical Applications, 2022, 41(2): 27-31.

[5] Deng Bin, Zhang Nan, Wang Jiang, et al. A medium and long-term power load forecasting method based on LTC-RNN model [J]. Journal of Tianjin University (Natural Science and Engineering Technology Edition), 2022, 55(10): 1026-1033.

[6] Li Dan, Zhang Yuanhang, Yang Baohua, et al. A short-term power load probability forecasting method based on constrained parallel LSTM quantile regression [J]. Power Grid Technology, 2021, 45(4): 1356-1363.

[7] Mao Junyi, Han Song, Li Hongqian. A CNN threshold model for dynamic discrimination of abnormal loads in power grids [J]. Computer Engineering, 2020, 46(6): 308-313.

[8] WANG Y, CHEN Q X, GAN D H, et al. Deep learning-based socio-demographic information identification from smart meter data [J]. IEEE Transactions on Smart Grid, 2019, 10(3): 2593-2602.

β€” Previous Recommendations β€”

Power Load Forecasting Based on CNN-LSTM Network

Design of Automatic Ingredient Control System Based on PLC

Power Load Forecasting Based on CNN-LSTM Network
Research on Methods to Improve the Collection Rate of Ball Cleaning Devices

Power Load Forecasting Based on CNN-LSTM Network

Analysis of Multiple Failures and Causes of Cessna172 Main Landing Gear

Leave a Comment