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

# Load Management Controller

## Description

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

The **Load Management Controller** block, located in the **microGrid Testbed/Control** library, regulates active power flow at the Point of Common Coupling (PCC) when the microgrid is connected to an external AC grid by adjusting user-defined active 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-98e9936c777d4f3a5237451fb2b297e7430a9e47%2FMG_load_management_controller_mask.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

<table><thead><tr><th width="239.60003662109375">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Sampling time</strong></td><td>Time step for the simulation (s).</td></tr><tr><td><strong>Diesel minimum power</strong></td><td>Minimum power for diesel generation (pu).</td></tr><tr><td><strong>Diesel maximum power</strong></td><td>Maximum power for diesel generation (pu).</td></tr><tr><td><strong>BESS maximum power</strong></td><td>Maximum available power for the BESS (pu).</td></tr><tr><td><strong>Load shedding maximum reduction</strong></td><td>Maximum reduction applied to load shedding (pu).</td></tr></tbody></table>

## Inputs

<table><thead><tr><th width="240.4000244140625">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>RER P ref</strong></td><td>Combined reference power for all Renewable Energy Resources (RERs) (WT + PV) (pu)</td></tr><tr><td><strong>Total load P ref</strong></td><td>Combined reference power for all loads (DR, sheddable, critical, and PHIL) (pu)</td></tr><tr><td><strong>Sheddable load P ref</strong></td><td>User-defined power reference for the sheddable load (pu)</td></tr><tr><td><strong>Excess load P ref</strong></td><td>Excess load within the microgrid (greater than 0 means load must be reduced) (pu)</td></tr><tr><td><strong>Demand Response load P ref</strong></td><td>User-defined power reference for the Demand Response (DR) load (pu).</td></tr><tr><td><strong>Islanded</strong></td><td>Indicates the microgrid operating mode. 0 = grid-connected, 1 = islanded.</td></tr><tr><td><strong>Dispatch mode</strong></td><td>Internal mode of the real-power (dispatch) controller.</td></tr></tbody></table>

## Outputs

<table><thead><tr><th width="240.39996337890625">Output</th><th>Description</th></tr></thead><tbody><tr><td><strong>Total load reduction</strong></td><td>Total load reduction used to adjust the BESS power reference (pu).</td></tr><tr><td><strong>Demand Response load P ref</strong></td><td>Power reference sent to the Demand Response load (pu)</td></tr><tr><td><strong>Demand Response load reduced</strong></td><td>Status of the Demand Response load.<br>0 = load is not reduced, 1 = load is reduced.</td></tr><tr><td><strong>Sheddable load P ref</strong></td><td>Power reference sent to the sheddable load (pu)</td></tr><tr><td><strong>Load shedded</strong></td><td>Status of the sheddable load.<br>0 = load is not shedded, 1 = load is shedded.</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/load-management-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.
