Transformer-Based Hybrid Forecasting Model for Multivariate Renewable Energy
Abstract
:1. Introduction
Objectives
- Deals with the risk of inappropriate model selection by using the combination strategy;
- Provides an unprecedented combination of SARIMA with the Transformer neural network;
- Proposes a new method for residual modeling using a mapping between time series and error series;
- Increases the accuracy of residual nonlinear modeling using exogenous variables and Bayesian optimization.
2. Related Works
3. H-Transformer
3.1. Training Step
- (1)
- The linear module is estimated using the training set . The objective is to find the SARIMA model’s parameters that generate the best linear forecast for the training set. Their outputs are the linear forecast and the trained SARIMA;
- (2)
- The nonlinear module is trained using and as inputs to predict the residual series (Equation (4)). The output of the nonlinear module is the forecast and the trained Transformer.
3.2. Testing Step
- 1.
- The trained linear module forecasts the next hour target using the n-lagged data . It outputs the linear component ;
- 2.
- The trained nonlinear module uses the n-lagged exogenous data and to predict the nonlinear component of the target ;
- 3.
- The combination module sums and to produce (Equation (5)). The resulting forecast can then be compared with the real value using loss functions such as and .
4. Experimental Setup and Results
4.1. Data
Preprocessing
4.2. Experimental Protocol
- units, from 4 to 256;
- learning_rate, from 0.1 to 0.001;
- batch_size, from 8 to 256;
- dropout, from 0.1 to 0.4;
- lags, depends on the dataset.
- head_size, from 64 to 256;
- head_number, from 2 to 8;
- block_number, from 2 to 8;
4.3. Experimental Results
5. Conclusions
- The optimization step requires multiple executions of deep neural networks, which require high computational power. Powerful machines can execute the optimization step much faster with many more combinations, possibly outputting better results;
- There are not many open multivariate renewable energy datasets available, which limits the comparison and evaluation of the models;
- The proposed hybrid system employs a linear combination of statistical and ML models. Some works show that nonlinear combinations can be more accurate than linear ones [29] in the forecasting task;
- Selecting the perfect combination of models is challenging due to the no-free-lunch theorem [40] in search and optimization problems. Multiple variables and parameters influence the performance of each model differently, which makes the choice of models and combinations a challenging task itself.
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
ML | Machine Learning |
SARIMA | Seasonal Autoregressive Integrated Moving Average |
LSTM | Long Short Term Memory |
GRU | Gated Recurrent Unit |
RNN | Recurrent Neural Networks |
PV | Solar Photovoltaic |
RMSE | Root Mean Squared Error |
MAE | Mean Absolute Error |
MLP | Multilayer Perceptron |
BHO | Bayesian Hyperparameter Optimization |
ACF | Autocorrelation Function |
MSE | Mean Squared Error |
References
- Taalas, P.; Guterres, A. State of the Global Climate 2020; WMO-No. 1264; WMO: Genève, Switzerland, 2021. [Google Scholar]
- Perera, F. Pollution from Fossil-Fuel Combustion is the Leading Environmental Threat to Global Pediatric Health and Equity: Solutions Exist. Int. J. Environ. Res. Public Health 2017, 15, 16. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Şen, Z. Solar energy in progress and future research trends. Prog. Energy Combust. Sci. 2004, 30, 367–416. [Google Scholar] [CrossRef]
- Elhadidy, M.; Shaahid, S. Parametric study of hybrid (wind + solar + diesel) power generating systems. Renew. Energy 2000, 21, 129–139. [Google Scholar] [CrossRef]
- Khare, V.; Nema, S.; Baredar, P. Solar–wind hybrid renewable energy system: A review. Renew. Sustain. Energy Rev. 2016, 58, 23–33. [Google Scholar] [CrossRef]
- André, T.; Brown, A.; Collier, U.; Dent, C.; Epp, B.; Gibb, D.; Kumar, C.H.; Joubert, F.; Kamara, R.; Ledanois, N.; et al. Renewables 2021 Global Status Report; REN21; c/o UN Environment Programme: Paris, France, 2021. [Google Scholar]
- Zervos, A.; Lins, C.; Muth, J. RE-Thinking 2050; European Renewable Energy Council: Brussels, Belgium, 2010. [Google Scholar]
- AlSkaif, T.; Dev, S.; Visser, L.; Hossari, M.; van Sark, W. A systematic analysis of meteorological variables for PV output power estimation. Renew. Energy 2020, 153, 12–22. [Google Scholar] [CrossRef]
- Diagne, M.; David, M.; Lauret, P.; Boland, J.; Schmutz, N. Review of solar irradiance forecasting methods and a proposition for small-scale insular grids. Renew. Sustain. Energy Rev. 2013, 27, 65–76. [Google Scholar] [CrossRef] [Green Version]
- Voyant, C.; Notton, G.; Kalogirou, S.; Nivet, M.L.; Paoli, C.; Motte, F.; Fouilloy, A. Machine learning methods for solar radiation forecasting: A review. Renew. Energy 2017, 105, 569–582. [Google Scholar] [CrossRef]
- de O. Santos, D.S.; de Mattos Neto, P.S.G.; de Oliveira, J.F.L.; Siqueira, H.V.; Barchi, T.M.; Lima, A.R.; Madeiro, F.; Dantas, D.A.P.; Converti, A.; Pereira, A.C.; et al. Solar Irradiance Forecasting Using Dynamic Ensemble Selection. Appl. Sci. 2022, 12, 3510. [Google Scholar] [CrossRef]
- Wang, Z.; Liu, W. Wind energy potential assessment based on wind speed, its direction and power data. Sci. Rep. 2021, 11, 16879. [Google Scholar] [CrossRef]
- Corizzo, R.; Ceci, M.; Fanaee-T, H.; Gama, J. Multi-aspect renewable energy forecasting. Inf. Sci. 2021, 546, 701–722. [Google Scholar] [CrossRef]
- de Mattos Neto, P.S.; de Oliveira, J.F.; de O. Santos Júnior, D.S.; Siqueira, H.V.; Marinho, M.H.; Madeiro, F. An adaptive hybrid system using deep learning for wind speed forecasting. Inf. Sci. 2021, 581, 495–514. [Google Scholar] [CrossRef]
- Das, U.K.; Tey, K.S.; Seyedmahmoudian, M.; Mekhilef, S.; Idris, M.Y.I.; Deventer, W.V.; Horan, B.; Stojcevski, A. Forecasting of photovoltaic power generation and model optimization: A review. Renew. Sustain. Energy Rev. 2018, 81, 912–928. [Google Scholar] [CrossRef]
- Raza, M.Q.; Khosravi, A. A review on artificial intelligence based load demand forecasting techniques for smart grid and buildings. Renew. Sustain. Energy Rev. 2015, 50, 1352–1372. [Google Scholar] [CrossRef]
- de Marcos, R.A.; Bello, A.; Reneses, J. Electricity price forecasting in the short term hybridising fundamental and econometric modelling. Electr. Power Syst. Res. 2019, 167, 240–251. [Google Scholar] [CrossRef]
- Zhang, G. Time series forecasting using a hybrid ARIMA and neural network model. Neurocomputing 2003, 50, 159–175. [Google Scholar] [CrossRef]
- Giorgi, M.G.D.; Congedo, P.M.; Malvoni, M. Photovoltaic power forecasting using statistical methods: Impact of weather data. IET Sci. Meas. Technol. 2014, 8, 90–97. [Google Scholar] [CrossRef]
- Pedro, H.T.; Coimbra, C.F. Assessment of forecasting techniques for solar power production with no exogenous inputs. Sol. Energy 2012, 86, 2017–2028. [Google Scholar] [CrossRef]
- Mandal, P.; Madhira, S.T.S.; haque, A.U.; Meng, J.; Pineda, R.L. Forecasting Power Output of Solar Photovoltaic System Using Wavelet Transform and Artificial Intelligence Techniques. Procedia Comput. Sci. 2012, 12, 332–337. [Google Scholar] [CrossRef] [Green Version]
- Yang, X.; Jiang, F.; Liu, H. Short-Term Solar Radiation Prediction based on SVM with Similar Data. In Proceedings of the 2nd IET Renewable Power Generation Conference (RPG 2013), Beijing, China, 9–11 September 2013; Institution of Engineering and Technology: London, UK, 2013. [Google Scholar] [CrossRef]
- de Oliveira, J.F.L.; Silva, E.G.; de Mattos Neto, P.S.G. A Hybrid System Based on Dynamic Selection for Time Series Forecasting. IEEE Trans. Neural Netw. Learn. Syst. 2022, 33, 3251–3263. [Google Scholar] [CrossRef]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention Is All You Need. arXiv 2017, arXiv:cs.CL/1706.03762. [Google Scholar]
- xiang Zhao, H.; Magoulès, F. A review on the prediction of building energy consumption. Renew. Sustain. Energy Rev. 2012, 16, 3586–3592. [Google Scholar] [CrossRef]
- Wang, Z.; Srinivasan, R.S. A review of artificial intelligence based building energy use prediction: Contrasting the capabilities of single and ensemble prediction models. Renew. Sustain. Energy Rev. 2017, 75, 796–808. [Google Scholar] [CrossRef]
- Ahmed, R.; Sreeram, V.; Mishra, Y.; Arif, M. A review and evaluation of the state-of-the-art in PV solar power forecasting: Techniques and optimization. Renew. Sustain. Energy Rev. 2020, 124, 109792. [Google Scholar] [CrossRef]
- Hyndman, R.J.; Athanasopoulos, G. Forecasting: Principles and Practice; OTexts: Melbourne, Australia, 2018. [Google Scholar]
- Taskaya-Temizel, T.; Casey, M.C. A comparative study of autoregressive neural network hybrids. Neural Netw. 2005, 18, 781–789. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Snoek, J.; Larochelle, H.; Adams, R.P. Practical Bayesian Optimization of Machine Learning Algorithms. arXiv 2012, arXiv:1206.2944. [Google Scholar]
- Ribeiro, K.; Santos, R.; Saraiva, E.; Rajagopal, R. A Statistical Methodology to Estimate Soiling Losses on Photovoltaic Solar Plants. J. Sol. Energy Eng. 2021, 143, 064501. [Google Scholar] [CrossRef]
- Kannal, A. Solar Power Generation Data. 2020. Available online: https://www.kaggle.com/datasets/anikannal/solar-power-generation-data (accessed on 23 October 2022).
- Abadi, M.; Agarwal, A.; Barham, P.; Brevdo, E.; Chen, Z.; Citro, C.; Corrado, G.S.; Davis, A.; Dean, J.; Devin, M.; et al. TensorFlow: Large-Scale Machine Learning on Heterogeneous Systems. 2015. Software. Available online: tensorflow.org (accessed on 23 October 2022).
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
- Cho, K.; van Merrienboer, B.; Gulcehre, C.; Bahdanau, D.; Bougares, F.; Schwenk, H.; Bengio, Y. Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, Qatar, 25–29 October 2014; Association for Computational Linguistics: Stroudsburg, PA, USA, 2014. [Google Scholar] [CrossRef]
- Box, G. Time Series Analysis: Forecasting and Control; Jons Wiley & Sons: Hoboken, NJ, USA, 2008. [Google Scholar]
- Shahriari, B.; Swersky, K.; Wang, Z.; Adams, R.P.; de Freitas, N. Taking the Human Out of the Loop: A Review of Bayesian Optimization. Proc. IEEE 2016, 104, 148–175. [Google Scholar] [CrossRef] [Green Version]
- Hyndman, R.J.; Koehler, A.B. Another look at measures of forecast accuracy. Int. J. Forecast. 2006, 22, 679–688. [Google Scholar] [CrossRef] [Green Version]
- American Society of Heating, Refrigerating; Air-Conditioning Engineers. Ashrae Guideline 14-2014: Measurement of Energy, Demand and Water Savings; American Society of Heating, Refrigerating, and Air-Conditioning Engineers: Peachtree Corners, GA, USA, 2014. [Google Scholar]
- Wolpert, D.; Macready, W. No free lunch theorems for optimization. IEEE Trans. Evol. Comput. 1997, 1, 67–82. [Google Scholar] [CrossRef]
- Simeunović, J.; Schubnel, B.; Alet, P.J.; Carrillo, R.E. Spatio-temporal graph neural networks for multi-site PV power forecasting. arXiv 2021, arXiv:cs.LG/2107.13875. [Google Scholar] [CrossRef]
- Izidio, D.M.F.; de Mattos Neto, P.S.G.; Barbosa, L.; de Oliveira, J.F.L.; da Nóbrega Marinho, M.H.; Rissi, G.F. Evolutionary Hybrid System for Energy Consumption Forecasting for Smart Meters. Energies 2021, 14, 1794. [Google Scholar] [CrossRef]
- Rodrigues, L.J.A.; de Mattos Neto, P.S.G.; Ferreira, T.A.E. A prime step in the time series forecasting with hybrid methods: The fitness function choice. In Proceedings of the 2009 International Joint Conference on Neural Networks, Atlanta, GA, USA, 14–19 June 2009; pp. 2703–2710. [Google Scholar] [CrossRef]
Variables | Source | Description |
---|---|---|
Dataset | Training n-lagged exogenous data such as weather data. | |
Dataset | Training n-lagged target. | |
Forecast of the linear component generated by from | ||
Equation (4) | Nonlinear component generated by Equation (4) | |
Dataset | Testing n-lagged exogenous data. | |
Dataset | Testing the n-lagged target. | |
Forecast of the linear component of generated by using | ||
Prediction of the nonlinear component of generated by using and | ||
Equation (5) | Forecast of after the sum of the linear and nonlinear components |
Solar1 | Solar2 | Wind1 | Wind2 | Wind3 | |
---|---|---|---|---|---|
Observations | 4020 | 273 | 744 | 720 | 744 |
Features | 39 | 3 | 4 | 4 | 4 |
Frequency | 1 h | 1 h | 1 h | 1 h | 1 h |
Lags | 3, 6, 12, 24 | 3, 6, 12 | 1–12 | 1–12 | 1–12 |
Model Info | Solar1 | Solar2 | Wind1 | Wind2 | Wind3 | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Approach | Model | RMSE | MAE | RMSE | MAE | RMSE | MAE | RMSE | MAE | RMSE | MAE |
Single | SARIMA [23] | 975 | 756 | 1674 | 1451 | 0.810 | 0.659 | 1.115 | 0.930 | 0.795 | 0.632 |
RNN [33] | 807 | 548 | 1568 | 1258 | 0.710 | 0.543 | 0.907 | 0.699 | 0.697 | 0.529 | |
LSTM [34] | 817 | 570 | 1455 | 1201 | 0.714 | 0.550 | 0.960 | 0.738 | 0.701 | 0.528 | |
GRU [35] | 793 | 526 | 1531 | 1176 | 0.680 | 0.511 | 0.849 | 0.656 | 0.681 | 0.503 | |
Transformer [24] | 872 | 594 | 2438 | 1914 | 0.952 | 0.720 | 0.907 | 0.697 | 0.851 | 0.601 | |
Hybrid | SARIMA + RNN | 803 | 577 | 1252 | 939 | 0.637 | 0.482 | 0.847 | 0.653 | 0.673 | 0.539 |
SARIMA + LSTM | 807 | 580 | 1460 | 1097 | 0.611 | 0.438 | 0.846 | 0.656 | 0.671 | 0.538 | |
SARIMA + GRU | 871 | 608 | 1300 | 971 | 0.645 | 0.466 | 0.849 | 0.660 | 0.671 | 0.537 | |
H-Transformer | 766 | 516 | 1307 | 934 | 0.623 | 0.422 | 0.838 | 0.645 | 0.665 | 0.533 |
Model Info | CV (RMSE) | |||||
---|---|---|---|---|---|---|
Approach | Model | Solar1 | Solar2 | Wind1 | Wind2 | Wind3 |
Single | SARIMA [23] | 27.36% | 32.29% | 27.61% | 19.01% | 20.82% |
RNN [33] | 22.65% | 30.24% | 24.20% | 15.46% | 18.26% | |
LSTM [34] | 22.93% | 28.06% | 24.34% | 16.37% | 18.36% | |
GRU [35] | 22.26% | 29.53% | 23.18% | 14.48% | 17.84% | |
Transformer [24] | 24.47% | 47.03% | 32.45% | 15.46% | 22.29% | |
Hybrid | SARIMA + RNN | 22.54% | 24.15% | 21.71% | 14.44% | 17.63% |
SARIMA + LSTM | 22.65% | 28.16% | 20.83% | 14.42% | 17.57% | |
SARIMA + GRU | 24.44% | 25.07% | 21.99% | 14.48% | 17.57% | |
H-Transformer | 21.50% | 25.21% | 21.24% | 14.29% | 17.42% |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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
Galindo Padilha, G.A.; Ko, J.; Jung, J.J.; de Mattos Neto, P.S.G. Transformer-Based Hybrid Forecasting Model for Multivariate Renewable Energy. Appl. Sci. 2022, 12, 10985. https://doi.org/10.3390/app122110985
Galindo Padilha GA, Ko J, Jung JJ, de Mattos Neto PSG. Transformer-Based Hybrid Forecasting Model for Multivariate Renewable Energy. Applied Sciences. 2022; 12(21):10985. https://doi.org/10.3390/app122110985
Chicago/Turabian StyleGalindo Padilha, Guilherme Afonso, JeongRyun Ko, Jason J. Jung, and Paulo Salgado Gomes de Mattos Neto. 2022. "Transformer-Based Hybrid Forecasting Model for Multivariate Renewable Energy" Applied Sciences 12, no. 21: 10985. https://doi.org/10.3390/app122110985
APA StyleGalindo Padilha, G. A., Ko, J., Jung, J. J., & de Mattos Neto, P. S. G. (2022). Transformer-Based Hybrid Forecasting Model for Multivariate Renewable Energy. Applied Sciences, 12(21), 10985. https://doi.org/10.3390/app122110985