# Application of MMC-RPC in High-Speed Railway Traction Power Supply System Based on Energy Storage
## 3 VSG Control  
### VSG Model  
In order to realize the VSG control of MMC-RPC on the inverter side, it is necessary to simulate the output power characteristics, inertia and damping characteristics of the synchronous generator. The second-order mathematical model of synchronous generator includes both rotor mechanical equation and stator electrical equation, covering the basic characteristics of synchronous generator. The simplified model of the synchronous generator is shown in Figure 3. By taking the rotor motion equation of the synchronous generator as the mechanical model of the VSG and the stator electrical equation as the electromagnetic model of the VSG, the excitation controller calculates the internal potential. The VSG regulates the frequency and voltage according to the active and reactive power, respectively [24; 25]. Figure 3: Simplified model of synchronous generator. Figure 2: Phasor diagram of power compensation. The mathematical model of VSG is [26]:  
\[\left\{ \begin{array}{l}\int\frac{\mathrm{d}\omega}{\mathrm{d}t}=T_{\mathrm{m}}-T _{\mathrm{e}}-D\Delta\omega\\ T_{\mathrm{m}}=\frac{P_{\mathrm{m}}}{\omega}\\ T_{\mathrm{e}}=\frac{P}{\omega}\\ \frac{\mathrm{d}\theta}{\mathrm{d}t}=\omega_{0}\end{array} \right., \tag{12}\]  
where:  
1. \(J\) is the inertia parameter;
2. \(D\) is the damping coefficient;
3. \(T_{\mathrm{m}}\) and \(T_{\mathrm{e}}\) are the mechanical and electromagnetic torques, respectively;
4. \(P_{\mathrm{m}}\), \(P\) are the mechanical and electromagnetic power, respectively;
5. \(\omega\), and \(\omega_{0}\) are the angular velocity and rated angular velocity, respectively;
6. \(\theta\) is the output angle. The electrical equation of the VSG is [26]: \[\left\{ \begin{array}{l}u_{\mathrm{d}}=E_{\mathrm{d}}-R_{\mathrm{s}}i_{ \mathrm{d}}+\omega L_{\mathrm{s}}i_{\mathrm{q}}\\ u_{\mathrm{q}}=E_{\mathrm{q}}-R_{\mathrm{s}}i_{\mathrm{q}}-\omega L_{\mathrm{s }}i_{\mathrm{d}}\end{array} \right.,\] (13) where: 1. \(u_{\mathrm{d}}\), \(u_{\mathrm{q}}\), \(i_{\mathrm{d}}\), \(i_{\mathrm{q}}\), \(E_{\mathrm{d}}\), and \(E_{\mathrm{q}}\) are the d-axis and q-axis components of VSG terminal voltage, stator current and three-phase internal potential, respectively;
2. \(R_{\mathrm{S}}\), and \(L_{\mathrm{S}}\) are the VSG stator resistance and inductance, respectively. With the help of the relationship between torque \(\omega\) and power \(P\), the prime mover of the synchronous generator is simulated, and the VSG prime mover is adjusted as follows [26]: \[T_{\mathrm{m}}=\frac{P_{\mathrm{ref}}-k_{\mathrm{f}}(\omega-\omega_{0})}{ \omega},\] (14) where: 1. \(P_{\mathrm{ref}}\) is the reference value of active power;
2. \(k_{\mathrm{f}}\) is the frequency modulation coefficient. In the synchronous generator, the excitation regulation system realizes reactive power and voltage regulation, VSG excitation controller is [27]: \[E_{\mathrm{d}}=E_{0}+\Big{(}k_{\mathrm{P}}+\frac{k_{\mathrm{f}}}{\mathrm{s}} \Big{)}(Q_{\mathrm{ref}}-Q)-\] (15) \[k_{\mathrm{u}}(U_{\mathrm{ref}}-U_{\mathrm{m}})\] where 1. \(E_{0}\) is the internal potential without load; 2. \(k_{\mathrm{P}}\), and \(k_{\mathrm{f}}\) are the reactive power proportional integral regulation parameters; 3. \(Q_{\mathrm{ref}}\) is the reference value of reactive power; 4. \(Q\) is the reactive power; 5. \(k_{\mathrm{u}}\) is the voltage regulation coefficient; 6. \(U_{\mathrm{ref}}\), and \(U_{\mathrm{m}}\) are the rated terminal voltage and terminal It can be seen from Figure 4, when there is a deviation between the output power and the expected power of the MMC-RPC, the power regulation can be realized by appropriately adjusting the torque increment. In this process, the kinetic energy stored by the rotor of the virtual synchronous generator makes the frequency of the system change slowly after being disturbed, and the support of inertia and damping makes the system more stable.