> 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/ieee-4-bus-systems.md).

# IEEE 4-bus Systems

## Description

The **IEEE 4-bus Systems** 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 **phasor07\_IEEE4\_balanced**, then click **Finish**.

The following figure shows the **IEEE 4-Bus Test Feeder distribution system** \[1] which is used to show the basic features of ePHASORSIM for power flow and dynamic simulation of distribution systems. A copy of IEEE report exists in the demo folder.

<figure><img src="https://96827845-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNRdpSk8kjn20gXAexnt6%2Fuploads%2Fgit-blob-dec08fc200a9245f49cf5dbddb4cd2f712fc62ea%2Fphasor07_IEEE4.jpg?alt=media" alt=""><figcaption></figcaption></figure>

This network is one feeder with 4-buses that includes 3-phase voltage source, load, transformer, and lines. The load is initially unbalanced and it will be changed to balanced during simulation. The transformer's connection configuration is delta connection on the 12.4kV side, and it is star-ground connection on the 4.16kV side. Comparison of OpenDSS Load Flow results, IEEE standard results and ePHASORSIM power flow results against each other are presented.

The balanced-load network data as well as in-port and out-port configurations are given in phasor07\_IEEE4\_balanced.xlsx, and the unbalanced-load network data as well as in-port and out-port configurations are given in phasor07\_IEEE4.xlsx file.

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

In the "Pins" page of the Excel file the following outgoing and incoming pins are assigned:

<details>

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

* Voltage measurement for phases A, B, and C of all buses
* Current measurement for phases A, B, and C for all 3-phase lines

</details>

<details>

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

* Fault on all buses (*A-to-G, ABC-to-G, B-to-C, and AC-to-G*)
* Adjust P and Q for each phase of load at bus 4

</details>

## Requirements

* MATLAB R2019b and later

## Simulation and results

The simulation uses the unbalanced-load network data to initialize and two disturbances happen in the system as described below:

* At t = 1s: AC-to-G fault happens at bus 4 for 80ms.
* At t = 5s: Active and reactive power of load are changed.

The load type is constant power, and the bandwidth of the load is set to 0.4, which means if the voltage is over 1.4 p.u. or under 0.6 p.u. then the load will change to a constant impedance type.

Table below show the power-flow results of ePHASORSIM, IEEE report and output of OpenDSS for both unbalanced and balanced load conditions. The relative comparisons with IEEE report for magnitude (%) and angle (deg) are shown in the last two columns of these tables.

* Setp-Down with Unbalance Loading.

<table data-search="false"><thead><tr><th>Connection</th><th>D-Gr Y</th><th>D-Gr Y</th><th>D-Gr Y</th><th>Magnitude (%)</th><th>Angle (deg)</th></tr></thead><tbody><tr><td>Vab (V)</td><td>12350/29.6</td><td>12350/29.6</td><td>12350.2/29.60</td><td>0.00</td><td>0.00</td></tr><tr><td>Vbc (V)</td><td>12314/-90.4</td><td>12313/-90.4</td><td>12313.8/-90.39</td><td>0.00</td><td>0.01</td></tr><tr><td>Vca (V)</td><td>12333/149.8</td><td>12333/149.8</td><td>12332.7/149.75</td><td>0.00</td><td>-0.05</td></tr><tr><td>V_n3_a (V)</td><td>2290/-32.4</td><td>2290.3/-32.4</td><td>2290.29/-32.40</td><td>0.01</td><td>0.00</td></tr><tr><td>V_n3_b (V)</td><td>2261/-153.8</td><td>2261.5/-153.8</td><td>2261.60/-153.81</td><td>0.03</td><td>-0.01</td></tr><tr><td>V_n3_c (V)</td><td>2214/85.2</td><td>2213.9/85.2</td><td>2213.94/85.18</td><td>0.00</td><td>-0.02</td></tr><tr><td>V_n4_a (V)</td><td>2157/-34.2</td><td>2156.7/-34.2</td><td>2156.80/-34.25</td><td>-0.01</td><td>-0.05</td></tr><tr><td>V_n4_b (V)</td><td>1936/-157.0</td><td>1936 /-157.0</td><td>1936.2/-157.04</td><td>0.01</td><td>-0.04</td></tr><tr><td>V_n4_c (V)</td><td>1849/73.4</td><td>1849.5/73.4</td><td>1849.32/73.39</td><td>0.02</td><td>-0.01</td></tr><tr><td>I1_2_a (A)</td><td>285.7/-27.6</td><td>285.68/-27.6</td><td>285.63/-27.61</td><td>-0.02</td><td>-0.01</td></tr><tr><td>I1_2_b (A)</td><td>402.7/-149.6</td><td>402.62/-149.6</td><td>402.69/-149.59</td><td>0.00</td><td>0.01</td></tr><tr><td>I1_2_c (A)</td><td>349.1/74.4</td><td>349.08/74.4</td><td>349.14/74.35</td><td>0.01</td><td>-0.05</td></tr><tr><td>I3_4_a (A)</td><td>695.5/-66.0</td><td>695.54/-66.0</td><td>695.51/-66.03</td><td>0.00</td><td>-0.03</td></tr><tr><td>I3_4_b (A)</td><td>1033/177.1</td><td>1033.1/177.1</td><td>1033.0/177.12</td><td>0.00</td><td>0.02</td></tr><tr><td>I3_4_c (A)</td><td>1352/55.2</td><td>1351.4/55.2</td><td>1351.8/55.20</td><td>-0.01</td><td>0.00</td></tr></tbody></table>

