Short- and Medium-Term Electricity Consumption Forecasting Using Prophet and GRU
Abstract
:1. Introduction
- (1)
- Data Collection and Preprocessing: We gather electricity consumption data and meteorological data from Manufacturing Company B in Naju, Jeollanam-do, Republic of Korea. These datasets are meticulously preprocessed to ensure data quality.
- (2)
- Prophet Model for Seasonality: In the first step, we employ the Prophet model to address seasonality and events in electricity consumption. This step is crucial for understanding and predicting short-term fluctuations and patterns.
- (3)
- GRU Model for Multivariate Prediction: The second step involves utilizing the GRU model to predict electricity consumption at 15 min intervals. We experiment with seven multivariate datasets, including six meteorological variables and the residuals derived from comparing the data predicted by the Prophet model in Step 1 with the observed data.
- (4)
- Short- and Medium-Term Predictions: Our approach is tested for both short-term (2 days and 7 days) and medium-term (15 days and 30 days) electricity consumption predictions.
2. Related Works
2.1. Prophet Model
2.2. GRU Model
2.2.1. Update Gate
2.2.2. Reset Gate
2.2.3. Hidden State
3. Basic Prophet Model’s Problem and Solution
3.1. Basic Prophet Model’s Problem
3.2. Prophet Model’s Solution
4. Proposed Methods
4.1. Data Collection
4.2. Data Pre-Processing
4.3. Data Partition for Training and Test Data
4.4. Proposed Prophet Model
4.5. Proposed GRU Model
5. Test Environment and Simulation Results
5.1. Test Environment and Software
- (1)
- (2)
- Implementing the Prophet Model: The implementation of the Prophet model was facilitated by employing the fbprophet library [37]. This dedicated library offers functionalities tailored for the Prophet forecasting framework, streamlining the process of working with seasonal and event-driven data.
- (3)
- GRU and Proposed Method Implementation: To experiment with GRU and the proposed hybrid method, we leveraged the Tensorflow [38] and Keras libraries [39]. These libraries are widely used in deep learning research and provide a platform for building, training, and evaluating neural network models like GRU.
5.2. Evaluation Metrics
5.3. Simulation Results
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- International Renewable Energy Agency. Renewable Capacity Statistics; International Renewable Energy Agency: Masdar City, United Arab Emirates, 2020. [Google Scholar]
- Rethink Energy Site. Available online: https://rethinkresearch.biz/product/rethink-energy/ (accessed on 1 August 2023).
- Lv, L.; Luo, L.; Yang, Y. Distribution Line Load Predicting and Heavy Overload Warning Model Based on Prophet Method. Sustainability 2022, 14, 13697. [Google Scholar] [CrossRef]
- Grazioli, G.; Chlela, G.; Selosse, S.; Maïzi, N. The Multi-Facets of Increasing the Renewable Energy Integration in Power Systems. Energies 2022, 15, 6795. [Google Scholar] [CrossRef]
- Xue, B.; Keng, J. Dynamic Transverse Correction Method of Middle and Long Term Energy Forecasting Based on Statistic of Forecasting Errors. In Proceedings of the Conference on Power and Energy IPEC, Ho Chi Minh City, Vietnam, 12–14 December 2012; pp. 253–256. [Google Scholar]
- Enea, M. A review of machine learning algorithms used for load forecasting at micro-grid level. In Sinteza 2019-International Scientific Conference on Information Technology and Data Related Research; Singidunum University: Belgrade, Serbia, 2019; pp. 452–458. [Google Scholar]
- Brown, R.G. Smoothing Forecasting and Prediction of Discrete Time Series; Prentice-Hall: Englewood Cliffs, NJ, USA, 1963. [Google Scholar]
- Ohtsuka, Y.; Oga, T.; Kakamu, K. Forecasting electricity demand in Japan: A Bayesian spatial autoregressive ARMA approach. Comp. Stat. Data Anal. 2010, 54, 2721–2735. [Google Scholar] [CrossRef]
- Holt, C.E. Forecasting Seasonal and Trends by Exponentially Weighted Average; Carnegie Institute of Technology: Pittsburgh, PA, USA, 1957. [Google Scholar]
- Kalogirou, S.A.; Neocleous, C.C.; Schizas, C.C. Building Heating Load Estimation Using Artificial Neural Networks. In Proceedings of the 17th International Conference on Parallel Architectures and Compilation Techniques, San Francisco, CA, USA, 10–14 November 1997. [Google Scholar]
- Bagnasco, A.; Fresi, F.; Saviozzi, M.; Silvestro, F.; Vinci, A. Electrical consumption forecasting in hospital facilities: An application case. Energy Build. 2015, 103, 261–270. [Google Scholar] [CrossRef]
- Gers, F.; Schmidhuber, J.; Cummins, F. Learning to Forget: Continual Prediction with LSTM. In Neural Computation, Proceedings of the 9th International Conference on Artificial Neural Networks, Edinburgh, UK, 7–10 September 1999; MIT Press: Edinburgh, UK, 1999; pp. 850–855. [Google Scholar]
- Valenzuela, P.; Gorricho, J.; de la Iglesia. Automatic model and feature selection for time series forecasting: Achieving good performance and interpretability. Inf. Sci. 2018, 423, 157–174. [Google Scholar]
- Sanguansat, P.; Klomjit, N.; Hosseini, S.; Henao, N.; Amara, F. A comparative study of machine learning techniques for short-term load forecasting. In Proceedings of the 2021 IEEE International Conference on Communications, Control, and Computing Technologies for Smart Grids (SmartGridComm), Aachen, Germany, 25–28 October 2021. [Google Scholar]
- Junsuk, K.; Taejin, K. Application of Facebook’s Prophet Model for Forecasting Meteorological Data. J. Korean Soc. Hazard Mitig. 2021, 21, 53–58. [Google Scholar]
- Bashir, T.; Haoyong, C.; Tahir, M.F.; Liqiang, Z. Short-term electricity load forecasting using hybrid prophet-LSTM model optimized by BPNN. Energy Rep. 2022, 8, 1678–1686. [Google Scholar] [CrossRef]
- Serdar, A. A hybrid forecasting model using LSTM and Prophet for energy consumption with decomposition of time series data. PeerJ Comput. Sci. 2022, 8, e1001. [Google Scholar]
- Dinh, T.N.; Thirunavukkarasu, G.S.; Seyedmahmoudian, M.; Mekhilef, S.; Stojcevski, A. Energy Consumption Forecasting in Commercial Buildings during the COVID-19 Pandemic: A Multivariate Multilayered Long-Short Term Memory Time-Series Model with Knowledge Injection. Sustainability 2023, 15, 12951. [Google Scholar] [CrossRef]
- Li, P.; Zhang, J.S. A New Hybrid Method for China’s Energy Supply Security Forecasting Based on ARIMA and XGBoost. Energies 2018, 11, 1687. [Google Scholar] [CrossRef]
- Chen, Y.; Bhutta, M.S.; Abubakar, M.; Xiao, D.; Almasoudi, F.M.; Naeem, H.; Faheem, M. Evaluation of Machine Learning Models for Smart Grid Parameters: Performance Analysis of ARIMA and Bi-LSTM. Sustainability 2023, 15, 8555. [Google Scholar] [CrossRef]
- Zhang, G.P. Time Series Forecasting using a Hybrid ARIMA and neural network model. Neurocomputing 2003, 50, 159–175. [Google Scholar] [CrossRef]
- Pierre, A.A.; Akim, S.A.; Semenyo, A.K.; Babiga, B. Peak Electrical Energy Consumption Prediction by ARIMA, LSTM, GRU, ARIMA-LSTM and ARIMA-GRU Approaches. Energies 2023, 16, 4739. [Google Scholar] [CrossRef]
- Mancuso, P.; Piccialli, V.; Sudoso, A.M. A Machine Learning Approach for Forecasting Hierarchical Time Series. Expert Syst. Appl. 2021, 182, 115102. [Google Scholar] [CrossRef]
- Brégère, M.; Huard, M. Online Hierarchical Forecasting for Power Consumption Data. Int. J. Forecast. 2022, 38, 339–351. [Google Scholar] [CrossRef]
- Shi, X.; Chen, Z.; Wang, H.; Yeung, D.Y.; Wong, W.K.; Woo, W.C. Convolution LSTM Network: A Machine Learning Approach for Precipitation Nowcasting. Adv. Neural Inf. Process. Syst. 2015, 1, 802–810. [Google Scholar]
- Taylor, S.J.; Letham, B. Prophet: Forecasting at Scale. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Halifax, NS, Canada, 13–17 August 2017; pp. 1389–1397. [Google Scholar]
- Cho, K.; Merriënboer, B.V.; Bahdanau, D.; Bengio, Y. On the properties of neural machine translation: Encoder-decoder approaches. arXiv 2014, arXiv:1409.1259. [Google Scholar]
- RobustScaler Documentation in Scikit-Learn. Available online: https://www.itl.nist.gov/div898/software/dataplot/refman2/auxillar/iqrange.htm (accessed on 26 August 2023).
- Sethna, J.P. Chapter 10: Correlations, response, and dissipation. In Statistical Mechanics: Entropy, Order Parameters, and Complexity; Oxford University Press: Oxford, UK, 2006; ISBN 978-0198566779. [Google Scholar]
- Son, N. Comparison of the Deep Learning Performance for Short-Term Power Load Forecasting. Sustainability 2021, 13, 12493. [Google Scholar] [CrossRef]
- Kingma, D.; Ba, J. Adam: A method for stochastic optimization. arXiv 2015, arXiv:1412.6980. [Google Scholar]
- Nair, V.; Hinton, G. Rectified linear units improve restricted Boltzmann machines. In Proceedings of the 27th International Conference on International Conference on Machine Learning, Haifa, Israel, 21–24 June 2010. [Google Scholar]
- Scikit-learn.org. Machine Learning in Python. Available online: https://scikit-learn.org/ (accessed on 26 August 2023).
- Pandas.org. Data Structure for Statistical Computing in Python. Available online: https://pandas.pydata.org/ (accessed on 26 August 2023).
- Numpy.org. Array Programming with NumPy. Available online: https://numpy.org/ (accessed on 26 August 2023).
- Plotly.org. Interactive Web-Based Data Visualization with R, Plot, and Shiny. Available online: https://plotly.org/ (accessed on 26 August 2023).
- Fbprophet.org. Forecasting at Scale. Available online: https://facebook.github.io/prophet/ (accessed on 26 August 2023).
- Tensorflow.org. Deep Learning Library Developed by Google. Available online: https://www.tensorflow.org/ (accessed on 26 August 2023).
- Keras.io. The Python Deep Learning Library. Available online: https://keras.io/ (accessed on 26 August 2023).
- Agresti, A. Categorical Data Analysis; John Wiley and Sons: New York, NY, USA, 1990. [Google Scholar]
- Hyndman, R.J.; Koehler, A.B. Another look at measures of forecast accuracy. Int. J. Forecast. 2006, 22, 679–688. [Google Scholar] [CrossRef]
- MAPE. Available online: https://en.wikipedia.org/wiki/Mean_absolute_percentage_error (accessed on 26 August 2023).
- SMAPE. Available online: https://en.wikipedia.org/wiki/Symmetric_mean_absolute_percentage_error (accessed on 26 August 2023).
Parameter Nature | Parameter Name | Value |
---|---|---|
Trend Parameters | growth | linear |
changepoints | None | |
n_changepoints | 25 | |
changepoint_range | 0.8 | |
changepoint_prior_scale | 0.01 | |
Seasonality parameters | yearly_seasonality | 10 |
weekly_seasonality | False | |
daily_seasonality | False | |
seasonality_mode | multiplicative | |
seasonality_prior_scale | 10 | |
Holidays parameters | holidays | df |
Holidays_prior_scale | 0.25 | |
Flow parameters | flow | flow |
flow_prior_scale | 10 | |
Other parameters | mcmc_samples | 0 |
interval_width | 0.8 |
Parameter | GRU |
---|---|
Number of layers | 7 |
Number of neurons | 7 |
Number of epochs | 500 |
Learning rate | 0.005 |
Loss function | MSE |
Optimization | ADAM |
Weight initializer | 1 |
Activation function | ReLU |
Term | Metrics | Prophet | GRU | Proposed | |
---|---|---|---|---|---|
Short- term | 2 days (1–2 July) | CC | 0.88 | 0.97 | 0.97 |
RMSE | 7.77 | 2.97 | 2.97 | ||
RMESE | 49.50 | 18.92 | 18.92 | ||
MAPE (%) | 316.56 | 25.09 | 24.57 | ||
SMAPE (%) | 97.58 | 20.53 | 19.72 | ||
7 days (1–7 August) | CC | 0.51 | 0.97 | 0.98 | |
RMSE | 6.08 | 1.44 | 1.41 | ||
RMSSE | 72.52 | 17.13 | 16.81 | ||
MAPE (%) | 526.62 | 48.07 | 27.32 | ||
SMAPE (%) | 123.01 | 59.07 | 30.09 | ||
Medium- term | 15 days (1–15 Septermber) | CC | 0.70 | 0.98 | 0.98 |
RMSE | 6.7 | 1.58 | 1.56 | ||
RMSSE | 115.88 | 27.50 | 27.24 | ||
MAPE (%) | 579.80 | 42.55 | 24.61 | ||
SMAPE (%) | 125.98 | 50.76 | 22.58 | ||
30 days (1–30 October) | CC | 0.67 | 0.97 | 0.98 | |
RMSE | 7.48 | 2.25 | 2.22 | ||
RMSSE | 184.64 | 55.55 | 54.78 | ||
MAPE (%) | 348.06 | 37.66 | 34.37 | ||
SMAPE (%) | 103.92 | 42.48 | 33.28 |
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. |
© 2023 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
Son, N.; Shin, Y. Short- and Medium-Term Electricity Consumption Forecasting Using Prophet and GRU. Sustainability 2023, 15, 15860. https://doi.org/10.3390/su152215860
Son N, Shin Y. Short- and Medium-Term Electricity Consumption Forecasting Using Prophet and GRU. Sustainability. 2023; 15(22):15860. https://doi.org/10.3390/su152215860
Chicago/Turabian StyleSon, Namrye, and Yoonjeong Shin. 2023. "Short- and Medium-Term Electricity Consumption Forecasting Using Prophet and GRU" Sustainability 15, no. 22: 15860. https://doi.org/10.3390/su152215860
APA StyleSon, N., & Shin, Y. (2023). Short- and Medium-Term Electricity Consumption Forecasting Using Prophet and GRU. Sustainability, 15(22), 15860. https://doi.org/10.3390/su152215860