Routh array calculator
Build the Routh–Hurwitz table of a characteristic polynomial and count its right-half-plane roots without solving for them, including both special cases.
- Poles of G(s)
- −16.01−0.91110
- Zeros of G(s)
- −2.727
- DC gain G(0)
- ∞
- Closed-loop poles at this K (1)
- −13.01−1.952 ± 2.407j
- Stability
- Closed loop stable: every pole is in the left half-plane.
Closed-loop characteristic polynomial D(s) + K·N(s): p(s) = 0.00024s³ + 0.00406s² + 0.0145s + 0.03
| Row | 1 | 2 | Sign |
|---|---|---|---|
| s³ | 0.00024 | 0.0145 | + |
| s² | 0.00406 | 0.03 | + |
| s¹ | 0.012727 | 0 | + |
| s⁰ | 0.03 | 0 | + |
- Sign changes in the first column
- 0
- Right-half-plane roots
- 0
- Imaginary-axis roots
- 0
- Left-half-plane roots
- 3
−13.01−1.952 ± 2.407j
The numerical roots agree with the table.
Same result in code
% MATLAB has no built-in Routh table; check the root count directly.
p = [0.00024 0.00406 0.0145 0.03];
r = roots(p)
nRHP = sum(real(r) > 0)import numpy as np
p = [0.00024, 0.00406, 0.0145, 0.03]
r = np.roots(p)
print(r, np.sum(r.real > 0))MATLAB uses the Control System Toolbox; Python uses python-control 0.10 or later (pip install control).
What this calculator computes
By default the table uses the closed-loop characteristic polynomial D(s) + K·N(s) of the system above; you can also type any polynomial directly.
The number of sign changes in the first column equals the number of right-half-plane roots. For s⁴ + s³ + 2s² + 2s + 3 a zero appears in the first column; replacing it with ε gives the column 1, 1, ε, −3/ε, 3, with two sign changes, so two roots lie in the right half-plane.
How to read the result
- Zero in the first column (rest of the row not zero): the zero is replaced by a small positive ε and the table continues. Entries are shown by their leading behaviour as ε → 0⁺, which fixes their signs.
- Row of zeros: the row above gives the auxiliary polynomial A(s); its derivative replaces the zero row. A(s) is a factor of the polynomial, and its roots are symmetric about the origin, so this case signals roots on the imaginary axis or mirror pairs.
- Roots at s = 0 (a zero constant term) are factored out first and counted on the imaginary axis.
Method and conventions
- Entries are carried as truncated series in ε, so cancellations that only show up at higher order in ε are still resolved exactly instead of depending on one small number.
- The counts are cross-checked against the numerical roots of the same polynomial, which are listed below the table.
Coefficients must be numbers; to find the stable range of a symbolic gain K, use the root locus calculator, which computes it directly.