## 2 Grid Forming and Small-Signal Modeling  
A typical simplified diagram of a GFM inverter connected to a power grid is shown in Figure 1. The grid is represented using its Thevenin equivalent circuit, based on a grid impedance \(Z_{g}\) and a voltage source \(V_{g}\). The inverter is connected through a typical LC + transformer filter. For the sake of simplicity, the IBR is fed through an ideal DC voltage source. Regarding the control structure, it includes two control blocks. They are usually referred to as the power synchronization loop (PSL) and reactive power control (RPC). The PSL is the equivalent counterpart of a PLL in GFM control. Both provide the angular frequency \(\omega_{r}\) and angle. The main difference is that while the PLL needs a voltage signal to measure and lock the angle, the PSL angle comes as the result of an active power balance with the grid to keep the inverter synchronized. The RPC generates internal voltage reference amplitude E to control the reactive power exchanged with the grid. In avoiding unnecessary complexities, a direct synthesis of the outer loop setpoints has been considered, assuming that internal loops do not affect low-frequency dynamics. Regarding the modulation, classical pulse-width modulation (PWM) is considered. In order to obtain the small-signal dynamics of the active power of the grid-connected inverter presented in Figure 1, several assumptions are made: the RPC control loop is neglected (the inverter will keep a constant voltage \(E\) at its terminals) and the grid behaves as an ideal voltage source, an infinite bus. The phase shift \(\delta\) between the inverter and the grid is considered small, and the grid impedance is considered mainly inductive, so that active and reactive power control can be decoupled. Under these assumptions, the active power exchanged between the GFM inverter and the grid, given by Equation (1), can be linearized. Considering operation at nominal voltage (\(E\approx 1\) and \(v_{g}\approx 1\)) and small phase shifts, the active power is given by (2), where \(\sin\delta\approx\Delta\delta\). \[P=\frac{E|v_{g}|}{X_{eq}}\sin\delta \tag{1}\]  
\[P=\frac{1}{X_{eq}}\sin\delta\rightarrow\frac{\Delta P}{\Delta\delta}\approx \frac{1}{X_{eq}}=K_{t} \tag{2}\]  
In looking at Equation (2) in per unit notation (pu), the active power will depend solely on the synchronization constant of the grid, \(K_{t}\), which is inversely proportional to the reactance between the grid and the inverter. In the absence of inner loops, \(X_{eq}\) is given by the sum of the filter reactance \(X_{c}\) and the grid reactance \(X_{g}\). Based on this linearization, the generalized small-signal model of the PSL loop is presented in Figure 2.  
The most common PSL structures in GFM are the Virtual Synchronous Generator (VSG) and the droop-based VSG. By applying these control structures to the generalized small  
Figure 1: Grid -connected GFM inverter diagram. Figure 2: Generalized small-signal model for the PSL, where \(H_{c}(s)\) is the feedback transfer function and \(G_{c}(s)\) the controller transfer function. signal form, the small-signal model can be represented as shown in Figure 3. Although the formulations may differ, they are mathematically equivalent (3). \[\frac{\Delta\omega_{r}}{\Delta P}=-\frac{m_{p}}{\tau_{p}s+1}=\frac{1}{(\tau_{p}/m_{ p})s+1/m_{p}} \tag{3}\]  
In short, the system presented in Figure 2 includes one controlled input \(\Delta P^{*}\) and one perturbation, the grid frequency \(\Delta\omega_{r}\). Thus, two transfer functions can be evaluated: the power response of the VSG to power setpoint variations (4) and the power response to grid frequency perturbations (5). \[\frac{\Delta P}{\Delta P^{*}}=-\frac{G_{c}\omega_{b}K_{t}}{s+G_{c}H_{c} \omega_{b}K_{t}} \tag{4}\]  
\[\frac{\Delta P}{\Delta\omega_{g}}=-\frac{\omega_{b}K_{t}}{s+G_{c}H_{c}\omega_{ b}K_{t}} \tag{5}\]  
The first equation describes the dynamics of the active power loop, relevant to analyzing the compatibility and design of any higher-level control algorithm (such as POD-P).