> 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/how-to/powerfactory-import-39-bus-new-england-system.md).

# PowerFactory Import 39 Bus New England System

## Description

The **PowerFactory Import 39‑Bus New England System** example, located in **File > Open an Example File > How To**, is a modified version of DIgSILENT PowerFactory’s 39‑bus benchmark model.

The objective is to demonstrate the PowerFactory network import workflow in HYPERSIM, document the model adaptations (load modeling, excitation systems, and reference angle), and compare steady‑state load flow and EMT simulation results between PowerFactory and HYPERSIM under a two‑phase fault and clearing sequence.

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

## Requirements

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

## Detailed explanation

This model is a modified version of the 39‑Bus System example provided by PowerFactory 2023. A new **Study Case** was created in the original project, partially based on **EMT Simulation Fault Bus 03**, and associated with four modified network variations.

The folder **PowerFactory\_ref\_model** contains the XML export of the PowerFactory model and the simulation results from PowerFactory for comparison.

Together, the network variations result in the following modifications to the base model:

* PH‑E connected constant impedance, 100% static loads.
* ESST1A excitation system models associated with all synchronous machines.

The model avr\_ESST1A is located in the Data Manager at DIgSILENT Library\Dynamic Models\_ Archive\PF 2022 Models\PSS/E compatible\avr\_ESST1A.BlkDef

| Name  | Value | Unit     | Description                         |
| ----- | ----- | -------- | ----------------------------------- |
| Tr    | 0     | \[s]     | Measurement Delay                   |
| Tb    | 10    | \[s]     | Filter 1st Delay Time Constant      |
| Tc    | 1     | \[s]     | Filter 1st Derivative Time Constant |
| Tb1   | 0     | \[s]     | Filter 2nd Delay Time Constant      |
| Tc1   | 0     | \[s]     | Filter 2nd Derivative Time Constant |
| Ka    | 200   | \[pu]    | Controller Gain                     |
| Ta    | 0.015 | \[s]     | Controller Time Constant            |
| Kc    | 0     | \[pu]    | Current Limiter Factor              |
| Kf    | 0     | \[pu]    | Stabilization Path Gain             |
| Tf    | 1     | \[s]     | Stabilization Path Time Constant    |
| Klr   | 0     | \[pu]    | Current Input Factor                |
| Ilr   | 0     | \[pu]    | Current Input Reference             |
| Vos   | 1     | \[1,2]   | PSS Input Selector                  |
| Vel   | 2     | \[1,2,3] | Uel Input Selector                  |
| Vimin | -0.1  | \[pu]    | Controller Input Minimum            |
| Vamin | -5    | \[pu]    | Controller Minimum Output           |
| Vrmin | -100  | \[pu]    | Exciter Minimum Output              |
| Vimax | 0.1   | \[pu]    | Controller Input Maximum            |
| Vamax | 5     | \[pu]    | Controller Maximum Output           |
| Vrmax | 100   | \[pu]    | Exciter Maximum Output              |

* Explicit reference angle definition = −30 deg, set as the setpoint of the machine connected to the swing bus.

The events in the modified PowerFactory Study Case are as follows:

* A **2‑phase short circuit** at Bus 03 at t = 0.3 s (phases A–B).
* **Immediate clearing** of the short circuit at Bus 03 at t = 0.5 s.

These two events are imported into HYPERSIM using a custom fault block with the following parameters:

The following parameters are part of the default model and should remain unchanged:

* YN‑connected synchronous machines.
* Two‑winding transformers without saturation or sequence data.

### Import the PowerFactory model

The PowerFactory import tool enhances efficiency by automatically converting models from PowerFactory to HYPERSIM, saving time and reducing errors from manual imports.

The import tool comprises a parser, mapper, and exporter:

* The **parser** analyzes PowerFactory model elements and parameters, converting the PowerFactory XML file into a list of objects.
* The **mapper** maps PowerFactory elements to Unified Database (UDB) blocks and parameters.
* The **exporter** creates the HYPERSIM model after a successful database import.

