Professional Documents
Culture Documents
Solution to HW6
AP7.3 We are given the forward path transfer function for a unity feedback system. The
forward path transfer function
10
G(s) =
s(s + 1)(s + p)
contains a parameter p which we are to select by sketching the root locus and determining
the√value for p that results in the damping coefficient ζ of the complex roots having value
1/ 2.
Solution: The first step we must take is to obtain an equation in the form 1 + pG 1 (s) = 0
for which we will determine the root locus. As described in section 7.5 of the text, we
write
s(s + 1)(s + p) + 10 s3 + s2 + p(s2 + s) + 10
1 + G(s) = = = 0. (1)
s(s + 1)(s + p) s(s + 1)(s + p)
To make this quantity zero, we set the numerator equal to zero:
s3 + s2 + p(s2 + s) + 10 = 0.
We do need to determine the breakin point where the loci from the complex poles join the
real axis between the zeros. We obtain this by letting
a(s) = s2 + s
b(s) = s3 + s2 + 10
be the numerator and denominator, respectively, of G 1 (s). The breakin point occurs where
a(s)b0 (s) − a0 (s)b(s) = 0. This condition simplifies to s 4 + 2s3 + s2 − 20s − 10 = 0. We
want to find a root between 0 and −1, which we could approximate by hand or, as before,
just use Matlab. Only one root falls in the required range, namely the one at −0.4969,
so that must be the breakin point.
The next step is to calculate the angle of departure or the locus from the complex poles.
We define the angles shown in Figure 1 in order to determine the departure angle θ 2 .
θ2
x
θ3 φ2 φ1 θ1
x o o
θ1 = π/2
1.8258
θ3 = tan−1
0.7723 + 2.5445
ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 3
1.8258
−1
φ1 = tan
0.7723
1.8258
−1
φ2 = tan
0.7723 + 1
we find that θ2 = 3.04 rad or 174 degrees. The angle of arrival at the breakin point is
calculated similarly to be approximately π/2. The root locus generated by Matlab is
shown in Figure 2. It matches the sketch I obtained using the values derived above. (The
quality of the Matlab output far exceeds the quality of a scan of my sketch, so I’ve
included the formter rather than the latter.)
1.5
0.5
Imaginary Axis
−0.5
−1
−1.5
−2
−5 −4 −3 −2 −1 0 1
Real Axis
√
To obtain damping coefficient ζ = 1/ 2 for the complex pole pair, we note that this
condition corresponds the magnitudes of the real and imaginary parts of the pole being
equal. From the root locus sketch, we estimate that this will occur when s = −(1 ±
j)/2. Then applying the equation from Step 12 of Table 7.2, page 348, to determine the
ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 4
Substituting this into (1) and finding the roots we find that the resulting roots are −20.52
and −0.49 ± j0.50. Alternatively, we could use the rlocfind command as described in
the solution to MP7.2 below.
AP7.9 We are given four different controller transfer functions G c (s) for the feedback system
shown in Figure AP7.9, page 397. We are asked to sketch the root loci for each of the four
cases.
Solution: The controller is in series with the plant whose transfer function has poles at
0, −2, and −5.
(a) The first controller is a proportional controller with gain G c (s) = K. Accordingly,
we have an open-loop system with three poles and no zeros. The segments of the
real axis contained in the root loci will be the segments (−∞, −5] and [−2, 0]. There
are three more poles than zeros so three loci must go from poles to infinity. The
asymptotes have angles
2q + 1
φA = π, q = 0, 1, 2
3−0
which yields π/3, π, and 5π/3 = −π/3. The intercept of the asymptotes occurs at
pj − zi 0−2−5 7
P P
σA = = =− .
np − n z 3 3
We have one locus that consists of the segment (−∞, −5]. To determine where the
other root loci cross the imaginary axis, we apply the Routh-Hurwitz method to the
numerator of the left-hand side of
K
1+ =0
s(s + 2)(s + 5)
and find that the value of K for which a zero occurs in the first column of the Routh
array is K = 35. Substituting K = 35 into s 3 + 7s2 + 5s + K = 0 we find the roots
to be −7 and ±j2.2361.
To determine the breakaway point, we let p(s) = −K = −s 3 − 7s2 − 5s and set the
derivative of p with respect to s equal to zero. The condition
dp
= −3s2 − 14s − 5 = 0
ds
yields s = −4.277 and s = −0.3897. We need a point between 0 and −2 so we choose
the latter.
The usual calculations yield an angle of departure of π/2 radians at the breakaway
point. The root locus is shown in Figure 3.
ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 5
2
Imaginary Axis
−2
−4
−6
−8
−10
−14 −12 −10 −8 −6 −4 −2 0 2 4
Real Axis
ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 6
(b) The second controller has Gc (s) = K(s + 1). Accordingly, we have an open-loop
system with three poles and one zero. The segments of the real axis contained in
the root loci will be the segments [−5, −2] and [−1, 0]. There are two more poles
than zeros
so
two loci must go from poles to infinity. The asymptotes have angles
2q+1
φA = 3−0 π, q = 0, 1 which yields π/2 and 3π/2. The intercept of the asymptotes
occurs at
0 − 2 − 5 − (−1)
σA = = −3.
3−1
To determine the breakaway point, we let
s3 − 7s2 − 5s a(s)
p(s) = −K = − =
s+1 b(s)
and set the derivative of p with respect to s equal to zero. The equivalent condition
0 − 2 − 5 − 10 − (−1) 16
σA = =− .
3 3
The segment (−∞, −10] constitutes one locus.
To determine where the other root loci cross the imaginary axis, we apply the Routh-
Hurwitz method to
We find that for K = 1260 the first element of the third row becomes zero. We
also find that the fourth row becomes zero at approximately K = 997.34 and K =
−126.34. We are looking for a positive value (the root locus is for 0 < K < ∞) so we
discard the negative value. The system becomes unstable as soon as K reaches the
lower of the two positive values so we conclude that the loci cross the imaginary axis
when K = 997.34. Substituting this into (3), we find the roots on the imaginary axis
to be approximately ±j8.
ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 7
2
Imaginary Axis
−2
−4
−6
−8
−5 −4.5 −4 −3.5 −3 −2.5 −2 −1.5 −1 −0.5 0
Real Axis
ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 8
15
10
5
Imaginary Axis
−5
−10
−15
−20
−30 −25 −20 −15 −10 −5 0 5 10
Real Axis
There are two more poles than zeros so two loci must go from poles to infinity. The
asymptotes have angles π/2 and 3π/2 so the loci are unlikely to cross the imaginary
axis. The intercept of the asymptotes occurs at
0 − 2 − 5 − 10 − (−1 − 3) 13
σA = =− .
2 2
To determine the breakaway point, we let
s(s + 2)(s + 5)(s + 10) s4 + 17s3 + 80s2 + 100s a(s)
p(s) = −K = = 2
=
(s + 1)(s + 3) s + 4s + 3 b(s)
and set the derivative of p with respect to s equal to zero. The equivalent condition
a(s)b0 (s) − a0 (s)b(s) = 2s5 + 29s4 + 148s3 + 373s2 + 480s + 300 = 0
yields only one real root, s = −7.296, which does lie between −10 and −5 as required,
so the breakaway point is −7.296. Notice that the breakaway point is distinct from
the intercept of the asymptotes so there will be some bending of the loci.
The usual calculations yield an angle of departure of π/2 radians at the breakaway
point. The root locus is shown in Figure 6.
MP7.1 We are given four different forward path transfer functions for a unity negative feedback
system. We are asked to use Matlab to plot the root loci for 0 < K < ∞. The forward
path transfer functions are:
(a)
K
G(s) =
s3 + 4s2 + 6s + 1
(b)
(s + 20)
G(s) = K
s2 + 5s + 20
(c)
s2 + s + 1
G(s) = K
s(s2 + 4s + 6)
(d)
s5 + 4s4 + 6s3 + 8s2 + 6s + 4
G(s) = K
s6 + 2s5 + 2s4 + s3 + s2 + 10s + 1
Solution: The root loci generated by Matlab is given in Figure 7. In (a) the intercept
for the asymptotes lies to the right of the complex poles. Notice how this affects the shape
of the loci.
Also look carefully at the root loci for part (c). If we were plotting the loci by hand, it
would have been tempting to conclude that the loci left the complex poles and headed
directly to the right toward the complex zeros rather than detouring to the real axis. This
would seem reasonable with the negative real axis constituting the locus from the pole at
the origin out to infinity. It is only by actually calculating the angles of departure and
arrival and the breakin and breakaway points (or by using Matlab) that we find the true
shape of the loci. The transcript of the commands that generated these plots is given
below.
ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 10
15
10
5
Imaginary Axis
−5
−10
−15
−20
−12 −10 −8 −6 −4 −2 0
Real Axis
ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 11
2 10
Imaginary Axis
Imaginary Axis
0 0
−2 −10
−4 −20
−6 −4 −2 0 2 −40 −30 −20 −10 0
Real Axis Real Axis
1 2
Imaginary Axis
Imaginary Axis
0 0
−1 −2
−2 −4
−4 −3 −2 −1 0 −6 −4 −2 0 2
Real Axis Real Axis
ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 12
Transfer function:
1
---------------------
s^3 + 4 s^2 + 6 s + 1
>> subplot(2,2,1)
>> rlocus(sys)
>> title(’Root Locus for MP7.1a’)
>> num = [1 20]; den = [1 5 20]; sys = tf(num,den)
Transfer function:
s + 20
--------------
s^2 + 5 s + 20
>> subplot(2,2,2)
>> rlocus(sys)
>> title(’Root Locus for MP7.1b’)
>> num = [1 1 1]; den = [1 4 6 0]; sys = tf(num,den)
Transfer function:
s^2 + s + 1
-----------------
s^3 + 4 s^2 + 6 s
>> subplot(2,2,3)
>> rlocus(sys)
>> num = [1 4 6 8 6 4]; den = [1 2 2 1 1 10 1]; sys=tf(num,den)
Transfer function:
s^5 + 4 s^4 + 6 s^3 + 8 s^2 + 6 s + 4
------------------------------------------
s^6 + 2 s^5 + 2 s^4 + s^3 + s^2 + 10 s + 1
>> subplot(2,2,4)
>> rlocus(sys)
>> title(’Root Locus for MP7.1d’)
>> print -deps mp7_1.eps
MP7.2 We are given the forward path transfer function for a unity negative feedback system.
The forward path transfer function is
K(s2 − 2s + 2)
G(s) = .
s(s2 + 3s + 2)
ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 13
We are asked to use Matlab to plot the root locus and show that the maximum value of
K for which the closed-loop system is stable is 0.79.
Solution: The root locus generated by Matlab is given in Figure 8. The rlocfind
0.8
0.6
0.4
0.2
Imaginary Axis
−0.2
−0.4
−0.6
−0.8
−1
−3.5 −3 −2.5 −2 −1.5 −1 −0.5 0 0.5 1
Real Axis
command was used to determine the upper bound on K. The crosshairs were used to
select the point where the upper locus crossed the imaginary axis. The session transcript
below indicates that the upper bound on K is approximately 0.77, which is reasonably
close to 0.79. We could use the Routh-Hurwitz method to determine an exact value but
the problem does not request it. Note that the rlocus command must be executed prior
to executing the rlocfind command.
Transfer function:
s^2 - 2 s + 2
-----------------
s^3 + 3 s^2 + 2 s
ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 14
>> rlocus(sys)
>> [k,poles] = rlocfind(sys)
Select a point in the graphics window
selected_point =
0.0030 + 0.6304i
k =
0.7717
poles =
-3.7595
-0.0061 + 0.6407i
-0.0061 - 0.6407i
MP7.4 We are given the forward path transfer function for a unity negative feedback system.
The forward path transfer function is
(1 + p)s − p
G(s) = .
s(s2 + 3s + 6)
We are asked to use Matlab to plot the root locus for 0 < p < ∞ and determine the
range of values of p for which the closed-loop system is stable.
Solution: The first step we must take is to obtain an equation in the form 1 + pG 1 (s) = 0
for which we will determine the root locus. As described in section 7.5 of the text, we
write
s2 + 3s + 6 + p(s − 1) + s s2 + (3 + 1)s + 6 + p(s − 1)
1 + G(s) = 2
= = 0. (4)
s + 3s + 6 s2 + 3s + 6
This quantity will be zero if the numerator equal is zero, namely if
s2 + 4s + 6 + p(s − 1) = 0.
0.5
Imaginary Axis
−0.5
−1
−1.5
−5 −4 −3 −2 −1 0 1
Real Axis
ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 16
the approximate value of p for which the locus crosses the axis. (The command has us
use crosshairs to select a location on the locus. We cannot expect that that will result in
an exact answer. The transcript below indicates that the point I selected was close to but
not actually at the origin.) The transcript shows that the upper bound on p for stability
is approximately 6 and that the corresponding closed loop poles are aproximately s = 0
and s = −10.
Transfer function:
s - 1
-------------
s^2 + 4 s + 6
>> rlocus(sys)
selected_point =
-0.0024 - 0.0140i
p =
5.9758
poles =
-9.9734
-0.0024
MP7.6 We are given a unity negative feedback system in which the controller, with transfer
function Gc (s), preceeds the plant in the forward path. The plant has numerator 1 and a
second order denominator having poles at s = −2 and s = −3. We are to find the root
loci corresponding to three different controllers: a proportional (P) controller G c (s) = K,
an integral (I) controller Gc (s) = K/s, and a proportional plus integral (PI) controller
Gc (s) = K(1 + 1/s). We are asked to choose values of K to meet the design specifications
Ts ≤ 10 seconds and P.O. ≤ 10% for unit step input. (The problem statement says “M p ”.
Since Mp is a value not a percentage, we conclude that the authors meant percentage
overshoot “P.O.”.) We are also asked to plot the step responses for the three controllers on
a single set of axes and comment on the similarities and differences in achieved performance.
Solution: The root loci and the step responses are shown in Figure 10.
ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 17
Note that there is no single correct answer to the design part of this problem. The design
specifications are fairly loose so that for each case, there is a range of values of K that will
meet the specifications. For the P controller, we have a second order system so we can use
equations (5.13) and (5.16) on pages 230 and 231 respectively to determine appropriate
values of K. This yields a value of K = 11.4.
I chose my values for K by starting with K = 40, which easily met the settling time spec
for the P and PI controllers but led to instability of the system with the I controller. For
each controller I then reduced the value of K until the overshoot spec was met. Finally,
I checked to make sure that the settling time spec was met for each controller. The plots
shown in Figure 10 are for K = 36 for the proportional controller, K = 4 for the integral
controller, and K = 17 for the PI controller.
1 5
Imaginary Axis
Imaginary Axis
0 0
−1 −5
−2 −10
−4 −3 −2 −1 0 −10 −5 0 5
Real Axis Real Axis
1.4
Root Locus for PI controller, MP7.6 Step Responses
10 1.2
1
5
Imaginary Axis
0.8
y(t)
0 0.6
0.4
−5 P
0.2 I
PI
−10 0
−3 −2.5 −2 −1.5 −1 −0.5 0 0 2 4 6 8 10
Real Axis t (s)
Comparing the performance of the three controllers should convince you that the PI con-
troller is superior to the others. The P controller has a steady state error of approximately
15%, which we are not able to eliminate by changing K. The integral controller is very slow
compared to the others and increasing its gain quickly leads to instability. (According to
rlocfind, instability occurs when K exceeds 31.8 (see transcript below), but unacceptable
ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 18
oscillations are found to occur even for much lower values of K.) The response of the PI
controller is almost as fast as that of the P controller but, unlike the P controller, achieves
zero steady state error. The Matlab script that generated the plots is shown below.
The output resulting from selecting the point where the upper locus crosses the imaginary
axis is given below. (This determines the value of K for which the closed-loop system with
the I controller becomes unstable.)
selected_point =
0.0439 + 2.5000i
ECE382/ME482 Spring 2004 Homework 6 Solution March 20, 2004 19
k =
31.8032
poles =
-5.0571
0.0286 + 2.5076i
0.0286 - 2.5076i