Sunteți pe pagina 1din 21

TECHNOLOGICAL INSTITUTE OF THE PHILIPPINES

938 AURORA BOULEVARD, CUBAO, QUEZON CITY

Advanced Digital Signal Processing

Chapter 8: Infinite Impulse Response


Filter Design
PROBLEMS

Rating

Bacani, Gabriel A.
EC42FB1

Engr. Francis Malit


Instructor

January 25, 2016

Problems:
8.2 The lowpass filter with a cutoff frequency of 1 rad/sec is given as

H p ( s)=

1
s +1

a. Use Hp(s) and the BLT to obtain a corresponding IIR digital low- pass filter
with a cutoff frequency of 30 Hz, assuming a sampling rate of 200 Hz.
b. Use MATLAB to plot the magnitude and phase frequency responses of H(z).

Solution:
a.)

d=2 f =2 ( 30 Hz ) =60

rad
sec

1
1
3
T= =
=5 x 10 sec
f s 200 Hz
d T
2
2
60 5 x 103
rad
a= tan
=
tan
=400 tan ( 27 )=203.81
3
T
2
2
sec
5 x 10

( )

From low pass to low pass:

s
1
203.81
H LP ( s )=H p ( s )s= =
= a =
a s
a + s 203.81+ s
+1
a

H ( z )= H HP ( s )s=

H ( z )=

( )]

203.81
203.81+400

( z1
z +1 )

1
400

0.510( z +1)
0.510 ( z +1 ) + z1

( )]

2 z 1
203.81
2
z1
=
s=
3
T z+1
203.81+ s
z+ 1
5 x 10

1
400

][

0.510
z+ 1
z 1
0.510+
z+1
=
z+1

( )

0.510 z+ 0.510
1

0.510 z +0.510
1.51 z 0.49 1.51 z
H ( z )=
=
0.510 z +0.510+ z1
1
1.51 z

H ( z )=

0.3380.338 z1
10.32 z1

b.)

fs=200;
[B,A]=lp2lp ([1], [1 1], 203.81 );
[b,a]=bilinear (B,A,fs);
[hz,f]=freqz(b,a,512,fs);
phi=180*unwrap(angle(hz))/pi;
subplot(2,1,1), plot(f, abs(hz)), grid;
xlabel (Frequency (Hz)); ylabel (Magnitude Response);
subplot(2,1,2), plot(f,phi), grid;
xlabel (Frequency (Hz)); ylabel (Phase (degrees));

8.4 Consider the normalized lowpass filter with a cutoff frequency of 1 rad/sec:
H p ( s )=

1
s+ 1

a.

Use Hp(s) and the BLT to design a corresponding IIR digital notch (bandstop) filter
with a lower cutoff frequency of 20 Hz, an upper cutoff frequency of 40 Hz, and a
sampling rate of 120 Hz.

b. Use MATLAB to plot the magnitude and phase frequency responses of H(z).
Solution:

a)
l =2 f =2 ( 20 Hz )=40

rad
sec

h=2 f =2 ( 40 Hz ) =80

rad
sec

1
1
T= =
=8.33 x 103 sec
f s 120 Hz
al =

T
2
2
40 8.33 x 103
rad
tan l =
tan
=240 tan ( 30 )=80 3
3
T
2
2
sec
8.33 x 10

( )

138.56

ah=

rad
sec

T
2
2
80 8.33 x 103
rad
tan h =
tan
=240 tan ( 60 )=415.69
3
T
2
2
sec
8.33 x 10

( )

o= al ah= (138.56)(415.69)=240

W =ahal =415.69

rad
sec

rad
rad
rad
138.56
=277.13
sec
sec
sec

From Lowpass to Bandstop


H BP ( s )=H p ( s )s=

sW
s + 2o
2

s 2+ 2o
1
s 2+ 2402
s 2 +57600
H BS ( s )=
= 2 2
= 2
=
sW
s + o +sW s + 277.13 s+240 2 s2 +277.13 s +57600
+
1
s 2+ 2o

