The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Nov 21st, 2019, 1:20pm
Pages: 1 2 3 
Send Topic Print
AC analysis (Read 47899 times)
grosser
Community Member
***
Offline



Posts: 57

AC analysis
Aug 15th, 2006, 12:01pm
 
hello

Can you tell me how to perform AC analysis of that circuit?

It is a LDO with compensation. I want to know the real phase and gain in open loop.

If i use basic compensation circuit withouth the opamp on the left AC analysis gives sensible results (UGF=4e6 PM=70deg), the transient analysis is also ok.

When i add the opamp which is necessary the transient analysis is still ok, but AC gives strange results (UGF=3e7 PM=-11deg). I think AC analysis is setup badly, maybe due to two feedbacks.

How to setup AC analysis? Give me any hints please

regards
Back to top
 

compensation_ldo2.png
View Profile   IP Logged
loose-electron
Senior Fellow
******
Offline

Best Design Tool =
Capable Designers

Posts: 1638
San Diego California
Re: AC analysis
Reply #1 - Aug 15th, 2006, 12:14pm
 
It is gain/phase around the loop with the difference point at the amplifier in the center of the scehmatic.

So, you are looking at the gain with the input being an AC source in series with the Vref, and the additive phase gain at the other input of that op-amp.

Break the loop open at the negative input to the center op-amp. Get the AC response at that point.

hopefully that will get you started.

Jerry
Back to top
 
 

Jerry Twomey
www.effectiveelectrons.com
Read My Electronic Design Column Here
Contract IC-PCB-System Design - Analog, Mixed Signal, RF & Medical
View Profile WWW   IP Logged
grosser
Community Member
***
Offline



Posts: 57

Re: AC analysis
Reply #2 - Aug 15th, 2006, 12:47pm
 
i do it in that way

C1 an L1 have huge values to not affect the response and to set proper operating point


i don't know why the transient response is very good although AC results are poor
Back to top
 

LDO_AC.png
View Profile   IP Logged
loose-electron
Senior Fellow
******
Offline

Best Design Tool =
Capable Designers

Posts: 1638
San Diego California
Re: AC analysis
Reply #3 - Aug 15th, 2006, 8:49pm
 
Hm,  just looking at things quickly -
- AC source should be in series with the Vref source, and
-  due to the phase inversion of the PMOS transistor, the negative feedback (at first glance) is at the positive input of the amplifier.

The gain/phase will change about 30 db with respect to operating point of the PMOS power transistor. At high power supply voltage, you get a lot more gain from the PMOS, because the device is in saturation. At low voltages, it is in triode and provides less loop gain.

Jerry

Back to top
 
 

Jerry Twomey
www.effectiveelectrons.com
Read My Electronic Design Column Here
Contract IC-PCB-System Design - Analog, Mixed Signal, RF & Medical
View Profile WWW   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2227
Silicon Valley
Re: AC analysis
Reply #4 - Aug 16th, 2006, 12:09am
 
Using a large inductor and capacitor is a poor way to measure loop gain. It is difficult to do properly and can cause the simulator to misbehave. But even if these things do not go wrong, it gives inaccurate results because the filter disturbes the loading effects within the loop. You would be much better served using the stb analysis if you are using Spectre, or otherwise follow the advice in http://www.thekunderts.net/ken/docs/c%26d2001-01.pdf.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
grosser
Community Member
***
Offline



Posts: 57

Re: AC analysis
Reply #5 - Aug 16th, 2006, 3:01am
 
loose-electron wrote on Aug 15th, 2006, 8:49pm:
Hm,  just looking at things quickly -
- AC source should be in series with the Vref source, and
-  due to the phase inversion of the PMOS transistor, the negative feedback (at first glance) is at the positive input of the amplifier.

The gain/phase will change about 30 db with respect to operating point of the PMOS power transistor. At high power supply voltage, you get a lot more gain from the PMOS, because the device is in saturation. At low voltages, it is in triode and provides less loop gain.

Jerry



why do you think AC source should be in series with Vref? it doesn't work
Back to top
 
 
View Profile   IP Logged
loose-electron
Senior Fellow
******
Offline

Best Design Tool =
Capable Designers

Posts: 1638
San Diego California
Re: AC analysis
Reply #6 - Aug 16th, 2006, 3:05pm
 
Blacks Feedback Configuration -

Gain/Phase around the control system is taken from the positive input of the differencing circuit back to the negative input of the differencing circuit.

Take a careful look at your sign inversions in the system and determine what the positive and negative inputs are to your differencing circuit. Positive is the reference in this case, and the negative is the feedback (aka negative feedback control systems)

Ken - the large inductor/capacitor (or R and C) trick is a classic method to obtain a DC operating point. You grab your gain/phase response prior to going into the LC, and the only purpose of the LC is to find the DC op-point

Jerry
Back to top
 
 

Jerry Twomey
www.effectiveelectrons.com
Read My Electronic Design Column Here
Contract IC-PCB-System Design - Analog, Mixed Signal, RF & Medical
View Profile WWW   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2227
Silicon Valley
Re: AC analysis
Reply #7 - Aug 16th, 2006, 11:23pm
 
I am well aware that using a very lowpass filter is a common trick for measuring loop gain. However, it is a poor approach that gives inaccurate results because it acts to break the loop at high frequencies and so affects the results by removing loading effects of the amplifier on the feedback network. That is why I warn people about whenever I see them use it.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
svenn
Junior Member
**
Offline

Does it have to be
legal?

