TransPVP: A Transformer-Based Method for Ultra-Short-Term Photovoltaic Power Forecasting
Abstract
:1. Introduction
- (1)
- A deep fusion method of heterogeneous information from multiple sources is proposed for photovoltaic power forecasting.
- (2)
- A transformer-based multi-task joint learning framework is proposed to deepen the model’s understanding of photovoltaic power change patterns.
- (3)
- Rigorous evaluations were conducted using real-world datasets. The exhaustive experiments on the datasets demonstrate that TransPVP outperforms the baselines in terms of prediction accuracy.
2. Proposed Methodology
2.1. Training Data
2.2. Data Preprocessing
- (1)
- NORMALIZATION
- (2)
- OUTLIER REMOVAL
2.3. Multi-Head Attention Model
3. Experiment Setups
3.1. Dataset
3.2. Baselines
- (1)
- LSTM
- (2)
- Bidirectional LSTM (BiLSTM)
- (3)
- Gated Recurrent Unit (GRU)
- (4)
- Bidirectional GRU (BiGRU)
- (5)
- Stacked LSTM
- (6)
- CNN-LSTM
- (7)
- Transformer
3.3. Evaluation Metrics
- (1)
- MAE (Mean Absolute Error)
- (2)
- MAPE (Mean Absolute Percentage Error)
- (3)
- MBE (Mean Bias Error)
- (4)
- RMSE (Root Mean Squared Error)
- (5)
- R2 (R-squared)
- (6)
- CC (Correlation Coefficient)
3.4. Experimental Results and Discussion
- (1)
- RMSE (Root Mean Squared Error)
- (2)
- R2 (Coefficient of Determination)
- (3)
- CC (Correlation Coefficient)
- (4)
- MAE (Mean Absolute Error) and MAPE (Mean Absolute Percentage Error)
- (5)
- MBE (Mean Bias Error)
- (6)
- Impact of Historical Data
- (7)
- Loss Value Analysis
- (8)
- Visual Comparison of Predictions
- (9)
- Discussion of Results
4. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Nomenclature
ANN | Artificial neural network | R-Humidity | Relative humidity |
A-Power | Active power | RMSE | Root mean squared error |
BiLSTM | Bidirectional LSTM | RNN | Recurrent neural network |
CC | Correlation coefficient | W-Speed | Wind speed |
CNN | Convolutional neural network | Distance to the k-th nearest neighbor | |
DL | Deep learning | Local reachability density | |
FFN | Feed-forward network | Reachability distance | |
GHR | Global horizontal radiation | Observation windows size of output power | |
GRU | Gated recurrent unit | Observation windows size of input power | |
LOF | Local outlier factor | Observation windows size | |
LSTM | Long short-term memory | Cardinality of k-nearest-neighbor sets | |
MAE | Mean absolute error | p | PV power |
MAPE | Mean absolute percentage error | R2 | R-squared |
MBE | Mean bias error | t | Time |
MHA | Multi-head attention | v | Observational values |
References
- IEA. Explore Historical Data and Forecasts for All Renewables Sectors and Technologies. Available online: https://www.iea.org/data-and-statistics/data-tools/renewable-energy-progress-tracker (accessed on 23 March 2024).
- Agoua, X.G.; Girard, R.; Kariniotakis, G. Short-term spatio-temporal forecasting of photovoltaic power production. IEEE Trans. Sustain. Energy 2017, 9, 538–546. [Google Scholar] [CrossRef]
- Hu, K.; Cao, S.; Wang, L.; Li, W.; Lv, M. A new ultra-short-term photovoltaic power prediction model based on ground-based cloud images. J. Clean. Prod. 2018, 200, 731–745. [Google Scholar] [CrossRef]
- Mellit, A.; Pavan, A.M.; Lughi, V. Deep learning neural networks for short-term photovoltaic power forecasting. Renew. Energy 2021, 172, 276–288. [Google Scholar] [CrossRef]
- Jamal, T.; Carter, C.; Schmidt, T.; Shafiullah, G.; Calais, M.; Urmee, T. An energy flow simulation tool for incorporating short-term PV forecasting in a diesel-PV-battery off-grid power supply system. Appl. Energy 2019, 254, 113718. [Google Scholar] [CrossRef]
- Mellit, A.; Massi Pavan, A.; Ogliari, E.; Leva, S.; Lughi, V. Advanced methods for photovoltaic output power forecasting: A review. Appl. Sci. 2020, 10, 487. [Google Scholar] [CrossRef]
- Wen, L.; Zhou, K.; Yang, S.; Lu, X. Optimal load dispatch of community microgrid with deep learning based solar power and load forecasting. Energy 2019, 171, 1053–1065. [Google Scholar] [CrossRef]
- Abdel-Nasser, M.; Mahmoud, K. Accurate photovoltaic power forecasting models using deep LSTM-RNN. Neural Comput. Appl. 2019, 31, 2727–2740. [Google Scholar] [CrossRef]
- Hossain, M.S.; Mahmood, H. Short-term photovoltaic power forecasting using an LSTM neural network and synthetic weather forecast. IEEE Access 2020, 8, 172524–172533. [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]
- Rai, A.; Shrivastava, A.; Jana, K.C. A robust auto encoder-gated recurrent unit (AE-GRU) based deep learning approach for short term solar power forecasting. Optik 2022, 252, 168515. [Google Scholar] [CrossRef]
- Jia, P.; Zhang, H.; Liu, X.; Gong, X. Short-term photovoltaic power forecasting based on VMD and ISSA-GRU. IEEE Access 2021, 9, 105939–105950. [Google Scholar] [CrossRef]
- Dai, Y.; Wang, Y.; Leng, M.; Yang, X.; Zhou, Q. LOWESS smoothing and Random Forest based GRU model: A short-term photovoltaic power generation forecasting method. Energy 2022, 256, 124661. [Google Scholar] [CrossRef]
- Xiang, X.; Li, X.; Zhang, Y.; Hu, J. A short-term forecasting method for photovoltaic power generation based on the TCN-ECANet-GRU hybrid model. Sci. Rep. 2024, 14, 6744. [Google Scholar] [CrossRef] [PubMed]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
- Suresh, V.; Janik, P.; Rezmer, J.; Leonowicz, Z. Forecasting solar PV output using convolutional neural networks with a sliding window algorithm. Energies 2020, 13, 723. [Google Scholar] [CrossRef]
- Lee, W.; Kim, K.; Park, J.; Kim, J.; Kim, Y. Forecasting solar power using long-short term memory and convolutional neural networks. IEEE Access 2018, 6, 73068–73080. [Google Scholar] [CrossRef]
- Wang, K.; Qi, X.; Liu, H. A comparison of day-ahead photovoltaic power forecasting models based on deep learning neural network. Appl. Energy 2019, 251, 113315. [Google Scholar] [CrossRef]
- Agga, A.; Abbou, A.; Labbadi, M.; El Houm, Y.; Ali, I.H.O. CNN-LSTM: An efficient hybrid deep learning architecture for predicting short-term photovoltaic power production. Electr. Power Syst. Res. 2022, 208, 107908. [Google Scholar] [CrossRef]
- Liu, W.; Mao, Z. Short-term photovoltaic power forecasting with feature extraction and attention mechanisms. Renew. Energy 2024, 226, 120437. [Google Scholar] [CrossRef]
- Zheng, J.; Zhang, H.; Dai, Y.; Wang, B.; Zheng, T.; Liao, Q.; Liang, Y.; Zhang, F.; Song, X. Time series prediction for output of multi-region solar power plants. Appl. Energy 2020, 257, 114001. [Google Scholar] [CrossRef]
- Agga, A.; Abbou, A.; Labbadi, M.; El Houm, Y. Short-term self consumption PV plant power production forecasts based on hybrid CNN-LSTM, ConvLSTM models. Renew. Energy 2021, 177, 101–112. [Google Scholar] [CrossRef]
- Shi, X.; Chen, Z.; Wang, H.; Yeung, D.; Wong, W.; Woo, W. Convolutional LSTM network: A machine learning approach for precipitation nowcasting. In Proceedings of the Advances in Neural Information Processing Systems, Quebec, QC, Canada, 7–12 December 2015; pp. 1–9. [Google Scholar]
- Phan, Q.-T.; Wu, Y.-K.; Phan, Q.-D. An approach using transformer-based model for short-term PV generation forecasting. In Proceedings of the 2022 8th International Conference on Applied System Innovation (ICASI), Nantou, Taiwan, 22–23 April 2022; pp. 17–20. [Google Scholar]
- Tian, F.; Fan, X.; Wang, R.; Qin, H.; Fan, Y. A Power Forecasting Method for Ultra-Short-Term Photovoltaic Power Generation Using Transformer Model. Math. Probl. Eng. 2022, 2022, 9421400. [Google Scholar] [CrossRef]
- Guo, M.; Mu, C.; Zhang, X.; Ding, Z. Ultra-Short-Term Photovoltaic Power Forecasting Based on Transformer Model. In Proceedings of the 2023 38th Youth Academic Annual Conference of Chinese Association of Automation (YAC), Hefei, China, 27–29 August 2023; pp. 1041–1046. [Google Scholar]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. In Proceedings of the Advances in Neural Information Processing Systems, Long Beach, CA, USA, 4–9 December 2017. [Google Scholar]
- Hao, Y.; Zhang, Y.; Liu, K.; He, S.; Liu, Z.; Wu, H.; Zhao, J. An end-to-end model for question answering over knowledge base with cross-attention combining global knowledge. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Vancouver, BC, Canada, 30 July–4 August 2017; Association for Computational Linguistic: Kerrville, TX, USA, 2017; pp. 221–231. [Google Scholar]
- Del Pero, C.; Aste, N.; Leonforte, F. The effect of rain on photovoltaic systems. Renew. Energy 2021, 179, 1803–1814. [Google Scholar] [CrossRef]
- Scott, C.; Ahsan, M.; Albarbar, A. Machine learning for forecasting a photovoltaic (PV) generation system. Energy 2023, 278, 127807. [Google Scholar] [CrossRef]
- Breunig, M.M.; Kriegel, H.; Ng, R.T.; Sander, J. LOF: Identifying density-based local outliers. In Proceedings of the 2000 ACM SIGMOD International Conference on Management of Data, Dallas, TX, USA, 15–18 May 2000; Association for Computing Machinery: New York, NY, USA, 2000; pp. 93–104. [Google Scholar]
- Meneses Rodríguez, D.; Horley, P.P.; Gonzalez Hernandez, J.; Vorobiev, Y.V.; Gorley, P.N. Photovoltaic solar cells performance at elevated temperatures. Sol. Energy 2005, 78, 243–250. [Google Scholar] [CrossRef]
- Solanki, S.K.; Krivova, N.A.; Haigh, J.D. Solar irradiance variability and climate. Annu. Rev. Astron. Astrophys. 2013, 51, 311–351. [Google Scholar] [CrossRef]
- Twohy, C.H.; Coakley, J.A., Jr.; Tahnk, W.R. Effect of changes in relative humidity on aerosol scattering near clouds. J. Geophys. Res. Atmos. 2009, 114, 1–12. [Google Scholar] [CrossRef]
- Lowen, A.C.; Mubareka, S.; Steel, J.; Palese, P. Influenza virus transmission is dependent on relative humidity and temperature. PLoS Pathog. 2007, 3, 1470–1476. [Google Scholar] [CrossRef]
- Schuster, M.; Paliwal, K.K. Bidirectional recurrent neural networks. IEEE Trans. Signal Process. 1997, 45, 2673–2681. [Google Scholar] [CrossRef]
- Sarmas, E.; Spiliotis, E.; Stamatopoulos, E.; Marinakis, V.; Doukas, H. Short-term photovoltaic power forecasting using meta-learning and numerical weather prediction independent Long Short-Term Memory models. Renew. Energy 2023, 216, 118997. [Google Scholar] [CrossRef]
- Cho, K.; Van Merriënboer, 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, Doha, Qatar, 25–29 October 2014; Association for Computational Linguistic: Kerrville, TX, USA, 2014; pp. 1724–1734. [Google Scholar]
- Malhotra, P.; Vig, L.; Shroff, G.; Agarwal, P. Long Short Term Memory Networks for Anomaly Detection in Time Series. In Proceedings of the European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning, Bruges, Belgium, 22–24 April 2015; pp. 89–94. [Google Scholar]
- Venugopalan, S.; Xu, H.; Donahue, J.; Rohrbach, M.; Mooney, R.; Saenko, K. Translating videos to natural language using deep recurrent neural networks. In Proceedings of the 2015 Annual Conference of the North American Chapter of the ACL, Denver, CO, USA, 31 May–5 June 2015; pp. 1494–1504. [Google Scholar]
- Lim, S.; Huh, J.; Hong, S.; Park, C.; Kim, J. Solar power forecasting using CNN-LSTM hybrid model. Energies 2022, 15, 8233. [Google Scholar] [CrossRef]
- Ramadhan, R.A.; Heatubun, Y.R.; Tan, S.F.; Lee, H. Comparison of physical and machine learning models for estimating solar irradiance and photovoltaic power. Renew. Energy 2021, 178, 1006–1019. [Google Scholar] [CrossRef]
- Rodríguez, F.; Azcárate, I.; Vadillo, J.; Galarza, A. Forecasting intra-hour solar photovoltaic energy by assembling wavelet based time-frequency analysis with deep learning neural networks. Int. J. Electr. Power Energy Syst. 2022, 137, 107777. [Google Scholar] [CrossRef]
- Akhter, M.N.; Mekhilef, S.; Mokhlis, H.; Ali, R.; Usama, M.; Muhammad, M.A.; Khairuddin, A.S.M. A hybrid deep learning method for an hour ahead power output forecasting of three different photovoltaic systems. Appl. Energy 2022, 307, 118185. [Google Scholar] [CrossRef]
- Willmott, C.J.; Matsuura, K. Advantages of the mean absolute error (MAE) over the root mean square error (RMSE) in assessing average model performance. Clim. Res. 2005, 30, 79–82. [Google Scholar] [CrossRef]
- Hyndman, R.J.; Koehler, A.B. Another look at measures of forecast accuracy. Int. J. Forecast. 2006, 22, 679–688. [Google Scholar] [CrossRef]
- Urraca, R.; Huld, T.; Gracia-Amillo, A.; Martinez-de-Pison, F.J.; Kaspar, F.; Sanz-Garcia, A. Evaluation of global horizontal irradiance estimates from ERA5 and COSMO-REA6 reanalyses using ground and satellite-based data. Sol. Energy 2018, 164, 339–354. [Google Scholar] [CrossRef]
- Chai, T.; Draxler, R.R. Root mean square error (RMSE) or mean absolute error (MAE). Geosci. Model Dev. Discuss. 2014, 7, 1525–1534. [Google Scholar]
- Oster, E. Unobservable selection and coefficient stability: Theory and evidence. J. Bus. Econ. Stat. 2019, 37, 187–204. [Google Scholar] [CrossRef]
- Chicco, D.; Warrens, M.J.; Jurman, G. The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation. PeerJ Comput. Sci. 2021, 7, 623. [Google Scholar] [CrossRef]
- Asuero, A.G.; Sayago, A.; González, A. The correlation coefficient: An overview. Crit. Rev. Anal. Chem. 2006, 36, 41–59. [Google Scholar] [CrossRef]
- Schober, P.; Boer, C.; Schwarte, L.A. Correlation coefficients: Appropriate use and interpretation. Anesth. Analg. 2018, 126, 1763–1768. [Google Scholar] [CrossRef] [PubMed]
Para. | Time | A-Power | GHR | Temperature | Humidity | W-Speed |
---|---|---|---|---|---|---|
Unit | min. | kW | W/m2 | °C | % | m/s |
Measuring instruments | UTC | DC energy meter | Thermopile pyranometer | Thermometers | Hygrometer | Vane anemometer |
Uncertainty | ±1–10 ns | ±1% | ±2% | ±0.45 °C | ±2% | ±1% |
MAE | MAPE | MBE | RMSE | R2 | CC | |
---|---|---|---|---|---|---|
LSTM | 0.186155 | 314.011908 | −0.00602 | 0.388174 | 0.984294 | 0.992131 |
LSTM_P | 0.195905 | 231.321192 | 0.098914 | 0.360774 | 0.986433 | 0.995273 |
BiLSTM | 0.190848 | 468.690777 | 0.015479 | 0.375903 | 0.985271 | 0.992657 |
BiLSTM_P | 0.139434 | 92.3552930 | −0.05036 | 0.298369 | 0.99072 | 0.995651 |
SLSTM | 0.179162 | 230.70800 | −0.00643 | 0.411663 | 0.982335 | 0.991167 |
SLSTM_P | 0.143087 | 119.037521 | 0.015665 | 0.315641 | 0.989615 | 0.99487 |
CLSTM | 0.175775 | 216.945815 | 0.005124 | 0.401153 | 0.983226 | 0.991595 |
CLSTM_P | 0.119932 | 44.4043636 | 0.03429 | 0.285214 | 0.991521 | 0.995814 |
GRU | 0.185243 | 340.92245 | 0.004308 | 0.398642 | 0.983435 | 0.991686 |
GRU_P | 0.145815 | 239.695311 | 0.050259 | 0.29379 | 0.991003 | 0.995789 |
BiGRU | 0.191552 | 207.974887 | −0.04307 | 0.411354 | 0.982362 | 0.991448 |
BiGRU_P | 0.148156 | 120.255649 | −0.07482 | 0.304496 | 0.990335 | 0.995716 |
TrsF | 0.142578 | 319.17021 | −0.04898 | 0.349862 | 0.987241 | 0.993739 |
TrsF_P | 0.139847 | 316.4061 | 0.03608 | 0.295644 | 0.990889 | 0.995686 |
TransPVP | 0.144838 | 403.382540 | 0.042599 | 0.278392 | 0.991921 | 0.996168 |
TransPVP_P | 0.143808 | 331.934595 | 0.064755 | 0.266043 | 0.992622 | 0.996524 |
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
Wang, J.; Hu, W.; Xuan, L.; He, F.; Zhong, C.; Guo, G. TransPVP: A Transformer-Based Method for Ultra-Short-Term Photovoltaic Power Forecasting. Energies 2024, 17, 4426. https://doi.org/10.3390/en17174426
Wang J, Hu W, Xuan L, He F, Zhong C, Guo G. TransPVP: A Transformer-Based Method for Ultra-Short-Term Photovoltaic Power Forecasting. Energies. 2024; 17(17):4426. https://doi.org/10.3390/en17174426
Chicago/Turabian StyleWang, Jinfeng, Wenshan Hu, Lingfeng Xuan, Feiwu He, Chaojie Zhong, and Guowei Guo. 2024. "TransPVP: A Transformer-Based Method for Ultra-Short-Term Photovoltaic Power Forecasting" Energies 17, no. 17: 4426. https://doi.org/10.3390/en17174426
APA StyleWang, J., Hu, W., Xuan, L., He, F., Zhong, C., & Guo, G. (2024). TransPVP: A Transformer-Based Method for Ultra-Short-Term Photovoltaic Power Forecasting. Energies, 17(17), 4426. https://doi.org/10.3390/en17174426