DSPRelated.com

Aliasing

Category: Sampling-multirate

Aliasing is a distortion that occurs when a signal is sampled at a rate insufficient to uniquely represent its frequency content, causing frequency components above half the sample rate (the Nyquist frequency) to fold back and appear as lower-frequency components in the sampled data.

In practice

In ADC-based data acquisition, any signal energy present above fs/2 before sampling will alias into the baseband (0 to fs/2) and become indistinguishable from legitimate low-frequency signal content. For example, if an ADC samples at 10 kHz and a 7 kHz tone is present at the input, it aliases to 3 kHz (10000 - 7000). This is not a recoverable error once sampling has occurred; the alias and the real signal at 3 kHz cannot be separated afterward.

The standard countermeasure is an anti-aliasing filter (AAF), a low-pass filter placed before the ADC that attenuates signal and noise energy above fs/2. In practice the filter transition band is nonzero, so designers typically choose a sample rate higher than the strict Nyquist minimum to give the filter room to roll off. The required steepness and the sample rate overhead are a tradeoff driven by cost, component count, signal bandwidth, and acceptable aliasing floor. The blog post "Modeling Anti-Alias Filters" and "Design of an anti-aliasing filter for a DAC" cover practical filter design considerations for both ADC and DAC signal chains in detail.

Aliasing is not always harmful. Bandpass sampling (also called undersampling) deliberately allows a narrowband signal centered above fs/2 to alias into baseband, effectively performing frequency downconversion without a mixer. This technique is used in some software-defined radio and IF-sampling receiver designs. The blog post "Handy Online Simulation Tool Models Aliasing With Lowpass and Bandpass Sampling" provides an interactive way to visualize both cases.

In multirate DSP, aliasing also appears in decimation stages: when a signal is downsampled by factor M, frequency components that were originally separated by fs/M become aliases of each other unless a decimation filter removes them first. CIC decimators in particular can introduce significant aliasing from their passband images; see "Compute Images/Aliases of CIC Interpolators/Decimators" for a quantitative treatment. On the DAC output side, imaging (the DAC counterpart to aliasing) places spectral copies of the baseband signal around multiples of the sample rate, which is addressed in "Find Aliased ADC or DAC Harmonics (with animation)".

Discussed on DSPRelated

Frequently asked

What is the Nyquist criterion and how does it relate to aliasing?
The Nyquist-Shannon sampling theorem states that a bandlimited signal can be perfectly reconstructed if it is sampled at a rate strictly greater than twice its highest frequency component. Sampling below that rate causes aliasing; sampling at exactly twice the highest frequency is the theoretical critical limit in idealized conditions, but in practice real signals and filters are never perfectly bandlimited, so a margin above 2 * f_max is always used.
How do I calculate where an aliased frequency component will appear?
An input frequency fin sampled at fs aliases to |fin - round(fin/fs) * fs|. For a simple case: if fs = 10 kHz and fin = 7 kHz, the alias appears at |7000 - 10000| = 3 kHz. Multiple aliases can stack if harmonics or noise spans several Nyquist zones. The blog post 'Find Aliased ADC or DAC Harmonics (with animation)' shows this visually.
Does an anti-aliasing filter need to be analog, or can it be digital?
The anti-aliasing filter placed before an ADC must be analog, because digital filtering can only operate on already-sampled data, and aliasing is a pre-sampling phenomenon. However, in oversampling ADC designs (such as delta-sigma converters), the internal sample rate is far above the output rate, and a digital decimation filter handles most of the rejection. This relaxes the analog AAF to a simple, gentle roll-off that mainly guards against out-of-band noise and RF interference.
Is aliasing relevant in DACs as well as ADCs?
On the DAC side the analogous phenomenon is called imaging: the DAC reconstruction process inherently produces spectral images (copies of the baseband signal) centered at multiples of the sample rate. A reconstruction (smoothing) low-pass filter after the DAC attenuates these images. While the terms 'alias' and 'image' are sometimes used loosely in conversation, they refer to distinct phenomena: aliasing is folding of frequency content in sampled or decimated data, whereas imaging refers to spectral replicas appearing at a DAC output.
How does aliasing affect CIC decimation filters specifically?
CIC (cascaded integrator-comb) filters have a sinc-shaped frequency response with significant passband droop and only moderate stopband attenuation at frequencies that will alias into the baseband after decimation. Aliases from those poorly-attenuated bands fold in on top of the desired signal. A compensation FIR filter (sometimes called a CIC compensator) is typically inserted before or after the CIC to flatten the passband and improve alias rejection. The blog post 'Compute Images/Aliases of CIC Interpolators/Decimators' walks through calculating the alias levels numerically.

Differentiators vs similar concepts

Aliasing is sometimes conflated with quantization noise, but they are distinct: quantization noise results from the finite amplitude resolution of the ADC, while aliasing is a frequency-domain folding effect caused by insufficient sample rate. They both degrade SNR but have different causes and different cures. Aliasing is also related to but distinct from imaging, which is the DAC-side counterpart: imaging produces unwanted spectral copies above baseband at the DAC output, while aliasing folds high-frequency content down into baseband at the ADC input.