> 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-primary-control-three-phase.md).

# GFL Primary Control 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-a5c775410d43e9936fe0ed0b696e4ff4b613defc%2FCSI_RT_GFL_1Control_3P_bloc.png?alt=media" alt="" width="90"><figcaption></figcaption></figure>

The \*\*Primary Control 3-phase\*\* block, located in the \*\*Smart Inverter Library library\*\*, generates the peak reference magnitudes of the active and reactive current components used by the three-phase wave reference component to control the inverter’s active and reactive power. The primary active power loop can operate in open loop, via a DC-link voltage controller, or via an AC-side closed-loop power controller. The primary reactive power loop can operate in open loop or via an AC-side closed-loop reactive power controller. Power reference values can be set directly or provided by the Secondary Control component. Inputs first pass through signal conditioning that limits power values to configured bounds and limits the rate of change of the DC-link voltage reference.

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

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-e56da5d079bb62cda9ecc4717d8e8d4db35c646d%2FCSI_GFL_1Control_3P_diagram.png?alt=media" alt="" width="563"><figcaption><p>Primary Control block—internal schematic</p></figcaption></figure>

Under the primary active control method, there are three different modes:

1. Open loop: Converts the active and/or reactive power reference into the corresponding active and/or reactive current component (Ipr and/or Iqr) proportionally.
2. DC link: A PI controller minimizes the error between measured and reference DC-link voltage to produce the active current reference (Ipr).
3. AC side (closed loop): A PI controller minimizes the error between measured and reference active and/or reactive power to produce the active and/or reactive current references (Ipr and/or Iqr).

The active and reactive current component references are then rate-limited to constrain the rate of change of the active power reference, reactive power reference, and DC-link voltage reference.

{% hint style="info" %}
The Primary Control block is intended to be used with balanced three-phase systems.
{% endhint %}

## Mask parameters

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

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

<table><thead><tr><th width="190">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Primary Active Power Control Method</strong></td><td>Select the primary active power control method of the inverter system: Open Loop, DC-Link, or Closed-Loop.</td></tr><tr><td><strong>Primary Reactive Power Control Method</strong></td><td>Select the primary reactive power control method of the inverter system: Open Loop or Closed Loop.</td></tr><tr><td><strong>Enable Rate Limiters</strong></td><td>Select to apply rate limiters on DC-Link voltage, real, and reactive power commands.</td></tr><tr><td><strong>Enable Momentary Cessation</strong></td><td>Activate the input for the VRTm signal. This signal is generated by the Voltage Protection Three-phase block.<br>When <strong>VTRm = 2</strong>, the current reference is set to zero internally.</td></tr><tr><td><strong>Current Limit</strong></td><td>Maximum limit for the peak value of the inverter output current (pu).</td></tr><tr><td><strong>Initial active power</strong></td><td>Initial active power reference (pu).</td></tr><tr><td><strong>Initial reactive power</strong></td><td>Initial reactive power reference (pu).</td></tr><tr><td><strong>Sample time</strong></td><td>Input sample time period (s)</td></tr></tbody></table>
{% endtab %}

{% tab title="Controller" %}

<table><thead><tr><th width="190">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Proportional Gain</strong></td><td>Proportional gain of the DC Link/active power/reactive power PI controller.</td></tr><tr><td><strong>Integral Gain</strong></td><td>Integral gain of the DC Link/active power/reactive power PI controller.</td></tr></tbody></table>
{% endtab %}

{% tab title="Rate Limiter" %}
{% endtabs %}

## Inputs

