Root Locus


By Prof. Seungchul Lee
http://iai.postech.ac.kr/
Industrial AI Lab at POSTECH

Table of Contents

1. Motivation for Root Locus



  • For example,


$$\text{System} = {s^2 + s + 1 \over s^3 + 4s^2 + Ks + 1}$$

  • Unknown parameter affects poles
  • Poles of system are values of $s$ when


$$s^3 + 4s^2 + \color{red}{K}s + 1= 0$$


  • What value of $K$ should I choose to meet my system performance requirement?



2. Root Locus

  • Given the open loop transfer function $G(s)$, the typical closed-loop transfer function is





$${KG(s) \over 1 + KG(s)}$$


  • The root locus of an (open-loop) transfer function $G(s)$ is a plot of the locations (locus) of all possible closed-loop poles with some parameter, often a proportional gain $K$, varied between 0 and $\infty$.
  • The basic form for drawing the root locus


$$1 + KG(s) = 0$$

  • In MATLAB, rlocus(G(s))
  • The same denominator system is



$${G(s) \over 1 + KG(s)}$$
  • But you noticed that in the previous example I used




$$ \begin{align*} s^3 + 4s^2 + Ks + 1 &= 0, \qquad \text{not in the correct form}\\\\ 1 + K{s \over s^3 + 4s^2 + 1} &= 1 + KG(s) = 0 \end{align*}$$


  • Equivalent $G(s)$ and the closed loop system





2.1. Definition: Root Locus

  • Root Locus: a graphical representation of closed-loop poles as $K$ varied
  • Based on root-locus graph, we can choose the parameter $K$ for stability and the desired transient response.



  • So why should we care about this?



  • Now that we understand how pole locations affect the system
  • Question: how do we draw root locus ?
    • for more complex system and
    • without calculating poles
  • We will be able to make a rapid sketch of the root locus for higher-order systems without having to factor the denominator of the closed-loop transfer function.
    • You might not use an exact sketch very often in practice, but you will use an approximated one!
    • What does closed loop root locus look like from open loop?
  • The closed-loop system is





$$H(s) = \frac{KG}{1+KG}$$


  • A pole exists when the characteristic polynomial in the denominator becomes zero.


$$1+KG(s) = 0 \implies KG(s) = -1 = 1 \angle (2k+1) \pi, \quad k = 0, \pm1, \pm 2, \cdots$$

  • A value of $s^*$ is a closed loop pole if


$$\begin{cases} \lvert KG(s^*) \rvert = 1 \quad \implies \quad K = \frac{1}{\lvert G(s^*)\rvert}\\\\ \angle KG(s^*) = (2k+1)\pi \end{cases}$$

2.2. Eight Rules

  • There will be 8 rules to drawing a root locus
$$ 1 + KG(s) = 1 + K {{Q(s)}\over{P(s)}} = 0 $$
  • Rule 1: There are $n$ lines (loci) where $n$ is the degree of $Q$ or $P$, whichever greater.
  • Rule 2: As $K$ increases from $0$ to $\infty$, the roots move from the pole of $G(s)$ to the zeros of $G(s)$


$$ P(s) + KQ(s) = 0 $$


  • Poles of $G(s)$ are when $P(s) = 0$, $K = 0$

  • Zeros of $G(s)$ are when $Q(s) = 0$, as $K \rightarrow \infty, P(s) + \infty Q(s) = 0$

  • So closed loop poles travel from poles of $G(s)$ to zeros of $G(s)$




  • Poles and zeros at infinity
    • $G(s)$ has a zero at infinity if $G(s \rightarrow \infty) \rightarrow 0$
    • $G(s)$ has a pole at infinity if $G(s \rightarrow \infty) \rightarrow \infty$
  • Example


$$KG(s) = \frac{K}{s(s+1)(s+2)}$$

  • Clearly, this open loop transfer function has three poles $0, -1, -2$. It has no finite zeros.
  • For large $s$, we can see that


