I am trying to understand the theory behind gain and phase margins from Bode Plots for a system with negative feedback:

For the above system, the transfer function is:

\(\frac{KG(s)}{1+KG(s)}\)

The poles of this equation determine the stability, and these poles occur at any s such that KG(s) = -1.

I understand that when all poles are in the left-hand plane (negative real part) the system is stable, when any pole is in the right-hand plane the system is unstable, and when any pole is on the imaginary axis the system is at best marginally stable.

If we let s=jω (i.e. confine ourselves to s along the imaginary axis), we can draw the Bode plot. If there exists ω=φ such that |KG(jφ)| = 1 and ∠(KG(jφ)) = -180°, then we know that s=jφ must be a pole. Since this pole lies on the imaginary axis, we can say that the system is (at best) marginally stable.

I think what I have written above is correct, but if there is anything I am misunderstanding please correct me

Now what I do not understand is what happens if the Bode plot does not pass through 0dB when the phase is -180°? How can you get any information about the poles in this situation (other than knowing that they're not on the imaginary axis)? Surely all you have is information about KG(s) for s along this axis?

I've read the usual stuff on gain and phase margins, but can't find any proper justification for these rules in terms of the positions of the poles.

I would really appreciate any help!

Thanks!