## 2 Description of MMC-VSG Structure and Modeling  
### Mathematical Model of MMC  
The schematic for the MMC's connection to the AC system is displayed in Figure 1. \(R_{j}\) and \(L_{j}\) indicate the MMC AC side line impedance. \(R_{0}\) is the arm impedance. \(i_{vj}\) and \(e_{vj}\) denote the output current and voltage. The voltage from the AC grid is \(v_{gj}\), and \(U_{dc}\) is the DC side voltage, where \(j\) stands for phase \(abc\).  
The main function of MMC is to accomplish the mutual conversion between three-phase AC voltage and DC voltage. One three-phase MMC contains six bridge arms, with two arms existing in each phase unit. Each arm contains N identical submodules in series with half-bridge topology, accompanied by the smoothing inductor \(L_{0}\), which is the inductance of the MMC bridge arm. Figure 1 also depicts the structure of an MMC submodule. Each submodule contains a capacitor (\(C_{0}\)) and two complementary IGBTs (\(T_{1}\), \(T_{2}\)) linked with reverse continuous flow diodes (\(D_{1}\), \(D_{2}\)), respectively. The DC capacitor maintains the DC bus voltage while storing energy.  
According to Figure 1, the equations can be derived from the Kirchhoff voltage law (KVL) as  
\[\left\{\begin{array}{rl}\frac{U_{\text{dc}}}{2}&=U_{\text{pj}}+R_{0}i_{\text {pj}}+L_{0}\frac{di_{\text{pj}}}{dt}+e_{\text{vj}}\\ \frac{U_{\text{dc}}}{2}&=U_{\text{nj}}+R_{0}i_{\text{nj}}+L_{0}\frac{di_{ \text{nj}}}{dt}-e_{\text{vj}}\end{array}\right. \tag{1}\]  
The two parts of Equation (1) yield  
\[U_{\text{dc}}=U_{\text{pj}}+U_{\text{nj}}+R_{0}(i_{pj}+i_{nj})+L_{0}\frac{d(i _{pj}+i_{nj})}{dt}=U_{\text{pj}}+U_{\text{nj}}+2R_{0}(i_{zj})+2L_{0}\frac{d(i_ {zj})}{dt} \tag{2}\]  
\[e_{\text{vj}}=U_{\text{pj}}-U_{\text{nj}}+R_{0}(i_{\text{pj}}-i_{\text{nj}})+L _{0}\frac{d(i_{\text{pj}}-i_{\text{nj}})}{dt}=U_{\text{pj}}-U_{\text{nj}}+R_{0 }i_{vj}+L_{0}\frac{di_{vj}}{dt} \tag{3}\]  
In Equation (2), \(i_{zj}=\frac{i_{jj}+i_{nj}}{2}\) stands for the circulating current. Equation (2) can be simplified as  
\[U_{\text{dc}}=U_{\text{pj}}+U_{\text{nj}} \tag{4}\]  
while the remaining parts are small enough. Under the normal working condition of the MMC, the sum of the lower and upper bridge's input submodule number N is  
\[N=N_{pj}+N_{nj} \tag{5}\]where \(N_{pj}\) is the number of submodules of the upper bridge arm in the input state, and \(N_{nj}\) is the number of submodules of the lower axle arm in the input state. Equation (5) indicates that half of the submodules in each phase are placed into operation and shall be ensured at any time. The DC side voltage needs the capacitor voltage of N submodules to maintain balance continuously.  
Table 1 displays the submodule's operating state. The switching function can be summarized as  
\[S_{jk}=\left\{\begin{array}{cc}1&(T_{1}on,T_{2}off)\\ 0&(T_{2}on,T_{1}off)\end{array}\right. \tag{6}\]  
Thus, Equation (5) can be written as  
\[N=N_{pj}+N_{nj}=\sum_{k=1}^{N}S_{jkp}+\sum_{k=1}^{N}S_{jkn} \tag{7}\]  
according to Equations (4) and (7), the connection between the DC side voltage \(U_{dc}\) and the capacitors' voltage of the submodule can be obtained as follows  
\[U_{\rm dc}=\sum_{k=1}^{N_{\rm pl}}u_{\rm c,p}+\sum_{k=1}^{N_{\rm inj}}u_{\rm c,n}=\sum_{k=1}^{N}S_{jkp}u_{\rm c,p}+\sum_{k=1}^{N}S_{jkn}u_{\rm c,n} \tag{8}\]  
Figure 1: The main circuit topology and control method of MMC-VSG.  
where \(u_{c,p}\) and \(u_{c,n}\) indicate the submodule's capacitor voltage input by the upper and lower bridge arm, respectively. N submodules in each phase unit are in the input state when the MMC is operating, which means that MMC can output N + 1 level electricity through the corresponding modulation strategy [21]. By changing the on and off distribution relationship between the N submodules on the bridge arm, the anticipated output waveform can be achieved.