The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Simulators >> Circuit Simulators >> stability & phase margin simulation
https://designers-guide.org/forum/YaBB.pl?num=1307413997

Message started by newic on Jun 6th, 2011, 7:33pm

Title: stability & phase margin simulation
Post by newic on Jun 6th, 2011, 7:33pm

I try to simulate the stability & phase margin of this simple regulator as a test case. I use the classic method, which large C & L are used to break to feedback path. Is this setup correct?
ps: the decap at vout is not shown.

Title: Re: stability & phase margin simulation
Post by newic on Jun 6th, 2011, 7:34pm

I also try out the stb analysis in cadence. The setupp as in the figure. However the result i got is very far different to the case1 which is using large LC.

Title: Re: stability & phase margin simulation
Post by raja.cedt on Jun 6th, 2011, 10:21pm

hi,
in the first setup, where you are applying ac signal? And could you please post both loop gain plots? Because i feel both should give same result at least till UGB. By the way what are values of L and C?

Thanks.
Raj.

Title: Re: stability & phase margin simulation
Post by newic on Jun 6th, 2011, 10:31pm

ac input set in the schematic Vac=1 at the plus input of the opamp
L=1k Henry  C=1M farad

Title: Re: stability & phase margin simulation
Post by buddypoor on Jun 7th, 2011, 12:00am

Hi newic,

the stability margin is defined for the loop gain - that means that you must insert the test signal into the loop. That is the reason for including the capacitor of 1F. Therefore, connect the cap not to ground but to the test voltage and dont forget to ac-ground the pos. voltage input node.

Title: Re: stability & phase margin simulation
Post by Ken Kundert on Jun 7th, 2011, 12:24am

Breaking the loop by inserting an extremely large series inductor and shunt capacitor is not the 'classic approach' to measuring loop gain, it is the method used by people who don't know any better. It is should not be used because it rarely gives accurate results, particularly at frequencies up near the unity gain frequency, where you most need the results to be accurate.

The explanation given by Buddypoor is also important and should be heeded.

-Ken

Title: Re: stability & phase margin simulation
Post by newic on Jun 7th, 2011, 1:19am

hi all,
thx for the feedback so that i could learn from the forum.
OK, it is not the classic approach but i always heard this method using large LC. Someone also told me that there is no much difference to inject ac signal from plus input of the opamp as shown in case1.

From buddypoor view, i should inject the ac signal in series with the large C right? I called this as case3 over here.

here are the results from case1 & case3.
Now the phase is start from -180o instead of 0o as in normal Bode plot. To overlap it, i minus the phase in case1 with 180o. Will it be stable?

pls give some comments on the differences

what causes the overshoot response in phase_case1?

Title: Re: stability & phase margin simulation
Post by raja.cedt on Jun 7th, 2011, 2:10am

hi ken,
i think L and C will give farly accurate result i guess , because for the people who uses Hspice they don't have .stb like in spectrea.

@ newic: You should give ac voltage source at the other side of the cap, rather you grounded that side.

Thanks.

Title: Re: stability & phase margin simulation
Post by newic on Jun 7th, 2011, 2:20am


Quote:
@ newic: You should give ac voltage source at the other side of the cap, rather you grounded that side.


the other side (plus input of the opamp) is ac grounded as buddypoor said.
why need inject signals both sides?

Title: Re: stability & phase margin simulation
Post by buddypoor on Jun 7th, 2011, 5:39am

Newic, I think it looks rather good now.
The loop gain phase starts at -180 deg which is correct - and at magnitude=0 dB the phase is app. -250 deg.
This gives a phase margin of 110 deg.
For my opinion, it is even a bit to large.
Question: Where did you measure the output signal? It should be at Vout.

Title: Re: stability & phase margin simulation
Post by newic on Jun 7th, 2011, 6:02am

yup, measured at vout.

why at high frequency, the phase plot is very different?

Title: Re: stability & phase margin simulation
Post by buddypoor on Jun 7th, 2011, 6:17am

Not only the phase plots differ. Look at the magnitudes.
The reason is as follows: The "crude" L-C method changes the load conditions at the breaking point (L causes an ac break of the loop).
That was the background of Ken Kundert's doubts.
Correct loop gain simulations don't disconnect the load at this point.  

By the way, for my opinion the magnitude of only 9.6 dB is a rather low value. Therefore, the excessive phase margin. Are you sure, everything else is OK? CHECK the operating point of the opamp!

Title: Re: stability & phase margin simulation
Post by newic on Jun 7th, 2011, 7:20am

yup. the gain is very low and it will cause steady-state error. It is just a test case for breaking the feedback loop study.

The phase plot starts at -180o, will it conflict with the bode-plot phase plot & phase margin?

Title: Re: stability & phase margin simulation
Post by newic on Jun 7th, 2011, 7:23am

For stability simulation with feedback path, we got to break the feedback path (unless using stb).

How about other ac simulations with feedback path? such as PSR (power supply ratio) plot? I dont think we need to break the loop again.
thank you

