# Pi-Section Line (`piLine`)

> A transmission line as series R-L with half its shunt capacitance at each end, from per-metre values and a length, in one or more pi sections in cascade.

![piLine](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/img/piLine.svg)

[Component reference](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/) · [繁體中文](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/passive/piLine/)

**Group:** Passive · **Kind:** `{"kind":"piLine"}`

## When to use it

Use it for an overhead line or a cable between a source and a load: the voltage rise at the open end of a long line, the line drop under load, or the resonance of a cable with the grid. For one phase of a balanced three-phase system use Three-Phase Pi-Section Line.

## Pins

| Pin | Domain | Meaning |
|---|---|---|
| `p1` | electrical | Sending end of the line |
| `p2` | electrical | Receiving end of the line |
| `g` | electrical | Return of the shunt capacitance: ground or the return conductor |

## Common parameters

- `r`: Series resistance per metre of line (per phase for the three-phase line) (Default: required)
- `l`: Series inductance per metre of line (per phase, positive sequence) (Default: required)
- `c`: Shunt capacitance per metre of line (per phase, positive sequence) (Default: required)
- `length`: Length of the line (Default: required)
- `sections`: Pi sections in cascade, 1 to 1000; more follow the distributed line to higher frequencies (Default: 1)

## Parameters

| Key | Unit | Default | Typical range | Description |
|---|---|---|---|---|
| `r` | Ω/m | required |  | Series resistance per metre of line (per phase for the three-phase line) |
| `l` | H/m | required |  | Series inductance per metre of line (per phase, positive sequence) |
| `c` | F/m | required |  | Shunt capacitance per metre of line (per phase, positive sequence) |
| `g` | S/m | 0 |  | Shunt conductance per metre of line; 0 for none |
| `length` | m | required |  | Length of the line |
| `sections` | — | 1 |  | Pi sections in cascade, 1 to 1000; more follow the distributed line to higher frequencies |
| `v0` | V | 0 |  | Voltage of the line against `g` at the start, on every shunt capacitance: a line that starts charged |

_Parameter descriptions are in English in both languages._

**Use for:** Cables and overhead lines · DC cables · Feeders and microgrid links

**Not for:** Fast edges and cable reflections → [`tline`](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/passive/tline/)

## Formulas

| Formula | Equation | Source |
|---|---|---|
| Characteristic impedance | Z0 = √(L/C) | Pozar, Microwave Engineering, 4th ed. (2012), §2.1 (lossless line) |
| One-way delay | td = length·√(L·C) | Pozar, Microwave Engineering, 4th ed. (2012), §2.1 (phase velocity 1/√(L·C)) |
| Total series resistance | R = r·length | Grainger & Stevenson, Power System Analysis (1994), ch. 5 (nominal π circuit) |

## Quick check

Inputs:

- `r`: Resistance per metre = 100u Ω/m, `r`
- `l`: Inductance per metre = 1.2u H/m, `l`
- `c`: Capacitance per metre = 10p F/m, `c`
- `length`: Length = 100k m, `length`
- `sections`: Pi sections = 3 —, `sections`

Outputs:

- `z0`: Characteristic impedance = `sqrt(l/c)` Ω
- `td`: One-way delay = `length*sqrt(l*c)` s
- `rtot`: Total series resistance = `r*length` Ω
- `fmax`: Highest frequency the sections follow = `sections/(5*2*pi*td)` Hz

## Model logic

- The line is cut into equal sections of length / sections metres; each is the series r and l of its length.
- Half of the shunt c (and g) of a section sits at each end to g; where two sections meet their halves add up.
- One section is the nominal pi; a lossless line of n sections matches its input impedance while omega * length * sqrt(l * c) stays below about n / 5.
- The parts are named r1, l1, c0 and so on, and the inner nodes line:1, line:2 and so on can be plotted.

## Model

Before the run the line becomes resistors, inductors and capacitors. The line is cut into equal sections of length/sections metres. Each section is the series resistance r and inductance l of its length, with half of its shunt capacitance c (and conductance g) from each end to g; where two sections meet, their halves add up. One section is the nominal pi of a short or medium line. With more sections the model follows the distributed line: a lossless line of n sections matches its input impedance while ω·length·√(l·c) stays below about n/5. The parts are named r1, l1, c0 and so on, and the inner nodes line:1, line:2 and so on can be plotted.

## Common mistakes

- The values are per metre. A line data sheet usually gives them per kilometre, and the reactance and susceptance at 50 or 60 Hz: divide by 1000, and divide x by 2πf for l and b by 2πf for c.
- Too few sections ring at the wrong frequency. A switching event or a harmonic above the frequency where a section is no longer short against the wavelength sees the resonances of the sections, not those of the line: add sections until the result stops changing.
- A lossless line (r and g at 0) has no damping: a step at its end rings for ever. Give r its real value.

Problems rules: `pin.unconnected`

## Datasheet and sources

r, l and c come from the line's or cable's data sheet or a line-constants calculation: the AC resistance per length at the operating temperature, and the positive-sequence inductance and capacitance per length. length is the route length.

## Example

Open the example with the command `file.openExample` and the name `demo:piLine`.

---
Generated by `cargo xtask reference` from the usage texts and parameter specs. Do not edit by hand.
