EDITOR: B. SOMANATHAN NAIR
1. PRICNIPLES OF FIR
FILTER DESIGN
FIR filters are designed by assuming that the
magnitude of transfer function H(w) is unity; in other words,
we assume that
│H(ω)│=
│Y(ω)/x(ω)│= 1 (1)
where X(w) is the input and Y(w) is the output in the
frequency domain, we find from (1)that
│Y(ω) │ = │ X(ω)│ (2)
From (2), we arrive at a very important design
concept:
An FIR filter does not introduce any losses to signals that
get transmitted through it.
It may be noted here that
all types of IIR filters are designed by choosing a suitable and finite value
of |H(w)|,
which is less than 1.
Another important aspect to
be noted here is that we do not use any
type of frequency-transformation technique in the design of FIR filters.
Each type of the filters, i.e., LPF, HPF, BPF, or BRF, is designed individually
and separately using the given specifications, and then implemented
accordingly. For example, if the specifications are given for the design of a
high-pass FIR filter, we design that filter directly from the given specifications.
But, we have seen that, in the case of IIR filters, we first design a low-pass
filter as the prototype filter using the given specifications, and then convert
this low-pass-filter into the desired type of filter by using
frequency-transformation techniques. This is one of the major differences
between the design techniques of IIR and FIR filters.
Yet
another point to be noted here is that it is only the magnitude of the FIR
filter transfer function that is chosen to be unity; its phase part is not
taken as unity. We generally express the magnitude and phase angle of the
transfer function as
H(ω) = Me‒jθ = Me‒jωn (3)
where M (=
1) is the magnitude and q = nω represents the phase angle. Since ω is a constant, we find that, as time factor n increases, q decreases at a constant
rate. For
this reason, FIR filters are called constant-phase
filters. The constancy in phase is an important advantage of FIR filters
over IIR filters, which produce changes in phase with changes in frequency in a
nonlinear fashion.
Another
major difference between IIR and FIR filters is that in the design of FIR
filters, no specific rule has been generated so far for fixing the length of
the filter; only empirical formulas are available for this purpose. In the case
of IIR filters, we have seen how we can fix the order of the filter, which
determines the length of the filter structure. For example, if order of the
filter is 2, then we use a second-order (i.e., z-2) IIR filter to achieve the
desired response.
For FIR filters also, by
the term order of the filter, we mean the order of the transfer function of the
filter we are going to use in the design. However, there is one major
difficulty in the FIR-filter design (as stated above): we do not have (so far)
any specific mathematical functions or expressions similar to the Butterworth
or Chebyshev function, which can be used to describe the filter-response
characteristic, and using which the filter can be designed. As a result of
this, we find it difficult to determine the actual cut-off frequency and order
of the filter that is to be designed to meet the given specifications.
In the FIR-filter design,
we are able to meet the required specifications only by a trial-and-error procedure or by using an empirical formula such as
the Kaiser’s. It can be seen that the trial-and-error procedure is an
approximate method, and may require several trials to arrive at a satisfactory
result. On the other hand, the Kaiser’s design is an accurate method, but
requires some complex computation.
In this blog, we describe
the design of FIR filters using the Fourier series and the Fourier transform
methods.
2. FIR FILTER DESIGN
USING THE FOURIER-SERIES METHOD
Design of FIR filters using the Fourier series method
is a simple and straightforward technique. In this method, we first get the impulse
response h(n) of the desired filter (say, a low-pass filter) from the
filter-transfer function H(w) using the integral
where we assume that |H(w)| = 1, as stated above, and wc is the cut-off frequency of the filter. From h(n),
we compute the values of h(0), h(1), …., h(M = N/2), where N is the order of the desired filter. These values of h(n)
are treated as the coefficients of a Fourier series expansion, and are used to
develop the desired filter-transfer function H(z), given by the expression
H(z) = Y(z)/X(z)
= h(0)
+ h(1)z ‒1+ h(2)z ‒2 + ∙∙∙ +h(M)z
‒M (5)
so that the output Y(z) is given by
Y(z) = X(z)[h(0) + h(1)z ‒1+ h(2)z
‒2 + ∙∙∙ +h(M)z ‒M ] (6)
Taking the inverse z-transformation of (6) yields the output
y(n)
= h(0)x(n) + h(1)
x(n‒1) + h(2)x(n‒2) + ∙∙∙ +h(M)x(M) (7)
where M = N/2, and N is the order of the filter.
This equation represents the design equation of the desired FIR filter;
using this, we can implement the filter.
It may be noted that since
there are infinite number of coefficients in a Fourier series expansion, we
have to limit their number to a finite value for their implementation using a
computer. This is the reason why we limit the number of coefficients (including
the zeroth coefficient also) to
L = N + 1 = 2M + 1 (8)
where L is
the length of the filter. However, this abrupt termination of the Fourier series
coefficients to a finite value is seen to produce sharp transients that can
even destroy the filter constructed. This effect is known as the Gibb’s phenomenon. To prevent the
occurrence of the Gibb’s phenomenon, we make use of mathematical functions
known as window functions. These
functions have special tapering characteristics, which prevent abrupt
termination of filter coefficients, and hence avoid the Gibb’s phenomenon.
No comments:
Post a Comment