## 2 Materials and Methods
### Virtual Inertia Boundary Evaluation Based on RBF Neural Network
#### 2.1.1 Characterization of Virtual Inertia in New Distribution Systems  
In the distribution system, grid-forming PV and distributed ESS have become the main sources of virtual inertia. Under the same disturbance, PV and ESS of the same capacity have different abilities to support system frequency, with ESS devices having the strongest support capacity and PV power generation systems having the weakest. The sources of virtual inertia in the new distribution system are shown in Figure 1.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Reference** & **System Type** & **Optimization Objective** \\ \hline
[16] & Two-machine system & Analysis only \\
[17] & Islanded two-machine system & Analysis only \\
[18] & Second-order dynamic model of renewable energy system & Equal disturbance damping ratios \\
[19] & IEEE four-machine two-area system & Maximizing damping ratio of inter-area oscillation modes \\ This article & A real 114-node system in East China & Minimizing and balancing frequency change rates in two areas \\ \hline \hline \end{tabular}
\end{table}
Table 1: Overview of existing virtual inertia allocation methods.  
The magnitude of the virtual inertia that PV and ESS can provide has been characterized by different types of methods in existing research. In reference [20], a PV system model using virtual inertia control is presented, coupling the variation in grid angular frequency \(\Delta\omega\) with the variation in the DC bus voltage on the high-voltage side \(\Delta U_{\text{dc}}\), enabling the DC capacitor voltage to respond to the frequency changes in the system and provide transient energy support. Under the effect of virtual inertia control, the virtual inertia coefficient of the system \(H_{v}\) can be expressed as follows:  
\[H_{v}=\frac{C_{v}U_{dc}^{2}}{2S_{B}}=\frac{C_{dc}U_{dc}^{2}U_{dc0}}{2S_{B} \omega_{0}}K_{v}(s) \tag{1}\]  
where \(C_{v}\) is the DC bus capacitor under virtual inertia control, \(C_{\text{dc}}\) is the DC bus capacitor on the high-voltage side; \(S_{B}\) is the capacity of the system, \(U_{dc}\) is the voltage at both ends of the high-voltage DC bus, \(U_{dc0}\) is the initial value of the voltage at both ends of the high-voltage DC bus, \(\omega_{0}\) is the initial angular frequency, and \(K_{v}(s)\) is the controller.  
This paper adopts virtual inertia control based on a high-pass filter. When the virtual inertia control uses VICHF, the transfer function of \(K_{v}(s)\) can be expressed as follows:  
\[K_{v}(s)=\frac{K_{h}s}{s+\omega_{h}} \tag{2}\]  
where \(K_{h}\) and \(\omega_{h}\) are, respectively, the gain coefficient and the cut-off frequency of VICHF.  
The value of the virtual inertia that the ESS can provide can be expressed in the same way as that for the virtual inertia of the ESS device [21]:  
\[H_{ESS}=\frac{U_{N}Q_{N}\omega_{e}}{2S_{ESS}}\frac{\Delta\gamma_{soc}^{\prime} }{\Delta\omega_{e}} \tag{3}\]  
where \(U_{N},\ Q_{N},\ \gamma_{soc},\ \Delta\gamma_{soc}^{\prime},\ \Delta\  
the state of charge in engineering practice, this section considers using an RBFNN to input different disturbances and specific known parameters and output the magnitude of virtual inertia. This way, after a disturbance occurs on site, the boundaries of the virtual inertia that can be allocated to each distributed resource can be quickly obtained.