Title: Re: stability & phase margin simulation
Post by buddypoor on Jun 7th, 2011, 7:37am

1.) The loop gain phase for low frequencies (including dc) MUST be -180 deg. due to the neg. feedback case. Otherwise the whole circuit would not work.

2.) I don't understand your question regarding PSRR.
Determination of stability margins require breaking the loop - otherwise you cannot inject a test signal. However, in order to restore the operating point, the dc loop must be maintained. Therefore the large L. But this crude method cannot mirror the load at the breraking point.
Other and more exact methods (Middlebrook et al) can do both:
Maintain dc operating point and no loading errors.
Ken Kundert has written a good paper that describes these methods.

Remark:  Sorry, it was F. Wiedmann who has collected something about phase margin:

http://sites.google.com/site/frankwiedmann/loopgain

Title: Re: stability & phase margin simulation
Post by buddypoor on Jun 7th, 2011, 8:29am

Sorry, it was F. Wiedmann who has collected something about phase margin:

http://sites.google.com/site/frankwiedmann/loopgain

Title: Re: stability & phase margin simulation
Post by newic on Jun 8th, 2011, 6:42am

Hi all, thx for the sharing.

Regarding to my previous post to plot PSR simulation for that regulator.
I inject ac noise at the power supply and measure VF(vout) to obtain the PSR result. My question is do I need to break the feedback loop for this case? In my opinion, breaking the feedback path is not needed. Am I right?

Title: Re: stability & phase margin simulation
Post by buddypoor on Jun 8th, 2011, 7:14am

Yes, that's correct. You must not open the loop for this case, since the PSRR is defined for the nominal operating conditions, of course.
Opposite to this case, the phase margin is defined for the loop gain, which needs signal injection into the (open) loop.  

Title: Re: stability & phase margin simulation
Post by newic on Jun 8th, 2011, 7:18am

Billions thx to buddypoor.

to complete the discussion, the comparison with 3 cases are shown here.
case1  ( incorrect LC method)
case2  (stb)  -
case3  (correct LC method)

Title: Re: stability & phase margin simulation
Post by newic on Jun 8th, 2011, 7:22am

reupload

Title: Re: stability & phase margin simulation
Post by buddypoor on Jun 8th, 2011, 9:20am

What is the difference between cases 1 and 3?

Title: Re: stability & phase margin simulation
Post by newic on Jun 8th, 2011, 6:19pm

case1 --> inject ac at the plus input of opamp
case3  -> inject ac  in series with big cap at the minus input of opamp & ac ground the plus input (which is suggested by buddypoor)

case2 -> same as in the 2nd figure, the ac is injected at the plus input of opamp    (using stb) ...

could someone comment on the case2 method. I am new to stb method.

from the comparison, they are almost alike at certain range. But the phase difference is relative difference in term of the starting phase

Title: Re: stability & phase margin simulation
Post by buddypoor on Jun 8th, 2011, 11:48pm

Hi newic,

just for my and your understanding:

When you start the simulation at very low frequencies (1mHz for example), you will notice that there is a difference at low frequencies between cases 1 and 3. Case 1 gives you not the loop gain (which must be negative) but the positive gain of the closed loop circuit.
However, because the inv. input has a large C to ground, both are identical in magnitude for medium and higher frequencies.
Nevertheless, case 1 does not comply with the phase margin definition, which applies only to the loop gain.

Title: Re: stability & phase margin simulation
Post by newic on Jun 11th, 2011, 8:51am

just now i resimulate the case3. This round i got phase start at 180o instead of -180o...   :D

Title: Re: stability & phase margin simulation
Post by buddypoor on Jun 12th, 2011, 5:55am


newic wrote on Jun 11th, 2011, 8:51am:
just now i resimulate the case3. This round i got phase start at 180o instead of -180o...   :D



Is this a problem for you? I don`t think so if the phase becomes more negative for rising frequencies.

Title: Re: stability & phase margin simulation
Post by newic on Jun 12th, 2011, 6:37am

sorry, i am bit slow.

In the case3, i got the phase starts at -180o and go toward -360o for higher frequency as shown in the overlapping figure.

This round, (not sure what i did), I got the phase starts at +180o and go toward 0o for higher frequency.

It puzzles me, how could I read the Phase Margin in these two cases? I think one of the results must be wrong right.

Title: Re: stability & phase margin simulation
Post by buddypoor on Jun 12th, 2011, 8:20am

Do you see any difference beteween plus and minus 180 deg?
Or between zero and -360 deg? Me not!

I think it (a) depends on your simulator if it prefers -180 deg or +180 deg, or (b) it depends on the lowest frequency you are simulating.
In any case, the phase margin is the difference (at the magnitude cross-over frequency) between the actual phase and zero deg (equivalent to -360 deg).

Title: Re: stability & phase margin simulation
Post by newic on Jun 12th, 2011, 7:21pm

Hi buddypoor,

Got it!
Thank you very much!!  :)

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.