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

# Cascading Outage Simulation

## Description

The **Cascading Outage Simulation** 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 **phasor02\_CascadeOutage**, then click **Finish**.

Cascading outage is a series of power system component outages triggered by an initial disturbance or set of disturbances. These types of outages can lead a power system into a blackout. The US/Canada Blackout of 2013 is an example of such cases. Hence, a cascading outage simulation can be a useful tool to study such scenarios and to develop different corrective actions that can prevent system-wide failure.

In this demo, the IEEE 39-bus system is used to simulate a cascading outage scenario that leads to the formation of four unintentional islands, among which, two of them experiences a blackout. There are some modifications in this test system compared to the standard 39-bus system. The reactive part of loads at bus 4, 16 and 18 was replaced by fixed shunt component and the two 2-winding transformers among buses 11, 12, 13 were replaced by one 3-winding transformer.

A cascading outage can occur due to various factors such as overloaded transmission lines, over current or under voltage, voltage collapse and over or under generator excitation. However, in this demo, only the effect of protection system operation, particularly the generator out-of-step (OOS) protection and line overload protection are considered. The relay blocks used here are in the Simulink ePHASORSIM library and their description can be found in the ePHASORSIM help document.

## Requirements

* MATLAB R2019b and later

## Simulation and results

For the cascading outage scenario, the initial event is assumed as the line *16* to *17* to be out-of-service due to maintenance. This situation is simulated by tripping the line *16* to *17* at 1s and waiting for 15s for the system to regains its steady-state. Once the system is in steady-state, a line fault is applied at 50% of the line length. The set of the initial events is as follows:

* Line *16* to *17* out-of-service at t = 1s.
* Line *6* to *7* fault occurs at t = 15s.
* Line *6* to *7* is tripped to clear the fault at t = 15.1s.

This sequence of events results in the loss of two lines of the power system that can be seen as events 1 and 2 in the following figure of the IEEE 39-bus system. After the loss of line *6* to *7*:

* The neighbouring line *5* to *6* has to deliver a large amount of power resulting in an overload trip at 23.85s (event 3).
* With these three lines tripped, the power from generators Gen2 and Gen3 can only be delivered to the rest of the system through line *13* to *14* causing it to overload as well. Hence, line *13* to *14* gets tripped at 24.53s forming the first unintentional island in the system, referred to as island 4 in the figure below (event 4).
* After line *13* to *14* gets tripped, the OOS protection relay of generator Gen3 (in island 4) detects an unstable power swing and trips the generator at 25.2s (event 5).
* With the formation of island 1, a large power deficiency occurs in the system. To meet the demand, line *15* to *16* have to carry a significant amount of power from generator Gen4, Gen5, Gen6 and Gen7. Hence, island 2 is formed when this line gets tripped due to overload protection at 26.71s (event 6).
* Further two islands (island 1 and island 3) are formed when line *3* to *4* (event 7) and line *8* to *9* (event 8) gets tripped due to overload at 27.47s and 28.60s, respectively.
* Due to power disruption in island 4 after its formation, line *10* to *11* also experiences overload trip at 29.22s (event 9). This disturbance results in instability of the generator Gen2 that gets tripped by the OOS relay at 29.23s (event 10).

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-a0794a2f79832b93f269c8d641b275cf663f3947%2Fphasor02_cascade_outage_timeline.png?alt=media" alt=""><figcaption><p>Figure 1. - Timeline of cascading outage sequence.</p></figcaption></figure>

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-f42b507658729e757f88c9f5c7b20bcc7f163908%2Fphasor02_islands.png?alt=media" alt=""><figcaption><p>Figure 2. - Islands after cascading outage sequence.</p></figcaption></figure>

Note that both the island 3 and 4 experiences blackout as there is no generation available after generator Gen2 gets tripped. In the case of island 1 and 2, all the generators are active but the system frequency deviation occurs due to imbalance in generation and demand. Manual control actions, as follows, are implemented at 50s to bring the frequency of each island to the acceptable range (events 11 and 12).

* Island 1: Load shedding on bus *28*.
* Island 2: Reduce turbine-governor reference (Gref) of generator Gen4.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-a79ed284a6496c134be04b182da26857bb349bb7%2FePH_frequency.jpg?alt=media" alt=""><figcaption><p>Figure 3. - Frequency of islanded machines.</p></figcaption></figure>

In this cascading outage scenario, two generators, five loads, three transformers and eight transmission lines are lost.

The network data as well as in-port and out-port configurations are given in the following file.

{% file src="/files/bkeFjZrljFaZMtn6TxfF" %}

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 selected buses
* Machine's rotor angle for all synchronous generators
* Machine's speed for all synchronous generators
* Electrical power of all synchronous generators
* Current magnitude of selected lines for overload protection
* Voltage magnitude for all buses with synchronous generators for out-of-step protection
* Voltage angle for all buses with synchronous generators for out-of-step protection
* Current magnitude for all synchronous generators for out-of-step protection
* Current angle for all synchronous generators for out-of-step protection

</details>

<details>

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

* Pins for initial events of the cascading outages: line status, fault and fault distance factor.
* In-service/out-of-service command for selected lines
* In-service/out-of-service command for all generators
* In-service/out-of-service command for load at bus *28* (*load\_Z\_28\_1*)
* Change in reference for turbine-governor of the generator at bus *33* (*tg\_33\_1*)

</details>


---

# 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/phasor02_cascadeoutage.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.
