Nyquist stability criterion
The Nyquist stability criterion, named for Harry Nyquist, provides a simple test for stability of a closed-loop control system by examining the open-loop system's Nyquist plot. Stability of the closed-loop control system may be determined directly by computing the poles of the closed-loop transfer function. In contrast, the Nyquist stability criterion allows stability to be determined without computing the closed-loop poles.

# Background
We consider a system whose open loop transfer function (OLTF) is G(s); when placed in a closed loop with feedback H(s), the closed loop transfer function (CLTF) then becomes G/(GH+1). The case where H=1 is usually taken, when investigating stability, and then the "Characteristic Equation', used to predict stability,  becomes G+1=0. Stability can be determined by examining the roots of this equation eg using the Routh array, but this method is somewhat tedious. Conclusions can also be reached by examining the OLTF, using its Bode plots or, as here, polar plot of the OLTF using the Nyquist criterion , as follows.
Any Laplace domain transfer function \mathcal{T}(s) can be expressed as the ratio of two polynomials
We define:
- Zero: the zeros of \mathcal{T}(s) are the roots of N(s) = 0, and
- Pole: the poles of \mathcal{T}(s) are the roots of D(s) = 0.
Stability of \mathcal{T}(s) is determined by its poles or simply the roots of the characteristic equation: D(s) = 0. For stability, the real part of every pole must be negative. If \mathcal{T}(s) is formed by closing a negative feedback loop around the open-loop transfer function \mathcal{F}(s) = \frac{A(s)}{B(s)}, then the roots of the characteristic equation are also the zeros of 1 + \mathcal{F}(s), or simply the roots of  A(s) + B(s).

# Cauchy's argument principle
From complex analysis, specifically the argument principle, we know that a contour \Gamma_s drawn in the complex s plane,  encompassing but not passing through any number of zeros and poles of a function F(s), can be mapped to another plane (the F(s) plane) by the function F(s). The resulting contour \Gamma_{F(s)} will encircle the origin of the F(s) plane N times, where N = Z - P. Z and P are respectively the number of zeros and poles of F(s) inside the contour \Gamma_s. Note that we count encirclements in the F(s) plane in the same sense as the contour \Gamma_s and that encirclements in the opposite direction are negative encirclements.
Instead of Cauchy's argument principle, the original paper by Harry Nyquist in 1932 used a less elegant approach. The approach explained here is similar to the approach used by Leroy MacColl (Fundamental theory of servomechanisms 1945) or by Hendrik Bode (Network analysis and feedback amplifier design 1945), both of whom also worked for Bell Laboratories. This approach appears in most modern textbooks on control theory.

# The Nyquist criterion
We first construct The Nyquist Contour, a contour that encompasses the right-half of the complex plane:
- a path traveling up the j\omega axis, from 0 - j\infty to 0 + j\infty.
- a semicircular arc, with radius r \to \infty, that starts at 0 + j\infty and travels clock-wise to 0 - j\infty.
The Nyquist Contour mapped through the open-loop transfer function F(s) yields a Nyquist plot for F(s). By the Argument Principle, the number of clock-wise encirclements of the origin must be the number of zeros of F(s) in the right-half complex plane minus the poles of F(s) in the right-half complex plane. If we look at the contour's encirclements of -1 instead of the origin, we find the difference between the number of poles and zeros in the right-half complex plane of 1+F(s). Recalling that the zeros of 1+F(s) are the poles of the close-loop system, and noting that the poles of 1+F(s) are same as the poles of F(s), we now state The Nyquist Criterion:
Given a Nyquist contour \Gamma_s, let P be the number of poles of F(s) encircled by \Gamma_s, and Z be the number of zeros of F(s) encircled by \Gamma_s -- therefore the number of poles of \mathcal{T}(s) enclosed by \Gamma_s.  The resultant contour in the F(s)-plane, \Gamma_{F(s)} shall encircle (clock-wise) the point (-1 + j0) N times such that N = Z - P. For Stability of a System, we must have Z = 0 , ie. the number of closed loop poles in the right half of s-plane must be zero. Hence, the number of anticlockwise encirclements about  -1+j0  must be equal to P, the number of open loop poles in the right half plane.

# The Nyquist criterion for systems with poles on the imaginary axis
The above consideration was conducted with an assumption that the open-loop transfer function F(s) doesn't have any pole on the imaginary axis (i.e. poles of the form 0+j\omega). This results from the requirement of the argument principle that the contour cannot pass through any pole of the mapping function. The most common case are systems with integrators (poles at zero).
To be able to analyze systems with poles on the imaginary axis, the Nyquist Contour can be modified to avoid passing through the point 0+j\omega. One way to do it is to construct a semicircular arc with radius r \to 0 around 0+j\omega, that starts at 0 + j (\omega-r) and travels anticlockwise to 0 + j (\omega+  r). Such a modification implies that the phasor F(s) travels along an arc of infinite radius by -l\pi, where l is the multiplicity of the pole on the imaginary axis.

# Summary
- If the open-loop transfer function F(s) has a zero pole of multiplicity l, then the Nyquist plot has a discontinuity at \omega = 0. During further analysis it should be assumed that the phasor travels l times clock-wise along a semicircle of infinite radius. After applying this rule, the zero poles should be neglected, i.e. if there are no other unstable poles, then the open-loop transfer function F(s) should be considered stable.
- If the open-loop transfer function F(s) is stable, then the closed-loop system is unstable for any encirclement of the point -1.
- If the open-loop transfer function F(s) is unstable, then there must be one counter clock-wise encirclement of -1 for each pole of F(s) in the right-half of the complex plane.
- The number of surplus encirclements (greater than N+P) is exactly the number of unstable poles of the closed-loop system
- However, if the graph happens to pass through the point -1+j0, then deciding upon even the marginal stability of the system becomes difficult and the only conclusion that can be drawn from the graph is that there exist zeros on the j\omega axis.