To import the example model, create a new HYPERSIM model and follow the steps in [PowerFactory | Importing a Network](broken://pages/34ddbecc153c47dcad609eb6822e40cb1913050f). The XML input file is located in the **PowerFactory\_ref\_model** folder as noted above.

When the process completes, the Import Panel displays the message “Import successful.”

## Simulation and results

### Load Flow Test

Begin validation by comparing load flow results.

In PowerFactory, open **Load Flow Calculation** and select “*AC Load Flow, balanced, positive sequence*.” Ensure *Consider Voltage Dependency of Loads* is enabled, then **Execute** the calculation. Use the **Network Model Manager** to view results (for example, voltage magnitude and angle per bus under the **Flexible Data** table of the **Busbar** element).

Run the load flow in HYPERSIM as well (see <mark style="background-color:$warning;">Quick Start | Load Flow)</mark>. The table below shows absolute errors in voltage magnitude and angle for all buses. In general, errors are negligible; however, the voltage angle at Bus 34 shows a relatively large mismatch:

\approx 2.5^\circ

| \*\* Bus\*\*\*\*Name\*\* | \*\*Voltage Magnitude (p.u.)\*\***PowerFactory** | \*\*Voltage Angle (deg)\*\***PowerFactory** | \*\*Voltage Magnitude (p.u.)\*\***HYPERSIM** | \*\*Voltage Angle (deg)\*\***HYPERSIM** | **Abs Error Magnitude (p.u.)** | **Abs Error Angle (deg)** |
| ------------------------ | ------------------------------------------------ | ------------------------------------------- | -------------------------------------------- | --------------------------------------- | ------------------------------ | ------------------------- |
| Bus 01                   | 1.046214                                         | -12.0555                                    | 1.0462122                                    | -12.0329202                             | 1.7732E-06                     | 0.022611                  |
| Bus 02                   | 1.045679                                         | -9.39227                                    | 1.0456804                                    | -9.36704637                             | 1.3875E-06                     | 0.025221                  |
| Bus 03                   | 1.025286                                         | -12.0539                                    | 1.0252941                                    | -12.0285709                             | 8.0735E-06                     | 0.025317                  |
| Bus 04                   | 0.998359                                         | -12.3966                                    | 0.9983732                                    | -12.3757845                             | 1.4242E-05                     | 0.020828                  |
| Bus 05                   | 0.999966                                         | -10.9221                                    | 0.999983                                     | -10.9052561                             | 1.6984E-05                     | 0.016865                  |
| Bus 06                   | 1.002336                                         | -10.1444                                    | 1.0023532                                    | -10.1283234                             | 1.7244E-05                     | 0.016065                  |
| Bus 07                   | 0.992023                                         | -12.4492                                    | 0.9920393                                    | -12.4325911                             | 1.6346E-05                     | 0.016568                  |
| Bus 08                   | 0.991209                                         | -13.0053                                    | 0.9912241                                    | -12.9884342                             | 1.5077E-05                     | 0.016849                  |
| Bus 09                   | 1.026118                                         | -13.4384                                    | 1.0261248                                    | -13.4190768                             | 6.7874E-06                     | 0.019356                  |
| Bus 10                   | 1.012398                                         | -7.9011                                     | 1.0124106                                    | -7.88227368                             | 1.2572E-05                     | 0.01883                   |
| Bus 11                   | 1.00781                                          | -8.66865                                    | 1.007824                                     | -8.65071392                             | 1.3972E-05                     | 0.017932                  |
| Bus 12                   | 0.980848                                         | -38.7538                                    | 0.9808615                                    | -38.7349346                             | 1.352E-05                      | 0.018841                  |
| Bus 13                   | 1.009218                                         | -8.66974                                    | 1.0092313                                    | -8.64997982                             | 1.3342E-05                     | 0.019755                  |
| Bus 14                   | 1.005863                                         | -10.4825                                    | 1.0058777                                    | -10.4603722                             | 1.4702E-05                     | 0.022126                  |
| Bus 15                   | 1.007598                                         | -11.1703                                    | 1.0076148                                    | -11.1408674                             | 1.6841E-05                     | 0.029388                  |
| Bus 16                   | 1.023418                                         | -9.84383                                    | 1.0234371                                    | -9.81134222                             | 1.9118E-05                     | 0.032491                  |
| Bus 17                   | 1.026392                                         | -10.9972                                    | 1.0264056                                    | -10.9672343                             | 1.3557E-05                     | 0.029959                  |
| Bus 18                   | 1.02455                                          | -11.8445                                    | 1.0245605                                    | -11.8162632                             | 1.0473E-05                     | 0.028188                  |
| Bus 19                   | 1.033471                                         | -4.61092                                    | 1.0335418                                    | -4.56663021                             | 7.0838E-05                     | 0.044293                  |
| Bus 20                   | 1.015495                                         | -5.5864                                     | 1.0121634                                    | -5.73269454                             | 0.00333163                     | 0.146291                  |
| Bus 21                   | 1.024844                                         | -7.49965                                    | 1.0248568                                    | -7.46727255                             | 1.2845E-05                     | 0.032381                  |
| Bus 22                   | 1.045289                                         | -3.05329                                    | 1.0452954                                    | -3.02098845                             | 6.4183E-06                     | 0.032305                  |
| Bus 23                   | 1.040321                                         | -3.27612                                    | 1.0403282                                    | -3.24381711                             | 7.1622E-06                     | 0.032301                  |
| Bus 24                   | 1.029795                                         | -9.7724                                     | 1.0298125                                    | -9.73994611                             | 1.7477E-05                     | 0.032455                  |
| Bus 25                   | 1.053592                                         | -8.1452                                     | 1.0535978                                    | -8.11938838                             | 5.8303E-06                     | 0.025816                  |
| Bus 26                   | 1.047088                                         | -9.55729                                    | 1.0470965                                    | -9.52950577                             | 8.5279E-06                     | 0.027787                  |
| Bus 27                   | 1.031319                                         | -11.4217                                    | 1.0313307                                    | -11.3929392                             | 1.1701E-05                     | 0.02877                   |
| Bus 28                   | 1.046837                                         | -6.34431                                    | 1.0468417                                    | -6.31660122                             | 4.6591E-06                     | 0.02771                   |
| Bus 29                   | 1.047632                                         | -3.60032                                    | 1.0476355                                    | -3.57262161                             | 3.512E-06                      | 0.027694                  |
| Bus 30                   | 1.045                                            | -36.9975                                    | 1.045                                        | -36.972276                              | 8.551E-10                      | 0.025218                  |
| Bus 31                   | 0.98                                             | -30                                         | 0.98                                         | -29.9999998                             | 1.7298E-08                     | 1.94E-07                  |
| Bus 32                   | 0.9831                                           | -29.9082                                    | 0.9831                                       | -29.8894661                             | 7.9467E-10                     | 0.018742                  |
| Bus 33                   | 0.9972                                           | -29.3559                                    | 0.9972                                       | -29.311763                              | 7.6488E-10                     | 0.044125                  |
| Bus 34                   | 1.0075                                           | -32.955                                     | 1.0075                                       | -30.457477                              | 7.9016E-10                     | **2.497508**              |
| Bus 35                   | 1.0493                                           | -28.1078                                    | 1.0493                                       | -28.0754724                             | 8.2105E-10                     | 0.03228                   |
| Bus 36                   | 1.0635                                           | -25.4532                                    | 1.0635                                       | -25.4209171                             | 8.3978E-10                     | 0.032255                  |
| Bus 37                   | 1.0278                                           | -31.4001                                    | 1.0278                                       | -31.3743084                             | 8.4644E-10                     | 0.025784                  |
| Bus 38                   | 1.0265                                           | -26.5282                                    | 1.0265                                       | -26.5005443                             | 8.3176E-10                     | 0.027682                  |
| Bus 39                   | 1.03                                             | -13.6488                                    | 1.03                                         | -13.6278342                             | 8.4975E-10                     | 0.021003                  |

The large voltage angle mismatch at Bus 34 is due to the value of the `parallel Transformers` parameter in `Trf 20 - 34`. As noted in [PowerFactory | Supported Features and Limitations](broken://pages/b78b01a85dad31575afb2f152f6167a7217b60f2), this feature is not yet supported by the **PowerFactory Network Import** function.

This discrepancy does not significantly affect validation of the EMT simulation results described below.

A plausible workaround is:

* Activate the source project in PowerFactory.
* Set `parallel Transformers` in `Trf 20 - 34` to 1.
* Clone the transformer to emulate two parallel transformers.
* Re‑run the load flow and export the XML as described in [PowerFactory | Importing a Network](broken://pages/34ddbecc153c47dcad609eb6822e40cb1913050f).

### EMT Simulation Test

## Record HYPERSIM results with Datalogger

Set the model time step to 50 μs to align with the PowerFactory Initial Conditions for EMT Simulation. Use the [Datalogger](https://opal-rt.atlassian.net/wiki/spaces/HDI/pages/3548177/Datalogger) to record the selected sensors from t = 0 s to t = 2 s with **Decimation factor** = 1. For the chosen **Signal Groups**, set **Number of frames to record** = 1, **Frame length** = 2 s, and clear the **Output file auto naming** checkbox. A predefined set of sensors is provided; additional sensors can be added following [Sensor Management](broken://pages/8e1a263df4dcb38bd79c4ccf20884883824bc220).

The provided [ScopeView](https://opal-rt.atlassian.net/wiki/spaces/PSV) template, `PowerFactory_Import_39_Bus.svt`, facilitates comparison of PowerFactory and HYPERSIM recordings.

**Source files in the ScopeView template must be replaced before playing the recorded data.**

PowerFactory EMT results for this study case are provided in `PowerFactory_Import_39_Bus_Results.csv`. The data source for HYPERSIM recordings also needs to be replaced.

Use **Data Source > Replace** in ScopeView to update both data sources.

## Test sequence

1. Run the model for a few seconds.
2. Stop the model. This creates the `...\PowerFactory_Import_39_Bus\PowerFactory_Import_39_Bus_hyp\Recordings` folder, which contains `data.oprec` after simulation.
3. Open ScopeView.
4. Open the *PowerFactory\_Import\_39\_Bus.svt* template in the main folder.
5. Replace the PowerFactory signals with *PowerFactory\_Import\_39\_Bus\_Results.csv* from the *PowerFactory\_ref\_model* folder.
6. Replace the REC1 signals with *data.oprec* from the *PowerFactory\_Import\_39\_Bus\_hyp\Recordings* folder.
7. Play the recorded data.

## Results

The following variables are compared to demonstrate consistency between HYPERSIM and PowerFactory:

* Phase voltages at Bus 02.
* Field voltage in Generator 10.
* Speed in Generator 10.
* Active power in Generator 10.
* Reactive power in Generator 10.

Zooming into the plots (in the provided template) helps verify the match after each event (fault application and clearing). Small mismatches are more noticeable in speed and field voltage. These can be explained by:

* Differences in the implementation of the mechanical dynamics of the synchronous machine (swing equation) between HYPERSIM and PowerFactory, which directly affects speed and can influence other variables.
* Differences between the HYPERSIM native ESST1A excitation system model and the PowerFactory implementation.

## References

\[1] DIgSILENT PowerFactory, “39 Bus New England System”, benchmark model documentation.


---

# 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/how-to/powerfactory-import-39-bus-new-england-system.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.
