5.7. Root locus controller design#

The basic characteristic of the transient response of a closed-loop system is closely related to the location of the closed-loop poles. If the system has a variable loop gain, then the location of the closed-loop poles depends on the value of the loop gain chosen. It is important, therefore, that the designer know how the closed-loop poles move in the s-plane as the loop gain is varied. From the design viewpoint, in some systems simple gain adjustment may move the closed-loop poles to desired locations. Then the design problem may become merely the selection of an appropriate gain value. If, however, the gain adjustment alone does not yield a desired result, the addition of a compensator to the system will become necessary. A simple method for finding the roots of the characteristic equation has been developed by W. R. Evans and is used extensively in control engineering. In this method, called the root-locus method, the roots of the characteristic equation are plotted for all values of a system parameter. The roots corresponding to a particular value of this parameter can then be located on the resulting graph. Note that the parameter is usually the gain, but any other variable of the open-loop transfer function may be used. Unless otherwise stated, we shall assume that the gain of the open-loop transfer function is the parameter to be varied through all values, from zero to infinity. By using the root-locus method. the designer can predict the effects on the location of the closed-loop poles of varying the gain value or adding open-loop poles and/or open-loop zeros. Therefore, it is desired that the designer have a good understanding of the method for generating the root loci of the closed-loop system, both by hand and with the use of computer software.

5.7.1. Root-locus method#

The basic idea behind the root-locus method is that the values of s that make the transfer function around the loop equal to - 1 must satisfy the characteristic equation of the system.

The locus of roots of the characteristic equation of the closed-loop system as the gain is varied from zero to infinity gives the method its name. Such a plot clearly shows the contributions of each open-loop pole or zero to the locations of the closed­ loop poles.

In designing a linear control system, we find that the root-locus method proves quite useful, since it indicates the manner in which the open-loop poles and zeros should be modified so that the response meets system performance specifications. The method is particularly suited to obtaining approximate results very quickly.

5.7.2. Angle and magnitude conditions#

Consider the system shown in Figure 1. The closed-loop transfer function is

\[\begin{align*} \frac{C(s)}{R(s)} &= \frac{G(s}{1 + G(s)H(s)} \label{eq:CL1} \tag{2.15} \end{align*}\]

The characteristic equation for this closed-loop system is obtained by setting the denominator of the right-hand side of Equation \(\ref{eq:CL1}\) equal to zero. That is,

(5.15)#\[\begin{align} 1 + G(s)H(s) = 0 \nonumber \end{align}\]

or

\[\begin{align*} G(s)H(s) = - 1 \label{eq:CL2} \tag{2.17} \end{align*}\]

Here, we assume that G(s)H(s) is a ratio of polynomials in s. Since G(s)H(s) is a complex quantity, Equation \(\ref{eq:CL2}\) can be split into two equations by equating the angles and magnitudes of both sides, respectively, to obtain the following:

Angle condition:

(5.16)#\[\begin{align} \angle G(s)H(s) = \pm 180^0(2k + 1 ) \ \ \ \ k = 0, 1 , 2, \ldots \label{eq:CL3} \end{align}\]

Magnitude condition:\

(5.17)#\[\begin{align} |G(s)H(s)| = 1 \label{eq:CL4} \end{align}\]

The values of s that fulfill both the angle and magnitude conditions are the roots of the characteristic equation, or the closed-loop poles. A plot of the points in the com­plex plane satisfying the angle condition alone is the root locus. The roots of the characteristic equation (the closed-loop poles) corresponding to a given value of the gain can be determined from the magnitude condition. The details of applying the angle and magnitude conditions to obtain the closed-loop poles are presented later in this section.

In many cases, G(s)H(s) involves a gain parameter K, and the characteristic equation may be written as

\[\begin{align*} 1 + \frac{K(s + z_1) ( s +z_2) \ldots ( s + Z_m )} {(s + p_1 ) (s + p_2)\ldots (s + p_n)} &=0 \label{eq:CL5} \tag{2.20} \end{align*}\]

Then the root loci for the system are the loci of the closed-loop poles as the gain K is varied from zero to infinity.

CL

Fig.10 - Closed loop control system.

5.7.3. Root-locus plots with software#

In this section, we present the Python function rlocus to generating root-locus plots.

In plotting root loci deal with the system equation given in the form of Equation \(\ref{eq:CL5}\), which may be written as

(5.18)#\[\begin{align} 1 + K \frac{\rm{num}}{\rm{den}} &=0 \nonumber \end{align}\]

where num is the numerator polynomial and den is the denominator polynomial. Note that both vectors num and den must be written in descending powers of s.

Example: Determine the Bode plot of the transfer function G(s)H(s)

\[\begin{align*} G(s)H(s) &=\frac{K}{s(s+0.5(*s^2+0.6s+10)} \nonumber \end{align*}\]

First we will use the command

r,k = rlocus(sys)

where \(sys\) is the defined system transfer function, \(r\) is the vector of closed loop poles and \(k\) the the vector of corresponding proportional gains.

from control import rlocus,tf
from matplotlib import pyplot as plt


num = [1]
den = [1, 1.1, 10.3, 5, 0]

sys = tf(num,den)
r,k = rlocus(sys)
plt.show()
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[1], line 1
----> 1 from control import rlocus,tf
      2 from matplotlib import pyplot as plt
      5 num = [1]

ModuleNotFoundError: No module named 'control'

With this command, the root-locus plot is drawn on the screen.The gain vector K is automatically determined.

Secondly you can also use

r,k = rlocus(sys, K,xlim=[-8,8],ylim=[-8,8])

where the gain vector \(K\) is specified by the use and the axis of the figure (xlim, ylim) are constraint by the user. This allows the user to obtain a more adequate root locus plot.

import numpy as np 

K = np.linspace(0,1e7,10000)
r,k = rlocus(sys, K,xlim=[-8,8],ylim=[-8,8])
../../_images/848f1a93b8b40ffcf4d3e73bae17bad78bf47fd81675ad35c23bbd6e488706ef.png

utilizes the user-supplied gain vector K. (The vector K contains all the gain values for which the closed-loop poles are to be computed.) The x and y axis are limited to make the plot informative.