# 電感 (`inductor`)

> 把能量儲存在電流中。可加入繞組電阻、鐵損與飽和。

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

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

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

## 何時使用

用於濾波器、降壓與升壓級和儲能。兩個繞組時，請用耦合電感或變壓器。

## 接腳

| 接腳 | 訊號域 | 意義 |
|---|---|---|
| `p` | 電氣 | 一端；正電流由 p 流向 n |
| `n` | 電氣 | 另一端 |

## 常用參數

- `l`: Inductance (預設值: 必填)
- `i0`: Initial current; the current through it at the start (預設值: 0)
- `dcr`: Winding resistance; the wire resistance of the winding (預設值: 0)
- `isat`: Current where the core starts to saturate (預設值: 選填（預設關閉）)

## 參數

| 鍵 | 單位 | 預設值 | 典型範圍 | 說明 |
|---|---|---|---|---|
| `l` | H | 必填 |  | Inductance |
| `i0` | A | 0 |  | Initial current; the current through it at the start |
| `dcr` | Ω | 0 | 1m – 500m Ω | Winding resistance; the wire resistance of the winding |
| `isat` | A | 選填（預設關閉） | 100m – 200 A | Current where the core starts to saturate |
| `lsat` | H | 選填（預設關閉） | 100n – 1m H | Inductance once the core is saturated |
| `isatTemp` | — | 選填（預設關閉） |  | Temperature (°C) and factor pairs that scale isat at coreTemp, from the datasheet's curve |
| `rcore` | Ω | 選填（預設關閉） | 1k – 1meg Ω | Resistance that models core loss |
| `core` | — | 選填（預設關閉） |  | Core from the catalogue; it sets the inductance curve and the core loss |
| `material` | — | 選填（預設關閉） |  | Core material; needed when core names a shape |
| `turns` | — | 選填（預設關閉） |  | Turns on the core |
| `gap` | m | 選填（預設關閉） |  | Air gap in the core; unset uses the catalogue core's gap |
| `fsw` | Hz | 選填（預設關閉） |  | Switching frequency; core and winding losses are worked out once per period |
| `coreTemp` | °C | 25 |  | Core and winding temperature |
| `wire` | — | 選填（預設關閉） |  | Wire from the catalogue; gives the winding's extra resistance at high frequency |
| `layers` | — | 1 |  | Winding layers; used for the extra resistance at high frequency |
| `coreAe` | m² | 選填（預設關閉） |  | Effective area of a core you describe yourself; use with coreLe instead of core |
| `coreLe` | m | 選填（預設關閉） |  | Magnetic path length of a core you describe yourself; use with coreAe |
| `coreVe` | m³ | 選填（預設關閉） |  | Volume of that core for its core loss; coreAe times coreLe when unset |
| `bhCurve` | — | 選填（預設關閉） |  | B-H curve of the core; pairs H:B in A/m and T, such as 0:0, 50:0.3, 200:0.45; replaces the material's curve |
| `psiCurve` | — | 選填（預設關閉） |  | Flux linkage of the winding against its current from a field solve; pairs i:λ in A and Wb, such as 0:0, 1:2e-3, 4:5e-3 (odd about zero current), or from a negative current through 0 for a magnet-biased winding, such as -4:-1e-3, 0:2e-3, 4:4e-3; replaces the core's curve |
| `steinmetzK` | W/m³ | 選填（預設關閉） |  | Steinmetz k of the core loss k·f^α·B^β, with f in Hz and B the peak flux density in T |
| `steinmetzAlpha` | — | 選填（預設關閉） |  | Steinmetz α, the frequency exponent of the core loss |
| `steinmetzBeta` | — | 選填（預設關閉） |  | Steinmetz β, the flux-density exponent of the core loss |
| `magneticsDesign` | — | 選填（預設關閉） |  | Saved design from magnetics.design; the separate core parameters win over it |
| `surface` | m² | 選填（預設關閉） |  | Outside surface of the wound part to the air; design.thermal gives its temperature rise from it and the loss |
| `part` | — | 選填（預設關閉） |  | Part number; the catalogue part number, such as XAL8080-123MEC or 2 × XAL8080-123MEC for two in series; information only, not simulated |

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

**適用於:** 降壓與升壓電感 · LC 濾波器 · PFC 扼流圈

**不適用於:** 兩個耦合繞組 → [`coupledInductor`](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/magnetics/coupledInductor/) · 以匝數比隔離 → [`transformer`](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/magnetics/transformer/)

## 公式

| 公式 | 方程式 | 出處 |
|---|---|---|
| 漣波電流（峰對峰） | Δi = vl·ton / l | Erickson & Maksimović, Fundamentals of Power Electronics, 3rd ed. (2020), §2.2 |
| 峰值時的儲存能量 | E = ½·l·(idc + Δi/2)² | Mohan, Undeland & Robbins, Power Electronics, 3rd ed. (2003), ch. 3 |
| 飽和裕度 | isat − (idc + Δi/2) | Erickson & Maksimović, Fundamentals of Power Electronics, 3rd ed. (2020), ch. 11 (inductor design, peak current) |

## 快速驗算

輸入:

- `l`: 電感 = 100u H, `l`
- `vl`: 導通期間兩端電壓 = 36 V
- `ton`: 導通時間 = 2.5u s
- `idc`: 直流電流 = 5 A
- `isat`: 飽和電流 = 8 A, `isat`

輸出:

- `di`: 漣波電流（峰對峰） = `vl*ton/l` A
- `energy`: 峰值時的儲存能量 = `0.5*l*(idc + di/2)^2` J
- `margin`: 飽和裕度 = `isat - (idc + di/2)` A

## 模型邏輯

- 每一步它是一個電導並聯電流源（梯形法，切換事件後的那一步用後向尤拉法），從電流 i0 開始。
- dcr 是串聯電阻，rcore 是跨在電感上的電阻；設為零或未設定時就不加入。
- 設定 isat 時，每一步依上一個接受步的電流選用 l 或 lsat（未設定時為 0.2·l）：硬性的兩段斜率轉折，不做疊代。
- 設定 core，或 coreAe 與 coreLe 時，磁芯曲線取代 isat 與 lsat，其鐵損取代 rcore，並發出警告。

## 模型

電壓為 v = L * di/dt，起始電流為 i0（p 到 n）。dcr 是串聯電阻，rcore 是跨在電感上的電阻，用來表示鐵損。設定 isat 後，電流大小低於 isat 時電感為 l，超過後為 lsat（lsat 未設定時為 0.2 * l），電流取自前一個已接受的步。飽和是兩段式折點，不是實測的 B-H 曲線。

## 常見錯誤

- 只接電感的電流源會讓該節點沒有電阻路徑。請在電流源旁並聯一個大電阻。
- 電感單位是亨利，所以 100 是 100 H，不是 100u。isat 設得低於峰值電流應是刻意的，因為超過後漣波會急遽變大。
- 電感電流降到零時，轉換器會進入不連續導通模式。模擬器會告訴你電感實際跑在哪一種模式。

Problems 規則: `param.non_positive`, `cutset.inductor_current`, `param.out_of_range`, `inductor.mode`

## 規格書與來源

l 取額定直流電流下的電感值，dcr 取最大直流電阻，isat 取電感下降到所列百分比時的電流。lsat 取曲線在高電流處的電感，rcore 是單一頻率的鐵損估計值。

## 範例

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

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