> 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/phasor-domain-with-ephasorsim/integrate-a-power-system-model-to-ephasorsim/native-library-components/line-components.md).

# Line Components

## Positive-sequence network <a href="#parameters" id="parameters"></a>

In a **positive-sequence network**, a line is represented using a PI-section model. Two measurement points are available for current measurements: one at the sending end and one at the receiving end.

### PI-section line

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

| Excel Column Name | Native Component Parameter | Description                                                                |
| ----------------- | -------------------------- | -------------------------------------------------------------------------- |
| **ID**            | `name`                     | Line identifier.                                                           |
| **Status**        | `status`                   | Initial service status. Use `1` for in-service and `0` for out-of-service. |
| **From bus**      | `from_bus`                 | Sending-end bus identifier.                                                |
| **To bus**        | `to_bus`                   | Receiving-end bus identifier.                                              |
| **R (pu)**        | `resistance`               | Series resistance on the network base.                                     |
| **X (pu)**        | `reactance`                | Series reactance (`2πfL`) on the network base.                             |
| **B (pu)**        | `capacitance`              | Total shunt capacitive charging (`2πfC`) on the network base.              |

## Multiphase network <a href="#parameters" id="parameters"></a>

In a **multiphase network**, four line components can be used to model single-phase, two-phase, and three-phase transmission or distribution lines. Depending on the available data, line impedances and shunt susceptances can be specified using either phase-domain matrices or positive- and zero-sequence parameters.

Single-phase and two-phase lines support only the phase-domain representation. Three-phase lines support both phase-domain and sequence-domain representations.

### Single-phase line

A single-phase line represents a line connecting two phase-specific buses. The line parameters are defined using the line impedance and shunt susceptance per unit length.

| Excel Column Name | Native Component Parameter | Description                                                                                   |
| ----------------- | -------------------------- | --------------------------------------------------------------------------------------------- |
| **ID**            | `name`                     | Line identifier.                                                                              |
| **Status**        | `status`                   | <p>Initial service status.<br><code>1</code> = connected<br><code>0</code> = disconnected</p> |
| **Length**        | `length`                   | Line length.                                                                                  |
| **From1**         | `buses`                    | Sending-end bus.                                                                              |
| **To1**           | `buses`                    | Receiving-end bus.                                                                            |
| **r11 \***        | `resistances`              | Self-resistance per unit length.                                                              |
| **x11 \***        | `reactances`               | Self-reactance per unit length.                                                               |
| **b11 \***        | `charges`                  | Shunt susceptance per unit length.                                                            |

### Two-phase line

A two-phase line represents a line connecting two phase-specific bus pairs. The impedance and shunt susceptance are defined using a 2 × 2 matrix.

| Excel Column Name            | Native Component Parameter | Description                                                                                   |
| ---------------------------- | -------------------------- | --------------------------------------------------------------------------------------------- |
| **ID**                       | `name`                     | Line identifier.                                                                              |
| **Status**                   | `status`                   | <p>Initial service status.<br><code>1</code> = connected<br><code>0</code> = disconnected</p> |
| **Length**                   | `length`                   | Line length.                                                                                  |
| **From1, From2**             | `buses`                    | Sending-end buses.                                                                            |
| **To1, To2**                 | `buses`                    | Receiving-end buses.                                                                          |
| **r11, r21, r22 \***         | `resistances`              | Entries of the resistance matrix.                                                             |
| **x11**, **x21**, **x22 \*** | `reactances`               | Entries of the reactance matrix.                                                              |
| **b11**, **b21**, **b22 \*** | `charges`                  | Entries of the shunt susceptance matrix.                                                      |

### Three-phase line (full matrix)

A three-phase line represented using full impedance and susceptance matrices.

| Excel Column Name                   | Native Component Parameter | Description                                                                                   |
| ----------------------------------- | -------------------------- | --------------------------------------------------------------------------------------------- |
| **ID**                              | `name`                     | Line identifier.                                                                              |
| **Status**                          | `status`                   | <p>Initial service status.<br><code>1</code> = connected<br><code>0</code> = disconnected</p> |
| **Length**                          | `length`                   | Line length.                                                                                  |
| **From1, From2**                    | `buses`                    | Sending-end buses.                                                                            |
| **To1**, **To2**                    | `buses`                    | Receiving-end buses.                                                                          |
| **r11, r21, r22, r31, r32, r33 \*** | `resistances`              | Entries of the resistance matrix.                                                             |
| **x11, x21, x22, x31, x32, x33 \*** | `reactances`               | Entries of the reactance matrix.                                                              |
| **b11, b21, b22, b31, b32, b33 \*** | `charges`                  | Entries of the shunt susceptance matrix.                                                      |

### Three-phase line (sequence data)

A three-phase line represented using positive- and zero-sequence parameters.

