# Combined Prediction of Photovoltaic Power Based on Sparrow Search Algorithm Optimized Convolution Long and Short-Term Memory Hybrid Neural Network

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Improved Variational Mode Decomposition and Fluctuation Feature Recognition Model

#### 2.1. Improved Variational Mode Decomposition

#### 2.2. Fluctuation Feature Recognition Model

## 3. Improved Sparrow Search Algorithm Theory

#### 3.1. Improved Tent Chaotic Map

_{k}represents the k-th mapping value.

_{k}

_{+1}> 1, its return value is 1; when z

_{k}

_{+1}< 0, its return value is 0.

_{k}and u

_{k}represent the minimum and maximum values of the optimized variable interval, respectively.

_{0}of z

_{k}in (10);

_{ik}, i = 1, 2, ..., n};

_{ik}to the population solution space to complete the population initialization.

#### 3.2. Sparrow Search Algorithm

_{1}, x

_{2}, …, x

_{N}], and the fitness function corresponding to each individual is F = [f(x

_{1}), f(x

_{2}), …, f(x

_{N})]

^{T}, where the discoverer location update rule is as follows:

_{max}is the maximum number of iterations, R

_{2}is the alarm value, ST is the safety threshold, Q is a random number that obeys a normal distribution; L is a 1 × d matrix, and d represents an individual dimension.

^{+}= A

^{T}(AA

^{T})

^{−1}.

_{i}is the current individual fitness value, fg and f

_{w}are the current global optimal and worst individual fitness values respectively.

#### 3.3. Improved Sparrow Search Algorithm Optimization Process

## 4. CNN/LSTM Hybrid Network Model

#### 4.1. Long and Short-Term Memory Neural Network

_{t}

_{−1}, h

_{t}

_{−1}and x

_{t}, which represent the long-term memory information of the previous moment, the short-term memory information of the previous moment, and the current input, respectively. There are three gates inside the model to control whether the information is discarded or not: input gate, output gate, and forget gate. The update formula is as follows:

_{t}is the final output result; * is the Hadamard product.

#### 4.2. Convolutional Neural Network

## 5. The Prediction Process of PV Power Based on SSA—CLSTM

_{1}to component M

_{N}are used as the training output of CNN

_{1}to CNN

_{N}models, and component M

_{N}

_{−1}to component M

_{K}are used as the training output of LSTM

_{N}

_{−1}to LSTM

_{K}models. All models use the same historical environment data as the corresponding training input. In the process of training the model, the improved sparrow search algorithm is used to optimize the model parameters, so as to establish the corresponding prediction model.

## 6. Case Studies and Discussion

#### 6.1. Data Set

#### 6.2. Error Measure

#### 6.3. Improved Variational Modal Decomposition Results

#### 6.4. Comparative Studies

#### 6.5. Discussion

## 7. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## References

