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

# Import Data Files in PSS/e Format (Positive Sequence)

## Description

The **Import Data Files in PSS/e Format (Positive Sequence)** 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 **phasor03\_PSSE**, then click **Finish**.

The following figure shows the **IEEE 39-bus system** used to demonstrate importing PSS/e (ver. 32) `*.raw` and `*.dyr` files into ePHASORSIM for simulation of transmission systems in the positive sequence domain.

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

There are some modifications in this test system compared to the standard 39-bus system.

* The reactive part of loads at bus 4, 16 & 18 were replaced by fixed shunt components.
* Two 2-winding transformers among buses 11, 12, 13 were replaced by one 3-winding transformer.

The **\*.raw file** import process currently includes the following items

* Bus
* Load: constant impedance, constant current, and constant power
* Fixed Shunt
* Generator
* Branch
* 2-winding transformer with default values for CM, CZ, and CW
* 3-winding transformer with default values for CM, CZ, and CW

The **\*.dyr file** also includes these components:

<table data-search="false"><thead><tr><th>Bus</th><th>Synchronous machine</th><th>Excitation system</th><th>Power system stabilizer</th><th>Turbine-governor</th></tr></thead><tbody><tr><td>30</td><td>GENROU</td><td>SEXS</td><td>PSS2A</td><td>--</td></tr><tr><td>31</td><td>GENROE</td><td>EXST1</td><td>--</td><td>--</td></tr><tr><td>32</td><td>GENROU</td><td>EXST1</td><td>STAB1</td><td>TGOV1</td></tr><tr><td>33</td><td>GENROE</td><td>EXST1</td><td>--</td><td>--</td></tr><tr><td>34</td><td>GENROU</td><td>EXAC4</td><td>STAB3</td><td>--</td></tr><tr><td>35</td><td>GENROE</td><td>EXAC1</td><td>STAB4</td><td>TGOV1</td></tr><tr><td>36</td><td>GENROU</td><td>EXST1</td><td>--</td><td>--</td></tr><tr><td>37</td><td>GENROE</td><td>EXAC4</td><td>PSS2A</td><td>IEEEG2</td></tr><tr><td>38</td><td>GENROU</td><td>EXST1</td><td>--</td><td>--</td></tr><tr><td>39</td><td>GENCLS</td><td>--</td><td>--</td><td>--</td></tr></tbody></table>

{% 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

The modified 39-bus system provides additional options for disturbances compared to the standard 39-bus system. The network load flow and dynamic data are given in **phasor03\_PSSE.raw** and **phasor03\_PSSE.dyr**.

The in-port and out-port configurations are given in the **phasor03\_PSSE.xlsx** file.

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

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

<details>

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

* Voltage at buses 2, 4, 9, 11, 16, 26, 29, 30, 31, 32, 34, 39
* Machine rotor angle for all synchronous generators
* Machine speed for all synchronous generators
* Tap position for transformer between buses 2 and 30
* Tap position for transformer between buses 11, 12 and 30
* Output of excitation system, EFD, for machines at buses 30, 31, 32, 33, 34, 35, 36, 37 and 38
* Mechanical power of machines at buses 32, 35 and 37
* Injected current and bus voltage for machine at bus 31
* In-service status of load connected at bus 16 (load\_Z\_16\_1)
* Current flow on the line between buses 26 and 29
* Output of stabilizers connected to the excitation systems on buses 30, 32, 34, 35 and 37

</details>

<details>

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

* 3-phase-to-ground fault on buses 2, 4, 7, 30, 34, 39
* Adjust tap position for transformer between buses 2 and 30
* Adjust tap position for transformer between buses 11, 12 and 13
* Adjust P and Q for load at bus 7
* In-service/out-of-service command for load at bus 16 (load\_Z\_16\_1)
* In-service/out-of-service commands for line between buses 9 and 39
* Fault on line between buses 26 and 29 with variable distance from the sending end
* Reference voltage increment for the exciter connected to the machine on bus 30
* Reference increment for the turbine-governor connected to the machine on bus 35

</details>

For the demo, some of the incoming pins are activated in the console subsystem at the following times:

* At t = 1 s for a duration of 80 ms, a fault is applied on bus 30
* At t = 5 s, the ratio of winding 1 of transformer between buses 2 and 30 changes to 0.9 p.u.
* At t = 9 s, load at bus 16 receives an out-of-service command
* At t = 10 s, decrease the reference of the turbine-governor connected to the machine on bus 35 by 0.1 p.u.
* At t = 13 s, the ratio of winding 1 of transformer between buses 11, 12 and 13 changes to 0.95 p.u.
* At t = 15 s, increase the reference voltage of the exciter connected to the machine on bus 30 by 0.1 p.u.


---

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