## 4 Optimization of Multi-Scenario Parameters Based on PSO
### One-Year Running Effect Comparison  
Through the evaluation of the annual operation effect, according to the same optimization design method, optimal parameters for the annual comprehensive operation can be obtained: SOCpro = 100, SOCmin = 40. After setting the parameters of SOCpro and SOCmin, the annual operation of the microgrid system is simulated, and the annual operation curve regardless of the scenario can be obtained as shown in Figure 20.  
The waveforms in Figure 20 from top to bottom are: SOC, weather parameters, SOCpro, and SOCmin. Figure 21 shows the results of the simulation of the comprehensive cost.  
Figure 19: SOC and storage waveforms of Scene 3.  
Figure 20: Simulation waveforms of constant parameters.  
In Figure 21, the ordinate is the comprehensive cost value and the abscissa is the simulation time. The final comprehensive cost simulation result is 37,754 yuan.  
According to the four scenarios discussed in the previous section, four sets of optimal parameters can be obtained, as shown in Table 3.  
According to the annual historical irradiation curve and historical weather conditions, the annual weather conditions curve can be plotted, as shown in Figure 22, where 1 represents sunny and 0 represents cloudy.  
According to different weather conditions and seasons, different parameters are set for different scenarios, and the running curve is shown in Figure 23.  
As can be seen from the above figure, the weather parameters constantly change. According to local heating policies, the heating time is from October 15 to April 15 of the following year, and the corresponding simulation hours are 4020 h to 8400 h. The two parameters of SOCpro and SOCmin  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Scenario Number** & **SOCpro** & **SOCmin** & **Comprehensive Cost (yuan/Day)** \\ \hline Scenario 1 & 36.5 & 36.4 & -77.6 \\ Scenario 2 & 100 & 30 & 284 \\ Scenario 3 & 75.15 & 58.47 & 291.9 \\ Scenario 4 & 100 & 30 & 578.8 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Optimal parameter values in different scenarios.  
Figure 21: Comprehensive cost value of constant parameters.  
Figure 23: Variable parameter simulation waveform.  
Figure 22: Statistics of weather conditions.  
constantly change with the weather and season to adjust the operating strategy of the microgrid system to achieve better operating results. The final comprehensive cost operation results are shown in Figure 24, with a comprehensive cost value of 36,187 yuan.  
It can be seen from Table 4 that the multi-scenario variable parameter optimization method proposed in this paper has better performance of power grid electricity costs and battery loss costs.  
After using variable parameter operation, the annual comprehensive operating cost is reduced by 1567 yuan compared with the overall optimized constant parameter operation strategy, for a cost saving rate of 4.15%. The operating cost is also 3945 yuan lower than the basic real-time control strategy, for a cost saving rate of 9.76%. The use of different operating strategy parameters according to different scenarios is worth adopting in an actual demonstration system.