Short-Term Forecasting of Photovoltaic Power Using Multilayer Perceptron Neural Network, Convolutional Neural Network, and k-Nearest Neighbors’ Algorithms
Abstract
:1. Introduction
2. A Brief Overview of Solar PV Power Prediction in the Literature
3. Artificial Neural Network
3.1. Multilayer Perceptron Neural Networks (MLPNN)
3.2. Convolutional Neural Networks (CNNs)
3.3. k-Nearest Neighbour (kNN)
Algorithm 1: The kNN algorithm. |
function kNN_predict(train_data, test_data, k): distances = [] for each train_instance in train_data: distance = calc_distance(train_instance, test_data) distances.append((train_instance, distance)) sorted_distances = sort(distances, by = distance) k_nearest_neighbours = sorted_distances[:k] counts = {} for neighbour in k_nearest_neighbours: label = neighbour[0].label if label in counts: counts[label] + = 1 else: counts[label] = 1 predicted_label = getmax(counts) return predicted_label |
4. Data Description and Variable Selection
4.1. Data Description
4.2. Selecting Input Variables
4.3. Prediction Intervals and Performance Evaluation
4.3.1. Prediction Intervals
4.3.2. Performance Matrices
4.4. Selecting Input Variables
5. Results
5.1. Prediction Results
5.2. Prediction Accuracy Analysis
5.2.1. Prediction Interval Evaluation
5.2.2. Analysing Residuals
5.3. Discussion of Results
6. Challenges of Photovoltaic Power Forecasting
7. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Jun, L.; Yuan, Q. The design of distributed photovoltaic charging station for electric vehicles. In Proceedings of the International Conference on Smart Transportation and City Engineering (STCE 2023), 130180H, Chongqing, China, 20–22 October 2023. [Google Scholar]
- Andrade, J.R.; Bessa, R.J. Improving Renewable Energy Forecasting with a Grid of Numerical Weather Predictions. IEEE Trans. Sustain. Energy 2017, 8, 1571–1580. [Google Scholar] [CrossRef]
- Sun, S.; Wang, S.; Zhang, G.; Zheng, J. A decomposition-clustering-ensemble learning approach for solar radiation forecasting. Sol. Energy 2018, 163, 189–199. [Google Scholar] [CrossRef]
- 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; pp. 1–4. [Google Scholar]
- Ratshilengo, M.; Sigauke, C.; Bere, A. Short-Term Solar Power Forecasting Using Genetic Algorithms: An Application Using South African Data. Appl. Sci. 2021, 11, 4214. [Google Scholar] [CrossRef]
- Iheanetu, K.J. Solar Photovoltaic Power Forecasting: A Review. Sustainability 2022, 14, 17005. [Google Scholar] [CrossRef]
- Das, U.K.; Tey, K.S.; Seyedmahmoudian, M.; Mekhilef, S.; Idris, M.Y.I.; Van Deventer, W.; 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]
- Blanc, P.; Remund, J.; Vallance, L. Short-term solar power forecasting based on satellite images. In Renewable Energy Forecasting: From Models to Applications; Woodhead Publishing: Sawston, UK, 2017; pp. 179–198. [Google Scholar]
- Wang, G.; Su, Y.; Shu, L. One-day-ahead daily power forecasting of photovoltaic systems based on partial functional linear regression models. Renew. Energy 2016, 96, 469–478. [Google Scholar] [CrossRef]
- Coimbra, C.F.; Kleissl, J.; Marquez, R. Overview of Solar-Forecasting Methods and A Metric for Accuracy Evaluation; Academic Press: Boston, MA, USA, 2013; pp. 171–194. [Google Scholar]
- Gensler, A.; Henze, J.; Sick, B.; Raabe, N. Deep Learning for solar power forecasting—An approach using AutoEncoder and LSTM Neural Networks. In Proceedings of the 2016 IEEE International Conference, Systems, Man, and Cybernetics (SMC), Budapest, Hungary, 9 October 2016; pp. 2858–2865. [Google Scholar]
- Wang, H.; Yi, H.; Peng, J.; Wang, G.; Liu, Y.; Jiang, H.; Liu, W. Deterministic and probabilistic forecasting of photovoltaic power based on deep convolutional neural network. Energy Convers. Manag. 2017, 153, 409–422. [Google Scholar] [CrossRef]
- Bin, F.; He, J. A short-term photovoltaic power prediction model using cyclical encoding and STL decomposition based on LSTM. In Proceedings of the 2023 3rd International Conference on Electronic Information Engineering and Computer Communication (EIECC), Wuhan, China, 22–24 December 2023; pp. 260–266. [Google Scholar]
- Saxena, N.; Kumar, R.; Rao, Y.K.S.S.; Mondloe, D.S.; Dhapekar, N.K.; Sharma, A.; Yadav, A.S. Hybrid KNN-SVM machine learning approach for solar power forecasting. Environ. Chall. 2024, 14, 100838. [Google Scholar] [CrossRef]
- Lima, M.A.F.B.; Carvalho, P.C.M.; Braga, A.P.d.S.; Ramírez, L.M.F.; Leite, J.R. MLP Back Propagation Artificial Neural Network for Solar Resource Forecasting in Equatorial Areas. Renew. Energy Power Qual. J. 2018, 1, 175–180. [Google Scholar] [CrossRef]
- Costa, R.L.D.C. Convolutional-LSTM networks and generalization in forecasting of household photovoltaic generation. Eng. Appl. Artif. Intell. 2022, 116, 105458. [Google Scholar] [CrossRef]
- Li, G.; Xie, S.; Wang, B.; Xin, J.; Li, Y.; Du, S. Photovoltaic Power Forecasting with a Hybrid Deep Learning Approach. IEEE Access 2020, 8, 175871–175880. [Google Scholar] [CrossRef]
- Wang, Y.; Liao, W.; Chang, Y. Gated Recurrent Unit Network-Based Short-Term Photovoltaic Forecasting. Energies 2018, 11, 2163. [Google Scholar] [CrossRef]
- Gao, B.; Huang, X.; Shi, J.; Tai, Y.; Xiao, R. Predicting day-ahead solar irradiance through gated recurrent unit using weather forecasting data. J. Renew. Sustain. Energy 2019, 11, 043705. [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]
- Tajmouati, S.; Wahbi, B.E.L.; Dakkon, M. Applying regression conformal prediction with nearest neighbors to time series data. Commun. Stat.-Simul. Comput. 2024, 53, 1768–1778. [Google Scholar] [CrossRef]
- Yehor, S.; Kateryna, K. Selection of the K Parameter in the K-Nearest Neighbor Algorithm for Solar Power Prediction. In Proceedings of the 2023 IEEE International Conference on Information and Telecommunication Technologies and Radio Electronics (UkrMiCo), Kyiv, Ukraine, 13–18 November 2023; pp. 306–311. [Google Scholar]
- Amer, A.Y.A. Global-local least-squares support vector machine (GLocal-LS-SVM). PLoS ONE 2023, 18, e0285131. [Google Scholar]
- Reyes-Belmonte, M.A. Quo Vadis Solar Energy Research? Appl. Sci. 2021, 11, 3015. [Google Scholar] [CrossRef]
- Cherkassky, V.; Ma, Y. Practical selection of SVM parameters and noise estimation for SVM regression. Neural Netw. 2004, 17, 113–126. [Google Scholar] [CrossRef] [PubMed]
- Huang, J.; Korolkiewicz, M.; Agrawal, M.; Boland, J. Forecasting solar radiation on an hourly time scale using a Coupled AutoRegressive and Dynamical System (CARDS) model. Sol. Energy 2013, 87, 136–149. [Google Scholar] [CrossRef]
- El Hendouzi, A.; Bourouhou, A.; Ansari, O. The Importance of Distance between Photovoltaic Power Stations for Clear Accuracy of Short-Term Photovoltaic Power Forecasting. J. Electr. Comput. Eng. 2020, 2020, 1–14. [Google Scholar] [CrossRef]
- Luo, X.; Zhang, D.; Zhu, X. Deep learning based forecasting of photovoltaic power generation by incorporating domain knowledge. Energy 2021, 225, 120240. [Google Scholar] [CrossRef]
- Zhu, H.; Li, X.; Sun, Q.; Nie, L.; Yao, J.; Zhao, G. A Power Prediction Method for Photovoltaic Power Plant Based on Wavelet Decomposition and Artificial Neural Networks. Energies 2015, 9, 11. [Google Scholar] [CrossRef]
- Xu, Q.; He, D.; Zhang, N.; Kang, C.; Xia, Q.; Bai, J.; Huang, J. A Short-Term Wind Power Forecasting Approach with Adjustment of Numerical Weather Prediction Input by Data Mining. IEEE Trans. Sustain. Energy 2015, 6, 1283–1291. [Google Scholar] [CrossRef]
- Aminzadeh, F.; De Groot, P. Neural Networks and Other Soft Computing Techniques with Applications in the Oil Industry; Eage Publications: Bunnik, The Netherlands, 2006. [Google Scholar]
- Hossain, S.; Ong, Z.C.; Ismail, Z.; Noroozi, S.; Khoo, S.Y. Artificial neural networks for vibration based inverse parametric identifications: A review. Appl. Soft Comput. 2017, 52, 203–219. [Google Scholar] [CrossRef]
- Zhang, Y.; Chen, G.; Malik, O.; Hope, G. An artificial neural network based adaptive power system stabilizer. IEEE Trans. Energy Convers. 1993, 8, 71–77. [Google Scholar] [CrossRef]
- Moreira, M.O.; Balestrassi, P.P.; Paiva, A.P.; Ribeiro, P.F.; Bonatto, B.D. Design of experiments using artificial neural network ensemble for photovoltaic generation forecasting. Renew. Sustain. Energy Rev. 2021, 135, 110450. [Google Scholar] [CrossRef]
- Malki, H.A.; Karayiannis, N.B.; Balasubramanian, M. Short-term electric power load forecasting using feedforward neural networks. Expert Syst. 2004, 21, 157–167. [Google Scholar] [CrossRef]
- Chen, S.M.; Chang, Y.C.; Chen, Z.J.; Chen, C.L. Multiple Fuzzy Rules Interpolation with Weighted Antecedent Variables in Sparse Fuzzy Rule-Based Systems. Int. J. Pattern Recognit. Artif. Intell. 2013, 27, 1359002. [Google Scholar] [CrossRef]
- Yona, A.; Senjyu, T.; Funabashi, T.; Kim, C.-H. Determination Method of Insolation Prediction with Fuzzy and Applying Neural Network for Long-Term Ahead PV Power Output Correction. IEEE Trans. Sustain. Energy 2013, 4, 527–533. [Google Scholar] [CrossRef]
- Srisaeng, P.; Baxter, G.S.; Wild, G. An adaptive neuro-fuzzy inference system for forecasting Australia’s domestic low cost carrier passenger demand. Aviation 2015, 19, 150–163. [Google Scholar] [CrossRef]
- Ali, M.N.; Mahmoud, K.; Lehtonen, M.; Darwish, M.M.F. An Efficient Fuzzy-Logic Based Variable-Step Incremental Conductance MPPT Method for Grid-Connected PV Systems. IEEE Access 2021, 9, 26420–26430. [Google Scholar] [CrossRef]
- Zhang, J.; Verschae, R.; Nobuhara, S.; Lalonde, J.-F. Deep photovoltaic nowcasting. Sol. Energy 2018, 176, 267–276. [Google Scholar] [CrossRef]
- Parvez, I.; Sarwat, A.; Debnath, A.; Olowu, T.; Dastgir, M.G.; Riggs, H. Multi-layer Perceptron based Photovoltaic Forecasting for Rooftop PV Applications in Smart Grid. In Proceedings of the 2020 SoutheastCon, Raleigh, NC, USA, 12–15 March 2020; pp. 1–6. [Google Scholar]
- Hontoria, L.; Aguilera, J.; Zufiria, P. Generation of hourly irradiation synthetic series using the neural network multilayer perceptron. Sol. Energy 2002, 72, 441–446. [Google Scholar] [CrossRef]
- Pham, B.T.; Tien Bui, D.; Prakash, I.; Dholakia, M.B. Hybrid integration of Multilayer Perceptron Neural Networks and machine learning ensembles for landslide susceptibility assessment at Himalayan area (India) using GIS. CATENA 2017, 149, 52–63. [Google Scholar] [CrossRef]
- Parvez, I.; Sriyananda, M.G.S.; Güvenç, I.; Bennis, M.; Sarwat, A. CBRS Spectrum Sharing between LTE-U and WiFi: A Multiarmed Bandit Approach. Mob. Inf. Syst. 2016, 2016, 5909801. [Google Scholar] [CrossRef]
- 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]
- Babalhavaeji, A.; Radmanesh, M.; Jalili, M.; Gonzalez, S. Photovoltaic generation forecasting using convolutional and recurrent neural networks. Energy Rep. 2023, 9, 119–123. [Google Scholar] [CrossRef]
- Horton; Mukai, Y.; Nakai, K. Protein Subcellular Localization Prediction. Pract. Bioinformatician 2004, 193–216. [Google Scholar] [CrossRef]
- Liu, Z.; Zhang, Z. Solar forecasting by K-Nearest Neighbors method with weather classification and physical model. In Proceedings of the 2016 North American power symposium (NAPS), Denver, CO, USA, 18–20 September 2016; pp. 1–6. [Google Scholar]
- Kohavi, R.; John, G.H. Wrappers for feature subset selection. Artif. Intell. 1995, 97, 273–324. [Google Scholar] [CrossRef]
- Chatfield, C. Calculating Interval Forecasts. J. Bus. Econ. Stat. 1993, 11, 121–135. [Google Scholar] [CrossRef]
- Gaba, A.; Tsetlin, I.; Winkler, R.L. Combining Interval Forecasts. Decis. Anal. 2017, 14, 1–20. [Google Scholar] [CrossRef]
- Sun, X.; Wang, Z.; Hu, J. Prediction Interval Construction for Byproduct Gas Flow Forecasting Using Optimized Twin Extreme Learning Machine. Math. Probl. Eng. 2017, 2017, 5120704. [Google Scholar] [CrossRef]
- Mutavhatsindi, T.; Sigauke, C.; Mbuvha, R. Forecasting Hourly Global Horizontal Solar Irradiance in South Africa Using Machine Learning Models. IEEE Access 2020, 8, 198872–198885. [Google Scholar] [CrossRef]
- Sengupta, M.; Habte, A.; Wilbert, S.; Gueymard, C.; Remund, J. Best Practices Handbook for the Collection and Use of Solar Resource Data for Solar Energy Applications, 3rd ed.; National Renewable Energy Laboratory (NREL): Golden, CO, USA, 2021.
- Dolara, A.; Grimaccia, F.; Leva, S.; Mussetta, M.; Ogliari, E. A Physical Hybrid Artificial Neural Network for Short Term Forecasting of PV Plant Power Output. Energies 2015, 8, 1138–1153. [Google Scholar] [CrossRef]
Ref. | Forecast Horizon | Target | Forecast Method | Forecast Error |
---|---|---|---|---|
[5] | Short-term | PV power | LSTM | RMSE = 67.8%, MAE = 43.8%, NRMSE = 0.19% |
CNN | RMSE = 38.5%, MAE = 4.0%, NRMSE = 0.04% | |||
CNN-LSTM | RMSE = 5.2%, MAE = 2.9%, NRMSE = −0.03% | |||
[5] | Short-term | Irradiance | RNN | RMSE = 56.89%, MAE = 20.18%, rRME = 7.54%, rMAE = −4.49% |
kNN | RMSE = 57.48%, MAE = 20.94%, rRME = 7.58%, rMAE = 4.58% | |||
GA | RMSE = 35.50%, MAE = 26.74%, rRME = 5.95%, rMAE = 5.17% | |||
[27] | Very short-term | PV power | Persistence, MLP, CNN, LSTM | RMSE = 15.3% |
[28] | Short-term | PV power | Similarity algorithm, kNN, NARX, and smart persistence models | RMSE = 2.3% |
[29] | Short-term | PV power | Hybrid model of wavelet decomposition and ANN | RMSE values between 7.193 and 19.663% |
[16] | Short- and long-term | PV power | Prophet, LSTM, CNN, C-LSTM | MAE range 2.9–16,730.3, RMSE range 5.2–21,753.2, NRMSE range 0.0–30.59 |
[15] | Short-term | Irradiance | MLPNN | MAPE = 6.15% |
[30] | Short-term | Wind power | k-means clustering method | MAPE ≈ 11% |
Variables | Coefficients |
---|---|
Global normal irradiance | 0.790206 |
Diffuse irradiance | 0.902841 |
Reflected irradiance | 0.000000 |
Sun elevation | −0.412872 |
Ambient temperature | −0.817793 |
Wind speed | 1.017501 |
24-h time cycle | 0.186437 |
(a) Clear sky day in summer | (b) Cloudy sky day in summer | |||||
MLPNN | CNN | kNN | MLPNN | CNN | kNN | |
RMSE | 21.42 | 23.15 | 4.95 | 39.35 | 67.54 | 2.08 |
rRMSE | 8.69 | 9.39 | 2.01 | 39.40 | 67.62 | 2.08 |
MAE | 12.34 | 14.04 | 2.74 | 21.86 | 46.19 | 1.11 |
rMAE | 0.49 | 0.56 | 0.11 | 0.91 | 1.92 | 0.05 |
R2 | 0.99 | 0.99 | 1.00 | 0.92 | 0.77 | 1.00 |
(c) Clear sky day in winter | (d) Cloudy sky day in winter | |||||
MLPNN | CNN | kNN | MLPNN | CNN | kNN | |
RMSE | 10.96 | 25.69 | 4.11 | 17.22 | 20.09 | 1.49 |
rRMSE | 9.71 | 22.77 | 3.64 | 32.59 | 38.04 | 2.82 |
MAE | 6.47 | 14.09 | 2.00 | 8.18 | 12.88 | 0.85 |
rMAE | 0.27 | 0.59 | 0.08 | 0.34 | 0.54 | 0.04 |
R2 | 1.00 | 0.98 | 1.00 | 0.95 | 0.93 | 1.00 |
(a) Clear sky day in summer | (b) Cloudy sky day in summer | |||||
MLPNN | MLPNN | MLPNN | ||||
PICP | 28.0 | 28.95 | 96 | 12.5 | 4.17 | 91.67 |
PINAW | 0.631 | 0.622 | 0.637 | 0.561 | 0.633 | 0.511 |
PINAD | 0.0520 | 0.0989 | 0.0002 | 0.4510 | 1.0619 | 0.0011 |
(c) Clear sky day in winter | (d) Cloudy sky day in winter | |||||
MLPNN | MLPNN | MLPNN | ||||
PICP | 20.83 | 20.83 | 100.0 | 12.5 | 4.16 | 87.50 |
PINAW | 0.507 | 0.455 | 0.481 | 0. 530 | 0.526 | 0.495 |
PINAD | 0.0866 | 0.2212 | 0.0000 | 0. 2769 | 0.5736 | 0.0016 |
Median | Min | Max | Mean | Std. Dev. | Skewness | Kurtosis | |
---|---|---|---|---|---|---|---|
MLPNN | 0.09 | −57.31 | 67.73 | −1.36 | 22.20 | 0.28 | 2.56 |
CNN | 0.17 | −77.58 | 30.96 | −6.05 | 24.62 | −1.31 | 1.68 |
kNN | 0.00 | −12.54 | 10.92 | 1.01 | 4.39 | 0.16 | 1.79 |
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
Iheanetu, K.; Obileke, K. Short-Term Forecasting of Photovoltaic Power Using Multilayer Perceptron Neural Network, Convolutional Neural Network, and k-Nearest Neighbors’ Algorithms. Optics 2024, 5, 293-309. https://doi.org/10.3390/opt5020021
Iheanetu K, Obileke K. Short-Term Forecasting of Photovoltaic Power Using Multilayer Perceptron Neural Network, Convolutional Neural Network, and k-Nearest Neighbors’ Algorithms. Optics. 2024; 5(2):293-309. https://doi.org/10.3390/opt5020021
Chicago/Turabian StyleIheanetu, Kelachukwu, and KeChrist Obileke. 2024. "Short-Term Forecasting of Photovoltaic Power Using Multilayer Perceptron Neural Network, Convolutional Neural Network, and k-Nearest Neighbors’ Algorithms" Optics 5, no. 2: 293-309. https://doi.org/10.3390/opt5020021
APA StyleIheanetu, K., & Obileke, K. (2024). Short-Term Forecasting of Photovoltaic Power Using Multilayer Perceptron Neural Network, Convolutional Neural Network, and k-Nearest Neighbors’ Algorithms. Optics, 5(2), 293-309. https://doi.org/10.3390/opt5020021