Data Acquisition (DAQ) and Control from Microstar Laboratories

Knowledge Base: Hardware

  • See the list of other topics for category Hardware

Q10037 Selecting a hardware anti-aliasing filter

Tags: Help, DAP, input sampling, aliasing, anti-alias filter, Butterworth filter

Applies to: All DAP models, termination boards, input boards with hardware filtering

I have an input signal through a band of about 16 kHz that I want to measure. There are interfering higher frequencies present, and I am concerned that sampling will alias those higher frequencies and distort my measurements. Is a fourth-order Butterworth filter sufficient to protect me?

The answer depends on how much protection your filter must provide. There are three important factors:

  1. The differences in signal level between the signals you want and the noise you don't want.
  2. The separation between the frequencies that you want and the interfering frequencies.
  3. How much error from aliasing or filtering side effects can you tolerate.

It might be worth taking some measurements at a very high sampling rate, and analyze the data using an FFT. This will warn you about the frequencies that might cause you trouble, and provide a reasonable estimate of their amplitudes.

Suppose that your signal is high quality, and you can tolerate at most 0.25% error in your measurements. This is a 400-to-1 signal to noise ratio. This ratio is commonly expressed as decibels using the formula dB = 20 log10(ratio). For this example, 20 log10(400) = 52.0 dB. Now, suppose that your noise peaks are about 5% of the amplitude of your desired 16 kHz signal. That's a ratio of 20-to-1. You have to reduce the interfering signals by a factor of 20 to achieve the desired 400-to-1 ratio. Or in terms of dB, you need 20 log10(20) = 26 dB additional attenuation. So this is the first step: determine how much attenuation is needed at the noise frequency.

The next step is to determine is how much attenuation your filter can give you. A Butterworth filter is popular because it gives reasonable attenuation without much damage to measurements of low frequencies. For the Butterworth family, the asymptotic cutoff approximation is (20 dB attenuation × filter order) for each factor of 10 separation between the potentially harmful frequency and the cutoff frequency of the filter.

Suppose that a 4th order Butterworth filter is available. This gives 80 dB attenuation per factor of 10 separation between cutoff frequency and noise frequency. For the case where we need 26 dB attenuation, not 80 dB, we don't need a full factor of 10 frequency separation. In fact, the frequency separation needs to be only 1026/80, or a factor of 2.11. A 4th order filter with cutoff somewhat lower than 1/2 of the noise frequency is sufficient for the application.

Often a sampling frequency has already been selected. If an interfering frequency happens to exist close to the sampling frequency, aliasing effects would result. So the sampling frequency is assumed as the nominal frequency of the interference signal, and used as the noise frequency for the attenuation analysis. This can be a good assumption, but a costly one if in fact there is no relevant noise at this frequency in the original signal.

If your analysis puts the filter cutoff frequency too close to the frequency band that you want to measure, this is a matter of concern, because it will attenuate your measurements as well as the noise. Your choices are:

  • Repeat your calculations to determine whether a higher-order filter will work.
  • Use a combination of hardware and DSP filtering methods to capture both signal and noise accurately, and then suppress the noise using DSP methods. Details are given in the article cited below.

L-----

For information about combined analog/digital anti-aliasing techniques, see Analog and digital filtering for anti-aliasing on this site.