## 2 System Frequency Constraint Model
### Frequency Security Constraints
#### 2.2.2 Node RoCoF Constraint  
The calculated-inertia \(\eta_{x}\) at node x is defined as the ratio of the power imbalance at node \(x\) to the RoCoF at that node [23], as shown in Equation (10):  
\[\eta_{x}=\frac{\Delta P_{x}}{2\frac{d_{x}}{dt}} \tag{10}\]  
In Equation (10), \(\eta_{x}\) represents the calculated inertia value at node \(x\); \(\Delta P_{x}\) denotes the magnitude of power change at node \(x\); and \(f_{x}\) represents the frequency at node \(x\).  
Research [23] presents a frequency model for each node in the network based on traditional generators, without incorporating the virtual inertia and droop control of new energy units. This paper considers wind power units integrated into the grid via virtual synchronous machine technology through power electronic converters, defining the generalized synchronous generator (GSG) as the sum of traditional synchronous generators and virtual synchronous machines. Thus, the total grid inertia can be viewed as provided by the GSG, and the overall grid frequency can be regulated by the GSG, leading to a revised node frequency model as shown in Equation (11):  
\[f_{x}=\frac{\sum\limits_{i\alpha\chi}y_{xi}V_{i}f}{\sum\limits_{i\alpha\chi}V _{i}f_{i}} \tag{11}\]  
In Equation (11), \(f_{i}\) represents the frequency of the generalized synchronous generator \(i\); \(V_{i}\) denotes the voltage amplitude of the generalized synchronous generator \(i\); \(y_{x,i}\) is the element in matrix R that relates the voltage of node \(x\) to that of generalized generator \(i\); R isthe association matrix between the network node voltages and the voltages of generalized generators; and \(i\propto x\) is defined as all \(i\) associated with node \(x\).  
By combining the generator motion equations and the synchronous power coefficient, the calculated inertia model at node x and the frequency change rate of generator \(i\) can be obtained [23]. Substituting the definition of GSG, the calculated inertia at node \(x\) in relation to the GSG inertia can be derived, as shown in Equation (12), along with the frequency change rate of generator \(i\) in Equation (13):  
\[\eta_{x}=\frac{\sum\limits_{i\propto x}y_{xi}\sum\limits_{i\propto x}B_{ix}}{ \sum\limits_{i\propto x}\frac{1}{H_{i}^{y}x_{Bi}}}, \tag{12}\]  
\[\frac{df_{i}}{dt}=\frac{D_{ix}\Delta P}{2H_{i}\sum\limits_{i\propto x}D_{ix}} \tag{13}\]  
In Equations (12) and (13), \(H_{i}\) represents the inertia of the generalized synchronous generator \(i\); \(B_{ix}\) denotes the admittance between generalized synchronous generator i and node x; and \(D_{ix}\) is the unbalanced power picked up by generator \(i\). It can be observed that the calculated inertia at node x is determined by the GSG inertia and the admittance between node \(x\) and the GSG. The calculated inertia for each node can be derived from Equation (19), which numerically equals the inertia time constant of a virtual synchronous machine at node \(x\).  
For the equivalent virtual synchronous machine at node \(x\), Equation (13) can be rewritten as Equation (14):  
\[\frac{df_{x}}{dt}=\frac{\Delta P}{2H_{x}}=\frac{\Delta P}{2\eta_{x}} \tag{14}\]  
Although Equation (8) provides a constraint on the total system inertia, it cannot impose constraints on the inertia of each node. This paper aims to enhance the dynamic frequency security response capability of the system by establishing constraints on the inertia time constants of each node, ensuring that the RoCoF at each node does not exceed the maximum value, as shown in Equations (15) and (16):  
\[\frac{df_{x}}{dt}=\frac{\Delta P}{2\eta_{x}}\leq R_{f\max}, \tag{15}\]  
\[\eta_{x}\geq\frac{\Delta P}{2R_{f\max}} \tag{16}\]