The root locus, invented by Walter R. Evans in 1948, is the classical graphical technique for showing exactly how a closed-loop system's poles โ the roots of the characteristic equation 1 + KยทG(s)H(s) = 0 โ move through the complex s-plane as a real gain K sweeps from 0 to infinity. This simulation builds the real characteristic polynomial from whatever open-loop poles and zeros you place, then solves for its exact roots at every gain using a DurandโKerner numerical root-finder, so every branch you see is a genuinely computed trajectory rather than a hand-drawn sketch. Because a system is stable exactly when every closed-loop pole has negative real part, the locus directly shows the real range of K for which the loop stays stable, and pinpoints the critical gain K_crit at which a branch crosses the imaginary axis into the shaded right-half-plane.
The ร markers are the open-loop poles (roots of the denominator of G(s)H(s)) and the โ markers are the open-loop zeros. As K rises from 0, each branch starts exactly at an open-loop pole; branches either terminate at an open-loop zero or run off to infinity along straight asymptotes whose angles and shared centroid follow the standard root-locus construction rules. The filled amber dots are the actual closed-loop poles at the current gain K โ solved numerically, not interpolated โ and the shaded right half of the plane is the unstable region.
Drag any ร (pole) or โ (zero) directly on the plot, or type exact coordinates in the side panel; the locus recomputes live. Use + Pole / + Zero to add more (zeros can't outnumber poles for a physically realizable system), and Remove mode to click a marker away. Move the K slider to slide the live pole markers along the actual computed locus, or press Animate K to sweep it automatically. K max controls how far the sweep and the K slider search.
For the classic example G(s)H(s) = K / [s(s+2)(s+4)] loaded by default, RouthโHurwitz analysis predicts the loop goes unstable exactly at K = 48 โ and this simulation's bisection search on the numerically tracked branch finds the same K_crit โ 48 purely from root positions, with no algebra at all. Adding a zero (try the "Add a zero" preset) pulls a branch back toward the left half-plane, which is exactly why lead compensators โ built from an extra zero โ are used to stabilize marginal systems.
The root locus is a plot, in the complex s-plane, of every root of the closed-loop characteristic equation 1 + KยทG(s)H(s) = 0 as the real, non-negative gain K varies continuously from 0 to infinity. It was introduced by Walter R. Evans in 1948 specifically so control engineers could see how feedback gain affects closed-loop pole locations โ and therefore stability and transient response โ without having to factor a new polynomial by hand for every candidate gain. This simulation performs that same exact root-solving numerically at every K instead of by hand.
At K = 0, the characteristic equation 1 + KยทG(s)H(s) = 0 reduces to just the denominator of G(s)H(s) equal to zero โ so the closed-loop poles are exactly the open-loop poles. As K โ โ, the equation is dominated by the numerator, so roots approach the open-loop zeros. If there are fewer zeros than poles, the "extra" branches have nowhere finite to go and instead diverge to infinity along straight-line asymptotes, whose angles are (2k+1)ยท180ยฐ/(nโm) and whose common origin (the centroid) is (ฮฃpoles โ ฮฃzeros)/(nโm), where n is the pole count and m the zero count.
A linear system is stable if and only if every closed-loop pole has strictly negative real part โ i.e. sits in the left half of the s-plane, shaded white here versus the red-tinted right half. As K increases along a branch, the moment that branch's real part crosses zero into the shaded region is the critical gain K_crit: for K below it the system is stable, for K above it that branch has gone unstable. This simulation finds K_crit by scanning the computed locus for a sign change in a branch's real part, then refining it with bisection on the exact numerically tracked root.
Yes. From your placed poles and zeros it builds the monic denominator polynomial Den(s) and numerator polynomial Num(s), forms the exact characteristic polynomial Den(s) + KยทNum(s) for a swept sequence of K values, and finds all of that polynomial's complex roots simultaneously using the DurandโKerner iteration โ a genuine numerical polynomial root-finding method. Consecutive K samples are warm-started from the previous roots and matched by nearest distance so each branch stays continuous, exactly the same continuity a hand-drawn locus assumes.
If any open-loop pole already sits in the right half-plane (positive real part) and no zero or nearby pole reshapes the locus fast enough, the corresponding branch can remain in the right half-plane for small K, or a branch can cross into it very early. The "Complex pair" preset in this simulation loads poles at 1 ยฑ 2j โ already unstable in open loop โ so you can see how much (or how little) feedback gain is needed, if any, to pull that branch back into the stable region.
Control engineers use the root locus to choose a gain K that places closed-loop poles where they want them โ for example, far enough left for a fast response, or with a damping ratio that limits overshoot. It also motivates compensator design: adding a zero (as in a lead compensator) bends branches toward the left half-plane and can stabilize a marginally stable plant, while adding a pole (lag compensation) does the opposite locally but can improve steady-state accuracy. This is why nearly every classical control-systems course builds the root locus by hand before ever touching a computer.