斜坡 (ramp)
在閘極導通期間上升的斜坡(斜率補償),或在每個時脈邊緣重新開始的斜坡(與時脈同步的鋸齒波)。
分類: 控制 · 種類: {"block":"ramp","kind":"control"}
何時使用
gate 模式用於峰值電流模式轉換器的斜率補償:輸入接開關閘極,輸出加到感測電流上。saw 模式用於跟隨外部時脈的載波。固定頻率的自由振盪載波請用 carrier。
接腳
| 接腳 | 訊號域 | 意義 |
|---|---|---|
in |
訊號 | gate 模式的閘極輸入;大於 0.5 時斜坡上升。 |
clk |
訊號 | saw 模式的時脈輸入;每個穿越 0.5 的上升緣讓斜坡從 0 重新開始。 |
out |
訊號 | 斜坡輸出。 |
常用參數
mode: Ramp mode:gate(out = se·(t − t_rise) while in is high and 0 while it is low) orsaw(from 0 at each rising edge of clk, reaching vh after 1/f) (預設值: gate)se: Slope of the gate-mode ramp (output units per second) (預設值: 1)f: Saw mode: the ramp rises at vh·f, so it reaches vh after 1/f (needed in saw mode) (預設值: 選填(預設關閉))vh: Upper limit of the output; the peak in saw mode (needed there), no limit in gate mode while unset (預設值: 選填(預設關閉))
參數
| 鍵 | 單位 | 預設值 | 典型範圍 | 說明 |
|---|---|---|---|---|
mode |
— | gate | Ramp mode: gate (out = se·(t − t_rise) while in is high and 0 while it is low) or saw (from 0 at each rising edge of clk, reaching vh after 1/f) |
|
se |
1/s | 1 | Slope of the gate-mode ramp (output units per second) | |
f |
Hz | 選填(預設關閉) | Saw mode: the ramp rises at vh·f, so it reaches vh after 1/f (needed in saw mode) | |
vh |
— | 選填(預設關閉) | Upper limit of the output; the peak in saw mode (needed there), no limit in gate mode while unset |
參數說明在兩種語言中都是英文。
模型
gate 模式中,in 大於 0.5 時輸出為 se*(t - t_rise),t_rise 為其上升的那一步;為低時輸出 0;設定 vh 時輸出受其限制。saw 模式中,輸出在 t = 0 與 clk 每個上升緣從 0 開始,以 vh*f 上升(經 1/f 到達 vh),之後保持在 vh 直到下一個邊緣。斜坡在每個求解步計算;邊緣來自輸入,所以由 pwm 產生的閘極會有精確的邊緣時刻。此方塊沒有直接饋通(上升緣時無論讀到什麼輸出都是 0),所以像峰值電流模式那樣由鎖存器控制自身斜坡的迴路可以經由它閉合:在這種迴路中它讀取前一步的值,只讓下降緣的歸零延後一步。
常見錯誤
- 斜率
se的單位為每秒的輸出單位。斜率補償時即感測電流的斜率(V/s,電流斜率乘以感測增益);只填幾伏的值會小一百萬倍。至少為電感下降斜率的一半,才能在責任比超過 50 % 時抑制次諧波振盪。 saw模式需要f與vh;缺少其一時模擬會停止並指出方塊名稱。未接時脈時,鋸齒波只從 t = 0 上升一次,之後保持在vh。
規格書與來源
斜率補償的斜率取自控制器規格書(內部斜坡振幅除以切換週期),或以 Buck 的 Se >= Rsense*Vout/(2L) 計算。saw 模式的 f 為標稱切換頻率。
範例
以指令 file.openExample 開啟範例,名稱為 demo:ramp.
由 cargo xtask reference 依使用說明文字與參數規格產生,請勿手動編輯。