## 3 Results
### Virtual Inertia Optimal Allocation  
The following further analyzes and validates the optimization model and algorithm proposed in this paper. Based on the 114-node system model, six PV virtual synchronous machines and six ESS virtual synchronous machines are set up, and an intelligent soft switch SOP is placed on branch 23-47. The reference frequency is 50 Hz, with a sudden increase in load accounting for 25% of the total load, \(\Delta P=2.5\) MW, where a 1 MW sudden increase in load is set in area 1 and 1.5 MW in area 2. In this paper, the safety limit value of the frequency change rate \(RoCoF_{max}\) is set at 0.5 Hz/s, and the maximum frequency deviation safety limit value \(\Delta f_{max}\) is set at 1 Hz. The capacity and other parameters of the virtual synchronous machine are shown in Table 2.  
Figure 5: The parameter tuning process of RBFNN: (**a**) Curve of MSE of virtual inertia of ESS with the change in Spread value; (**b**) Curve of MSE of virtual inertia of PV system varying with Spread value. Figure 6: The optimization process of RBFNN neurons: (**a**) Curve of the number of neurons changing under the minimum MSE of the virtual inertia of ESS; (**b**) Curve of the number of neurons changing under the minimum MSE of the virtual inertia of the PV system. In this section's simulation, the population size selected by the GA algorithm is 50, and the maximum number of iterations is 50. Considering the system frequency change rate and the maximum frequency difference limit, and taking into account a power shortage of 2.5 MW due to a sudden increase in load, the convergence curve of the objective function of the virtual inertia optimal allocation model is shown in Figure 7. Table 3 presents the optimal virtual inertia constant values of the 12 VSGs and some data of the RoCoF in the two regions after the iterations. As can be seen from Figure 7, the virtual inertia optimal allocation model constructed in this paper demonstrates excellent performance when dealing with multi-region systems. It can achieve a relatively optimal result after 25 iterations, and its convergence speed and calculation accuracy are also very good. To validate the effectiveness and accuracy of the proposed allocation scheme, a load disturbance was applied at t = 2 s, as depicted in Figure 8. Prior to optimization, the frequency nadir in Region 1 was 49.46 Hz, compared to 49.40 Hz in Region 2. Following optimization using the method from reference [25], the nadirs improved to 49.54 Hz and 49.50 Hz in Regions 1 and 2, respectively. Applying the method proposed in this paper yielded further improvement, with nadirs reaching 49.57 Hz in Region 1 and 49.54 Hz in \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**System** & **Device** & **Corresponding Node Position** & **Capacity (MW)** & **Initial Virtual Inertia (s)** \\ \hline Autonomous Region 1 & PV1/PV2/PV3 & 5/92/107 & 0.2 & 5 \\  & ESS1/ESS2/ESS3 & 17/86/89 & 0.1 & 5 \\ Autonomous Region 2 & PV4/PV5/PV6 & 31/43/57 & 0.2 & 5 \\  & ESS4/ESS5/ESS6 & 46/64/67 & 0.1 & 5 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Virtual inertia and capacity of each unit in regions 1 and 2 before optimization. \begin{table}
\begin{tabular}{c c c} \hline \hline
**System** & **Device** & **Optimized Virtual Inertia (s)** & **Optimized RoCoF (Hz/s)** \\ \hline \multirow{6}{*}{Autonomous Region 1} & PV1 & 20.96 & \\  & PV2 & 19.18 & \\  & PV3 & 24.19 & \\ \cline{1-1}  & ESS1 & 21.80 & 0.2090 \\ \cline{1-1}  & ESS2 & 23.58 & \\ \cline{1-1}  & ESS3 & 19.90 & \\ \cline{1-1}  & PV4 & 26.00 & \\ \cline{1-1}  & PV5 & 26.00 & \\ \cline{1-1}  & PV6 & 26.00 & \\ \cline{1-1}  & ESS4 & 26.00 & 0.2205 \\ \cline{1-1}  & ESS5 & 26.00 & \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Virtual inertia of each unit and frequency change rate in regions 1 and 2 after optimization. Figure 7: Iterative process of GA algorithm. Region 2. This represents an increase of 0.11 Hz and 0.14 Hz in the nadir for Regions 1 and 2, respectively, compared to the pre-optimization case.