## 5 Prediction of Photovoltaic Output Power Based on MHPSO-LSTM
### Multivariable Coupling Solar Photovoltaic Power Generation Model  
According to the estimation of available space being 300,000 tons for large oil tankers, it is expected that 2000 m\({}^{2}\) of YGE145 series photovoltaic modules can be laid. Solar photovoltaic power generation systems include solar cell components, hybrid energy storage devices, controllers, and inverters. In this paper, a series of experiments were carried out on a solar ship swing platform. The device consisted of nine xenon lamps, eight solar photovoltaic panels (power factor: 0.861819573, module efficiency: 0.1451) and a six DOF swing table, as shown in Figure 10, which can simulate the movement of the ship at sea, such as the ship's heave, roll, and pitch, and determine the sunlight spreading coefficient and reflectivity in the shipboard photovoltaic power generation system. The artificial light intensity here was controlled to expanded to a 2000 m\({}^{2}\) area as a scale model. The traditional marine photovoltaic power calculation model often only considers the changes in illumination, latitude, and longitude and does not take the PV panel's motion status as a non-negligible variable [21; 22; 23]. Under the traditional model, for ships with a fixed latitude and longitude, such as marine drilling platforms, the power change of a photovoltaic panel only depends on solar radiation \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Method** & **BP NN** & **Kalman** & **LSTM** & **PSO–LSTM** & **MHPSO–LSTM** \\ \hline Roll & MAPE\% & 15.54 & 15.74 & 13.65 & 7.36 & 5.11 \\ Angle (level 5) & RMSE & 0.0328 & 0.0384 & 0.0385 & 0.0366 & 0.0116 \\ Pitch & MAPE\% & 12.51 & 13.68 & 12.52 & 8.87 & 2.98 \\ Angel (level 5) & RMSE & 0.0425 & 0.0476 & 0.0487 & 0.0312 & 0.0312 \\ Roll & MAPE\% & 16.58 & 18.65 & 18.63 & 11.84 & 6.43 \\ Angel (level 3) & RMSE & 0.1911 & 0.1974 & 0.1832 & 0.1611 & 0.0966 \\ Pitch & MAPE\% & 16.67 & 16.45 & 15.76 & 10.56 & 5.61 \\ Angel (level 3) & RMSE & 0.1798 & 0.1723 & 0.1678 & 0.1421 & 0.0834 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The MAPE and RMSE values of the 5 methods for forecasting the PV panel. Figure 10: Solar ship swing platform. intensity \(I_{T}\)[24; 25]. In this paper, the change of the photovoltaic panel inclination angle was introduced into the ship's photovoltaic power calculation model and the output power of the photovoltaic system was predicted for 10 s via the improved MHPSO-LSTM algorithm. The improvement of the calculation model provides a reliable basis for the power planning and dispatching of a ship's power grid and is a control method based on prediction. The direct solar radiation on the swinging photovoltaic surface can be represented by Figure 11.  
Since the amount of solar energy received on side AC is equal to the amount of solar energy received on side AB, this can be denoted by Equation (22). The amount of tilted photovoltaic radiation can be expressed by Equations (23)-(26):  
\[I_{T,b}=I_{n}\cos\theta \tag{22}\]  
\[I_{T}=I_{T,b}+I_{T,d}+I_{T,r} \tag{23}\]  
\[=I_{n}\cos\theta+I_{d}(\frac{1+\cos\delta}{2})+\rho(\frac{1-\cos\delta}{2}) \tag{24}\]  
\[I_{T,d}=(1+\cos\delta)/2 \tag{25}\]  
\[I_{T,b}=I_{n}\cos\theta \tag{26}\]  
where \(\theta\) is the sun angle, \(I_{T,d}\) is the scattered radiation, \(I_{T,b}\) is the direct solar radiation, \(I_{T,r}\) is the deck reflected radiation, \(I_{n}\) is the value of the direct solar radiation incident on the surface, \(I_{d}\) is the amount of scattered solar radiation on the horizontal plane, and \(\rho\) is the ground reflectivity. Here, \(\delta\) is the predicted value of the inclination of the deck, which is calculated in Section 5.