Design with root locus
Follow closed-loop poles as gain changes and choose damping deliberately. This module has 3 lessons and takes about 2h 25m. Each lesson has a practice exercise that runs real Python in your browser and a short quiz.
Start module 09 in the Learning LabRoot locus rules and gain
Use the characteristic equation to locate branches and breakaway.
For unity feedback with L=K*N(s)/D(s), closed-loop poles solve D(s)+K*N(s)=0. As K varies from zero upward, branches start at open-loop poles and end at open-loop zeros or infinity.
A point is on the positive-gain locus when the phase of N/D is an odd multiple of 180 degrees. The gain is K=1/abs(N/D). A real-axis segment belongs to the locus when the number of real poles and zeros to its right is odd.
For P=1/[s*(s+4)], the characteristic equation is s^2+4*s+K=0. Roots meet at -2 when K=4, then leave the real axis as a conjugate pair with real part -2. The breakaway comes from K=-s*(s+4) and dK/ds=0.
See it in action
import numpy as np
for k in [0.,1.,4.,9.]:
print('Gain:',k,'Poles:',np.roots([1,4,k]))
A root locus is a family of pole locations indexed by controller gain.
Choose gain from a damping target
Match root locus geometry to time-response requirements.
For s^2+4*s+K, wn=sqrt(K) and zeta=2/sqrt(K). Increasing K raises natural frequency but lowers damping ratio. Once poles are complex, their real part remains -2, so the decay envelope does not become faster.
A target zeta=0.5 gives K=16 and poles -2 +/- j*sqrt(12). The standard zero-free second order overshoot is about 16.3%. A different damping target changes both gain and frequency.
If the locus cannot pass through a required region, gain alone is insufficient. Add controller dynamics, such as a lead compensator, or relax a requirement. Do not force a gain to satisfy incompatible pole constraints.
See it in action
import math, numpy as np
desired_zeta = 0.5
k = (2/desired_zeta)**2
print('Gain:',k,'Poles:',np.roots([1,4,k]))
print('wn:',math.sqrt(k),'rad/s')
Use pole geometry to see what gain can and cannot achieve.
Practical: map gain to performance
Build a root plot and compare gain choices in the time domain.
A simple root sweep solves the characteristic polynomial for many positive gains. Plot real part on the horizontal axis and imaginary part on the vertical axis. Use points rather than connecting unordered roots, because root ordering can change between solves.
For the second order example P=1/[s*(s+4)], all positive gains are stable. However, overshoot rises as damping falls, and high gain also increases initial control demand for a unit reference.
Use the same time window and response metrics for candidates K=4, 8, and 16. Explain why pole stability alone cannot choose the best controller.
Your experiment plan
Use the browser editor or the downloadable notebook. All plant data are simulated. Keep a notebook with parameters, predictions, results, and units.
- Plot the full root sweep and mark the three candidates.
- Simulate each unit-step response with numerator [K] and denominator [1,4,K].
- Measure overshoot and settling with the earlier scorecard.
- Compare the chosen gain with the damping-based prediction.
What to hand in
- A root locus scatter plot.
- A time-response scorecard.
- A gain choice linked to both poles and measurements.
Reflect on your results
Which assumption matters most? Describe one result that surprised you and one experiment that would test your explanation.
The automatic exercise checks the core code behaviour. Review observations and written deliverables yourself or with a mentor.
See it in action
import numpy as np
import matplotlib.pyplot as plt
gains = np.linspace(0.1,24,160)
roots = np.array([np.roots([1,4,k]) for k in gains])
plt.scatter(roots.real.ravel(),roots.imag.ravel(),s=5)
plt.axvline(0,color='black'); plt.xlabel('Real part (1/s)'); plt.ylabel('Imaginary part (rad/s)'); plt.show()
Stable controllers still differ in overshoot, settling, and effort.
Free, open and run by a nonprofit.
This page is part of Control Engineering, a free course of 20 modules and 60 lessons in the engineering.fit( ) Learning Lab. The Learning Lab is built and run by engineering.fit( ), a nonprofit founded by Abdullateef Opeyemi Bakare that helps African engineering students gain research experience. You do not need an account or pay a fee to learn.