Signal Quantization

Vicente González Ruiz

October 12, 2023

Contents

 1 Definition
 2 Quantization error
 3 Quantizer design
 4 Scalar quantization
 5 Vector quantization
 6 Uniform quantization
 7 Non-uniform quantization
 8 Resources
 References

1 Definition

Figure 1: An example of the quantization procedure, applied to an analog signal.

Quantization is the process of mapping a continuous range of values into a finite range of discrete values. A quantizer, usually denoted by \(Q\), is a system that:

  1. In the analog case (see the Figure 1), a PAM signal \(s(nT)\) (i.e. a sequence of analog samples where \(s\) is an (analog) signal, \(n\in {\mathbb {Z}}\) and \(T\) is the sampling period) is transformed into a PCM signal \({\mathbf s}=s[n=0,1,\cdots ]\). Therefore, analog quantization is the process of mapping a continuous range of values (not necessarily countable) into a finite range of discrete values (necessarily countable) [4].

    Notice that, in general, analog signals are 1-dimensional, and that analog quantization is irreversible.

  2. In the digital case, where \(\mathbf s\) is already a PCM signal (a sequence of integers of finite precision), the output of a quantizer is a sequence of quantization indexes \(\mathbf k\), and the inverse system, called a dequantizer or inverse quantizer (denoted by \(Q^{-1}\)), can only recovers an approximated version of \(\mathbf s\) that it will be denoted by \(\tilde {\mathbf s}\).

    If we define the cardinality operator \(|\cdot |\) applied to a digital signal as the number of different values that such signal can take, i.e., the size of the signal alphabet, it ususally holds that \begin {equation} |{\mathbf s}|\geq |\tilde {\mathbf s}| = |{\mathbf k}|. \end {equation} As a consequence of this property, the values that \(\mathbf k\), individually, can take will require less bits to be represented than the values that the original signal \(\mathbf s\) can.

    Finally, note that in the case of digital quantization, \(Q^{-1}\) is only a formal notation and does not correspond to the reciprocal function of \(Q\) since quantization is noninvertible [1] (Quantization is not linear transform).

2 Quantization error

Quantization is a lossy process that usually generates a distortion between \(\mathbf s\) and \(\tilde {\mathbf s}\). The quantization error in unpredectible (for this reason is also called quantization noise), and therefore, we cannot recover \(\mathbf s\) after quantization.

We define the quantization error \begin {equation} {\mathbf e} = {\mathbf s} - \tilde {{\mathbf s}}, \end {equation} an the distortion, generally measured as the Mean Squared Error determined by \begin {equation} \text {MSE}({\mathbf s}, \tilde {\mathbf s}) = E(({\mathbf s} - \tilde {\mathbf s})^2), \label {eq:MSE} \end {equation} where \(E(\cdot )\) denotes the expectation operator.

3 Quantizer design

\(Q\) should be designed to minimize the MSE, and this depends on how the mapping between the input signal \(\mathbf s\) and the quantized signal \(\tilde {\mathbf s}\) has been performed.

\(Q\) is defined by a finite set of decision boundaries \(\{{\mathbf d}_i; i\in {\mathbb {Z}}\}\) that describe a set of cells1 in the signal domain, and a finite set of representation values \(\{{\mathbf r}_i; i\in {\mathbb {Z}}\}\) (see Figure 1), both with the same cardinality (because there is one representation level per cell). The set \(\mathbf r\) is called the codebook and to their elements, \({\mathbf r}_i\), codewords.

Given a finite number \(K\) of cells, to minimize the MSE, \(\mathbf d\) and \(\mathbf r\) are selected depending on the characteristics of \(\mathbf s\). In general, we need to consider the statistical distribution of the samples (or vectors of samples, depending on the way we process the input) in \(\mathbf s\).

Notice that \(K\) has an impact on the output bit-rate of the quantizer and therefore, we could be interested in minimizing the RD (Rate/Distortion) tradeoff instead of simply the MSE. However, such problem in general is addressed by using an entropy codec at the output of \(Q\).

4 Scalar quantization

Scalar quantizers map each source sample independently from the other samples and therefore, a quantization index \({\mathbf k}_i\) is produced for each input sample \({\mathbf s}_i\) [2].

5 Vector quantization

In vector quantization, several source samples are quantized simultaneously and a single index is associated to a vector of source samples. Vector quantization allows to account for the correlation between source samples directly at the quantizer, which improves its RD efficiency [13].

6 Uniform quantization

In uniform quantizers, the size of the cells is constant. For example, in a scalar quantizer, the quantization step size \(\Delta \) is constant and independent of the input signal.

Uniform quantizers are used in most A/D (analogic/digital) converters, where it is expected the generation of uniformely distributed sequences of samples. In the case of scalar uniform digital quantizers, it is common to have \(r_i=i\) and the input intervals are of the form \(]d_{i-1},d_i]=]i-1/2,i+1/2]\).

7 Non-uniform quantization

In order to minimize the MSE, the cells defined by the quantizer cound be of different size depending on the PDF of \(\mathbf s\). When all the cells do not have the same size we have designed a non-uniform quantizer.

8 Resources

[1]   P. Duhamel and M. Kieffer. Joint Source-Channel Decoding: A Cross-Layer Perspective with Applications. Academic Press, 2009.

[2]   V. González-Ruiz. Scalar Quantization.

[3]   V. González-Ruiz. Vector Quantization.

[4]   M. Vetterli and J. Kovačević. Wavelets and Subband Coding. Prentice-hall, 1995.

1Also called “bins”.