Vision Transformer-Based Photovoltaic Prediction Model
Abstract
:1. Introduction
2. Related Works
2.1. Traditional Machine Learning for PV Prediction
2.2. Deep Learning for PV Prediction
2.3. Motivation
3. Materials and Methods
3.1. Model
3.2. Multi-Head Self-Attention
3.3. Input Embedding and Position Embedding
3.4. Loss Function
4. Results and Discussion
4.1. Experimental Detail
4.2. Datasets
4.3. Comparing the Model Descriptions, Training, and Settings
4.4. Experimental Results
4.5. Ablation Experiments
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Nomenclatures
l | time length of PV sequence |
w | the number of PV sensors |
information sequence of PV sensor | |
PV prediction sequence output by the model | |
model initial input | |
a learnable sequence | |
the sequence after through the -th layer encoder layer | |
position encoding of model input | |
normalization | |
self-attention computation | |
multi-head self-attention | |
multi-layer perception | |
the weight matrix of Q, K, V in self-attention | |
geographic information matrix |
References
- Deo, R. Machine learning in medicine. Circulation 2015, 10, 1920–1930. [Google Scholar] [CrossRef] [Green Version]
- Alzubaidi, L.; Zhang, J.; Humaidi, A.J.; Al-Dujaili, A.; Duan, Y.; Al-Shamma, O.; Santamaría, J.; Fadhel, M.A.; Al-Amidie, M.; Farhan, L. Review of deep learning: Concepts, CNN architectures, challenges, applications, future directions. J. Big Data 2021, 8, 53. [Google Scholar] [CrossRef]
- Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Xiaohua, Z.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An Image is Worth 16 ×16 Words: Transformers for Image Recognition at Scale. arXiv 2015, arXiv:2010.11929. [Google Scholar]
- Yang, C.; Thatte, A.A.; Xie, L. Multitime-Scale Data-Driven Spatio-Temporal Forecast of Photovoltaic Generation. IEEE Trans. Sustain. Energy 2015, 6, 104–112. [Google Scholar] [CrossRef]
- Cavalcante, L.; Bessa, R.J. Solar power forecasting with sparse vector autoregression structures. In Proceedings of the 2017 IEEE Manchester PowerTech, Manchester, UK, 18–22 June 2017; pp. 1–6. [Google Scholar]
- Bacher, P.; Madsen, H.; Aalborg Nielsen, H. Online short-term solar power forecasting. Sol. Energy 2009, 83, 1772–1783. [Google Scholar] [CrossRef] [Green Version]
- Zeng, J.W.; Qiao, W. Short-term solar power prediction using an RBF neural network. In Proceedings of the 2011 IEEE Power and Energy Society General Meeting, Detroit, MI, USA, 24–29 July 2011; pp. 1–8. [Google Scholar]
- Pedro, H.; Coimbra, C.F. Assessment of forecasting techniques for solar power production with no exogenous inputs. Sol. Energy 2012, 86, 2017–2028. [Google Scholar] [CrossRef]
- Bouzerdoum, M.; Mellit, A.; Massi Pavan, A. A hybrid model (SARIMA—SVM) for short-term power forecasting of a small-scale grid-connected photovoltaic plant. Sol. Energy 2013, 98, 226–235. [Google Scholar] [CrossRef]
- Wu, Y.K.; Chen, C.R.; Rahman, H.A. A Novel Hybrid Model for Short-Term Forecasting in PV Power Generation. Int. J. Photoenergy 2014, 2014, 569249. [Google Scholar] [CrossRef] [Green Version]
- Rana, M.; Koprinska, I.; Agelidis, V.G. Univariate and multivariate methods for very short-term solar photovoltaic power forecasting. Energy Convers. Manag. 2016, 121, 380–390. [Google Scholar] [CrossRef]
- Arash, A.; Thomas, X.W.; Benito, R. A Hybrid Algorithm for Short-Term Solar Power Prediction—Sunshine State Case Study. IEEE Trans. Sustain. Energy 2017, 8, 582–591. [Google Scholar]
- Shang, C.F.; Wei, P.C. Enhanced support vector regression based forecast engine to predict solar power output. Renew. Energy 2018, 127, 269–283. [Google Scholar] [CrossRef]
- Behera, M.K.; Majumder, I.; Nayak, N. Solar photovoltaic power forecasting using optimized modified extreme learning machine technique. Eng. Sci. Technol. Int. J. 2018, 21, 428–438. [Google Scholar] [CrossRef]
- Eseye, A.T.; Jianhua, Z.; Dehua, Z. Short-term photovoltaic solar power forecasting using a hybrid Wavelet-PSO-SVM model based on SCADA and Meteorological information. Renew. Energy 2018, 118, 357–367. [Google Scholar] [CrossRef]
- Jeong, J.; Kim, H. Multi-Site Photovoltaic Forecasting Exploiting Space-Time Convolutional Neural Network. Energies 2019, 12, 4490. [Google Scholar] [CrossRef] [Green Version]
- Shih, S.Y.; Sun, F.K.; Lee, H.Y. Temporal pattern attention for multivariate time series forecasting. Mach. Learn. 2018, 12, 1–21. [Google Scholar] [CrossRef] [Green Version]
- Simeunović, J.; Schubnel, B.; Alet, P.J.; Carrillo, R.E. Spatio-Temporal Graph Neural Networks for Multi-Site PV Power Forecasting. IEEE Trans. Sustain. Energy 2021, 13, 1210–1220. [Google Scholar] [CrossRef]
- Li, Q.; Zhang, X.Y.; Ma, T.J.; Liu, D.G.; Wang, H.; Hu, W. A Multi-step ahead photovoltaic power forecasting model based on TimeGAN, Soft DTW-based K-medoids clustering, and a CNN-GRU hybrid neural network. Energy Rep. 2022, 3, 10346–10362. [Google Scholar] [CrossRef]
- Zhu, K.; Fu, Q.; Su, Y.X.; Yang, H. A photovoltaic power forecasting method based on EEMD-Kmeans-ALO-LSTM. In Proceedings of the 2022 7th Asia Conference on Power and Electrical Engineering (ACPEE), Hangzhou, China, 15–17 April 2022; pp. 251–256. [Google Scholar]
- Zhou, H.X.; Zhang, Y.J.; Yang, L.F.; Liu, Q.; Yan, K.; Du, Y. Short-Term Photovoltaic Power Forecasting Based on Long Short Term Memory Neural Network and Attention Mechanism. Energy Rep. 2019, 7, 78063–78074. [Google Scholar] [CrossRef]
- Qu, Y.P.; Xu, J.; Sun, Y.Z.; Liu, D. A temporal distributed hybrid deep learning model for day-ahead distributed PV power forecasting. Appl. Energy 2021, 304, 117704. [Google Scholar] [CrossRef]
- Abdel-Basset, M.; Hawash, H.; Ripon, K. Chakrabortty and Michael Ryan. 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]
- Pérez, E.; Pérez, J.; Segarra-Tamarit, J.; Beltran, H. A deep learning model for intra-day forecasting of solar irradiance using satellite-based estimations in the vicinity of a PV power plant. Sol. Energy 2021, 218, 652–660. [Google Scholar] [CrossRef]
- Guermoui, M.; Bouchouicha, K.; Bailek, N.; Boland, J.W. Forecasting intra-hour variance of photovoltaic power using a new integrated model. Energy Convers. Manag. 2021, 245, 114569. [Google Scholar] [CrossRef]
- Korkmaz, D. SolarNet: A hybrid reliable model based on convolutional neural network and variational mode decomposition for hourly photovoltaic power forecasting. Appl. Energy 2021, 300, 117410. [Google Scholar] [CrossRef]
- Sharma, N.; Mangla, M.; Yadav, S.; Goyal, N.; Singh, A.; Verma, S.; Saber, T. SolarNet: A sequential ensemble model for photovoltaic power forecasting. Comput. Electr. Eng. 2021, 96, 107484. [Google Scholar] [CrossRef]
- Cannizzaro, D.; Aliberti, A.; Bottaccioli, L.; Macii, E.; Acquaviva, A.; Patti, E. Solar radiation forecasting based on convolutional neural network and ensemble learning. Expert Syst. Appl. 2021, 181, 115167. [Google Scholar] [CrossRef]
- Vaswani, A.; Shazeer, N.M.; Parmar, N.; Uszkoreit, J.; Jones, L.; Aidan, N. Gomez and Lukasz Kaiser and Illia Polosukhin. Attention is All you Need. arXiv 2017, arXiv:1706.03762. [Google Scholar]
- Rumelhart, D.E.; Hinton, G.E.; Williams, R.J. Learning representations by back-propagating errors. Nature 1986, 323, 533–536. [Google Scholar] [CrossRef]
- Zaremba, W.; Sutskever, I.; Vinyals, O. Recurrent Neural Network Regularization. arXiv 2014, arXiv:1409.2329. [Google Scholar]
- Kingma, D.P.; Ba, J. Adam: A Method for Stochastic Optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar]
Dataset | Dataset1 | Dataset2 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Predict Time | 60 s | 180 s | 300 s | 600 s | 60 s | 180 s | 300 s | 600 s | ||||||||
Metric | AMSE | STD | AMSE | STD | AMSE | STD | AMSE | STD | AMSE | STD | AMSE | STD | AMSE | STD | AMSE | STD |
our | 8097.39 | 1648.91 | 13,349.34 | 1909.11 | 9022.29 | 1976.04 | 23,116.01 | 2065.71 | 5065.31 | 1523.42 | 10,032.25 | 1746.21 | 9479.44 | 1721.09 | 22,109.77 | 1999.65 |
CNN | 9412.54 | 2254.74 | 18,892.89 | 3791.05 | 25,006.58 | 5862.31 | 30,065.47 | 5488.19 | 4268.51 | 1164.76 | 8013.54 | 1564.29 | 10,385.9 | 2011.54 | 28,647.01 | 2617.93 |
LSTMs | 7932.59 | 2615.73 | 13,478.13 | 5002.18 | 13,303.78 | 5611.20 | 24,887.52 | 6138.17 | 4599.46 | 2207.84 | 9371.86 | 4617.81 | 11,670.73 | 5002.66 | 25,017.65 | 6002.55 |
RNN | 14,178.05 | 2005.76 | 20,396.15 | 2716.71 | 23,097.42 | 4613.68 | 45,194.02 | 6061.74 | 5016.83 | 1871.56 | 11,538.06 | 2164.79 | 15,761.25 | 4509.69 | 42,174.05 | 7251.6 |
BP | 8561.86 | 2571.92 | 13,880.32 | 4948.32 | 17,752.83 | 5032.25 | 42,652.12 | 6002.12 | 4765.14 | 2051.88 | 9287.19 | 2578.47 | 11,579.32 | 4076.21 | 46,521.82 | 5310.6 |
Dataset | Dataset1 | Dataset2 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Predict Time | 60 s | 180 s | 300 s | 600 s | 60 s | 180 s | 300 s | 600 s | ||||||||
Metric | AMAPE | STD | AMAPE | STD | AMAPE | STD | AMAPE | STD | AMAPE | STD | AMAPE | STD | AMAPE | STD | AMAPE | STD |
our | 8.06 | 0.64 | 11.73 | 1.03 | 9.77 | 1.06 | 16.01 | 2.34 | 7.59 | 0.88 | 10.52 | 1.78 | 10.41 | 1.35 | 17.22 | 3.01 |
CNN | 8.34 | 1.15 | 14.92 | 3.07 | 21.31 | 3.65 | 22.87 | 4.64 | 7.12 | 1.14 | 12.36 | 2.04 | 16.44 | 3.84 | 25.91 | 6.23 |
LSTMs | 7.28 | 1.06 | 13.88 | 1.34 | 18.27 | 2.22 | 21.31 | 2.88 | 7.31 | 0.76 | 11.52 | 1.71 | 14.14 | 2.03 | 22.16 | 4.41 |
RNN | 10.3 | 3.94 | 18.54 | 6.74 | 23.14 | 4.17 | 32.61 | 5.13 | 8.12 | 0.96 | 15.75 | 3.05 | 26.57 | 4.36 | 31.65 | 3.76 |
BP | 8.41 | 0.96 | 16.43 | 3.61 | 20.88 | 4.52 | 33.76 | 5.21 | 9.03 | 1.01 | 19.33 | 4.04 | 27.43 | 4.11 | 30.76 | 5.06 |
Dataset | Dataset1 | Dataset2 | ||||||
---|---|---|---|---|---|---|---|---|
Predict Time | 300 s | 600 s | 300 s | 600 s | ||||
Metric | AMSE | STD | AMSE | STD | AMSE | STD | AMSE | STD |
have auxiliary information | 8817.62 | 1703.53 | 22,395.40 | 2022.12 | 10,096.62 | 1814.62 | 23,836.40 | 1981.49 |
no auxiliary information | 11,284.16 | 3285.06 | 29,626.88 | 4271.47 | 10,928.16 | 3060.17 | 26,453.81 | 5001.76 |
Dataset | Dataset1 | Dataset2 | ||||||
---|---|---|---|---|---|---|---|---|
Predict Time | 300 s | 600 s | 300 s | 600 s | ||||
Metric | AMAPE | STD | AMAPE | STD | AMAPE | STD | AMAPE | STD |
have auxiliary information | 8.31 | 0.92 | 16.51 | 2.09 | 10.31 | 1.03 | 19.51 | 2.13 |
no auxiliary information | 12.61 | 1.78 | 23.82 | 3.23 | 18.61 | 1.98 | 24.82 | 2.79 |
Dataset | Dataset1 | Dataset2 | ||||||
---|---|---|---|---|---|---|---|---|
Predict Time | 300 s | 600 s | 300 s | 600 s | ||||
Metric | AMSE | STD | AMSE | STD | AMSE | STD | AMSE | STD |
output token | 9242.11 | 1627.49 | 21,305.40 | 2075.19 | 10,077.62 | 1474.81 | 23,024 | 2099.16 |
average output | 10,284.16 | 1835.08 | 26,626.88 | 2267.71 | 11,204.16 | 1502.16 | 22,943.37 | 2076.93 |
maximum pooling output | 9967.36 | 1727.59 | 24,112.7 | 2109.75 | 12,683.33 | 1536.67 | 21,670.19 | 1993.29 |
Dataset | Dataset1 | Dataset2 | ||||||
---|---|---|---|---|---|---|---|---|
Predict Time | 300 s | 600 s | 300 s | 600 s | ||||
Metric | AMAPE | STD | AMAPE | STD | AMAPE | STD | AMAPE | STD |
output token | 11.31 | 0.95 | 16.51 | 2.07 | 10.71 | 1.03 | 17.91 | 1.95 |
average output | 11.61 | 0.93 | 18.23 | 2.36 | 11.96 | 1.26 | 18.01 | 1.98 |
maximum pooling output | 12.74 | 1.15 | 18.67 | 2.17 | 12.23 | 1.18 | 17.21 | 1.92 |
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
Kang, Z.; Xue, J.; Lai, C.S.; Wang, Y.; Yuan, H.; Xu, F. Vision Transformer-Based Photovoltaic Prediction Model. Energies 2023, 16, 4737. https://doi.org/10.3390/en16124737
Kang Z, Xue J, Lai CS, Wang Y, Yuan H, Xu F. Vision Transformer-Based Photovoltaic Prediction Model. Energies. 2023; 16(12):4737. https://doi.org/10.3390/en16124737
Chicago/Turabian StyleKang, Zaohui, Jizhong Xue, Chun Sing Lai, Yu Wang, Haoliang Yuan, and Fangyuan Xu. 2023. "Vision Transformer-Based Photovoltaic Prediction Model" Energies 16, no. 12: 4737. https://doi.org/10.3390/en16124737
APA StyleKang, Z., Xue, J., Lai, C. S., Wang, Y., Yuan, H., & Xu, F. (2023). Vision Transformer-Based Photovoltaic Prediction Model. Energies, 16(12), 4737. https://doi.org/10.3390/en16124737