> 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/regfm_c1.md).

# REGFM\_C1

## Description

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

The **REGFM\_C1 (Renewable Energy Grid-Forming Hybrid Control Inverter-Based Resource Model)** block, located in the **Control Smart Inverters library**, is a positive-sequence hybrid model that combines a GFM branch and a GFL branch in a single inverter representation. It includes a voltage-source branch with virtual synchronous machine (VSM) behavior, a current-source branch with GFL control, and a transient fault current limiting function. \[1]

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

The block behaves as a controllable voltage source behind a coupling reactance. The following figure shows the interface circuit implemented in this block.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-a0f34375e038b0e0c9f041eb862746177b2558c1%2FCSI_REGFM_C1_circuit.png?alt=media" alt="" width="250"><figcaption><p>REGFM\_C1 interface circuit</p></figcaption></figure>

The REGFM\_C1 block contains three main functional parts.

### GFM Control

The GFM branch implements a typical virtual synchronous machine (VSM) control. Figure below illustrates its implementation.

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

Voltage control logic is shown in figure below.

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

### GFL Control

The GFL branch implements a typical GFL control, which also includes active or reactive power prioritization. See figure below.

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

### Fault Current Limiting function

This function limits inverter current during short-circuit conditions by modifying the internal voltage source and current source. Logic is as shown below.

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

### Load Flow

This block is implemented so the IBR can be initialized in steady-state operation. For load flow purposes, REGFM\_C1 is generally considered a PV bus, so it is necessary to define the voltage magnitude in pu and the active power P to be delivered by the IBR at the terminals in W. In the case of the SLACK bus, the voltage magnitude and angle in pu and degrees, respectively, must be defined.

To calculate the initial conditions of the model from the load flow, it is important to know the type of filter used in the model's interface circuit. In the original model described in \[1], only the RL filter option can be used, but if an external current limiting function with an RLC (or simply LC) filter is used, this filter type must be selected, and the capacitance value added in the general tab to correctly calculate the initial conditions.

## Mask parameters

{% hint style="info" %}
Note: Always run load flow using this block to correctly initialize internal model states.
{% endhint %}

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

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

| Parameter                                                                | Description                                                                                       | Variable & Constraints              |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------- | ----------------------------------- |
| **Base Voltage**                                                         | Base voltage used for per-unit calculations (V).                                                  | Vbase ∈ \[0, 1e64]                  |
| **Base Power**                                                           | Base apparent power used for per-unit calculations (VA).                                          | Sbase ∈ \[0, 1e64]                  |
| **Base frequency**                                                       | Nominal frequency used for per-unit calculations (Hz).                                            | fnom ∈ \[0, 1e64]                   |
| **Inverter coupling resistance**                                         | Virtual resistance (pu).                                                                          | Re recommended range: \[0, 0.25·Xe] |
| **Inverter coupling reactance**                                          | Virtual reactance (pu).                                                                           | Xe recommended range: \[0.04, 0.40] |
| **Cut-off angular frequency of low pass filters for power measurements** | Cut-off angular frequency of low-pass filters for power measurements (equivalent to Tpf) (rad/s). | omega\_power ∈ \[0, 1e64]           |
| **Filter Type**                                                          | <p>Filter type used for initialization:<br>- RL (1)<br>- RLC (2)</p>                              | FilterRL ∈ {1, 2}                   |
| **Filter capacitance**                                                   | Filter capacitance used in initialization calculations (pu).                                      | Cf unconstrained                    |
| **Snubber resistance**                                                   | Snubber resistance of the parallel current source (pu).                                           | Rs unconstrained                    |
| **Snubber capacitance**                                                  | Snubber capacitive reactance of the parallel current source (pu).                                 | Cs unconstrained                    |
| {% endtab %}                                                             |                                                                                                   |                                     |

{% tab title="GFM VSM" %}

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

