> 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/model-and-simulation/import-models-from-external-software-or-code/import-from-emtp/emtp-example-model-in-hypersim.md).

# EMTP Example Model in HYPERSIM

This section presents an EMTP model simulated in HYPERSIM to illustrate the typical workflow and required adjustments.

The **IEEE 39‑Bus Benchmark** is used as a representative example of a complex system, highlighting key compatibility considerations between EMTP and HYPERSIM.

After applying the necessary adjustments, the simulation results obtained in EMTP and HYPERSIM show close agreement.

## Overview

The model includes:

* 39 buses (345 kV network)
* Synchronous machines
* Loads
* Two- and three-winding transformers
* Control systems (Exciters, Governors)

A three-phase fault is applied at **LoadBus (Load 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-ef5aeb75fc225efb9a9250296545279632a6ecc6%2Femtp-ieee39bus-example.png?alt=media" alt=""><figcaption></figcaption></figure>

The following figures show the subcircuit of **Power Plant 01** and the corresponding **synchronous machine control subsystem**, which is identical for all power plants 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-dbd37ad17211b871f6b8a9ed90b39700d4da08ba%2Femtp-ieee39bus-power-plant.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-a4a90b9ce0e289aaf426da661096a11568d4d474%2Femtp-ieee39bus-control.png?alt=media" alt=""><figcaption></figcaption></figure>

## Required adjustments

{% stepper %}
{% step %}

### Prepare the EMTP Model for HYPERSIM

Adjust the machine parameters to account for EMTP parameters that are not supported in HYPERSIM:

| Parameter     | Previous value in EMTP | New value in HYPERSIM |
| ------------- | ---------------------- | --------------------- |
| Xqp'          | 0.08 pu                | 0.5 pu                |
| Tq0'          | 0 s                    | 0.1 s                 |
| {% endstep %} |                        |                       |

{% step %}

### Open the EMTP Circuit in HYPERSIM

Launch HYPERSIM and load the EMTP project (`*.ecf` file). The model is imported directly and can be edited using HYPERSIM tools.
{% endstep %}

{% step %}

### Add a Point-on-Wave (POW) block

Add a POW at the **slack bus (Bus 6)** and adjust the detection level to match EMTP initial conditions. Example value: **275 kV** (determined empirically).

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-8c1b7d8365b8c3f182e92963d71c825a5a842d05%2Femtp-ieee39bus-pow.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Replace EMTP switches

Replace EMTP switches with **HYPERSIM circuit breakers**. Ensure switching times match EMTP: Fault applied 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-ac2fee8b4bd477480992d8f02e2668f4a4a43848%2Femtp-ieee39bus-switches.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-43e1c7750163ccdbe76f12c277bac7e268589cf1%2Femtp-ieee39bus-switches-timing.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Initialize load flow

Set **bus voltage levels** and run the **load flow** to compute initial conditions.

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

Active power (P) and reactive power (Q) values match closely across generators:

| Device               | HYPERSIM P (MW) | HYPERSIM Q (MVAr) | EMTP P (MW) | EMTP Q (MVAr) |
| -------------------- | --------------- | ----------------- | ----------- | ------------- |
| PowerPlant\_01       | 1000.000        | 222.606           | 1000.000    | 222.564       |
| PowerPlant\_02       | 572.198         | 257.758           | 572.162     | 257.750       |
| PowerPlant\_03       | 650.000         | 262.793           | 650.000     | 262.790       |
| PowerPlant\_04       | 632.000         | 172.477           | 632.000     | 172.476       |
| PowerPlant\_05       | 508.000         | 202.723           | 508.000     | 202.723       |
| PowerPlant\_06       | 650.000         | 257.792           | 650.000     | 257.791       |
| PowerPlant\_07       | 560.000         | 133.513           | 560.000     | 133.513       |
| PowerPlant\_08       | 540.000         | 65.436            | 540.000     | 65.435        |
| PowerPlant\_09       | 830.000         | 83.660            | 830.000     | 83.660        |
| PowerPlant\_10       | 250.000         | 153.932           | 250.000     | 153.931       |
| **Total generation** | **6192.198**    | **1812.689**      | **6192.16** | **1812.634**  |
| {% endstep %}        |                 |                   |             |               |

{% step %}

### Adapt control systems

Add **loop breaker blocks** in ST1 exciters and IEEEG1 governors to prevent numerical oscillations due to algebraic loops.
{% endstep %}
{% endstepper %}

## Simulation results

In this test case, a three-phase fault is applied at bus **“LoadBus”**, located within the **Load 16** block, from **0.5 s to 0.7 s**, as described previously. The system is initialized using the load flow solution in both EMTP and HYPERSIM. The following figures present the simulation results obtained in both environments using a time step of **20 µs**.

The figures include:

* Voltage waveforms at **Bus 6** (POW bus) and **Bus 16** (fault bus) in both EMTP and HYPERSIM
* The **fault current waveform** during the disturbance

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

The results show a very close agreement between EMTP and HYPERSIM.

The following figures show the dynamic response of one representative machine (**PowerPlant\_01**) in both EMTP and HYPERSIM. Similar behavior is observed across all other machines in the system.

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

In all cases, the responses obtained in HYPERSIM closely match those from EMTP. The waveforms are nearly superimposed, demonstrating consistent transient behavior and confirming the correct adaptation of machine models and control systems.


---

# 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/model-and-simulation/import-models-from-external-software-or-code/import-from-emtp/emtp-example-model-in-hypersim.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.