$$KG(s) \approx \frac{K}{s^3}$$

  • So this open loop transfer function has three zeros at infinity
  • Rule 3: When roots are complex, they occur in conjugate pairs (= symmetric about real axis)




  • Rule 4: At no time will the same root cross over its path



  • Rule 5: The portion of the real axis to the left of an odd number of open loop poles and zeros are part of the loci
    • which parts of real line will be a part of root locus?




$$G(s) = {Q(s) \over P(s)} = {\prod (s - z_i)\over \prod (s - p_j)}$$


  • For complex conjugate zero and pole pair $\implies \angle G(\cdot) = 0$




  • For real zeros and poles



  • Rule 6: Lines leave (breakout) and enter (breakin) the real axis at $90\,^{\circ}$
  • Rule 7: If there are not enough poles and zeros to make a pair, then the extra lines go to or come from infinity.





  • Rule 8: Lines go to infinity along asymptotes


$n-m$ = # poles - # zeros = number of lines that go to infinity.

  • The angles of the asymptotes
$$ \phi_{A} = {{2k+1}\over{n-m}} 180\,^{\circ} \quad \text{where } k = 0, 1, \cdots , n-m-1$$
  • The centroid of the asymptotes
$$ \sigma_A = {{\sum \text{finite poles} - \sum \text{finite zeros}}\over {n-m}} $$
  • (brief proof) Lines go to infinity along asymtotes


$$ \begin{align*} G(s) &= {1 \over (s+1)(s+2)} \approx {1 \over s}\cdot{1 \over s} \\\\ \angle G(s) &= \pi + 2k\pi \\ &\approx 0 - 2\alpha = \begin{cases} \pi\\ -\pi\\ \end{cases}\\\\ \therefore \alpha &= {\pi \over 2} \;\text{ or}\; -{\pi \over 2} \end{align*} $$$$$$

$$ \phi_A = {(2k+1)\pi \over n - m}$$




  • (brief proof) The centroid of the asymptotes


$$ \sigma_A = {{\sum \text{finite poles} - \sum \text{finite zeros}}\over {n-m}} $$


Given the system transfer function


$$G(s) = \beta\frac{(s-z_1)(s-z_2)\cdots}{(s-p_1)(s-p_2)\cdots} = \beta \frac{s^m - \left(\sum z_i \right)s^{m-1} + \cdots}{s^n - \left(\sum p_i \right)s^{n-1} + \cdots}, \quad \text{assume }\; n>m$$


For a large value of $s$, $G(s)$ approximately looks like having $n-m$ repeated poles at $\sigma_A$ on the real axis


$$ \begin{align*} G(s) = \beta \frac{s^m - \left(\sum z_i \right)s^{m-1} + \cdots}{s^n - \left(\sum p_i \right)s^{n-1} + \cdots} \; &\approx \;\beta \frac{1}{(s-\sigma_A)^{n-m}} = \beta \frac{1}{s^{n-m} - (n-m) \sigma_A s^{n-m-1} + \cdots}\\\\\\ \left(s^m - \left(\sum z_i \right)s^{m-1} + \cdots \right) \left(s^{n-m} - (n-m) \sigma_A s^{n-m-1} + \cdots \right) \; &\approx \; s^n - \left(\sum p_i \right)s^{n-1} + \cdots \\\\ s^n - \left( \sum z_i + (n-m) \sigma_A \right)s^{n-1} + \cdots \; &\approx \; s^n - \left(\sum p_i \right)s^{n-1} + \cdots \\\\\\ \sum z_i + (n-m) \sigma_A &= \sum p_i \\\\ \therefore \; \sigma_A &= \frac{\sum p_i - \sum z_i}{n-m} \end{align*} $$
  • If $n-m = 1$
$$ \phi_{A} = {{2 \centerdot 0 + 1}\over{1}}180 = 180\,^{\circ}$$




  • If $n-m = 2$
