Skip to content
Tutorials Center
My learning

Topics

Lesson 19 of 37 · Root Locus and Frequency Response

Root Locus Basics

Learn what the root locus is, how closed-loop poles move as the gain K grows, and how to trace and read a locus numerically with NumPy.

In a feedback loop, the closed-loop poles decide everything: stability, speed, overshoot. But they depend on the controller gain, and you rarely know the right gain in advance. The root locus answers the question "where do the closed-loop poles go as I turn the gain knob from 0 to infinity?" It is a plot of all possible pole positions, one curve per pole, parametrized by the gain K.

Walter Evans invented the method in 1948, long before computers could solve polynomials quickly. Today you can trace a locus with a few lines of NumPy, but the rules for sketching it by hand remain the best way to build intuition about how poles, zeros and gain interact. This lesson sets up the idea and the numerical recipe; the next lesson gives the sketching rules.

All code in this track runs in your browser (Pyodide with NumPy and SciPy). The control library is not available, so we build the tools ourselves, which is also the best way to understand them.

The setup

Take a unity-feedback loop with a gain K in front of the plant. Let the open-loop transfer function be L(s) = K·N(s)/D(s). The closed-loop poles are the roots of the characteristic equation:

TEXT
1 + K·N(s)/D(s) = 0     which is the same as     D(s) + K·N(s) = 0

At K = 0 the equation is D(s) = 0, so the closed-loop poles sit exactly on the open-loop poles. As K grows, the N(s) term takes over and the poles are dragged toward the open-loop zeros. Poles that find no zero run off to infinity along straight-line asymptotes.

flowchart LR
    R["r"] --> S(("+/-"))
    S -->|"e"| K["K"]
    K --> G["N(s) / D(s)"]
    G --> Y["y"]
    Y --> S

Unity feedback with a variable gain K. The root locus tracks the roots of D(s) + K N(s) = 0.

Tracing a locus numerically

For a plant G(s) = 1/(s(s+2)), we have N = 1 and D = s² + 2s. The characteristic polynomial is s² + 2s + K. Let us ask NumPy for its roots at several gains.

Python Closed-loop poles for several gains

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

You should see the poles start at 0 and -2, slide toward each other along the real axis, meet at -1 when K = 1, and then split into a complex-conjugate pair -1 ± j√(K-1) that climbs vertically forever. The meeting point is called a breakaway point.

Reading the locus

Each point on the locus is a possible closed-loop pole, so you can read performance straight from its position:

Position of the pole What it tells you
Real part (distance left of the imaginary axis) Decay rate: farther left means a faster response
Imaginary part Oscillation frequency of that mode
Angle from the negative real axis, θ Damping ratio ζ = cos θ
Distance from the origin Natural frequency ωn
In the right half plane Unstable

For a complex pole pair, ζ = cos θ is the key trick. A radial line from the origin at 45° marks ζ ≈ 0.707, a classic design target with about 4.3% overshoot for a pure second-order system.

Choosing the gain for a target damping

To pick a gain, find where the locus crosses the radial line for the damping you want. Numerically that is a scan: sweep K, compute the poles, and keep the first gain whose damping drops to the target.

Python Find K for a damping ratio of 0.707

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Analytically, the poles are -1 ± j√(K-1), so ζ = 1/√K. Setting ζ = 0.707 gives K = 2. The scan should land on that gain, give or take the 0.01 step.

What the gain cannot do

The locus also shows limits. For this plant the locus is a vertical line at Re(s) = -1 for all K > 1. You can make the oscillation faster by raising K, but the decay rate stays fixed at 1. No pure gain can move the poles left of that line. To change the shape of the locus you need to add poles or zeros, which is exactly what lead and lag compensators and PID controllers do.

A positive-gain root locus assumes negative feedback. If the feedback sign is positive, or K is negative, you get the complementary (180°-shifted) locus. Most rules in this track assume K ≥ 0.

A bigger sweep at a glance

For plants of higher order, you tabulate or plot the poles. This one tabulates the locus of G(s) = 1/(s(s+1)(s+2)) so you can see how the branches bend toward the right half plane.

Python Locus of a third-order plant

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The real-axis poles at 0 and -1 merge and break away near K ≈ 0.385, and a complex pair crosses into the right half plane at K = 6. That crossing is the gain limit for stability, a number we derive exactly in the next lesson.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. Where do the closed-loop poles sit when K = 0?

    At K = 0 the characteristic equation D(s) + K N(s) = 0 reduces to D(s) = 0, whose roots are the open-loop poles.
  2. 2. A closed-loop complex pole makes an angle θ with the negative real axis. What is the damping ratio?

    For a pole at -ζωn ± jωn√(1-ζ²), the angle from the negative real axis satisfies cos θ = ζ.
  3. 3. For G(s) = 1/(s(s+2)) with gain K, what is the damping ratio of the closed loop for K > 1?

    The characteristic polynomial s² + 2s + K gives ωn = √K and 2ζωn = 2, so ζ = 1/√K.
  4. 4. What happens to poles that have no open-loop zero to reach as K grows?

    Branches end at zeros (finite or at infinity). Extra poles head to infinity along straight-line asymptotes.

Summary

  • The root locus plots the roots of D(s) + K·N(s) = 0 for K from 0 to infinity.
  • Branches start at open-loop poles (K = 0) and end at open-loop zeros or at infinity.
  • Pole position gives decay rate, frequency, and damping (ζ = cos θ).
  • A pure gain moves poles only along the locus; shaping it requires adding poles or zeros.
  • NumPy's np.roots on D + K·N is all you need to trace a locus numerically.

Next: Root Locus Rules and Examples