PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

658 Practical MATLAB® Applications for Engineers


plot(w,abs(H7));axis([0 4 -.5 1.5]);
ylabel(‘magnitude’)
title(‘Butt. BS,center freq,=2,stopband=1Butt.’)
subplot(2,2,2);
plot(w,angle(H7)*180/pi)
ylabel(‘phase (deg)’)
title(‘Butt.BSF’)
[num8,den8] = lp2bs(num2,den2,2,1);
H8 = freqs(num8,den8,w);
subplot(2,2,3)
plot(w,abs(H8));axis([0 6 -.5 1.5]);
ylabel(‘magnitude’)
xlabel(‘frequency(rad/sec)’)
title(‘Cheb.BS ,cent freq=2,BW stopband=1’)
subplot(2,2,4);
plot(w,angle(H8)*180/pi)
ylabel(‘phase (deg)’)
xlabel(‘frequency (rad/sec)’)
title(‘Cheb. BSF’)
Back in the command window, the script fi le revisit_analog_fi lters is executed and the
results are as follows (Figures 6.81 through 6.84):
>> revisit _ analog _ filters

Example 6.23

Indicate the steps and compute by hand the discrete IIR fi lter’s transfer function from
the analog RC-LPF of Example 6.1 (R = 1 Ω and C = 1 F) by employing a sampling period
of T = 0.01 s.

ANALYTICAL Solution
The solution follows the steps indicated:


  1. Determine the analog fi lter’s transfer function H(s).

  2. From the transfer function H(s), obtain the system impulse response h(t) = £−^1 [H(s)].


FIGURE 6.81
Four-pole analog Butterworth and Chebyshev/type-1 normalized LPFs of Example 6.22.


0 2 4 6

Butt. norm. LPF

0 2 4 6
− 200

− 100

0

0

100

200

phase (deg)

− 200

− 100

100

200

phase (deg)

Butt. LPF

0 2 4 6
0

0.2

0.4

0.6

0.8

1

magnitude

0

0.2

0.4

0.6

0.8

1

magnitude

Cheb. norm. LPF

frequency (rad/sec)

0246
frequency (rad/sec)

Cheb. LPF
Free download pdf