H ( z )= H BS ( s )s=

H ( z )=

( )]

( )]

2 z1
s +57600
2
z 1
= 2
s=
3
T z +1
s +277.13 s +57600
8.33 x 10 sec z+1
2

[ ( )]
[ ( ) ] [ ( )]
z1
240
z+ 1

z1
240
z+1

+57600

+277.13 240

z1
+57600
z +1

Let :

( z1
z +1 )

x=

57600 x +57600
1

2
2
[ 240 x ] +57600
57600 x +66511.2 x +57600 57600
H ( z )=
=
2
1
[ 240 x ] +277.13 [ 240 x ] +57600
57600

( z1 )2 + ( z +1 )2
z1 2
+1
z +1
( z+1 )2
x 2+1
H ( z )= 2
=
=
2
2
x + 1.15 x +1
z1 2
z1
( z1 ) +1.15 ( z1 ) ( z +1 ) + ( z +1 )
+1.15
+1
2
z +1
z +1
( z+1 )

( )
( ) ( )

H ( z )=

( z1 )2 + ( z+ 1 )2
( z1 )2 +1.15 ( z1 )( z +1 ) + ( z+ 1 )2

z 22 z +1+ z 2+ 2 z +1
z 22 z +1+ 1.15 z 21.15+ z 2 +2 z+1

2 z 2 +2
1
1+ z2
1

2
2
2
1.575
3.15 z +0.85 2 z
1.575+0.425 z
H ( z )=
=
1
1
2
1.575
2z

H (z)=

0.634 +0.634 z2
1+ 0.2698 z2

b)

fs=120;
[B,A]=lp2bs ([1], [1 1],240,277.13 );
[b,a]=bilinear (B,A,fs);
[hz,f]=freqz([1 0 1], [1.575 0 0.425],512,fs);
phi=180*unwrap(angle(hz))/pi;
subplot(2,1,1), plot(f, abs(hz)), grid;
xlabel (Frequency (Hz)); ylabel (Magnitude Response);
subplot(2,1,2), plot(f,phi), grid;
xlabel (Frequency (Hz)); ylabel (Phase (degrees));

8.6. Design a first-order digital lowpass Butterworth filter with a cutoff frequency of 1.5
kHz and a passband ripple of 3 dB at a sampling frequency of 8,000 Hz.
a. Determine the transfer function and difference equation.
b. Use MATLAB to plot the magnitude and phase frequency responses

a)
d=2 f =2 ( 1500 ) =3000

rad
sec

1
1
T= =
=1.25 x 104 sec
f s 8000 Hz

a=

4
T
2
2
3000 1.25 x 1 0
tan d =
tan
=16000 tan ( 33.75 )
4
T
2
2
1.25 x 10

( )

10690.86

rad
sec

first-order digital lowpass Butterworth filter


H p ( s )=

1
s+ 1

Lowpass to Lowpass

[ | ][ | ]

H ( s )= H p ( s ) s=

H ( s )=

H ( z )=

1
s
+1
a

s
1
s
=
s=
a
s +1
a
1

s
+1
10690.86

10690.86
s +10690.86

( )]

10690.86
2
z1
z1
s=
=16000
4
s+10690.86
z+
1
z +1
1.25 x 10

( )

10690.86
1

16000
z1
16000
+10690.86
z+ 1
0.668
H ( z )=
=
1
z 1
+0.668
16000
z+1

( )

0.668 z +0.668
1

0.668( z+1)
1.668 z0.332 1.668 z 0.400+ 0.400 z 1
H ( z )=
=
=
1
1
z1+0.668 ( z+1)
10.199 z
1.668 z
Transfer Function
0.400+ 0.400 z1
H ( z )=
1
10.199 z
Difference Equation
Y ( z ) 0.400+0.400 z1
=
X (z )
10.199 z1

Y ( z ) 0.199 z 1 Y ( z )=0.400 X ( z ) +0.400 z1 X ( z )


