How to measure the stability of a Buck converter using LTSPICE

Thread Starter

hoyyoth

Joined Mar 21, 2020
309
Daear Team,

Below is my buck converter circuit.May I know how to check it's stability using LTspice.
Need to measure GM and PM

1680797994322.png

Regards
Hari
 

Attachments

Papabravo

Joined Feb 24, 2006
21,225
You should start by reading the LTspice Help file.

"How to get a Bode Plot from a SMPS"​

It describes a method devised by Middlebrook.

R. David Middlebrook, "Measurement of Loop Gain in Feedback Systems", International Journal of Electronics (vol 38, no. 4, pages 485-512, April 1975).
This was from the 17.0.36 help file. I have not compared it with the 17.1.8 help file.
 

Ian0

Joined Aug 7, 2020
9,814
I'm following this with some interest. . .
. . .but my fully-updated SPICE says it's 17.0.36.0 and doesn't understand .fra or have the @1 symbol.
 

Papabravo

Joined Feb 24, 2006
21,225
I'm following this with some interest. . .
. . .but my fully-updated SPICE says it's 17.0.36.0 and doesn't understand .fra or have the @1 symbol.
That is because those are features of version 17.1.8, the new upgrade. Version 17.0.36 is at End of Support. There have been no changes or symbol updates since Jan 25th 2023. The new version has shed the Beta release moniker and is now fully supported. It is also possible to have both versions on your machine simultaneously. Some iconoclasts will doubtless continue to cling to prior versions for reasons that are important to them.
 
Last edited:

Ian0

Joined Aug 7, 2020
9,814
That is because the those are features of version 17.1.8, the new upgrade. Version 17.0.36 is at End of Support. There have been no changes or symbol updates since Jan 25th 2023.
Not trying to hijack @hoyyoth 's thread here, but the instruction say that "Tools->Sync Release" will update to the latest version, and it claimed to do just that, and, after the update, I have 17.0.36.0
 

Papabravo

Joined Feb 24, 2006
21,225
Not trying to hijack @hoyyoth 's thread here, but the instruction say that "Tools->Sync Release" will update to the latest version, and it claimed to do just that, and, after the update, I have 17.0.36.0
You cannot get the new version from Version 17.0.36. It is a brand new download and install.

https://www.analog.com/en/design-center/design-tools-and-calculators/ltspice-simulator.html

Click the appropriate button for your environment. If you are on a windows machine, it will install the LTspice libraries in the (usually hidden) AppData folder. If you do the install you might want to unhide that location.
 

Ian0

Joined Aug 7, 2020
9,814
You cannot get the new version from Version 17.0.36. It is a brand new download and install.
Thanks. That's rather misleading as it says it will "check the . . .website for . . . a new version of LTSPICE XVII", and isn't 17.1 a new version of 17?

A task for tomorrow, as it's a public holiday, and it's getting late here now.
 

Papabravo

Joined Feb 24, 2006
21,225
Thanks. That's rather misleading as it says it will "check the . . .website for . . . a new version of LTSPICE XVII", and isn't 17.1 a new version of 17?

A task for tomorrow, as it's a public holiday, and it's getting late here now.
I'm certainly not their defense attorney so I have no response to your question. I learned about the introduction of 17.1.4(beta) back in November of last year due to my participation in the LTspice User's group on groups.io (formerly a Yahoo group). I'm sorry you missed the changeover.
 

crutschow

Joined Mar 14, 2008
34,428
Besides doing the Bode plot, a good check of the loop response stability is a current transient test with a sudden change in load.
Instability will be indicated by large overshoot and/or ringing in the voltage and current.

The test is shown below by using S1 to switch an additional load in and out.
I found that the undershoot/overshoot was significantly reduced by increasing R3 from the original 1kΩ to 5kΩ or so.

1680821002665.png
 

Attachments

Last edited:

Thread Starter

hoyyoth

Joined Mar 21, 2020
309
Besides doing the Bode plot, a good check of the loop response stability is a current transient test with a sudden change in load.
Instability will be indicated by large overshoot and/or ringing in the voltage and current.

