Lecture 6 - FIR Filters
Lecture 6 - FIR Filters
FIR Filters
DSPs are now available to implement digital filters in real-
time. A digital filter, such as an FIR filter, operates on
discrete - time signals and can be implemented with a DSP
such as the TMS320C6x.
Digital filter design techniques fall into either IIR or FIR approaches:
• In the FIR approaches the additional constraint of linear phase is usually imposed
Fig. 6.5. FIR filter structure showing delays
Linear phase filters are FIR filters. However, not all FIR filters have linear phase. A useful feature of an
FIR filter is that it can guarantee linear phase. The linear phase feature is useful in various applications
such as speech analysis, where phase distortion can be critical.
Characteristics of FIR
Filters
• Impulse response has a finite duration (N cycles)
• Linear phase, constant group delay (N must be odd)
• FIR filters have only zeros (no poles), all zero filters, or called feedforward, non recursive or transversal
Why bother?
• unconditionally stable, can be designed to have a linear phase
• can be adaptive, flexibly in shaping their magnitude response
• computational advantages when decimating output
• easy to understand and design via:
• Window sinc method
• Fourier series expansion with windowing
• frequency sampling using inverse FFT – arbitrary frequency
Desired (Ideal) Frequency Response of different Filters
Fig. 6.6. Desired transfer function for FIR filters: (a) lowpass, (b) highpass, (c) bandpass, (d) bandstop
Determining the Filter coefficients of FIR Filter
Calculation Methods
The filter coefficients can be calculated by using several methods as:
o Windowing
o Optimal sampling methods
o Frequency sampling methods.
Impulse response truncation - the simplest design methods, has undesirable frequency domain
characteristic, not very useful
Windowing design method - simple and convenient but not optimal
N.B. All of these methods can lead to linear phase FIR filter
Window Design Technique
The basic idea behind the window design is to choose a proper ideal frequency-selective filter (which always
has a noncausal, infinite-duration impulse response) and then to truncate (or window) its impulse response to
obtain a linear-phase and causal FIR filter.
The emphasis in this approach is on selecting an appropriate windowing function and an appropriate ideal
filter. We will denote an ideal frequency-selective filter by , which has a unity magnitude gain and linear-
phase characteristics over its passband, and zero response over its stopband.
H d e {
1.e j , c
j
0, c
2n M 1
M 1 , 0n
2
2n M 1
n 2 , n M 1
M 1 2
0, otherwise
Hann Window
The Hanning or raised cosine window function is given by:
Note: The Hanning window has the highest or first sidelobe level at approximately -31dB from the peak of
the mainlobe.
Hamming Window
The Hamming window is similar to the Hann window except that it has a small amount of discontinuity and is
given by :
Note: The Hamming window which has the highest or first sidelobe level at approximately -43dB from the peak
of the main lobe.
Blackman Window
The Blackman window function is also similar to the previous two but contains a second harmonic term and
is given by:
Note: Blackman window has the highest sidelobe level down to approximately −58dB from the peak of the
mainlobe. Also, whilst the Blackman window produces the largest reduction in the sidelobe compared with
previous window functions, it has the widest mainlobe.
Kaiser Window
The Kaiser window function is an adjustable window function that is widely used in practice. The Kaiser
window function is given by:
2n
2
I 0 1 1
M 1
n , 0 n M 1
I0
k 2
x
where is the modified Bessel function given by I 0 x 1 2
k 0 k!
Time Frequency
There are much less ripples
for the Hanning window
but that the transition
width has increased