> 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/examples/distribution-and-industrial-power-systems/ghost-microgrid-model.md).

# GHOST Microgrid Model

## Description

The **GHOST Microgrid** example, located in **File > Open an Example File > Distribution and Industrial Power Systems**, is based on the Banshee distribution network model developed by NREL and Massachusetts Institute of Technology Lincoln Laboratory during the Microgrid & DER Controller Symposium held in February 2017 \[1] \[2].

This example demonstrates a distribution-level, multi-feeder microgrid with Diesel Generators (DG), Solar Photovoltaic (PV), and Battery Energy Storage Systems (BESS), focusing on power management with multiple Distributed Energy Resources (DER) under grid-connected and islanded operation.

## Requirements

This example requires a simulator configured for real-time execution.

{% hint style="danger" %}
The model currently works only on **Redhat** and **OPRTLinux** simulators.

For real-time runs, set "opgcc" under Settings – Simulator – Compiler and Linker.
{% endhint %}

## Detailed explanation

The utility grid is rated at 115 kV and supplies three main feeders (Feeders 1–3) that distribute power at multiple medium and low voltage levels: 13.8 kV, 4.16 kV, 480 V, and 208 V. Eighteen loads (modeled as RL branches) are categorized as 6 critical, 6 priority, and 6 interruptible. Critical loads require continuous service with high power quality and reliability. Priority loads may be disconnected during contingencies or islanding to maintain power balance. Interruptible loads can be shed during contingencies. Two 159.7 kVA induction motors are modeled at Feeders 1 and 3 to represent industrial loads.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-6e7e179bbf6420709d97bd405bab51b04bac8911%2Fimage%20(217).png?alt=media" alt=""><figcaption><p>Single line diagram of the GHOST network [1]</p></figcaption></figure>

DERs are distributed as follows: a 4 MVA diesel generator on Feeder 1 and a 3.5 MVA natural gas-fired combined-heat-and-power (CHP) unit on Feeder 3 (both with exciter and governor models), and a 5 MVA PV system plus a 2 MVA BESS on Feeder 2 with their respective controls.

Feeder 4 represents a laboratory PHIL setup (PHIL node interface not modeled) connected through a 13.8/0.48 kV transformer at the end of Feeder 3. Feeder 4 includes two buses, a 100 kVA PV system, a 250 kVA BESS, and an 80 kVA diesel generator \[1].

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-8872364e6b674d2899d6da204cd5b38aa7e0e062%2Fimage%20(218).png?alt=media" alt=""><figcaption><p>Feeder 4</p></figcaption></figure>

The table below summarizes the DER ratings and capabilities.

| DER type             | Location | Power rating (kVA) | Voltage rating (kV) | Grid-forming capability |
| -------------------- | -------- | ------------------ | ------------------- | ----------------------- |
| **Diesel generator** | Feeder 1 | 4000               | 13.8                | Yes                     |
| **PV**               | Feeder 2 | 5000               | 0.48                | No                      |
| **BESS**             | Feeder 2 | 3000               | 0.48                | Yes                     |
| **CHP**              | Feeder 3 | 3500               | 13.8                | Yes                     |
| **Diesel generator** | Feeder 4 | 80                 | 0.48                | Yes                     |
| **PV**               | Feeder 4 | 100                | <p>0.48<br></p>     | No                      |
| **BESS**             | Feeder 4 | 250                | 0.48                | Yes                     |

{% hint style="info" %}
Protection systems are not modeled in this version.
{% endhint %}

A simple microgrid power management controller is included and can be fully or partially replaced with user-designed controllers for HIL studies. The model time step is **100us**.

## Simulation and results

The complex model as described above is operated under various scenarios as described below. The sequence demonstrates the operation of different DERs under several conditions including a contingency causing the network to split into 3 islanded microgrids: Feeder 1-3.

The scenarios above demonstrate DER behavior during irradiance changes, a grid fault, and subsequent feeder islanding.

The following sequence is applied by loading "GHOST\_Microgrid.svt" in ScopeView and starting a data acquisition with Sync and Trigger options enabled:

The simulation starts with all the DERs connected to the grid. The active and reactive power setpoints of the DERs connected at different feeders are tabulated as below:

| Feeder                                               | Type of DER | Active Power (pu) | Reactive Power (pu) |
| ---------------------------------------------------- | ----------- | ----------------- | ------------------- |
| ***Feeder 1***                                       | DG          | 0.8               | 0.5                 |
| <p><em><strong>Feeder 2</strong></em></p><p><br></p> | BESS        | 0.8               | 0.2                 |
|                                                      | PV          | 1                 | 0                   |
| ***Feeder 3***                                       | CHP         | 0.8               | 0.4                 |
| ***Feeder 4***                                       | BESS        | 0.8               | 0.1                 |
|                                                      | DG          | 0.6               | 0.1                 |
|                                                      | PV          | 0.6               | 0                   |

