> 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/example-models/ephasorsim-example-models/phasor06_ieee118.md).

# Islanding of Power Grid in Presence of Large Disturbances

## Description

The **Islanding of Power Grid in Presence of Large Disturbances** example can be created by starting a new RT‑LAB project. From the menu bar, select **File > New > RT‑LAB Project**. Enter a name and location for your project, then click **Next**. From the available templates list, navigate to **ePHASORsim** and select **phasor06\_IEEE118**, then click **Finish**.

This model demonstrates the application of ePHASORSIM to simulate islanding of power systems facing large disturbances. For this reason, a modified version of IEEE 118-bus power network data [\[1\]](#ref1) is used as the test case.

The following figure shows a graphical representation of the network with the islanded part highlighted.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-b08191cb5c853186b835ba17afac60ac1062ae22%2Fieee118b_modified.jpg?alt=media" alt=""><figcaption><p>Modified IEEE 118-bus network diagram.</p></figcaption></figure>

The modifications on the network data are as follows:

* Generators with zero active power generation, representing synchronous condensers, are replaced with fixed shunt devices.
* Base power for all the machines are considered to be 1000MVA.
* All constant power loads are converted into constant impedance loads.

The network load flow and dynamic data are given in **phasor06\_IEEE118.raw** and **phasor06\_IEEE118.dyr** files.

The **\*.dyr file** includes the following dynamic models:

* GENROU type synchronous generator for all 19 machines.
* EXST1 type Excitor (VIMAX and VIMIN limits are not effective. Large numbers are used for compatibility.)
* STAB1 type Power system stabilizer
* TGOV1 type Turbine-governor (VMAX and VMIN limits are not effective. Large numbers are used for compatibility.)

The in-port and out-port configurations are given in **phasor06\_IEEE118.xlsx** file. In the "Pins" page of the Excel file the following outgoing and incoming pins are assigned:

<details>

<summary>Outgoing pins (measurements)</summary>

* Voltage magnitude at buses *93*, *68*, *81*, *69*, *77* and *75*
* Machine's rotor angle for all synchronous generators
* Machine's speed for all synchronous generators
* Mechanical power of machine at bus *69*

</details>

<details>

<summary>Incoming pins (control commands)</summary>

* In-service/out-of-service command for load at bus *93* (`load_Z_93_1`)
* In-service/out-of-service commands for line between buses *68* and *81* and line between buses *69* and *77*
* Trip Command for bus *75*
* Mechanical power input for machine at bus *69*

</details>

{% hint style="info" %}
This model is configured to assign core number 2 for the dynamic simulation on a target. The `EPHASOR_THREADS` environment variable can be revised in the Variables tab of RT-LAB GUI to modify this configuration.
{% endhint %}

## Requirements

* MATLAB R2019b and later

## Simulation and results

This example demonstrates an islanding scenario for modified IEEE 118-bus network. The area of the network to be islanded is shown by dashed line in the diagram above.

The simulation starts from the steady state and runs for 1 second, then the following events happen:

* Trip of bus *75*
* Trip of line *69* to *77*
* Trip of line *68* to *81*

The sequence of these events isolates a part of the network (shown by the dashed line) from the main grid. Consequently, the machines in both areas start to oscillate and the generators in the islanded area loose their synchronism with the main grid.

For the purpose of demonstration, machines at bus 69 (in main grid) and bus 89 (in the islanded grid) are selected as the reference for rotor angles. A PI controller is also connected to the generator at bus 69, that can control the frequency deviation of the main grid after a few seconds. However, in the islanded grid, the frequency drops to 59.992Hz due to the lack of such a controller.

To mitigate the frequency deviation on islanded grid, the following action is taken:

* At t = 40s, disconnect load on bus *93*.

## References

\[1] <http://publish.illinois.edu/smartergrid/ieee-118-bus-system/>


---

# 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/example-models/ephasorsim-example-models/phasor06_ieee118.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.
