> 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/microgrid-testbed-library/reactive-power-controller.md).

# Reactive Power Controller

## Description

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

The **Reactive Power Control** block, located in the **microGrid Testbed/Control** library, regulates reactive power at the Point of Common Coupling (PCC) when the microgrid is connected to an external AC grid. It lets users adjust reactive power settings to maintain system stability.

{% hint style="danger" %}
This block requires a valid RT-LAB license on both the workstation and the simulator, with the OP1420 feature enabled. For more information, see [Microgrid Control & DERs](https://www.opal-rt.com/docs/rt-lab/model-and-simulation/power-systems-with-artemis/microgrid-control-and-ders.md).
{% 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-18fc55b2016135db1c8ca56ccf1f82579c879ddc%2Fimage.png?alt=media" alt="" width="318"><figcaption></figcaption></figure>

<table><thead><tr><th width="250">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Reactive Power</strong></td><td>Reactive power load of the microgrid (pu).</td></tr><tr><td><strong>Sample time</strong></td><td>Simulation time step (s).</td></tr></tbody></table>

## Inputs

<table><thead><tr><th width="250.79998779296875">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>DG Q remaining</strong></td><td>Remaining reactive power capacity of the Diesel Generator (pu).</td></tr><tr><td><strong>DG status</strong></td><td>Status of the Diesel Generator.</td></tr><tr><td><strong>BESS Q remaining</strong></td><td>Remaining reactive power capacity of the Battery Energy Storage System (pu).</td></tr><tr><td><strong>BESS status</strong></td><td>Status of the Battery Energy Storage System.</td></tr><tr><td><strong>WT Q remaining</strong></td><td>Remaining reactive power capacity of the Wind Turbine Generation System (pu).</td></tr><tr><td><strong>WT status</strong></td><td>Status of the Wind Turbine Generation System.</td></tr><tr><td><strong>PV Q remaining</strong></td><td>Remaining reactive power capacity of the Photovoltaic Generation System (pu).</td></tr><tr><td><strong>PV status</strong></td><td>Status of the Photovoltaic Generation System.</td></tr><tr><td><strong>Grid Q requirement</strong></td><td>Required reactive power from the grid (pu).</td></tr><tr><td><strong>PHIL Q meas</strong></td><td>Reactive power measurement from the PHIL block (pu).</td></tr></tbody></table>

## Outputs

<table><thead><tr><th width="250">Output</th><th>Description</th></tr></thead><tbody><tr><td><strong>DG Q ref</strong></td><td>Reactive power reference for the Diesel Generator (pu).</td></tr><tr><td><strong>BESS Q temp ref</strong></td><td>Reactive power reference for the Battery Energy Storage System (pu).</td></tr><tr><td><strong>WT Q ref</strong></td><td>Reactive power reference for the Wind Turbine Generation System (pu).</td></tr><tr><td><strong>PV Q ref</strong></td><td>Reactive power reference for the Photovoltaic Generation System (pu).</td></tr></tbody></table>


---

# 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/microgrid-testbed-library/reactive-power-controller.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.
