# RMS Modeling and Control of a Grid-Forming E-STATCOM for Power System Stability in Isolated Grids
## 2 RMS-Based GFM E-STATCOM System Description  
Figure 1 illustrates an RMS-based GFM E-STATCOM scheme composed of a generic energy storage system (ESS) linked to a grid-forming converter (GFM) on the DC side, which is connected to an AC electric network through an impedance \(Z_{G}e^{i\phi}\). At the point of common coupling (PCC), the voltage vector is represented by \(V_{G}e^{i\theta}\), where \(V_{G}\) is the voltage magnitude and \(\theta\) is its angle with respect to an infinite bus \(V_{\infty}\angle 0^{\circ}\). The current injected into the line is denoted as \(I_{G}e^{i\gamma}\), and the internal voltage of the converter is represented as \(Ee^{i\delta}\). The ESS shown in Figure 1 is made of a supercapacitor (SC) bank. The voltage and the current on the DC bus are denoted as \(V_{dc}\) and \(I_{dc}\).  
The control system of the RMS-based GFM E-STATCOM is organized into five blocks, as depicted in Figure 2. The GFM block takes the voltage vector \(V_{C}e^{i\theta}\) at the AC terminals of the converter and the internal voltage vector \(Ee^{i\beta}\) as inputs. The modulus \(E\) is obtained from the exciter model, and the angle \(\delta\) is from the governor model. By calculating the difference between these voltage vectors and considering the output filter impedance of the GFM converter, the active (\(I_{dG}\)) and reactive (\(I_{rG}\)) components of the AC current are determined. Additionally, \(I_{dc}\) is computed as a function of the AC current components and the amplitude modulation index, \(m_{a}\), which serves as the control variable for the exciter model, as explained below. The GFM model also establishes the maximum values for the active current (\(I_{aG}^{max}\)) and reactive current (\(I_{rG}^{max}\)) based on the operating point of the GFM converter.  
The governor model computes the angle \(\delta\) of the internal voltage using the active power reference \(P_{G}^{*}\) (obtained from the ESS control block) and the calculated active power \(P_{G}\) from the GFM model. This model incorporates an active current limiter (ACL) that limits the angle \(\delta\). The ACL's operation mode depends on the active current \(I_{aG}\), its maximum value \(I_{aG}^{max}\), and the limits established by the ESS control block (\(L_{p}\) and \(L_{n}\)). This occurs when the voltage \(V_{dc}\) reaches any of its operating limits, \(V_{dc}^{max}\) and \(V_{dc}^{min}\). Similarly, the exciter model determines the magnitude \(E\) of the internal voltage to regulate \(V_{G}\) at the GFM converter terminals. This magnitude is influenced by the \(V_{dc}\) voltage and a nonlinear function of the amplitude modulation index \(m_{a}\). Similar to the governor model, the exciter model includes a reactive current limiter (RCL) acting on \(m_{a}\). In this case, the RCL's operation mode depends on the reactive current \(I_{rG}\) and its maximum value \(I_{rG}^{max}\).  
The ESS model provides the output \(V_{dc}\), calculated as a function of \(I_{dc}\). By integrating \(I_{dc}\), the state of charge (SoC) of the storage system is determined. The ESS control block sets the active power reference \(P_{G}^{*}\) for the governor based on a specified \(SoC^{*}\) reference. It also establishes limits for the ACL when \(V_{dc}\) approaches its constraints.  
Figure 1: System description of a grid-connected RMS-based GFM E-STATCOM.  
Figure 2: RMS-based GFM E-STATCOM control block diagram.