> 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/rt-lab/simulink-blocks-reference/smart-inverter-library/gfl-wave-reference-three-phase.md).

# GFL Wave Reference Three Phase

## Description

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-b040e0a259abe2196276f2f22f55d8a4125cde72%2FCSI_RT_wave_ref_3P_block.png?alt=media" alt=""><figcaption></figcaption></figure>

The \*\*Wave Reference 3-phase\*\* block, located in the \*\*Smart Inverter Library\*\*, generates the three-phase reference signal that drives the semiconductor bridge by regulating the d- and q-axis current components based on the input reference currents Id and Iq. The output can be configured as a duty ratio or as an instantaneous voltage. The block includes the current controller and implements active islanding detection methods in coordination with the protection system by modifying the reference current waveform.

{% hint style="danger" %}
This block requires a valid license on both the simulator and the workstation with the feature SMART INVERTER enabled.
{% endhint %}

### Control system

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-2fcba88767aabd31d1218d0a767a0e87e712ab78%2FCSI_GFL_wave_ref_schem.png?alt=media" alt=""><figcaption><p>Simplified control diagram for a grid-connected inverter system</p></figcaption></figure>

The amplitude $$I$$ and phase $$\theta$$ of the per-phase current reference (x={a,b,c}) is first calculated from the input peak value of the per-phase real $$I\_p$$ and reactive $$I\_q$$ component of the current as follows:

$$
I\_x=\sqrt{I\_{px}^2 + I\_{qx}^2}
$$

$$
\theta\_x=artan \left( \frac{I\_{px}}{I\_{qx}} \right)
$$

$$
I\_{refa}=I\_a sin(\omega t+\theta\_a) \\\[8pt]
I\_{refb}=I\_b sin(\omega t -\frac{2\pi}{3}+\theta\_b) \\\[8pt]
I\_{refc}=I\_c sin(\omega t +\frac{2\pi}{3}+\theta\_c) \\\[8pt]
$$

A Park transformation is applied to rotate the reference frame of the per‑phase current references and to measure the inverter output currents using the phase angle estimated by a phase‑locked loop (PLL). The direct and quadrature current components are compared with their respective references, and the resulting error signals are processed by the current controllers (one per component).

The current controllers generate the reference voltages, with decoupling between the direct and quadrature axes applied according to the output‑filter topology. Dynamic saturation, based on the measured DC‑link voltage, limits the reference voltages. These voltage references are then passed to the PWM modulator, which drives the semiconductor bridge. If a disable signal is asserted, the voltage references are forced to zero, thereby blocking the firing of the semiconductor devices.

The type of current controller is selectable. One option is a conventional proportional‑integral (PI) controller. The discrete‑time transfer function of the PI current controller implemented in this model is given by:

$$
PI(z)=k\_p+K\_iT\_s\frac{z}{z-1}
$$

where $$k\_p$$ is the proportional gain and $$k\_i$$ is the integral gain of the PI controller. As indicated by the transfer function, the Backward Euler integration method is used. An anti‑windup scheme based on unity back‑calculation is also implemented to prevent overshoot when the current reference changes.

Users may alternatively implement a different current controller by selecting the custom transfer‑function option. In this case, the controller can be defined using a higher‑order transfer function, as shown below.

$$
C(z)=\frac{a\_0z^m+a\_1z^{m-1}+...+a\_m}{b\_0z^n+b\_1z^{n-1}+...+a\_n}
$$

Either current controller generates the reference voltage. When the output signal is selected as the inverter voltage, the controller produces balanced three‑phase instantaneous voltage waveforms suitable for driving an average converter model. When the output signal is selected as the duty ratio, it generates balanced, normalized reference signals that are supplied to a modulator to produce the switching pulses for a detailed switching‑converter model.

### Active Islanding Detection Methods <a href="#active-islanding-detection-methods" id="active-islanding-detection-methods"></a>

The following active islanding detection methods are implemented:

* **GE Voltage Scheme**
* **GE Frequency Scheme**
* **GE Voltage and Frequency Scheme**

These methods employ positive feedback based on the measured inverter output voltage magnitude and/or frequency, applied in the direct and quadrature axes of the current‑control loops. When the inverter operates in an islanded condition, this feedback drives the voltage and/or frequency away from nominal values until the protection mechanisms are triggered.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-430a45d0e11d0e005e36aec99e64a446058082bb%2FCSI_GFL_wave_ref_island_schem.png?alt=media" alt=""><figcaption><p>GE voltage scheme</p></figcaption></figure>

This scheme uses the measured inverter output voltage magnitude to implement active islanding detection \[1]. The direct‑axis component of the measured voltage is processed through a second‑order band‑pass filter, a gain, and a limiter, and then added to the direct‑axis current reference. When the inverter is islanded, a small voltage deviation leads to an increase in output active power, which further amplifies the voltage through this positive‑feedback mechanism.

The GE frequency scheme applies the same principle using the measured voltage frequency. The frequency signal is passed through a second‑order band‑pass filter, a gain, and a limiter, and then added to the quadrature‑axis current reference. Under islanded conditions, a slight frequency deviation causes an increase in output reactive power, which in turn further drives the frequency away from nominal through positive feedback.

### Limitations

Feeding the Wave Reference Three‑Phase block with highly unbalanced currents is not recommended. The implemented current controller operates in the DQ reference frame and is designed under the assumption of typical balanced‑system operation.

