> 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/transmission/fpga-based-frequency-dependent-line.md).

# FPGA Based Frequency Dependent Line

## Description

The **Frequency-Dependent Line (FD Line)** example, located in **File > Open an Example File > Transmission**, demonstrates the FPGA-based real-time simulation of a three-phase frequency-dependent transmission line using Schematic Editor with the eHS solver.

The model represents a 150km three-phase frequency-dependent line with three-phase voltage sources at both ends. It represents the true nature of a transmission line by modeling the line parameters as distributed and frequency-dependent. The objective is to compare HYPERSIM and eHS results at different time steps.

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

## Requirements

This example requires a real-time simulator equipped with FPGA capability.

An eHS solver license is needed with this specific keys:

The minimal real-time time step used in this example is 20 µs.

## Detailed explanation

The system represents a 150 km three-phase FD line energized by three-phase voltage sources at both ends. The phase of the left and right voltage sources is adjustable via the **phase** block in the console. Three controllable single-phase-to-ground faults on phase A are located at 75 km, 100 km, and 125 km from the left source. The active fault location is selected using the **FaultLocation** constant. Voltage and current measurements are placed at the line terminals and at each fault location for all phases.

The HYPERSIM example is reproduced in Schematic Editor. Faults are implemented using resistors Rfault1, Rfault2, and Rfault3, with values set according to the **FaultLocation** constant in the HYPERSIM model. The minimum and maximum line lengths are constrained by the eHS sampling time.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-23ee164edb088a28a43f615fbbe6046ff0367efd%2Fimage%20(1002).png?alt=media" alt=""><figcaption><p>The model in the schematic editor.</p></figcaption></figure>

### HYPERSIM model configuration

For each FD line segment, upload parameters from the corresponding .pun file from your project folder:

| FD line    | Distance | .pun file              |
| ---------- | -------- | ---------------------- |
| 1          | 75 km    | line\_FD\_75km\_rv.pun |
| 2, 3 and 4 | 25 km    | line\_FD\_25km\_rv.pun |

Select the fault location using the **FaultLocation** constant:

| Fault Location                 | Value |
| ------------------------------ | ----- |
| No fault                       | 0     |
| At 75 km from the left source  | 1     |
| At 100 km from the left source | 2     |
| At 125 km from the left source | 3     |

### Schematic Editor configuration

1. Open Schematic Editor and click the firmware configuration control at the bottom left.
2. Select or create a simulation setup. Ensure the FPGA firmware supports the FD Line model.
3. Click Solver Settings and define the solver parameters for the simulation.

### I/O configuration

Because part of the simulation runs on eHS, configure the HYPERSIM I/O interface as follows:

1. Open the I/O Interface Configuration.
2. Add an OPAL-RT Board.
3. Select the correct Chassis ID. This example uses an OP5707 (Virtex-7) simulator.
4. Select Optical as the type of generated synchronization signal.
5. Select Standard repositories for the bitstream configuration location, then select the following files: Bitstream configuration file:VC707\_2-EX-0001-eHSx128\_Gen4\_PowerSystems\_FDLine\_IOConfig1.opal Bitstream name:VC707\_2-EX-0001-3\_4\_0\_814-eHSx128\_Gen4\_PowerSystems\_FDLine\_IOConfig1-2C-02.bin

## Simulation and results

Results with a fault at location 1 (75 km from the left source) show that the system is balanced in steady state before the fault on phase A. At t = 0.15 s, the harmonic content of voltages and currents increases due to the fault.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-5576b0f00ee0aa0d9911ca93b811cdfbb5f78f5f%2Fimage%20(524).png?alt=media" alt=""><figcaption><p>I1, I2, I3, I4 and I5 currents on eHS</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-3e7221757fa4f0de296cdef5dbf743794c8a4cf0%2Fimage%20(525).png?alt=media" alt=""><figcaption><p>V1, V2, V3, V4 and V5 voltages on eHS</p></figcaption></figure>

Comparisons between HYPERSIM (red) and eHS (blue) show that the system is balanced before the fault occurs on phase A at t = 0.1 s; the fault propagates along the line and is detected by eHS at t = 0.1 s. With a real-time time step of 20 µs on HYPERSIM and 1 µs on eHS, eHS exhibits greater harmonic detail in both current and voltage through the line, particularly around t = 0.15 s.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-7e62ccbff4633ac27e813a7c8575e8803c189fd8%2Fimage%20(526).png?alt=media" alt=""><figcaption><p>Comparison between HYPERSIM (time step of 20 µs) and eHS (time step of 1 µs)</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-014174f1402a4213db87ebfd222602d0c316fc66%2Fimage%20(527).png?alt=media" alt=""><figcaption><p>Zoom at zoomed t = 0.15s,</p></figcaption></figure>

To compare with identical time steps, eHS results recorded at 1 µs were matched by running the same case offline in HYPERSIM at 1 µs. The results align closely between HYPERSIM and eHS at the same time step.

<figure><img src="https://3623212549-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLxgTpoh7kyPmQ5vuyqD7%2Fuploads%2Fgit-blob-eb26a28e2cde2d062f405be182726d9c4b8ad24d%2Fimage%20(528).png?alt=media" alt=""><figcaption><p>Comparison between HYPERSIM and eHS with the same time step of 1 µs.</p></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/transmission/fpga-based-frequency-dependent-line.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.
