## 2 System Modeling and Converter Control
### MSC and GSC Control  
Figure 1 shows the block diagram of MSC and GSC. As shown in Figure 1a, MSC control mainly involves the adjustment of the PMSG torque and rotational speed to set the special operating conditions. The MSC can be adjusted to regulate the PMSG speed at a reference value due to the MPPT. The \(d\)-\(q\) axis current component indicates the components of torque and flux, and the stator current reference value (zero) in the \(d\)-axis is assigned to achieve maximum torque and maximize the resistive losses. The required \(d\)-\(q\) components of the voltage vector are derived from two proportional integral (PI) current controllers, which are applied to control the speed of the generator and turbine. After the PI current controllers, compensation components are added to improve the transient response, as shown in Figure 1. Components 1 and 2 are \(\omega_{e}L_{q}l_{qs}\) and \(-\omega_{e}L_{d}l_{ds}+\omega_{e}\Psi_{f}\), respectively. They are obtained from Equations (5) and (6). The Park and Clarke transformations are applied to the \(d\)- and \(q\)-components to generate the three-phase current references for the MSC. The speed reference, \(\omega_{m}=\lambda\cdot S_{w}/R\) calculated from Equation (2), is restricted to the maximum angular speed (3.5 rad/s). Here, we use pulse width modulation (PWM) to produce a switching signal for MSC control.  
As shown in Figure 1b, GSC control maintains a constant DC link voltage regardless of the magnitude of PMSG power and generates any reactive power to obtain a power factor of unity. To develop the control mode for GSC, a vector control method is applied with a reference frame of the grid voltage, utilizing independent control of the active power and reactive power between the GSC and grid.  
The voltage equations for the dynamic model of the grid connection in the \(d\)-\(q\) reference frame [27] can be expressed as  
\[V_{dg} =V_{di}-R_{g}I_{dg}-L_{g}\frac{dI_{dg}}{dt}+\omega_{g}L_{g}I_{qg} \tag{8}\] \[V_{qg} =V_{qi}-R_{g}I_{qg}-L_{g}\frac{dI_{qg}}{dt}-\omega_{g}L_{g}I_{dg} \tag{9}\]  
Figure 1: _Cont._The active and reactive powers [4] are respectively expressed as follows:  
\[P_{g}=1.5V_{dg}I_{dg} \tag{10}\]  
\[Q_{g}=1.5V_{dg}I_{qg} \tag{11}\]  
The \(q\)-axis current component of the GSC is used to control the flow of the reactive power, and the \(d\)-axis current component of the GSC is used to regulate the DC link voltage using a PI controller. In this study, the grid \(q\)-axis current is set to zero to prevent generation of any reactive power. A phase-locked loop (PLL) circuit is applied to synchronize the three-phase voltage with the grid voltage. To transfer all the active power obtained from the wind turbine to the grid, the DC link voltage should remain constant, as shown in the following constraint [5].  
\[C\frac{dV_{dc}}{dt}=\frac{P_{t}}{V_{dc}}-\frac{P_{g}}{V_{dc}} \tag{12}\]  
If the wind turbine power \(P_{t}\) and the grid power \(P_{g}\) are equal, the DC link voltage must be constant. Compensation components guarantee stable and decoupled active and reactive power control. Components 1 and 2 are \(\omega_{g}L_{g}I_{qg}\) and \(-\omega_{g}L_{g}I_{dg}\), respectively. These terms can be added to enhance the transient response of the power system (Equations (8) and (9)).  
Figure 1: Block diagram of machine-side converter (MSC) and grid-side converter (GSC). (**a**) MSC control system; (**b**) GSC control system.