> 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/library-blocks-reference/control-smart-inverters/gfl-primary-control-three-phase.md).

# GFL Primary Control Three Phase

## Description

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-ed300cceeb7e3832dc0c38b5f7ae6cdbfd2daaa3%2FCSI_GFL_1Control_3P_block.png?alt=media" alt="" width="205"><figcaption></figcaption></figure>

The **GFL Primary Control Three Phase** block, located in the **Control Smart Inverters 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.

{% 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://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%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

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

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

<table><thead><tr><th width="190">Parameter</th><th>Description</th><th width="140">Variable &#x26; Constraints</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 (1), DC-Link (2), or Closed-Loop (3).</td><td>Pmeth ∈ {1, 2, 3}</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 (1) or AC Side (Closed Loop) (2).</td><td>Qmeth ∈ {1, 2}</td></tr><tr><td><strong>Current Limit</strong></td><td>Maximum limit for the peak value of the inverter output current (pu).</td><td>Ilim unconstrained</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><td>rate_tr ∈ {0, 1}</td></tr><tr><td><strong>Initial active power</strong></td><td>Initial active power reference (pu).</td><td>P_init unconstrained</td></tr><tr><td><strong>Initial reactive power</strong></td><td>Initial reactive power reference (pu).</td><td>Q_init unconstrained</td></tr></tbody></table>
{% endtab %}

{% tab title="Controller" %}

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

<table><thead><tr><th width="190">Parameter</th><th>Description</th><th width="140">Variable &#x26; Constraints</th></tr></thead><tbody><tr><td><strong>Proportional Gain</strong></td><td>Proportional gain of the Active Power/Reactive Power/DC Link PI controller.</td><td>{kp_p, kp_q,kp_vdc} unconstrained;<br>kp_p: available when Pmeth = 3<br>kp_q: available when Qmeth = 2<br>kp_vdc: available when Pmeth = 2</td></tr><tr><td><strong>Integral Gain</strong></td><td>Integral gain of the Active Power/Reactive Power/DC Link PI controller.</td><td>{ki_p, ki_q, ki_vdc} unconstrained;<br>ki_p: available when Pmeth = 3<br>ki_q: available when Qmeth = 2<br>ki_vdc: available when Pmeth = 2</td></tr></tbody></table>
{% endtab %}

{% tab title="Rate Limiter" %}

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

<table><thead><tr><th width="190">Parameter</th><th>Description</th><th width="140">Variable &#x26; Constraints</th></tr></thead><tbody><tr><td><strong>Maximum Increase Rate for DC Link Voltage/Active Power/Reactive Power Reference</strong></td><td>Maximum allowed increase rate for active power, reactive power, and DC-link voltage references (pu/s).</td><td>{IR_VDC, IR_P, IR_Q} unconstrained; available when rate_tr = 1; IR_VDC available when Pmeth = 2; IR_P available when Pmeth ∈ {1, 3}; IR_Q available when Qmeth ∈ {1, 2}</td></tr><tr><td><strong>Maximum Decrease Rate for DC Link Voltage/Active Power/Reactive Power Reference</strong></td><td>Maximum allowed decrease rate for active power, reactive power, and DC-link voltage references (pu/s).</td><td>{DR_VDC, DR_P, DR_Q} unconstrained; available when rate_tr = 1; DR_VDC available when Pmeth = 2; DR_P available when Pmeth ∈ {1, 3}; DR_Q available when Qmeth ∈ {1, 2}</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

{% hint style="info" %}
Mode reminder:<br>

* **Pmeth** (Primary Active Power Control Method)
  * 1 = Open Loop
  * 2 = DC Link
  * 3 = AC Side (Closed Loop)
* **Qmeth** (Primary Reactive Power Control Method)
  * 1 = Open Loop
  * 2 = AC Side (Closed Loop)

All “available when” conditions in this page refer to these mode selections, not signal value limits.
{% endhint %}

## Inputs

| Input        | Description                                                                                                                                                                                       |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Pr**       | Reference value of active power (pu). Active when the Primary Active Power Control Method is Open Loop or AC Side (Closed Loop).                                                                  |
| **P**        | Active power measurement (pu). Active when the Primary Active Power Control Method is AC Side (Closed Loop).                                                                                      |
| **Qr**       | Reference value of reactive power (pu). Active in all reactive control modes.                                                                                                                     |
| **Q**        | Reactive power measurement (pu). Active when the Primary Reactive Power Control Method is AC Side (Closed Loop).                                                                                  |
| **Vdcr**     | DC-link voltage reference (V). Active when the Primary Active Power Control Method is DC Link.                                                                                                    |
| **Vdc**      | DC-link voltage measurement (V). Active when the Primary Active Power Control Method is DC Link.                                                                                                  |
| **Vrms avg** | Average of the RMS value of the three-phase grid voltages (pu). Active when the Primary Reactive Power Control Method is Open Loop, or when the Primary Active Power Control Method is Open Loop. |
| **Prd**      | Active power reference of the DC link. Active 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. Active when Enable Momentary Cessation is enabled. 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

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

\[2] 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.

\[3] 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.

\[4] 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.

\[5] 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.

\[6] 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.

\[7] 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.

\[8] 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.

\[9] 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.

\[10] 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.

\[11] 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.

\[12] 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.

## Intellectual Property and Acknowledgements

{% 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/hypersim/library-blocks-reference/control-smart-inverters/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.
