Infinite Impulse Response (IIR) Filters
Finite Impulse Response (FIR) Filters
This section gives an overview of the use of the (linear) filtering functions in Dataplore ® and linear filter design in general.
The task of filtering often arises in a context where frequency-dependent alterations of a signal are to be performed. Filters can be used for
The most common, simplest and fastest kind of filtering is achieved by linear filters.
Linear filtering of a signal can be expressed as the
of the input signal x(n) with the impulse response h(n) of the given filter, i.e. the filter output arising from the input of an ideal Dirac impulse
The Fourier transform
of h(n) yields the magnitude response of the filter.
The general form of a discrete linear filter is given by the
where x is the input signal, y is the filter output signal and and are the filter coefficients. max(M,N) is the filter order which is at least 1.
If N=0 the impulse resonse h(n) of the filter consists of a finite number of samples unequal to zero and the filter is a so-called finite impulse response (FIR) or nonrecursive filter, wheras with a recursive part in the filter structure (N > 0), the impulse response is (theoretically) infinite and the filter is an infinite impulse response (IIR) filter.
In the context of filtered stochastic processes, FIR filters are also referred to as moving average (MA) filters and IIR filters are also named auto-regressive (AR) or auto-regressive moving average (ARMA) filters, depending on whether they are purely recursive (M = 0) or have a nonrecursive part (M > 0), respectively.
The type of filter to be designed and applied for a certain purpose very often depends on the conditions the transfer function has to meet. These conditions could e.g. include a linear phase (i.e. a constant delay), a certain stopband attenuation, an arbitrary magnitude shape, or a minimum filter order.
One of the most simple and convenient approaches to alter the spectral
properties of a signal by filtering is to apply a frequency-domain
filter, i.e. to perform the convolution operation as a multiplication
of the transfer function H and the Fourier transform X of
the input signal x in the frequency domain according to
where the uppercase letters denote the Fourier transforms of the respective signals and .
Filtering in the frequency domain gives superior performance compared to the other filter design techniques described below, but can only be applied "off-line", i.e. with the complete signal already accessible.
The design of digital IIR filters can be done similarly to classical analog filter design (analog prototyping) including traditional methods such as Butterworth, Chebyshev, or elliptic (or Cauer) filters.
IIR filters generally have highly nonlinear phase responses, but meet magnitude response specifications with a much lower filter order than FIR filters. Low-order filters are most efficient in terms of processing time and are easy to parametrize.
The figure below shows a "template" used for the specification of a model lowpass filter in the frequency domain. The design of highpass, bandpass and band reject IIR filters can be derived from this model.
Figure 3.1: IIR filter design template
is the transition width, is referred to as passband ripple and is the stopband attenuation of the IIR filter to be designed.
Currently available IIR filter types based on analog prototyping in Dataplore ® are
Figure 3.2: Butterworth filter magnitude response
Figure 3.3: Chebyshev filter magnitude response
Figure 3.4: Elliptic filter magnitude response
Digital FIR filters can be designed in a way to offer exactly linear or even zero phase, and, in contrast to IIR filters they are always stable.
Filters offering a linear phase response apply a constant phase delay of half the filter order to all frequency components of the input signal thus avoiding "smearing" of wideband pulses or edges. Zero-phase filters exhibit no phase distortion at all; they are implemented as acausal filters with a specialized delay handling.
There are several ways to design FIR filters, one of them is the so-called window method. Since the coefficients of an FIR filter are identical to the discrete impulse response of the filter, they can easily be obtained by backtransformation of the ideal transfer function into the time domain. This leads to acausal impulse responses of infinite length. Shortening and weighting of these impulse responses by the application (multiplication) of a certain window function corresponds to a convolution operation in the frequency domain.
There are window functions that - compared to simple rectangular (Boxcar) windowing - reduce the amount of ripple at the band edges but sacrifice rolloff steepness (attenuation per frequency band) on the other hand.
Window functions currently available for FIR
filter design in Dataplore ® are Potter and Kaiser, where the
latter can be parametrized optimally in a way to minimize
approximation errors. It is defined by
where M is the window length, and is the modified Bessel function of the first kind of zeroth order. M and (a shape parameter) can be chosen optimally. This choice is done automatically by Dataplore ®.
Another approach is FIR filter design according to Parks and McClellan. An optimal fit between the desired and the actual frequency response is achieved by the use of the Remez exchange algorithm and Chebyshev approximation theory (see Rabiner/Parks/McClellan  for details). The frequency responses of Parks-McClellan FIR filters exhibit equiripple behaviour (see above) and can be used for the design of filters with an arbitrary magnitude response.
Further reading: Oppenheim/Schafer , Parks/Burrus , Otnes/Enochson