Ken Kundert wrote on Sep 5th, 2016, 10:28am:Gain and phase margin only make sense when applied to the loop gain of a feedback system. And loop gain is a characteristic of the loop. It can, and should, be measured when the loop is intact. You can estimate loop gain by opening the loop, but you should not, because the estimate can become quite inaccurate as the gain approaches unity.
The basic issue with trying to measure loop gain by opening the loop is that you have changed the circuit. So the answer to the question "Why the gain and phase margin results different between when I measure them with the loop open and closed?" the answer is always "You changed the circuit when you opened the loop."
Measuring the loop gain even when the loop is closed is tricky. To do it simply you would need to identify an ideal controlled source in your circuit and use it to measure the return ratio (the return ratio is the same as loop gain, but it is only defined when there is an ideal controlled source in the loop that, when removed, breaks the loop). You generally do not have such a source. In that case the measurement becomes complicated. Several measurements must be made in order to compensate for the fact that the signal injection point is not ideal. The process and the corrections are tedious, but fortunately, they have been automated in Spectre.
Thanks for taking the time to answer Ken. Yes, I have read earlier threads discussing stb analysis on this forum where you have said that breaking the loop is not the right way to go about things. Good to know. I think the technique to measure loop gain I have seen most people use is where they insert a LC network and an AC source into the broken loop. I will use lstb in HSPICE and STB in spectre going forward.
Ken Kundert wrote on Sep 5th, 2016, 10:28am:When you compare your open loop estimates of the loop gain with the loop gain computed by Spectre's stb analysis, they should generally agree at low frequencies, but you can expect them to deviate near and beyond the unity gain frequency. Thus, your comment that Spectre's stb analysis is not getting the expected loop gain at DC seems to suggest a problem somewhere.
-Ken
The loop gain I calculated when I connected the opamp in non-inverting configuration with a β of 0.33 was around 60 dB (open loop gain was 70 dB and closed loop as expected of around 10 dB). When I use the iprobe element connected in the feedback path, between the output node and the feedback network, and run stb I get a loop gain magnitude of about 36 dB. As you said, this should agree with my calculated value, at least for lower frequencies. Maybe I am connecting something wrong. I will try to post a screenshot of my setup soon.