Conversion

Quantization

Converting continuous sample amplitudes into discrete levels and the resulting quantization noise.

Quantization as amplitude discretization

After , which discretizes a signal in time, we are left with a series of samples. The amplitude of each sample can still take on any value from a continuous range. Quantization is the process of discretizing these amplitudes.

Quantization maps a large, often infinite, set of input values to a finite set of output values. It rounds or approximates each sample to the nearest member of a predefined set of quantization levels. The resulting code can represent only the selected levels with a finite number of bits.

The Mechanism of Quantization

Quantization has two operations: divide the amplitude range into intervals, then assign each sample to a level.

  1. Dividing the Range: The selected input range is divided into a finite number of quantization intervals. Each interval has a width called the quantization step size (ϵ\epsilon).
  2. Rounding and Assignment: The amplitude of each sample is mapped to the nearest available level. For example, a 2.7 V sample maps to 2.5 V when the neighboring levels are 2.5 V and 3.0 V. A value exactly halfway between levels, such as 2.75 V in this example, is resolved by the specified tie-breaking rule. Samples in one interval receive the same quantization level.

Quantization error and quantization noise

Quantization replaces a sample with an approximation, so the quantization error is the difference between the input sample and its quantized value. Under the usual uniform-quantizer model, this error is treated as quantization noise.

  • Magnitude of Error: For a uniform quantizer, the error from round-to-nearest is bounded by half the quantization step size (±ϵ2\pm \frac{\epsilon}{2}). If the error is modeled as uniformly distributed and uncorrelated with the signal, its RMS value is ϵ12\frac{\epsilon}{\sqrt{12}}.
  • Impact on Signal Quality: The error appears as an additional signal component. More levels reduce the step size ϵ\epsilon and the ideal quantization contribution, which improves the ideal .

Resolution: Bits per Sample

After quantization, each discrete level is represented by a binary code. The number of bits per sample determines the conversion resolution and the number of available codes.

L=2nL = 2^n

Here LL is the number of quantization levels and nn is the number of bits per sample. For an ideal converter with input range from VminV_{min} to VmaxV_{max}, one LSB is the step size:

ϵ=ΔV=Vmax−Vmin2n=1 LSB\epsilon = \Delta V = \frac{V_{max} - V_{min}}{2^n} = 1\,\text{LSB}

This uses the usual convention in which the full-scale span is divided into 2n2^n code intervals. Other endpoint conventions can shift code centers and change how the endpoints are treated.

Bit Depth in Practice

  • 12-bit PCM example: A 12-bit uniform PCM representation provides 212=40962^{12} = 4096 quantization levels. At 8000 samples/s, an uncompressed stream would have a data rate of 96 kbit/s (8000 samples/s × 12 bits/sample).
  • G.711 telephony PCM: ITU-T G.711 encodes each sample into an 8-bit companded codeword using A-law or μ-law. This provides 28=2562^8 = 256 codewords and a bit rate of 64 kbit/s (8000 samples/s × 8 bits/sample) for one voice channel.
  • High-resolution audio: CD audio uses 16 bits per sample, giving 216=65,5362^{16} = 65,536 possible codes. Professional recording also uses 24-bit samples to increase the available dynamic range and reduce the relative quantization noise.

Bit-depth trade-off

More bits per sample reduce the ideal quantization step and noise, but increase the data rate, transmission bandwidth, and storage required for the same sampling frequency.

Related articles