You are on page 1of 23

FIR Design Using Matlab

FIR-BPF Design Example


[Ex 1] Plot the magnitude response of a linear phase FIR highpass filter using a
rectangular
g Window truncation of ideal impulse
p response
p hBP[[n]] of the ideal BP filter to
length N=2M+1 for two different values of M. show that the truncated filter exhibits
oscillatory behavior on both sides of cutoff frequencies at 0.3 πand 0.7 π rad/sec.
FIR-LPF Design Example

[Ex 2] Using the windowed FS approach, design a linear phase FIR


LPF with the following specifications:

Passband edge at 4 KHz,


stopband edge at 6 KHz,
maximum passband attenuation of 0.2 dB,
minimum
i i stopband
b d attenuation
i off 42 dB,
dB
and sampling frequency of 18 KHz.

Use each of the following windows for the design: Hamming,


Hann, and Blackman. Show the impulse response coefficients and
pl t the
plot th gain
in response
r sp ns off the
th designed
d si n d filter
filt r for
f r each
h case.
s
Comment on your results. Do not use the M file fir1.
Passband edge at 2 khz,
stopband edge at 4 khz,
maximum passband attenuation of 0.2 dB,
minimum stopband attenuation of 42 dB,
and sampling frequency of 18 khz.
khz

2
4
6pi/18
See table
sinc(x) = sin(pi*x)/(pi*x)
03
0.3

0.2

0.1

-0.1

-0.2

-0.3

-0.4

-0.5

-0.6

-0.7

0.238 0.239 0.24 0.241 0.242 0.243 0.244 0.245 0.246


The most commonly used

N=2M

Note: it provides no
control over
passband ripples
[Ex 3] Repeat Exercise using the Kaiser window. Do not use the M file fir1.

21.3 22 11
22
20

-20

-40

-60

-80

-100
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Ex4
[Ex 5] HPF using Frequency Sampling Technique
Ex6
Ex7

You might also like