Repository navigation
Testing A Buck Converter in Peak Current Control Mode #1275
Replies: 2 comments 1 reply
|
Short answer: no, a compensator designed for peak current mode can't be validated against the bare power stage. But you don't need the inner loop at circuit level either: replace it with its averaged small-signal model and test the compensator against that in python-control. Why your test fails The inner current loop changes the plant the outer loop sees. Without it, the buck's duty-to-output transfer function has the LC double pole, with about −180° of phase above resonance. With the current loop closed, the inductor acts like a current source, so control-to-output becomes roughly a single pole from the load and output capacitor, plus the ESR zero and a sampling double pole at fs/2. A Type II compensator is sized for that single-pole plant. Against the LC double pole it can't add enough phase, so the loop ends up with about zero phase margin. Testing the outer loop without the switching circuit Use Ridley's averaged current-mode model for the buck's control-to-output gain:
Slope compensation only enters through import numpy as np
import control as ct
s = ct.tf('s')
# Example buck: 12 V -> 3.3 V, 3 A, 300 kHz. Replace with your values.
Vin, Vo, Io, fs = 12.0, 3.3, 3.0, 300e3
L, C, Rc, Ri = 4.7e-6, 100e-6, 5e-3, 0.1 # Ri = current-sense gain
R, D, Ts = Vo / Io, Vo / Vin, 1 / fs
Dp = 1 - D
Sn = (Vin - Vo) / L * Ri
Se = 0.5 * Sn # slope compensation
mc = 1 + Se / Sn
# Averaged peak-current-mode plant (Ridley)
wp = 1 / (C * R) + Ts / (L * C) * (mc * Dp - 0.5)
wn, Qp = np.pi / Ts, 1 / (np.pi * (mc * Dp - 0.5))
Fh = 1 / (1 + s / (wn * Qp) + s**2 / wn**2)
Gvc = (R / Ri) / (1 + R * Ts / L * (mc * Dp - 0.5)) * (1 + s * C * Rc) / (1 + s / wp) * Fh
# Type II: zero on the load pole, pole at the ESR zero (or fs/2), crossover at fs/10
fc = fs / 10
shape = (1 + s / wp) / (s * (1 + s / min(1 / (Rc * C), np.pi * fs)))
Gc = shape / abs(ct.evalfr(shape * Gvc, 2j * np.pi * fc))
# The same compensator against the bare buck (1 V PWM ramp)
Gvd = Vin * (1 + s * C * Rc) / (1 + s * (L / R + C * Rc) + s**2 * L * C)
for name, loop in [('current-mode plant', Gc * Gvc), ('bare buck', Gc * Gvd)]:
gm, pm, _, wc = ct.margin(loop)
stable = all(np.real(p) < 0 for p in ct.poles(ct.feedback(loop, 1)))
print(f'{name}: crossover {wc / 2 / np.pi / 1e3:.1f} kHz, phase margin {pm:.1f} deg, stable {stable}')With these example values (python-control 0.10.2), the same compensator gives:
Sweeping the PWM ramp from 0.25 V to 20 V never gets the bare-buck loop above about 2° of phase margin, so it isn't a gain-scaling problem: the plant is simply the wrong one for this compensator. So the order that works is: design and check the outer loop against the averaged current-mode model in Python, then confirm in PSpice with the switching circuit and the real slope compensation. Reference: R. B. Ridley, "A New, Continuous-Time Model for Current-Mode Control", IEEE Transactions on Power Electronics, vol. 6, no. 2, 1991. |
|
thank you for responding to my query. Interesting that you considered inner current feedback path components and buck converter component values as part of the Type II compensator gain calculation per the following line of code: Gvc is a function of: Can you please elaborate and provide your source/reference material. I don't believe that I have ever seen this take from literature that I have reviewed. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello community,
this may not be a "control" library specific question. So my apologies. However, I do know that most of you are experts in this field so this might potentially be a straightforward question that is down your alley.
I am currently testing a buck converter in peak current control mode. If you design the Type II compensator based on peak current control mode design objectives, can you test the compensator along with the plant without also implementing the inner current control loop?
I am attempting to test (simulate) the compensator along with the plant, but it is failing. It is nowhere 'near' an "acceptable" operating condition. Does validating the compensator require testing it along with the inner current control loop (with slope compensation)? Is there not a way to validate the compensator without also having to add the inner current control loop?
My current level of understanding is testing the plant/compensator pair. Don't yet know how to go about simulating a buck converter in peak current control mode using Python (I can use PSpice circuit simulator but would want to first test it using theory via Python).
Can someone please offer insight if known.
Thank you.
All reactions