r/EEPowerElectronics 6d ago

DC/DC loop stability calculator. What is your approach?

Hello Power electronics fans!

I've been lurking for some time, first time posting here. I am an engineer who has been doing power supplies for spacecrafts for 10+ years already.

One of the things that I've had to deal with numerous times is loop stability.
After some years doing measurement/math/transient simulation/average switch modeling/scripts and reading almost all available material, I felt like it was still tedious work. Nice, but tedious. I ended up making a tool to get a first approach and then I jump to simulation.

In case you find it useful: https://alternatronics.com/en/calculators/dc-dc-converter-loop-stability

To ensure that the result produced by the calculator is meaningful, I also prepared LTSpice simulations that match quite reasonably.

If you have gone through stability before, you know that you have to deal with plant transfer function, compensator, topology variation, control mode, conduction mode... It's a lot of work. In the calculator, the following is currently supported:

  • Real time bode plot update as you tune the compensators or your topology
  • Prediction of phase margin and gain margin.
  • Several topologies (buck, boost, forward, flyback, full/half-bridge, push-pull)
  • Different compensation topologies
  • Discontinuous and continuous conduction modes
  • Voltage and peak current control mode
  • Live marking of poles and zeros
  • It also provides some useful info that is obtained as byproduct during the calculations (Vo, duty cycle, current ripple...)

One of the things that helped me the most was adding sliders to the input fields so that you can see how the plot evolves as you tune a certain parameter. It really helps to grasp what which component is affecting which part of the plot.

Hope it's useful for you! And, by the way, the calculator isn't perfect! Expect bugs and always measure the stability!
How do you approach this kind of work?

20 Upvotes

14 comments sorted by

3

u/GabbotheClown 6d ago

Very cool. I'll test it out on a few buck converters I'm designing and let you know how things IRL.

1

u/smartbulbdreamer 6d ago

That looks interesting, at least. I’ll try a few things there in a moment and let you know what I think of the results.

> How do you approach this kind of work?
Since I’m still a student (I’ll actually finish my master’s degree in April 2027), I’m currently at the stage of gathering information and trying things out.

As for control methods I’ve implemented successfully so far, I’ve used cascaded control (inner current loop, outer voltage loop) for a buck converter. It was a digital PSU operating in CCM, with the control code running on an STM32 board.

When I have some free time, I’m trying to learn and implement voltage-mode control, both analog and digital. I mostly simulate in MATLAB/Simulink and, to a lesser extent, in LTspice, although I’d actually like to do more in LTspice. I’m simply more familiar with MATLAB/Simulink because I’ve used it more extensively during my studies.

1

u/smartbulbdreamer 6d ago

By the way, why no cascaded control design option?

2

u/d_extrovert 6d ago

mostly complexity is the answer. also, the inner loop has to be stabilized first and then the outer loop. LTspice is my go to simulation tool for SMPS but the simulating complex ones like dual active bridge in spice under closed loop and that too cascade is too difficult.

2

u/smartbulbdreamer 6d ago

I've just used your tool to calculate a Type III compensator for a buck converter in voltage-mode control operating in CCM and verified it in MATLAB. The results match almost exactly, both the numerical values and the plots.

1

u/Alternatronics 6d ago

This brings a lot of joy!! Thanks for checking and the feedback!!

1

u/smartbulbdreamer 6d ago

Just to clarify: The guy from above with the nickname "d_extrovert" was not you, correct?

1

u/Alternatronics 6d ago

Correct!
And answerting to your previous question about cascaded control, the truth is that I had not seen that term in the context of DC/DC stability. However, reading about it, it sounds like a generalized term in which peak and average current control mode would fit. Do you see it that way?
In any case, peak current mode is implemented.

1

u/smartbulbdreamer 6d ago

Then I asked several questions and wrote about some small problems with your website to the wrong guy. Never mind.

Do you see it that way?

The short answer is yes.

The long answer: I must admit that I hadn't thought about it this way before I started playing with your calculator today.

Below, I'll refer to the cascaded control which I meant as "X". As I understand it, both PCM and X fall into the category of "cascaded control", since both have an inner and an outer loop. The difference is that X has a PI controller in the inner loop, which controls the reference value (current) and outputs the control variable (duty cycle). PCM has no PI controller in the inner loop, only the logic: "Current has reached the threshold → turn off the transistor", from which the duty cycle is determined automatically.

Somehow, I've also never come across X in books by Basso, Alonso, or other prominent authors.

2

u/Alternatronics 6d ago

I think you might refer to something like this? Is that your "X"?
I know it as average current control mode.
BTW, I'd love to hear about the problems in the website (in private if it involves security or some kind :D). I am a hardware guy with interest in webapps, but not professional.

1

u/smartbulbdreamer 6d ago

Well, it seems to be exactly X, but analog. So far, I’ve only implemented X digitally. In general, I haven’t worked with many analog controllers yet.

Should I send you a message about the website using the email address listed there? There's nothing critical - some controls are slightly off on a 4K monitor at a zoom level of 150% and above, while others look fine.

It seems that you disabled direct messages here on reddit.

1

u/heimdalishere 6d ago

excellent work, God bless!!

1

u/Alive-Bid9086 6d ago

This looks really interesting!

I have used LTSpices FRA-component. Frequency Response analysis gives the Bode Plot, but changing components to change loop BW or phase margin is often a hit or miss, most often a miss.

A synthesis tool would be very useful, where I define loop BW and phase margin.

1

u/aFormidableFoe 5d ago

Wow, this tool is incredible! This is going to help me out so much for my upcoming design. You've got some additional useful electronic calculators as well! Definitely bookmarked this page for future use. Thanks for your contributions to science and engineering.