- Wang, C.Y.; Duan, Q.Q.; Zhou, K. A hybrid model for photovoltaic power prediction of both convolution and long short-term memory neural networks optimized by genetic algorithm. Acta Phys. Sin.
**2020**, 69, 149–155. [Google Scholar] - Shi, K.J.; Zhang, D.X.; Han, X.Q.; Xie, Z.J. Digital twin model of photovoltaic power generation prediction based on LSTM and migration learning. Power Syst. Technol.
**2021**, 46, 1363–1372. [Google Scholar] - Ospina, J.; Newaz, A.; Faruque, M.O. Forecasting of PV plant output using hybrid wavelet-based LSTM-DNN structure model. IET Renew. Power Gener.
**2019**, 13, 1087–1095. [Google Scholar] [CrossRef] - Zhang, W. Short-Term solar power forecasting and uncertainty analysis using long and short-term memory. J. Nanoelectron. Optoelectron.
**2021**, 16, 1948–1955. [Google Scholar] [CrossRef] - Zhang, N.; Ge, L.J. Combination forecast of photovoltaic short-term output interval based on SOA optimization. Acta Sol. Energy
**2021**, 42, 252–259. [Google Scholar] - Hui, L.; Ren, Z.Y.; Yan, X.; Li, W.Y.; Bo, H. A Multi-Data Driven Hybrid Learning Method for Weekly Photovoltaic Power Scenario Forecast. IEEE Trans. Sustain. Energy
**2022**, 13, 91–100. [Google Scholar] - Rocha, A.S.F.; Guerra, F.K.D.M.V.; Vale, M.R.B.G. Forecasting the Performance of a Photovoltaic Solar System Installed in other Locations using Artificial Neural Networks. Electr. Power Compon. Syst.
**2020**, 48, 201–212. [Google Scholar] [CrossRef] - Guan, L.; Zhao, Q.; Zhou, B.R. Multi-scale clustering analysis based modeling of photovoltaic power character-istics and its application in prediction. Autom. Electr. Power Syst.
**2018**, 42, 24–30. [Google Scholar] - Chaibi, Y.; El Rhafiki, T.; Simon-Allue, R. Physical models for the design of photovoltaic/thermal collector systems. Sol. Energy
**2021**, 226, 134–146. [Google Scholar] [CrossRef] - Pan, M.Z.; Li, C.; Gao, R. Photovoltaic power forecasting based on a support vector machine with improved ant colony optimization. J. Clean. Prod.
**2020**, 277, 123948. [Google Scholar] [CrossRef] - Zhou, Y.; Zhou, N.; Gong, L. Prediction of photovoltaic power output based on similar day analysis, genetic algorithm and extreme learning machine. Energy
**2020**, 204, 117894. [Google Scholar] [CrossRef] - Wen, X.Q.; Yang, X. Wind Turbine Power Characteristic Analysis and Predictive Modeling Based on EMD Decomposition. Acta Sol. Energy
**2021**, 42, 293–298. [Google Scholar] - Su, W.; Jiang, X.; Zeng, L. Ultra-short-term photovoltaic power prediction based on VMD-DESN-MSGP model. Power Syst. Technol.
**2020**, 44, 917–926. [Google Scholar] - Nie, Y.; Sun, Y.; Chen, Y. PV power output prediction from sky images using convolutional neural network:The comparison of sky-condition-specific sub-models and an end-to-end model. J. Renew. Sustain. Energy
**2020**, 12, 046101. [Google Scholar] [CrossRef] - Zhang, Q.; Ma, Y.; Li, G.L. Applications of frequency domain decomposition and deep learning algorithms in short-term load and photovoltaic power forecasting. Proc. CSEE
**2019**, 39, 2221–2230. [Google Scholar] - Lu, J.X.; Zhang, Q.P.; Yang, Z.H. Short-term load forecasting method based on CNN-LSTM hybrid neural network model. Autom. Electr. Power Syst.
**2019**, 43, 131–137. [Google Scholar] - Zhou, F.C.; Tang, G.J.; He, Y.L. Unbalanced fault feature extraction for wind power gearbox based on improved VMD. Vib. Shock
**2020**, 39, 170–176. [Google Scholar] - Ye, L.; Pei, M.; Lu, P. Combination forecasting method of short-term photovoltaic power based on weather classification. Autom. Electr. Power Syst.
**2021**, 45, 44–54. [Google Scholar]

**Figure 9.**The prediction results of different prediction methods under the two weather types. (

**a**) Forecast results of slow weather changes; (

**b**) Forecast results of severe weather changes.

Predictive Model | MAE/% | MAPE/% | MSE/% | RMSE/% | ||||
---|---|---|---|---|---|---|---|---|

a | b | a | b | a | b | a | b | |

BP | 12.33 | 18.56 | 10.91 | 17.16 | 1.34 | 3.05 | 16.34 | 19.24 |

CNN | 7.68 | 15.37 | 7.59 | 14.92 | 0.98 | 1.97 | 12.11 | 15.03 |

LSTM | 6.08 | 9.16 | 4.20 | 8.52 | 0.84 | 1.76 | 9.18 | 14.32 |

CLSTM | 3.28 | 6.43 | 1.36 | 2.84 | 0.39 | 1.03 | 6.26 | 10.28 |

SSA-CLSTM | 2.92 | 4.29 | 1.02 | 2.19 | 0.34 | 0.94 | 1.36 | 4.71 |

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

**MDPI and ACS Style**

Li, S.; Yang, J.; Wu, F.; Li, R.; Rashed, G.I.
Combined Prediction of Photovoltaic Power Based on Sparrow Search Algorithm Optimized Convolution Long and Short-Term Memory Hybrid Neural Network. *Electronics* **2022**, *11*, 1654.
https://doi.org/10.3390/electronics11101654

**AMA Style**

Li S, Yang J, Wu F, Li R, Rashed GI.
Combined Prediction of Photovoltaic Power Based on Sparrow Search Algorithm Optimized Convolution Long and Short-Term Memory Hybrid Neural Network. *Electronics*. 2022; 11(10):1654.
https://doi.org/10.3390/electronics11101654

**Chicago/Turabian Style**

Li, Shun, Jun Yang, Fuzhang Wu, Rui Li, and Ghamgeen Izat Rashed.
2022. "Combined Prediction of Photovoltaic Power Based on Sparrow Search Algorithm Optimized Convolution Long and Short-Term Memory Hybrid Neural Network" *Electronics* 11, no. 10: 1654.
https://doi.org/10.3390/electronics11101654