---
title: Current-programmed control
heading: Peak current-mode control, the inductor-current perturbation that grows from cycle to cycle above 50% duty, slope compensation and its minimum, and the simpler single-pole plant that current control leaves for the voltage loop
eyebrow: S11 · Lesson 23 · Current-programmed control
xp: 50
---

::: hook
Most modern DC-DC controllers don't set the duty cycle directly. Instead each cycle the switch turns on with the clock and turns off when the inductor current reaches a level set by the voltage loop. Controlling the peak current gives free cycle-by-cycle current limiting and turns the inductor into something like a current source, which removes the LC resonance from the voltage loop. But above 50% duty a strange instability appears: a small disturbance in the inductor current grows from one cycle to the next. A small artificial ramp added to the current fixes it.
:::

::: play
- How a small perturbation in the inductor current evolves from cycle to cycle in a peak current-mode converter: multiplied by $\alpha = -\frac{m_2 - m_a}{m_1 + m_a}$ each period.
- Here the rising slope $m_1$ is normalized to 1, the falling slope is $m_2 = D/(1 - D)$ for a buck, and the compensation ramp $m_a$ is a fraction k of $m_2$.
- With k = 0 and D above 0.5, |α| > 1 and the perturbation grows, alternating in sign: subharmonic oscillation. Raising k makes it die out.
:::

```sim plot
view: graph
x: n = 0..20
y: e = -3..3
slider: D = 0.1..0.9 = 0.75
slider: k = 0..1 = 0
plot: (-(D/(1 - D))*(1 - k)/(1 + k*D/(1 - D)))^n | stems | label: perturbation after n cycles
readout: α = -(D/(1 - D))*(1 - k)/(1 + k*D/(1 - D)) | digits: 3
```

::: predict
## A boost runs at D = 0.75 from 12 V to 48 V with L = 47 µH under peak current-mode control and no slope compensation. What happens to a small current disturbance?

- [ ] It decays within a cycle
- [ ] It persists unchanged
- [x] It triples in size every cycle, alternating in sign
- [ ] It has no effect because the voltage loop corrects it

::: reveal
The rising slope is $m_1 = V_g/L$ = 0.255 A/µs and the falling slope $m_2 = (V - V_g)/L$ = 0.766 A/µs. A disturbance changes by $\alpha = -m_2/m_1$ = −3 each cycle: the inductor current alternates between long and short pulses, at half the switching frequency. Adding a ramp of slope $m_2/2$ makes α = −0.6.
:::
:::

::: nameit
## Peak current-mode control

The clock turns the switch on; a comparator turns it off when the sensed inductor current (plus a compensating ramp of slope $m_a$) reaches a control current $i_c$ from the voltage loop.

## The perturbation

If the inductor current starts a cycle off by $\hat{i}_0$, the turn-off moves and it ends the cycle off by

$$\hat{i}_1 = \alpha\,\hat{i}_0, \qquad \alpha = -\frac{m_2 - m_a}{m_1 + m_a}$$

where $m_1$ and $m_2$ are the magnitudes of the inductor current's rising and falling slopes. Without compensation α = $-m_2/m_1 = -D/D'$ in CCM (by volt-second balance), so the loop is unstable for D > 0.5.

## Slope compensation

Stability needs |α| < 1, that is $m_a > \frac{1}{2}(m_2 - m_1)$. A common choice is $m_a = m_2/2$, which makes the current loop stable at every duty cycle (α = 0 at $m_a = m_2$, the deadbeat value). Too much compensation turns the controller back toward voltage mode.

## The voltage loop's plant

With the current loop controlling the inductor current, the inductor no longer acts as an independent state at low frequency: a current-mode buck's control-to-output response is roughly a single pole at $1/2\pi RC$ (plus the ESR zero and a double pole near $f_s/2$). A type II compensator suffices. The boost's RHP zero remains.
:::

::: example
## Is current-mode control stable without compensation for the 12 V to 3.3 V buck (L = 10 µH)?

::: solution
1. **Current slopes.**
   $$\begin{aligned} m_1 &= \frac{12 - 3.3}{10\ \mu\text{H}} \\ &= 0.87\ \text{A}/\mu\text{s} \\ m_2 &= \frac{3.3}{10\ \mu\text{H}} \\ &= 0.33\ \text{A}/\mu\text{s} \end{aligned}$$