For LC and LCL filters, the current controller is implemented for grid‑side current control, assuming that the grid‑side and converter‑side currents are identical.

## Mask parameters

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-59c9e1ec09fda4a52012292b57f41d0d4b55a7e9%2FCSI_RT_wave_ref_3P_mask.png?alt=media" alt=""><figcaption></figcaption></figure>

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

<table><thead><tr><th width="190">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Nominal Operating Voltage (Vrms LL)</strong></td><td>Grid nominal line-to-line voltage (V).</td></tr><tr><td><strong>Rated Apparent Power</strong></td><td>Inverter apparent power used for per-unit calculations (VA).</td></tr><tr><td><strong>Rated DC Link Voltage</strong></td><td>DC link rated voltage (V). Used for dynamic saturation of the current controller.</td></tr><tr><td><strong>Output Signal Selection</strong></td><td>Select the output reference type: Inverter Voltage or Duty Ratio.</td></tr><tr><td><strong>Islanding Detection Enabled</strong></td><td>Enable islanding detection (Yes/No)</td></tr><tr><td><strong>Enable Momentary Cessation</strong></td><td>Activate the input for the <strong>VRTm</strong> signal. This signal is generated by the Voltage Protection block.<br>When <strong>VRTm = 2</strong>, the internal current reference of the block becomes zero. The converter will still be connected and operating without injecting current.</td></tr><tr><td><strong>Sample Time</strong></td><td>Sample time for simulation of the component.</td></tr></tbody></table>
{% endtab %}

{% tab title="Current Controller" %}

<table><thead><tr><th width="190">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Current Controller Type</strong></td><td>Implementation type for the current controller: PI (Proportional–Integral) or Custom Transfer Function.</td></tr><tr><td><strong>PI Controller Proportional Gain</strong></td><td>Proportional gain for the PI current controller.</td></tr><tr><td><strong>PI Controller Integral Gain</strong></td><td>Integral gain for the PI current controller.</td></tr><tr><td><strong>Custom Controller Numerator Coefficients</strong></td><td>Numerator polynomial coefficients of the custom transfer function.</td></tr><tr><td><strong>Custom Controller Denominator Coefficients</strong></td><td>Denominator polynomial coefficients of the custom transfer function.</td></tr></tbody></table>
{% endtab %}

{% tab title="Output Filter" %}

<table><thead><tr><th width="190">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Inverter Side Inductor</strong></td><td>Inductance on the inverter side (H).</td></tr><tr><td><strong>Internal Resistance of Inverter Side Inductor</strong></td><td>Series resistance of the inverter-side inductor (Ω).</td></tr><tr><td><strong>Grid Side Inductor</strong></td><td>Inductance on the grid side (H).</td></tr><tr><td><strong>Internal Resistance of Grid Side Inductor</strong></td><td>Series resistance of the grid-side inductor (Ω).</td></tr></tbody></table>
{% endtab %}

{% tab title="Islanding Detection Method" %}

<table><thead><tr><th width="190">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Islanding Detection Method</strong></td><td>General Electric (GE) scheme selection: none, GE Frequency, GE Voltage, or GE Voltage+Frequency.</td></tr><tr><td><strong>GE Voltage Scheme Gain</strong></td><td>Positive feedback gain applied to the d-axis current component.</td></tr><tr><td><strong>GE Frequency Scheme Gain</strong></td><td>Positive feedback gain applied to the q-axis current component.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

## Inputs

| Input         | Description                                                                                                         |
| ------------- | ------------------------------------------------------------------------------------------------------------------- |
| **Ip**        | Peak per-phase current component for active power (pu).                                                             |
| **Iq**        | Peak per-phase current component for reactive power (pu).                                                           |
| **Igrid**     | Three-phase instantaneous current injected into the grid (pu).                                                      |
| **Vdc**       | DC link voltage (pu).                                                                                               |
| **wt**        | Grid voltage phase angle (rad).                                                                                     |
| **Frequency** | Inverter output voltage frequency (Hz).                                                                             |
| **Vgrid**     | Three-phase instantaneous grid voltages (pu).                                                                       |
| **VRTm**      | Voltage ride-through input for momentary cessation. When VRTm = 2, the current reference is set to zero internally. |
| **Reset**     | Resets the current controller when set to 1.                                                                        |
| **Disable**   | Forces block outputs to 0 when set to 1.                                                                            |

## Outputs

| Output             | Description                                                       |
| ------------------ | ----------------------------------------------------------------- |
| **Duty Ratio - D** | Per-phase duty ratio reference (0 to 1) to drive a PWM modulator. |

## Signals available for monitoring and external I/O connections (via sensors form)

All block inputs and outputs are available as signals for monitoring and for external I/O connections.

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

\[1] U.S. National Renewable Energy Laboratory, "Study and Development of Anti-Islanding Control for Grid-Connected Inverters," Golden, CO, 2004.

{% hint style="danger" %}

## **Intellectual Property Disclaimer**

Natural Resources Canada owns all intellectual property rights in the Smart Inverter Modelling Toolbox software and related products.
{% endhint %}

{% hint style="info" %}

## Acknowledgements <a href="#acknowledgements" id="acknowledgements"></a>

The development of the <code class="expression">page.vars.block\_name</code> block in the Smart Inverter Control Library is a contribution of CanmetENERGY at Natural Resource Canada.
{% endhint %}


---

# 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/rt-lab/simulink-blocks-reference/smart-inverter-library/gfl-wave-reference-three-phase.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.
