Professional Documents
Culture Documents
Rating:
Rating:
Lacuna, Karen D.
EC42FB1
7.1. Design a 3-tap FIR lowpass filter with a cutoff frequency of 1,500 Hz and a sampling rate of 8,000
Hz using
a. rectangular window function
b. Hamming window function.
Determine the transfer function and difference equation of the designed FIR system, and compute
Solution:
1
3
= 2 = 2(1500) (
)=
8000
8
2 + 1 = 3
=1
() = {sin(
=0
11
3
3
(0) = 8 =
8
(1) = (1) =
3
sin [8 (1)]
(1)
= 0.2940799888
3
3
(0) = (0) (0) = (1) = = 0.375
8
8
(1) = (1) = (1) (1) = 0.2940799888(1) = 0.2940799888
0 = 2 = 0.2940799888
b1 = 0.375
Transfer function
() = . + . + .
Difference equation
() =
()
= 0.2940799888 + 0.375 1 + 0.2940799888z 2
()
2
0
0.375
+ 0.5881599776 cos()
0.9631599776
|( )|
|( )|
H(ej )
0.9631599776
-0.3260314409
2
3
4
1000
0.7908919086
0.7908919086
-2.037657352
45
2000
.375
.375
-8.519374645
90
3000
-0.04089190858
0.04089190858
-27.76725238
45
4000
-0.2131599776
0.2131599776
-13.42588668
Plot
[hz, w] = freqz( [0.2941 0.375 0.2941], [1], 512);
phi= 180*unwrap(angle(hz))/pi;
plot(w,20*log10(abs(hz))),grid;
xlabel(Frequency (radians));
ylabel(Magnitude Response (dB))
(0)()
(0) = 0.54 + 0.46 cos [
]=1
1
(1)()
(1) = (1) = 0.54 + 0.46 cos [
] = 0.08
1
Transfer function
() = . + . + .
Difference equation
() =
()
= 0.0235263991 + 0.375 1 + 0.0235263991z 2
()
2
0
1000
0.375
+ 0.0470527982 cos()
0.4220527982
0.4082713527
|( )|
|( )|
0.4220527982
0.4082713527
-7.49266432
-7.781021846
H(ej )
degree
0
45
2
3
4
2000
0.375
0.375
-8.519374645
90
3000
0.3417286473
0.3417286473
-9.326372251
135
4000
0.3279472018
0.3279472018
-9.683921407
180
Plot
[hz, w] = freqz( [0.0235 0.375 0.0235], [1], 512);
phi= 180*unwrap(angle(hz))/pi;
plot(w,20*log10(abs(hz))),grid;
xlabel(Frequency (radians));
ylabel(Magnitude Response (dB))
7.3. Design a 5-tap FIR bandpass filter with a lower cutoff frequency of 1,600 Hz, an upper cutoff
frequency of 1,800 Hz, and a sampling rate of 8,000 Hz using
a. rectangular window function
b. Hamming window function.
Determine the transfer function and difference equation of the designed FIR system, and compute
Solution:
= 2 = 2(1600) (
1
2
)=
8000
5
= 2 = 2(1800) (
1
9
)=
8000
20
2 + 1 = 5
=2
() = {sin(
sin( )
=0
9
2
20
5 = 1
(0) =
20
(1) = (1) =
(2) = (2) =
9
sin [20 (1)]
(1)
9
sin [20 (2)]
(2)
2
sin [ (1)]
5
= 0.01166027182
(1)
2
sin [ (2)]
5
= 0.04436734622
(2)
1
1
(1) =
= 0.05
20
20
Transfer function
() = . + . + . + . .
Difference equation
() =
()
= 0.04436734622 + 0.01166027182 1 + 0.05z 2 + 0.01166027182 3 0.04436734622 4
()
2
3
4
|( )|
|( )|
H(ej )
0
1000
0.01
0.07
-40
-23.10
180
135
2000
-0.13i=0.13-1.57
0.13
-17.72
90
3000
-0.03-0.03i= 0.04-2.36
0.04
-27.96
45
4000
0.05
0.05
-26.02
180
Plot
() = 0.04436734622 + 0.01166027182 1 + 0.05z 2 + 0.01166027182 3 0.04436734622 4
(0)()
(0) = 0.54 + 0.46 cos [
]=1
1
(1)()
(1) = (1) = 0.54 + 0.46 cos [
] = 0.54
2
(2)()
(2) = (2) = 0.54 + 0.46 cos [
] = 0.08
2
0 = 4 = 3.55103
1 = 3 = 6.30103
b2 = 0.05
Transfer function
() = . + . + . + . .
Difference equation
() =
()
= 3.55103 + 6.30103 1 + 0.05z 2 + 6.30103 3 3.55103 4
()
() = . () + . ( ) + . ( ) + . ( )
. ( )
H(ej )={
+
{3.55103 [cos + sin ]+6.30103 +0.05[cos() sin() ]+6.30103 [cos(2) sin(2) ]3.55103 [cos(3) sin(3) ]}>0
{3.55103 [cos + sin ]+6.30103 +0.05[cos() sin() ]+6.30103 [cos(2) sin(2) ]3.55103 [cos(3) sin(3) ]}<0
2
3
4
|( )|
|( )|
H(ej )
0
1000
0.0555
0.06
-25.11
-24.44
180
135
2000
-0.0571i=0.0571-1.57
0.0571
-24.87
90
3000
-0.02905533906-0.029i= 0.04-2.36
0.04
-27.96
45
4000
-0.0303
0.0303
-30.37
Plot
() = 3.55103 + 6.30103 1 + 0.05z 2 + 6.30103 3 3.55103 4
7.5. Given an FIR lowpass filter design with the following specifications:
Passband (fpass)= 0800 Hz
Stopband (fstop)= 1,2004,000 Hz
Passband ripple = 0.1 dB
Stopband attenuation =40 dB
Sampling rate (fs) = 8,000 Hz,
determine the following:
a. window method
b. length of the FIR filter
Solution:
a. window method
Passband ripple = 0.1 dB
Hence, it is hanning window method
| | 1200 800
=
= 0.05
8000
=
3.1
3.1
=
=
0.05
+ 800 + 1200
=
=
2
2
7.7. Given an FIR bandpass filter design with the following specifications:
Lower cutoff frequency (fl) = 1,500 Hz
Lower transition width =600 Hz
Upper cutoff frequency(fh) =2,300 Hz
Upper transition width = 600 Hz
Passband ripple =0.1 dB
Stopband attenuation = 50 dB
Sampling rate(fs) = 8,000 Hz,
a. window method
b. length of the FIR filter
c. cutoff frequencies for the design equation.
Solution:
a. window method
Passband ripple = 0.1 dB
Hence, it is hamming window method
1500600
8000
= 0.1125
2300 600
= 0.2125
8000
5
= 44.4
0.1125
Solution:
a. transversal form, and write the difference equation for implementation
() =
()
= .25 0.5 1 + 0.25 2
()
b. linear phase form, and write the difference equation for implementation.
() =
()
= .25 0.5 1 + 0.25 2
()
7.11. Determine the transfer function for a 5-tap FIR lowpass filter with a lower cutoff frequency of
2,000 Hz and a sampling rate of 8,000 Hz using the frequency sampling method.
Solution:
= 2 + 1 = 5
=2
2
, = 0,1,2
5
0 = 0 , 0 = 1
2
1 = , 1 = 1
5
4
2 = , 2 = 0
5
Specifications
0.5
= 2 = 2(2000) (
)=
8000
2
Frequency Sampling
2
1
2( 3)
() = {1 + 2 cos [
]} , = 0,1,2
5
7
=1
1
4
(0) = {1 + 2 cos [
]} = 0.1236
5
5
1
2
(1) = {1 + 2 cos [
]} = 0.3236
5
5
1
0
(2) = {1 + 2 cos [ ]} = 0.6
5
5
0 = 4 = 0.1236
1 = 3 = 0.3236
2 = 0.6
() = . + . . + . + . .
= 2 + 1 = 7
=4
2
, = 0,1,2
5
0 = 0 , 0 = 0
2
1 = , 1 = 0
7
4
2 = , 2 = 1
7
6
3 = , 3 = 0
7
Specifications
1
1
0
0
0.35
0.75
1
3
= 2 = 2(1500) (
)=
8000
8
= 2 = 2(3000) (
1
3
)=
8000
4
Frequecny Sampling
3
1
2( 3)
() = {0 + 2 cos [
]} , = 0,1,2
7
7
=1
3 = 0.2857
() = . . . + . . .
+ .
7.15. In a speech recording system with a sampling rate of 10,000 Hz, the speech is corrupted by
broadband random noise. To remove the random noise while preserving speech information, the
following specifications are given:
Speech frequency range = 03,000 kHz
Stopband range = 4,0005,000 Hz
Passband ripple = 0.1 dB
Stopband attenuation = 45 dB
FIR filter with Hamming window.
Determine the FIR filter length (number of taps) and the cutoff frequency; use MATLAB to design the
filter; and plot the frequency response.
=
| | 4000 3000
=
= 0.1
10000
3.3 3.3
=
=
0.1
cutoff frequency
+ 3000 + 4000
=
=
2
2
b. filter length
=
= =
1600
= 0.0363
44100
3.3
= 90.91
0.0363
c. cutoff frequency
=
() = () =