Y ( z ) =0.400 X ( z ) +0.400 z1 X ( z ) +0.199 z1 Y ( z )
y ( n )=0.400 x ( n ) +0.400 x ( n1 )+ 0.199 y (n1)

b)

fs=8000;
[B,A]=lp2lp ([1], [1 1], 10690.86 );
[b,a]=bilinear (B,A,fs);
[hz,f]=freqz(b,a,512,fs);
phi=180*unwrap(angle(hz))/pi;
subplot(2,1,1), plot(f, abs(hz)), grid;
xlabel (Frequency (Hz)); ylabel (Magnitude Response);
subplot(2,1,2), plot(f,phi), grid;
xlabel (Frequency (Hz)); ylabel (Phase (degrees));

8.8. Design a third-order digital highpass Butterworth filter with a cutoff frequency of 2
kHz and a passband ripple of 3 dB at a sampling frequency of 8,000 Hz.
a. Determine the transfer function and difference equation.
b. Use MATLAB to plot the magnitude and phase frequency responses.
a)

And the difference equation is,

y ( n )=0.1667 x ( n )0.5 x ( n1 ) +0.5 x ( n2 ) 0.1667 x ( n3 )0.3333 y (n2)

b)

8.10. Design a second-order digital bandstop Butterworth filter with a center frequency of
1.8 kHz, a bandwidth of 200 Hz, and a passband ripple of 3 dB at a sampling frequency of
8,000 Hz.
a. Determine the transfer function and difference equation.
b. Use MATLAB to plot the magnitude and phase frequency responses.

And the difference equation is,

y ( n )=0.9266 ( n )2899 x ( n1 )+ 0.9266 x ( n2 )+ 0.2899 y ( n1 )0.8532 y (n2)

8.12

D
esign a second-order digital lowpass Chebyshev filter with a cutoff frequency of
1.5 kHz and 0.5 dB ripple on passband at a sampling frequency of 8,000 Hz.
Use MATLAB to plot the magnitude and phase frequency responses.

8.14 Design a second-order digital bandpass Chebyshev filter with the following
specifications:
Center frequency of 1.5 kHz
Bandwidth of 200 Hz
0.5 dB ripple on passband
Sampling frequency of 8,000 Hz.
a. Determine the transfer function and difference equation.
b. Use MATLAB to plot the magnitude and phase frequency responses.

a) Using Matlab,

8.16 Design a fourth-order digital lowpass Butterworth filter with a cutoff frequency
of 2 kHz and a passband ripple of 3 dB at a sampling frequency of 8,000 Hz.
a. Determine the transfer function and difference equation.
b. Use MATLAB to plot the magnitude and phase frequency responses.

8.18 Design a fourth-order digital bandpass Chebyshev filter with a center


frequency of 1.5 kHz, a bandwidth of 200 Hz, and a 0.5 dB ripple at a
sampling frequency of 8,000 Hz.
a. Determine the transfer function and difference equation.
b. Use MATLAB to plot the magnitude and phase frequency responses.

8.20. Consider the following Laplace transfer function:


H p ( s )=

1
s +3 s+2
2

a. Determine H(z) and the difference equation using the impulse invariant method if the
sampling rate fs=10 Hz.
b. Use MATLAB to plot the magnitude frequency response |H( f )| and the phase frequency
response ( f ) with respect to H(s) for the frequency range from 0 to fs/2 Hz.

c. Use MATLAB to plot the magnitude frequency response

|H ( e j )|= H ( e 2 fT )

and

the phase frequency response ( f ) with respect to H(z) for the frequency range from 0
to fs/2 Hz.
Solution:

8.22. A second-order bandpass filter is


required to satisfy the following specifications:
Sampling rate = 8,000 Hz
3 dB bandwidth: BW = 100 Hz
Narrow passband centered at f0 = 2,000 Hz
Zero gain at 0 Hz and 4,000 Hz.

Find the transfer function and difference equation by the pole-zero placement method.
Solution:

1(

100
) =0.9607
8000
r=

2000
360=90
8000

