Data Acquisition (DAQ) and Control from Microstar Laboratories

Digital Anti-Alias Filters  

data acquisition filtering data acquisition software channel architecture enclosures services

All-digital anti-aliasing


Get Digital Anti-Aliasing with Your xDAP System


The established doctrine is that to avoid aliasing you must apply analog hardware filtering prior to sampling. However, this is not really correct — you do not need filtering if the signal is already suitably bandlimited at the time you capture your samples. This article explains how the Anti-Alias Multichannel Module [1] (AAMM) supports an anti-aliasing strategy that dispenses with the hardware filters, avoiding their costs, difficulty, and signal distortions. This might at first seem like a heretical idea, but it is really just stepping beyond the limitations of older technology.

Aliasing: A quick review

Read about the AAMM software.

All xDAP systems can use the AAMM module, but the xDAP 7420 is recommended for the most demanding applications.

Review the manual.

Aliasing is a potential hazard any time a continuous signal is digitized. Waves at multiple frequencies can produce exactly the same set of samples for a given set of equally-spaced sampling instants.

aliasing illustration

How would you know which sinusoidal waveform produced the sample values shown in green?

Aliasing is not necessarily bad thing, when you have additional information about the frequency band of your waveform, so that you can mathematically reconstruct the waveform shape by appropriately shuffling the sample values. However, for typical measurements of sound, vibration, pressure, displacement, and so forth, aliasing is bad news. After you have digitized the samples, there is no way to reverse any aliasing damage done to your data set.

You are guaranteed that there is no aliasing problem if you have no frequencies present in your original signal above 1/2 of your sampling frequency. Otherwise, you could be in serious trouble.

Traditional hardware filtering

The traditional solution is to insert anti-alias lowpass filters into your input signal path prior to sampling, and then sample at the intended rate for your data set. To preserve the accuracy in the band of frequencies you care about, the cutoff frequency of the filter must be considerably higher than the preserved band. To sufficiently attenuate frequencies that could cause aliasing, the cutoff frequency of the filter must be considerably lower than the sampling rate.

This is a good but imperfect solution. Most of the information returned in the data set is unusable, distorted by the rolloff characteristics of the filter. Two popular choices for the anti-alias filter are Butterworth filters, with good gain flatness in the band you care about, but with phase distortions that alter the shapes of your waveforms; or Bessel filters, much better at avoiding phase distortions but at the expense of poor gain flatness in your low frequency band.

Configuring an anti-aliasing filter properly is surprisingly difficult. The following illustration shows the magnitude response characteristic of a 4th order Butterworth filter. It seems like this should work well.

4th order Butterworth characteristic

Fourth order Butterworth characteristic

Observe the very flat response at low frequencies, and the vigorous rejection of high frequencies. But careful analysis reveals that to preserve the desired low frequency band with 14-bit accuracy (a slight compromise), while also guaranteeing −60dB high-frequency rejection of any aliasing effects (sometimes a compromise), the sampling frequency must be higher than the preserved band by a factor of 50. This is why in practice the filter chosen is usually much higher order. However, higher-order filters are more complicated and expensive to build, sensitive to design parameters and component tolerances.

Another article [2] on this site discusses the relationship between the sampling frequency you choose, and the anti-aliasing hardware you select.

A digital solution to anti-aliasing

Instead of removing extraneous frequencies prior to aliasing, the digital approach uses a much higher sampling rate and captures all of the signal power, including the extraneous frequencies well above the ones that you specifically care about. Since everything is specifically represented, there is no aliasing in the band you want to measure. Such very high sample rates would have been beyond all reason with older technology, but they are a routine matter for xDAP systems [3].

There are lots of applications where signals are driven by sensors with inherent band limits. Your microphone might respond through 20 KHz. But what about 250 KHz? Typically, the physical elements can't move that fast. High frequency rolloff of the built-in preamplifiers further attenuates the signal energy to a virtual zero at such high frequencies.

The side effect of using elevated sampling rates is a massive and redundant data set. It would make sense to reduce this data back to a reasonable lower rate. However, doing this by a simple decimation process would result in the same aliasing that you would get digitizing the data at the low rate in the first place.

This is where the AAMFILT processing comes into play. It allows you to reduce the high-rate sample stream to a more reasonable and desirable lower rate, without aliasing. The anti-aliasing filters are automatically customized to your application, to completely remove all frequencies above the Nyquist frequency of the reduced signal before rate reduction. There is no aliasing into the band that you care about, because there is nothing left to alias.

AAMFILT effects

As you can see in the upper part of the illustration, the red band has the frequencies that you care about, while the white band represents all of the frequencies with the potential to corrupt your data set through aliasing. The filtering removes that white band completely. After this, simple decimation is completely safe.

Special AAMFILT features

Anybody who has used a digital filter will know that its frequency response characteristic is tied to the sampling rate of its data stream. Clock the data through twice as fast, and the effective filter passband doubles in width. If you decide that you need to change the sampling rate for some reason, this probably means that your digital filters must be redesigned to keep your filter cutoff frequency more or less the same. The AAMFILT processing, however, does not have this problem. Your filtering is custom-configured to whatever rates you specify.

In theory, only an infinite-length filter can preserve all of your signal band perfectly to the Nyquist limit at the reduced sampling rate. Most people do not have the patience to wait for this computation to complete. So, the AAMFILT processing compromises a little. It does not attempt to preserve flatness above 80% of the theoretical Nyquist limit. Instead, there is a transition band between the frequencies that are completely preserved and high frequencies that are completely rejected. The AAMFILT processing enforces the following rolloff envelope. Your spectrum will show this kind of shape regardless of the rate you select.

High frequency shaping envelope

Some people will apply excellent instrument-grade electronic filters in a classical anti-aliasing filter scheme, and think this gives them the best possible measurement accuracy. Actually, when you take into account the known damage that a theoretically perfect filter would cause, disregarding the practical hardware limitations, the results are not close to best possible. Most of the time, you will get superior results by avoiding the filtering as much as you can, thus avoiding the damage. The technical performance of the combined high sampling rates of xDAP and the AAMFILT anti-alias digital filtering [4] is far beyond anything that analog filters can do.

Footnotes and References:

  1. You can find a complete command description and some application examples in the User's Manual for the AAMM module.
  2. The article Analog and Digital Filtering for Anti-Aliasing, on this site, discusses how hardware and digital filters can work together for anti-aliasing. This kind of solution remains useful for simple applications with just a few channels.
  3. More information about xDAP systems is available on this site.
  4. Information about obtaining the the AAMM module software is available on this site.


Return to the DSP page.