> 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/generic-pv-plant.md).

# Generic PV Plant

## Description

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

The **Generic PV Plant** block, located in the **Control Smart Inverters library**, is a positive-sequence, modular, hierarchical dynamic model of a utility-scale photovoltaic plant for large-scale transient stability studies. It implements three WECC standard dynamic models: the Renewable Energy Plant Controller – Type A ([REPC\_A](https://www.opal-rt.com/docs/hypersim/library-blocks-reference/control-smart-inverters/repc_a.md)), the Renewable Energy Electrical Controller – Type A ([REEC\_A](https://www.opal-rt.com/docs/hypersim/library-blocks-reference/control-smart-inverters/reec_a.md)), and the Renewable Energy Generator/Converter – Type B ([REGC\_B](https://www.opal-rt.com/docs/hypersim/library-blocks-reference/control-smart-inverters/regc_b.md)). The “generator” model, [REGC\_B](https://www.opal-rt.com/docs/hypersim/library-blocks-reference/control-smart-inverters/regc_b.md), provides current injections into the network solution, the electrical control model [REEC\_A](https://www.opal-rt.com/docs/hypersim/library-blocks-reference/control-smart-inverters/reec_a.md) for local active and reactive power control, and the plant controller model [REPC\_A](https://www.opal-rt.com/docs/hypersim/library-blocks-reference/control-smart-inverters/repc_a.md) allows for plant-level active and reactive power control.\[1]

The model provides a practical representation of the dynamic electrical performance of solar photovoltaic power plants at the point of interconnection to the bulk electric system. It is intended for electrical disturbance studies (for example, balanced transmission grid faults of 3–9 cycles, large generation or load events) rather than solar irradiance transients (available solar power is assumed constant during the simulation). Users can represent different inverter and/or plant controller responses by selecting appropriate parameters and feature flags.\[2]

The generic PV plant modeling structure is shown below:

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

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

### Current Injection (REGC\_B model) <a href="#current-injection-regc_b-model" id="current-injection-regc_b-model"></a>

The REGC\_B model represents the converter–grid interface and injects commanded active and reactive current into the network (fast inner current control, enforced at the terminal).

### Local Active Power and Reactive Power Control (REEC\_A model) <a href="#local-active-power-and-reactive-power-control-reec_a-model" id="local-active-power-and-reactive-power-control-reec_a-model"></a>

The REEC\_A model converts active/reactive power references into current commands with optional ramp-rate limits and enforces converter current capability with active/reactive priority set by Pqflag.

Depending on the selected control mode, the Q‑control loop regulates either the terminal voltage or the reactive power by generating the reactive current command $I\_{qcmd}$.

The P‑control loop generates the active current command $I\_{pcmd}$ to track the active power reference $P\_{ref}$, applying ramp‑rate limits when enabled.

The converter current is constrained by its maximum current capability; therefore, the active and reactive current components must satisfy the following condition:

$$
I\_p^2 + I\_q^2 \le I\_{\max}^2
$$

Since the generic PV model represents a generator, only positive active current is allowed $$I\_{p,min}=0$$.

### Plant Level Active and Reactive Power Control ( REPC\_A model) <a href="#plant-level-active-and-reactive-power-control-repc_a-model" id="plant-level-active-and-reactive-power-control-repc_a-model"></a>

The **REPC\_A** block performs supervisory, plant‑level control. It regulates plant voltage (V), reactive power (Q), and active power (P), and can optionally provide frequency‑droop‑based active‑power response, depending on the enabled features.

REPC\_A receives measured branch quantities ($Qbranch$, $Pbranch$), the regulated bus voltage ($Vreg$), system frequency signals ($Freq$, $FreqRef$), and external references ($Qref$, $PlantRef$, $Vref$).

Using its plant‑level V/Q and P control loops, the block generates the reactive‑power command $Qext$ and the active‑power command $Pref$, which are passed to the inverter‑level controller (REEC\_A).

### Network Interface <a href="#network-interface" id="network-interface"></a>

The network solution solves the system algebraic equations to determine bus voltages, currents, and power flows. The injected current from REGC\_B interacts with the grid through this solution. The resulting terminal voltage and electrical measurements are fed back to REPC\_A, REEC\_A, and REGC\_B, closing the control loop.

### Active and Reactive Control Options <a href="#active-and-reactive-control-options" id="active-and-reactive-control-options"></a>

The models need the proper flag and/or input parameter settings for various active and reactive power control functionality.

#### **Active power control options**

| Functionality                                     | FreqFlag | Ddn | Dup |
| ------------------------------------------------- | -------- | --- | --- |
| **Governor response with down regulation, only**  | 1        | > 0 | 0   |
| **Governor response with up and down regulation** | 1        | > 0 | > 0 |

#### **Reactive power control options**

| Functionality                                             | PfFlag | Vflag | Qflag | RefFlag |
| --------------------------------------------------------- | ------ | ----- | ----- | ------- |
| **Plant-level Q control**                                 | 0      | N/A   | 0     | 0       |
| **Plant-level V control**                                 | 0      | N/A   | 0     | 1       |
| **Plant-level Q control + local coordinated V/Q control** | 0      | 1     | 1     | 0       |
| **Plant-level V control + local coordinated V/Q control** | 0      | 1     | 1     | 1       |

{% hint style="info" %}
The generic PV plant block does not support line current compensation, so for REPC\_A, **VcompFlag = 0**.
{% endhint %}

## Mask parameters

{% tabs %}
{% tab title="REPC\_A" %}
All parameters of the REPC\_A mask are exposed in this tab. Refer to the REPC\_A documentation for names, units, and constraints.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-28d793995b908d28104b615c7e86d97352c7aeca%2FCSI_generic_PV_plant_mask_REPCA.jpg?alt=media" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="REEC\_A" %}
All parameters of the REEC\_A mask are exposed in this tab. Refer to the REEC\_A documentation for names, units, and constraints.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-728e1942058fd769dc0f4bc4ff5cc78e5cc60903%2FCSI_generic_PV_plant_mask_REECA.jpg?alt=media" alt="" width="700"><figcaption></figcaption></figure>
{% endtab %}

{% tab title="REGC\_B" %}
All parameters of the REGC\_B mask are exposed in this tab. Refer to the REGC\_B documentation for names, units, and constraints.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-1e7ccbd31fca15f82916d229ca5018db6f8131d8%2FCSI_generic_PV_plant_mask_REGCB.jpg?alt=media" alt="" width="700"><figcaption></figcaption></figure>
{% 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-afc4b8bc69fafd0de21bae35b8bc01aedf209d12%2FCSI_generic_PV_plant_mask_Loadflow.jpg?alt=media" alt="" width="700"><figcaption></figcaption></figure>

| Parameter     | Description                                                                                          | Variable & Constraints          |
| ------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------- |
| **BusType**   | Terminal bus type. Options: Swing (fixed V with PQ balance), PV (fixed P and V), PQ (fixed P and Q). | BusType ∈ {"Swing", "PV", "PQ"} |
| **Voltage**   | Load flow constraint for terminal voltage. (pu)                                                      | lfVolt unconstrained            |
| **Angle**     | Load flow constraint for voltage angle. (°)                                                          | lfAngle unconstrained           |
| **Qmin**      | Minimum reactive power allowed in the load flow solution (VAR).                                      | lfQmin unconstrained            |
| **Qmax**      | Maximum reactive power allowed in the load flow solution (VAR).                                      | lfQmax unconstrained            |
| **P**         | Active power setpoint for the load flow solution. (W)                                                | lfP unconstrained               |
| **Q**         | Reactive power setpoint for the load flow solution. (VAR)                                            | lfQ unconstrained               |
| {% endtab %}  |                                                                                                      |                                 |
| {% endtabs %} |                                                                                                      |                                 |

## Inputs

| Input         | Description                                                |
| ------------- | ---------------------------------------------------------- |
| **Qref**      | Reactive power reference (pu). Initialized from load flow. |
| **Pplantref** | Active power reference (pu).                               |
| **Vref**      | Voltage reference (pu). Initialized from load flow.        |
| **FreqRef**   | Frequency reference (pu).                                  |

## Outputs

| Output   | Description                       |
| -------- | --------------------------------- |
| **Vabc** | Three-phase terminal voltage (V). |

## 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] Model User Guide for Generic Renewable Energy System Models, EPRI, October 2023.

\[2] WECC-Solar-PV-Dynamic-Model-Specification, WECC REMTF, September 2012.

## 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/generic-pv-plant.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.