| Parameter      | Description                                                                            | Variable & Constraints  |
| -------------- | -------------------------------------------------------------------------------------- | ----------------------- |
| **mp**         | P-f droop gain.                                                                        | mp unconstrained        |
| **H**          | Inertia time constant (s).                                                             | H ≥ 0.1 recommended     |
| **D1**         | Damping coefficient.                                                                   | D1 unconstrained        |
| **D2**         | Transient damping coefficient.                                                         | D2 unconstrained        |
| **wD**         | Angular frequency of the washout filter.                                               | wD ∈ \[0, 1e64]         |
| **Dwmin**      | Lower limit of delta wm.                                                               | Dwmin ∈ \[-1e64, 0]     |
| **Dwmax**      | Upper limit of delta wm.                                                               | Dwmax ∈ \[0, 1e64]      |
| **DPD\_min**   | Lower limit of the VSM damping output.                                                 | DPD\_min ≤ DPD\_max     |
| **DPD\_max**   | Upper limit of the VSM damping output.                                                 | DPD\_max ≥ DPD\_min     |
| **DPGFM\_min** | Lower limit of the VSM droop output.                                                   | DPGFM\_min ≤ DPGFM\_max |
| **DPGFM\_max** | Upper limit of the VSM droop output.                                                   | DPGFM\_max ≥ DPGFM\_min |
| **Tvr**        | Time constant of low-pass filter of the GFM branch.                                    | Tvr ∈ \[0, 1e64]        |
| **Twm**        | Time constant of low-pass filter of the GFM branch.                                    | Twm ∈ \[0, 1e64]        |
| **FFlag**      | <p>Flag enabling/disabling power-frequency droop:<br>- Disable (0)<br>- Enable (1)</p> | FFlag ∈ {0, 1}          |
| {% endtab %}   |                                                                                        |                         |

{% tab title="GFM Voltage Control" %}

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

| Parameter    | Description                                                   | Variable & Constraints |
| ------------ | ------------------------------------------------------------- | ---------------------- |
| **mq**       | Q-V droop gain of the GFM branch.                             | mq unconstrained       |
| **kpE**      | Proportional gain of the voltage PI loop of the GFM branch.   | kpE unconstrained      |
| **kiE**      | Integral gain of the voltage PI loop of the GFM branch.       | kiE ∈ \[0, 1e64]       |
| **DEmin**    | Lower limit of the voltage PI loop of the GFM branch.         | DEmin ≤ DEmax          |
| **DEmax**    | Upper limit of the voltage PI loop of the GFM branch.         | DEmax ≥ DEmin          |
| **Tvr**      | Time constant of low-pass filter of the GFM branch.           | Tvr ∈ \[0, 1e64]       |
| **Tvf**      | Time constant of low-pass filter of the GFM branch.           | Tvf ∈ \[0, 1e64]       |
| **Tif**      | Time constant of low-pass filter of the GFM branch.           | Tif ∈ \[0, 1e64]       |
| **Tvsm**     | Time constant of low-pass filter of the GFM branch.           | Tvsm ∈ \[0, 1e64]      |
| **Vflag**    | <p>Iq-V droop operation:<br>- Disable (0)<br>- Enable (1)</p> | Vflag ∈ {0, 1}         |
| {% endtab %} |                                                               |                        |

{% tab title="GFL Control" %}

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

| Parameter          | Description                                                        | Variable & Constraints          |
| ------------------ | ------------------------------------------------------------------ | ------------------------------- |
| **Vmin**           | Lower voltage limit of the GFL branch.                             | Vmin unconstrained              |
| **Vref0**          | Voltage reference of the GFL branch.                               | Vref0 unconstrained             |
| **Qcmd\_GFL\_min** | Lower limit of reactive power reference for the GFL branch.        | Qcmd\_GFL\_min ≤ Qcmd\_GFL\_max |
| **Qcmd\_GFL\_max** | Upper limit of reactive power reference for the GFL branch.        | Qcmd\_GFL\_max ≥ Qcmd\_GFL\_min |
| **Pcmd\_GFL\_min** | Lower limit of active power reference for the GFL branch.          | Pcmd\_GFL\_min ≤ Pcmd\_GFL\_max |
| **Pcmd\_GFL\_max** | Upper limit of active power reference for the GFL branch.          | Pcmd\_GFL\_max ≥ Pcmd\_GFL\_min |
| **dbVL1**          | Lower deadband threshold of the GFL branch.                        | dbVL1 ∈ \[-1e64, 0]             |
| **dbVH1**          | Upper deadband threshold of the GFL branch.                        | dbVH1 ∈ \[0, 1e64]              |
| **kqv**            | Voltage control factor of the GFL branch.                          | kqv unconstrained               |
| **kf**             | Factor used to determine Iqmax (Q priority) or Idmax (P priority). | kf ∈ \[0, 1]                    |
| **PQFlag**         | <p>Priority:<br>- Q (0)<br>- P(1)</p>                              | PQFlag ∈ {0, 1}                 |
| {% endtab %}       |                                                                    |                                 |

