# RMS Modeling and Control of a Grid-Forming E-STATCOM for Power System Stability in Isolated Grids
## 3 GFM Converter Modeling and Control
### Exciter Model  
The exciter model calculates the internal voltage magnitude \(E\) based on the voltage reference \(V_{G}^{*}\) and its actual value \(V_{G}\). Within this block, a controller is employed, and its output is the amplitude modulation index, denoted as \(m_{a}\). The index \(m_{a}\) is defined as the relationship between the internal peak voltage per phase of the GFM, \(\tilde{V}_{ac}\), and half of the DC voltage, \(V_{DC}/2\)[35]. If, as usual, the voltage bases for AC and DC are \(\tilde{V}_{ac,b}\) and \(V_{DC,b}=2\tilde{V}_{ac,b}\), respectively, the index \(m_{a}\) can be expressed as given by Equation (11):  
\[m_{a}=\frac{\tilde{V}_{ac}}{V_{DC}/2}=\frac{E}{V_{dc}} \tag{11}\]  
where \(V_{DC}\) represents the DC voltage in volts, and \(V_{dc}\) is its value in p.u. Likewise, \(E\) is the internal voltage of the GFM in p.u. Figure 4 illustrates the nonlinear relationship between \(\frac{E}{V_{dc}}\) and \(m_{a}\), depicting three distinct zones: (a) linear modulation when \(m_{a}<1\); (b) overmodulation, where the voltage magnitude \(E\) does not increase proportionally with \(m_{a}\cdot V_{dc}\); and (c) square-wave operation,  
characterized by \(\frac{E}{\sqrt{d_{c}}}=\frac{4}{\pi}\), meaning the internal maximum voltage magnitude is \(1.27\cdot V_{dc}\) in p.u. As per [35], square-wave operation is attained when \(m_{a}>2.16\) for a frequency modulation index \(m_{f}\) of 20. The nonlinear modulation function, \(f(m_{a})=\frac{E}{V_{dc}}\), is represented by Equation (12):  
\[ \begin{split} f(m_{a})&=m_{a}\quad 0\ <m_{a}<1\\ f(m_{a})&=1+A\bigg{(}1-e^{-\frac{(m_{a}-1)}{A}} \bigg{)}\quad m_{a}\geq 1\end{split}  \tag{12}\]  
where \(A\) is a constant equal to \(\left(\frac{4}{\pi}\right)-1\). One concern with nonlinear modulation is the potential for current harmonic distortion, which grid codes typically restrict for transmission-connected devices [31]. However, in the context of an RMS model, harmonics are not explicitly represented, as the model only captures fundamental frequency dynamics. The function \(f(m_{a})\) used in this work reflects the nonlinear relationship between the internal voltage magnitude and the DC-link voltage without introducing harmonic content in the RMS formulation. Since the RMS approach inherently filters out switching harmonics, concerns about harmonic distortion in the overmodulation region are not relevant within this modeling framework. According to the previous section, the GFM model comprises a set of nonlinear expressions for the vector \(I_{G}e^{j_{f}}\), where its \(DQ\) current components are indicated in Equations (2) and (3), and its active and reactive components are outlined in Equations (5) and (6). Additionally, as mentioned earlier, expressions for active and reactive power, crucial for GFM control, are presented in Equation (7). In Figure 2, it is evident that \(I_{dc}\) is also an output of the GFM model, calculated by performing an active power balance (neglecting converter losses) on the AC and DC terminals of the GFM. The AC active power expression, using \(dq\) components aligned to the internal voltage vector \(Ee^{j_{\delta}}\), is given by \(EI_{q}\), so that  
\[V_{dc}I_{dc}=EI_{q} \tag{13}\]  
Figure 4: Nonlinear relationship between \(\frac{E}{V_{dc}}\) and \(m_{a}\). dividing both terms by \(V_{dc}\) and using the modulation function of Equation (12), the definition \(I_{dc}\) is given by Equation (14),  
\[I_{dc}=f(m_{a})I_{q} \tag{14}\]  
where \(I_{q}\) is calculated by rotating the current vector \(I_{DG}+jI_{QG}\) to the \(dq\) reference frame, as is given by Equation (15),  
\[I_{d}+jI_{q}=(I_{DG}+jI_{QG})e^{-j(\delta-\frac{\pi}{2})} \tag{15}\]  
so, by separating into real and imaginary parts and substituting \(I_{q}\) into Equation (14), \(I_{dc}\) can be expressed as Equation (16):  
\[I_{dc}=f(m_{a})(I_{DG}\cos\delta+I_{QG}\sin\delta) \tag{16}\]  
Similarly, the internal voltage magnitude \(E\) is determined according to Equation (12) as  
\[E=f(m_{a})V_{dc} \tag{17}\]  
Figure 5 depicts the excitation model of the GFM.