* Step-Down with Balanced Loading.

<table data-search="false"><thead><tr><th>Connection</th><th>D-Gr Y</th><th>D-Gr Y</th><th>D-Gr Y</th><th>Magnitude (%)</th><th>Angle (deg)</th></tr></thead><tbody><tr><td>Vab (V)</td><td>12340/29.7</td><td>12340/29.7</td><td>12340.1/29.73</td><td>0.00</td><td>0.03</td></tr><tr><td>Vbc (V)</td><td>12349/-90.4</td><td>12349/-90.4</td><td>12349.1/-90.41</td><td>0.00</td><td>-0.01</td></tr><tr><td>Vca (V)</td><td>12318/149.6</td><td>12318/149.6</td><td>12318.3/149.63</td><td>0.00</td><td>0.03</td></tr><tr><td>V_n3_a (V)</td><td>2249/-33.7</td><td>2249.4/-33.7</td><td>2249.4/-33.73</td><td>0.02</td><td>-0.03</td></tr><tr><td>V_n3_b (V)</td><td>2263/-153.4</td><td>2262.8/-153.4</td><td>2262.9/-153.42</td><td>0.00</td><td>-0.02</td></tr><tr><td>V_n3_c (V)</td><td>2259/86.4</td><td>2259.2/86.4</td><td>2259.2/86.37</td><td>0.01</td><td>-0.03</td></tr><tr><td>V_n4_a (V)</td><td>1920/-39.1</td><td>1919.5/-39.1</td><td>1919.50/-39.07</td><td>-0.03</td><td>0.03</td></tr><tr><td>V_n4_b (V)</td><td>2054/-158.3</td><td>2053.8/-158.3</td><td>2054.1/-158.31</td><td>0.00</td><td>-0.01</td></tr><tr><td>V_n4_c (V)</td><td>1986/80.9</td><td>1986/80.9</td><td>1986.0/80.85</td><td>0.00</td><td>-0.05</td></tr><tr><td>I1_2_a (A)</td><td>335.0/-35.7</td><td>335/-35.7</td><td>334.97/-35.67</td><td>-0.01</td><td>0.03</td></tr><tr><td>I1_2_b (A)</td><td>331.8/-154.0</td><td>331.79/-154.0</td><td>331.80/-154.02</td><td>0.00</td><td>-0.02</td></tr><tr><td>I1_2_c (A)</td><td>341.6/85.6</td><td>341.6/85.6</td><td>341.64/85.62</td><td>0.01</td><td>0.02</td></tr><tr><td>I3_4_a (A)</td><td>1041.9/-64.9</td><td>1041.8/-64.9</td><td>1041.94/-64.91</td><td>0.00</td><td>-0.01</td></tr><tr><td>I3_4_b (A)</td><td>973.7/175.9</td><td>973.91/175.8</td><td>973.68/175.85</td><td>0.00</td><td>-0.05</td></tr><tr><td>I3_4_c (A)</td><td>1007.0/55.0</td><td>1007/55.0</td><td>1007.04/55.01</td><td>0.00</td><td>0.01</td></tr></tbody></table>

The corresponding OpenDSS scriptsare given for further comparison purposes.

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

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

## References

\[1] [IEEE Distribution Test Feeders](http://ewh.ieee.org/soc/pes/dsacom/testfeeders/index.html).

{% file src="/files/8Cn2VSXtvRnJcul19uR2" %}


---

# 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/ieee-4-bus-systems.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.