{% tab title="Current Limiter" %}

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

| Parameter                     | Description                                                           | Variable & Constraints            |
| ----------------------------- | --------------------------------------------------------------------- | --------------------------------- |
| **Current limiting function** | <p>Current Limiting function:<br>- External (0)<br>- Internal (1)</p> | isCurrentLimiterInternal ∈ {0, 1} |
| **Imax**                      | Inverter maximum output current.                                      | Imax ∈ \[0, 1e64]                 |
| {% endtab %}                  |                                                                       |                                   |

{% tab title="Load Flow" %}

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

| Parameter                  | Description                                                                                    | Variable & Constraints    |
| -------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------- |
| **Bus Type**               | Initialization bus mode: Swing (fixed V and angle), PV (fixed P and V), or PQ (fixed P and Q). | BusType ∈ {Swing, PV, PQ} |
| **Voltage**                | Desired terminal voltage for initialization (pu).                                              | V0 unconstrained          |
| **Angle**                  | Desired terminal voltage angle for initialization (°).                                         | delta0 unconstrained      |
| **Active power**           | Desired terminal active power for initialization (W).                                          | P0 unconstrained          |
| **Reactive power minimum** | Minimum terminal reactive power used during load-flow initialization (VAR).                    | Qmin ≤ Qmax               |
| **Reactive power maximum** | Maximum terminal reactive power used during load-flow initialization (VAR).                    | Qmax ≥ Qmin               |
| **Reactive power**         | Desired terminal reactive power for initialization (VAR).                                      | Q0 unconstrained          |
| {% endtab %}               |                                                                                                |                           |
| {% endtabs %}              |                                                                                                |                           |

## Inputs

| Input    | Description                                                   |
| -------- | ------------------------------------------------------------- |
| **Vref** | Reference voltage at the Point of Interconnection (POI) (pu). |
| **Pref** | Reference active power injection at the POI (pu).             |
| **Qref** | Reference reactive power injection at the POI (pu).           |

## Outputs

| Output          | Description                                                                             | Only available when the following current limiting function is selected |
| --------------- | --------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| **Po**          | Active output power of the model at terminals (pu).                                     | Internal                                                                |
| **Qo**          | Reactive output power of the model at terminals (pu).                                   | Internal                                                                |
| **Eabc**        | Reference three-phase output voltage of the internal voltage sources of the model (pu). | Internal                                                                |
| **Iabc\_shunt** | Reference three-phase output current of the internal current sources of the model (pu). | Internal                                                                |
| **Edq\_ref**    | Reference dq voltage of the internal voltage sources of the model (pu).                 | External                                                                |
| **wt**          | Angular position (phase) of the model (rad/s).                                          | External                                                                |
| **w**           | Angular frequency of the model (pu).                                                    | External                                                                |
| **Idq**         | DQ currents at terminals of the model (after the filter) (pu).                          | External                                                                |
| **Vdq**         | DQ voltages at terminals of the model (after the filter) (pu).                          | External                                                                |
| **Invdq**       | DQ currents at the inverter output of the model (before the filter) (pu).               | External                                                                |

## 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] W. Du, S. Venkatesan, D. Ramasubramanian et al., "Standard Library Grid-Forming Hybrid Control Inverter-based Resource Model Specification (REGFM\_C1)," UNIFI-2025-1-28, 2025.

\[2] U.S. Department of Energy, "Standard Library Grid-Forming Hybrid Control Inverter-based Resource Model Specification (REGFM\_C1)." Available: <https://www.osti.gov/servlets/purl/3013244>

\[3] PowerWorld Corporation, "Machine Model: REGFM\_C1." Available: <https://www.powerworld.com/WebHelp/Content/TransientModels\\_HTML/Machine%20Model%20REGFM\\_C1.htm>

## Acknowledgements

{% 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/regfm_c1.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.
