Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

Finite-duration

Impulse Response
(FIR) Filters

Signal Spectra and Signal Processing


ECE162
Introduction

In the design of frequency-selective filters, the desired filter


characteristics are specified in the frequency domain in terms of the
desired magnitude and phase response of the filter.
In the filter design process, we determine the coefficients of a causal
FIR or IIR filter that closely approximates the desired frequency
response specifications. The issue of which type of filter to design,
FIR or IIR, depends on the nature of the problem and on the
specifications of the desired frequency response.
FIR vs IIR

In practice, FIR filters are employed in filtering problems where there


is a requirement for a linear-phase characteristic within the
passband of the filter. If there is no requirement for a linear-phase
characteristic, either an IIR or an FIR filter may be employed.
However, as a general rule, an IIR filter has lower sidelobes in the
stopband than an FIR filter having the same number of parameters.
For this reason, if some phase distortion is either tolerable or
unimportant, an IIR filter is preferable, primarily because its
implementation involves fewer parameters, requires less memory
and has lower computational complexity.
General Considerations

Ideal filters are not causal and therefore are not physically realizable.
In this section, the issue of causality and its implications is
considered in detail. Following this discussion, we present the
frequency response characteristics of causal FIR and IIR digital filters.
Characteristics of Practical Frequency-
Selective Filters
Causality implies that the frequency response characteristic 𝐻 𝜔 of
the filter cannot be zero, except at a finite set of points in the
frequency range. In addition, 𝐻 𝜔 cannot have an infinitely sharp
cutoff from passband to stopband, that is, 𝐻 𝜔 cannot drop from
unity to zero abruptly.
Although the frequency response characteristics possessed by ideal
filters may be desirable, they are not absolutely necessary in most
practical applications. If we relax these conditions, it is possible to
realize causal filters that approximate the ideal filters as closely as
we desire.
Characteristics of Practical Frequency-
Selective Filters
Design of FIR Filters

An FIR filter of length M with input 𝑥 𝑛 and output 𝑦 𝑛 is


described by the difference equation
Symmetric and
Antisymmetric FIR Filters
An FIR filter has linear phase if its unit sample response satisfies the
condition
Symmetric and
Antisymmetric FIR Filters
When the symmetry and antisymmetry conditions are incorporated,
we have
Symmetric and
Antisymmetric FIR Filters
It is straightforward to show that the frequency response of an FIR
filter with an antisymmetric unit sample response can be expressed
as

where
Symmetric and
Antisymmetric FIR Filters
The phase characteristic of the filter for both M odd and M even is

These general frequency response formulas can be used to design


linear-phase FIR filters with symmetric and antisymmetric unit
sample responses.
Design of Linear-Phase
FIR Filters Using Windows
In this method we begin with the desired frequency response
specification 𝐻𝑑 𝜔 and determine the corresponding unit sample
response ℎ𝑑 𝑛 . Indeed, ℎ𝑑 𝑛 is related to 𝐻𝑑 𝜔 by the Fourier
transform relation

where
Design of Linear-Phase
FIR Filters Using Windows
The convolution of 𝐻 𝜔 with 𝑊 𝜔 yields the frequency response
of the (truncated) FIR filter. That is,

The Fourier transform of the rectangular window is


Design of Linear-Phase
FIR Filters Using Windows
This window function has a magnitude response

and a piecewise linear phase


Design of Linear-Phase
FIR Filters Using Windows
Design of Linear-Phase
FIR Filters Using Windows
The characteristics of the rectangular window play a significant role
in determining the resulting frequency response of the FIR filter
obtained by truncating hd(n) to length M. Specifically, the
convolution of 𝐻𝑑 𝜔 with 𝑊 𝜔 has the effect of smoothing 𝐻𝑑 𝜔 .
As M is increased, W(ω) becomes narrower, and the smoothing
provided by 𝑊 𝜔 is reduced.
Design of Linear-Phase
FIR Filters Using Windows
On the other hand, the large sidelobes of W(ω) result in some
undesirable ringing effects in the FIR filter frequency response H(ω),
and also in relatively larger sidelobes in H(ω). These undesirable
effects are best alleviated by the use of windows that do not contain
abrupt discontinuities in their time-domain characteristics, and have
correspondingly low sidelobes in their frequency-domain
characteristics.
Window Functions for FIR
Filter Design
Window Functions for FIR Filter
Design
Window Functions for FIR
Filter Design
Important Frequency-Domain
Characteristics of Some Window Functions
Example

Design a symmetric lowpass linear-phase FIR filter having a desired


frequency response
Solution

A delay of (M − 1)/2 units is incorporated into 𝐻𝑑 𝜔 in anticipation


of forcing the filter to be of length M. The corresponding unit
sample response,
Solution

If M is selected to be odd, the value of h(n) at n = (M − 1)/2 is


Solution

The magnitude of the frequency response H(ω) of this filter is


illustrated below for M = 61 and M = 101.
Solution

We observe that relatively large oscillations or ripples occur near the


band edge of the filter. The oscillations increase in frequency as M
increases, but they do not diminish in amplitude. As indicated
previously, these large oscillations are the direct result of the large
sidelobes existing in the frequency characteristic 𝑊 𝜔 of the
rectangular window. As this window function is convolved with the
desired frequency response characteristic 𝐻𝑑 𝜔 , the oscillations
occur as the large constant-area sidelobes of 𝑊 𝜔 move across the
discontinuity that exists in 𝐻𝑑 𝜔 .
Solution
Since

is basically a Fourier series representation of H (ω), the multiplication of


ℎ𝑑 𝑛 with a rectangular window is identical to truncating the Fourier
series representation of the desired filter characteristic 𝐻𝑑 𝜔 . The
truncation of the Fourier series is known to introduce ripples in the
frequency response characteristic 𝐻 𝜔 due to the nonuniform
convergence of the Fourier series at a discontinuity.
The oscillatory behavior near the band edge of the filter is called the
Gibbs phenomenon.
Solution

To alleviate the presence of large oscillations in both the passband


and the stopband, we should use a window function that contains a
taper and decays toward zero gradually, instead of abruptly, as it
occurs in a rectangular window.
Solution

Lowpass FIR filter designed with Lowpass FIR filter designed with
rectangular window (M = 61). Hamming window (M = 61).
Solution

Lowpass FIR filter designed with Lowpass FIR filter designed with
Blackman window (M = 61). Kaiser window (M = 61).
𝐸𝑁 =

END

You might also like