> 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/hypersim/examples/renewable-energy/type-4-wind-farm-model.md).

# Type 4 Wind Farm model

## Description

The **Type 4 Wind Farm (33 kV)** example, located in **File > Open an Example File > Renewable Energy**, demonstrates an aggregated wind farm using a detailed electromagnetic model of a permanent-magnet synchronous generator (PMSG)–based Type‑4 wind turbine.

The objective is to illustrate the electrical and mechanical models, associated control loops (machine-side and grid-side converters, DC link, and pitch control), and the farm’s response to wind-speed variations and a voltage sag.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-9a4c9c52c769be381c5d366b4872c513ee574aca%2Fimage%20(622).png?alt=media" alt=""><figcaption><p>4 wind farm model</p></figcaption></figure>

## Requirements

This example model does not require any additional hardware or licenses.

## Detailed explanation

### Background

Type‑4 wind turbines are widely used in grid-connected wind energy systems. This example implements an aggregated Type‑4 wind farm model.

### Electrical model

The model simulates an aggregated wind farm composed of identical PMSG-based Type‑4 wind turbine units. The electrical model is based on \[1], and turbine characteristics follow the GE wind turbine model in \[2]. Each wind turbine (WT) unit is rated at 5 MW. A user parameter sets the number of WT units in the wind farm (WF). A scaling block multiplies the collector system output power by the number of turbine units.

The aggregated WT connects to a simplified 33 kV, 50 Hz collector system emulating the grid. The nominal wind speed is 11.3 m/s.

### Operation and control

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-a590166d7852d6ec790aa26276d541484149e1a3%2Fimage%20(946).png?alt=media" alt=""><figcaption><p>Operational model</p></figcaption></figure>

The turbine shaft drives a PMSG whose stator windings connect to a back-to-back two-level voltage-source converter consisting of:

* Machine-Side Converter (MSC): Controls generator power extraction and generator terminal voltage. The terminal voltage reference is 1 pu. Flux-weakening control adjusts reactive current to ensure sufficient electromagnetic torque to match load torque while maintaining constant speed \[3]. The WT model block provides the MSC power reference.
* Grid-Side Converter (GSC): Regulates the DC-link voltage and reactive power. The DC-link voltage loop maintains 1450 V, and the reactive power loop operates at unity power factor.

A DC chopper with a dump load protects against overvoltage on the DC link. The chopper turns on when the DC-link voltage exceeds 1667.5 V (1.15 pu) and turns off when it falls below 1522.5 V (1.05 pu).

