## 2 Transient Model of a Doubly Fed Induction Generator (DFIG)
### Electrical Part  
Rotor voltage is not zero and hence, the dynamics related to the rotor circuit are considered in the model. Input signals to the model are Pcmd, reactive power command set point (Q\({}_{\mathrm{s}}\)), direct and quadrature components of stator terminal voltage, V\({}_{\mathrm{ds}}\) and V\({}_{\mathrm{qs}}\) respectively. Equations (1)-(4) relate the parameters mentioned below to the input signals [21,22]. \[\mathrm{V_{ds}} =\ r_{\mathrm{s}}\mathrm{i_{ds}}-\mathrm{X^{\prime}}\mathrm{i_{qs}}+ \mathrm{E_{d}}, \tag{1}\] \[\mathrm{V_{qs}} =\ r_{\mathrm{s}}\mathrm{i_{qs}}+\mathrm{X^{\prime}}\mathrm{i_{ ds}}+\mathrm{E_{q}},\] (2) \[\mathrm{V_{ds}}\mathrm{i_{ds}}+\mathrm{V_{qs}}\mathrm{i_{qs}}=\ P _{\mathrm{cmd}},\] (3) \[\mathrm{V_{qs}}\mathrm{i_{ds}}-\mathrm{V_{ds}}\mathrm{i_{qs}}=\ Q _{\mathrm{s}},\] (4) \[\mathrm{X^{\prime}}\ =\ \omega_{\mathrm{s}}(\mathrm{L_{ss}}- \frac{\mathrm{L_{m}}^{2}}{\mathrm{L^{\prime}}_{rr}}), \tag{5}\]  
\(\mathrm{r_{s}}\) is the stator winding resistance. \(\mathrm{i_{ds}}\) and \(\mathrm{i_{qs}}\) are direct and quadrature components of stator current respectively. \(\mathrm{L_{m}}\), \(\mathrm{L_{ss}}\) are magnetizing inductance and stator winding inductance. In order to express the voltage equations in machine, all rotor variables are referred to the stator windings by appropriate turns ratios. \(\mathrm{L^{\prime}}_{rr}\) is the rotor winding inductance referred to stator windings. \(\mathrm{X^{\prime}}\) is the transient reactance value calculated by Equation (5). \(\mathrm{\psi^{\prime}}_{qr}\) and \(\mathrm{\psi^{\prime}}_{dr}\), quadrature and direct components of rotor flux linkages per second referred to the stator windings, are calculated applying Equations (6) and (7). \[\mathrm{\psi^{\prime}}_{qr} =\ \mathrm{L_{m}}\mathrm{i_{qs}}+\mathrm{L^{\prime}}_{rr}\mathrm{i^ {\prime}}_{qr}, \tag{6}\] \[\mathrm{\psi^{\prime}}_{dr} =\ \mathrm{L_{m}}\mathrm{i_{ds}}+\mathrm{L^{\prime}}_{rr}\mathrm{i^ {\prime}}_{dr}, \tag{7}\]  
\(\mathrm{i^{\prime}}_{dr}\) and \(\mathrm{i^{\prime}}_{qr}\) are direct and quadrature components of rotor current, referred to the stator windings. By expressing the rotor flux linkages per second in terms of \(\mathrm{E_{d}}\) and \(\mathrm{E_{q}}\), the voltages behind the transient reactance, dynamic Equations (8) and (9) can be obtained [2]. \[\frac{\mathrm{dE_{q}}}{\mathrm{dt}}\ =\ -\mathrm{s}\mathrm{\omega_{s}}\mathrm{E_{d}} -\mathrm{\omega_{s}}\frac{\mathrm{L_{m}}}{\mathrm{L^{\prime}}_{rr}}\mathrm{V^{ \prime}}_{dr}-\frac{\mathrm{r^{\prime}}_{rr}}{\mathrm{L^{\prime}}_{rr}}\left[ \mathrm{E_{d}}\ +\ \big{(}\mathrm{X}-\mathrm{X^{\prime}}\big{  
\[\mathrm{E_{q}}=-\frac{\mathrm{L_{m}}\omega_{s}}{\mathrm{L^{\prime}}_{\mathrm{rr}}} \uppsi^{\prime}_{\mathrm{dr}}, \tag{11}\]  
\(\mathrm{V^{\prime}}_{\mathrm{dr}}\) and \(\mathrm{V^{\prime}}_{\mathrm{qr}}\) are direct and quadrature components of rotor voltage, referred to the stator windings. In order to model the time delay related to the control procedure, a transfer function has been considered in the proposed electrical model in Figure 1. Parameters A and b are set to 0.5 s and 1, respectively [2]. The outputs are \(\mathrm{V^{\prime}}e_{\mathrm{dr}}(\mathrm{set})\) and \(\mathrm{V^{\prime}}_{\mathrm{qr}}(\mathrm{set})\). Finally, by substituting the values of \(\mathrm{V^{\prime}}_{\mathrm{dr}}(\mathrm{set})\) and \(\mathrm{V^{\prime}}_{\mathrm{qr}}(\mathrm{set})\) in Equations (8) and (9), the updated values of \(\mathrm{i_{ds}}(\mathrm{new})\) and \(\mathrm{i_{qs}}(\mathrm{new})\) can be obtained.