> For the complete documentation index, see [llms.txt](https://www.opal-rt.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.opal-rt.com/docs/smart-power-simulation-software-sps/blocks-functions-tools/renewables/wind-turbine-doubly-fed-induction-generator-phasor-type.md).

# Wind Turbine Doubly-Fed Induction Generator (Phasor Type)

## Description

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-41ecb1bf8e7da55467438414b266ef97f352ef57%2Fwind_turbine_induction_block.png?alt=media" alt=""><figcaption></figcaption></figure>

The **Wind Turbine Doubly-Fed Induction Generator (Phasor Type) block**, located in the **OPAL-RT SPS Software/Sources** library, implements a phasor model of variable speed doubly-fed induction generator driven by wind turbine. The wind turbine and the doubly-fed induction generator (WTDFIG) are shown in the figure.

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-a674675ebef5b848a73a18fb2b10378d71822fef%2Fwind_turbine_dbyfed_induction_generator_chema.png?alt=media" alt=""><figcaption><p>The Wind Turbine and the Doubly-Fed Induction Generator System</p></figcaption></figure>

The AC/DC/AC converter is divided into two components: the rotor-side converter (C<sub>rotor</sub>) and the grid-side converter (C<sub>grid</sub>). C<sub>rotor</sub> and C<sub>grid</sub> are Voltage-Sourced Converters that use forced-commutated power electronic devices (IGBTs) to synthesize an AC voltage from a DC voltage source. A capacitor connected on the DC side acts as the DC voltage source.

A coupling inductor L is used to connect C<sub>grid</sub>to the grid. The three-phase rotor winding is connected to C<sub>rotor</sub> by slip rings and brushes and the three-phase stator winding is directly connected to the grid. The power captured by the wind turbine is converted into electrical power by the induction generator and it is transmitted to the grid by the stator and the rotor windings.

The control system generates the pitch angle command and the voltage command signals V<sub>r</sub> and V<sub>gc</sub> for C<sub>rotor</sub> and C<sub>grid</sub> respectively in order to control the power of the wind turbine, the DC bus voltage, and the reactive power or the voltage at the grid terminals.

### Operating Principle

Power flow, as illustrated in the figure, describes the operating principle of the Wind Turbine Doubly-Fed Induction Generator.

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-3cb25c2f8b2e67a4284b25d26345992a9589479c%2Fwind_turbine_dbyfed_induction_generator_operating_principle.png?alt=media" alt=""><figcaption><p>The Power Flow</p></figcaption></figure>

The parameters for the power flow figure are:

<table data-header-hidden><thead><tr><th width="149.5555419921875"></th><th></th></tr></thead><tbody><tr><td>P<sub>m</sub></td><td>Mechanical power captured by the wind turbine and transmitted to the rotor</td></tr><tr><td>P<sub>s</sub></td><td>Stator electrical power output</td></tr><tr><td>P<sub>r</sub></td><td>Rotor electrical power output</td></tr><tr><td>P<sub>gc</sub></td><td>Cgrid electrical power output</td></tr><tr><td>Q<sub>s</sub></td><td>Stator reactive power output</td></tr><tr><td>Q<sub>r</sub></td><td>Rotor reactive power output</td></tr><tr><td>Q<sub>gc</sub></td><td>Cgrid reactive power output</td></tr><tr><td>T<sub>m</sub></td><td>Mechanical torque applied to rotor</td></tr><tr><td>T<sub>em</sub></td><td>Electromagnetic torque applied to the rotor by the generator</td></tr><tr><td>ω<sub>r</sub></td><td>Rotational speed of rotor</td></tr><tr><td>ω<sub>s</sub></td><td><p>Rotational speed of the magnetic flux in the air-gap of the generator, this speed is named synchronous speed.</p><p>It is proportional to the frequency of the grid voltage and to the number of generator poles.</p></td></tr><tr><td>J</td><td>Combined rotor and wind turbine inertia coefficient</td></tr></tbody></table>

The mechanical power and the stator electric power output are computed as follows:

$$
P\_m = T\_m \omega\_r = P\_s = T\_{em} \omega\_s \\\[8pt]
$$

For a lossless generator the mechanical equation is:

$$
J \frac{d\omega\_r}{dt} = T\_m - T\_{em} \\\[8pt]
$$

In steady-state at fixed speed for a lossless generator *T*<sub>*m*</sub>= *T*<sub>*em*</sub> and *P*<sub>*m*</sub>= *P*<sub>*s*</sub>+ *P*<sub>*r*</sub>.

It follows that:

$$
P\_r = P\_m - P\_s = T\_m \omega\_r - T\_{em} \omega\_s
\= -T\_m \frac{\omega\_s - \omega\_r}{\omega\_s} \omega\_s
\= -s T\_m \omega\_s = -s P\_s
\\\[8pt]
$$

where *s* is defined as the slip of the generator: s= (*ω*<sub>*s*</sub>–*ω*<sub>*r*</sub>)/*ω*<sub>*s*</sub>.

Generally the absolute value of slip is much lower than 1 and, consequently, *P*<sub>r</sub>is only a fraction of *P*<sub>s</sub>. Since *T*<sub>m</sub> is positive for power generation and since ω<sub>s</sub> is positive and constant for a constant frequency grid voltage, the sign of *P*<sub>r</sub> is a function of the slip sign. *P*<sub>r</sub> is positive for negative slip (speed greater than synchronous speed) and it is negative for positive slip (speed lower than synchronous speed).

For super-synchronous speed operation, *P*<sub>r</sub>is transmitted to DC bus capacitor and tends to rise the DC voltage. For subsynchronous speed operation, *P*<sub>r</sub> is taken out of DC bus capacitor and tends to decrease the DC voltage.

C<sub>grid</sub> is used to generate or absorb the power *P*<sub>gc</sub> in order to keep the DC voltage constant. In steady-state for a lossless AC/DC/AC converter *P*<sub>gc</sub> is equal to *P*<sub>r</sub> and the speed of the wind turbine is determined by the power *P*<sub>r</sub> absorbed or generated by C<sub>rotor</sub>. The power control is explained below.

The phase-sequence of the AC voltage generated by C<sub>rotor</sub> is positive for subsynchronous speed and negative for super-synchronous speed.

The frequency of this voltage is equal to the product of the grid frequency and the absolute value of the slip.

C<sub>rotor</sub> and C<sub>grid</sub> have the capability of generating or absorbing reactive power and could be used to control the reactive power or the voltage at the grid terminals.

### C\_rotor Control System

The rotor-side converter is used to control the wind turbine output power and the voltage (or reactive power) measured at the grid terminals.

#### Power Control

The power is controlled in order to follow a pre-defined power-speed characteristic, named tracking characteristic. An example of such a characteristic is illustrated by the ABCD curve superimposed to the mechanical power characteristics of the turbine obtained at different wind speeds.

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-d496a69b9141d57cf8222e0572d37cd9f1ad933f%2Fwind_turbine_dbyfed_induction_generator_powercontrol.png?alt=media" alt=""><figcaption><p><strong>Turbine Characteristics and Tracking Characteristic</strong></p></figcaption></figure>

The actual speed of the turbine ωr is measured and the corresponding mechanical power of the tracking characteristic is used as the reference power for the power control loop. The tracking characteristic is defined by four points: A, B, C, and D. From zero speed to speed of point A, the reference power is zero.

Between point A and point B the tracking characteristic is a straight line, the speed of point B must be greater than the speed of point A.

Between point B and point C the tracking characteristic is the locus of the maximum power of the turbine (maxima of the turbine power versus turbine speed curves).

The tracking characteristic is a straight line from point C and point D. The power at point D is one per unit (1 pu) and the speed of the point D must be greater than the speed of point C.

Beyond point D the reference power is a constant equal to one per unit (1 pu).

The generic power control loop is illustrated in the figure.

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-f4bce4e57725e4aeb3b5f5fef153d19cfce7cd59%2Fwind_turbine_dbyfed_induction_generator_power_schema.png?alt=media" alt=""><figcaption><p><strong>Rotor-Side Converter Control System</strong></p></figcaption></figure>

The actual electrical output power, measured at the grid terminals of the wind turbine, is added to the total power losses (mechanical and electrical) and is compared with the reference power obtained from the tracking characteristic.

A Proportional-Integral (PI) regulator is used to reduce the power error to zero. The output of this regulator is the reference rotor current Iqr\_ref that must be injected in the rotor by converter C<sub>rotor</sub>. This is the current component that produces the electromagnetic torque T<sub>em</sub>. The actual Iqr component of positive-sequence current is compared to Iqr\_ref and the error is reduced to zero by a current regulator (PI).

The output of this current controller is the voltage Vqr generated by C<sub>rotor</sub>. The current regulator is assisted by feed forward terms which predict Vqr.

#### Voltage Control and Reactive Power Control

The voltage or the reactive power at grid terminals is controlled by the reactive current flowing in the converter C<sub>rotor</sub>. The generic control loop is illustrated in the figure.

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-5579e766f3ee9087699e464207582b46bce1f1b9%2Fwind_turbine_dbyfed_induction_generator_VI_charac.png?alt=media" alt=""><figcaption><p><strong>Wind Turbine V-I Characteristic</strong></p></figcaption></figure>

When the wind turbine is operated in voltage regulation mode, it implements the following V-I characteristic.

As long as the reactive current stays within the maximum current values (-Imax, Imax) imposed by the converter rating, the voltage is regulated at the reference voltage Vref. However, a voltage droop is normally used (usually between 1% and 4% at maximum reactive power output), and the V-I characteristic has the indicated slope. In the voltage regulation mode, the V-I characteristic is described by the following equation:

$$
V=V\_{ref} + X\_s  I
$$

where:

<table data-header-hidden><thead><tr><th width="136.22216796875"></th><th></th></tr></thead><tbody><tr><td><em>V</em></td><td>Positive sequence voltage (pu)</td></tr><tr><td><em>I</em></td><td>Reactive current (pu/Pnom) (I > 0 indicates an inductive current)</td></tr><tr><td><em>X</em><sub><em>s</em></sub></td><td>Slope or droop reactance (pu/Pnom)</td></tr><tr><td>Pnom</td><td>Three-phase nominal power of the converter specified in the block dialog box</td></tr></tbody></table>

When the wind turbine is operated in var regulation mode, the reactive power at grid terminals is kept constant by a var regulator.

The output of the voltage regulator or the var regulator is the reference d-axis current Idr\_ref that must be injected in the rotor by converter C<sub>rotor</sub>.

The same current regulator as for the power control is used to regulate the actual Idr component of positive-sequence current to its reference value.

The output of this regulator is the d-axis voltage Vdr generated by C<sub>rotor</sub>. The current regulator is assisted by feed forward terms which predict Vdr.

Vdr and Vqr are respectively the d-axis and q-axis of the voltage Vr.

Note:

* for C<sub>rotor</sub>control system and measurements the d-axis of the d-q rotating reference frame is locked on the generator mutual flux by a PLL which is assumed to be ideal in this phasor model.
* the magnitude of the reference rotor current Ir\_ref is equal to $$f(x\sqrt{, I^{2}*{dr\_ref} + I^{2}*{qr\_ref} ,} \\\[8pt]$$. The maximum value of this current is limited to 1 pu. When Idr\_ref and Iqr\_ref are such that the magnitude is higher than 1 pu, the Iqr\_ref component is reduced in order to bring back the magnitude to 1 pu.

#### C\_grid Control System

The converter C<sub>grid</sub>is used to regulate the voltage of the DC bus capacitor. In addition, this model allows using C<sub>grid</sub>converter to generate or absorb reactive power.

The control system is illustrated in the figure.

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-d41d13e301a52e6f147642d71fef9d04f6796922%2Fwind_turbine_dbyfed_induction_generator_Cgridcontrol.png?alt=media" alt=""><figcaption><p>Grid-Side Converter Control System</p></figcaption></figure>

The control system consists of:

* Measurement systems measuring the d and q components of AC positive-sequence currents to be controlled as well as the DC voltage Vdc.
* An outer regulation loop consisting of a DC voltage regulator.
* The output of the DC voltage regulator is the reference current Idgc\_ref for the current regulator (Idgc = current in phase with grid voltage which controls active power flow).
* An inner current regulation loop consisting of a current regulator. The current regulator controls the magnitude and phase of the voltage generated by converter C<sub>grid</sub>(Vgc) from the Idgc\_ref produced by the DC voltage regulator and specified Iq\_ref reference.
* The current regulator is assisted by feed forward terms which predict the C<sub>grid</sub>output voltage.

The magnitude of the reference grid converter current Igc\_ref is equal to

$$
\sqrt{, I^{2}*{dgc\_ref} + I^{2}*{qr\_ref} ,} \\\[8pt]
$$

The maximum value of this current is limited to a value defined by the converter maximum power at nominal voltage.

When Idgc\_ref and Iq\_ref are such that the magnitude is higher than this maximum value, the Iq\_ref component is reduced in order to bring back the magnitude to its maximum value.

### Pitch Angle Control System

The pitch angle is kept constant at zero degrees until the speed reaches point D speed of the tracking characteristic.

Beyond point D the pitch angle is proportional to the speed deviation from point D speed.

The control system is illustrated in the following figure.

<figure><img src="https://799605156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdlNg8IbOdahCpFCyzxSN%2Fuploads%2Fgit-blob-f32608d587f46ae1f5f94f367def2be5285e2938%2Fwind_turbine_dbyfed_induction_generator_pitchcontrol.png?alt=media" alt=""><figcaption><p>Pitch Control System</p></figcaption></figure>

#### Turbine Model

The turbine model uses the Wind Turbine bloc of the Renewables/Wind Generation library. See documentation of this model for more details.

#### Induction Generator

The doubly-fed induction generator phasor model is the same as the wound rotor asynchronous machine (see the Machines library) with the following two points of difference:

1. Only the positive-sequence is taken into account, the negative-sequence has been eliminated.
2. A trip input has been added. When this input is high, the induction generator is disconnected from the grid and from C<sub>rotor</sub>.

## Parameters

The WTDFIG parameters are grouped in four categories: Generator data, Converters data, Turbine data, and Control parameters. Use the Display listbox to select which group of parameters you want to visualize.

### Generator Tab

<table data-header-hidden><thead><tr><th width="249.82208251953125"></th><th></th></tr></thead><tbody><tr><td><strong>External turbine (Tm mechanical torque input)</strong></td><td><p>When you select this parameter, the <strong>Turbine</strong> tab is not visible, and a Simulink® input named Tm appears on the block, allowing to use an external signal for the generator input mechanical torque. This external torque must be in pu based on the nominal electric power and synchronous speed.</p><p>For example, the external torque may come from a user defined turbine model.</p><p>Following the convention used in the induction machine, the torque must be negative for power generation.</p><p>Default is cleared.</p></td></tr><tr><td><strong>Nominal power, line-to-line voltage and frequency</strong></td><td><p>The nominal power in VA, the nominal line-to-line voltage in Vrms and the nominal system frequency in hertz.</p><p>Default is [1.5e6/0.9 575 60].</p></td></tr><tr><td><strong>Stator</strong></td><td>The stator resistance Rs and leakage inductance Lls in pu based on the generator rating. Default is [ 0.00706 0.171].</td></tr><tr><td><strong>Rotor</strong></td><td><p>The rotor resistance Rr’ and leakage inductance Llr’, both referred to the stator, in pu based on the generator rating.</p><p>Default is [ 0.005 0.156].</p></td></tr><tr><td><strong>Magnetizing inductance</strong></td><td><p>The magnetizing inductance Lm in pu based on the generator rating.</p><p>Default is 2.90.</p></td></tr><tr><td><strong>Inertia constant, friction factor and pairs of poles</strong></td><td><p>Combined generator and turbine inertia constant H in seconds, combined viscous friction factor F in pu based on the generator rating and number of pole pairs p.</p><p>Default is [5.04 0.01 3].</p><p>You may need to use your own turbine model, in order for example, to implement different power characteristics or to implement the shaft stiffness.</p><p>Your model must then output the mechanical torque applied to the generator shaft.</p><p>If the inertia and the friction factor of the turbine are implemented inside the turbine model you specify only the generator inertia constant H and the generator friction factor F.</p></td></tr><tr><td><strong>Initial conditions</strong></td><td>The initial slip s, electrical angle Θ in degrees, stator phasor current magnitude in pu, stator phasor current phase angle in degrees, rotor phasor current magnitude in pu and rotor phasor current phase angle in degrees. Default is [0.2 0 0 0 0 0].</td></tr></tbody></table>

### Turbine Tab

<table data-header-hidden><thead><tr><th width="249.64453125"></th><th></th></tr></thead><tbody><tr><td><strong>Nominal wind turbine mechanical output power</strong></td><td><p>This parameter is not visible when the <strong>External turbine (Tm mechanical torque input)</strong> parameter is selected.</p><p>The nominal turbine mechanical output power in watts. Default is 1.5e6.</p></td></tr><tr><td><strong>Tracking characteristic speeds</strong></td><td><p>This parameter is not visible when the <strong>External turbine (Tm mechanical torque input)</strong> parameter is selected.</p><p>Specify the speeds of point A to point D of the tracking characteristic in pu of the synchronous speed.</p><p>speed_B must be greater than speed_A and speed_D must be greater than speed_C. Default is [0.7 0.71 1.2 1.21].</p></td></tr><tr><td><strong>Power at point C</strong></td><td><p>This parameter is not visible when the <strong>External turbine (Tm mechanical torque input)</strong> parameter is selected.</p><p>Specify the power of point C of the tracking characteristic in pu of the <strong>Nominal wind turbine mechanical output power</strong>.</p><p>Default is 0.73.</p></td></tr><tr><td><strong>Wind speed at point C</strong></td><td><p>This parameter is not visible when the <strong>External turbine (Tm mechanical torque input)</strong> parameter is selected. Specify wind speed in m/s for point C.</p><p>The power at point C is the maximum turbine output power for the specified wind speed. Default is 12.</p></td></tr><tr><td><strong>Pitch angle controller gain [Kp]</strong></td><td><p>This parameter is not visible when the <strong>External turbine (Tm mechanical torque input)</strong> parameter is selected. Proportional gain Kp of the pitch controller.</p><p>Specify Kp in degrees/(speed deviation pu). The speed deviation is the difference between actual speed and speed of point D in pu of synchronous speed.</p><p>Default is 500.</p></td></tr><tr><td><strong>Maximum pitch angle</strong></td><td><p>This parameter is not visible when the <strong>External turbine (Tm mechanical torque input)</strong> parameter is selected.</p><p>The maximum pitch angle in degrees.</p><p>Default is 45.</p></td></tr><tr><td><strong>Maximum rate of change of pitch angle</strong></td><td><p>This parameter is not visible when the <strong>External turbine (Tm mechanical torque input)</strong> parameter is selected.</p><p>The maximum rate of change of the pitch angle in degrees/s.</p><p>Default is 2.</p></td></tr><tr><td><strong>Display wind turbine power characteristics</strong></td><td><p>Click to plot the turbine power characteristics at zero degree of pitch angle for different wind speeds.</p><p>The tracking characteristic is also displayed on the same figure.</p></td></tr></tbody></table>

### Converters Tab

<table data-header-hidden><thead><tr><th width="249.5555419921875"></th><th></th></tr></thead><tbody><tr><td><strong>Converter maximum power</strong></td><td><p>The maximum power of both C<sub>grid</sub> and C<sub>rotor</sub> in pu of the nominal power.</p><p>This parameter is used to compute the maximum current at 1 pu of voltage for C<sub>grid</sub>. The maximum current for C<sub>rotor</sub> is 1 pu. Default is 0.5.</p></td></tr><tr><td><strong>Grid-side coupling inductor</strong></td><td><p>The coupling inductance L and its resistance R in pu based on the generator rating.</p><p>Default is [0.15 0.15/100].</p></td></tr><tr><td><strong>Coupling inductor initial currents</strong></td><td><p>The coupling inductor initial phasor current in positive-sequence. Enter magnitude IL in pu and phase ph_IL in degrees.</p><p>If you know the initial value of the current corresponding to the WTDFIG operating point you may specify it in order to start simulation in steady state.</p><p>If you don’t know this value, you can leave [0 90]. The system will reach steady-state after a short transient. Default is [0 90].</p></td></tr><tr><td><strong>Nominal DC bus voltage</strong></td><td><p>The nominal DC bus voltage in volts.</p><p>Default is 1200.</p></td></tr><tr><td><strong>DC bus capacitor</strong></td><td><p>The total capacitance of the DC link in farads. This capacitance value is related to the WTDFIG rating and to the DC link nominal voltage.</p><p>The energy stored in the capacitance (in joules) divided by the WTDFIG rating (in VA) is a time duration which is usually a fraction of a cycle at nominal frequency.</p><p>For example, for the default parameters, (C=10000 µF, Vdc=1200 V, Pn=1.67 MVA) this ratio We don't have a way to export this macro. is 4.3 ms, which represents 0.26 cycle for a 60 Hz frequency.</p><p>If you change the default values of the nominal power rating and DC voltage, you should change the capacitance value accordingly. Default is 10000e-6.</p></td></tr></tbody></table>

### Control Tab

<table data-header-hidden><thead><tr><th width="249.822265625"></th><th></th></tr></thead><tbody><tr><td><strong>Mode</strong></td><td>Specifies the <strong>WTDFIG</strong> mode of operation. Select Voltage regulation (default) or Var regulation.</td></tr><tr><td><strong>Reference grid voltage Vref</strong></td><td><p>This parameter is not visible when the <strong>Mode</strong> parameter is set to Var regulation.</p><p>Reference voltage, in pu, used by the voltage regulator.</p><p>Default is 1.0.When <strong>External</strong> is selected, a Simulink input named Vref appears on the block, allowing you to control the reference voltage from an external signal (in pu).</p><p>The <strong>Reference grid voltage</strong> parameter is therefore unavailable.</p></td></tr><tr><td><strong>Generated reactive power Qref</strong></td><td><p>This parameter is not visible when the <strong>Mode</strong> parameter is set to Voltage regulation. Reference generated reactive power at grid terminals, in pu, used by the var regulator. Default is 0.</p><p>When <strong>External</strong> is selected, a Simulink input named Qref appears on the block, allowing you to control the reference reactive power from an external signal (in pu).</p><p>The <strong>Generated reactive power Qref</strong> parameter is therefore unavailable</p></td></tr><tr><td><strong>Grid-side converter generated reactive current reference (Iq_ref)</strong></td><td><p>Reference grid-side converter reactive current, in pu, used by the current regulator. Specify a positive value of Iq_ref for generated reactive power. Default is 0.</p><p>When <strong>External</strong> is selected, a Simulink input named Iq_ref appears on the block, allowing you to control the grid-side converter reactive current from an external signal (in pu).</p><p>The <strong>Grid-side converter generated reactive current reference</strong> parameter is therefore unavailable.</p></td></tr><tr><td><strong>Grid voltage regulator gains [Kp Ki]</strong></td><td><p>This parameter is not visible when the <strong>Mode</strong> parameter is set to Var regulation.</p><p>Gains of the AC voltage regulator. Specify proportional gain Kp in (pu of I)/(pu of V), and integral gain Ki, in (pu of I)/(pu of V)/s, where V is the AC voltage error and I is the output of the voltage regulator.</p><p>Default is [1.25 300].</p></td></tr><tr><td><strong>Droop Xs</strong></td><td><p>This parameter is not visible when the <strong>Mode</strong> parameter is set to Var regulation.</p><p>Droop reactance, in pu/nominal power, defining the slope of the V-I characteristic. Default is 0.02.</p></td></tr><tr><td><strong>Reactive power regulator gains [Kp Ki]</strong></td><td><p>This parameter is not visible when the <strong>Mode</strong> parameter is set to Voltage regulation.</p><p>Gains of the var regulator. Specify proportional gain Kp in (pu of I)/(pu of Q), and integral gain Ki, in (pu of I)/(pu of Q)/s, where Q is the reactive power error and I is the output of the var regulator.</p><p>Default is [0.05 5].</p></td></tr><tr><td><strong>Power regulator gains [Kp Ki]</strong></td><td><p>Gains of the power regulator. Specify proportional gain Kp in (pu of I)/(pu of P), and integral gain Ki, in (pu of I)/(pu of P)/s, where P is the power error and I is the output of the power regulator.</p><p>Default is [1 100].</p></td></tr><tr><td><strong>DC bus voltage regulator gains [Kp Ki]</strong></td><td>Gains of the DC voltage regulator which controls the voltage across the DC bus capacitor. Specify proportional gain Kp in (pu of I)/(Vdc), and integral gain Ki, in (pu of I)/(Vdc)/s, where Vdc is the DC voltage error and I is the output of the voltage regulator. Default is [0.002 0.05].</td></tr><tr><td><strong>Grid-side converter current regulator gains [Kp Ki]</strong></td><td>Gains of the grid-side converter current regulator. Specify proportional gain Kp in (pu of V)/(pu of I) and integral gain Ki, in (pu of V)/(pu of I)/s, where V is the output Vgc of the current regulator and I is the current error. Default is [1 100].</td></tr><tr><td><strong>Rotor-side converter current regulator gains [Kp Ki]</strong></td><td><p>Gains of the rotor-side converter current regulator. Default is [0.3 8].</p><p>Specify proportional gain Kp in (pu of V)/(pu of I) and integral gain Ki, in (pu of V)/(pu of I)/s, where V is the output Vr of the current regulator and I is the current error.</p></td></tr><tr><td><strong>Maximum rate of change of reference grid voltage</strong></td><td><p>This parameter is not visible when the <strong>Mode</strong> parameter is set to Var regulation.</p><p>Maximum rate of change of the reference voltage, in pu/s, when an external reference voltage is used. Default is 100.</p></td></tr><tr><td><strong>Maximum rate of change of reference reactive power</strong></td><td><p>This parameter is not visible when the <strong>Mode</strong> parameter is set to Voltage regulation. Maximum rate of change of the reference reactive power, in pu/s, when an external reference reactive power is used.</p><p>Default is 100.</p></td></tr><tr><td><strong>Maximum rate of change of reference power</strong></td><td><p>Maximum rate of change of the reference power in pu/s.</p><p>Default is 1.</p></td></tr><tr><td><strong>Maximum rate of change of converter reference currents</strong></td><td><p>Maximum rate of change of the reference current in pu/s for both the rotor-side and the grid-side converters.</p><p>Default is 200.</p></td></tr></tbody></table>

## Ports

### Inputs and Outputs

<table data-header-hidden><thead><tr><th width="249.55548095703125"></th><th></th></tr></thead><tbody><tr><td><strong>A B C</strong></td><td>The three terminals of the WTDFIG.</td></tr><tr><td><strong>Trip</strong></td><td><p>Apply a Simulink logical signal (0 or 1) to this input.</p><p>When this input is high the WTDFIG is disconnected and its control system is disabled.</p><p>Use this input to implement a simplified version of the protection system.</p></td></tr><tr><td><strong>Wind (m/s)</strong></td><td><p>This input is not visible when the <strong>External mechanical torque</strong> parameter is checked.</p><p>Simulink input of the wind speed in m/s.</p></td></tr><tr><td><strong>Tm</strong></td><td><p>This input is visible only when the <strong>External mechanical torque</strong> parameter is checked.</p><p>Simulink input of the mechanical torque. Tm must be negative for power generation. Use this input when using an external turbine model.</p></td></tr><tr><td><strong>Vref</strong></td><td><p>This input is visible only when the <strong>Mode of operation</strong>parameter is set to Voltage regulation and the <strong>External grid voltage reference</strong> parameter is checked.</p><p>Simulink input of the external reference voltage signal.</p></td></tr><tr><td><strong>Qref</strong></td><td><p>This input is visible only when the <strong>Mode of operation</strong> parameter is set to Var regulation and the <strong>External generated reactive power reference</strong> parameter is checked.</p><p>Simulink input of the external reference generated reactive power signal at grid terminals.</p></td></tr><tr><td><strong>Iq_ref</strong></td><td><p>This input is visible only when the <strong>External reactive current Iq_ref for grid-side converter</strong> parameter is checked.</p><p>Simulink input of the external reference grid-side converter reactive current signal.</p></td></tr><tr><td><strong>m</strong></td><td><p>Simulink output vector containing 29 WTDFIG internal signals.</p><p>These signals can be individually accessed by using the Bus Selector block.</p></td></tr></tbody></table>

Signals are, in order:

<table data-header-hidden><thead><tr><th width="115.888916015625"></th><th width="167.77777099609375"></th><th width="155.3333740234375"></th><th></th></tr></thead><tbody><tr><td><strong>Signal</strong></td><td><strong>Signal Group</strong></td><td><strong>Signal Names</strong></td><td><strong>Definition</strong></td></tr><tr><td>1-3</td><td>Iabc (cmplx)<br>(pu)</td><td>Ia (pu)<br>Ib (pu)<br>Ic (pu)</td><td>Phasor currents Ia, Ib, Ic flowing into the WTDFIG terminals in pu based on the generator rating.</td></tr><tr><td>4-6</td><td>Vabc (cmplx)<br>(pu)</td><td>Va (pu)<br>Vb (pu)<br>Vc (pu)</td><td>Phasor voltages (phase to ground) Va, Vb, Vc at the WTDFIG terminals in pu based on the generator rating.</td></tr><tr><td>7-8</td><td>Vdq_stator<br>(pu)</td><td>Vd_stator (pu)<br>Vq_stator (pu)</td><td><p>Direct-axis and quadrature-axis component of stator voltage in pu based on the generator rating.</p><p>Vd_stator and Vq_stator are respectively the real and imaginary parts of the positive-sequence stator phasor voltage.</p></td></tr><tr><td>9-11</td><td>Iabc_stator (cmplx)<br>(pu)</td><td>Ia_stator (pu)<br>Ib_stator (pu)<br>Ic_stator (pu)</td><td>Phasor currents Ia, Ib, Ic flowing into the stator in pu based on the generator rating.</td></tr><tr><td>12-13</td><td>Idq_stator<br>(pu)</td><td>Id_stator (pu)<br>Iq_stator (pu)</td><td><p>Direct-axis and quadrature-axis component of stator current in pu based on the generator rating.</p><p>Id_stator and Iq_stator are respectively the real and imaginary parts of the positive-sequence stator phasor current.</p></td></tr><tr><td>14-15</td><td>Vdq_rotor<br>(pu)</td><td>Vd_rotor (pu)<br>Vq_rotor (pu)</td><td><p>Direct-axis and quadrature-axis component of rotor voltage in pu based on the generator rating.</p><p>Vd_rotor and Vq_rotor are respectively the real and imaginary parts of the positive-sequence rotor phasor voltage.</p></td></tr><tr><td>16-17</td><td>Idq_rotor<br>(pu)</td><td>Id_rotor (pu)<br>Iq_rotor (pu)</td><td><p>Direct-axis and quadrature-axis component of currents flowing into the rotor in pu based on the generator rating.</p><p>Id_rotor and Iq_rotor are respectively the real and imaginary parts of the positive-sequence rotor phasor current.</p></td></tr><tr><td>18</td><td></td><td>wr (pu)</td><td>Generator rotor speed (pu)</td></tr><tr><td>19</td><td></td><td>Tm (pu)</td><td>Mechanical torque applied to the generator (pu)</td></tr><tr><td>20</td><td></td><td>Te (pu)</td><td>Electromagnetic torque in pu based on the generator rating.</td></tr><tr><td>21-22</td><td>Vdq_grid_conv<br>(pu)</td><td>Vd_grid_conv (pu)<br>Vq_grid_conv (pu)</td><td><p>Direct-axis and quadrature-axis component of grid-side converter voltage in pu based on the generator rating.</p><p>Vd_grid_conv and Vq_grid_conv are respectively the real and imaginary parts of the grid-side converter phasor voltage.</p></td></tr><tr><td>23-25</td><td>Iabc_grid_conv<br>(cmplx)<br>(pu)</td><td>Ia_grid_conv (pu)<br>Ib_grid_conv (pu) Ic_grid_conv (pu)</td><td>Phasor currents Ia, Ib, Ic flowing into the grid-side converter in pu based on the generator rating.</td></tr><tr><td>26</td><td></td><td>P (pu)</td><td>WTDFIG output power. A positive value indicates power generation.</td></tr><tr><td>27</td><td></td><td>Q (pu)</td><td><p>WTDFIG output reactive power.</p><p>A positive value indicates reactive power generation.</p></td></tr><tr><td>28</td><td></td><td>Vdc (V)</td><td>DC voltage (V).</td></tr><tr><td>29</td><td></td><td>Pitch_angle (deg)</td><td>Blade pitch angle in degrees.</td></tr></tbody></table>

### Conserving

<table data-header-hidden><thead><tr><th width="249.5555419921875"></th><th></th></tr></thead><tbody><tr><td><strong>A</strong> — Positive terminal<br>SPS electrical</td><td>SPS electrical conserving port associated with A terminal of the WTDFIG.</td></tr><tr><td><strong>B</strong> — Negative terminal<br>SPS electrical</td><td>SPS electrical conserving port associated with B terminal of the WTDFIG.</td></tr><tr><td><strong>C</strong> — Negative terminal<br>SPS electrical</td><td>SPS electrical conserving port associated with C terminal of the WTDFIG.</td></tr></tbody></table>

## Examples

See the [Wind Farm - Doubly-Fed Induction Generator (DFIG) Phasor Model](https://opal-rt.atlassian.net/wiki/spaces/PSPS/pages/1551735113/Wind+Farm+-+Doubly-Fed+Induction+Generator+DFIG+Phasor+Model) (power\_wind\_dfig) example, which illustrates the steady-state and dynamic performance of the WTDFIG in a 9 MW Wind Farm connected on a 25 kV, 60 Hz, system.

## References <a href="#references" id="references"></a>

\[1] R. Pena, J.C. Clare, G.M. Asher, “Doubly fed induction generator using back-to-back PWM converters and its application to variable-speed wind-energy generation,” IEEE Proc.-Electr. Power Appl., Vol. 143, No. 3, May 1996

\[2] Vladislav Akhmatov, “Variable-Speed Wind Turbines with Doubly-Fed Induction Generators, Part I: Modelling in Dynamic Simulation Tools,” Wind Engineering Volume 26, No. 2, 2002

\[3] Nicholas W. Miller, Juan J. Sanchez-Gasca, William W. Price, Robert W. Delmerico, “DYNAMIC MODELING OF GE 1.5 AND 3.6 MW WIND TURBINE-GENERATORS FOR STABILITY SIMULATIONS,” GE Power Systems Energy Consulting, IEEE WTG Modeling Panel, Session July 2003


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.opal-rt.com/docs/smart-power-simulation-software-sps/blocks-functions-tools/renewables/wind-turbine-doubly-fed-induction-generator-phasor-type.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