$$ \begin{align*} \phi_{A1} &= {{2 \centerdot 0 + 1}\over{2}}180 = 90\,^{\circ}\\ \phi_{A2} &= {{2 \centerdot 1 + 1}\over{2}}180 = 270\,^{\circ} \\\\ \sigma_A &= {{(-2 - 1) - (0)}\over{2}}= -1.5 \end{align*} $$




  • If $n-m = 3$
$$ \begin{align*} \phi_{A1} &= {{2 \centerdot 0 + 1}\over{3}}180 = 60\,^{\circ}\\ \phi_{A2} &= {{2 \centerdot 1 + 1}\over{3}}180 = 180\,^{\circ}\\ \phi_{A3} &= {{2 \centerdot 2 + 1}\over{3}}180 = 300\,^{\circ}\\\\ \sigma_A &= {{(-1 -2 -3) - (0)}\over{3}}= -2 \end{align*} $$




  • If $n-m = 4$
$$ \begin{align*} \phi_{A1} &= {{2 \centerdot 0 + 1}\over{4}}180 = 45\,^{\circ}\\ \phi_{A2} &= {{2 \centerdot 1 + 1}\over{4}}180 = 135\,^{\circ}\\ \phi_{A3} &= {{2 \centerdot 2 + 1}\over{4}}180 = 225\,^{\circ}\\ \phi_{A4} &= {{2 \centerdot 3 + 1}\over{4}}180 = 315\,^{\circ}\\\\ \sigma_A &= {{(1+2-1-2) - (0)}\over{4}}= 0 \end{align*} $$




2.3. Break-away, Break-in Points

  • Break-away is the point where loci leave the real axis.

  • Break-in is the point where loci enter the real axis.

The method is to maximize and minimizes the gain, $K$, using differential calculus.

  • For all points on the root locus,
$$K = -{1\over{G(s)}}$$
  • When ${dK \over ds} = 0$, $K$ is Break-away and Break-in.
$${d \over ds} {1 \over G(s)} = 0$$
  • Determine the breakaway points
$$G(s) = {1 \over (s+2)(s+4)}$$




$$ \begin{align*} 1 + K{1 \over (s+2)(s+4)} = 0 &\Rightarrow s^2 + 6s + 8 + K = 0 \\ &\Rightarrow s = -3 \pm \sqrt{9 - (8 + K)} = -3 \pm \sqrt{1 - K} \end{align*} $$


  • When $K < 1$ : two solutions, overdamped
  • When $K > 1$ : two complex numbers, underdamped
  • With respect to $K$, (as value of $K$ changes)
    • The number of solutions changes $0 \rightarrow 1 \rightarrow 2 \; \text{ or }\; 2 \rightarrow 1 \rightarrow 0$




$$ \begin{align*} 1 + KG(s) &= 0 \implies K = -{1 \over G(s)}\\\\ {dK \over ds} &= 0 \;\text{at a breakaway point}\\\\ K &= -(s+2)(s+4) = -(s^2 + 6s + 8)\\\\ {dK \over ds} &= -(2s + 6) = 0 \\\\ \therefore s &= -3 \end{align*} $$

2.4. Find Angles of Departure/Arrival for Complex Poles/Zeros


$$G(s) = {s - 0 \over (s - (-1 + i))(s - (-1 - i))}$$




  • Loot at a very small region around the departure point




$$ \begin{align*} \angle G(p) &= \pi + 2k\pi\\\\ \underbrace{\left({3 \over4} \pi + 0 \right)}_{\text{zeros}} - \underbrace{\left( {\pi \over 2} + \theta \right)}_{\text{poles}} &= \pi\\ \\ \therefore \theta &= -{3 \over 4} \pi \end{align*} $$


2.5. Root Locus for Stability

  • Consider the following unstable plant.


