Lab - FIR Filters
Theory:
In signal processing, a finite impulse response (FIR) filter is a filter whose impulse response is of finite length duration, because it settles to zero in finite time. FIR filters have linear phase, are stable and are typically easy to design and implement.
Prelab Assignment:
Lab:
1. Design a bandpass filter using the Hamming window design technique. The specifications are
Lower stopband edge: 0.3Π
Upper stopband edge: 0.6Π As = 50 dB
Lower passband edge: 0.4Π
Upper passband edge: 0.5Π Rp = 0.5 dB
Plot the impulse response and the magnitude response (in dB) of the designed filter. Do not use the fir1 function.
2. Design a highpass filter using one of the fixed window functions. The specifications are
Stopband edge: 0.4Π, As = 50 dB
Passband edge: 0.6Π, Rp = 0.004 dB
Plot the zoomed magnitude response (in dB) of the designed filter in the passband to verify the passband ripple Rp. Do not use the fir1 function.
3. Design a linear-phase bandpass filter using the Hann window design technique. The specifications are
Lower stopband edge: 0.2Π
Upper stopband edge: 0.75Π As = 40 dB
Lower passband edge: 0.35Π
Upper passband edge: 0.55Π Rp = 0.25 dB
Plot the impulse response and the magnitude response (in dB) of the designed filter. Do not use the fir1 function.
4. Design a bandstop filter using the Hamming window design technique. The specifications are
Lower stopband edge: 0.4Π
Upper stopband edge: 0.6Π As = 50 dB
Lower passband edge: 0.3Π
Upper passband edge: 0.7Π Rp = 0.2 dB
Plot the impulse response and the magnitude response (in dB) of the designed filter. Do not use the fir1 function.
5. Using the Kaiser window method, design a linear-phase FIR digital filter that meets the following specifications:
0.975 ≤ |H(ejω)| ≤ 1.025, 0 ≤ ω ≤ 0.25Π
0 ≤ |H(ejω)| ≤ 0.005, 0.35Π ≤ ω ≤ 0.65Π
0.975 ≤ |H(ejω)| ≤ 1.025, 0.75Π ≤ ω ≤ Π
Determine the minimum-length impulse response h(n) of such a filter. Provide a plot containing subplots of the amplitude response and the magnitude response in dB. Do not use the fir1 function.
6. We wish to use the Kaiser window method to design a linear-phase FIR digital filter that meets the following specifications:
0 ≤ |H(ejω)| ≤ 0.01, 0 ≤ ω ≤ 0.25Π
0.95 ≤ |H(ejω)| ≤ 1.05, 0.35Π ≤ ω ≤ 0.65Π
0 ≤ |H(ejω)| ≤ 0.01, 0.75Π ≤ ω ≤ Π
Determine the minimum length impulse response h(n) of such a filter. Provide a plot containing subpltos of the amplitude response and the magnitude response in dB. Do not use the fir1 function.