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

# Islanded Controller

## Description

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

The **Islanded Control** block regulates active and reactive power when the microgrid is disconnected from an external AC grid (islanded mode) by allowing adjustment of active and reactive power settings.

{% 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-d65b4e00aff308e4c0a747531af3d689c4c73ed5%2FMG_islanded_controller_mask.png?alt=media" alt="" width="393"><figcaption></figcaption></figure>

<table><thead><tr><th width="259.5999755859375">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Frequency</strong></td><td>Expected grid frequency during islanded mode (Hz).</td></tr><tr><td><strong>PCC dq-voltage threshold for Grid Connected transition</strong></td><td>Maximum voltage threshold to close the main grid breaker and leave islanded mode (V).</td></tr><tr><td><strong>PCC dq-current threshold for Islanded transition</strong></td><td>Minimum current threshold to open the main grid breaker and enter islanded mode (A).</td></tr><tr><td><strong>Duration of below-threshold V/A for PCC switching</strong></td><td>Time during which the condition must be met to enter or leave islanded mode (s). To enter islanded mode, the minimum current condition must hold for at least this duration. To leave islanded mode, the maximum voltage condition must hold for at least this duration.</td></tr><tr><td><strong>Microgrid phase error frequency compensation</strong></td><td>Adjusts the diesel generator frequency based on microgrid–grid phase error to synchronize before leaving islanded mode (Hz/Rad).</td></tr><tr><td><strong>Data Sampling time</strong></td><td>Sampling interval for evaluating the conditions (s).</td></tr><tr><td><strong>Sampling Time</strong></td><td>Simulation time step (s).</td></tr></tbody></table>

## Inputs

<table><thead><tr><th width="260.4000244140625">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>Grid P import</strong></td><td>Active power commanded by dispatch (pu).</td></tr><tr><td><strong>Grid P ref</strong></td><td>Active power commanded by user (pu).</td></tr><tr><td><strong>Grid P meas</strong></td><td>Active power measured at the Point of Common Coupling (PCC) (pu).</td></tr><tr><td><strong>Q import Grid</strong></td><td>Reactive power commanded by dispatch (pu).</td></tr><tr><td><strong>Grid Q ref</strong></td><td>Reactive power commanded by user (pu).</td></tr><tr><td><strong>Grid Q meas</strong></td><td>Reactive power measured at the PCC (pu).</td></tr><tr><td><strong>Infeed grid wt</strong></td><td>Infeed grid ωt (rad·sec).</td></tr><tr><td><strong>Infeed grid current meas</strong></td><td>Infeed grid current measurement (A).</td></tr><tr><td><strong>Infeed grid voltage meas</strong></td><td>Infeed grid voltage measurement (V).</td></tr><tr><td><strong>Microgrid voltage meas</strong></td><td>Microgrid voltage measurement (V).</td></tr><tr><td><strong>Islanded enable</strong></td><td>User island command (set to 1 to request islanded mode).</td></tr><tr><td><strong>Microgrid angle error</strong></td><td>Difference between microgrid and external grid angles.</td></tr></tbody></table>

## Outputs

<table><thead><tr><th width="259.5999755859375">Output</th><th>Description</th></tr></thead><tbody><tr><td><strong>Grid P error</strong></td><td>Error between commanded and measured active power (pu).</td></tr><tr><td><strong>Grid Q error</strong></td><td>Error between commanded and measured reactive power (pu).</td></tr><tr><td><strong>PCC current zero enable</strong></td><td>Indicates PCC current is low enough to open the PCC.</td></tr><tr><td><strong>PCC current data</strong></td><td>PCC current status/data (pu).</td></tr><tr><td><strong>PCC voltage zero enable</strong></td><td>Indicates voltage difference across the PCC is low enough to close.</td></tr><tr><td><strong>PCC voltage data</strong></td><td>PCC voltage status/data (pu).</td></tr><tr><td><strong>Islanded</strong></td><td>Indicates the microgrid is islanded.</td></tr><tr><td><strong>DG w ref</strong></td><td>ω reference for the diesel generator to compensate microgrid angle error (rad).</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/islanded-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.
