Hello! Welcome back.
In our last lesson, we derived the sampling theorem from first principles. We saw that the spectrum of an impulse-sampled signal is an infinite series of copies of the original signal's spectrum, shifted by multiples of the sampling frequency, . This led us to the powerful conclusion that if a signal is band-limited to , and we sample at a rate , we can perfectly recover the original signal by low-pass filtering.
Today, we explore the consequences of violating this condition. What happens when our sampling rate is not high enough? This is where we encounter the critical and ubiquitous phenomenon of aliasing. Our goal is to analyze aliasing mathematically and precisely define the conditions needed for alias-free signal reconstruction. This concept is not just a theoretical curiosity; it is a fundamental challenge that every digital system designer must confront.
1. The Phenomenon of Aliasing: A Frequency-Domain View
Let's revisit the equation for the spectrum of the impulse-sampled signal, :
In our previous lesson, we considered the case where the sampling frequency was large enough to keep the spectral replicas of separate. Now, let's examine the case where .
The following video provides an excellent visualization of what happens when the Nyquist criterion is violated.
This clip from the MIT OpenCourseWare lecture on sampling demonstrates aliasing both graphically and through an audio demonstration. It will help you build a strong intuition for the concept.
Please watch from 30:26 to 49:18. Focus on these key segments: 30:26 - 39:15: Observe the ideal case where replicas don't overlap, and contrast it with the undersampled case where they do. 40:39 - 43:56: Pay close attention to the single-tone example. See how a high-frequency tone, when undersampled, appears as a lower frequency. This 'folding back' of frequency is the heart of aliasing. 44:08 - 49:18: Listen to the audio examples. This will give you a concrete sense of the audible distortion that aliasing introduces when a signal is progressively downsampled without care.
As the video illustrates, when , the spectral replicas overlap. This overlap is the graphical representation of aliasing. When we attempt to recover the original signal by applying an ideal low-pass filter (with a cutoff at ), we no longer isolate a clean copy of the original spectrum. Instead, we capture a corrupted version that includes high-frequency content from adjacent replicas, which has been folded into the baseband.
A high-frequency component at in the original signal can become indistinguishable from a lower frequency, its alias, at after sampling.
A diagram showing an aliased spectrum
This diagram from Wikipedia illustrates aliasing. The original spectrum is shown in blue. When the sampling rate f_s is insufficient, the spectral replicas (shown in gray) overlap. The resulting spectrum of the sampled signal, X_{1/T}(f), has the tails of the replicas folding into the baseband, corrupting the original signal. A low-pass filter would then recover the distorted red spectrum, not the original blue one.
2. The Mathematical Description of Aliasing
Let's formalize this with the mathematics you prefer. How can two distinct continuous-time signals produce identical sample sequences? Consider two sinusoids:
where is the sampling frequency.
Let's sample both signals at a rate of , meaning at time instants . The samples for are:
The samples for are:
Since is always an integer, is an integer multiple of . Due to the periodicity of the cosine function, for any integer . Therefore:
The two signals, and , which are clearly different in continuous time, are indistinguishable from their samples. The higher frequency is an alias of the lower frequency .
This is why, as we saw in the previous module, the Discrete-Time Fourier Transform (DTFT) spectrum is periodic with period (in normalized frequency) or (in Hz). All frequency information is "wrapped" into the fundamental interval .
Nyquist–Shannon sampling theorem
The Wikipedia article on the sampling theorem provides a concise mathematical explanation of aliasing, tying it directly to the spectral replication formula we've been using.
Please read the section titled 'Aliasing'. It formally presents the equation for the periodic summation of the spectrum and explains how overlap makes it impossible to discern the original spectrum, leading to aliasing.
Test your understanding!
A pure sinusoidal signal with a frequency of 9 kHz is sampled at a rate of 10 kHz.
- What is the Nyquist frequency of the sampler?
- Is the signal being undersampled or oversampled?
- What is the apparent frequency (the alias) of the signal after reconstruction? (Hint: The alias will appear in the range , which is [-5 kHz, 5 kHz]).
Show answer
- The Nyquist frequency of the sampler is .
- The signal's frequency (9 kHz) is greater than the Nyquist frequency (5 kHz), so it is being undersampled.
- The frequency 9 kHz is above the Nyquist frequency of 5 kHz. Due to the spectral folding, it will appear as a frequency 4 kHz below the Nyquist frequency. The apparent frequency is . Alternatively, using the formula, the alias is . For , we get . The 9 kHz tone will sound like a 1 kHz tone.
3. Conditions for Alias-Free Reconstruction
We've established that aliasing occurs when spectral replicas overlap. The condition to prevent this is that the replicas must be separate. This leads us back to the Nyquist criterion, but now stated as a strict condition to avoid ambiguity.
The Strict Inequality and the Critical Frequency
For a signal that is strictly band-limited, meaning its Fourier transform is zero for all , the condition for perfect, unambiguous reconstruction is:
The rate is called the Nyquist rate of the signal. The frequency is the Nyquist frequency of the sampling system. To avoid aliasing, the sampling rate must be strictly greater than the signal's Nyquist rate.
Why the strict inequality? What happens at the boundary case, ?
Nyquist–Shannon sampling theorem
This may seem like a minor mathematical point, but it has important practical implications. The 'Critical frequency' section of the Wikipedia article gives an elegant mathematical demonstration of why sampling exactly at the Nyquist rate is problematic.
First, read the short section 'Critical frequency'. It shows how a sinusoid at frequency B, with a particular phase, can produce samples that are identical to a DC signal or even zero, creating ambiguity. Then, re-read the definitions in the 'Introduction' section to solidify the distinction between the Nyquist rate (an attribute of the signal) and the Nyquist frequency (an attribute of the sampler).
As the reading shows, a sinusoid of frequency sampled at can produce different sample sets depending on its phase. For example, sampled at gives . However, sampled at the same instants gives . The sine wave is completely invisible to the sampler! This ambiguity at the boundary is why the strict inequality is required for guaranteed reconstruction of all band-limited signals.
Conclusion
In this lesson, we dissected the phenomenon of aliasing. We've seen it from multiple perspectives: as an overlap of spectra in the frequency domain, as a time-domain ambiguity where different continuous signals yield identical samples, and as an audible distortion in audio signals.
Key Takeaways:
- Aliasing is the distortion that occurs when a signal is sampled at a rate , where is the signal's highest frequency.
- Mathematically, aliasing is the consequence of the periodic nature of the sampled signal's spectrum. Frequencies outside the range are "folded" or "wrapped" into this range.
- A high frequency becomes an alias of a lower frequency, typically for some integer .
- The strict condition for alias-free reconstruction is that the sampling rate must exceed the Nyquist rate of the signal: .
- Sampling at exactly the Nyquist rate () can lead to ambiguity, as certain signal components (like a sine wave at frequency ) can become invisible to the sampler.
Preview of the Next Lesson:
We have now established a firm rule: to avoid aliasing, first ensure your signal is band-limited, then sample at more than twice its highest frequency. But what about real-world signals, which are almost never perfectly band-limited? If we sample a real-world audio or radio signal, there will always be some energy, however small, at very high frequencies. Does this mean aliasing is inevitable? The answer lies in practical filtering. In our next lesson, we will discuss the practical necessity and design considerations for anti-aliasing and reconstruction filters, the essential components that make digital signal processing possible in the real world.