2. **Stability.**
   $$\begin{aligned} \alpha &= -m_2/m_1 \\ &= -0.38 \end{aligned}$$
   Stable, since D = 0.275 < 0.5: a perturbation shrinks by more than half each cycle.
3. **Voltage-loop plant.** It has a pole at
   $$\begin{aligned} f_p &= \frac{1}{2\pi \times 1.65\ \Omega \times 22\ \mu\text{F}} \\ &= 4.4\ \text{kHz} \end{aligned}$$

**Answer:** yes: α = −0.38, so it's stable without compensation, and its voltage-loop plant has a pole at 4.4 kHz.
:::
:::

::: example
## What compensation does the boost need?

::: solution
1. **Minimum compensation.**
   $$\begin{aligned} m_a &= \frac{m_2 - m_1}{2} \\ &= \frac{0.766 - 0.255}{2} \\ &= 0.255\ \text{A}/\mu\text{s} \end{aligned}$$
   which just reaches |α| = 1.
2. **With $m_a = m_2/2$.** That's 0.383 A/µs, so
   $$\begin{aligned} \alpha &= -\frac{0.766 - 0.383}{0.255 + 0.383} \\ &= -0.6 \end{aligned}$$
3. **How fast a disturbance dies.** In ten cycles it falls to
   $$0.6^{10} = 0.6\%$$
   of itself.

**Answer:** it needs at least 0.255 A/µs of compensating ramp; using $m_2/2$ = 0.383 A/µs gives α = −0.6.
:::
:::

::: example
## A current-mode buck converts 12 V to 7.2 V with L = 6.8 µH. Is it stable without slope compensation, and what does $m_a = m_2/2$ give?

::: solution
1. **Duty cycle.**
   $$\begin{aligned} D &= 7.2/12 \\ &= 0.6 \end{aligned}$$
2. **Current slopes.**
   $$\begin{aligned} m_1 &= \frac{12 - 7.2}{6.8} \\ &= 0.706\ \text{A}/\mu\text{s} \\ m_2 &= \frac{7.2}{6.8} \\ &= 1.059\ \text{A}/\mu\text{s} \end{aligned}$$
3. **Without compensation.**
   $$\begin{aligned} \alpha &= -\frac{1.059}{0.706} \\ &= -1.5 \end{aligned}$$
   Each cycle's error grows by half, and the loop oscillates at half the switching frequency.
4. **With $m_a = m_2/2$.**
   $$\begin{aligned} \alpha &= -\frac{1.059 - 0.529}{0.706 + 0.529} \\ &= -0.43 \end{aligned}$$
   decaying quickly.

**Answer:** without compensation α = −1.5 and the loop oscillates at half the switching frequency; $m_a = m_2/2$ brings α to −0.43.
:::
:::

::: check
given: g = 5 | 12 | 48; V = 1.2 | 3.3; L = 2.2 | 10 | 47
answer: (g - V)/(L*1e-6)/1e6
unit: A/µs
tolerance: 0.5%

## A buck from {g} V to {V} V has L = {L} µH. What's its inductor current's rising slope?

::: right
Right. $(V_g - V)/L$ = {answer} A/µs.
:::

::: misses
- [V/(L*1e-6)/1e6] That's the falling slope, $V/L$.
- [any] Not yet. $di/dt = v_L/L$ during the on-time.
:::
:::

::: check
given: D = 0.3 | 0.6 | 0.75 | 0.85
answer: -D/(1 - D)
tolerance: 0.5%

## A converter under peak current-mode control without slope compensation runs at D = {D}. What's α?

::: right
Right. $-m_2/m_1 = -D/D'$ = {answer}: stable only if its magnitude is below 1.
:::

::: misses
- [D/(1 - D)] The perturbation alternates in sign: α is negative.
- [any] Not yet. Volt-second balance makes $m_2/m_1 = D/D'$.
:::
:::

::: check
given: a = 0.2 | 0.5; b = 0.6 | 1.2
answer: (b - a)/2
unit: A/µs
tolerance: 0.5%

## A current-mode converter's inductor current rises at {a} A/µs and falls at {b} A/µs. What's the least compensating slope that keeps it stable?

::: right
Right. $m_a > (m_2 - m_1)/2$ = {answer} A/µs.
:::

::: misses
- [b/2] That's the common design choice, not the minimum.
- [any] Not yet. Solve |α| = 1.
:::
:::