$$G(s) = \frac{1}{(s+1)(s-2)}$$

  • Try a proportional controller $K$ to stabilize the system




  • It turns out that we cannot solve this problem with $K$ (proportional controller only)
    • At least one root is always in RHP $\Rightarrow$ unstable



  • How can we make this stable?





3. Root Locus in MATALB


$$G(s) = \frac{s+7}{s(s+5)(s+15)(s+20)}$$
In [1]:
s = tf('s');
G = (s + 7)/(s*(s + 5)*(s + 15)*(s + 20));

[y,tout] = step(G);   % unstable

plot(tout,y), axis tight 
xlabel('t'), title('Unstable step response')

In [2]:
pole(G)
ans =

         0
  -20.0000
  -15.0000
   -5.0000


In [3]:
k = 800;

Gcl = feedback(k*G,1,-1)
pole(Gcl)
[y,tout] = step(Gcl);

plot(tout,y,tout,ones(size(tout)),'k--'), axis tight, ylim([0,1.2])
Gcl =
 
               800 s + 5600
  --------------------------------------
  s^4 + 40 s^3 + 475 s^2 + 2300 s + 5600
 
Continuous-time transfer function.


ans =

 -23.5466 + 0.0000i
 -10.1226 + 0.0000i
  -3.1654 + 3.6708i
  -3.1654 - 3.6708i


In [4]:
pzmap(Gcl)

In [5]:
K = 350;

Gcl = feedback(K*G,1,-1);

pzmap(Gcl)

In [6]:
[y,tout] = step(Gcl);

plot(tout,y,tout,ones(size(tout)),'k--'), 
axis tight, ylim([0,1.2]), xlabel('t'), title('Step response')

3.1. rlocus in MATALB

In [7]:
rlocus(G)
axis([-22,3,-20,20])

In [8]:
help rlocus
 RLOCUS  Evans root locus.
 
    RLOCUS(SYS) computes and plots the root locus of the single-input,
    single-output LTI model SYS. The root locus plot is used to analyze 
    the negative feedback loop
 
                      +-----+
          ---->O----->| SYS |----+---->
              -|      +-----+    |
               |                 |
               |       +---+     |
               +-------| K |<----+
                       +---+
 
    and shows the trajectories of the closed-loop poles when the feedback 
    gain K varies from 0 to Inf.  RLOCUS automatically generates a set of 
    positive gain values that produce a smooth plot.  
 
    RLOCUS(SYS,K) uses a user-specified vector K of gain values.
 
    RLOCUS(SYS1,SYS2,...) draws the root loci of several models SYS1,SYS2,... 
    on a single plot. You can specify a color, line style, and marker for 
    each model, for example:
       rlocus(sys1,'r',sys2,'y:',sys3,'gx').
 
    [R,K] = RLOCUS(SYS) or R = RLOCUS(SYS,K) returns the matrix R of
    complex root locations for the gains K.  R has LENGTH(K) columns
    and its j-th column lists the closed-loop roots for the gain K(j).  
  
    See RLOCUSPLOT for additional graphical options for root locus plots.
 
    See also RLOCUSPLOT, SISOTOOL, POLE, ISSISO, LTI.

    Reference page in Doc Center
       doc rlocus

    Other functions named rlocus

       DynamicSystem/rlocus     resppack.ltisource/rlocus
       ltipack.tfdata/rlocus


3.2. Standard Form of Root Locus

$$s^3 + 4s^2 + Ks + 1 = 0$$
In [9]:
K = 0;
f = [1, 4, K, 1];
p = roots(f)
p =

  -4.0606 + 0.0000i
   0.0303 + 0.4953i
   0.0303 - 0.4953i


In [10]:
plot(real(p), imag(p), 'rx', 'linewidth', 2), hold on

ylim([-1, 1])
xlim([-4,1])

line([0 0], ylim, 'LineStyle', '--', 'Color', 'k'); 
line(xlim, [0 0], 'LineStyle', '--', 'Color', 'k');

