Field Guide · technology

Also known as: pulse-code modulation, PCM, linear PCM, LPCM

Pulse-code modulation (PCM) is the standard method for representing an analog signal digitally: sample it at a fixed rate, quantize each sample to the nearest of a finite set of levels, and encode that level as a binary number.1 The result is a stream of digital codes — hence the name — that a digital-to-analog converter can turn back into a faithful copy of the original. PCM is the foundation of digital audio, telephony, and the baseband samples every software radio processes.

10111101000010
PCM samples the analog wave at regular instants and snaps each sample to a quantization level encoded as a binary code — the digital form of the signal.

How it works

Three steps define PCM. Sampling measures the signal at a fixed rate, which by the Nyquist theorem must exceed twice the highest frequency present to avoid aliasing. Quantization rounds each sample to one of 2ᴺ levels set by the bit depth N, introducing a small, bounded quantization error whose ratio to full scale gives roughly 6 dB of dynamic range per bit. Encoding writes each level as an N-bit word. An analog-to-digital converter performs the sample-and-quantize stages in hardware; a DAC reverses them on playback.

Because it stores exact numbers, PCM is lossless apart from the deliberate quantization step, and it can be copied, filtered, and processed without further degradation — the central advantage of digital over analog. The trade-offs are bit rate (sample rate × bits × channels) and the need for anti-alias and reconstruction filters. Linear PCM uses uniform level spacing; companded variants such as telephony’s G.711 μ-law and A-law space levels logarithmically to give quiet sounds more resolution at a fixed bit rate.

Relevance to SDR

PCM is the native currency of software radio. The ADC in an SDR front end delivers PCM samples — usually as IQ pairs, which are simply two PCM streams for the in-phase and quadrature components — and every downstream filter, mixer, and demodulator operates on those numbers. Recovered audio is likewise PCM before it reaches the speaker or a codec. Standard sample formats (16-bit integer, 8-bit unsigned from RTL-SDR dongles, 32-bit float) are all PCM encodings.

GopherTrunk consumes PCM/IQ sample streams from its SDR hardware and captures, runs its DSP and demodulators on them, and outputs decoded PCM voice. So while PCM is not a land-mobile modulation like the others in this family, it is the underlying digital representation on which GopherTrunk’s entire signal path — and all of SDR — is built.

Sources

  1. Pulse-code modulation — Wikipedia, for the sample/quantize/encode definition, bit depth and dynamic range, and companded μ-law/A-law variants. 

See also