Part 3
Part 3
If the complex number is substituted into a complex function, F(s), another complex
number will result. For example, if F(s) = (s + a), then substituting the complex number s
= 𝜎 + 𝑗𝜔 yields F(s) = (a + 𝜎) + 𝑗𝜔, another complex number. We conclude that (s + a)
is a complex number and can be represented by a vector drawn from the zero of the
function to the points.
For example, (𝑠 + 7)𝑠→5+2𝑗 is a complex number drawn from the zero of the function, -7,
to the point s, which is 5+2j, as shown in figure below
Each factor in the numerator and each factor in the denominator is a complex number that can
be represented as a vector. The function defines the complex arithmetic to be performed in
order to evaluate F(s) at any point, s. Since each complex factor can be thought of as a vector,
the magnitude, M, and angle 𝜃 of F(s) at any point, s, is
Matlab Code
clc
syms s
'F(s)'
F= (s+3)/((s+4)*(s^2+2*s+5));
pretty(F)
s= -2+j;
F=subs(F,s)
'Magnitude'
M= abs(F)
'Angle'
Phase=angle(F); %rad
Phase = rad2deg(Phase) %degree
Example
(𝑠+2)(𝑠+4)
Given 𝐹 (𝑠 ) =
𝑠(𝑠+3)(𝑠+6)
Root-Locus
Definition:
⮚ The root locus is the plot of the roots of system characteristic equation (or the
poles of closed-loop transfer function) as a system parameter (K) is varied.
Motivation
⮚ It is frequently necessary to adjust one or more system parameters in order to
obtain suitable system performance (root locations)
Root Locus
The root locus show the changes in the transient response as the gain ,K, is varied.
5 2.23 2.23
10 1.58 3.16
15 1.29 3.87
20 1.11 4.47
25 1 5
30 0.91 5.47
35 0.84 5.91
40 0.79 6.32
45 0.74 6.70
50 0.70 7.07
Notes
1- Representation of the paths of the closed-loop poles as the gain is varied that we call a
ROOT LOCUS.
2- Beside transient response, the root locus also gives a graphical representation of a system’s
Stability. We can clearly see ranges of stability, ranges of instability, and the conditions that
cause a system to break into oscillation.
The properties of the root locus can be derived from the characteristic equation of the closed-
loop system.
The above equation implies that if a value of s is substituted into function 𝐾 G(𝑠)H(𝑠), a
complex number results, If the angle of the complex number is an odd multiple of 180o ,that
value of s is a pole for some particular value of K. What value of K?
Case1
Consider the point -2 + 3j, if this point is closed loop pole than:
The angles of the zeros minus the angles of poles must equal an odd multiples of 180
MATLAB Code
s= -2+3j;
F= ((s+3)*(s+4))/((s+1)*(s+2));
'Angle'
Phase=angle(F); % rad
Phase = rad2deg(Phase) %degree
angle = -70.5600
Case2
√2
Repeat these calculations for a point 𝑠 = −2 + 𝑗 .. The angles do add up to 180o
2
s= -2+(sqrt(2)/2)*j;
G= ((s+3)*(s+4))/((s+1)*(s+2));
'Angle'
Phase=angle(G); %rad
Phase = rad2deg(Phase) %degree
angle = -180.0
√2
Thus, the point (−2 + 𝑗 ) is a point at the root locus for a gain of 0.33.
2
MATLAB Code
s= -2+(sqrt(2)/2)*j;
G= ((s+3)*(s+4))/((s+1)*(s+2));
'Angle'
Phase=angle(G); %rad
Phase = rad2deg(Phase) %degree
K= 1/(abs(G))
K = 0.33
Example
Given a unity feedback system that has the forward transfer function
𝐾(𝑠 + 2)
𝐺(𝑠) =
𝑠2 + 4𝑠 + 13
do the following:
a. Calculate the angle of G(s) at the point (-3 + j0) by finding the algebraic sum of
angles of the vectors drawn from the zeros and poles of G(s) to the given point.
c. If the point specified in a is on the root locus, find the gain, K, using the lengths of the
vectors.
∏⬚
⬚ ⬚𝑝𝑜𝑙𝑒 𝑙𝑒𝑛𝑔𝑡ℎ𝑠 √12 +32 √12 +32
c- 𝐾 = = = 10
∏⬚
⬚ ⬚𝑧𝑒𝑟𝑜 𝑙𝑒𝑛𝑔𝑡ℎ𝑠
1
MATLAB Code
s=-3+0j;
G=(s+2)/(s^2+4*s+13);
Theta=(180/pi)* angle(G)
M=abs(G);
K=1/M
Sketching the Root Locus
To sketch the root locus, we will use five rules which allow us to minimize the
computation burden.
Rule 1: Number of branches
- Each closed-loop pole moves as the gain is varied. If we define a branch as the path that
one pole traverses, then there will be one branch for each closed-loop pole.
The number of branches of the root locus equals the number of closed-loop poles.
Rule 2: Symmetry
- Complex poles/zeros come in complex‐conjugate pairs
The root locus approaches straight lines as the locus approaches infinity. Further,
the equation of the asymptotes is given by the real axis intercept 𝜎𝑎 and angle, 𝜃𝑎
as follows:
Where n is the order of the system (number of poles) and m is the order of the numerator
(number of zeros)
Example
Sketch the root locus for the system shown in figure below.
- The real-axis segments lie to the left of an odd number of poles and/or zeros. The locus
starts at the open-loop poles and ends at the open-loop zeros. For the example there
is only one open-loop finite zero and three infinite zeros. Rule 5, then, tells us that the three
zeros at infinity are at the ends of the asymptotes.
- The number of lines obtained equals the difference between the number of finite poles
and the number of finite zeros.
Example Sketch the general shape of the root locus for each of the open-loop pole- zero plots
shown in figures below.
Example
Example
Using MATLAB plot root locus for the unity feedback system for the following transfer
functions:
'a'
G= tf(poly([-2 -6]), [1 8 25])
subplot(411),rlocus(G)
title('G(s) = k(s+2)(s+6)/(s^2 +8s+25)')
'b'
G= tf(poly([-2j +2j]), poly([-j +j]))
subplot(412),rlocus(G)
title('G(s) = k(s^2+4)/(s^2 +1)')
'c'
G= tf(poly([-j +j ]), poly([0 0]))
subplot(413),rlocus(G)
title('G(s) = k(s^2+1)/(s^2 )')
'd'
G= tf(1, poly([-1 -1 -1 -4]))
subplot(414),rlocus(G)
title('G(s) = k/(s +1)^3 (s+4)')
Real-axis Breakaway and Break-in points:
We have two poles 🡪 We have two branches. One starts at pole (-1) and the second one starts
at pole (-2) and terminate at zeros (-3 and -4).
From the root locus, we see that for some values of gain K, the closed-loop poles are real and
for other values of gain K the closed-loop poles are complexes. We two important points:
Breakin and Break away. Next we will see how to calculate Break in and Break away.
There are many methods for finding the points at which the root locus breaks away from or
breaks into the real-axis.
For points along the real-axis segment of the root locus where breakaway and break-in point
could exist, 𝑠 = 𝜎. Hence, along the real-axis the equation above becomes:
1
𝐾=−
𝐺(𝜎)𝐻(𝜎)
The points (maximum and minimum of the curve gain K) are located where
𝑑𝐾
=0
𝑑𝜎
Example
Find the breakaway and break-in points for the root locus, using differential calculus.
The second method:
Where zi and p𝑖 are the negative of the zero and pole values, respectively, of
𝐺(𝑠)𝐻(𝑠).
Example
Repeat the last example without differentiating
syms segma
g=tf(poly([3 5]),poly([-1 -2]));
rlocus(g)
k=-(segma^2 +3*segma+2)/(segma^2 -8*segma+15);
pretty(k) ;
segma=[ -1.45 3.82];
subs(k,segma) % find K at breakaway and breakin
Frequency and Gain at Imaginary-Axis Crossing
To find the jw-axis crossings, we have two methods:
1. Using Routh table
To find the 𝑗𝜔 − axis crossing, we can use the Routh-Hurwitz criterion, covered in previews
lectures as follows: Forcing a row of zeros in the Routh table will yield the gain; going back
one row to the even polynomial equation and solving for the roots yields the frequency at the
imaginary-axis crossing.
Example
For the system of Figure below, find the frequency and gain, K, for which the root locus
crosses the imaginary axis. For what range of K is the system stable?
Routh table
A complete row of zeros yields the possibility for imaginary-axis roots. For K > 0, only s1 row
can be zero.
Thus, the root locus crosses the imaginary-axis at ±j1.59 at a gain of 9.65. So, the system is
stable for 0 ≤ K < 9.65.
The root locus departs from complex, open-loop poles and arrives at complex, open-loop zeros
at angles that can be calculated as follows.
Assume a point 𝜖 close to the complex pole or zero. Add all angles drawn from all open-loop
poles and zeros to this point. The sum equals (2k + 1)180°. The only unknown angle is that drawn
from the 𝜖 close pole or zero, since the vectors drawn from all other poles and zeros can be
considered drawn to the complex pole or zero that is close to the point. Solving for the unknown
angle yields the angle of departure or arrival.
Example
Given the unity feedback system of figure below, find the angle of departure from the complex
poles and sketch the root locus.
Example
Given a unity feedback system that has the forward transfer function
do the following:
a. Sketch the root locus.
b. Find the imaginary-axis crossing.
c. Find the gain, K, at the jw-axis crossing.
d. Find the break-in point.
e. Find the angle of departure from the complex poles.
Or
1+kG(s)=0 KG(s) =-1
𝐾𝐺 (𝑠) = −1
At the imaginary-axis crossing (damping ratio = zero)
K=4
𝜔𝑛 = √21
MATLAb code
clc
G=tf([ 1 2],[1 -4 13]);
rlocus(G)
k =
P=
4.588i
-4.588i
k=
18
p=
-7.00
-7.00
Example
Given a unity feedback system that has the forward transfer function do the following:
𝐾(𝑠 − 2)(𝑠 − 4)
𝐺(𝑠) =
𝑠2 + 6𝑠 + 25
clc
numg=poly([2 4]);
deng=[1 6 25];
G=tf(numg, deng)
rlocus(G)
grid
z=0.5
sgrid(z, 0)
for k=1:3
[K, p]=rlocfind(G)
end
K = 0.1084
p=
-2.4130 + 4.1850i
-2.4130 - 4.1850i
K = 0.9950
p=
-0.0075 + 4.0646i
-0.0075 - 4.0646i
K = 51.3095
p=
2.8853 + 0.0066i
2.8853 - 0.0066i
Example
Given a unity feedback system that has the forward-path transfer function
do the following:
a. Sketch the root locus.
b. Using a second-order approximation, design the value of K to yield 10% overshoot for a
unit-step input.
c. Estimate the settling time, peak time, rise time, and steady-state error for the value of K
designed in (b).
d- Determine the validity of your second-order approximation.
Example
For the system shown in figure below, make an accurate plot of the root locus and find the
following:
a. The breakaway and break-in points.
b. The range of K to keep the system stable.
c. The value of K that yields a stable system with critically damped second-order poles.
d. The value of K that yields a stable system with a pair of second order poles that have a
damping ratio of 0.707.
MATLAb code
clc
clf
numgh=poly([-2 -1]);
dengh=poly([1 2]);
'G(s)H(s)'
GH=tf(numgh,dengh)
subplot(211)
rlocus(GH)
'breakaway and breal-in'
' range of Kto keep the system stable'
for k=1:3
[K, p]=rlocfind(GH)
end
pause
'Critical damped z=0.999 = 1'
z=0.99; %z=1
wn=0;
sgrid (z,wn)
[K, p]=rlocfind(GH)
disp('press any key to
continue')
pause
'0.707'
subplot(212)
rlocus(GH)
z=0.707;
wn=0;
sgrid (z,wn)
[K, p]=rlocfind(GH)
Ex
For the system shown in figure below, do the following: