## 3 The Proposed Control System
### VSG-Based Control of Grid-Connected MMC  
The VSG-based control is applied to emulate the behavior of a synchronous generator in the grid-connected MMC system. It enables the MMC to provide inertial response and frequency regulation similar to conventional synchronous generators. The VSG control scheme is illustrated in Figure 3.  
The aim of this control is to provide active and reactive power control, voltage regulation, and frequency support similar to a synchronous generator. The VSG control introduces frequency and voltage droop characteristics, which are typical features of synchronous generators. By utilizing droop control, the MMC adjusts its output power based on changes in grid frequency and voltage. This behavior provides inertia and stability support to the grid [17; 25]. Figure 2: Block diagram of the proposed CVB-VSG control. The mathematical model of the VSG is obtained from the second-order model of a synchronous generator, the mechanical rotation equation of the rotor, and the voltage equation of the stator [25; 26; 27]. \[J\frac{d\omega}{dt}=\frac{P_{m}-P_{e}}{\omega}-D\big{(}\omega-\omega_{g}\big{)} \tag{7}\]  
\[e_{abc}=v_{abc}-Ri_{abc}-L\frac{di_{abc}}{dt} \tag{8}\]  
where \(P_{m}\) is the mechanical power; \(P_{e}\) is the electromagnetic power; \(J\) and \(D\) represent the inertia and damping, respectively; \(w\) is the rotor angular frequency; \(w_{g}\) is the actual angular frequency of the grid; and \(e_{abc}\), \(v_{abc}\), and \(i_{abc}\) are the excitation voltage, terminal voltage, and stator current of the SG, respectively. \(R\) is the armature resistance and \(L\) is the synchronous reactance. The VSG droop control mathematical model for controlling frequency and voltage is expressed as follows:  
\[\omega_{g}=\omega_{N}+D_{P}(P_{N}-P) \tag{9}\]  
\[U=U_{N}+D_{q}(Q_{N}-Q) \tag{10}\]  
where \(P_{N}\) and \(Q_{N}\) are the rated active power and reactive power, respectively; \(P\) and \(Q\) are the VSG active and reactive powers, respectively; \(D_{P}\) is the \(P\)-\(\omega\) droop coefficient; \(D_{q}\) is the \(Q\)-\(U\) droop coefficient; \(U_{N}\) is the rated voltage amplitude; and \(\omega_{N}\) is the rated angular frequency. The VSG control is designed to emulate the behavior of a synchronous generator. It relies on equations such as mechanical rotation (Equation (7)) and droop control (Equations (9) and (10)) to determine the active and reactive power (\(P\), \(Q\)). These measured values, along with the reference values \(P\)* and \(Q\)*, are used to adjust the outputs \(\theta\)* (the phase angle reference) and \(E\)* (the voltage amplitude reference). The PWM modulator then uses these outputs. The VSG control strategy allows for the emulation of key dynamic characteristics typically exhibited by traditional synchronous generators, specifically their inertial response and ability to regulate frequency, it ensures that the MMC can contribute to stabilizing the grid, especially under conditions where renewable energy sources introduce variability or disturbances. In our VSG control scheme (illustrated in Figure 3), the measured active and reactive power (\(P\) and \(Q\)) are compared to their respective reference values (\(P\)* and \(Q\)*), which are defined based on the desired operating conditions or the nominal values of the system. The differences between these measured and reference values are used in droop control equations to generate frequency and voltage deviations, resulting in the outputs \(\theta\)* and \(E\)*. These outputs are then fed to the PWM modulator: \(\theta\)* adjusts the synchronization and  
Figure 3: VSG based control scheme. phase of the switching signals (thus controlling the active power by synchronizing the converter with the grid frequency), while \(E^{*}\) defines the amplitude of the synthesized AC voltage (thus regulating the reactive power). The VSG control employs a droop-based control strategy, where grid frequency variations (linked to active power) influence the phase angle, thereby adjusting the output power.