In [11]:
K = 2; 
f = [1, 4, K, 1];
p = roots(f);
plot(real(p), imag(p), 'rx', 'linewidth', 2);

ylim([-1, 1])
xlim([-4,1])

line([0 0], ylim, 'LineStyle', '--', 'Color', 'k'); 
line(xlim, [0 0], 'LineStyle', '--', 'Color', 'k');

In [12]:
f = [1, 4, 0, 1];
p = roots(f);
plot(real(p), imag(p), 'rx'), hold on

for K = 0 : 0.1 : 10 
    f = [1, 4, K, 1];
    p = roots(f);
    plot(real(p), imag(p), 'r.')
end

hold off 
ylim([-1, 1])
xlim([-4,1])
axis equal

line([0 0], ylim, 'LineStyle', '--', 'Color', 'k'); 
line(xlim, [0 0], 'LineStyle', '--', 'Color', 'k');

  • Covert it to the stardard form of root locus
$$s^3 + 4s^2 + Ks + 1 = 0 \Rightarrow 1 + K{s \over s^3 + 4s^2 + 1} = 1 + KG(s) = 0 $$
In [13]:
G = tf([1, 0], [1, 4, 0, 1]);

In [14]:
pole(G)
zero(G)
ans =

  -4.0606 + 0.0000i
   0.0303 + 0.4953i
   0.0303 - 0.4953i


ans =

     0


In [15]:
pzmap(G)
ylim([-1, 1])

In [16]:
rlocus(G)
axis equal
xlim([-5,2])

3.3. Examples of Root Locus

  • Example 1: Lines leave the real axis at 90 degrees
$$G(s) = {s + 1 \over s^2 + s - 2}$$
In [17]:
G = tf([1, 3], [1, 1, -2]);
rlocus(G)
axis equal

  • Example 2: Asymptotes
$$G(s) = {1 \over s^4 + 12s^3 + 64s^2 + 128s} $$
In [18]:
G = tf([1], [1, 12, 64, 128, 0]);
rlocus(G)
axis equal

  • Example 3: determining the breakaway points
$$G(s) = {1 \over (s+2)(s+4)}$$
In [19]:
G = tf([1], [1, 6, 8]);
rlocus(G)
axis equal

$$G(s) = {(s-3)(s-5) \over (s+1)(s+2)}$$
In [20]:
G = tf([conv([1, -3],[1, -5])], [conv([1, 1], [1, 2])]);
rlocus(G)
axis equal

  • Example 4: Departure angle
$$G(s) = {s \over (s-(1+i))(s - (1 - i))}$$
In [21]:
G = tf([1, 0], [1, 2, 2]);
rlocus(G)
axis equal

$$G(s) = {s+1 \over (s+2)(s^2+4s+8)}$$
In [22]:
G = tf([1, 1], [conv([1, 2], [1, 4, 8])]);
rlocus(G)
axis equal
xlim([-4,0.5])

4. Other Tutorials

  • The Root Locus Method by Brian Douglas
In [23]:
%%html
<center><iframe src="https://www.youtube.com/embed/CRvVDoQJjYI?rel=0" 
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>
In [24]:
%%html
<center><iframe src="https://www.youtube.com/embed/eTVddYCeiKI?rel=0" 
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>
In [25]:
%%html
<center><iframe src="https://www.youtube.com/embed/jb_FiP5tKig?rel=0" 
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>
In [26]:
%%html
<center><iframe src="https://www.youtube.com/embed/WLBszzT0jp4?rel=0" 
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>
In [27]:
%%html
<center><iframe src="https://www.youtube.com/embed/pG3_b7wuweQ?rel=0" 
width="560" height="315" frameborder="0" allowfullscreen></iframe></center>
In [28]:
%%javascript
$.getScript('https://kmahelona.github.io/ipython_notebook_goodies/ipython_notebook_toc.js')