Sunday, December 16, 2007

Optimal Architectures

A digital filter implemented in software is typically run on a
processor with a single computational element. This forces
the filter to be implemented in a serial sum-of-products. A
FIR is implemented as a single sum-of-products and an IIR
is typically a sum of products for the feed-forward section
and another sum-of-products for the feedback section.
Hardware can be optimized for each application. Low speed
and low power can be achieved using a bit-serial
implementation. Moderate speed and power may call for a
single parallel multiplier-accumulator. High speed
applications can utilize multiple multiplier-accumulator
structures with specialized memory address schemes.
Decimating or interpolating filters can use optimized
polyphase structures, multiple stages and specialized
memory addressing schemes. Coefficient memory can be
designed to take advantage of coefficient characteristics and
accumulators can be custom-designed to take advantage of
unity gain properties.

Decimation and Interpolation

Decimation is reducing the output sampling rate
by ignoring all but every Mth sample. When a digital filter
reduces the bandwidth of a signal of interest so the filter
output is over-sampled if the input sample rate is preserved,
it is inefficient to compute outputs that will be ignored in the
decimation process. Thus, there is a one-to-one
correspondence between decimation rate and gain in
computational efficiency. However, this computational
efficiency can not be fully realized in an IIR filter because the
feedback path must be computed for every input cycle.

Saturday, December 15, 2007

Filter Response Design Methods

The total specification of the ideal filter includes the location
of passbands and stopbands, the minimum stopband
attenuation, the maximum passband ripple, the filter order,
and perhaps the shape of the response in some of the
specified bands.
Typically, there are three stages to the design of digital filter
responses for passband filters. First, the ideal filter response
is specified. Next, a floating point response is designed.
Finally, the floating point coefficients are quantized to yield a
fixed point response.
Creating a floating-point IIR filter response starts with a
prototype analog filter. Then an s-domain to z-domain
transformation is used to generate a set of digital filter
coefficients. Common methods of designing floating-point
FIR filter responses are windowing, frequency sampling, and
optimal. All are described in general digital signal processing
texts and are standard in most commercially available digital
filter design software packages.
Converting floating-point coefficients into fixed-point
coefficients requires quantizing the coefficients and
calculating the frequency domain impulse response of the
filter or filter model to verify that the filter meets the required
specification. If it does not, either the number of coefficient
bits can be increased, the filter response can be redefined
and step two repeated, or the filter arithmetic can be
redesigned, or a combination of these procedures can be
performed. When filter hardware is at a premium,
sophisticated simulated annealing techniques can be used
for both fixed-point FIR and IIR filters to produce the best set
of filter coefficients, given a fixed filter order and coefficient
width.

Strengths and Weaknesses

Because an IIR filter uses both a feed-forward polynomial
zeros as the roots) and a feedback polynomial (poles as the
roots), it has a much sharper transition characteristic for a
given filter order. Like analog filters with poles, an IIR filter
usually has nonlinear phase characteristics. Also, the
feedback loop makes IIR filters difficult to use in adaptive
filter applications.
Due to its all zero structure, the FIR filter has a linear phase
response when the filter’s coefficients are symmetric, as is
the case in most standard filtering applications. A FIR’s
implementation noise characteristics are easy to model,
especially if no intermediate truncation is used. In this
common implementation, the noise floor is at - 6.02 B + 6.02
log2NdB where B is the number of actual bits used in the
filter’s coefficient quantization and N is again the filter order.
This is why most Intersil filter ICs have more coefficient bits
than data bits.
An IIR filter’s poles may be close to or outside the unit circle
in the Z plane. This means an IIR filter may have stability
problems, especially after quantization is applied. An FIR
filter is always stable. FIR filters also allow development of
computationally efficient architectures in decimating or
interpolating applications, which will be described in more
detail later.

Mathematics Versus Physics

The characteristics of an analog filter are directly attributable
to the physics of the device that implements it. In contrast,
the characteristics of a digital filter are only indirectly
attributable to the physics of the device that implements it.
A digital filter’s passband ripple, shape factor, stopband
attenuation, and phase characteristics are all functions of
the order and type of polynomial used to approximate the
ideal impulse response, the number of bits used in
performing the arithmetic, and the type of architecture used
to implement the arithmetic. Actual frequencies have no
meaning in a digital filter except in their relation to the
sampling frequency. This is because the impulse response is
generated as a function of z-1, the sample interval (the time
between samples). For a smaller shape factor, the order of
the filter and the number of bits in the arithmetic can be
increased. The only physical limitation is the amount of
arithmetic processing that can be integrated on a device or
devices given the filter order and the input sampling rate.

Frequency-Domain Versus Time Domain Thinking

Thinking about analog filters, most engineers are
comfortable in the time domain. For example, the operation
of an RC lowpass filter can easily be envisioned as a
capacitor charging and discharging through a resistor.
Likewise, it is easy to envision how a negative-feedback
active filter uses phase shift as a function of frequency,
which is a time domain operation.
A digital filter is better conceptualized in the frequency
domain. The filter implementation simply performs a
convolution of the time domain impulse response and the
sampled signal. A filter is designed with a frequency domain
impulse response which is as close to the desired ideal
response as can be generated given the constraints of the
implementation. The frequency domain impulse response is
then transformed into a time domain impulse response
which is converted to the coefficients of the filter.

Analog Filters, Software-Based and

Owing to the way that analog and digital filters are physically
implemented, an analog filter is inherently more size-and
power-efficient, although more component-sensitive, than its
digital counterpart - if it can be implemented in a
straightforward manner. In general, as signal frequency
increases, the disparity in efficiency increases.
Characteristics of applications where digital filters are more
size and power efficient than analog filters are: linear phase,
very high stop band attenuation, very low pass band ripple;
the filter’s response must be programmable or adaptive; the
filter must manipulate phase and, very low shape factors (a
digital filter’s shape factor is the ratio of the filter’s pass band
width plus the filter’s transition band width to the filter’s pass
band width).
General-purpose digital signal microprocessors, now
commodity devices, are used in a broad range of
applications and can implement moderately complex digital
filters in the audio frequency range. Many standard signal
processing algorithms, including digital filters, are available
in software packages from digital signal processor and third
party vendors. As a result, software development costs are
trivial when amortized over production quantities.
The architectures of digital signal microprocessors are
usually optimized to perform a sum-of-products calculation
with data from RAM or ROM. They are not optimized for any
specific DSP function. However, to get extended sampling
rate performance from a digital filter requires hardware
designed to perform the intended filter function at the
desired sampling frequencies.
For example, Intersil Corporation offers a family of standard
digital filter products with several others in development.
Some hardware-specific digital filters can now sample at
rates approaching 75 Megasamples Per Second (MSPS).
Higher performance is possible for high volume applications
by limiting the range of parameters. Standard filter products
strike a balance between optimized filter architectures and
programmability by offering a line of configurable filters. That
is, these products are function-specific, with optimized
architectures and programmable parameters.