TExcelTAD
Home › Control Systems & Automation › The Nyquist Stability Criterion

The Nyquist Stability Criterion

A magnetic levitation rig holds a steel ball under an electromagnet. Without control the ball falls or sticks: the plant has a pole in the right half-plane. A Bode plot of the loop does not tell you directly whether a controller stabilises it, the usual "phase margin" reading assumes a stable open loop, and Routh–Hurwitz cannot handle the pure time delay of a sampled controller. The Nyquist criterion handles all three: unstable open loops, delays and measured frequency responses. It is also where gain and phase margins come from.

From the argument principle to the criterion

Closed-loop poles are the zeros of 1+L(s)1 + L(s). The argument principle says that if ss travels clockwise once around a closed contour, the image F(s)=1+L(s)F(s) = 1 + L(s) encircles the origin clockwise N=Z−PN = Z - P times, where ZZ and PP are the zeros and poles of FF inside the contour. Take the contour around the whole right half-plane (up the jωj\omega axis, back along a huge semicircle, with small detours around poles on the axis). The poles of 1+L1 + L are the poles of LL; its zeros are the closed-loop poles. Shifting by one, "1+L1 + L encircles 00" is the same as "LL encircles −1-1". Hence:

Z=N+PZ = N + P
Symbol Meaning
PP open-loop poles of L(s)L(s) in the right half-plane (known from the model)
NN clockwise encirclements of −1-1 by the Nyquist plot L(jω)L(j\omega), ω\omega from −∞-\infty to ∞\infty (counter-clockwise counts negative)
ZZ closed-loop poles in the right half-plane: the loop is stable if and only if Z=0Z = 0

For a stable open loop (P=0P = 0) the rule is simply: the plot must not encircle −1-1. For an open loop with PP unstable poles, it must encircle −1-1 counter-clockwise exactly PP times. The plot for negative frequencies is the mirror image of the positive one, L(−jω)=L(jω)‾L(-j\omega) = \overline{L(j\omega)}, so you draw the positive half and reflect it.

Worked example 1: a stable open loop

Given: L(s)=K(s+1)3L(s) = \frac{K}{(s + 1)^3}.

Find: the range of K>0K > 0 for a stable closed loop, from the Nyquist plot.

Solve: L(jω)=K(1+jω)3L(j\omega) = \frac{K}{(1 + j\omega)^3} has magnitude K(1+ω2)3/2\frac{K}{(1 + \omega^2)^{3/2}} and phase −3arctan⁡ω-3\arctan\omega. The phase reaches −180∘-180^\circ at arctan⁡ω=60∘\arctan\omega = 60^\circ, ω=3=1.732 rad/s\omega = \sqrt{3} = 1.732\ \text{rad/s}, where ∣L∣=K/23=K/8\lvert L \rvert = K/2^3 = K/8. The plot crosses the negative real axis at −K/8-K/8. With P=0P = 0, stability needs that crossing to the right of −1-1: K<8K < 8. At K=12K = 12 the crossing is at −1.5-1.5 and the plot encircles −1-1 twice clockwise: Z=2+0=2Z = 2 + 0 = 2 unstable closed-loop poles.

Check: the figure shows both cases; Routh–Hurwitz on s3+3s2+3s+1+Ks^3 + 3s^2 + 3s + 1 + K gives the same limit, 9>1+K9 > 1 + K.

-2 4 8 12 -8 -4 4 8 Re L Im L -1 K = 4 K = 12 dashed: negative frequencies; dots: w = 0.5 rad/s

Worked example 2: an unstable open loop

Given: L(s)=K(s−1)(s+3)L(s) = \frac{K}{(s - 1)(s + 3)} (one unstable pole, P=1P = 1), K>0K > 0.

Find: the stable range of KK.

Solve: L(0)=−K/3L(0) = -K/3 and the plot runs from there to the origin through the left half of the plane (its phase −180∘+arctan⁡ω−arctan⁡(ω/3)-180^\circ + \arctan\omega - \arctan(\omega/3) rises from −180∘-180^\circ to −150∘-150^\circ at ω=3\omega = \sqrt{3} and returns to −180∘-180^\circ as ω→∞\omega \to \infty). The only real-axis crossing at a finite frequency is ω=0\omega = 0. If −K/3<−1-K/3 < -1, i.e. K>3K > 3, the closed curve (both halves) goes around −1-1 once counter-clockwise: N=−1N = -1, Z=−1+1=0Z = -1 + 1 = 0, stable. If K<3K < 3, N=0N = 0 and Z=1Z = 1: one unstable closed-loop pole. Feedback must be strong enough to stabilise the plant: an unstable plant comes with a minimum gain, not only a maximum one.

