Solution 4.6.4.4
The closed loop transfer function is
(s+1)
s
2
(s+10)
1+
K(s+1)
s
2
(s+10)
=
(s+1)
s
3
+10s
2
+Ks+K
:
The characteristic equation is
s
3
+10s
2
+Ks+K =0:
The MATLAB program
K=20
p=[1 10 K K]
roots(p)
K=32
p=[1 10 K K]
roots(p)
K=50
p=[1 10 K K]
roots(p)
K=[20 32 50]
gh = zpk([-1],[0 0 -10],1)
[R,K] = rlocus(gh,K)
plot(R,'kd')
print -deps rl4643.eps
produces the output
EDU>sm4644
K=
20
p=
1 10 20 20
1
ans =
-7.75310919791344
-1.12344540104328 + 1.14781561520580i
-1.12344540104328 - 1.14781561520580i
K=
32
p=
1 10 32 32
ans =
-4.00000000000000 + 0.00000012019357i
-4.00000000000000 - 0.00000012019357i
-2.00000000000000
K=
50
p=
1 10 50 50
ans =
-4.35509743609111 + 4.44956990188039i
-4.35509743609111 - 4.44956990188039i
-1.28980512781779
2
K=
20 32 50
Zero/pole/gain:
(s+1)
----------
s^2 (s+10)
R=
Columns 1 through 2
-7.75310919791344 -4.00000000000000 + 0.00000012019357i
-1.12344540104328 + 1.14781561520580i -2.00000000000000
-1.12344540104328 - 1.14781561520580i -4.00000000000000 - 0.00000012019357i
Column 3
-4.35509743609111 + 4.44956990188039i
-1.28980512781779
-4.35509743609111 - 4.44956990188039i
K=
20
32
50
EDU>
The plot of the points is shown in Figure 1
For K = 20, the poles of the closed loop systme are at s = ;1j.Thus,
3
-8 -7 -6 -5 -4 -3 -2 -1
-5
-4
-3
-2
-1
0
1
2
3
4
5
Figure 1: Plot of solutions
the closed loop transfer function is
T
c
(s)=
(s+1)
s+7:7531)(s+1:1234454;j1:12782)(s+1:1234454;j1:12782)
:
Then the step response is
C(s) =
(s+1)
s(s+7:7531)(s+1:1234454;j1:12782)(s+1:1234454;j1:12782)
=
D
1
s
+
D
2
s =7:7531
+
M
s +1:1234454;j1:12782
+
M
s +1:1234454+j1:12782
:
The residues D
1
, D
2
and M are determined bythefollowing MATLAB
program, whichalso plots the step response, shown in Figure 2.
p0 = [1 0]
p1 = [1 7.753109]
p2 = [1 1.1234454+j*1.1278156152 ]
p3 = conj(p2)
B=[11]
A=conv(p0,p1)
4
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
0
0.01
0.02
0.03
0.04
0.05
0.06
0.07
Figure 2: Step Response for K =2
A=conv(A,p2)
A=conv(A,p3)
[R,P,K1] = residue(B,A)
M=R(3)
absm =abs(M)
abs2m = 2*abs(M)
angm =angle(M)
t=0
dt = 0.025
kount = 1
while t < 5
c(kount) = R(4)+ R(1)*exp(-7.7531*t) + abs2m*exp(-1.123445*t) *cos(1.12781*t + angm);;
time(kount) = t;;
t=t+dt;;
kount = kount + 1;;
end
plot(time,c)
print -deps sr4644a.eps
The step response can also be generated bytheMATLAB dialogue:
EDU>g = zpk([-1],[0 0 -10],1)
5
Zero/pole/gain:
(s+1)
----------
s^2 (s+10)
EDU>h=20
h=
20
EDU>tc = feedback(g,h)
Zero/pole/gain:
(s+1)
-------------------------------
(s+7.753) (s^2 + 2.247s + 2.58)
EDU>step(tc)
EDU>print -deps sr4644aa.eps
EDU>
The response, shown in Figure 3 is the same as we obtained by partial
fraction expansion.
For K =32, there are twoclosed loop poles are at s = ;2. Thus, the
closed loop transfer function is
T
c
(s)=
(s+1)
(s+2)(s+4)
2
:
Then the step response is
C(s) =
(s+1)
s(s+2)(s+4)
2
=
D
1
s
+
D
2
s +4
+
D
3
(s+4)
2
+
D
4
s+2
:
Then
D
1
=
(s+1)
(s+2)(s+4)
2
s=0
6
Time (sec.)
A
mp
li
tu
d
e
Step Response
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
0
0.01
0.02
0.03
0.04
0.05
0.06
0.07
Figure 3: Step Response for K =20generated byMATLAB
7
=
1
32
D
2
=
d
ds
(s+1)
s(s +2)
s=;4
=
d
ds
;(s + 1)(2s+2)
[s(s+ 2)]
2
+
1
s(s+2)
s=;4
=
"
;2(s
2
+2s+1)+s
2
+2s
[s(s+2)]
2
#
s=;4
=
"
;s
2
;2s; 2
[s(s+ 2)]
2
#
s=;4
=
;(16)+ 2(4); 2
[;4(;2)]
2
s=;4
=
;5
32
D
3
=
(s+1)
s(s+2)
s=;4
=
;3
8
D
4
=
(s+1)
s(s+4)
2
s=;2
=
1
8
The residues D
1
, D
2
, D
3
,and D
4
can also be determined by the MATLAB
program
p0 = 0
p1 = 2
p2 = 4
p3 = 4
v0 = [1 p0]
v1 = [1 p1]
v2 = [1 p2]
v3 = [1 p3]
B=[11]
A=conv(v0,v1)
8
0 1 2 3 4 5 6 7 8
0
0.005
0.01
0.015
0.02
0.025
0.03
0.035
0.04
Figure 4: Step Response for K =32
A=conv(A,v2)
A=conv(A,v3)
[R,P,K1] = residue(B,A)
t=0
dt = 0.01
kount = 1
while t<8
c(kount) = R(4) + R(3)*exp(-p1*t) +R(1)*exp(-p2*t) + R(2)*t*exp(-p2*t);;
time(kount) = t;;
t=t+dt;;
kount = kount + 1;;
end
plot(time,c)
print -deps sr4644b.eps
whichalso plots the step response, shown in Figure 4.
For K = 50, the closed loop transfer function is
T
c
(s)=
(s+1)
(s+1:2898)(s+4:3551;j 4:44957)(s+4:3551+j 4:44957)
:
9
Then the step response is
C(s) =
(s+1)
s(s+1:2898)(s+4:3551;j4:44957)(s+4:3551+j4:44957)
=
D
1
s
+
D
2
s+1:2898
+
M
s +4:3551;j4:44957
+
M
s+4:3551+ j4:44957
:
The residues D
1
, D
2
, and M are determined by the MATLAB program
p0 = 0
p1 = 1.289805
p2 = 4.3551- j*4.44957
p3 = conj(p2)
v0 = [1 p0]
v1 = [1 p1]
v2 = [1 p2]
v3 = [1 p3]
B=[11]
A=conv(v0,v1)
A=conv(A,v2)
A=conv(A,v3)
[R,P,K1] = residue(B,A)
M=R(2)
absm =abs(M)
abs2m = 2*abs(M)
angm =angle(M)
sigma = real(p2)
omega = abs(imag(p2))
t=0
dt = 0.01
kount = 1
while t<6
c(kount) = R(4) + R(3)*exp(-p1*t) + abs2m*exp(-sigma*t)*cos(omega*t+angm);;
time(kount) = t;;
t=t+dt;;
kount = kount + 1;;
end
plot(time,c)
print -deps sr4644c.eps
whichalso plots the step response, shown in Figure 5.
10
0 1 2 3 4 5 6
-0.005
0
0.005
0.01
0.015
0.02
0.025
Figure 5: Step Response for K =20
11