An Improved Neural Network Algorithm for Energy Consumption Forecasting
Abstract
:1. Introduction
2. Literature Review
2.1. Statistical Model Prediction Method
2.2. Time Series Prediction Method
2.3. Grey Prediction Model
2.4. Artificial Intelligence Prediction Model
2.5. Hybrid Prediction Model
3. Improved BP Neural Network Model
3.1. The Concept of Forecast Lead Time
3.2. Overall Algorithm Flow
3.3. Construction of Forecast Lead Time Solving Model
3.4. Construction of BP Neural Network Model
3.4.1. BP Neural Network Forward Propagation
3.4.2. Calculate Training Error
3.4.3. Error Backpropagation
3.4.4. Momentum BP Method
4. Case Analysis
4.1. Index Selection and Standardization of Influencing Factors
4.2. Forecast Lead Time Solution
4.3. Principal Component Analysis
4.4. BP Neural Network Solving Model
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- National Bureau of Statistics. 2023 China Statistical Yearbook; China Statistical Publishing House: Beijing, China, 2023. [Google Scholar]
- Geem, Z.W. Transport energy demand modeling of South Korea using artificial neural network. Energy Policy 2011, 39, 4644–4650. [Google Scholar] [CrossRef]
- Yu, L.A.; Zhao, Y.Q.; Tang, L.; Yang, Z.B. Online big data-driven oil consumption forecasting with Google trends. Int. J. Forecast. 2019, 35, 213–223. [Google Scholar] [CrossRef]
- Sözen, A.; Gülseven, Z.; Arcaklioğlu, E. Forecasting based on sectoral energy consumption of GHGs in Turkey and mitigation policies. Energy Policy 2007, 35, 6491–6505. [Google Scholar] [CrossRef]
- Kankal, M.; Akpınar, A.; Kömürcü, M.İ.; Özşahin, T.Ş. Modeling and forecasting of Turkey’s energy consumption using socio-economic and demographic variables. Appl. Energy 2011, 88, 1927–1939. [Google Scholar] [CrossRef]
- Ju, Y.; Sun, G.; Chen, Q.; Zhang, M.; Zhu, H.; Rehman, M.U. A Model Combining Convolutional Neural Network and LightGBM Algorithm for Ultra-Short-Term Wind Power Forecasting. IEEE Access 2019, 7, 28309–28318. [Google Scholar] [CrossRef]
- Song, X.Y.; Liu, Y.; Xue, L.; Wang, J.; Zhang, J.; Wang, J.; Jiang, L.; Cheng, Z. Time-series well performance prediction based on Long Short-Term Memory (LSTM) neural network mode. J. Pet. Sci. Eng. 2020, 186, 106682. [Google Scholar] [CrossRef]
- Alsina, E.F.; Bortolini, M.; Gamberi, M.; Regattieri, A. Artificial neural network optimisation for monthly average daily global solar radiation prediction. Energy Convers. Manag. 2016, 120, 320–329. [Google Scholar] [CrossRef]
- Yu, F.; Xu, X.Z. A short-term load forecasting model of natural gas based on optimized genetic algorithm and improved BP neural network. Appl. Energy 2014, 134, 102–113. [Google Scholar] [CrossRef]
- Sun, W.; Huang, C.C. A carbon price prediction model based on secondary decomposition algorithm and optimized back propagation neural network. J. Clean. Prod. 2020, 243, 118671. [Google Scholar] [CrossRef]
- Wang, D.Y.; Luo, H.Y.; Grunder, O.; Lin, Y.B.; Guo, H.X. Multi-step ahead electricity price forecasting using a hybrid model based on two-layer decomposition technique and BP neural network optimized by firefly algorithm. Appl. Energy 2017, 190, 390–407. [Google Scholar] [CrossRef]
- Zeng, Y.R.; Zeng, Y.; Choi, B.; Wang, L. Multifactor-influenced energy consumption forecasting using enhanced back-propagation neural network. Energy 2017, 127, 381–396. [Google Scholar] [CrossRef]
- Cellura, M.; Brano, V.L.; Marvuglia, A. Forecasting daily urban electric load profiles using artificial neural networks. Energy Convers. Manag. 2004, 45, 2879–2900. [Google Scholar]
- Wang, S.X.; Zhang, N.; Wu, L.; Wang, Y.M. Wind speed forecasting based on the hybrid ensemble empirical mode decomposition and GA-BP neural network method. Renew. Energy 2016, 94, 629–636. [Google Scholar] [CrossRef]
- Ren, C.; An, N.; Wang, J.Z.; Li, L.; Hu, B.; Shang, D. Optimal parameters selection for BP neural network based on particle swarm optimization: A case study of wind speed forecasting. Knowl. Based Syst. 2014, 56, 226–239. [Google Scholar] [CrossRef]
- Zhang, Y.G.; Chen, B.; Pan, G.F.; Zhao, Y. A novel hybrid model based on VMD-WT and PCA-BP-RBF neural network for short-term wind speed forecasting. Energy Convers. Manag. 2019, 195, 180–197. [Google Scholar] [CrossRef]
- Ding, L.; Lv, Z.; Han, M.; Zhao, X.; Wang, W. Forecasting China’s wastewater discharge using dynamic factors and mixed-frequency data. Environ. Pollut. 2019, 255, 113148. [Google Scholar] [CrossRef]
- Tsekouras, G.; Dialynas, E.; Hatziargyriou, N.; Kavatza, S. A non-linear multivariable regression model for midterm energy forecasting of power systems. Electr. Power Syst. Res. 2007, 77, 1560–1568. [Google Scholar] [CrossRef]
- Wang, Y.; Hu, Q.; Meng, D.; Zhu, P. Deterministic and probabilistic wind power forecasting using a variational Bayesian-based adaptive robust multi-kernel regression model. Appl. Energy 2017, 208, 1097–1112. [Google Scholar] [CrossRef]
- 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]
- Wu, J.; Wang, J.; Lu, H.; Dong, Y.; Lu, X. Short term load forecasting technique based on the seasonal exponential adjustment method and the regression model. Energy Convers. Manag. 2013, 70, 1–9. [Google Scholar] [CrossRef]
- Yolcu, C.O.; Lam, K.H.; Yolcu, U. Short-term load forecasting: Cascade intuitionistic fuzzy time series—Univariate and bivariate models. Neural Comput. Appl. 2024, 36, 20167–20192. [Google Scholar] [CrossRef]
- Gupta, A.; Kumar, A.; Khatod, K.D. Optimized scheduling of hydropower with increase in solar and wind installations. Energy 2019, 183, 716–732. [Google Scholar] [CrossRef]
- Jamil, R. Hydroelectricity consumption forecast for Pakistan using ARIMA modeling and supply-demand analysis for the year 2030. Renew. Energy 2020, 154, 1–10. [Google Scholar] [CrossRef]
- Sen, P.; Roy, M.; Pal, P. Application of ARIMA for forecasting energy consumption and GHG emission: A case study of an Indian pig iron manufacturing organization. Energy 2016, 116, 1031–1038. [Google Scholar] [CrossRef]
- Hussain, A.; Rahman, M.; Memon, A.J. Forecasting electricity consumption in Pakistan: The way forward. Energy Policy 2016, 90, 73–80. [Google Scholar] [CrossRef]
- Martínez, F.; Frías, P.M.; Pérez-Godoy, D.M.; Rivera, A.J. Dealing with seasonality by narrowing the training set in time series forecasting with kNN. Expert Syst. Appl. 2018, 103, 38–48. [Google Scholar] [CrossRef]
- Lang, K.; Zhang, M.; Yuan, Y.; Yue, X. Short-term load forecasting based on multivariate time series prediction and weighted neural network with random weights and kernels. Clust. Comput. 2019, 22, 12589–12597. [Google Scholar] [CrossRef]
- Tsai, S.-B. Using grey models for forecasting China’s growth trends in renewable energy consumption. Clean Technol. Environ. Policy 2016, 18, 112–135. [Google Scholar] [CrossRef]
- Li, R. Application of a Modified Grey Model Based on Least Squares in Energy Prediction. Adv. Comput. Signals Syst. 2023, 7, 112–145. [Google Scholar]
- Lu, S. Integrating heuristic time series with modified grey forecasting for renewable energy in Taiwan. Renew. Energy 2019, 133, 1436–1444. [Google Scholar] [CrossRef]
- Xie, N.; Yuan, C.; Yang, Y. Forecasting China’s energy demand and self-sufficiency rate by grey forecasting model and Markov model. Int. J. Electr. Power Energy Syst. 2015, 66, 1–8. [Google Scholar] [CrossRef]
- Huiping, W.; Zhun, Z. Forecasting the renewable energy consumption of Australia by a novel grey model with conformable fractional opposite-direction accumulation. Environ. Sci. Pollut. Res. Int. 2023, 30, 104415–104431. [Google Scholar]
- Wu, L.; Gao, X.; Xiao, Y.; Yang, Y.; Chen, X. Using a novel multi-variable grey model to forecast the electricity consumption of Shandong Province in China. Energy 2018, 157, 327–335. [Google Scholar] [CrossRef]
- Wang, Z.; Li, Q.; Pei, L. A seasonal GM(1,1) model for forecasting the electricity consumption of the primary economic sectors. Energy 2018, 154, 522–534. [Google Scholar] [CrossRef]
- Cao, W.; Liu, Y.; Mei, H.; Shang, H.; Yu, Y. Short-term district power load self-prediction based on improved XGBoost model. Eng. Appl. Artif. Intell. 2023, 126, 1223–1245. [Google Scholar] [CrossRef]
- Grzegorz, D. A Comprehensive Study of Random Forest for Short-Term Load Forecasting. Energies 2022, 15, 7547. [Google Scholar] [CrossRef]
- Peng, L.L.; Fan, G.F.; Yu, M.; Chang, Y.C.; Hong, W.C. Electric Load Forecasting based on Wavelet Transform and Random Forest. Adv. Theory Simul. 2021, 4, 211–243. [Google Scholar] [CrossRef]
- Hosein, E.; Maryam, I.; Parsa, M.M. Convolutional and recurrent neural network based model for short-term load forecasting. Electr. Power Syst. Res. 2021, 195, 107173. [Google Scholar]
- Li, J.; Lei, Y.; Yang, S. Mid-long term load forecasting model based on support vector machine optimized by improved sparrow search algorithm. Energy Rep. 2022, 8, 491–497. [Google Scholar] [CrossRef]
- Faruque, M.O.; Rabby, M.A.J.; Hossain, M.A.; Islam, M.R.; Rashid, M.M.U.; Muyeen, S.M. A comparative analysis to forecast carbon dioxide emissions. Energy Rep. 2022, 8, 88046–88060. [Google Scholar] [CrossRef]
- Ameyaw, B.; Yao, L.; Oppong, A.; Agyeman, J.K. Investigating, forecasting and proposing emission mitigation pathways for CO2 emissions from fossil fuel combustion only: A case study of selected countries. Energy Policy 2019, 13, 7–21. [Google Scholar] [CrossRef]
- Abdel-Basset, M.; Hawash, H.; Chakrabortty, R.K.; Ryan, M. PV-Net: An innovative deep learning approach for efficient forecasting of short-term photovoltaic energy production. J. Clean. Prod. 2021, 303, 127037. [Google Scholar] [CrossRef]
- Bendaoud, N.M.M.; Nadir, F.; Samir, A.B. Comparing Generative Adversarial Networks architectures for electricity demand forecasting. Energy Build. 2021, 247, 111152. [Google Scholar] [CrossRef]
- Keddouda, A.; Ihaddadene, R.; Boukhari, A.; Atia, A.; Arıcı, M.; Lebbihiat, N.; Ihaddadene, N. Solar photovoltaic power prediction using artificial neural network and multiple regression considering ambient and operating conditions. Energy Convers. Manag. 2023, 288, 117186. [Google Scholar] [CrossRef]
- Guo, H.; Chen, Q.; Xia, Q.; Kang, C.; Zhang, X. A monthly electricity consumption forecasting method based on vector error correction model and self-adaptive screening method. Int. J. Electr. Power Energy Syst. 2018, 95, 427–439. [Google Scholar] [CrossRef]
- He, Y.; Zheng, Y.; Xu, Q. Forecasting energy consumption in Anhui province of China through two Box-Cox transformation quantile regression probability density methods. Measurement 2019, 136, 579–593. [Google Scholar] [CrossRef]
- Rhif, M.; Abbes, A.B.; Martínez, B.; Farah, I.R. Veg-W2TCN: A parallel hybrid forecasting framework for non-stationary time series using wavelet and temporal convolution network model. Appl. Soft Comput. J. 2023, 137, 110172. [Google Scholar] [CrossRef]
- Abedinia, O.; Amjady, N.; Ghadimi, N. Solar energy forecasting based on hybrid neural network and improved metaheuristic algorithm. Comput. Intell. 2018, 34, 241–260. [Google Scholar] [CrossRef]
- Wang, Q.; Li, S.Y.; Li, R.R.; Jiang, F. Underestimated impact of the COVID-19 on carbon emission reduction in developing countries-A novel assessment based on scenario analysis. Environ. Res. 2022, 204, 111990. [Google Scholar] [CrossRef]
- Nijhawan, P.; Bhalla, K.V.; Singla, K.M.; Gupta, J. Electrical Load Forecasting using SVM Algorithm. Int. J. Recent Technol. Eng. (IJRTE) 2020, 8, 4811–4816. [Google Scholar] [CrossRef]
- Wang, Y.; Sun, S.; Cai, Z. Daily Peak-Valley Electric-Load Forecasting Based on an SSA-LSTM-RF Algorithm. Energies 2023, 16, 7964. [Google Scholar] [CrossRef]
- Wang, D.; Li, S.; Fu, X. Short-Term Power Load Forecasting Based on Secondary Cleaning and CNN-BILSTM-Attention. Energies 2024, 17, 4142. [Google Scholar] [CrossRef]
- Qi, Y.; Luo, H.; Luo, Y.; Liao, R.; Ye, L. Adaptive Clustering Long Short-Term Memory Network for Short-Term Power Load Forecasting. Energies 2023, 16, 6230. [Google Scholar] [CrossRef]
Model | Input | Method Description | Advantages | Disadvantages |
---|---|---|---|---|
Regressive analysis | Processed historical data | Based on the changing patterns of historical data and factors affecting prediction target, search for the correlation between independent and dependent variables and their regression equations, determine model parameters, and infer future values based on this | The calculation principle and formal structure are simple, the prediction speed is fast, the extrapolation performance is good, and it shows good prediction for situations that have not occurred in history | Nonlinear regression models have non-unique expressions, relatively large workloads, and are prone to “spurious regression” |
Time series method | Processed historical data | Based on historical data, establish a mathematical model of prediction target variation over time, and determine the prediction target expression based on this model | It can eliminate modelling problems such as multicollinearity, heteroscedasticity, and sequence correlation, and is computationally simple | The workload is relatively large, and the final form of the model is not unique. When there are significant changes in the external environment, there will be significant deviations |
Grey prediction method | Processed historical data | Utilize the limited known information, seeking the inherent motion laws of the system, and then predict the future state of the system | Low data requirements, simple calculation, and wide applicability | Sensitive to data changes, a limited long-term predictive ability, and a fixed model structure |
BP neural network | Processed historical data | A multi-layer feedforward neural network trained using an error backpropagation algorithm | A flexible network structure with a strong model generalization ability and nonlinear mapping ability | A slow learning speed, easy to fall into local optima, limited network generalization ability, lack of corresponding theoretical guidance for selecting network layers and the number of neurons |
Recurrent neural network | Processed historical data | On the basis of the BP neural network, pre-sequential connections and post-sequential connections are provided for each node in the hidden layer to record pre-sequential information and apply it to post-sequential output calculation | A strong ability to process sequential data, weight sharing, flexibility, and short-term memory characteristics | Difficulty in ensuring the accuracy of information transmission for load sequences with large time spans; easy to encounter problems such as gradient disappearance and gradient explosion |
Long short-term memory neural network | Processed historical data | The internal recurrent unit structure of traditional recurrent neural networks cannot transmit the functional relationship between the preceding and following feature signals. Therefore, an improved long short-term memory neural network based on recurrent neural networks is proposed | Effectively solves the problems of gradient vanishing and exploding in traditional RNNs during long-term training, and performs well in handling large datasets with long time series | A high computational complexity, requiring a large amount of data and reverse training, difficult to explain the decision-making process of the network |
Gated recurrent unit | Processed historical data | A simplified variant of the long short-term memory neural network unit, which combines the forget gate and input gate inside the LSTM loop body into an update gate, and replaces the output gate with a reset gate | It can simultaneously consider the temporal and nonlinear nature of power load sequences, greatly reducing the number of parameters and lowering the difficulty of network training | Difficulty in differentiating sequence features and the problem of information loss in dealing with non-continuous long time series |
Convolutional neural network | Processed historical data | A feedforward neural network with a deep structure and convolutional computation | Has a strong nonlinear mapping ability, image feature extraction ability, self-learning, and an ability to adapt | When dealing with long time series, there are often limitations in the field of view, difficulties in extracting all temporal features, and a lack of memory function |
Random forest algorithm | Processed historical data | An ensemble learning method, belonging to a type of supervised learning algorithm, consisting of a classifier or regressor composed of multiple decision trees | A high accuracy, strong robustness, ability to handle high-dimensional data, easy implementation, and parameter tuning | Possible overfitting, a high computational cost, difficulty in explaining individual predictions, and shows poor performance for datasets with complex interactions |
Support vector machine | Processed historical data | A generalized linear classifier for the binary classification of data using supervised learning, whose decision boundary is the maximum margin hyperplane for solving the learning sample. | The efficient processing of high-dimensional data, with a good generalization ability and strong robustness | A high computational complexity, sensitivity to noise, and difficulty in parameter selection |
Hybrid prediction model | Processed historical data | Using two or more different prediction methods for the same problem | Being able to comprehensively utilize the information provided by multiple prediction methods to improve prediction accuracy | A lack of uniformity in the criteria for determining combinations |
Influence Factor | GDP | Urban Population Ratio | Total Population | Contribution Rate of Secondary Industry | Total Energy Production | Proportion of Raw Coal to Energy Consumption | Energy Processing and Conversion Efficiency |
---|---|---|---|---|---|---|---|
Forecast lead time | 4 | 1 | 1 | 1 | 1 | 1 | 6 |
GDP | Urban Population Ratio | Total Population | Contribution Rate of Secondary Industry | Total Energy Production | Proportion of Raw Coal to Energy Consumption | Energy Processing and Conversion Efficiency | Total Energy Consumption | Year |
---|---|---|---|---|---|---|---|---|
0.01 | 0.09 | 0.29 | 0.87 | 0.10 | 0.56 | 0.15 | 0.11 | 1996 |
0.03 | 0.14 | 0.35 | 0.85 | 0.11 | 0.51 | 0.08 | 0.11 | 1997 |
0.05 | 0.19 | 0.40 | 0.73 | 0.11 | 0.39 | 0.10 | 0.11 | 1998 |
0.06 | 0.23 | 0.45 | 0.75 | 0.10 | 0.21 | 0.26 | 0.13 | 1999 |
0.08 | 0.28 | 0.50 | 0.65 | 0.11 | 0.32 | 0.00 | 0.15 | 2000 |
0.09 | 0.33 | 0.54 | 0.75 | 0.13 | 0.14 | 0.71 | 0.17 | 2001 |
0.10 | 0.38 | 0.56 | 0.25 | 0.17 | 0.09 | 0.60 | 0.21 | 2002 |
0.11 | 0.43 | 0.61 | 0.36 | 0.20 | 0.18 | 0.55 | 0.30 | 2003 |
0.12 | 0.48 | 0.65 | 0.68 | 0.29 | 0.63 | 0.49 | 0.40 | 2004 |
0.14 | 0.52 | 0.68 | 0.45 | 0.40 | 0.81 | 0.49 | 0.49 | 2005 |
0.15 | 0.56 | 0.71 | 0.40 | 0.49 | 0.93 | 0.50 | 0.58 | 2006 |
0.18 | 0.60 | 0.74 | 0.37 | 0.55 | 0.95 | 0.54 | 0.64 | 2007 |
0.21 | 0.66 | 0.77 | 0.39 | 0.62 | 1.00 | 0.46 | 0.67 | 2008 |
0.25 | 0.69 | 0.80 | 0.33 | 0.67 | 0.83 | 0.50 | 0.72 | 2009 |
0.30 | 0.74 | 0.83 | 0.47 | 0.71 | 0.30 | 0.65 | 0.79 | 2010 |
0.38 | 0.79 | 0.85 | 0.66 | 0.81 | 0.72 | 0.71 | 0.87 | 2011 |
0.45 | 0.84 | 0.88 | 0.46 | 0.92 | 1.00 | 0.68 | 0.92 | 2012 |
0.50 | 0.88 | 0.91 | 0.38 | 0.96 | 0.72 | 0.73 | 0.96 | 2013 |
0.59 | 0.920 | 0.940 | 0.33 | 0.99 | 0.58 | 0.75 | 0.99 | 2014 |
0.71 | 0.955 | 0.971 | 0.30 | 1.00 | 0.26 | 0.87 | 1.00 | 2015 |
Actual Value of Experimental Data | Experimental Results | Relative Error | |||
---|---|---|---|---|---|
Considering Forecast Lead Time | Not Considering Forecast Lead Time | Considering Forecast Lead Time | Not Considering Forecast Lead Time | ||
Error convergence Iterations | - | 374 | 2000 | - | - |
Training time | - | 13s | 21s | - | - |
Average error (Average after sum of squares) | - | 0.01 | 0.05 | - | - |
Test data prediction value | 0.67 | - | 0.6 | - | 8.59% |
0.72 | - | 0.53 | - | 26.42% | |
0.79 | 0.83 | 0.60 | 5.00% | 23.26% | |
0.87 | 0.81 | 0.70 | 6.95% | 19.19% | |
0.92 | 0.81 | 0.70 | 11.33% | 23.13% | |
0.96 | 0.85 | 0.71 | 12.01% | 25.99% | |
0.99 | 0.84 | 0.68 | 14.56% | 30.13% | |
1.00 | 0.84 | 0.69 | 15.58% | 30.91% |
Experimental Results | ||||||
---|---|---|---|---|---|---|
Before Adjustment BP | After Adjustment BP | Before Adjustment CNN | After Adjustment CNN | Before Adjustment LSTM | After Adjustment LSTM | |
Mean Squared Error | 0.059047 | 0.012479 | 0.11914 | 0.010275 | 0.017851 | 0.006546 |
Mean Absolute Percentage Error | 25.3439% | 10.8894% | 30.2157% | 9.5658% | 13.8295% | 8.4989% |
Mean Absolute Error | 0.23627 | 0.10314 | 0.2897 | 0.089017 | 0.12938 | 0.079135 |
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. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Bai, J.; Wang, J.; Ran, J.; Li, X.; Tu, C. An Improved Neural Network Algorithm for Energy Consumption Forecasting. Sustainability 2024, 16, 9332. https://doi.org/10.3390/su16219332
Bai J, Wang J, Ran J, Li X, Tu C. An Improved Neural Network Algorithm for Energy Consumption Forecasting. Sustainability. 2024; 16(21):9332. https://doi.org/10.3390/su16219332
Chicago/Turabian StyleBai, Jing, Jiahui Wang, Jin Ran, Xingyuan Li, and Chuang Tu. 2024. "An Improved Neural Network Algorithm for Energy Consumption Forecasting" Sustainability 16, no. 21: 9332. https://doi.org/10.3390/su16219332
APA StyleBai, J., Wang, J., Ran, J., Li, X., & Tu, C. (2024). An Improved Neural Network Algorithm for Energy Consumption Forecasting. Sustainability, 16(21), 9332. https://doi.org/10.3390/su16219332