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 . The argument principle says that if travels clockwise once around a closed contour, the image encircles the origin clockwise times, where and are the zeros and poles of inside the contour. Take the contour around the whole right half-plane (up the axis, back along a huge semicircle, with small detours around poles on the axis). The poles of are the poles of ; its zeros are the closed-loop poles. Shifting by one, " encircles " is the same as " encircles ". Hence:
| Symbol | Meaning |
|---|---|
| open-loop poles of in the right half-plane (known from the model) | |
| clockwise encirclements of by the Nyquist plot , from to (counter-clockwise counts negative) | |
| closed-loop poles in the right half-plane: the loop is stable if and only if |
For a stable open loop () the rule is simply: the plot must not encircle . For an open loop with unstable poles, it must encircle counter-clockwise exactly times. The plot for negative frequencies is the mirror image of the positive one, , so you draw the positive half and reflect it.
Worked example 1: a stable open loop
Given: .
Find: the range of for a stable closed loop, from the Nyquist plot.
Solve: has magnitude and phase . The phase reaches at , , where . The plot crosses the negative real axis at . With , stability needs that crossing to the right of : . At the crossing is at and the plot encircles twice clockwise: unstable closed-loop poles.
Check: the figure shows both cases; Routh–Hurwitz on gives the same limit, .
Worked example 2: an unstable open loop
Given: (one unstable pole, ), .
Find: the stable range of .
Solve: and the plot runs from there to the origin through the left half of the plane (its phase rises from to at and returns to as ). The only real-axis crossing at a finite frequency is . If , i.e. , the closed curve (both halves) goes around once counter-clockwise: , , stable. If , and : 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 , stable exactly when . python-control counts the encirclements for us (count, clockwise positive):
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 is the safety margin:
- gain margin: where the plot crosses the negative real axis at , the gain can grow by before it reaches (for above: , gain margin 2, );
- phase margin: where the plot crosses the unit circle, the extra phase lag that would rotate that point onto ;
- the minimum distance from to the curve is , where is the peak sensitivity; between 1.3 and 2 is a common robustness target.
A pure delay has and phase : 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 (the shape of with the frequency scaled), and set the DC gain . At () the lab reads a gain margin of at the phase crossover (). At (, just below 8) the gain margin is ; at () it turns negative and the lab reports the closed loop unstable.
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 (, , ) behaves like . Predict the phase-crossover frequency , the plant gain there (, ) and the critical proportional gain 8.
Simulation. Evaluate the measured-style data in Python: compute 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 supply, a peak sine from a generator, a two-channel scope or a frequency-response analyser. Sweep from to and record gain and phase. Expect the point at and a gain there of with 5 % capacitors. Closing the loop with an inverting gain stage of 6 (gain margin ) gives a ringing step response; a gain just above 8 oscillates at about .
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 the plot must encircle .
- Mixing up directions: python-control's
countis clockwise positive, . - 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
- : find the phase-crossover frequency and the critical gain from .
- A stable open loop crosses the negative real axis at . What is the gain margin in dB?
- An open loop has two unstable poles. How many counter-clockwise encirclements of does a stabilising loop need?
Answer
- ; imaginary part zero at , where : critical .
- , i.e. .
- Two (, so ).
Test yourself
In , is
- the number of open-loop zeros
- the number of closed-loop poles in the right half-plane
- the gain margin
- the number of integrators
crosses the negative real axis at
For the closed loop is stable when
- never
- always
What does a pure time delay do to the Nyquist plot?
- scales it
- rotates each point clockwise by without changing its magnitude
- adds an encirclement
- mirrors it