| Excel Column Name               | Native Component Parameter | Description                                                                                   |
| ------------------------------- | -------------------------- | --------------------------------------------------------------------------------------------- |
| **ID**                          | `name`                     | Line identifier.                                                                              |
| **Status**                      | `status`                   | <p>Initial service status.<br><code>1</code> = connected<br><code>0</code> = disconnected</p> |
| **Length**                      | `length`                   | Line length.                                                                                  |
| **From1**, **From2**, **From3** | `buses`                    | Sending-end buses.                                                                            |
| **To1**, **To2**, **To3**       | `buses`                    | Receiving-end buses.                                                                          |
| **R0 \*\***                     | `resistances`              | Zero-sequence resistance per unit length.                                                     |
| **X0 \*\***                     | `reactances`               | Zero-sequence reactance per unit length.                                                      |
| **R1 \*\***                     | `resistances`              | Positive-sequence resistance per unit length.                                                 |
| **X1 \*\***                     | `reactances`               | Positive-sequence reactance per unit length.                                                  |
| **B0 \*\***                     | `charges`                  | Zero-sequence shunt susceptance per unit length.                                              |
| **B1 \*\***                     | `charges`                  | Positive-sequence shunt susceptance per unit length.                                          |

{% hint style="info" %}
The parameters `rij` and `xij` define the entries of the series impedance matrix **Z = R + jX**:

\
$$\begin{bmatrix} r\_{11}+jx\_{11} & ? & ? \ r\_{21}+jx\_{21} \&r\_{22}+jx\_{22} & ? \ r\_{31}+jx\_{31} & r\_{32}+jx\_{32} & r\_{33}+jx\_{33} \end{bmatrix}$$

The parameters `bij` define the entries of the shunt susceptance matrix **B**:

\
$$\begin{bmatrix} jb\_{11} & ? & ? \ jb\_{21} & jb\_{22} & ? \ jb\_{31} & jb\_{32} & jb\_{33} \end{bmatrix}$$
{% endhint %}

{% hint style="info" %}
\*\*When sequence data is used, both **Z0** and **Z1** must be non-zero.
{% endhint %}

## Multiphase lines power calculations

For multiphase lines, ePHASORSIM computes sending-end power, receiving-end power, and line losses using the line admittance matrix. The formulation below is shown for a three-phase line but is equally applicable to single-phase and two-phase line components.

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

### Voltage and current vectors

For a three-phase line, the sending-end and receiving-end voltages are grouped as:

$$
V\_{\text{From}} = \begin{bmatrix} V\_{\text{From}1}\ V\_{\text{From}2}\ V\_{\text{From}3} \end{bmatrix}, V\_{\text{To}} = \begin{bmatrix} V\_{\text{To}1}\ V\_{\text{To}2}\ V\_{\text{To}3} \end{bmatrix}
$$

and the corresponding current vectors are:

$$
I\_{\text{From}} = \begin{bmatrix} I\_{\text{From}1}\ I\_{\text{From}2}\ I\_{\text{From}3} \end{bmatrix}, I\_{\text{To}} = \begin{bmatrix} I\_{\text{To}1}\ I\_{\text{To}2}\ I\_{\text{To}3} \end{bmatrix}
$$

The complete voltage and current vectors are:

$$
V= \begin{bmatrix} V\_{\text{From}}\ V\_{\text{To}} \end{bmatrix}, I= \begin{bmatrix} I\_{\text{From}}\ I\_{\text{To}} \end{bmatrix}
$$

### Series and shunt admittances

The series admittance matrix is computed from the impedance matrix **Z** and the line length **L**:

$$
Y\_{\text{series}} = \left( Z \cdot \text{Length} \right)^{-1}
$$

The line charging admittance is:

$$
Y\_{\text{parallel}} = \frac{B \cdot \text{Length}}{2}
$$

where:

* **Z** = **R** + j**X** is the series impedance matrix.
* **B** is the shunt susceptance matrix.
* **L** is the line length.

### Network equation

The line current is obtained from:

$$
YV = I = \begin{bmatrix} Y\_{\text{series}} + Y\_{\text{parallel}} & -Y\_{\text{series}} \\\[6pt] -Y\_{\text{series}} & Y\_{\text{series}} + Y\_{\text{parallel}} \end{bmatrix}V
$$

### Sending-end and receiving-end power

The complex power vector is:

$$
S = VI^{*} = V(YV)^{*}
$$

The sending-end and receiving-end powers are:

$$
S\_{\text{From}} = \begin{bmatrix} S\_{\text{From}1}\ S\_{\text{From}2}\ S\_{\text{From}3} \end{bmatrix}, S\_{\text{To}} = \begin{bmatrix} S\_{\text{To}1}\ S\_{\text{To}2}\ S\_{\text{To}3} \end{bmatrix}
$$

### Shunt charging power

The power absorbed by the shunt charging elements at the receiving and sending ends is given by:

$$
S\_{\text{To}}^{\text{parallel}} = V\_{\text{To}} \left( Y\_{\text{parallel}} V\_{\text{To}} \right)^{*}, S\_{\text{From}}^{\text{parallel}} = V\_{\text{From}} \left( Y\_{\text{parallel}} V\_{\text{From}} \right)^{*}
$$

### Line losses

The total complex power loss is:

$$
S\_{\text{Loss}} = S\_{\text{From}} + S\_{\text{To}} - \left( S\_{\text{From}}^{\text{parallel}} + S\_{\text{To}}^{\text{parallel}} \right)
$$

where:

* ℜ(S<sub>Loss</sub>) is the active power loss.
* ℑ(S<sub>Loss</sub>) is the reactive power loss.


---

# 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/phasor-domain-with-ephasorsim/integrate-a-power-system-model-to-ephasorsim/native-library-components/line-components.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.
