Quantisation

Quantisation is the process of mapping a continuous range of values to a finite set of discrete levels. In digital signal processing, it is the second step in converting an analogue signal to a digital representation — after sampling, but before any digital processing can take place.

When a continuous signal $x(t)$ is sampled, we obtain a sequence of values with infinite precision. Quantisation rounds each sampled value to the nearest level from a finite set. The number of available levels is determined by the bit depth — the number of bits used to represent each sample.

The number of quantisation levels is given by:

$L = 2^b$

where $b$ is the number of bits. For example, 8‑bit quantisation gives 256 levels, 16‑bit gives 65,536 levels, and 24‑bit gives over 16 million levels.

The plot above shows the effect of quantisation on a sine wave. The blue curve is the original continuous signal. The red steps show 3‑bit quantisation (8 levels) — the signal is reduced to a staircase with obvious distortion. The orange steps show 4‑bit quantisation (16 levels) — smoother, but still visible. The green line shows 8‑bit quantisation (256 levels) — it is almost indistinguishable from the original.

The difference between the original signal and the quantised version is called quantisation error or quantisation noise. This error is bounded by half the quantisation step size:

$|e[n]| \leq \frac{\Delta}{2}$

where $\Delta$ is the step size between adjacent quantisation levels. The step size is determined by the range of the signal and the number of levels:

$\Delta = \dfrac{\text{range}}{L}$

In practice, quantisation noise is often modelled as additive white noise, and its power is proportional to $\Delta^2$. This is why higher bit depths (smaller $\Delta$) produce cleaner signals — the noise is quieter.

Quantisation appears in many contexts:

  • Analogue-to-digital conversion (ADC): Every ADC quantises the analogue input.
  • Digital audio: CDs use 16‑bit quantisation; professional audio often uses 24‑bit or 32‑bit.
  • Image processing: Colour depth is quantisation — 8‑bit per channel gives 256 levels per colour.
  • Rounding in computations: Digital processors introduce quantisation due to finite precision arithmetic.

In most DSP applications, quantisation is an unavoidable step — it is the price we pay for digital processing. The art is to choose a bit depth that balances signal quality against storage, bandwidth, and computational cost.