Check: the closed-loop characteristic polynomial is s2+2s−3+Ks^2 + 2s - 3 + K, stable exactly when K>3K > 3. python-control counts the encirclements for us (count, clockwise positive):

python · try it yourself
import numpy as np
import control as ct

def report(L, P, label):
    N = ct.nyquist_response(L).count
    cl = ct.poles(ct.feedback(L, 1))
    print(f"{label:22s}: N = {N:2d}, P = {P}, Z = N + P = {N + P}, "
          f"closed-loop poles {', '.join(f'{p.real:.3f}{p.imag:+.3f}j' for p in np.sort_complex(cl))}")

for K in (4, 7.9, 12):
    report(ct.tf([K], [1, 3, 3, 1]), 0, f"K={K}/(s+1)^3")
for K in (2, 6):
    report(ct.tf([K], [1, 2, -3]), 1, f"K={K}/((s-1)(s+3))")
w = np.sqrt(3)
print(f"L(j*sqrt(3)) for K = 4: {(4 / (1 + 1j * w) ** 3).real:.4f} {(4 / (1 + 1j * w) ** 3).imag:+.4f}j")
K=4/(s+1)^3           : N =  0, P = 0, Z = N + P = 0, closed-loop poles -2.587+0.000j, -0.206-1.375j, -0.206+1.375j
K=7.9/(s+1)^3         : N =  0, P = 0, Z = N + P = 0, closed-loop poles -2.992+0.000j, -0.004-1.725j, -0.004+1.725j
K=12/(s+1)^3          : N =  2, P = 0, Z = N + P = 2, closed-loop poles -3.289+0.000j, 0.145-1.983j, 0.145+1.983j
K=2/((s-1)(s+3))      : N =  0, P = 1, Z = N + P = 1, closed-loop poles -2.414+0.000j, 0.414+0.000j
K=6/((s-1)(s+3))      : N = -1, P = 1, Z = N + P = 0, closed-loop poles -1.000-1.414j, -1.000+1.414j
L(j*sqrt(3)) for K = 4: -0.5000 -0.0000j

Margins are distances to the critical point

The Nyquist plot explains the margins of the next lesson. For a stable open loop the distance between the curve and −1-1 is the safety margin:

  • gain margin: where the plot crosses the negative real axis at −a-a, the gain can grow by 1/a1/a before it reaches −1-1 (for K=4K = 4 above: a=0.5a = 0.5, gain margin 2, 6.0 dB6.0\ \text{dB});
  • phase margin: where the plot crosses the unit circle, the extra phase lag that would rotate that point onto −1-1;
  • the minimum distance from −1-1 to the curve is 1/Ms1/M_s, where Ms=max⁡∣S∣M_s = \max \lvert S \rvert is the peak sensitivity; MsM_s between 1.3 and 2 is a common robustness target.

A pure delay e−sτe^{-s\tau} has ∣e−jωτ∣=1\lvert e^{-j\omega\tau} \rvert = 1 and phase −ωτ-\omega\tau: it rotates every point of the plot clockwise by an angle that grows with frequency, without changing its magnitude. That is why delay eats phase margin and why the Nyquist criterion, which needs no polynomial, handles it exactly.

Intuition with the Bode lab

The Bode lab shows the same loop in Bode form. Choose three real poles, all at 100 Hz100\ \text{Hz} (the shape of K(s+1)3\frac{K}{(s + 1)^3} with the frequency scaled), and set the DC gain KK. At K=12 dBK = 12\ \text{dB} (3.9813.981) the lab reads a gain margin of 6.1 dB6.1\ \text{dB} at the phase crossover 173.2 Hz173.2\ \text{Hz} (=3×100 Hz= \sqrt{3} \times 100\ \text{Hz}). At 18 dB18\ \text{dB} (7.9437.943, just below 8) the gain margin is 0.1 dB0.1\ \text{dB}; at 19 dB19\ \text{dB} (8.9138.913) it turns negative and the lab reports the closed loop unstable.

