> 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/emtp-compatibility/emtp-ieee-39bus-benchmark.md).

# EMTP IEEE 39Bus Benchmark

## Description

The **EMTP IEEE 39‑Bus** example, located in **File > Open an Example File > EMTP Compatibility**, demonstrates EMTP Network Compatibility between EMTP and HYPERSIM on a 345‑kV, 39‑bus system that includes 10 synchronous machines, three‑phase loads, and two‑ and three‑winding transformers. A three‑phase fault is applied at “LoadBus” on Bus 16 from 0.5 s to 0.7 s.

The objective is to open an EMTP-developed model in HYPERSIM, apply minimal adjustments, and validate that simulation results match.

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

## Requirements

This example model does not require any additional hardware or licenses.

## Detailed explanation

EMTP Network Compatibility allows editing and simulating in HYPERSIM a circuit originally developed in EMTP. EMTP and HYPERSIM share the same user interface and network data format (\*.ecf), so EMTP models can be loaded directly in HYPERSIM.

{% hint style="info" %}
For background and workflow details, see the following section [Import from EMTP](https://www.opal-rt.com/docs/hypersim/model-and-simulation/import-models-from-external-software-or-code/import-from-emtp.md)
{% endhint %}

This example was created in EMTP and opened in HYPERSIM. After a few block-level adjustments, it is ready to run in HYPERSIM.

The model is a 345-kV system of 39 buses that includes 10 synchronous machines, 3-phase loads, two-winding and three-winding transformers.

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

Same control system is used in all the power plants.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-39377cecb18a539b2862a70c2105a495a54e0493%2Fimage%20(64).png?alt=media" alt=""><figcaption><p>Sub circuit in the power plant 01</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-4b070d92692d4b6a29ef113cfd54cdf96eb8ce3d%2Fimage%20(65).png?alt=media" alt=""><figcaption><p>Sub circuit of the control system of the synchronous machine</p></figcaption></figure>

Note that in EMTP the transmission line type model can be switch from CP to FD line models by changing the variable "**oGlobalData.Linetype**" as indicated in the text box shown in the model. Since this text exist in the EMTP model it is not removed when the model is imported to HYPERSIM. The global variable exists in EMTP to include/exclude FD or CP; however, this feature is not supported in HYPERSIM. The example model in HYPERSIM is configured to work with CP models. However, the user can change the CP line models to FD models if needed.

## Simulation and results

Make sure to apply settings for POW, Circuit Breaker CB2 and BUS 6 Voltage for Load Flow blocks as follow:

<details>

<summary><strong>POW Block</strong></summary>

The POW is connected to the slack bus which is Bus 6 as shown in the picture.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-b0350a1511cfae98d33a984b64739ee4a994139f%2Femtp-ieebus-powblock.png?alt=media" alt=""><figcaption></figcaption></figure>

The following picture shows the detection level of the block which is 275 kV.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-462ab1e09464d2ac1cae5ea3a2e896e210b9ddf8%2Femtp-ieebus-detectionlevel.png?alt=media" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary><strong>Circuit Breaker CB2</strong></summary>

This circuit breaker is located inside Load 16.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-dd521f43b8de5df0117b6b10bf6b9c07e866ffe3%2Femtp-iee39bus-cb2breaker.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-4e2a55be92da7e14211bca731d7f3c2c73398cd2%2Femtp-iee39bus-cb2breaker-2.png?alt=media" alt=""><figcaption></figcaption></figure>

The CB2 settings need to be according to the following picture. T1 should be 0.5 seconds and T2 should be 0.7 seconds.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-6f6470163617e1d01c4bc81860b6cddaf1f733e6%2Femtp-iee39bus-cb2breaker-3.png?alt=media" alt=""><figcaption></figcaption></figure>

</details>

<details>

<summary><strong>BUS 6 Voltage for Load Flow</strong></summary>

For this model, the load flow needs to execute and for that, the bus voltages need to be set. The next picture shows the bus voltage settings for BUS 6 which is the slack bus and the voltage has to be 345 kV. Users need to make sure the voltage is set correctly in the model.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-d1fda2d27bf6b54366393fd9992ef4757af4c542%2Femtp-iee39bus-loadflow.png?alt=media" alt=""><figcaption></figcaption></figure>

</details>

Make sure the option to execute load flow upon running the simulation is turned on and the time step is 20 us.

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

Run the model at a 20 us time step. In ScopeView, open the template **EMTP\_IEEE\_39Bus.svt**. The template overlays HYPERSIM results with reference data exported from EMTP.

Like it is shown in the following picture, just choose the Data Source next to the data from MAT1 and click on Replace.

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

Then, according to the picture below, find the reference data in the example model folder. The Files of type option needs to be set to MAT files to show the reference (\*.mat) file. The reference data is called "EMTP\_IEEE\_39Bus.mat".

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

{% hint style="info" %}
EMTP reference data is often provided as .m or .mda files; this example uses a .mat file.
{% endhint %}

The system is initialized from a load flow solution in both EMTP and HYPERSIM. A three‑phase fault is applied at “LoadBus” (Bus 16) from 0.5 s to 0.7 s.

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

Voltage waveforms at buses 6 (POW bus) and 16 (fault bus), and the fault current waveform, show close agreement between EMTP and HYPERSIM. Output results across the 10 synchronous machines are consistent; representative plots (e.g., SM1) also match well.

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


---

# 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/emtp-compatibility/emtp-ieee-39bus-benchmark.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.
