COMPUTER SCIENCE & TECHNOLOGY • SIGNALS
Sampling & Aliasing
Explore how sampling rate, signal frequency and phase create or prevent aliasing.
See aliasing happen
Cross the Nyquist limit and watch a high-frequency signal appear as a lower-frequency alias.
LEARN WITH THE SIMULATION
Understand Sampling & Aliasing by experimenting.
Sampling converts a continuous-time signal into a sequence of discrete measurements. If the sample rate is too low, different continuous frequencies can produce the same sample sequence and therefore become indistinguishable. This laboratory draws the original sinusoid, marks the sample points and, when undersampling occurs, overlays the lower apparent alias that is consistent with those same discrete samples.
BUILD THE IDEA
What you should understand first
- Calculate the Nyquist frequency as half the sample rate and compare it with the signal frequency.
- Explain aliasing as ambiguity between continuous signals that agree at the sampling instants.
- Use the folding relationship to identify the apparent frequency produced by undersampling.
- Distinguish phase changes from frequency aliasing and recognize why real acquisition systems use anti-alias filters.
TRY IT YOURSELF
How can a high-frequency waveform and a low-frequency waveform pass through exactly the same sample points?
- Set a source frequency below the Nyquist limit and inspect the continuous curve and samples.
- Raise the source frequency above half the sample rate until the simulation reports aliasing.
- Compare the blue source waveform with the dashed apparent alias while checking that both agree at the sample instants.
- Change sample rate while keeping the source frequency fixed and identify when the ambiguity disappears.
Once the source exceeds the Nyquist limit, the discrete samples can be explained by a lower folded frequency. Raising the sample rate moves the Nyquist boundary upward and can make the original source uniquely representable within the assumed band.
WHY IT WORKS 01
Aliasing is ambiguity, not a new physical tone
The original continuous signal does not actually change frequency when it is sampled. Instead, the sequence of measured values can also be generated by another sinusoid whose frequency differs by an integer multiple of the sample rate, after folding into the Nyquist interval. A digital system receiving only those samples cannot distinguish between those candidate continuous signals without additional assumptions.
WHY IT WORKS 02
The Nyquist limit defines the unique baseband interval
For uniformly sampled data, frequencies separated by integer multiples of the sample rate have equivalent discrete-time behavior. Choosing the interval from zero to half the sample rate for real sinusoids provides a conventional unique representation. When source energy lies above that boundary, it folds into the interval and contaminates the represented spectrum.
WHY IT WORKS 03
Anti-alias filtering happens before sampling
Once two continuous frequencies have produced the same sampled sequence, a later digital algorithm cannot infer which one was originally present from those samples alone. Real converters therefore use an analog low-pass filter before the sampler to suppress frequencies that would fold into the desired band.
DO NOT MIX THESE UP
Common misconception
Sampling at merely more than the signal frequency is not sufficient for ideal band-limited reconstruction; the standard Nyquist condition requires a sample rate greater than twice the highest represented frequency. Sampling also does not remove out-of-band energy by itself, so practical systems normally filter the analog input before digitization.
PRACTICE CHALLENGE
Can you choose a source and sample rate that produce a requested apparent alias frequency?
- Set a target alias frequency in the premium controls.
- Choose a source frequency above the Nyquist limit.
- Adjust the sample rate until the reported alias matches the target.
- Use the source frequency and sample rate to explain the folding relationship that produced the match.
Reveal the reasoning
The apparent frequency is obtained by folding the source into the interval around zero bounded by half the sample rate. Frequencies that differ by integer multiples of the sample rate can therefore generate the same discrete-time samples, and taking the absolute folded value gives the displayed alias frequency.
MODEL BOUNDARIES
What this simulation assumes
Every simulation simplifies reality or a mathematical system. These are the assumptions and limits to keep in mind while interpreting the results.
Model assumptions
- The source is an ideal sinusoid with fixed frequency and phase.
- Samples are taken uniformly at a constant sampling frequency.
- Aliasing is interpreted using the Nyquist frequency for this single-tone signal.
Model limitations
- Real signals can contain many frequencies, noise and nonstationary components.
- Anti-alias filters, quantization depth, jitter and reconstruction-filter behavior are not modeled.
CONNECT IT
Where this matters
- Digital audio and music technology
- Sensor and data-acquisition systems
- Image and video sampling
- Communications and digital signal processing
WORDS THAT MATTER
Key vocabulary
- Sample rate
- Number of discrete measurements taken per second.
- Nyquist frequency
- Half of the sample rate, defining the upper edge of the unique baseband interval in this model.
- Aliasing
- Ambiguity in which different continuous-time frequencies produce indistinguishable sampled behavior.
- Anti-alias filter
- Analog filter used before sampling to reduce frequencies that would fold into the represented band.
- Phase
- Angular offset that determines where a sinusoidal cycle begins relative to the sampling times.
NEXT STEP