Root locus calculator
See where the closed-loop poles go as the gain K rises from 0, where they cross into the right half-plane, and which range of K keeps the loop stable.
- Poles of G(s)
- −2−10
- Zeros of G(s)
- none
- DC gain G(0)
- ∞
- Closed-loop poles at this K (1)
- −2.325−0.3376 ± 0.5623j
- Stability
- Closed loop stable: every pole is in the left half-plane.
- Stable range of K
- 0 < K < 6
- Imaginary-axis crossings
- K = 6, ω = 1.414 rad/s
- Breakaway / break-in points
- s = −0.4226 (K = 0.3849)
- Asymptotes
- centroid −1, angles 60°, 180°, 300°
Closed-loop poles at K = 1: −2.325−0.3376 ± 0.5623j
K is swept from 0 to 125. × Open-loop poles, ○ Open-loop zeros.
Same result in code
% G(s) = (1) / (s^3 + 3s^2 + 2s)
G = tf([1], [1 3 2 0]);
K = 1;
rlocus(G) % closed-loop poles of 1 + K*G(s) = 0 for K >= 0
p = pole(feedback(K*G, 1))import control as ct
G = ct.tf([1], [1, 3, 2, 0])
K = 1
ct.root_locus_plot(G) # older versions: ct.root_locus(G)
print(ct.poles(ct.feedback(K*G, 1)))MATLAB uses the Control System Toolbox; Python uses python-control 0.10 or later (pip install control).
What this calculator computes
The roots of 1 + K·G(s) = 0, that is D(s) + K·N(s) = 0, for K ≥ 0, drawn as continuous branches that start at the open-loop poles (×) and end at the open-loop zeros (○) or along asymptotes.
For K/(s(s+1)(s+2)) the branches leave the real axis at the breakaway point s = −0.423 (K = 0.385), cross the imaginary axis at ω = √2 rad/s when K = 6, and follow asymptotes at ±60° and 180° from the centroid −1. The loop is stable for 0 < K < 6.
How to read the result
- The filled markers are the closed-loop poles at the current K; drag the gain slider to move them along the branches.
- Imaginary-axis crossings list the gain and frequency at which a pole pair reaches the axis: that gain is the edge of the stable range, and the frequency is the oscillation you would see there.
- The stable range of K is computed from those crossings and checked at a gain inside each interval, so it also covers loops that are stable only between two gains.
Method and conventions
- Each gain step solves the characteristic polynomial from scratch, then matches the new roots to the previous ones with a minimum-total-distance assignment. The gain step is halved wherever a pole would jump, so branches stay continuous through breakaway points.
- Crossings solve Im[D(jω)·N(−jω)] = 0 for ω; breakaway points solve N·dD/ds − D·dN/ds = 0 and keep the solutions with real, positive K.
Only K ≥ 0 and negative feedback are drawn (no complementary locus). The plot view is chosen automatically; zoom with the mouse wheel or a pinch.