seegongsik
CM · Digital modulation

Sampling and PCM

Sample a continuous signal at regular intervals and the curve disappears, leaving only a handful of dots. Even so, if the sampling frequency is more than twice the signal's highest frequency, those dots alone can rebuild the original signal exactly. This unit also explains why sampling too slowly disguises a high frequency as a false low one.

Can a few dots bring the signal back?

The faint blue curve is the original signal, the bright dots are the samples, and the bold curve is the signal rebuilt from the samples alone. Raise the sampling frequency and the dots crowd together; until it passes twice the signal frequency, the bold curve is drawn as a slow false sine through the samples and shows red. From the moment it passes twice, the gold curve lands exactly on the original.

Sampling rate fsfs = 1.14 × f0
The value on the right gives the sampling frequency as a multiple of the signal frequency. fs = 2 f0 is the Nyquist boundary.
Rate versus the Nyquist bound
fs < 2 f0 → Aliasing
Aliasing

Samples are dots

Sampling means reading a continuous signal once at every fixed time interval and writing down only that value. The smooth curve shrinks to the few bright dots in the plot. A natural question follows: everything between the dots has been thrown away, so how could the original curve ever come back?

Nyquist — faster than twice

The sampling theorem answers it. When the highest frequency of a signal is fmax, sampling with fs > 2 fmax lets the samples alone restore the original perfectly, and the boundary value 2 fmax is called the Nyquist rate. If the sampling frequency falls short, components near fmax fold into the band below fs/2 and look like a slower sine passing through the same samples. This change of identity is aliasing, and once a signal has folded, the samples alone offer no way to recover its true frequency.

Observefs > 2 fmax
The sampling frequency must exceed twice the highest frequency.
Choosefa = | fs ? f0 |
When sampling falls short, the apparent frequency folds down.

PCM — quantize and encode

Samples are still continuous values, so they cannot be written as bits as they are. PCM first quantizes each value, rounding it to the nearest of L levels, and then encodes each level with n = log₂ L bits. Sampling 1 second's worth of signal fs times gives a bit rate of R = n fs. The error introduced by rounding is quantization noise, and it shrinks as the number of levels L grows, that is, as more bits are spent. Chopping time finely by sampling and value finely by quantization, PCM turns a signal into numbers.

Fill inn = log₂ ?
Writing L levels takes log₂ L bits per sample.
On your ownR = ? (bit/s)
The bit rate is bits per sample times the sampling frequency.

Back to the first screen

As you raised the sampling frequency, the dots crowded together, and the moment it passed twice the signal frequency the rebuilt curve settled onto the original and turned gold. Below that, a slower sine through the same samples appeared and masqueraded in red. The one thing to remember about sampling: throwing away everything between the dots loses nothing as long as fs > 2 fmax, and breaking that boundary folds high frequencies into false low ones that can never be undone.

Sampling reads a continuous signal at regular intervals set by the sampling frequency fs. By the sampling theorem, when fs > 2 fmax the samples alone restore the original perfectly, and the boundary 2 fmax is the Nyquist rate. With too low a sampling frequency, high frequencies fold below fs/2 and aliasing occurs. PCM quantizes each sample to L = 2ⁿ levels and encodes it with n = log₂ L bits, giving a bit rate of R = n fs.

In the next unit

The message has now become a stream of bits. The next question is how those bits shake a carrier. Switching the carrier amplitude on and off with the bits gives ASK, toggling the frequency between two values gives FSK, and flipping the phase gives PSK. The next unit sets these three branches of digital modulation side by side.