# 電氣恆功率負載 (`powerLoad`)

> 在任何電壓下都消耗相同功率的負載，就像穩壓轉換器或定功率模式的電子負載。

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

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

**分類:** 電源 · **種類:** `{"kind":"powerLoad"}`

## 何時使用

用來代表下游轉換器的輸入、從直流匯流排看進去的馬達驅動器，或脈衝負載。它的負增量電阻正是轉換器前級濾波器振盪的原因，所以測試輸入濾波器穩定度時要用它。負載隨電壓變化時，請用電阻。

## 接腳

| 接腳 | 訊號域 | 意義 |
|---|---|---|
| `p` | 電氣 | 正端；負載電流由此流入 |
| `n` | 電氣 | 負端 |
| `pref` | 訊號 | 可選的功率設定訊號，單位為瓦，用於隨控制變化的負載；優先於 profile 與 p |

## 常用參數

- `p`: Power it draws; the pref input, when connected, sets it instead (預設值: 100)
- `profile`: Power over time: pwl(t p …), steps(p0 t p …), pulse(p1 p2 delay rise fall width period), workload(pidle ppeak period duty edge [pexc texc]) or vrstep(p0 p1 delay slew/µs [width period]); replaces p (預設值: 選填（預設關閉）)
- `von`: Undervoltage lockout: it turns on when the voltage reaches von; 0 means always on (預設值: 0)
- `voff`: Undervoltage lockout: it turns off when the voltage falls below voff; 0 means never (預設值: 0)

## 參數

| 鍵 | 單位 | 預設值 | 典型範圍 | 說明 |
|---|---|---|---|---|
| `p` | W | 100 |  | Power it draws; the pref input, when connected, sets it instead |
| `vmin` | V | 1 |  | Below this voltage it is a resistor that draws p at vmin, so it stays defined near 0 V |
| `von` | V | 0 |  | Undervoltage lockout: it turns on when the voltage reaches von; 0 means always on |
| `voff` | V | 0 |  | Undervoltage lockout: it turns off when the voltage falls below voff; 0 means never |
| `profile` | — | 選填（預設關閉） |  | Power over time: pwl(t p …), steps(p0 t p …), pulse(p1 p2 delay rise fall width period), workload(pidle ppeak period duty edge [pexc texc]) or vrstep(p0 p1 delay slew/µs [width period]); replaces p |
| `repeat` | — | 0 |  | Set to 1 to repeat the profile pattern over and over |

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

**適用於:** 下游轉換器的輸入 · 輸入濾波器穩定度測試 · 脈衝負載

**不適用於:** 隨電壓變化的負載 → [`resistor`](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/passive/resistor/)

## 公式

| 公式 | 方程式 | 出處 |
|---|---|---|
| 負載電流 | i = P/v | Erickson & Maksimovic, Fundamentals of Power Electronics, 3rd ed. (2020), ch. 10 (input filter design) |
| 增量電阻 | dv/di = −v²/P | Middlebrook, Input filter considerations in design and application of switching regulators, IEEE IAS Annual Meeting (1976), pp. 366-382 |
| 濾波器穩定裕度 | margin = (v²/P)/Z0, below 1 it rings | Middlebrook, Input filter considerations in design and application of switching regulators, IEEE IAS Annual Meeting (1976), pp. 366-382 |
| vmin 以下的等效電阻 | R = vmin²/P | Hayt, Kemmerly & Durbin, Engineering Circuit Analysis, 8th ed. (2012), ch. 2 (power in a resistor) |

## 快速驗算

輸入:

- `p`: 消耗的功率 = 100 W, `p`
- `v`: 端點電壓 = 48 V
- `vmin`: 低於此電壓時變成電阻 = 1 V, `vmin`
- `zo`: 前級濾波器的特性阻抗 = 500m Ω

輸出:

- `i`: 負載電流 = `p/v` A
- `rinc`: 增量電阻 = `-v^2/p` Ω
- `margin`: 濾波器穩定裕度 = `(v^2/p)/zo` —
- `rlow`: vmin 以下的等效電阻 = `vmin^2/p` Ω

## 模型邏輯

- 電壓高於 vmin 時電流為 i = P / v，所以不論電壓多少功率都是 P；低於 vmin 時是電阻 vmin² / P。
- P 在接上 pref 時取該訊號，否則取該時間步的 profile，再否則取 p；負的設定值不消耗功率。
- 設定 von 時負載一開始是關閉的，電壓達到 von 才開啟；設定 voff 時，低於 voff 就關閉。
- 鎖定條件在每個被接受的步檢查一次，負載以牛頓法求解。

## 模型

電壓高於 vmin 時電流 i = P / v，所以不論電壓多少，功率都是 P。低於 vmin 時它是電阻 vmin² / P，所以 0 V 時仍有定義，且在 vmin 時消耗 P。接上 pref 時 P 是 pref 訊號的值；否則設定了 profile 時是該步階時刻的 profile 值；兩者都沒有時是參數 p。設定值為負時不消耗功率。profile 可寫成 pwl(t1 p1 t2 p2 依此類推)，在各點之間以直線連接；steps(p0 t1 p1 t2 p2 依此類推)，從各時刻起維持該功率；或 pulse(p1 p2 delay rise fall width period)，代表脈衝負載。repeat 設為 1 時，pwl 或 steps 圖形在最後時刻之後重新開始。快速求解器會在 profile 的每個轉折點落一個步階。設定 von 時，負載一開始是關閉的（只有 1 GΩ 的漏電），電壓到達 von 才開啟。設定 voff 時，電壓低於 voff 會再次關閉，直到電壓回到 von 才開啟。鎖定狀態在每個被接受的步階檢查一次。負載和保護元件一樣以牛頓法求解。

## 常見錯誤

- 沒有欠壓鎖定時，定功率負載會在電源從 0 V 上升的過程中抽很大的電流。請把 von 與 voff 設成它所代表的轉換器的門檻，或提高 vmin。
- 經 LC 濾波器供電的定功率負載，在濾波器特性阻抗高於 v² / P 時會振盪。這是真實的不穩定，不是求解器的問題；請為濾波器加阻尼。
- voff 不可高於 von。兩者之間請保留幾伏特，避免負載在門檻附近反覆開關。

## 規格書與來源

p 是負載消耗的功率：它所代表的轉換器的輸出功率除以該轉換器的效率。von 與 voff 是該轉換器規格書上的 UVLO 開啟與關閉門檻。預設值不是取自任何元件：100 W、vmin 1 V、沒有欠壓鎖定。

## 範例

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

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