::: check
given: a = 0.2 | 0.5; b = 0.6 | 1.2
answer: -(b - b/2)/(a + b/2)
tolerance: 0.5%

## With $m_a = m_2/2$, what's α for slopes $m_1$ = {a} and $m_2$ = {b} A/µs?

::: right
Right. $-\frac{m_2/2}{m_1 + m_2/2}$ = {answer}.
:::

::: misses
- [any] Not yet. $\alpha = -(m_2 - m_a)/(m_1 + m_a)$.
:::
:::

::: check
given: a = -0.3 | -0.6 | -0.9; n = 5 | 10 | 20
answer: abs(a)^n
tolerance: 1%

## A current loop has α = {a}. By what factor has a perturbation's magnitude shrunk after {n} cycles?

::: right
Right. $|\alpha|^n$ = {answer}.
:::

::: misses
- [any] Not yet. Multiply by α each cycle.
:::
:::

::: check
given: R = 0.5 | 2 | 10; C = 22 | 100 | 470
answer: 1/(2*pi*R*C*1e-6)/1000
unit: kHz
tolerance: 0.5%

## A current-mode buck feeds {R} Ω with {C} µF of output capacitance. Where's its dominant control-to-output pole?

::: right
Right. $1/2\pi RC$ = {answer} kHz.
:::

::: misses
- [1/(R*C*1e-6)/1000] Divide by 2π for hertz.
- [any] Not yet. The capacitor and load form the pole.
:::
:::

::: check
kind: parts
given: g = 12 | 24; k = 0.3 | 0.6 | 0.75; L = 4.7 | 15

## A current-mode buck converts {g} V to {k} of that with L = {L} µH.

::: part
answer: (g - k*g)/L
unit: A/µs
tolerance: 0.5%

### What is the current's rising slope?

::: misses
- [any] $(V_g - V)/L$.
:::
:::

::: part
answer: -(k*g/L - k*g/L/2)/((g - k*g)/L + k*g/L/2)
tolerance: 0.5%

### What is α with $m_a = m_2/2$?

::: misses
- [-k/(1 - k)] That's without compensation.
- [any] $-(m_2 - m_a)/(m_1 + m_a)$.
:::
:::
:::

::: check
kind: derivation
vars: a = 0.01..5, b = 0.01..5, c = 0..5, n = 1..20

## A current loop has rising slope a, falling slope b and compensating slope c.

::: step
answer: -(b - c)/(a + c)

### What is α?
:::

::: step
answer: abs((b - c)/(a + c))^n

### By what factor does a perturbation's magnitude change after n cycles?
:::

::: right
Right. |α| < 1 means each cycle shrinks the error; at c = b it's gone in one cycle.
:::
:::

::: explain
## Why does peak current-mode control become unstable above 50% duty without slope compensation?

::: model
The switch turns off when the inductor current reaches the control level, so if the current starts a cycle a little high, it reaches the level a little early and the switch turns off sooner. The current then falls at the off-time slope for longer than normal. Whether the error at the end of the cycle is smaller or larger than at the start depends on the ratio of the slopes: the early turn-off shortens the rise by the error divided by the rising slope, and that extra falling time removes the error times the ratio of falling to rising slope. When the falling slope is steeper than the rising one, which volt-second balance says happens for D above 0.5, the correction overshoots and the error grows, flipping sign each cycle. An added ramp makes the turn-off less sensitive to the starting error and restores stability.
:::
:::

::: practice

::: check
given: D = 0.55 | 0.7 | 0.9
answer: -D/(1 - D)
tolerance: 0.5%

## Uncompensated α at D = {D}?

::: misses
- [any] $-D/D'$.
:::
:::

::: check
given: a = 0.1 | 0.4; b = 0.3 | 0.9
answer: (b - a)/2
unit: A/µs
tolerance: 0.5%

## Minimum compensating slope: $m_1$ = {a}, $m_2$ = {b} A/µs?

::: misses
- [any] $(m_2 - m_1)/2$.
:::
:::

::: check
given: R = 1 | 5; C = 47 | 220
answer: 1/(2*pi*R*C*1e-6)/1000
unit: kHz
tolerance: 0.5%

## Current-mode pole: R = {R} Ω, C = {C} µF?

::: misses
- [any] $1/2\pi RC$.
:::
:::
:::
