The Root Locus is a graphical technique for visualizing how the poles of a closed-loop system move when we vary a controller parameter, typically its gain.
In the previous article, we discovered that a system’s poles dictate its fate: if they are in the left half of the complex plane, we are safe; if they cross into the right half, the system becomes unstable and goes up in flames.
There was a fundamental detail we left hanging: physical plants, by themselves, are usually not unstable. An unplugged brushed motor doesn’t explode. A turned-off oven doesn’t oscillate. Instability is caused by us when we try to control them and close the feedback loop.
Today, we are going to learn to read the most important treasure map in control engineering: the map that tells us exactly how much force we can apply to a motor before it goes crazy.
Closing the loop changes the poles
Imagine we have a physical plant with its Transfer Function G(s). We already know how to calculate its poles (the roots of the denominator). These are called open-loop poles. They are fixed and depend on the mass, springs, and friction of your hardware. They don’t change unless you grab an angle grinder and cut off a piece of metal.
Now, we come along with our microcontroller, attach a sensor, and implement a Proportional Controller with a gain K. Basically, we tell the system: “Multiply the error by K and push the motor with that force”.
If we use unity negative feedback and a proportional controller K, the characteristic equation of the entire system changes. Its denominator is determined by:
This has a brutal implication: the poles of the real system (closed-loop) are no longer the same as those of the plant alone. They now depend directly on our software variable K.
If we modify K in our code, the poles move across the complex plane. And if we are not careful, we will push them straight into the right half-plane (the instability zone).
How to read the map
The Root Locus is, literally, drawing with a marker the paths along which the poles will travel as we increase K from 0 to infinity.
Although drawing it by hand requires quite a bit of math, control engineers use software to plot it. To interpret it, you only need to know four basic “traffic laws”:
- Starting Point (K=0): When the controller is off or applies no force, the closed-loop poles coincide exactly with the open-loop poles of the plant (the X’s). Everything starts here.
- Ending Point (K=∞): If we give infinite gain to the controller, the poles inevitably travel towards the zeros of the system (the O’s), or if there aren’t enough zeros, they escape to infinity following straight lines called asymptotes.
- Breakaway Points: Sometimes two branches traveling along the real axis meet and leave the axis as a pair of complex conjugate poles. They don’t necessarily have to be on the imaginary axis; they appear symmetrically above and below the real axis.
- Physical translation: Your system, which was predictable and sluggish (overdamped), has just acquired the ability to oscillate and overshoot (underdamped).
- Imaginary Axis Crossings: When a branch enters the right half-plane, the closed-loop becomes unstable. The crossing defines a stable gain interval; depending on the system, there can be more than one crossing.
A three-pole system
Let’s use the classic example that makes engineering students sweat: a system with three poles (for example: a motor with mechanical inertia, electrical delay in the coil, and a small delay in the sensor filter).
When we draw the Root Locus of this, we see that two of the poles attract each other, meet, and veer off to the right. They head straight for the unstable zone!
So you can see it with your own eyes, I have prepared this simulator. Gradually increase the controller gain K and watch how the red dots (the current poles) move along the map.
What we can read from the graph
If you’ve played with the simulator, you will have noticed several critical things for your career as a hardware programmer:
- More force is NOT always better. This is the rookie trap. “If the motor doesn’t reach the setpoint, I’ll increase the P of the controller”. As we have seen, increasing K makes the system respond faster initially, but at the cost of oscillating more. If you overdo it, the oscillation grows to infinity.
- We can bound the gain. Thanks to this map, we can determine the values of
Kthat keep the poles in the left half-plane and choose a zone that also meets our damping and speed requirements. - We can design a compensator. A PID controller modifies the open-loop poles and zeros: the integral term introduces a pole at the origin, and the combination of terms introduces zeros. By placing them appropriately, we can shape the trajectories to obtain a more suitable response.
Tuning a PID is, at its core, molding and deforming this Root Locus map so that the system does exactly what we want without going crazy.
We have seen what happens when we change the force (K) of our controller. But we are missing one more tool in our analytical arsenal. What happens if what changes is not our controller, but the frequency at which we send commands to the system?