| Input       | Description                                                                                                             |
| ----------- | ----------------------------------------------------------------------------------------------------------------------- |
| **Pr**      | Reference value of active power (pu). Unavailable when DC Link control mode is activated.                               |
| **P**       | Active power measurement (pu). Available when the Primary Active Power Control Method is set to AC Side (Closed Loop).  |
| **Qr**      | Reference value of reactive power (pu).                                                                                 |
| **Q**       | Reactive power measurement (pu). Available when Primary Reactive Power Control Method is set to AC Side (Closed Loop).  |
| **Vdcr**    | DC-link voltage reference (V). Available when the Primary Active Power Control Method is set to DC Link.                |
| **Vdc**     | DC-link voltage measurement (V). Available when the Primary Active Power Control Method is set to DC Link.              |
| **Vrms**    | Average of the RMS value of the three-phase grid voltages (pu).                                                         |
| **Prd**     | Active power reference of the DC link. Available when the Primary Active Power Control Method is set to DC Link.        |
| **Disable** | Controls the block outputs. When Disable = 1, the outputs are forced to 0.                                              |
| **Reset**   | Resets the controller(s). When Reset = 1, the controller is reset.                                                      |
| **VRTm**    | Voltage ride-through input to enable momentary cessation. When VRTm = 2, the power reference is set to zero internally. |

## Outputs

| Output | Description                                                                                                          |
| ------ | -------------------------------------------------------------------------------------------------------------------- |
| **Ip** | Peak value of the single-phase current component representing real power (pu). 3x1 vector with identical values.     |
| **Iq** | Peak value of the single-phase current component representing reactive power (pu). 3x1 vector with identical values. |

## 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

IEEE Std. 1547-2003, IEEE Standard for Interconnecting Distributed Resources with Electric Power Systems, 2003.

T. Krein, J. Bentsman, R. M. Bass and B. L. Lesieutre, “On the Use of Averaging for the Analysis of Power Electronics Systems,” IEEE Transactions on Power Electronics, vol. 5, pp. 182–190, Apr 1990.

Timbus, M. Liserre, R. Teodorescu, P. Rodriguez and F. Blaabjerg, “Evaluation of Current Controllers for Distributed Power Generation Systems,” IEEE Transactions on Power Electronics, vol. 24, no. 3, pp. 654–664, Mar 2009.

A. Ninad and L. A. C. Lopes, “A Low Power Utility Interactive Inverter for Residential PV generation with Small DC Link Capacitor,” in Proceeding of 3rd Canadian Solar Building Conference, Fredericton, Canada, pp. 28-36, Augt 2008.

Bower and M. Ropp, “Evaluation of Islanding Detection Methods for Utility-Interactive Inverters in Photovoltaic Systems” SANDIA Report SAND2002-3591, Albuquerque, NM: Sandia National Labs, Nov 2002.

Ye, A. Kolwalkar, Y. Zhang, P. Du and R. Walling, “Evaluation of Anti-islanding Schemes Based on Non-detection Zone Concept,” IEEE Transactions on Power Electronics, vol. 19, no. 5, pp. 1171–1176, Sep 2004.

Ropp, M. Begovic and A. Rohatgi, “Analysis and Performance Assessment of the Active Frequency Drift Method of Islanding Prevention,” IEEE Transaction on Energy Conversion, vol. 14, no. 3, pp. 810–816, Sep1999.

A. C. Lopes and H. Sun, “Performance Assessment of Active Frequency Drifting Islanding Detection Methods,” IEEE Transactions on Energy Conversion, vol. 21, no. 1, pp. 171–180, Mar 2006.

Ye, R. Walling, L. Garces, R. Zhou, L. Li and T. Wang, “Study and Development of Anti-Islanding Control for Grid-Connected Inverters,” Report NREL/SR-560-36243, Golden, CO: National Renewable Energy Laboratory, May 2004.

Yafaoui, B. Wu, and S. Kouro, “Improved Active Frequency Drift Anti-islanding Detection Method for Grid Connected Photovoltaic Systems,” IEEE Transactions on Power Electronics, vol. 27, no. 5, pp. 2367-2375, May 2012.

Stevens, R. Bonn, J. Ginn, S. Gonzalez and G. Kern, “Development and Testing of an Approach to Anti-Islanding in Utility-Interconnected Photovoltaic Systems,” Sandia National Laboratories, Tech. Rep. SAND2000-1939, Aug 2000.

Mulhausen, J. Schaefer, M. Mynam, A. Guzman and M. Donolo, “Anti-Islanding Today, Successful Islanding in the Future,” in 63rd Annual Conference for Protective Relay Engineers, pp. 1–8, Mar 2010.

{% 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-primary-control-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.
