3.2.3. Root locus diagrams

Root locus diagrams show where the roots of the characteristic equation lie for different values of controller gain. The control library has a built-in function for plotting these diagrams.

[1]:
import control
[2]:
from matplotlib import pyplot as plt
[3]:
%matplotlib inline
[4]:
s = control.tf([1, 0], 1)
[5]:
def rlocus(order, tau_p, K):
    Gp = 1/(tau_p*s + 1)**order
    Gc = 1

    L = Gp*Gc
    CL = K*L/(1 + K*L)
    control.root_locus(L);
    control.pzmap(CL)
    plt.title('')
[6]:
from ipywidgets import interact
[7]:
interact(rlocus, order=(1, 5), tau_p=(0.1, 2.), tau_i=(1., 20), K=(0.01, 200))
[7]:
<function __main__.rlocus(order, tau_p, K)>
Ignoring fixed y limits to fulfill fixed data aspect with adjustable data limits.
../../_images/2_Control_2_Laplace_domain_analysis_of_control_systems_Root_locus_diagrams_7_3.png
[ ]: