A PI controller is the first compensator most engineers reach for, and on a buck converter it works well or badly depending on what it is wrapped around. This article sizes the power stage of a 12 V to 3.3 V, 5 A buck, then designs its loop twice: once in voltage mode, where a PI runs into the LC double pole, and once in peak-current mode, where a PI is the right tool. Every number is worked out so you can check it.
The power stage
Specification: V, V, A, kHz.
The duty cycle in continuous conduction is
Choose an inductor ripple of about 30 % of full load, A:
Take the standard value 8.2 µH. The ripple becomes A.
With µF of ceramic capacitance and an ESR of 5 mΩ, the output ripple has two parts:
The two are not in phase, so the total is below their sum of 16.4 mV.
The simulation of this circuit gives a peak-to-peak inductor ripple of 1.46 A and an output ripple of 10.9 mV, between the 9.1 mV capacitive part and the 16.4 mV sum.
The plant: the LC double pole
In voltage mode, the control-to-output transfer function of a buck is
where is the PWM ramp amplitude. With V the DC gain is 12 (21.6 dB). The double pole sits at
and its quality factor at full load () is
The ESR zero is at kHz, above the switching frequency, so it gives no help. Above the plant phase heads to −180°.
Two facts follow. First, the gain peaks by at , which is +7.2 dB at full load. Second, grows as the load gets lighter: at 0.5 A, and only the inductor's DCR and the capacitor's ESR damp the resonance. With 10 mΩ of DCR and 5 mΩ of ESR, the series-loss limit is . Plan for a light-load near 10.
In the plot, the load alone leaves at 0.5 A. The series losses () damp it in parallel, , which is the value to plan for.
Attempt 1: a PI in voltage mode
The feedback divider sets from a 0.8 V reference, so . A PI is
Below the plant is flat, so the loop is dominated by the integral term:
The PI adds nothing to cancel the −180° of the double pole. At the loop phase is −90° (integrator) plus −90° (plant), so is where the gain margin is read. To keep the resonant peak 10 dB below 0 dB at the light-load :
The crossover is then Hz. That is stable, with a phase margin near 90°, but it is about a hundred times slower than the switching frequency allows. A 1 A to 5 A load step would droop for milliseconds.
This is the textbook reason why voltage-mode bucks use a Type III compensator. Its two zeros, placed near , cancel the double pole's phase, and two poles (one at the ESR zero or at , one to roll off noise) keep the high-frequency gain down. The crossover can then sit near kHz.
Attempt 2: a PI in peak-current mode
With an inner peak-current loop, the inductor behaves like a current source. To a first approximation the control-to-output transfer function becomes first order:
where is the current-sense gain in V/A. Take V/A. At full load the pole is at
Above , the plant magnitude is , which does not depend on the load. That is the property that makes current mode easy to compensate.
Target kHz. The plant there is
Place the PI zero at the full-load pole, kHz. Above the zero the PI gain is about , so the crossover condition is
The plant contributes −83° at 20 kHz and the PI −7°, so the idealised margin is 90°. The real margin is lower, because a current-mode buck also has a sampling double pole at (Ridley's model). With slope compensation that gives that pole a Q of about 0.64, it costs roughly 18° at , which leaves about 72°. At light load the pole moves down to 241 Hz, but the gain above it is unchanged, so the crossover stays at 20 kHz and the zero simply sits above the pole.
Checks before you build
- Crossover limit. Keep at or below to stay clear of the sampling effects and of the switching ripple in the feedback path.
- Corners. Check the margin at minimum and maximum input and at light and full load. A voltage-mode plant changes gain with ; feed-forward of the ramp removes that.
- Digital delay. A digital controller adds about 1.5 sampling periods of delay. At 20 kHz crossover and 200 kHz sampling, that is of phase lag. A digital design needs a lower crossover or a faster sampling rate.
- Measure the loop gain. The models above are averaged approximations. Confirm the margin by injecting a small signal into the switching circuit, as described in loop gain and phase margin in simulation.
The formulas follow R. W. Erickson and D. Maksimović, Fundamentals of Power Electronics, 3rd ed. (converter transfer functions, controller design and current-programmed control), and R. B. Ridley's current-mode model.
Try it in Voltecx
- Open the
buckClosedLoopexample (File > Open Example), which holds 12 V from 48 V with a PI. design.voltageLoopdesigns a voltage-mode compensator: a PI, Type II or Type III. It writeskpandkiinto the PI block, or atfblock for Type II or III.analysis.loopGainwith"method": "perturbation"measures the loop gain on the switching circuit, delays included.design.robustLoopdesigns the loop over every corner of input, load, inductor, capacitor, ESR and modulator delay, and says why when no design passes every corner.
The design equations in Voltecx are textbook equations for an ideal converter in continuous conduction, and the report prints the formula it used. Check the result with a simulation at every corner before you trust it.