Anti-aliasing

Aliasing is a phenomenon that can occur whenever a discrete-time sample is taken of a continuous-time analog signal. A basic tenet of sampling theory is that a continuous analog signal can be sampled at a periodic rate and these samples contain enough information for the original continuous signal to be reconstructed from the samples.

The Nyquist-Shannon Sampling Theorem instructs that for this tenet to hold true, the sample rate must be greater than twice the frequency of the highest frequency contained in the analog signal. If the Nyquist limit is not observed then aliasing will occur. This also suggests that the analog signal must have a finite bandwidth or the sample rate can never be high enough to avoid aliasing. Aliasing manifests in the reconstructed signal as information reconstructed at the wrong frequency.

Anti-aliasing is a sampling technique that controls the bandwidth of the analog signal to ensure aliasing does not occur. The process has three basic steps.

  1. Apply a low-pass analog filter to the signal. This analog filter will have a minimum pass-band (non-attenuated frequencies) and fairly long transition to the stop-band (fully-attenuated frequencies).

  2. Sample the filtered signal at a much higher rate than the Nyquist requirement of simply twice the bandwidth of the pass-band.

  3. Apply a digital filter to the sampled data that creates a much sharper transition from the pass-band to the stop-band. The combination of the rate of over sampling data, combined with the relative bandwidths of the analog and digital filters creates the special condition called anti-aliasing. Put simply, anti-aliasing controls the bandwidth of the original signal to ensure that the reconstruction of the signal will not have any frequency components represented at an incorrect frequency.

The anti-aliasing filter plays a crucial role in ensuring the fidelity of signal samples by accurately capturing the entire frequency SPECTRUM of the original signal within the specified pass-band. Adhering to the Nyquist theorem, the sample rate must exceed twice the signal bandwidth, emphasizing the necessity for a rate greater than, not equal to, twice the bandwidth.

To ensure accurate signal reconstruction, it is wise to include a margin in the sample rate-to-bandwidth ratio. By widening the gap between these values, we can more easily achieve a faithful reconstruction of the signal. This concept is illustrated in the image provided.

Demonstration of 1000, 100, 50, and 30 samples per second of a 10 Hz sine wave

This visual representation illustrates four graphs depicting a sine wave of the same frequency, sampled at progressively higher rates—all satisfying the Nyquist requirement.

Analogous to a reconstruction filter, the human eye exemplifies this concept. Observing the same frequency sine wave at varying sample rates, the eye effortlessly discerns the original waveform in higher sample rate data. It is imperative to recognize, however, that despite these perceptual differences, all examples equally and accurately represent the original signal.

The Spectrum devices offer two ratio options: 4 and 20. The user must select the sample rate and the oversample ratio. From these two numbers, the filtered bandwidth of the signal is determined. For example, a sample rate of 1 kHz with an oversample ratio of 20, will have a signal bandwidth of 1000/20=50 Hz. The same sample rate with a 4 ratio will have a signal bandwidth of 1000/4=250 Hz. The maximum output sample rate of the Spectrum is 10 kHz and the maximum analog bandwidth is 2.5 kHz.