Biomedical Engineering Reference
In-Depth Information
fir2 - this function allows to specify arbitrary piecewise linear magnitude response.
The algorithm first interpolates the desired magnitude response onto a dense
evenly spaced grid of points, computes the inverse Fourier transform of the
result, and multiplies it by the specified window.
firls - allows to specify arbitrary piecewise characteristics of magnitude response
and minimizes the sum of squared errors between the desired and the actual
magnitude response based on algorithm given in [Park and Burrus, 1987, pp.
54-83].
firpm - function implements the Parks-McClellan algorithm [Park and Burrus,
1987, p.83]. It designs filters that minimize the maximum error between the de-
sired frequency response and the actual frequency response. Filters designed
in this way exhibit an equiripple behavior in their frequency response. The
Parks-McClellan FIR filter design algorithm is perhaps the most popular and
widely used FIR filter design methodology.
Functions for designing IIR filters:
butter - Butterworth filter gives smooth and monotonic magnitude response func-
tion.
cheby1 - designs Chebyshev Type I filter. These filters are equiripple in the passband
and monotonic in the stopband.
cheby2 - designs Chebyshev Type II filter. Filters are monotonic in the passband
and equiripple in the stopband. Type II filters do not roll off as fast as type I
filters, but are free of passband ripple.
ellip - designs elliptic filter. Elliptic filters offer steeper rolloff characteristics than
Butterworth or Chebyshev filters, but are equiripple in both the pass- and stop-
bands. In general, elliptic filters, compared to other filters, meet given perfor-
mance specifications with the lowest order.
Once the filter coefficients are computed it is necessary to analyze the properties
of the resulting filter. The transfer function for given filter coefficients
}
can be computed according to equation (2.5); in MATLAB it can be evaluated with
freqz function. The absolute value of this function gives the frequency magnitude
response. A plot of overlaid desired and actual magnitude response allows to check
whether the actual magnitude response function is close enough to the desired one
(Figure 2.1 a). One should pay attention to the steepness of the magnitude response
edges or in other words to the width of the transition between the stop-, and pass-
band. Increasing the filter order should make the transition steeper. One should also
consider the magnitude of ripples. They can be made smaller by decreasing the filter
order or broadening the transition width.
If the filter is to be used in standard, one direction mode, it is also advisable to
observe the group delay function (2.7) for delays of different frequency components.
This function can be evaluated by means of grpdelay from Signal Processing Tool-
box (Figure 2.1 b).
{
a n
}
and
{
b n
Search WWH ::




Custom Search