## 2 Detailed Model of MMC-Controlled Wind Turbine Generator
### MMC System
#### 2.3.3 Grid-Side MMC Controller  
The control scheme of the grid-side MMC controller is shown in Figure 9. The control loop is designed for controlling the DC link circuit voltage (\(V_{dc}\)) and the reactive power output of the grid-side MMC (\(Q_{g}\)) in a similar way to the stator-side MMC based on the _dq_  
Figure 8: Stator-Side MMC Controller.  
Figure 7: Current flow in the sub-module according to switching state: (**a**) Bypass in positive polarity (**b**) Charging in positive polarity (**c**) Bypass in negative polarity (**d**) Discharging in negative polarity.  
vector control. Three-phase currents (\(I_{G}\)(\({}^{\text{(alx)}}\))) and voltages (\(V_{G}\)(\({}^{\text{(alx)}}\))) at the AC terminal of the grid-side MMC are transformed into the \(dq\)-axis form using Park Transformation, where the phase angle (\(\theta_{G}\)) and angular frequency (\(\omega_{G}\)) are obtained from the Phase Locked Loop (PLL) controller. The PLL controller technique used in this study refers to the original PSCAD/EMTDC's master library. The instantaneous active power (\(P_{G}\)) and reactive power (\(Q_{G}\)) are calculated using the power meter, and the instantaneous rms voltage (\(V_{G}\)) of the AC terminal is obtained from the three-phase rms voltmeter.  
In the grid-side MMC controller, the q-axis component \(\left(I_{G}^{q}\right)\) is used to control DC link circuit voltage at a constant DC voltage reference (\(V_{dc}^{*}\)), and the \(d\)-axis current component \(\left(I_{G}^{d}\right)\) is used to control the reactive power output (\(Q_{G}\)) or the AC terminal voltage (\(V_{G}\)) of the grid-side MMC. In normal mode operation, the reactive power reference (\(Q_{G}^{*}\)) is usually set at zero to maintain the power factor at unity. In fault mode operation, the grid voltage reference (\(V_{G}^{*}\)) is set at 1.0 pu. During fault conditions, the grid-side MMC controller will change its operation from normal mode to fault mode when the voltage at the AC terminal output drops below 80%. The PI control loop systems also consist of the inner current loop control and the power loop control for each of the \(d\)-axis and the \(q\)-axis components. The cross coupling in the term of \(\omega_{G}\left(L_{Garm}/2+L_{Gf}\right)\) is added to the output of the inner loop current control for the controller tracking improvement, where \(L_{Garm}\) and \(L_{Gf}\) are the arm inductance and the reactor inductance of the grid-side MMC, respectively.  
The aim of the development of the wind turbine generator models in this paper is to simulate and analyze the dynamic behaviors of a grid-connected wind farm under steady-state and transient conditions. The grid connectivity study is an important requirement in the development stage of any wind farm project. In order to improve the dynamic performance of the control system of the stator-side MMC and grid-side MMC, improvement methods such as energy-shaping L2-gain [25], sliding mode controller [26], pole and placement, etc., can be applied to the proposed model. However, because our only concern in this study is grid connectivity, the control system that is applied to the stator-side MMC and the grid-side MMC can be a standard control model using a PI controller. The gain control parameters, such as \(Kp\) and \(Ki\), are obtained using a pole and placement method, and an optimum symmetrical criterion method for inner and outer controllers, respectively.