The test is shown below by using S1 to switch an additional load in and out.
I found that the undershoot/overshoot was significantly reduced by increasing R3 from the original 1kΩ to 5kΩ or so.

View attachment 291606
Hi,

Can I remove the switch and directly connect a current source at the output as shown below.
May I know how you decide the pulse rise time,fall time,delay units,I mean us or ns or s etc

1680865355251.png

Regards
HARI
 

ronsimpson

Joined Oct 7, 2019
3,037
how you decide the pulse rise time,fall time,delay units,I mean us or ns or s etc
I measure PWMs, for real not in SPICE.
The delay time = more than enough to get the supply up and running. (stable) More that left side arrow.
Rise & Fall time. Faster than the response time of the PWM. Not S! Not mS. Probably uS or nS.
1680868850426.png
 

crutschow

Joined Mar 14, 2008
34,428
Can I remove the switch and directly connect a current source at the output as shown below.
Because a current source has an infinite resistance, it will somewhat change the loop response as compared to a usual resistive load, but you can try it and see.
Why do you want to use a current load?
May I know how you decide the pulse rise time,fall time,delay units,I mean us or ns or s etc
It's somewhat trial and error.
I look at the start response time of the converter, and then set my load pulse to show the response time on a scale that lets me readily see the response. This would likely be different for different converters.
Since the start time of this converter was about 40µs and the transient response was several microseconds, I adjusted the pulse delay to be 200µs with a width of 100µs, which gave me a good display of the response.
The rise and fall times of the load pulse just need to be much faster than the converter response time, and here S1 is an ideal switch that switches near instantly. In a real circuit, switching in a microsecond or less would be sufficient.
 

Thread Starter

hoyyoth

Joined Mar 21, 2020
309
Because a current source has an infinite resistance, it will somewhat change the loop response as compared to a usual resistive load, but you can try it and see.
Why do you want to use a current load?
It's somewhat trial and error.
I look at the start response time of the converter, and then set my load pulse to show the response time on a scale that lets me readily see the response. This would likely be different for different converters.
Since the start time of this converter was about 40µs and the transient response was several microseconds, I adjusted the pulse delay to be 200µs with a width of 100µs, which gave me a good display of the response.
The rise and fall times of the load pulse just need to be much faster than the converter response time, and here S1 is an ideal switch that switches near instantly. In a real circuit, switching in a microsecond or less would be sufficient.
Thank you very informative.

" The rise and fall times of the load pulse just need to be much faster than the converter response time, and here S1 is an ideal switch that switches near instantly ",May I know converter response time is available in the datasheet.

How to decise Rtest resistor value

Can I use the overshoot shown in red circle,to calculate the phase margin
1681042047775.png
 
Last edited:

crutschow

Joined Mar 14, 2008
34,428
May I know converter response time is available in the datasheet.
No, since that's a function of the compensation values of C2, and R3, and the values of L1 and C3
It's likely near the resonant frequency half-cycle period of L1 and C3.
How to decise Rtest resistor value
There's no exact value.
Typically you want to make it large, such as between the maximum current to 1/10th of that or less.
Can I use the overshoot shown in red circle,to calculate the phase margin
Not readily.
That's best done from the Bode Plot.
This transient test is more or less to observe that there are no large-signal instabilities that the Bode Plot didn't show, not to calculate any stability values.
For example the test circuit for the LT1765 showed transient ringing with the original R1 value of 1kΩ, which went away with a value around 5kΩ.
Try changing the value in your simulation to see.
But after that change you need to rerun the Bode Plot to make sure that still is okay.
Sometimes the compensation for best transient response, does not give the best Bode Plot stability margins so it can be a compromise between the two.
From where I will get info of " Rise & Fall time. Faster than the response time of the PWM "
The PWM response time, is the period of one-cycle the PWM frequency, which is the soonest the PWM can change it's duty-cycle in response to an output change.
That frequency is usually stated in the data sheet.
 
Last edited:
Top