65. 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)
[9]:
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('')
[10]:
from ipywidgets import interact
[11]:
interact(rlocus, order=(1, 5), tau_p=(0.1, 2.), tau_i=(1., 20), K=(0.01, 200))
[11]:
<function __main__.rlocus(order, tau_p, K)>
[ ]: