control.root_locus

control.root_locus(sys, kvect=None, xlim=None, ylim=None, plotstr=None, Plot=True, PrintGain=None, grid=None, **kwargs)

Root locus plot

Calculate the root locus by finding the roots of 1+k*TF(s) where TF is self.num(s)/self.den(s) and each k is an element of kvect.

Parameters:
  • sys (LTI object) – Linear input/output systems (SISO only, for now).
  • kvect (list or ndarray, optional) – List of gains to use in computing diagram.
  • xlim (tuple or list, optional) – Set limits of x axis, normally with tuple (see matplotlib.axes).
  • ylim (tuple or list, optional) – Set limits of y axis, normally with tuple (see matplotlib.axes).
  • Plot (boolean, optional) – If True (default), plot root locus diagram.
  • PrintGain (bool) – If True (default), report mouse clicks when close to the root locus branches, calculate gain, damping and print.
  • grid (bool) – If True plot omega-damping grid. Default is False.
Returns:

  • rlist (ndarray) – Computed root locations, given as a 2D array
  • klist (ndarray or list) – Gains used. Same as klist keyword argument if provided.