Pulse modulation and PCM
With 8 bits and μ-law, a voice 40 dB below the maximum sounds as good as with a 12-bit uniform converter. Digital telephony saves four bits per sample with a logarithmic curve.
01Modulating a pulse train
If the message is sampled at a frequency greater than twice its bandwidth, it is enough to transmit the samples. The carrier becomes a pulse train, and the message can change its amplitude, its duration or its position:
| Modulation | What the sample carries | Use |
|---|---|---|
| PAM (amplitude) | The height of the pulse | Intermediate step in every converter; basis of PCM |
| PWM (width) | The width of the pulse | Motor control, class D amplifiers, switching power supplies |
| PPM (position) | The delay of the pulse relative to a clock | Radio control, low-power optical communications |
| PCM (code) | A binary number with the quantized value | Digital telephony, audio, almost all present-day transmission |
PAM, PWM and PPM remain analog: the noise added to the height, width or position of the pulse reaches the message. In PCM, on the other hand, each sample is rounded to one of \( 2^n \) levels and transmitted as \( n \) bits. The receiver only has to decide whether a 1 or a 0 arrived, and a repeater can regenerate the signal without accumulating noise. The introduction to the equipment is in sampling theorem, in the technician program.
02PCM: bit rate and quantization noise
A PCM system samples at \( f_s \), quantizes with \( n \) bits and transmits the bit sequence. The bit rate and the minimum bandwidth, with Nyquist pulses, are:
Rounding adds an error that, with a uniform quantizer of step \( \Delta \), is spread between \( \pm\Delta/2 \) and has power \( \Delta^2/12 \). With a sine wave that fills the whole range, the quantization signal-to-noise ratio is:
03Companding: μ-law and A-law
Voice has a dynamic range of about 40 dB: a person speaking softly produces signals a hundred times smaller than one who shouts. With a uniform quantizer, weak signals end up with very few levels. The solution is to compress the signal before quantizing, with a logarithmic curve that expands small values, and to expand it at the receiver. The G.711 standard uses μ-law in North America and Japan:
The result is a signal-to-noise ratio that is nearly constant over a wide range of levels, in exchange for losing about 12 dB at full scale. With 8 bits, μ-law gives a −40 dB signal the same quality as a 12-bit uniform quantizer.
A sine wave quantized with \( n \) bits, directly or companded with μ-law. The blue curve is the signal-to-noise ratio of the uniform quantizer as a function of the signal level; the green one, that of μ-law. The dot marks the chosen level. The values come from quantizing 4096 samples.
04Time-division multiplexing
Between two samples of one channel there is free time, which is used to transmit the samples of other channels: this is time-division multiplexing (TDM). A frame contains one sample of each channel and repeats at the sampling frequency. The European hierarchy, which Argentina uses, begins with the E1 system:
Other variants reduce the bit rate at the cost of complexity: differential PCM (DPCM) quantizes the difference between the sample and a prediction, and delta modulation uses a single bit per sample, at a much higher rate. Present-day speech coders transmit parameters of a vocal-tract model and get down to a few kbit/s.
05In the lab
Digitize a sine wave with a microcontroller, reducing the number of bits in software, and measure the signal-to-noise ratio with the FFT for each resolution. Verify the 6 dB per bit.
Implement μ-law on the microcontroller and repeat the measurement for different input levels. Compare with the uniform quantizer of the same number of bits.
Generate a PWM modulated by a tone and recover it with an RC lowpass filter. Observe the residue of the switching frequency.
06Common mistakes
- Applying 6.02n + 1.76 dB to any signal. It holds for a full-scale sine wave; with smaller signals the ratio drops dB for dB.
- Forgetting the anti-aliasing filter. Whatever is above \( f_s/2 \) folds over the useful band and cannot be separated.
- Believing that companding improves everything. It evens out the quality across levels, but at full scale it is worse than uniform.
- Confusing bit rate with bandwidth. The bandwidth depends on the pulse shape: at minimum, half the bit rate.
07Self-assessment
What quantization signal-to-noise ratio does a 12-bit converter give with a full-scale sine wave?
\( 6.02 \cdot 12 + 1.76 \approx 74 \) dB.
What bit rate does an audio channel sampled at 48 kHz with 24 bits need?
1.152 Mbit/s.
How many voice channels does an E1 carry and what is its bit rate?
30 voice channels at 2.048 Mbit/s.
With an 8-bit uniform quantizer, what signal-to-noise ratio does a sine wave 30 dB below full scale have?
About 50 − 30 = 20 dB.
08Further reading
- B. P. Lathi and Zhi Ding. Modern Digital and Analog Communication Systems. 5th ed., Oxford University Press, 2019. Sampling, PCM, companding, DPCM and delta modulation.
- Simon Haykin. Digital Communication Systems. Wiley, 2014. Quantization and waveform coding with a model-based approach.
- Bernard Sklar. Digital Communications: Fundamentals and Applications. 2nd ed., Prentice Hall, 2001. PCM and multiplexing from the system point of view.