ENع
←Routh-Hurwitz test
Lesson 23 · Steady-state error and stability

The Routh-Hurwitz test

15 min11 steps5 questionsIntermediate
About this lesson

Is a closed loop stable? You could solve for every pole, but a fourth-order equation is hard by hand. The Routh-Hurwitz test answers with simple arithmetic: build a small table from the coefficients and count the sign changes in its first column. Work it for a gain K in front of a plant with poles at −1, −2, −3 and −4: K = 60 is stable, K = 216 is not.

You'll learn to

Tick what you feel confident about. These self-checks do not affect your lesson score.

Fig 23 · Interactive
01 / 11

Does the loop stay stable?

A gain K = 60 drives a plant with poles at −1, −2, −3 and −4, and the output is fed back. The plant alone is stable. Closing the loop moves the poles. Does every one stay in the left half of the s-plane?

loop        unity feedback, gain K = 60
plant       G(s) = 1 / ((s+1)(s+2)(s+3)(s+4))
open-loop   poles −1, −2, −3, −4 (all stable)

The lesson "What stability means: bounded input,
bounded output" showed the rule: stable means
every closed-loop pole has a negative real part.
Loading figure…
or ← →
Read the lesson step by step
  1. Does the loop stay stable?

    A gain K = 60 drives a plant with poles at −1, −2, −3 and −4, and the output is fed back. The plant alone is stable. Closing the loop moves the poles. Does every one stay in the left half of the s-plane?

    loop        unity feedback, gain K = 60
    plant       G(s) = 1 / ((s+1)(s+2)(s+3)(s+4))
    open-loop   poles −1, −2, −3, −4 (all stable)
    
    The lesson "What stability means: bounded input,
    bounded output" showed the rule: stable means
    every closed-loop pole has a negative real part.
  2. The characteristic polynomial

    The closed-loop poles are the roots of 1 + K·G(s) = 0. Multiplied out: s⁴ + 10s³ + 35s² + 50s + 84 = 0. A fourth-order equation has no easy formula. Routh's test counts the unstable roots without finding them.

    1 + K·G(s) = 0
    (s+1)(s+2)(s+3)(s+4) + K = 0
    s⁴ + 10s³ + 35s² + 50s + (24 + K) = 0
    
    K = 60:  s⁴ + 10s³ + 35s² + 50s + 84 = 0
    
    This is the characteristic polynomial.
    Its roots are the closed-loop poles.
  3. A quick first check

    First, glance at the coefficients. If one is missing or has a different sign from the rest, the loop cannot be stable. Here all five are positive, so we go on. From third order up, this alone does not prove stability.

    coefficients   1  10  35  50  84
    all present?   yes
    same sign?     yes, all positive
    
    necessary for stability, not enough:
    s³ + s² + s + 2 has every coefficient
    positive and still two poles in the right
    half: its Routh column is 1, 1, −1, 2.
  4. Seed the first two rows

    Label one row for each power of s, from s⁴ down to s⁰. Deal the coefficients alternately into the top two rows: 1, 35, 84 on the s⁴ row and 10, 50 on the s³ row. A missing entry counts as 0.

    s⁴ |  1   35   84
    s³ | 10   50    0
    s² |
    s¹ |
    s⁰ |
    
    row s⁴: coefficients 1st, 3rd, 5th
    row s³: coefficients 2nd, 4th (pad with 0)
  5. Each new entry: cross-multiply

    Every new entry uses the two rows above it: cross-multiply with the first column, subtract, divide by the first entry of the row just above. (10·35 − 1·50) / 10 = 30. (10·84 − 1·0) / 10 = 84.

    s⁴ |  1   35   84
    s³ | 10   50    0
    s² | 30   84
    
    b1 = (10·35 − 1·50) / 10 = 300 / 10 = 30
    b2 = (10·84 − 1·0) / 10 = 840 / 10 = 84
    
    the divisor is always the first entry of
    the row just above (here 10)
  6. Down to the last row

    The same rule, one row at a time. s¹: (30·50 − 10·84) / 30 = 22. s⁰: (22·84 − 30·0) / 22 = 84. The table always has one row per power, so it stops at s⁰.

    s⁴ |  1   35   84
    s³ | 10   50    0
    s² | 30   84
    s¹ | 22
    s⁰ | 84
    
    c1 = (30·50 − 10·84) / 30 = 660 / 30 = 22
    d1 = (22·84 − 30·0) / 22 = 84
  7. Read the first column

    Now read only the first column, top to bottom: 1, 10, 30, 22, 84. Routh's rule: the number of sign changes equals the number of closed-loop poles in the right half-plane. No sign changes, so no unstable poles. The loop is stable.

    first column   1, 10, 30, 22, 84
    signs          +  +  +  +  +
    sign changes   0
    
    Routh: sign changes = poles with positive
    real part. 0 → stable.
  8. Check by solving

    As a check, solve the quartic numerically. The poles are −0.37 ± 1.81j and −4.63 ± 1.81j, all in the left half. The step response settles at 60/84 = 0.71. Routh gave the same verdict without one root.

    numerical roots of s⁴ + 10s³ + 35s² + 50s + 84
      −0.37 ± 1.81j
      −4.63 ± 1.81j
    all real parts negative → stable
    
    step response y(t) → K / (24 + K) = 0.71
    slowest pair decays like e^(−0.37 t):
    settling time ≈ 4 / 0.37 ≈ 11 s
    (the 2 % rule of thumb).
  9. Turn the gain up to 216

    Now K = 216. Only the last coefficient changes, to 24 + 216 = 240, but it flows down the table. The s¹ entry becomes (30·50 − 10·240) / 30 = −30.

    s⁴ + 10s³ + 35s² + 50s + 240 = 0
    
    s⁴ |  1   35   240
    s³ | 10   50    0
    s² | 30   240
    s¹ | −30
    s⁰ | 240
    
    c1 = (30·50 − 10·240) / 30 = −900 / 30 = −30
    d1 = (−30·240 − 30·0) / −30 = 240
  10. Two sign changes: unstable

    First column: 1, 10, 30, −30, 240. The sign flips twice, + to − and back to +, so two poles sit in the right half. Solving confirms 0.33 ± 2.59j. The output swings wider and wider: the loop is unstable.

    first column   1, 10, 30, −30, 240
    signs          +  +  +  −  +
    sign changes   2  → 2 poles in the right half
    
    numerical roots
      0.33 ± 2.59j   (real part > 0)
      −5.33 ± 2.59j
    
    the growing term e^(0.33 t) wins: y(t)
    oscillates with ever larger swings
  11. The whole test in Python

    The test is a short loop: deal out two rows, build each next row, keep the first column, count sign changes. A zero in that column would divide by zero; the lesson 'Routh special cases and finding the gain limit' fixes that.

    def routh_first_column(c):
        rows = [c[0::2], c[1::2] + [0]]
        rows[0] += [0] * (len(rows[1]) - len(rows[0]))
        while len(rows) < len(c):
            a, b = rows[-2], rows[-1]
            rows.append([(b[0] * a[j + 1] - a[0] * b[j + 1]) / b[0]
                         for j in range(len(a) - 1)] + [0])
        return [r[0] for r in rows]
    
    def sign_changes(col):
        return sum(1 for x, y in zip(col, col[1:]) if x * y < 0)
    
    for K in (60, 216):
        col = routh_first_column([1, 10, 35, 50, 24 + K])
        print(K, [round(v, 2) for v in col], sign_changes(col))
    
    # prints
    # 60 [1, 10, 30.0, 22.0, 84.0] 0
    # 216 [1, 10, 30.0, -30.0, 240.0] 2

Quiz Unlocks after the last step.