For more details, see the documentation of the [Permanent Magnet Synchronous Machine (PMSM) ](https://www.opal-rt.com/docs/hypersim/library-blocks-reference/network-machines/permanent-magnet-synchronous-machine-pmsm.md)block.

### Mechanical model

The mechanical model \[2] combines empirical turbine characteristics with blade pitch control to regulate generator speed at the rated value (900 rpm). When available power (or measured output power) falls below 27% of rated, the turbine reduces speed to maximize captured power. The “wind turbine to torque converter” block computes control references inspired by \[1].

## **PMSG Speed Reference Calculation**

The generator speed–power relationship is modeled as:

$$
Wref​=−0.75P^2+1.59P+0.63  \space \space \space \space \footnotesize (1)
$$

The nominal reference speed is 1 pu and is reduced for power levels below 0.27 pu, where $$P$$ is the power extracted from the generator (sum of the power measured on the collector side of the turbine transformer and the power dissipated in the chopper), and $$𝜔\_{𝑟𝑒𝑓}$$ is the PMSM speed reference.

## **Speed Control Loop**

The speed controller generates the MSC power reference to maintain rotor speed at the reference computed by equation (1).

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-586471f866faecbd51339a96f88f2928f406727b%2Fimage%20(947).png?alt=media" alt=""><figcaption></figcaption></figure>

## **Tip-Speed Ratio**

The tip-speed ratio is computed as:

$$
λ= \frac{\omega\_r R}{v\_w}  \quad\footnotesize{    (2)}
$$

where:

* $$ω\_r$$ is the rotor speed in rad/s,
* $$R$$ is the turbine radius in meters,
* $$v\_w$$ is the wind speed in m/s.

## Power regulation by pitch control

The pitch controller regulates the power delivered to the grid at the rated value by adjusting blade pitch. The model maximizes captured wind power within equipment ratings. If available wind power exceeds ratings, the pitch angle increases to curtail power to rated, disabling maximum power point tracking (MPPT).

## Load torque using the wind power model

The available wind power is modeled as:

$$
P\_{\text{wind}} = \frac{\rho}{2} A\_r v\_w^3 C\_p(\lambda, \beta) \quad\footnotesize{     (3)}
$$

where

$$P\_{wind}$$ is the power extracted from the wind,\
$$ρ$$ is air density in kg/m<sup>3</sup>,\
$$A\_r$$ is the rotor swept area in m<sup>2</sup>,\
$$v\_w$$ is wind speed in m/s,\
and $$C\_p$$ is the power coefficient, which depends on tip-speed ratio (eq. (2)) and blade pitch angle $$β$$.

The C<sub>p</sub> function characterizes the turbine’s aerodynamic efficiency and is modeled as a fourth-order, two-variable polynomial:

$$
C\_p(\lambda, \beta) = \sum\_{m=0}^{4} \sum\_{n=0}^{4} \alpha\_{mn} \beta^m \lambda^n \quad \footnotesize{     (4)}
$$

<details>

<summary>List of coefficients used in this model m, n and α<sub>mn</sub></summary>

<table><thead><tr><th width="80">m</th><th width="80.7999267578125">n</th><th width="150.20001220703125">αmn</th><th width="49.60003662109375"></th><th width="80.7999267578125">n</th><th width="80">m</th><th>αmn</th></tr></thead><tbody><tr><td>0</td><td>0</td><td>-4.19019e-1</td><td></td><td>2</td><td>3</td><td>-1.4588e-4</td></tr><tr><td>0</td><td>1</td><td>2.1808e-1</td><td></td><td>2</td><td>4</td><td>2.7939e-6</td></tr><tr><td>0</td><td>2</td><td>-1.2406e-2</td><td></td><td>3</td><td>0</td><td>-8.6018e-4</td></tr><tr><td>0</td><td>3</td><td>-1.3365e-4</td><td></td><td>3</td><td>1</td><td>5.7051e-4</td></tr><tr><td>0</td><td>4</td><td>1.1524e-5</td><td></td><td>3</td><td>2</td><td>-1.0479e-4</td></tr><tr><td>1</td><td>0</td><td>-6.7606e-2</td><td></td><td>3</td><td>3</td><td>5.9924e-6</td></tr><tr><td>1</td><td>1</td><td>6.0405e-2</td><td></td><td>3</td><td>4</td><td>-8.9194e-8</td></tr><tr><td>1</td><td>2</td><td>-1.3934e-2</td><td></td><td>4</td><td>0</td><td>1.4787e-5</td></tr><tr><td>1</td><td>3</td><td>1.0683e-3</td><td></td><td>4</td><td>1</td><td>-9.4839e-6</td></tr><tr><td>1</td><td>4</td><td>-2.3895e-5</td><td></td><td>4</td><td>2</td><td>1.6167e-6</td></tr><tr><td>2</td><td>0</td><td>1.5727e-2</td><td></td><td>4</td><td>3</td><td>-7.1535e-8</td></tr><tr><td>2</td><td>1</td><td>-1.0996e-2</td><td></td><td>4</td><td>4</td><td>4.9686e-10</td></tr><tr><td>2</td><td>2</td><td>2.1495e-3</td><td></td><td></td><td></td><td></td></tr></tbody></table>

</details>

### Blocks parameters

{% tabs %}
{% tab title="System " %}

<table><thead><tr><th width="340.4000244140625">Name</th><th width="119.800048828125">Unit</th><th>Value</th></tr></thead><tbody><tr><td>GSC Capacitor - C<sub>GSC</sub></td><td>mF</td><td>0.7</td></tr><tr><td>GSC Filter - F<sub>GSC</sub> [R L C]</td><td>[Ω uH uF]</td><td>[1.332 621 350]</td></tr><tr><td>GSC Choke - L<sub>GSC</sub></td><td>uH</td><td>135</td></tr><tr><td>DC Link Capacitor - C<sub>dc</sub></td><td>mF</td><td>40</td></tr><tr><td>Chopper Resistance - R<sub>chop</sub></td><td>Ω</td><td>0.4636</td></tr><tr><td>MSC Choke - L<sub>MSC</sub></td><td>uH</td><td>80</td></tr></tbody></table>
{% endtab %}

{% tab title="Transformer" %}

<table><thead><tr><th width="340.4000244140625">Name</th><th width="119.800048828125">Unit</th><th>Value</th></tr></thead><tbody><tr><td>Rated Voltage - V<sub>pri</sub>/V<sub>sec (Star-Delta lagging)</sub></td><td>V</td><td>33k/690</td></tr><tr><td>Rated Power - S<sub>rated</sub></td><td>MVA</td><td>5.5</td></tr><tr><td>Rated Frequency - f<sub>rated</sub></td><td>Hz</td><td>50</td></tr><tr><td>Primary resistance - R<sub>p</sub></td><td>Ω</td><td>0.4158</td></tr><tr><td>Primary inductance - L<sub>p</sub></td><td>H</td><td>0.0378</td></tr><tr><td>Secondary resistance - Rs</td><td>uΩ</td><td>18.186</td></tr><tr><td>Secondary inductance - Ls</td><td>uH</td><td>16.54</td></tr><tr><td>Magnetizing Resistance - R<sub>m</sub></td><td>Ω</td><td>73333</td></tr><tr><td>Magnetizing Inductance - L<sub>m</sub></td><td>H</td><td>157.56</td></tr></tbody></table>
{% endtab %}

{% tab title="Wind turbine" %}

<table><thead><tr><th width="340.5999755859375">Name</th><th>Unit</th><th>Value</th></tr></thead><tbody><tr><td>Turbine radius - R<sub>turb</sub></td><td>m</td><td>63</td></tr><tr><td>Turbine Rated Speed - n<sub>turb</sub> rated</td><td>rpm</td><td>12.1</td></tr><tr><td>Pitch Angle - <span class="math">[\beta_{\text{min}} \; \beta_{\text{max}}]</span></td><td>degree</td><td>[0 27]</td></tr></tbody></table>
{% endtab %}

{% tab title="PMSG" %}

<table><thead><tr><th width="340.39996337890625">Name</th><th>Unit</th><th>Value</th></tr></thead><tbody><tr><td>Rated Voltage - V<sub>rated</sub></td><td>V</td><td>690</td></tr><tr><td>Rated Power - P<sub>rated</sub></td><td>MW</td><td>5.2</td></tr><tr><td>No. of Poles - p</td><td>--</td><td>4</td></tr><tr><td>Rated Speed - n<sub>rpm</sub></td><td>rpm</td><td>900</td></tr><tr><td>Electrical Frequency - f<sub>e rated</sub></td><td>Hz</td><td>30</td></tr><tr><td>Stator Resistance - R<sub>s</sub></td><td>pu</td><td>0.0173</td></tr><tr><td>Stator Inductances - L<sub>s</sub></td><td>pu</td><td>[0.543 1.086]</td></tr><tr><td>Inertia constant (including the Turbine) - H</td><td>s</td><td>3.5</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

## Simulation and results

The table below lists the test scenarios executed on the Type‑4 wind farm model. Simulations used a 50 µs time step and 10 wind turbines (50 MW nominal wind farm power). Negative grid power values indicate power delivered to the grid.

<table><thead><tr><th width="183.4000244140625">Scenario</th><th width="113">Operating points</th><th>From</th><th>To</th><th>Wind speed (m/s)</th></tr></thead><tbody><tr><td>1- Maintain nominal wind speed</td><td>1</td><td>0 s</td><td>20 s</td><td>11.3 m/s</td></tr><tr><td>2- Wind speed decrease by 10%</td><td>2</td><td>20 s</td><td>30 s</td><td>10.17 m/s</td></tr><tr><td>3- Voltage sag of 5%</td><td>3</td><td>30 s</td><td>31 s</td><td>10.17 m/s</td></tr><tr><td>4- Wind speed increase by 20%</td><td>4</td><td>60 s</td><td>80 s</td><td>12.43 m/s</td></tr><tr><td>5- Restored to nominal wind speed</td><td>5</td><td>80 s</td><td>100 s</td><td>11.3 m/s</td></tr></tbody></table>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-d84406d0a9dce9dec3bb96827c344d9a61c2fca5%2Fimage%20(602).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-186ea7ceabf7837da8f66ea43da159bc5f1b10b0%2Fimage%20(603).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-c0605ba125770e644608f9a54152eff9f23b9ad0%2Fimage%20(604).png?alt=media" alt=""><figcaption></figcaption></figure>

### Case 1: Nominal wind speed (11.3 m/s)

Open “Type4\_WindTurbine\_33kV.ecf” and start the simulation. To view results, open the ScopeView template “Type4\_WindTurbine\_33kV.svt”.\
At nominal conditions, each WT delivers 5 MW; with 10 WTs, grid power is approximately 50 MW. As the model represents a wind farm with 10 wind turbine instances, the power to the grid is around 50MW.

<details>

<summary>Simulation results</summary>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-92c9d7d223883287090a03b0c1cf8e53c7e243ae%2Fimage%20(605).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-54d2627e41eea4f4bdb00f134689bc1ea3650057%2Fimage%20(606).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-fd2b4668f11337e15c6f4a4160c3fb9952ed8139%2Fimage%20(607).png?alt=media" alt=""><figcaption></figcaption></figure>

</details>

### Case 2: Wind speed decrease (−10%)

Open “Type4\_WindTurbine\_33kV.ecf” and set the gain in the wind-speed change logic to −1.13.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-1f11a7230c1e2182ecb28f1fadc798b4fd50569d%2Fimage%20(608).png?alt=media" alt=""><figcaption></figcaption></figure>

The reduced wind speed changes the tip-speed ratio, modifying load torque. Rotor speed temporarily increases; the speed controller reduces generator power extraction. Grid power decreases to about 0.83 pu, and the DC link remains well regulated.

<details>

<summary>Simulation results</summary>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-6b8f28d42958a9bca94bdb93bddb19b389086ce2%2Fimage%20(609).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-bc9e5e51c62c0a6d31964ea2fa7a16178f7492c0%2Fimage%20(610).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-cb9a450d08330887e680d1cfc8216feab716e231%2Fimage%20(611).png?alt=media" alt=""><figcaption></figcaption></figure>

</details>

### Case 3: Voltage sag (−5% for 1 s)

In “Type4\_WindTurbine\_33kV.ecf”, open the properties of the programmable AC source AC1. Enable the source, enable AC ramp/step, set amplitude to 0.95×V<sub>base</sub>, and schedule the voltage to drop to 0.95 pu at 30 s and return to 1 pu at 31 s.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-b5ae4ad56b4fabf50841f71c077fa37cd6505cce%2Fimage%20(612).png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

The wind farm operates at unity power factor and does not provide voltage support (as expected). Speed and power remain regulated at rated values. PCC voltage shows a 1 s sag; transformer primary current increases to maintain rated power and keep the DC link regulated.

<details>

<summary>Simulation results</summary>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-41f9732b6d160b495980d3dade31552df6448f2e%2Fimage%20(613).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-982a376edbfa787c18b1685c6bd9f402ed7f1530%2Fimage%20(614).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-66b9f3aa3a438b7baa58e1544d255c9e122bb534%2Fimage%20(615).png?alt=media" alt=""><figcaption></figcaption></figure>

</details>

### Case 4: Wind speed increase (+20%)

A step increase in wind speed raises the tip-speed ratio and load torque. Rotor speed temporarily increases; the speed controller raises generator power extraction.\
Because power above nominal cannot be sustained, the pitch controller increases the blade pitch angle to curtail power to rated. The DC link remains well regulated.

<details>

<summary>Simulation results</summary>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-a86aa02e8055dce97205c6a5c5c85ea6ab82351f%2Fimage%20(616).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-dc756f6e7c995bb035fc33995ee44f3b1c9f4227%2Fimage%20(617).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-56b9c82e27470111b2b35d6eac6e8ad35b8184ee%2Fimage%20(618).png?alt=media" alt=""><figcaption></figcaption></figure>

</details>

### Case 5: Return to nominal wind speed

Wind speed returns to 11.3 m/s to prepare for subsequent acquisitions and ensure repeatable results. The transient response mirrors Case 2, with the speed controller reducing power extraction as the turbine returns to nominal operation.

<details>

<summary>Simulation results</summary>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-bd33c25543298a6409bda29c4c0e589cad246fee%2Fimage%20(619).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-bfac5fa8f526bf8a4844c2f6c634cdf73e8910b1%2Fimage%20(620).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-18ca0f158e3d964618638fa97fb5986aae23120a%2Fimage%20(621).png?alt=media" alt=""><figcaption></figcaption></figure>

</details>

## References

\[1] <https://hvdc.ca/knowledge-base/read,article/227/type-4-wind-turbine-generators/v>:\
\[2] K. Clark, N. W. Miller, J. J. Sanchez-Gasca. “Modeling of GE Wind Turbine-Generators for Grid Studies”, April 2010, General Electric International, Inc., NY USA\
\[3] W. L. Soong and T. J. E. Miller, "Field-weakening performance of brushless synchronous AC motor drives," Electric Power Applications, IEE Proceedings -, vol. 141, pp. 331-340, 1994.


---

# 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/hypersim/examples/renewable-energy/type-4-wind-farm-model.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.
