Stability criteria: find the feedback gain limit

Connect the Routh-Hurwitz criterion, Nyquist stability test, and gain and phase margins. Find when a three-lag feedback system settles, sustains oscillation, or becomes unstable.

By 12 min read

What you will learn

  • Derive the characteristic polynomial of a unity negative-feedback loop.
  • Use a Routh array to find the stable gain range.
  • Distinguish decaying motion from marginal oscillation and BIBO instability.
  • Count Nyquist encirclements with an explicit direction convention.
  • Calculate gain and phase margins and handle missing crossovers.

Before you start

More feedback gain can turn a settling response into a growing oscillation. For the model in this lesson, that change happens at K = 10.

You will find that boundary three ways: a Routh array, a Nyquist curve, and gain and phase margins. Each uses a different view of the same feedback system.

Ask whether stronger feedback still settles

A controller compares a target with a measured output, then multiplies the error by K. Increasing K makes its immediate correction larger. The plant still takes time to respond.

That delay in the response matters. At some frequencies, accumulated phase lag makes the correction reinforce an oscillation. The feedback control lesson introduces error correction; here we check whether the resulting motion decays.

Two definitions keep the question precise:

  • Asymptotic internal stability: every zero-input state response approaches zero.
  • Bounded-input, bounded-output stability (BIBO): every bounded input produces a bounded output from zero initial state.

For a minimal continuous-time rational model, poles strictly in the left half-plane give both properties. Imaginary-axis poles require separate care. Illinois ECE 486's stability notes introduce the pole test and Routh criterion.

Define the plant and characteristic polynomial

Use three first-order lags in series. Their time constants are 1 s, 0.5 s, and 1/3 s. Each has unit DC gain, so their product also has unit DC gain.

G(s) = 1 / [(1 + s)(1 + s/2)(1 + s/3)] = 6 / [(s + 1)(s + 2)(s + 3)]

Time uses seconds and s has units of inverse seconds. The numerical coefficients suppress the corresponding powers of seconds. Input and output use compatible normalized units, which makes K and the loop transfer L dimensionless.

This teaching model represents accumulated lag. Its parameters serve the example; they do not come from a fitted robot.

Fix unity negative feedback: e = r − y, u = Ke, y = Gu. The block-diagram rules give:

L(s) = KG(s),   T(s) = Y(s)/R(s) = L(s) / [1 + L(s)]
T(s) = 6K / [s³ + 6s² + 11s + 6(1 + K)]

Call the denominator p(s). For K > 0, the constant numerator cannot cancel any root. At K = 0, T is identically zero; p still describes the internal plant modes at −1, −2, and −3 per second.

Apply the Routh-Hurwitz criterion

The Routh array counts right-half-plane roots without finding each root. When its ordinary construction has no zero first entry, count sign changes down the first column. Each change contributes one right-half-plane root.

For this cubic, arrange the coefficients as follows, initially assuming K ≠ 10:

RowFirst entrySecond entry
s³111
s²66(1 + K)
s¹[6 × 11 − 6(1 + K)] / 6 = 10 − K0
s⁰6(1 + K)0

Within the lab's nonnegative gain range, every entry in the first column is positive exactly when 0 ≤ K < 10. At K = 4, the column is 1, 6, 6, 30: no sign changes and all modes decay.

At K = 12, the signs are +, +, −, +. Two sign changes mean two right-half-plane roots. Positive polynomial coefficients alone would miss this instability.

Resolve the zero row and imaginary-axis poles

At K = 10, the entire s¹ row becomes zero. The next ordinary division would fail. Stop that calculation and factor the polynomial directly:

p(s) = s³ + 6s² + 11s + 66 = (s + 6)(s² + 11)
s = −6, +j√11, −j√11

The two imaginary-axis modes oscillate at √11 ≈ 3.316625 rad/s. They are distinct roots, so the homogeneous response stays bounded, but need not approach zero. This behavior is marginal, with no asymptotic decay of those modes.

The closed-loop transfer at K = 10 is not BIBO stable. A bounded sinusoidal input at the resonant frequency can produce an output with growing amplitude. A quiet finite simulation cannot establish BIBO stability for every bounded input.

Use poles and zeros to connect these roots to time responses. For this model, the three gain regions are:

GainCharacteristic modesResult
0 ≤ K < 10Three left-half-plane rootsAsymptotically stable
K = 10One negative real root and two simple imaginary rootsMarginal homogeneous motion; not BIBO
K > 10Two right-half-plane rootsUnstable

Count Nyquist encirclements with a direction

Evaluate L(jω) over negative and positive frequencies. Plot its real and imaginary parts on two axes. The critical point −1 matters because 1 + L = 0 there.

Use this convention: follow increasing ω from −∞ to +∞, and let N count net clockwise encirclements of −1. Close the frequency contour through the right half-plane; this strictly proper loop maps its infinite arc to the origin.

