FREE LESSON · Physics & signals · 5 OF 6
When samples become indistinguishable
When samples become indistinguishable: Derive an alias and design a sampling boundary.
Prerequisites: Sine waves, frequency, units, and basic multiplication.
Learning objectives
- Derive two frequencies with identical samples.
- Calculate sampling and quantization requirements.
- Explain the purpose and limits of an anti-alias filter.
Sampling is a map with collisions
Let a continuous signal be x(t)=cos(2πft), with frequency f measured in cycles per second. Sampling at f_s observations per second gives x[n]=cos(2πfn/f_s). If we replace f by f+kf_s for any integer k, the extra phase is 2πkn. The sampled values are unchanged. Once two physical inputs have become the same sequence of numbers, downstream software cannot determine which input occurred without additional assumptions.
For example, sample a 750 Hz cosine at 1,000 samples per second. Its first four values are 1, 0, −1, 0, and then the pattern repeats. A 250 Hz cosine produces exactly the same sequence. Sampling has folded the faster oscillation into a slower apparent one. Increasing the bit depth of each sample will not recover the lost temporal distinction.
State the reconstruction assumptions
Ideal reconstruction of an arbitrary signal whose spectrum is confined below a highest frequency B requires a sample rate greater than 2B. The strict inequality avoids an ambiguous boundary case. This statement assumes a genuinely band-limited input, exact uniform sampling, and ideal reconstruction. Real sensors and filters approximate these conditions. An analog low-pass filter before the converter suppresses frequencies that would otherwise alias. Filtering after sampling cannot separate signals that already collide.
Suppose a sensor’s useful band ends at 3 kHz. A nominal 6 kHz rate leaves no practical transition band for a real filter. Choosing 10 kHz permits a filter to preserve useful content below 3 kHz while substantially attenuating content by the 5 kHz Nyquist boundary. The required attenuation depends on how large the unwanted signals can be and how much error is acceptable. Sampling rate alone is not the entire specification.
Quantization is a separate approximation
A uniform 10-bit converter spanning 0 to 5 V has 1,024 code bins, each 5/1024 V wide, about 4.883 mV. Under a midpoint quantization model, an unsaturated sample’s error is at most half a bin, about 2.441 mV. Saturation violates that bound: 6 V cannot be represented by pretending the top code has only half-bin error.
At 10,000 samples per second and 10 bits per sample, packed payload requires 100,000 bits per second before framing or timestamps. A format that stores every sample in 16 bits instead uses 160,000 bits per second. Timing jitter is yet another issue because the voltage error depends on signal slope at the sampling instant. Separate temporal resolution, amplitude resolution, saturation, and storage layout when specifying a measurement system.
Primary reading
- Signals and Systems (MIT OpenCourseWare).
Practice problem
A 900 Hz cosine is sampled at 1,200 samples per second. Find a nonnegative alias at or below 600 Hz and calculate its first four samples. A 12-bit converter covers −2 V to +2 V. Find its bin width and midpoint error bound. Propose a sample rate for a useful band ending at 400 Hz and explain why the filter must precede conversion.
Worked solution
The alias is 300 Hz because 900=1200−300 and cosine is unchanged by sign reversal at integer sample positions. Both sequences start 1,0,−1,0. The converter spans 4 V, so its bin width is 4/4096=0.0009765625 V and its unsaturated midpoint error bound is about 0.4883 mV. A rate such as 2 kHz leaves a transition band between the useful 400 Hz edge and the 1 kHz Nyquist frequency. This is a proposal, not a complete filter design: attenuation must be chosen from interference amplitude and allowed error. A digital filter alone cannot undo aliasing.
Check your understanding
Which change can distinguish the 750 Hz and 250 Hz inputs in the example?
- Increase converter depth from 10 to 16 bits at the same times.
- Change the sampling rate while preserving sufficient analog bandwidth.
- Store the same samples as decimal strings.
- Apply a sharper digital low-pass filter to the same samples.
Explanation
The ambiguity is caused by the sampling times. More precise encodings of the same values preserve it.
When does the half-bin quantization error bound fail?
- When the input saturates outside the converter range.
- Whenever a sample is exactly representable.
- When a frame includes a timestamp.
- When the sample count is even.
Explanation
The midpoint bound applies to an in-range sample mapped to a nearby bin, not a clipped out-of-range input.
Primary reading
- Signals and Systems: MIT OpenCourseWare