MIT 6.300 — Lecture 4
Sampling, Aliasing, and DT Signals
§ Lecture: Sampling and Aliasing
In practice, we might have to settle for discretized samples of data, rather than the full continuous signal.
Definition. Let be our sampling interval and be our sampling frequency. Our data is then the discrete-time (DT) signal , as opposed to the continuous-time (CT) signal .
Remark. Just as CT signals have a fundamental period, so too can DT signals—but their fundamental periods must be integers! (And as we'll see later, some DT signals have no fundamental period at all.)
But an insufficiently fine sampling might yield misleading results!

Definition. If signals and generate the same discrete samples, we say and are aliases.
Remark. We only consider pure cosine signals because it turns out they result in the most possible aliasing.
So in the picture above, the frequencies of the red and green curves are aliases.
Theorem. (Aliasing Classification) Frequencies and are aliases if and only if for some .
Proof: Aliasing occurs if and only if we have for all . Note the following:
The above is always zero if and only if either or is an integer multiple of .
One anti-aliasing tactic is to assume that all frequencies are below the Nyquist frequency . This way, as long as and are assumed to be below , it is impossible for them to be aliases unless they are equal.
Equivalently, every frequency has a unique baseband frequency such that and are aliases.
Problem. Determine the baseband frequency of when .
Solution: The frequency is , which gives . In order to be a valid baseband frequency , we require . Thus, we take the alias such that , yielding a baseband frequency of .
Remark. Check your intuition: when is smaller, the baseband frequency is more likely to match the original frequency.
§ Lecture: Quantization
Another way we can discretize data is by restricting the number of bits used to represent each individual sample.

(We'll never bring this up in 6.300 ever again.)
§ Recitation: The Sampling Theorem
Here's what it looks like to take more than 2, exactly 2, and fewer than 2 samples per cycle.

We can observe the following:
When we sample more than 2 times, the samples represent the frequency pretty well.
When we sample exactly 2 times, the samples still capture the frequency—but practically nothing else.
When we sample fewer than 2 times, the samples capture the wrong frequency—it appears to be of the original.
In a sense, it takes at least 2 samples per cycle to preserve the information in a sinusoid.
Theorem. (Sampling Theorem) If is the highest nonzero (cyclical) frequency in a CT signal, then a sampling rate is enough to prevent all aliasing.
Remark. Here's a trick question.
Question. Humans cannot hear frequencies above 20 kHz. Does this mean a sampling rate of 40 kHz suffices?
The answer is no. None of the frequencies we can hear will alias, but frequencies above 20 kHz that we can't hear will alias into frequencies that we can hear, thus distorting the recording.
§ Recitation: Dimensional Analysis
We've been using the word “frequency” pretty carelessly so far. But the introduction of and complicates things.
Definition. The CT signal has an angular frequency of and a cyclical frequency of . Angular frequency has units radians per second, and cyclical frequency cycles per second (or Hz).
Definition. The DT signal has an angular frequency of and a cyclical frequency of . Angular frequency has units radians per sample (dimensionless!), and cyclical frequency cycles per sample (dimensionless!).
Remark. The cyclical frequency of a CT signal is measured in Hz, but the cyclical frequency of a DT signal is technically not!
Cyclical frequency has become relevant with the introduction of , the sampling frequency (in samples per second).
Problem. A pure-sine Hz CT signal is sampled at an interval of . Determine the resulting DT signal.
Solution: A pure-sine Hz CT signal looks like . The DT signal then looks like .
We can then read off the following.
The angular frequency is radians per sample.
But radians are a measurement taken modulo . We could also say the angular frequency is .
The cyclical frequency is cycles per sample.
But cycles are a measurement taken modulo . We could also say the cyclical frequency is .
Note, importantly, that it does not make sense to call the fundamental angular frequency , say. This is because this DT signal isn't periodic! It doesn't have a “fundamental frequency” that we can use to (say) write a Fourier series.
Remark. We just say that if a DT signal has an angular frequency of , then is also a valid angular frequency for all . However, this does not hold for CT signals: samples are a discrete measurement, but time is not.
(A more mathematical reason why this does not apply for CT signals is that for .)
§ Recitation: Periods of DT Signals
As we just saw, sinusoidal CT signals always have a fundamental period, but DT signals might not…
Definition. The CT signal has a fundamental period , with the relationship .
Definition. The DT signal has a fundamental period only if is rational, in which case is the numerator of in simplest form.
Definition. If a DT signal has fundamental period , then its fundamental angular frequency is , and its fundamental cyclical frequency is . (Aperiodic DT signals do not have fundamental angular / cyclical frequencies.)
Warning! For DT signals , the relationships and are not guaranteed!
Remark. Of course, nothing is special about here—all of this applies equally well to too.
Problem. The DT signals and are the same, and they both have fundamental periods. What do , , , , and equal for each of them?
Solution: Both signals are the same, with , so they have the same results: .
Checking whether a DT signal even has a fundamental period cannot be easily overlooked!
Problem. Suppose an Hz CT signal is sampled at a sampling rate of Hz. What must be true about for the resulting DT signal to have a fundamental period?
Solution: Simply that . The fundamental period is the numerator of . So the fundamental period equals for , is fairly small for , and is fairly large for .
Let's put this together with the sampling / aliasing discussion from earlier.
Problem. A Hz CT signal is sampled at a sampling interval of seconds per sample. Determine , , and for the resulting DT signal. Is there aliasing? How would the DT signal sound if played back at the same sampling rate?
Solution: Note that we are sampling at a sampling rate of Hz, which is smaller than . So the Sampling Theorem suggests there might be some aliasing.
The CT signal is , so the DT signal is . Thus , so and . If we were to perform a Fourier analysis of this signal (see Lecture 5), the only nonzero coefficients would be the and harmonics.
Of course there is aliasing—there is always aliasing—but here, the original frequency of was above the Nyquist frequency of . The baseband frequency is ; indeed, sampling a Hz signal yields .
If someone were given only the DT signal, they would have no way of knowing the original signal was Hz. Assuming the baseband frequency were the original frequency, it would seem like the original signal was Hz. And that's how it turns out in practice: this poorly-sampled DT signal would sound like Hz when played back at the original rate!