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

# BESS Management

## Description

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

The **BESS Management** block, located in the **microGrid Testbed/Control** library, aggregates all components contributing to the BESS active power reference. These include the main active power reference from the real power controller, the PCC active power error, and a frequency compensation component generated within this block to support the Diesel Generator in maintaining microgrid bus frequency during islanded operation. The block also combines the reactive power reference inputs, namely the reactive power controller reference and the PCC reactive power error.

{% 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-50c26a45350001c28a5fccf5a2f28f9b0d95d867%2FMG_BEES_management_mask.png?alt=media" alt=""><figcaption></figcaption></figure>

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

<table><thead><tr><th width="249.7999267578125">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Global nominal power</strong></td><td>The nominal power of the microgrid. Default value is 12e<sup>3</sup> (W)</td></tr><tr><td><strong>Nominal frequency</strong></td><td>The nominal frequency of the microgrid (Hz). Default value is 50.</td></tr><tr><td><strong>Sample time</strong></td><td>Sample time for the discrete-time integrator (s). The default value is 50e<sup>-6</sup>.</td></tr></tbody></table>
{% endtab %}

{% tab title="BESS Compensation Parameters" %}

<table><thead><tr><th width="249.79998779296875">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>BESS frequency compensation (kW per 0.1 Hz)</strong></td><td>Proportional control factor for BESS frequency compensation. Default value is 3 (kw/Hz).</td></tr></tbody></table>
{% endtab %}

{% tab title="Dynamic Filter" %}

<table><thead><tr><th width="249.800048828125">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>Time constant</strong></td><td>Low pass filter time constant for power measurements, in seconds. The default value is 1 (s).</td></tr><tr><td><strong>Bypass time</strong></td><td>Specify dead zone lower limit. Set the value for <strong>Start of dead zone</strong> less than or equal to <strong>End of dead zone</strong>. The default value is -2e-3.</td></tr><tr><td><strong>End of dead zone</strong></td><td>Specify dead zone upper limit. Set the value for <strong>End of dead zone</strong> greater than or equal to <strong>Start of dead zone</strong>. The default value is 2e-3.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

## Inputs

<table><thead><tr><th width="250.79998779296875">Input</th><th>Description</th></tr></thead><tbody><tr><td><strong>Frequency meas</strong></td><td>The measured frequency of the microgrid (Hz)</td></tr><tr><td><strong>Islanded</strong></td><td>Specifies whether the Microgrid is islanded/Grid connected (0 = Grid connected, 1 = islanded)</td></tr><tr><td><strong>BESS P temp ref</strong></td><td>Active power reference from dispatch controller (pu).</td></tr><tr><td><strong>Total load reduction</strong></td><td>Total amount of load reduction used to adjust the BESS's power reference (pu).</td></tr><tr><td><strong>Grid P error</strong></td><td>The active power difference between the active power transmit through the PCC and what the user demands (pu).</td></tr><tr><td><strong>BESS Q temp ref</strong></td><td>Reactive power reference from dispatch controller (pu).</td></tr><tr><td><strong>Grid Q error</strong></td><td>The reactive power difference between the reactive power transmit through the PCC and what the user demands (pu).</td></tr></tbody></table>

## Outputs

<table><thead><tr><th width="250">Output</th><th>Description</th></tr></thead><tbody><tr><td><strong>BESS P ref</strong></td><td>Active power reference sent to the battery energy storage system (pu).</td></tr><tr><td><strong>BESS Q ref</strong></td><td>Reactive power reference sent to the battery energy storage 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/bess-management.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.
