### Author Topic: LTSPice LoopGain2 Circuit Stability example does not make sense.  (Read 812 times)

0 Members and 1 Guest are viewing this topic.

#### osflores@qdusa.com

• Newbie
• Posts: 7
• Country:
##### LTSPice LoopGain2 Circuit Stability example does not make sense.
« on: April 22, 2024, 11:11:48 pm »
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?

#### moffy

• Super Contributor
• Posts: 2035
• Country:
##### Re: LTSPice LoopGain2 Circuit Stability example does not make sense.
« Reply #1 on: April 23, 2024, 12:53:00 am »
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.

The following users thanked this post: osflores@qdusa.com

#### iMo

• Super Contributor
• Posts: 5054
• Country:
##### Re: LTSPice LoopGain2 Circuit Stability example does not make sense.
« Reply #2 on: April 23, 2024, 07:52:43 am »
Your schematics differ. Once you have the signal generator at the output, once in the input. Therefore perhaps that 180 shift.

The following users thanked this post: osflores@qdusa.com

#### youngda9

• Contributor
• Posts: 30
• Country:
##### Re: LTSPice LoopGain2 Circuit Stability example does not make sense.
« Reply #3 on: April 23, 2024, 12:24:42 pm »
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 much
higher 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.

« Last Edit: April 23, 2024, 01:44:40 pm by youngda9 »

The following users thanked this post: osflores@qdusa.com

#### osflores@qdusa.com

• Newbie
• Posts: 7
• Country:
##### Re: LTSPice LoopGain2 Circuit Stability example does not make sense.
« Reply #4 on: April 23, 2024, 03:03:50 pm »
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?

#### osflores@qdusa.com

• Newbie
• Posts: 7
• Country:
##### Re: LTSPice LoopGain2 Circuit Stability example does not make sense.
« Reply #5 on: April 23, 2024, 03:29:39 pm »
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!
« Last Edit: April 23, 2024, 03:44:27 pm by osflores@qdusa.com »

#### moffy

• Super Contributor
• Posts: 2035
• Country:
##### Re: LTSPice LoopGain2 Circuit Stability example does not make sense.
« Reply #6 on: April 23, 2024, 11:31:30 pm »
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?
No 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.

The following users thanked this post: osflores@qdusa.com

#### RFDx

• Regular Contributor
• Posts: 167
• Country:
##### Re: LTSPice LoopGain2 Circuit Stability example does not make sense.
« Reply #7 on: April 24, 2024, 07:31:16 am »
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.

The following users thanked this post: osflores@qdusa.com

#### osflores@qdusa.com

• Newbie
• Posts: 7
• Country:
##### Re: LTSPice LoopGain2 Circuit Stability example does not make sense.
« Reply #8 on: April 24, 2024, 04:09:44 pm »
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.

#### osflores@qdusa.com

• Newbie
• Posts: 7
• Country:
##### Re: LTSPice LoopGain2 Circuit Stability example does not make sense.
« Reply #9 on: April 24, 2024, 04:18:11 pm »
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.

Smf