> 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/gfm-secondary-control-three-phase.md).

# GFM Secondary 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-43803698a20d611b196c0914fcbe25eb1035e523%2FCSI_GFM_2ndecontrol_3P_block.png?alt=media" alt="" width="328"><figcaption></figcaption></figure>

The **GFM Secondary Control Three Phase** block, located in the **Control Smart Inverters library**, implements secondary voltage and frequency control loops to correct steady-state deviations introduced by the primary controller. It measures the RMS voltage and system frequency at the point of interest and computes adjusted voltage and angular-frequency references for the primary control loop. To maintain safe operation, the block limits both the magnitude and the rate of change for voltage and frequency.

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

### Secondary control loop – Voltage

The loop compares the measured RMS voltage to its reference, processes the error with a PI controller, and applies a rate limiter and a saturation block to constrain the reference.

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

### Secondary control loop – Frequency

The loop compares the measured frequency to its reference, processes the error with a PI controller, and applies a rate limiter and a saturation block to constrain the reference.

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

## Mask parameters

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-0d981f0390da3b9386ccca49564429cb14566e96%2FCSI_GFM_2ndecontrol_3P_mask.png?alt=media" alt="" width="400"><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>Nominal Operating Voltage</strong></td><td>Nominal line-to-line RMS voltage of the grid-forming converter (V)</td><td>Vbase_sec_cntrl unconstrained</td></tr><tr><td><strong>Nominal Frequency</strong></td><td>Nominal operating frequency of the grid-forming converter (Hz)</td><td>f_nom_sec_cntrl unconstrained</td></tr><tr><td><strong>Voltage Proportional Gain</strong></td><td>Proportional gain of the secondary voltage control loop (pu)</td><td>kp_vol_sec_cntrl unconstrained</td></tr><tr><td><strong>Voltage Integral Gain</strong></td><td>Integral gain of the secondary voltage control loop (pu/s)</td><td>ki_vol_sec_cntrl unconstrained</td></tr><tr><td><strong>Frequency Proportional Gain</strong></td><td>Proportional gain of the secondary frequency control loop (pu)</td><td>kp_freq_sec_cntrl unconstrained</td></tr><tr><td><strong>Frequency Integral Gain</strong></td><td>Integral gain of the secondary frequency control loop (pu/s)</td><td>ki_freq_sec_cntrl unconstrained</td></tr><tr><td><strong>Lower Voltage Limit</strong></td><td>Minimum limit of the voltage (line-to-line, RMS). The secondary controller saturates to this value (V)</td><td>lowlim_vol_sec unconstrained</td></tr><tr><td><strong>Upper Voltage Limit</strong></td><td>Maximum limit of the voltage (line-to-line, RMS). The secondary controller saturates to this value (V)</td><td>uplim_vol_sec unconstrained</td></tr><tr><td><strong>Lower Frequency Limit</strong></td><td>Minimum limit of the frequency. The secondary controller saturates to this value (Hz)</td><td>lowlim_freq_sec unconstrained</td></tr><tr><td><strong>Upper Frequency Limit</strong></td><td>Maximum limit of the frequency. The secondary controller saturates to this value (Hz)</td><td>uplim_freq_sec unconstrained</td></tr><tr><td><strong>Maximum Rate of Frequency Change</strong></td><td>Maximum rate at which the secondary controller can change the frequency reference (pu/s)</td><td>freq_sec_rate_limit unconstrained</td></tr><tr><td><strong>Maximum Rate of Voltage Change</strong></td><td>Maximum rate at which the secondary controller can change the voltage reference (pu/s)</td><td>vol_sec_rate_limit unconstrained</td></tr></tbody></table>

## Inputs

| Input                 | Description                                        |
| --------------------- | -------------------------------------------------- |
| **Freq**              | Measured system frequency (pu)                     |
| **Voltage (RMS, pu)** | Measured RMS voltage at the point of interest (pu) |
| **Reset**             | Reset signal                                       |

## Outputs

| Output        | Description                                                   |
| ------------- | ------------------------------------------------------------- |
| **Vref**      | Reference voltage for the primary control loop (pu)           |
| **Omega ref** | Reference angular frequency for the primary control loop (pu) |

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

## 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/gfm-secondary-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.
