Solution 9.10.2.4
The MATLAB program
load bodeid4
topm = size(bodeid4)
top = topm(1,1)
w=bodeid4(1:top,1);;
mag = bodeid4(1:top,2);;
phase = bodeid4(1:top,3);;
semilogx(w,mag);;
grid on
print -deps 91024mag.eps
semilogx(w,phase);;
grid on
print -deps 91024phase.eps
can be used to load and plot the data. You will havetoedit this data
le. You only wantthe rst 138 lines. There is some other data mistakenly
appended. That should be deleted.
Figure 1 shows the magnitude data with some asymptotes added. There
is a pole at ts = ;1and what appears to be a double pole near s = ;5.
The phase plot, shown in Figure 2 also inidcates the presence of three
poles. The gains is
K =10
4=20
=1:5849
Then, our rst guess at the transfer function is
G(s) =
1:5849
(1 + s)(1 + s=5)
2
=
39:622
(1 + s)(1 + s=5)
2
The comparison of the Bode magnitude plot and the proposed magnitude
plot is shown in Figure 3 A similar comparison of the phase plots is shown
in Figure 4 The gain is a little low, the magnitude ts almost perfectly,and
the phase does not t perfectly.Thefact that the phase t is worse than the
magnitude t suggests wehavecomplex poles with a large damping ratio.
So we next try
G(s) =
2
(1+ s)[(s=
p
50)
2
+0:2s +1]
=
100
(s +1)(s +5;j5)(s+5+j5)
1
10
-2
10
-1
10
0
10
1
10
2
10
3
-160
-140
-120
-100
-80
-60
-40
-20
0
20
Figure 1: Bode magnitude plot
2
10
-2
10
-1
10
0
10
1
10
2
10
3
-300
-250
-200
-150
-100
-50
0
Figure 2: Bode phase plot
3
10
-2
10
-1
10
0
10
1
10
2
10
3
-160
-140
-120
-100
-80
-60
-40
-20
0
20
Figure 3: Comparison of acutal and propose Bode magnitude plots
4
10
-2
10
-1
10
0
10
1
10
2
10
3
-300
-250
-200
-150
-100
-50
0
Figure 4: Comparison of acutal and propose Bode phase plots
5
10
-2
10
-1
10
0
10
1
10
2
10
3
-160
-140
-120
-100
-80
-60
-40
-20
0
20
Figure 5: Comparison of acutal and propose Bode magnitude plots
6
10
-2
10
-1
10
0
10
1
10
2
10
3
-300
-250
-200
-150
-100
-50
0
Figure 6: Comparison of acutal and propose Bode phase plots
7
10
-2
10
-1
10
0
10
1
10
2
10
3
-160
-140
-120
-100
-80
-60
-40
-20
0
20
Figure 7: Comparison of acutal and propose Bode magnitude plots
The results are shown in Figures 5 and 6. The matchisbetterinsome
places but worse elsewhere. So we next try reducing the natural frequency
of the dampe poles to obtain
G(s) =
2
(s + 1)[(s=
p
18)
2
+(1=3)s+1)
=
36
(s + 1)(s
2
+6s +18)
The comparisons of magnitude and angle shown in Figures 7 and 7 show
that weare close. Wehaveagoodmatchthus
36
(s + 1)(s
2
+6s +18)
The MATLAB program that does this analysis is
load bodeid4
topm = size(bodeid4)
8
10
-2
10
-1
10
0
10
1
10
2
10
3
-300
-250
-200
-150
-100
-50
0
Figure 8: Comparison of acutal and propose Bode phase plots
9
top = topm(1,1)
w=bodeid4(1:top,1);;
mag = bodeid4(1:top,2);;
phase = bodeid4(1:top,3);;
semilogx(w,mag);;
grid on
print -deps 91024mag.eps
semilogx(w,phase);;
grid on
print -deps 91024phase.eps
p1 = 1
p2 = 5
p3 = 5
Ktc = 1.5849
K=Ktc *abs(p1)*abs( p2) * abs(p3)
wp = logspace(-2,3,20);;
jw = j*wp;;
mag1 = 20*log10( (K)./ ( abs(jw +p1).* abs(jw + p2).*abs(jw+p3)));;
semilogx(w,mag,'k-',wp,mag1,'kd')
grid on
print -deps 91024mag1.eps
phase1 = ( -angle(jw +p1) -angle(jw + p2) - angle(jw+p3) )*180/pi;;
semilogx(w,phase,'k-',wp,phase1,'kd')
grid on
print -deps 91024phase1.eps
pause
p1 = 1
p2 = 5 - j*5
p3 = 5 + j*5
Ktc = 2
K=(Ktc *p1* p2 * p3)
mag2 = 20*log10( (K )./ ( abs(jw +p1).* abs(jw + p2).*abs(jw+p3)));;
semilogx(w,mag,'k-',wp,mag2,'kd')
print -deps 91024mag2.eps
phase2 = ( -angle(jw +p1) -angle(jw + p2) - angle(jw+p3) )*180/pi;;
semilogx(w,phase,'k-',wp,phase2,'kd')
grid on
print -deps 91024phase2.eps
p1 = 1
p2 = 3 -j*3
p3 = 3 + j*3
Ktc = 2
K=Ktc*p1*p2*p3
mag3 = 20*log10( K./ ( abs(jw +p1).* abs(jw + p2).*abs(jw+p3) ) );;
semilogx(w,mag,'k-',wp,mag3,'kd')
10
grid on
print -deps 91024mag3.eps
phase3 = ( -angle(jw +p1) -angle(jw + p2) - angle(jw+p3) )*180/pi;;
semilogx(w,phase,'k-',wp,phase3,'kd')
grid on
print -deps 91024phase3.eps
11