Root Locus · Lesson
English translation
Execution setup
The Python option uses python-control. If the module is missing, run %pip install control==0.10.2 in a Colab or Jupyter code cell.
Topics covered
Examine how choosing a gain relates to pole locations and the time response.
Overall workflow
Open-loop model → candidate gains → closed-loop poles → time response
Paths of poles as gain changes
The closed-loop poles with unity feedback are the roots of 1+K L(s)=0. The root locus shows how these roots move as K changes.
When choosing a K, examine all poles corresponding to that K together.
Checking pole choices through responses
If any pole has a positive real part, stable step-response metrics cannot be calculated. Even for stable candidates, zeros, residues, and inputs affect the response. Compare damping and speed predicted from poles with the actual curves before selecting a gain.
Closed-loop poles that change with gain
Apply to . Examine the pole map and step response together.
import numpy as np
import matplotlib.pyplot as plt
import control as ctl
s=ctl.tf('s')
G=1/(s*(s+2));t=np.linspace(0,10,1001)
fig,axes=plt.subplots(1,2,figsize=(9,3))
for gain in [1,4,9]:
closed=ctl.feedback(gain*G,1);poles=ctl.poles(closed)
axes[0].scatter(poles.real,poles.imag,marker='x',label=f'K={gain}')
tm,y=ctl.step_response(closed,t);axes[1].plot(tm,y,label=f'K={gain}')
axes[0].set(xlabel='Real',ylabel='Imaginary');axes[1].set(xlabel='Time [s]',ylabel='Output')
for ax in axes:ax.grid();ax.legend()
fig.tight_layout()
Reference example
View more examples