1. At t = 40 s, the PV active power on Feeder 4 increases from 0.2 pu to 0.8 pu in steps of 0.15 pu every 2 s, emulating rising solar irradiance (morning to noon).
2. At t = 59.96 s, a three-phase-to-ground (LLL-G) fault occurs on the grid side for 60 ms.
3. At t = 60 s, the PCC breakers of Feeders 1–3 open to isolate from the fault, forming three islanded microgrids: Feeder 1 with the diesel generator in grid-forming mode (1 pu voltage, 60 Hz frequency), Feeder 2 with the BESS in grid-forming mode, and Feeder 3 with the CHP in grid-forming mode.
4. At t = 65 s, a 600 kVA interruptible load on Feeder 3 is disconnected to bring the CHP active power within 1 pu and maintain generation–load balance.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-3c2dcc06e0b5922537021e8ad73bb29850bc64ee%2Fimage%20(1460).png?alt=media" alt=""><figcaption><p>As the irradiance increases, the active power of PV connected at feeder 4 increases</p></figcaption></figure>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-ea1517a54111130c5ae9d2350ed537dc99688b3d%2Fimage%20(1461).png?alt=media" alt=""><figcaption><p>Grid side fault and opening up of the breaker. The PCC voltages, currents and the circuit breaker status</p></figcaption></figure>

The PCC breakers of **feeders 1-3** open at 60 s thus the feeders islanding into 3 microgrids. The figures below show the voltage, frequency, active power, reactive power and the PCC breaker status of each feeder. It can be seen for all the feeders that the network is stable and the voltage and frequency are well maintained in islanded modes.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-196e2125a57438ba83835c9cda47cb909e6033aa%2Fimage%20(1462).png?alt=media" alt=""><figcaption><p>After Feeder 1 PCC breaker opens, the Diesel Generator switches to grid forming mode. Its active power output<br>changes from the previous setpoint 0.8 pu to 1 pu to supply the loads.</p></figcaption></figure>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-89ce7ea1208ea2b4219d9d25b1a2d13387a22703%2Fimage%20(1463).png?alt=media" alt=""><figcaption><p>Zoom in of Feeder 1 measurements</p></figcaption></figure>

When **Feeder 2** turns into an island, BESS reduces its active power output from 0.8 pu to 0.21 pu since PV is generating at its maximum and the loads in Feeder 2 are well supplied. BESS increases the reactive power output to compensate for the voltage drop in the feeder.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-d90993025815bab1037219ac44cfb087329515ca%2Fimage%20(1464).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-55a8eae377e9366f6bebddc7c1002e3c5b64c61e%2Fimage%20(1465).png?alt=media" alt=""><figcaption><p>Zoom in of Feeder 2 measurements</p></figcaption></figure>

**Feeder 3** - It can be seen that when during the initial islanded time, the active power demand of the generator exceeds slightly the 1 pu rating to 1.05 pu. A 600 kVA interruptible load is shed at 65 s to reduce the active power demand.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-9c3b71b8d3b3c45ebf0087895ca8fbdbb53eaa6a%2Fimage%20(1466).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-8c4e977cd94368802ff1c8686862db2873ef1c02%2Fimage%20(1467).png?alt=media" alt=""><figcaption><p>Zoom in of Feeder 3 measurements</p></figcaption></figure>

The **feeder 4** PV observes a transient at 60 s caused by the opening of the Feeder 3 PCC breaker. However, the PV controller quickly settles the system at the reference setpoint.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-43e8a0d7bacd90f42d312b1e77744a2b187adb7d%2Fimage%20(1468).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-5bca1d6c4b83116bdd0091da0a16cc11cd6c96f4%2Fimage%20(1469).png?alt=media" alt=""><figcaption></figcaption></figure>

## References

\[1] 2017 Microgrid Controller Procurement Information Packet Volume 1.6, P. Koralewicz, ed.: NREL, 2017. \[Online].

\[2] R. Salcedo et al., "Banshee distribution network benchmark and prototyping platform for hardware-in-the-loop integration of microgrid and device controllers," in The Journal of Engineering, vol. 2019, no. 8, pp. 5365-5373, 8 2019.


---

# 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/examples/distribution-and-industrial-power-systems/ghost-microgrid-model.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.
