Solution 9.10.2.9
The MATLAB statements
load bodeid9
topm = size(bodeid9)
top = topm(1,1)
w=bodeid9(1:top,1);;
mag = bodeid9(1:top,2);;
phase = bodeid9(1:top,3);;
semilogx(w,mag);;
grid on
axis([0.1,100,-100,40])
print -deps 91029mag.eps
semilogx(w,phase);;
grid on
axis([0.01,100,-330,-180])
print -deps 91029phase.eps
can be used to load the data and plot the magnitude response. Figure 1
shows the magnitude data with some asymptotes added. The transfer func-
tion clearly has twopoles at the origin and twocomplex poles. The high
frequency asymptote has a slope of ;60 dB/dec, so there is also a zero
present. The phase plot, shown in Figure 2, is interesting because even at
lowfrequencies, the phase is;220
.This seems to indicate that the complex
poles are in
uencing the phase as muchatlowfrequency at the zero. The
\hump" in the magnitude plot is over 10 dB, so weexpect the damping ratio
to be small. The resonant frequency is about 10 rad/sec. The gain term can
be approximated by remembering that at lowfrequency only the gain term
and the term 1=s
2
will be present. Thus our rst guess is The term 1=s
2
by
itself will cross the vertical line through ! =1rad/sec at 0 db. The plot
actually crosses at ;6 dB, so wecannd the gain to be
K =10
;6=20
=0:5012:
Then our rst guess at the transfer function is
G(s) =
0:5(1+ s=10)
s
2
((s=
p
104)
2
+(1=52)s+1)
=
2:2(s+10)
s
2
(s +2;j10)(s+2+j10)
:
Wecheckthe accuracy of the model bycomparing the actual magnitude and
phase to the phase of the derived transfer function, as shown in Figures 3
1
10
-1
10
0
10
1
10
2
-100
-80
-60
-40
-20
0
20
40
Figure 1: ABode magnitude plot
2
10
-2
10
-1
10
0
10
1
10
2
-300
-280
-260
-240
-220
-200
-180
-160
-140
Figure 2: ABode phase plot
3
10
-2
10
-1
10
0
10
1
10
2
10
3
-100
-80
-60
-40
-20
0
20
40
Figure 3: Comparison of actual and derived Bode magnitude plots
4
10
-2
10
-1
10
0
10
1
10
2
10
3
-300
-250
-200
-150
-100
Figure 4: Comparison of actual and derived Bode phase plots
5
10
-2
10
-1
10
0
10
1
10
2
10
3
-100
-80
-60
-40
-20
0
20
40
Figure 5: Comparison of actual and derived Bode magnitude plots
and 4 The magnitude t is very good, but the phase t is not as good. It
looks likewe need to decrease the damping ratio so wetry
G(s) =
0:5(1+ s=10)
s
2
((s=
p
101)
2
+(1=101)s+1)
=
5:05(s+10)
s
2
(s +1;j10)(s+1+j10)
:
As shown in Figures 5 and 6, the t is very good. The MATLAB
program that does this analysis is
load bodeid9
topm = size(bodeid9)
top = topm(1,1)
w=bodeid9(1:top,1);;
mag = bodeid9(1:top,2);;
6
10
-2
10
-1
10
0
10
1
10
2
10
3
-320
-300
-280
-260
-240
-220
-200
-180
-160
Figure 6: Comparison of actual and derived Bode phase plots
7
phase = bodeid9(1:top,3);;
semilogx(w,mag);;
grid on
axis([0.1,100,-100,40])
print -deps 91029mag.eps
semilogx(w,phase);;
grid on
axis([0.01,100,-300,-140])
print -deps 91029phase.eps
z1 = 10
p1 = 0
p2 = 0
p3 = 2 -j*10
p4 = 2 + j*10
Ktc = 0.5
K=(Ktc * p3 * p4)/(z1)
wp = logspace(-2,3,20);;
jw = j*wp;;
mag1 = 20*log10( (K*abs(jw + z1) )
./ ( abs(jw +p1).* abs(jw + p2).*abs(jw+p3).*abs(jw + p4) ) );;
semilogx(w,mag,'k-',wp,mag1,'kd')
grid on
axis([0.01,1000,-100,40])
print -deps 91029mag1.eps
phase1 = (angle(jw + z1) -angle(jw +p1) -angle(jw + p2) - angle(jw+p3)
-angle(jw + p4) )*180/pi;;
semilogx(w,phase,'k-',wp,phase1,'kd')
grid on
axis([0.01,1000,-330,-90])
print -deps 91029phase1.eps
z1 = 10
p1 = 0
p2 = 0
p3 = 1-j*10
p4 = 1 + j*10
Ktc = 0.5
K=(Ktc * p3 * p4)/(z1)
mag2 = 20*log10( (K*abs(jw + z1) )
./ ( abs(jw +p1).* abs(jw + p2).*abs(jw+p3).*abs(jw + p4) ) );;
semilogx(w,mag,'k-',wp,mag2,'kd')
grid on
axis([0.01,1000,-100,40])
print -deps 91029mag2.eps
phase2 = (angle(jw + z1) -angle(jw +p1) -angle(jw + p2)
- angle(jw+p3)-angle(jw+p4) )*180/pi;;
8
semilogx(w,phase,'k-',wp,phase2,'kd')
grid on
axis([0.01,1000,-330,-160])
print -deps 91029phase2.eps
9