6040200-20-40-60-80|L| (dB)-270-180-90090100m1101001k10k100k1Mf (Hz)phase (deg)PM 27.4 degGM 6.1 dB|L| exactphase exactasymptotesunity-feedback closed loop: stable

Guided lab: find the critical gain from a measured response

Hand calculation. A plant made of three identical RC low-pass stages separated by buffers (R=10 kΩR = 10\ \text{k}\Omega, C=160 nFC = 160\ \text{nF}, fc=99.5 Hzf_c = 99.5\ \text{Hz}) behaves like 1(s/ωc+1)3\frac{1}{(s/\omega_c + 1)^3}. Predict the phase-crossover frequency 3fc=172 Hz\sqrt{3} f_c = 172\ \text{Hz}, the plant gain there (1/81/8, −18.1 dB-18.1\ \text{dB}) and the critical proportional gain 8.

Simulation. Evaluate the measured-style data in Python: compute L(jω)L(j\omega) at a list of frequencies and look for the phase crossover; or use the Bode lab as above.

What you would measure. Op-amp buffers on a current-limited ±12 V\pm 12\ \text{V} supply, a 1 V1\ \text{V} peak sine from a generator, a two-channel scope or a frequency-response analyser. Sweep from 10 Hz10\ \text{Hz} to 1 kHz1\ \text{kHz} and record gain and phase. Expect the −180∘-180^\circ point at 172 Hz±5 %172\ \text{Hz} \pm 5\,\% and a gain there of −18 dB±0.5 dB-18\ \text{dB} \pm 0.5\ \text{dB} with 5 % capacitors. Closing the loop with an inverting gain stage of 6 (gain margin 2.5 dB2.5\ \text{dB}) gives a ringing step response; a gain just above 8 oscillates at about 172 Hz172\ \text{Hz}.

Hazards and safe setup. Low-voltage, current-limited supply; the oscillating loop saturates the op-amps at the rails, which is harmless at these levels; keep signal amplitudes within the op-amps' input range.

Pitfalls

  • Applying "no encirclement" to an unstable open loop: with P>0P > 0 the plot must encircle −1-1.
  • Mixing up directions: python-control's count is clockwise positive, Z=N+PZ = N + P.
  • Forgetting the negative-frequency half: encirclements are counted on the closed curve.
  • Poles on the imaginary axis (integrators): the contour detours around them, which adds a large arc at infinity; count it.

Practice

  1. L(s)=Ks(s+1)(s+2)L(s) = \frac{K}{s(s + 1)(s + 2)}: find the phase-crossover frequency and the critical gain from L(jω)L(j\omega).
  2. A stable open loop crosses the negative real axis at −0.25-0.25. What is the gain margin in dB?
  3. An open loop has two unstable poles. How many counter-clockwise encirclements of −1-1 does a stabilising loop need?
Answer
  1. L(jω)=K−3ω2+j(2ω−ω3)L(j\omega) = \frac{K}{-3\omega^2 + j(2\omega - \omega^3)}; imaginary part zero at ω=2=1.414 rad/s\omega = \sqrt{2} = 1.414\ \text{rad/s}, where L=−K/6L = -K/6: critical K=6K = 6.
  2. 1/0.25=41/0.25 = 4, i.e. 12.0 dB12.0\ \text{dB}.
  3. Two (N=−2N = -2, so Z=−2+2=0Z = -2 + 2 = 0).

Test yourself

In Z=N+PZ = N + P, ZZ is

  1. the number of open-loop zeros
  2. the number of closed-loop poles in the right half-plane
  3. the gain margin
  4. the number of integrators

L=K(s+1)3L = \frac{K}{(s+1)^3} crosses the negative real axis at

  1. −K/3-K/3
  2. −K/8-K/8
  3. −K-K
  4. −K/3-K/\sqrt{3}

For L=K(s−1)(s+3)L = \frac{K}{(s-1)(s+3)} the closed loop is stable when

  1. K<3K < 3
  2. K>3K > 3
  3. never
  4. always

What does a pure time delay do to the Nyquist plot?

  1. scales it
  2. rotates each point clockwise by ωτ\omega\tau without changing its magnitude
  3. adds an encirclement
  4. mirrors it