# 峰值電流模式調變器 (`pcmModulator`)

> 每個時脈導通開關，當感測電流加上斜坡達到控制電壓時關斷。

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

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

**分類:** 積體電路 · **種類:** `{"definition":"pcmModulator","kind":"subsystem"}`

## 何時使用

用於電流模式控制器的架構階段：在電晶體層級之前，搭配真實功率級決定頻率、斜率補償、遮蔽時間與電流限制。要模擬實際零件時改用 PWM 控制器（UC384x 類）或其他控制器 IC。

## 接腳

| 接腳 | 訊號域 | 意義 |
|---|---|---|
| `VC` | 電氣 | 控制電壓，來自誤差放大器 |
| `ISNS` | 電氣 | 以電壓 Ri·i 表示的感測電流 |
| `EN` | 訊號 | 致能訊號，高準位才切換 |
| `GATE` | 訊號 | 開關命令，0 或 1 |
| `GND` | 電氣 | VC 與 ISNS 的參考點 |

## 常用參數

- `fsw`: Clock frequency: the switch turns on at each clock edge (預設值: 500000)
- `se`: Slope of the compensation ramp added to ISNS (0 = none). Stable at any duty when se is at least half the sensed down-slope (U-97); the boundary is mc·D' = 0.5, mc = 1 + se/Sn (Ridley 1991). Valley mode: stable when se > (sE − sD)/2, half the sensed up-slope minus the down-slope (Tiwary & Rincon-Mora 2026, Eq. 22) (預設值: 0)
- `dmax`: Maximum duty: the switch is forced off after this fraction of the period (預設值: 0.9)
- `tBlank`: Leading-edge blanking after the clock: the minimum on-time in peak mode, the minimum off-time in valley mode (預設值: 0.00000005)
- `vcMax`: Clamp of the control voltage: the cycle-by-cycle current limit, in volts at ISNS (預設值: 2.5)

## 參數

| 鍵 | 單位 | 預設值 | 典型範圍 | 說明 | 規格書來源 |
|---|---|---|---|---|---|
| `fsw` | Hz | 500000 | 1k – 100meg Hz | Clock frequency: the switch turns on at each clock edge | typical, user must set |
| `se` | V/s | 0 | 0 – 1t V/s | Slope of the compensation ramp added to ISNS (0 = none). Stable at any duty when se is at least half the sensed down-slope (U-97); the boundary is mc·D' = 0.5, mc = 1 + se/Sn (Ridley 1991). Valley mode: stable when se > (sE − sD)/2, half the sensed up-slope minus the down-slope (Tiwary & Rincon-Mora 2026, Eq. 22) | typical, user must set |
| `dmax` | — | 0.9 | 50m – 999m | Maximum duty: the switch is forced off after this fraction of the period | typical, user must set |
| `tBlank` | s | 0.00000005 | 100p – 1m s | Leading-edge blanking after the clock: the minimum on-time in peak mode, the minimum off-time in valley mode | typical, user must set |
| `vcMax` | V | 2.5 | 10m – 100 V | Clamp of the control voltage: the cycle-by-cycle current limit, in volts at ISNS | typical, user must set |
| `valley` | — | 0 | 0 – 1 | 0 = peak current mode; 1 = valley current mode: the clock turns the switch off, it turns on when ISNS minus the ramp falls to VC, tBlank is the minimum off-time and dmax does not apply | typical, user must set |

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

## 模型

頻率 fsw 的時脈使開關導通，並在週期的 dmax 之後強制關斷。遮蔽時間 tBlank 之後，當 V(ISNS) 加上自時脈起以 se 上升的斜坡超過 V(VC)（限制在 0 到 vcMax，即逐週期電流限制）時，開關關斷。Ridley（IEEE TPEL 1991）給出 fsw/2 的取樣雙極點，Qp = 1/(π·(mc·D' − 0.5))，mc = 1 + Se/Sn：沒有斜坡時，D 超過 0.5 電流迴路會以半個時脈頻率振盪；斜坡為感測下降斜率的一半時，任何責任比都穩定（Unitrode U-97）。穩態時平均感測電流為 V(VC) − Se·D·Ts − Sn·D·Ts/2（Erickson 與 Maksimovic 第 12 章）。

## 常見錯誤

- 預設值是典型值，使用者必須自行設定。它們是架構方塊的設計值，不是某個零件的規格書數值：請依你的設計設定 fsw、se 與 vcMax。
- 責任比超過 0.5 時電流迴路需要斜率補償。se 為零時電感電流會逐週期交替；請把 se 設為至少感測下降斜率的一半，降壓轉換器為 Ri·Vout/L 的一半。
- 比較器晚一個求解步長才動作，所以峰值會超出斜率乘以步長。最大步長請保持在 1/(200·fsw) 左右或更小。

Problems 規則: `step.too_large`, `ground.missing`

## 規格書與來源

這是架構方塊，數值來自你的設計，不是規格書。fsw 是切換頻率，se 是 ISNS 處以伏特每秒表示的斜坡斜率，dmax 是最大責任比，tBlank 是前緣遮蔽（也是最短導通時間），vcMax 是以 ISNS 電壓表示的電流限制。之後模擬實際控制器時，請取其電氣特性表中振盪器、斜坡與電流限制的數值。

## 範例

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

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