180
2 0.9607 cos +0.96072

1
(10.9607)
k =
0.0385

H ( z )=

0.0385(z 21)
( z2 +0.9229)

H ( z )=

0.03850.0385 z2
2
1+ 0.9229 z

y ( z) 0.03850.0385 z2
=
x ( z)
1+0.9229 z2

y ( z ) ( 1+0.9229 z2 ) =x ( z)(0.03850.0385 z2 )
y ( n ) +0.9229 y ( n2 )=0.0385 x ( n )0.0385 x ( n2 )

y ( n )=0.0385 x ( n )0.0385 x ( n2 )0.9229 y ( n2 )

8.24. A first-order lowpass filter is required to satisfy the following specifications:


Sampling rate = 8,000 Hz
3 dB cutoff frequency: fc = 200 Hz
Zero gain at 4,000 Hz.
Find the transfer function and difference equation using the pole-zero placement method.
Solution:
(12 (

k=

200
) )=0.8429
8000

10.8429
2

k =0.07855

H ( z )=

0.07855( z 1)
(z 0.8429)

H ( z )=

0.07855+0.07855 z1
1
10.8429 z

y ( z) 0.07855+ 0.07855 z 1
=
x ( z)
10.8429 z1

y ( z ) ( 10.8429 z1 )=x ( z )( 0.07855+0.07855 z1 )


y ( n )0.8429 y ( n1 ) =0.07855 x ( n ) +0.07855 x ( n1 )

y ( n )=0.07855 x ( n )+ 0.07855 x ( n1 )+ 0.8429 y ( n1 )

8.26. A first-order highpass filter is required to satisfy the following specifications:


Sampling rate = 8,000 Hz
3 dB cutoff frequency: fc = 3; 850 Hz
Zero gain at 0 Hz.
Find the transfer function and difference equation by the pole-zero placement method.
Solution:

(1 + 2(

k=

3850
) )=0.8822
8000

10.8822
2

k =0.0589

H ( z )=

0.0589( z 1)
(z+0.8822)

H ( z )=

0.05890.0589 z1
1+ 0.8822 z1

y ( z) 0.05890.0589 z1
=
x ( z)
1+0.8822 z 1

y ( z ) ( 1+0.8822 z 1 ) =x(z )(0.05890.0589 z 1 )


y ( n ) +0.8822 y ( n1 )=0.0589 x ( n )0.0589 x ( n1 )

y ( n )=0.0589 x ( n )0.0589 x ( n1 )0.8822 y ( n1 )

8.28. Given a filter transfer function,


H ( z )=

0.3430 z 2+ 0.6859 z +0.3430


z 2+ 0.7075 z +0.7313

a. Realize the digital filter using direct form I and using direct form II;
b. determine the difference equations for each implementation.
Solution:

y ( z) z 2 (0.3430+ 0.6859 z1 +0.3430 z2 )


=
x ( z)
z2 (1+0.7075 z1+ 0.7313 z 2 )
y ( z) (0.3430+0.6859 z1+ 0.3430 z 2 )
=
x ( z)
(1+0.7075 z1+ 0.7313 z2)
y ( z ) ( 1+0.7075 z1 +0.7313 z2 )=x ( z)( 0.3430+0.6859 z1 +0.3430 z2)
y ( n ) +0.7075 y ( n1 ) +0.7313 y ( n2 )=0.3430 x ( n ) +0.6859 x ( n1 ) +0.3430 x (n2)

y ( n )=0.3430 x ( n )+ 0.6859 x ( n1 )+ 0.3430 x ( n2 )0.7075 y ( n1 )0.7313 y ( n2 )

DIRECT FORM II:


0=0.3430, 1=0.6859,2=0.3430 and 1=0.7075,2=0.7313
w ( n )=x ( n )0.7075 w ( n1 )0.7313 w ( n2 )
y ( n )=0.3430 w ( n )+ 0.6859 w ( n1 )+ 0.3430 w ( n2 )

S-ar putea să vă placă și