# Confused regarding gain margin and stability

I plotted the bode plots of the transfer function: G(s)= 2.123×10^6 ((0.105s+1.01))/(s^2 (s+12566.37) )

It is as follows:

As can be seen, it shows the gain margin as negative infinity, however loop is said to be stable. I am confused by this as I have studied until now that negative gain or phase margin implies instability. Can someone help me out?

Edit: A photo of the function:

No - the stability margin is positive.

For low frequencies, the phase is -180deg - that means: The minus sign at the summing node is included in your analyses. So you have the correct loop gain function - and the stability limit would be reached when the phase is -360 deg (or 0 deg) for positive magnitudes. No problem at all - you are "deep" in the stability region.

(Note: Only when the minus sign at the summing node is NOT included in the loop gain function - as shown in some books/articles - the stability limit is at -180deg).

Comment: Because you have mentioned the term "gain margin" I have assumed that the shown function (and the plots) is the loop gain of a circuit with feedback - and you are interested to know if the closed-loop will lead to a stable system. Is this correct? If not, the question regarding gain margin makes no sense.

• Hello, thank you for your answer. However, I am still confused regarding this: I have only plotted the open loop transfer function, I didn't define my closed loop anywhere, so from where does the minus sign come into play here Commented May 20, 2022 at 15:20
• I suppose the closed-loop function will have negative feedback - correct? In this case, there is one phase inversion (or 3 or 5...) within the loop. Thats what I can see in your phase response. When the Bode diagram does not include such a sign inversion, the phase of the loop gain function will start at 0 deg.
– LvW
Commented May 20, 2022 at 15:23
• Ah I see, I got it. Thank you very much. Commented May 20, 2022 at 16:05
• Please, can you rewrite the transfer function you have plotted? It looks strange.
– LvW
Commented May 21, 2022 at 8:29
• I must admit that I looked at the function too late - my answer may not be correct.
– LvW
Commented May 21, 2022 at 8:39

This is my interpretation of this.

The inversion in the loop at the summing junction is not included in those stability analysis graphs. If it was then the minimum loop phase would be -180 degrees. The phase margin on the phase graph is measured as how far short the loop phase lag is of -180 degrees at unity gain, measured as 62.2 degrees short of -180 degrees. Therefore the summing junction inversion is not included and the stability limit is taken as -180 degrees.

As the log of frequency axis extends toward infinity to the left, the loop phase plot tends towards -180 degrees. -180 degrees loop phase lag will be reached at infinity and so in reality -180 loop phase lag will never be reached. Without -180 degrees loop phase lag (-360 degrees or 0 degrees if the summing junction inversion is included in the analysis) the system must be stable. However at infinity the gain will have increased to infinity. The gain margin is the number of dBs that must be added to the gain to give a gain of 0dB (unity gain) at the frequency where the loop phase lag is -180 degrees (-360 with the inversion included). So -infinity dBs must be added to the gain (gain margin = -infinity) to bring the gain to unity when the phase is -180 degrees (-360). Of course this all happens at infinity and so is theoretical. But the point is that the system is stable because the loop phase around the complete loop never quite reaches -360 degrees.

• @LvW When the inversion at the summing junction is included in the phase figure it means that the loop phase figure cannot have a value of less than -180 degrees. That phase graph clearly shows that the phase reduces below -180 degrees. How can that be if there is a 180 degree inversion in the loop?
– user173271
Commented May 21, 2022 at 8:36
• Yes - as you can see, I have deleted my comment. The function looks rather strange. I agree to your analysis. I think, when the loop is closed, the whole system is unstable because the phase slope for unity gain (magnitude) is positive
– LvW
Commented May 21, 2022 at 8:42