# π 型線路 (`piLine`)

> 以串聯 R-L 加上兩端各一半並聯電容表示的輸電線路，由每公尺參數與長度算出，可分成一段或多段串接的 π 型段。

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

[元件參考](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/) · [English](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/passive/piLine/)

**分類:** 被動元件 · **種類:** `{"kind":"piLine"}`

## 何時使用

用於電源與負載之間的架空線或電纜：長線路開路端的電壓上升、負載下的線路壓降，或電纜與電網的諧振。平衡三相系統請用三相 π 型線路。

## 接腳

| 接腳 | 訊號域 | 意義 |
|---|---|---|
| `p1` | 電氣 | 線路送電端 |
| `p2` | 電氣 | 線路受電端 |
| `g` | 電氣 | 並聯電容的回路：接地或回流導體 |

## 常用參數

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

## 參數

| 鍵 | 單位 | 預設值 | 典型範圍 | 說明 |
|---|---|---|---|---|
| `r` | Ω/m | 必填 |  | Series resistance per metre of line (per phase for the three-phase line) |
| `l` | H/m | 必填 |  | Series inductance per metre of line (per phase, positive sequence) |
| `c` | F/m | 必填 |  | 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 | 必填 |  | 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 |

_參數說明在兩種語言中都是英文。_

**適用於:** 電纜與架空線 · 直流電纜 · 饋線與微電網連結

**不適用於:** 快速邊緣與電纜反射 → [`tline`](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/passive/tline/)

## 公式

| 公式 | 方程式 | 出處 |
|---|---|---|
| 特性阻抗 | Z0 = √(L/C) | Pozar, Microwave Engineering, 4th ed. (2012), §2.1 (lossless line) |
| 單向延遲 | td = length·√(L·C) | Pozar, Microwave Engineering, 4th ed. (2012), §2.1 (phase velocity 1/√(L·C)) |
| 總串聯電阻 | R = r·length | Grainger & Stevenson, Power System Analysis (1994), ch. 5 (nominal π circuit) |

## 快速驗算

輸入:

- `r`: 每公尺電阻 = 100u Ω/m, `r`
- `l`: 每公尺電感 = 1.2u H/m, `l`
- `c`: 每公尺電容 = 10p F/m, `c`
- `length`: 長度 = 100k m, `length`
- `sections`: π 區段數 = 3 —, `sections`

輸出:

- `z0`: 特性阻抗 = `sqrt(l/c)` Ω
- `td`: 單向延遲 = `length*sqrt(l*c)` s
- `rtot`: 總串聯電阻 = `r*length` Ω
- `fmax`: 區段能跟上的最高頻率 = `sections/(5*2*pi*td)` Hz

## 模型邏輯

- 線路被切成長度為 length / sections 公尺的相同區段，每段是其長度的串聯 r 與 l。
- 每一段並聯 c（與 g）的一半放在兩端到 g；兩段相接處兩個一半相加。
- 一段就是標稱 π 電路；n 段的無損線在 omega * length * sqrt(l * c) 低於約 n / 5 時，輸入阻抗吻合。
- 元件名稱為 r1、l1、c0 等，內部節點 line:1、line:2 等可以畫出。

## 模型

模擬前，線路會變成電阻、電感與電容。線路切成等長的段，每段長 length/sections 公尺。每一段是該長度的串聯電阻 r 與電感 l，兩端各有一半的並聯電容 c（與電導 g）接到 g；兩段相接處的兩個一半相加。一段就是短程或中程線路的標稱 π 型模型。段數越多，越貼近分佈參數線路：n 段的無損線路，在 ω·length·√(l·c) 約小於 n/5 時，輸入阻抗與分佈參數線路相符。元件名為 r1、l1、c0 等，內部節點 line:1、line:2 等可以繪圖。

## 常見錯誤

- 參數是每公尺的值。線路規格書通常給每公里的值，而且是 50 或 60 Hz 下的電抗與電納：請除以 1000，再把 x 除以 2πf 得到 l、把 b 除以 2πf 得到 c。
- 段數太少時會在錯誤的頻率振盪。開關事件或諧波的頻率高到一段不再遠短於波長時，看到的是各段的諧振而不是線路的諧振：請增加段數，直到結果不再改變。
- 無損線路（r 與 g 為 0）沒有阻尼：在端點加步階會一直振盪。請給 r 實際的值。

Problems 規則: `pin.unconnected`

## 規格書與來源

r、l 與 c 取自線路或電纜的規格書或線路常數計算：工作溫度下每單位長度的交流電阻，以及每單位長度的正序電感與電容。length 是路徑長度。

## 範例

以指令 `file.openExample` 開啟範例，名稱為 `demo:piLine`.

---
由 `cargo xtask reference` 依使用說明文字與參數規格產生，請勿手動編輯。
