# Cadence gain and phase margin

I am trying to figure out the stability of an amplifier, for which I have to calculate the loop gain and make sure its not negative for instability. In Cadence one can use 'stb' analysis to calculate loop gain. The loop gain and phase looks as follows The circuit: In this case the 0 dB gain is at roughly 9.2 MHz and the phase margin is negative 5 degrees, indicating unstable behavior. But if I try to calculate phase margin from direct plot form, I do not get a value of phase margin as shown below: Can anyone throw light on this problem?

• Your bodeplot will be easier to read if you use a logarithmic X-axis (for the frequency). You might have to re-do the simulation using a logarithmic frequency sweep to get a nice plot. Also show your circuit. loop gain starting at -180 degrees just look at the phase change compared to DC or a very low frequency because essentially, the phase change is what matters (assuming stability at DC). Nov 9, 2020 at 14:57
• What is the problem? The BODE plot gives a negative margin (-5 deg). What is the result of the stb analysis? A phase of -180deg for low frequencies (and DC) is correct because a DC stable operating point requires negative feedback.
– LvW
Nov 9, 2020 at 15:19
• @Bimpelrekkie I added the circuit and changed the x-axis to logarithmic
– RAN
Nov 9, 2020 at 15:27
• @LvW The Bode plot is actually the loop gain, which is the result of stb analysis. The problem is direct plot does not give me the phase margin as shown in the picture
– RAN
Nov 9, 2020 at 15:29
• Plotting the loop gain is sometimes "problematic" You have to restore the correct DC operational point and the proper loading at the opening. And the (normal) input signal must be set to zero. I am afraid, your simulation setup is not correct. WHERE did you OPEN the loop?
– LvW
Nov 9, 2020 at 16:00