## 5 Prediction of Photovoltaic Output Power Based on MHPSO-LSTM
### Experimental Results  
The operating environment here was 1200 W/m\({}^{2}\), 25 \({}^{\circ}\)C temperature, and the power generated by the PV system was fluctuate around 270 kW. Solar PV power generation systems include solar cell components, hybrid energy storage devices, diesel, controllers, and inverters. Here, the AC bus voltage was 440 V and the AC frequency was 60 Hz during the simulation, and the ship's operating conditions were referenced from being anchored. The basic diagram of the solar photovoltaic power generation system is shown as Figure 15.  
Figure 14: Correcting the annual solar radiation according to the route.  
Figure 12: Route map.  
Figure 13: Total power generated by the PV system at various latitudes.  
After the route and time were selected, Equations (29) and (30) of the solar PV power generation system were used to calculate output power.  
\[P_{PV(t)}=\eta_{PV}\times A_{PV}\times I_{t} \tag{29}\]  
\[\eta_{PV}=\eta_{PV\_rated}\cdot\eta_{MPPT}[1-\varepsilon(T_{c}-T_{c\_ref})] \tag{30}\]  
where \(I_{t}\) is the light radiation intensity, \(\eta_{PV}\) is the conversion efficiency of the solar panel, \(A_{PV}\) is the area for laying the photovoltaic panels on the deck, \(\eta_{PV\_rated}\) is the rated PV conversion efficiency of the PV module, \(\eta_{MPPT}\) is the conversion efficiency under MPPT control, \(\varepsilon\) is the power temperature coefficient of the PV module, \(T_{c}\) is the temperature of the surface of the PV module, and \(T_{c\_ref}\) is the temperature of the PV module under standard conditions.  
The fluctuation of the inclination is intense and random, and the radiation of the photovoltaic panel changes frequently. Figures 16 and 17 show the fluctuation of solar radiation and PV output power in the short-term. The result of the proposed model shows that the actual power output of PV panel fluctuates randomly within a range (250-275 kW), 265 kW is the average value in one hour. If we adopt the traditional model (fixed PV panel angle) and do not consider the change of inclination as a variable, the power output of Figure 18 can be obtained. Obviously, comparing with the result of our proposed model, the cases of \(\delta\) = 4 and \(\delta\) = 8 in Figure 18 are both an ideal state, the extra energy production are higher and lower than the result of the proposed model as shown in Figure 17 by 5 kW and 15 kW respectively. If this error is enlarged to the annual scale, the extra energy production 30,000-60,000 kWh will be mistaken as the value that should be considered in the power planning.  
Figure 16: Fluctuation of solar radiation.  
Figure 15: Photovoltaic power generation system.  
According to the calculation model proposed in previous section, Figures 19 and 20 show the short-term power prediction based on five methods under level-5 and level-3 sea state within 10 s for a shipborne solar power system, Table 4 shows the MAPE and RMSE value of forecasting the energy production. It can be seen that the power prediction accuracy with MHPSO-LSTM structure is improved by 50% to 70% compared with other methods. Therefore, the proposed algorithm reveals better prediction performance in forecasting the short-term power fluctuation.  
Figure 19: Power fluctuation forecasting under level-5 sea state.  
Figure 17: Fluctuation of the photovoltaic system over 1 h.  
Figure 18: Power generation of the photovoltaic system with a traditional model.