Let P count open-loop right-half-plane poles, and Z count closed-loop right-half-plane poles. Provided the contour avoids poles and the curve avoids −1, the Nyquist relation is Z = P + N. Illinois ECE 486's Nyquist derivation uses this clockwise convention.

Our plant has P = 0. Below K = 10, the full curve has N = 0. Above K = 10, it has two clockwise encirclements, so Z = 2.

Real coefficients give L(−jω) = conjugate(L(jω)). The negative-frequency branch completes the count; counting only the positive branch loses part of the contour. At K = 10, the curve passes through −1, so the usual non-crossing count is undefined.

Locate the negative-real crossing

Substitute s = jω into the denominator:

(jω + 1)(jω + 2)(jω + 3) = (6 − 6ω²) + j(11ω − ω³)

For K > 0, a negative-real crossing occurs when the imaginary part vanishes at a positive frequency. Solve ω(11 − ω²) = 0. The positive solution is ωₚ = √11; ω = 0 instead gives the positive point L(0) = K.

At √11, the denominator is −60. Therefore:

L(j√11) = 6K / (−60) = −K/10

The crossing moves from −0.4 at K = 4 to −1 at K = 10, then −1.2 at K = 12. This calculation places the stability boundary exactly; the plot illustrates it with sampled curves.

Calculate the gain margin

The gain margin is the multiplicative gain change that makes loop magnitude one at a −180-degree phase crossing. In this model, scaling positive K leaves that crossing frequency unchanged.

GM = 1 / |L(jωₚ)| = 10/K,   GM in dB = 20 log₁₀(10/K), for K > 0

At K = 4, GM = 2.5, or 7.958800 dB. Multiplying 4 by 2.5 reaches K = 10, where strict stability ends. A smaller positive multiplier keeps this model below that boundary.

At K = 12, GM = 0.833333, or −1.583625 dB. The loop already has unstable modes. This factor describes a gain reduction to the boundary; strict stability requires a further reduction.

At K = 0, every loop value is zero and phase is undefined. This lab reports the margins as undefined: multiplying zero by a finite factor cannot reach K = 10. Gain margin is a ratio, so an additive change of 10 has a different meaning.

Calculate the phase margin

The gain crossover frequency ω꜀ satisfies |L(jω꜀)| = 1. The phase margin measures how far the loop phase at that crossover lies above −180 degrees. MathWorks' margin documentation defines both margins and their crossover frequencies.

For positive K, the continuous positive-frequency phase is:

|L(jω)| = 6K / √[(1 + ω²)(4 + ω²)(9 + ω²)]
φ(ω) = −atan(ω) − atan(ω/2) − atan(ω/3)
PM = 180° + φ(ω꜀), with φ converted to degrees

Magnitude strictly decreases for ω > 0 and starts at K. This gives three crossover cases:

  • K > 1: one positive gain crossover; compute its phase margin.
  • K = 1: unity magnitude only at DC, ω = 0. The lab reports this separately. Extending the formula to DC would give 180 degrees.
  • 0 ≤ K < 1: no unity-magnitude crossover. The lab supplies no positive-frequency phase margin.

At K = 4, ω꜀ ≈ 2.063851 rad/s and PM ≈ 35.425420°. At K = 10, crossover reaches √11 and PM is zero. At K = 12, PM ≈ −5.572316°.

Bode plots and loop shaping place magnitude and phase on a frequency axis. Use that view to compare a gain change with a controller that adds phase lead.

These margin signs agree with the Routh test for this plant. Other loops can have unstable open-loop poles or multiple crossovers. Use the full stability criterion in those cases; Illinois' frequency-response notes explain why a simple phase-margin rule needs care.

Compare the stability tests in the lab

One loop, three stability checks

How much feedback gain is too much?

Change K for a fixed three-lag plant. Compare the Routh test, the Nyquist curve, and the gain and phase margins.

4.0

L(s) = 6K / [(s + 1)(s + 2)(s + 3)], with unity negative feedback. Signals and gain are normalized; time is in seconds. Readouts round to six decimal places.

