# LED 燈串 (`ledString`)

> 由串聯 LED 組成、可再並聯成多串的燈串，作為 LED 驅動器的負載。

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

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

**分類:** 開關元件 · **種類:** `{"kind":"ledString"}`

## 何時使用

用來當定電流降壓、升壓或返馳式 LED 驅動器的負載，觀察 LED 電流、漣波與燈串電壓。單顆指示燈用的 LED 用設定了 vf 的二極體就夠了。

## 接腳

| 接腳 | 訊號域 | 意義 |
|---|---|---|
| `a` | 電氣 | 燈串的陽極；電流由 a 流向 k |
| `k` | 電氣 | 燈串的陰極 |

## 常用參數

- `ns`: LEDs in series in each string (預設值: 1)
- `np`: Strings in parallel (預設值: 1)
- `vth`: Threshold of one LED; its fit's forward voltage at zero current (預設值: 必填)
- `rd`: Dynamic resistance of one LED; the slope of its fit (預設值: 必填)
- `tcVf`: Temperature coefficient of one LED's forward voltage (預設值: 0)

## 參數

| 鍵 | 單位 | 預設值 | 典型範圍 | 說明 |
|---|---|---|---|---|
| `ns` | — | 1 |  | LEDs in series in each string |
| `np` | — | 1 |  | Strings in parallel |
| `vth` | V | 必填 |  | Threshold of one LED; its fit's forward voltage at zero current |
| `rd` | Ω | 必填 |  | Dynamic resistance of one LED; the slope of its fit |
| `tcVf` | V/K | 0 |  | Temperature coefficient of one LED's forward voltage |
| `tj` | °C | 25 |  | LED junction temperature |
| `tref` | °C | 25 |  | Junction temperature the fit belongs to |
| `imax` | A | 選填（預設關閉） |  | Largest current of one LED; a peak above it raises a warning |
| `thermal` | — | 選填（預設關閉） |  | Thermal net of its junction; takes its heat and sets its temperature in place of tj |
| `wpe` | — | 0 |  | Light out per power in (wall-plug efficiency); this share does not heat the junction |

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

**適用於:** LED 驅動器負載 · 背光 · 燈具

**不適用於:** 單顆指示燈 LED → [`diode`](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/switches/diode/)

## 公式

| 公式 | 方程式 | 出處 |
|---|---|---|
| 燈串電壓 | V = ns·(vth + rd·I) | Sedra & Smith, Microelectronic Circuits, 7th ed. (2015), §4.3 (diode forward characteristic models) and §4.7 (light-emitting diodes) |
| 串聯電阻 | R = (Vs − V)/I | Sedra & Smith, Microelectronic Circuits, 7th ed. (2015), §4.7 (light-emitting diodes) |
| 電阻功耗 | P = (Vs − V)·I | Sedra & Smith, Microelectronic Circuits, 7th ed. (2015), §4.7 |

## 快速驗算

輸入:

- `ns`: 串聯 LED 數 = 10 —, `ns`
- `vth`: 單顆 LED 臨界電壓 = 2.7 V, `vth`
- `rd`: 單顆 LED 動態電阻 = 600m Ω, `rd`
- `iled`: 單串電流 = 100m A
- `vs`: 供電電壓 = 36 V

輸出:

- `vstring`: 燈串電壓 = `ns*(vth + rd*iled)` V
- `rser`: 串聯電阻 = `(vs - vstring)/iled` Ω
- `pres`: 電阻功耗 = `(vs - vstring)*iled` W

## 模型邏輯

- 整個陣列是一個分段線性二極體：在 ns·vth（再加上 ns·tcVf·(tj - tref)）以上導通，之後斜率電阻為 ns·rd/np。
- 低於臨界電壓時以固定的 100 Mohm 阻斷，極低電流下的轉折區沒有模擬。
- vth 與 rd 沒有預設值，必須設定；tcVf 預設為 0，所以電壓不隨 tj 改變。
- 設定 thermal 後，扣除 wpe 比例的功率會加熱該熱網路，其溫度取代 tj；單顆 LED 電流超過 imax 時會發出警告。

## 模型

每顆 LED 是一條穿過其順向曲線的直線：vf = vth + rd·i + tcVf·(tj − tref)。整個陣列是 ns 顆串聯、np 串並聯，所以電壓高於 ns·vth 時導通，斜率為 ns·rd/np，低於時截止。模擬時當作分段線性二極體。極低電流處的轉折沒有建模。thermal 指定熱網路時，燈串的功率扣掉發出的光（wpe）會加熱該熱網路，臨界電壓改跟隨該網路的溫度而不用 tj；未指定時 tj 是固定值。單顆 LED 的電流超過 imax 時會出現警告。

## 常見錯誤

- 燈串直接接在電壓源上時，沒有東西決定電流。請用電流控制的轉換器驅動，或串聯一個電阻。
- 擬合直線只在取點的電流範圍內成立。類比調光到遠低於該範圍時，請改用低電流處讀取的點。

## 規格書與來源

在規格書典型的順向電壓對順向電流曲線上，於工作範圍內讀兩個點，例如額定電流的一半與全額。rd 是電壓差除以電流差，vth 是第一點的電壓減去 rd 乘以第一點的電流。tcVf 取自相對順向電壓對接面溫度的曲線（為負值）。tref 是順向曲線的溫度，通常為 25 °C 或 85 °C。imax 是最大直流順向電流。wpe 是工作點的輻射通量除以電功率（電光轉換效率）；保持 0 表示全部功率都算成熱，偏向安全。沒有預設值：請填入你所用 LED 的數值。

## 範例

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

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