## 3 Control Strategy
### Input Stage Control Strategy
#### 3.1.2 VSM-Based MMC Control Strategy  
The MMC converter of the input stage uses the VSM-based control strategy, and can operate by simulating the performance of a synchronous motor. Here, the MMC converter can be simplified into a synchronous motor as shown in Figure 3, where the DC side of MMC is equivalent to the mechanical load of a synchronous motor, \(T_{\mathrm{m}}\) represents the virtual mechanical torque, and \(T_{\mathrm{e}}\) represents the virtual electromagnetic torque. The mechanical motion equation of VSM can be expressed by Equation (5) when the number of pole pairs of VSM is set to be 1:  
\[\left\{ \begin{array}{l}J\frac{\mathrm{d}\omega}{\mathrm{d}t}=T_{\mathrm{e}}-T _{\mathrm{m}}-D(\omega-\omega_{0})\\ \frac{\mathrm{d}\theta}{\mathrm{d}t}=\omega\end{array} \right. \tag{5}\]  
where \(J\) represents the virtual rotational inertia, \(D\) represents the damping coefficient, \(\omega\) represents the mechanical angular velocity, \(\omega_{0}\) represents the synchronous angular velocity of the grid, and \(\theta\) represents the power angle. Apply the Park's transformation to the grid voltage (\(u\)) and the input current (\(i\)) of the AC side, and the input electromagnetic power of VSM in the rotating d-q reference frame can be achieved through Equation (6). The virtual electromagnetic torque of VSM is given by Equation (7). \[P_{\mathrm{e}}=1.5\,\left(u_{\mathrm{d}}i_{\mathrm{d}}+u_{\mathrm{q}}i_{ \mathrm{q}}\right) \tag{6}\]  
\[T_{\mathrm{e}}=P_{\mathrm{e}}/\omega \tag{7}\]  
where \(P_{\mathrm{e}}\) is the input electromagnetic power of VSM, \(u_{\mathrm{d}}\) and \(u_{\mathrm{q}}\) are the d-axis component and the q-axis component of u in the rotating d-q axis, respectively, and \(i_{\mathrm{d}}\) and \(i_{\mathrm{q}}\) are the d-axis component and the q-axis component of \(i\) in the rotating d-q axis. Figure 3: Equivalent relationship between MMC and virtual synchronous machine (VSM). The rated output active power of VSM can be obtained through Equation (8) from the DC voltage loop, and the virtual mechanical torque is expressed by Equation (9). \[P_{\text{m}}=\bigg{(}\left(K_{\text{P1}}+K_{\text{i1}}\frac{1}{s}\right)\left(U_{ \text{dcref}}-U_{\text{dc}}\right)U_{\text{dcref}}\bigg{)} \tag{8}\]  
\[T_{\text{m}}=P_{\text{m}}/\omega \tag{9}\]  
where \(P_{\text{M}}\) is the rated output active power of VSM, \(K_{\text{P1}}\) and \(K_{\text{i1}}\) are the proportional parameter and integral gain parameter for the PI controller of the DC voltage loop, respectively, and \(U_{\text{dcref}}\) is the DC voltage reference. The virtual electromagnetic equation of VSM is given by Equation (10):  
\[\left\{ \begin{array}{l}L\frac{\text{d}i}{\text{d}t}=-Ri+\mathbf{u}-\mathbf{e}\\ \mathbf{i}=\left[i_{\text{a}},i_{\text{b}},i_{\text{c}}\right]^{T}\\ \mathbf{u}=\left[u_{\text{a}},u_{\text{b}},u_{\text{c}}\right]^{T}\\ \mathbf{e}=\left[e_{\text{a}},e_{\text{b}},e_{\text{c}}\right]^{T}\end{array} \right. \tag{10}\]  
where \(L\) and \(R\) are the synchronous reactance and the armature resistance, \(\mathbf{e}\) is the back electromotive force (EMF) vector, \(\mathbf{u}\) is the phase terminal voltage vector, and \(\mathbf{i}\) is the stator current vector. Based on the previously mentioned mathematical model of MMC and Equation (10), Equation (11) can be derived as follows:  
\[\left\{ \begin{array}{l}L=L_{\text{s}}+\frac{L_{0}}{2}\\ R=R_{\text{s}}\\ i=i_{\text{s}j}\\ u=u_{\text{s}j}\\ e=\frac{u_{\text{nj}}-u_{\text{pj}}}{2}\end{array} \right.