Positive frequenciesNegative frequencies× Critical point (-1, 0)○ Phase crossing
Full Nyquist curve at loop gain 4.000000The blue solid branch uses positive frequencies; the orange dashed branch uses negative frequencies. Arrows follow increasing frequency from negative infinity to positive infinity. The cross marks minus one on the real axis. Both axes use equal scales; the curve starts and finishes at its zero high-frequency limit. The negative-real crossing is -0.400000 at frequencies plus and minus square root of eleven radians per second.-505-505Re LIm L
Follow the arrows from negative to positive frequency. The curve uses sampled values and its known zero limit; the pole count comes from the analytic model.
Critical-point zoom of the Nyquist curve at loop gain 4.000000The blue solid branch uses positive frequencies; the orange dashed branch uses negative frequencies. Arrows follow increasing frequency from negative infinity to positive infinity. The cross marks minus one on the real axis. This window clips portions of the curve and cannot show the complete encirclement count. The negative-real crossing is -0.400000 at frequencies plus and minus square root of eleven radians per second.-2-10-101Re LIm L
The negative-real crossing is -0.400000. This fixed zoom shows its position relative to -1, while clipping the rest of the curve.
Closed-loop stability
Asymptotically stable
RHP poles
0
Imaginary-axis poles
0
Clockwise encirclements
0
Gain margin (factor)
2.500000
Gain margin (dB)
7.958800
Phase margin (deg)
35.425420
Gain crossover (rad/s)
2.063851
Phase crossover (rad/s)
3.316625
Crossing Re L
-0.400000
Routh array for the characteristic polynomial
RowFirst entrySecond entry
s³1.00000011.000000
s²6.00000030.000000
s¹6.0000000.000000
s⁰30.0000000.000000
Characteristic roots (1/s)
ModeRealImaginary
1-5.0000000.000000
2-0.500000-2.397916
3-0.5000002.397916

The first column is positive and there are no clockwise encirclements. All three internal modes decay for this model.

Start at K = 4. Check the positive Routh column, the crossing at −0.4, and the factor of 2.5 remaining before the boundary. Select Stability boundary, then Unstable feedback, and follow the same quantities.

The first diagram shows the whole sampled curve with equal axis scales. The second clips it to a fixed window around −1. Arrows follow increasing frequency on both branches; use the full curve to reason about encirclements.

Select Below unity gain to see stable motion without a positive-frequency phase margin. Select Feedback off to see the zero loop while the internal plant modes still decay. The lab keeps these distinct cases visible.

All predictions assume this exact linear model and feedback connection. Delay, saturation, joint flexibility, or errors in the identified plant can change the result. Margins describe particular gain or phase changes; they do not prove stability against every form of model uncertainty.

Reproduce the margins in Python

This standard-library example evaluates the complex loop directly. It finds each positive gain crossover by bisection; the three selected gains all exceed one.

from math import atan, degrees, log10, sqrt

def crossover(k):
    low, high = 0.0, 16.0
    for _ in range(80):
        w = (low + high) / 2
        magnitude = abs(6*k / ((1j*w+1)*(1j*w+2)*(1j*w+3)))
        if magnitude > 1:
            low = w
        else:
            high = w
    return (low + high) / 2

for k in (4, 10, 12):
    w = crossover(k)
    pm = 180 - degrees(atan(w) + atan(w/2) + atan(w/3))
    if abs(pm) < 0.0000005:
        pm = 0.0
    gm = 10 / k
    crossing = 6*k / ((1j*sqrt(11)+1)*(1j*sqrt(11)+2)*(1j*sqrt(11)+3))
    print(f'K={k}: pivot={10-k:.6f}, crossing={crossing.real:.6f}, GM={gm:.6f}')
    print(f'  crossover={w:.6f} rad/s, PM={pm:.6f} deg, GM={20*log10(gm):.6f} dB')

Output:

K=4: pivot=6.000000, crossing=-0.400000, GM=2.500000
  crossover=2.063851 rad/s, PM=35.425420 deg, GM=7.958800 dB
K=10: pivot=0.000000, crossing=-1.000000, GM=1.000000
  crossover=3.316625 rad/s, PM=0.000000 deg, GM=0.000000 dB
K=12: pivot=-2.000000, crossing=-1.200000, GM=0.833333
  crossover=3.597679 rad/s, PM=-5.572316 deg, GM=-1.583625 dB

Try it yourself

Exercise 1. Set K = 5. Find the Routh first column, the negative-real crossing, and the gain margin in factor and dB form. Does multiplying the gain by exactly its margin give asymptotic stability?

Check the gain calculation

The first column is 1, 6, 5, 36, so all modes decay. The crossing is −0.5. The gain margin is 2, or 6.020600 dB.

Multiplying K by two reaches K = 10. That reaches marginal homogeneous oscillation, so strict asymptotic stability requires a smaller positive gain.

Exercise 2. At K = 12, the plant has no open-loop right-half-plane poles. How many clockwise Nyquist encirclements should you find? What multiplicative gain reduction reaches the boundary, and is the boundary BIBO stable?

Check the unstable-loop diagnosis

The Routh first column is 1, 6, −2, 78. Two sign changes give Z = 2. Since P = 0 and Z = P + N, the full Nyquist curve makes two clockwise encirclements.

Multiply the gain by 10/12 = 5/6 to reach K = 10. That is a one-sixth reduction, about 16.67%. Use a smaller nonnegative gain to obtain asymptotic stability; the boundary is not BIBO stable because its imaginary-axis modes can resonate with a bounded input.

Sources and further study

Next, use step-response characteristics to judge the speed and overshoot of a response that passes the stability check. A settling response can still move too slowly or overshoot too far for the task.