Posts: 10
Germany
Re: AC analysis
Reply #8 - Aug 17th, 2006, 8:12am
 
Ken Kundert wrote on Aug 16th, 2006, 11:23pm:
I am well aware that using a very lowpass filter is a common trick for measuring loop gain. However, it is a poor approach that gives inaccurate results because it acts to break the loop at high frequencies and so affects the results by removing loading effects of the amplifier on the feedback network. That is why I warn people about whenever I see them use it.

-Ken


Doesn't Spectre have loopgain simulation?
Back to top
 
 

Svenn
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2227
Silicon Valley
Re: AC analysis
Reply #9 - Aug 17th, 2006, 8:36am
 
Yes, it is the stb analysis I mentioned earlier.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
loose-electron
Senior Fellow
******
Offline

Best Design Tool =
Capable Designers

Posts: 1638
San Diego California
Re: AC analysis
Reply #10 - Aug 17th, 2006, 10:41am
 
Ken Kundert wrote on Aug 16th, 2006, 11:23pm:
I am well aware that using a very lowpass filter is a common trick for measuring loop gain. However, it is a poor approach that gives inaccurate results because it acts to break the loop at high frequencies and so affects the results by removing loading effects of the amplifier on the feedback network.


OK, agreed, but considering it is an LDO (sub MHz for the most part) and the load being broken off is the differential pair of the op-amp (small amount of C, not like the Cgs, Cgd of that big PMOS pass transistor. it should be close enough.

If you wanted to use this methodology, and include the amplifier input loading effects, you could use a second op-amp as a dummy load prior to the LPF. to include the loading effects. If really fussy, you can isolate the LPF out of the game with some VCVS behaviorals.

As with a lot of engineering, 5 ways will get it done,  :) and a million ways to mess it up.  :(

What would your approach be for opening the loop and maintaining the operating point? I looked at the paper that you mentioned, and it is comprehensive, but a bit of overkill for low frequency stuff in my opinion.

Also if the foundry models are off 30%, and you are trying to squeeze the the last 2% of accuracy out of the rest of the simulation?

tnx,
Jerry



Back to top
 
 

Jerry Twomey
www.effectiveelectrons.com
Read My Electronic Design Column Here
Contract IC-PCB-System Design - Analog, Mixed Signal, RF & Medical
View Profile WWW   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2227
Silicon Valley
Re: AC analysis
Reply #11 - Aug 17th, 2006, 10:55pm
 
I recently did a hand calculation using a ua741 with 100k feedback resistors, and by ignoring the loading effect of the input capacitance, the phase margin would be off by over 20 degrees.

In my experience, if one is worried about phase margin, then the parasitcs are playing a significant role at the unity gain frequency and it dangerous to ignore them. And frankly, it takes no more effort to make the measurement properly than it does to make it improperly.

-Ken
Back to top
 
 
View Profile WWW   IP Logged
Frank Wiedmann
Community Fellow
*****
Offline



Posts: 646
Munich, Germany
Re: AC analysis
Reply #12 - Aug 17th, 2006, 11:39pm
 
loose-electron wrote on Aug 17th, 2006, 10:41am:
What would your approach be for opening the loop and maintaining the operating point? I looked at the paper that you mentioned, and it is comprehensive, but a bit of overkill for low frequency stuff in my opinion.


Implementing the method used for stb analysis is not that difficult. I did it some time ago for LTspice (free, download from http://www.linear.com/designtools/softwareRegistration.jsp). You can find it either as the LoopGain2 example circuit in the installation or, in a slightly extended version, at http://groups.yahoo.com/group/LTspice/files/%20Examples/Educational/LoopGain_Pro... (free registration required for access).

Once you have got the template, it is much easier to use this than to break the loop with a lowpass, and you don't have to worry if you are doing everything right (even the orientation of the probe does not matter).
Back to top
 
 
View Profile WWW   IP Logged
grosser
Community Member
***
Offline



Posts: 57

Re: AC analysis
Reply #13 - Aug 18th, 2006, 10:23am
 
Frank Wiedmann wrote on Aug 17th, 2006, 11:39pm:
Implementing the method used for stb analysis is not that difficult. I did it some time ago for LTspice (free, download from http://www.linear.com/designtools/softwareRegistration.jsp). You can find it either as the LoopGain2 example circuit in the installation or, in a slightly extended version, at http://groups.yahoo.com/group/LTspice/files/%20Examples/Educational/LoopGain_Pro... (free registration required for access).

Once you have got the template, it is much easier to use this than to break the loop with a lowpass, and you don't have to worry if you are doing everything right (even the orientation of the probe does not matter).


thank You Frank for the link.

Is this method suitable only for opamp or feedback generally? I implemented it in my LDO according to the Middlebrook's method on the left in your ltspice template, but it doesn't work fine.

Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1713
Bracknell, UK
Re: AC analysis
Reply #14 - Aug 20th, 2006, 3:02pm
 
Whilst stb analysis is the right way to do things here (and it is very easy to use), if you do want to have the loop closed during dc, and open during ac, use spectre's switch component (which is in analogLib as spt*switch). This is an ideal switch which can be in different positions in different analyses.

This will suffer from loading inaccuracy effects, but at least you won't have the big inductors and capacitors messing things up...

If you have spectre, there is no good reason to use the "classic" method. I find that as soon as I've told people about stb analysis, they use it from then on. Even if your simulator doesn't support the method used in stb, using Middlebrook's method is a much better alternative than the "classic" method, and relatively easy to perform in practice.

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
Pages: 1 2 3 
Send Topic Print
Copyright 2002-2019 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.