Loop gain measurement in pspice

Status
Not open for further replies.
Hi all,
I work as a software architect, but my greatest passion is everything related to audio and electronics. I found this great forum some time ago and I've been busy reading posts here since then...
Thank you to everybody for the massive amount of knowledge poured in this forum!

Now, this is my question.
I'm trying to measure the loop gain on a typical Linn topology, for qualitative analysis of changes on the circuit.
Assuming we mark with IN and FDB the two base nodes of the input diff and with OUT the amp output node, I use these to plot the OLP, CLG and LG during an AC sweep:

OLP = DB(V(OUT)/V(IN,FDB))
CLG = DB(V(OUT)/V(IN))
LG = DB(((V(OUT)/V(IN,FDB))/(V(OUT)/V(IN)))-1)

Is this the right way to measure loop gain with spice?
Thank you.

Enzo
 
I'm not a PSPICE guy, but Jim Thompson has a writeup on loop gain simulation in PSPICE here. I believe that subcircuit uses Middlebrook's method for computing loop gain. I'm not sure if there are subcircuits available for PSPICE using this technique, but the loop gain example in LTspice uses the equations from this article by Tian et al. They give the same results, but using Tian's method, one can orient the loop gain probe in either direction and get the same answer. The Middlebrook approach requires a specific orientation of the probe. Middlebrook's original article from 1975 can be found here. The Tian article is some pretty hairy stuff. The Middlebrook article is much easier to understand.

For LTspice users, the loop gain example is in LoopGain2.asc, in the examples\Educational folder.
 
Thanks Andy - great links!
I naively assumed I could plot the loop gain T = (Aol / Acl) - 1 directly with a formula in Probe since in Pspice I have access to all the relevant quantities without breaking the loop:scratch1:
It looks like it's more complicated than that...

Enzo
 
Hi Enzo,

If you use your formula, you may get results that are pretty close to those obtained using a loop gain probe, but the discrepancy will depend on the specific circuit being tested. Your formula is based on the block diagram description of a feedback system, while the loop gain probe results are based on the "return ratio" concept, which goes back to the original work of Bode.

There is a very good paper by Hurst that clarifies this. One of the problems with the block diagram approach is correctly identifying A and B when there are impedance interactions in the actual circuit components represented by the blocks. So, instead of having to wonder whether A and B have correctly been modified to take into account impedance interactions, it's easier for me to just throw in a loop gain probe and run the loop gain simulation.

If you're having trouble figuring out how to use Jim Thompson's loop gain probe, he posts in the usenet newsgroup sci.electronics.cad, so you might try asking him a question there. He used to be an avid PSPICE fan, but I believe he has switched over to LTspice.
 
Hi Andy,
Well, you gave me the answer I was looking for...
On my original post, I was doubting my approach for reasons similar to the ones you mention (more on a gut feeling level, as I have still a lot to learn about more formal approaches). While trying different compensation methods, I wasn't able to clearly separate the forward path from the feedback: the dominant pole cap second connection had moved from the VAS collector to the output node (it's a low power very fast amp) and there was a classical 5p in parallel the fdb resistor. Initially, to plot LG and phase, I was using two versions of the amp on the same schematic, one of them open loop (with a large LC on the fdb return) but I had the gut feeling that actually there was no "open loop" version to speak of... the forward and return path were working as a whole, so to speak - so I tried to get more reliable results without breaking the loop, but I wasn't sure it was any better.
So, here is attached my last effort. I compared the two - the 'classical' feedback theory, without actually breaking the loop, and the Jim Thompson's probe. They seem to agree up to 1MHz in this case.

Thanks a lot!
Enzo
 

Attachments

  • lgplot.gif
    lgplot.gif
    29.6 KB · Views: 666
enzo88 said:
Well, you gave me the answer I was looking for...

Hi Enzo,

Glad it worked out for you.

When you take the feedback for the Miller integrator from the amp's output, it can cause instability of the Miller loop itself, especially with reactive loads at the amp output. It's a good idea to check the stability of the Miller loop by disabling global feedback (say, with a huge inductor in series with the feedback resistor from output to inverting input), and placing the loop gain probe inside the Miller loop.

You'll probably find that the unity loop gain frequency of the Miller loop is pretty large - say tens of MHz. The phase shift of the output stage can be pretty uncontrolled in that frequency range, so care is advised 🙂.

The TMC approach (first brought up here by Edmond Stuart) can fix this problem nicely.
 
examples loopgain.asc and loopgain2.asc in ltspice are used to plot the open loop gain.
example audioamp.asc is refered as to look the gain and phase margins.

which one is better to be used?

if we have a 30db gain amplifier ,can we plot the open loop gain based on the formula on loopgain example,then go at 30db at the open loop gain graph and look at the phase margin corresponding there??
 
Thanks for the loop gain references

Andy_c,

Thanks for the loop gain references. Along the way, I googled your ETMC reference, and found diy audio engineering web site...I was curious to view more of that thread, but found that registration was disabled...Do you know what the story is?

Thanks...

Dan
 
Loop-breaking techniques, gain margin phase margin

I know this is a several years old question, but someone else may have the same question: I would use loopgain2.asc to look at gain and phase margins. For PM, set the cursor to 0dB, and read how far the phase is above -180. For GM, set the phase cursor to -180, and read how far the gain is below 0dB.

Years of experience using Tian's method at work have proven its correctness to me.
--Russell

examples loopgain.asc and loopgain2.asc in ltspice are used to plot the open loop gain.
example audioamp.asc is refered as to look the gain and phase margins.

which one is better to be used?

if we have a 30db gain amplifier ,can we plot the open loop gain based on the formula on loopgain example,then go at 30db at the open loop gain graph and look at the phase margin corresponding there??
 
Loop-breaking techniques, gain margin phase margin

The probe can be inserted anywhere there is a single signal path in your loop. On either side of the feedback resistor, for instance; many people like to break it in series with the inverting input of the amplifier's diff pair. I think that's a good choice.

The beauty of the Tian method is that it doesn't matter where the probe goes, because all inter-stage loading is preserved.

I've seen people break it between the diff pair and the VAS and get good results. I can't break it there, because I use folded cascode, so I have dual signal paths until I get to the output.

If you have nested loops, then you have to stabilize the loops independently, working from inner-most to outer-most. Marginal stability of an inner loop will not always be apparent in the outer loop's open loop gain/phase.

--Russell

Where do you insert the probe?
What different styles of Power Amplifier require one to examine multiple insertions?
And where do they get inserted?
 
Multiple stability runs

One more important point. AC stability needs to be checked at several points in your signal swing, not just at 0 V. 5 points should do it, or maybe 7.

At 0V
At 1/3 +/- supply
At 2/3 +/- supply
About 1/2 V inside +/- supply

--Russell
 
Status
Not open for further replies.