LTSPice LoopGain2 Circuit Stability example does not make sense.  - Page 1
Forum section: electronics / projects

author: osflores@qdusa.com
author_rank: Newbie
timestamp: April 22, 2024, 11:11:48 pm
content: Hi all,Lately I am learning about simulating circuit stability on Op Amps and I encountered an example provided by LTSPice "LoopGain2". When I use another common mothod of stabily analysis I get different results. The results that I get in the "LoopGain2" example has a negative Phase margin of -106 degrees at 0dB (see attached simulation LoopGain2.asc). When simulating with the other method which seems to be very popular I see a phase margin of 74 degrees at 0dB (see attached simulation LoopGain2_Other_Method.asc). Can someone explain what I am doing wrong or which one is right/wrong and why?

author: moffy
author_rank: Super Contributor
timestamp: April 23, 2024, 12:53:00 am
content: I guess you realise that 74 - -106 = 180 degrees? I would say that the problem is just a matter of the reference phase not the result.

author: iMo
author_rank: Super Contributor
timestamp: April 23, 2024, 07:52:43 am
content: Your schematics differ. Once you have the signal generator at the output, once in the input. Therefore perhaps that 180 shift.

author: youngda9
author_rank: Regular Contributor
timestamp: April 23, 2024, 12:24:42 pm
content: Attached are VENABLE TECHNICAL PAPERs # 16 & #18.It explains that "The criteria for making a loop measurement was to find a place in the loop where the signal was confined to a single path and the impedance looking into the circuit input was muchhigher than the impedance of the circuit output."In your first example, one side of the injection point is hooked to the output of the amplifier (low impedance) and looks into higher impedance circuitry. This is done correctly. I always set up my simulation this way and the phase with respect to 0degrees is directly measured as the phase at crossover, without subtracting out 180degrees...which is nice. I like to see it this way.In your second example both sides of the injection point are high-impedance, therefore this injection point is incorrect. In a real-world application the results will be compromised most likely. Seems to work in a simulation, but the phase is shifted for some reason...not sure why.Either way, you just need to realize that the results are the same in your simulation when shifting the phase 180degrees as pointed out in the previous reply. You have a single inverting amplifier application here, so the low frequency phase shift will be 180degrees.

author: osflores@qdusa.com
author_rank: Newbie
timestamp: April 23, 2024, 03:03:50 pm
content: Looks like one heck of a considence right, but I can't explain how I get a real phase margine from the negative. For instance, do I substract 180 degrees from it? why?

author: osflores@qdusa.com
author_rank: Newbie
timestamp: April 23, 2024, 03:29:39 pm
content: Hi youngda9,Your assestment seems to make a lot of sense, I should be considering inserting the signal in the low impedance path on my first example just as it is done on the second one. I did not find any quick way of doing this with the first method, maybe this is the reason why the second method is more reliable. On your last comment, then it would be safe to say that substracting 180 degrees for inverting amplifiers should be considered? By that logic then I should substract 0 degrees for non-inverting? How about Differential amplifiers?Edit: Thanks for the reference documents, look like a fun read!

author: moffy
author_rank: Super Contributor
timestamp: April 23, 2024, 11:31:30 pm
content: Quote from: osflores@qdusa.com on April 23, 2024, 03:03:50 pmNo coincidence, look at the phase difference at say 1kHz, one is +90 degrees the other is -90 degrees, they always are 180 apart, and 180 degrees just means that one signal is inverted with respect to the other, just invert one of the voltage sources and they will agree.

author: RFDx
author_rank: Regular Contributor
timestamp: April 24, 2024, 07:31:16 am
content: The second method with breaking the loop at the inverting input and inserting an AC source is the easiest. For comparison, breaking the loop at the output and inserting there an AC source isn't exactly the same and should give some gain and phase deviations in the Bode plot for very high frequencies. Breaking the loop at the output is usually the place where you would put an injection transformer to make (invasive) gain/phase measurements in real life.Another simple method that shows open loop gain, loop gain and phase (margin) is attached.

author: osflores@qdusa.com
author_rank: Newbie
timestamp: April 24, 2024, 04:09:44 pm
content: Yeah I was overlooking the fact that inverting the signal would introduce a 180 degree shift. I was assuming that this method would give me a straight answer. Thanks for the explanation.

author: osflores@qdusa.com
author_rank: Newbie
timestamp: April 24, 2024, 04:18:11 pm
content: Ok, this must be the coolest and easiest method I have seen so far. I would appreaciate it if you have any reference literature on this so I can educate myself. Thanks a lot for your response.