Learn the methods and applications of modeling the quantization error of an ADC using a noise source.

In the previous article on quantization error for ADC converters, we noted that, in particular cases, the quantization error resembles a noise signal. We also discuss that modeling the error term as a noise signal can significantly simplify the problem of analyzing the effect of the error on system performance.

In this article, we will look at the conditions under which we are allowed to use a noise source to model the quantization error. Then, we will analyze the statistical model of the quantization noise and use it to analyze the quantization error.

### When does a noise model lead to valid results?

We can easily find examples where the quantization error is predictable and does not act as a source of noise. For example, if the input to a quantizer is a CC value, the quantization error will be constant. As another example, suppose the input amplitude is always between two adjacent quantization levels of the quantizer. In this case, the quantization error is equal to the input minus a value of CC.

Another interesting case occurs when the input is a sinusoid and the sampling frequency of the quantizer is a multiple of the input frequency. An example is illustrated in Figure 1 below.

**Figure 1.** Image courtesy of data converters.

**Figure 1.**Image courtesy of data converters.

The left curve of Figure 1 shows two periods of a 10-bit quantized sine wave. The right curve shows the quantization error. For this example, the relationship between the sample rate and the input rate is 150.

Visual inspection of the quantization error reveals periodic behavior (one point is indicated by the orange rectangle). As you can see, there is a correlation between the input and the error signal, whereas a noise source is not correlated with the input. In such cases, we expect the error signal to have considerable frequency components in the input harmonics.

The error signal does not look like the noise in the previous examples. However, in many practical applications, such as speech or music, the input is a complicated signal and shows rapid fluctuations that occur in a somewhat unpredictable way. In such cases, the error signal is likely to act as a source of noise.

Experimental measurements and theoretical studies have shown that modeling the quantization error as a noise source is valid if the following four conditions are met:

- The input approaches the different quantization level values â€‹â€‹with equal probability (in some of the problematic examples discussed above, we saw that the input was always close to some particular quantization levels).
- The quantization error is not correlated with the input.
- The quantizer has a large number of quantization levels (like when we have a high resolution ADC).
- The quantization steps are uniform (unlike the data converters used in telephony that have a logarithmic characteristic).

You can find a more formal way of expressing these conditions in Section 4.8.3 of the Discrete Time Signal Processing book.

If these necessary conditions are satisfied, we can replace the error signal with an additive noise source, as shown in Figure 2. This allows us to use concepts such as signal-to-noise ratio (SNR) to characterize the effect of quantization error. . However, before that, we need to find a statistical model for the noise source.

**Figure 2**

**Figure 2**

### Statistical quantization noise model

The first step in characterizing a noise source can be to estimate how often a given value is likely to occur. This amplitude distribution can be obtained by observing the noise signal for a long time and taking samples to create an amplitude histogram. The histogram consists of a series of intervals that correspond to contiguous amplitude intervals that span the entire possible range of noise amplitude. The height of a container indicates the number of samples that are in the bin interval.

Let’s look at an example of a quantization noise histogram. Suppose the input is the discrete cosine signal x[n]= 0.99cos (n / 10) (shown in Figure 3).

**Figure 3. **Image courtesy of Discrete-Time Signal Processing.

**Figure 3.**Image courtesy of Discrete-Time Signal Processing.

If we apply an eight-bit quantizer to this signal, the quantization error sequence will be as shown in Figure 4.

**Figure 4.** Image courtesy of Discrete-Time Signal Processing.

**Figure 4.**Image courtesy of Discrete-Time Signal Processing.

### The amplitude distribution of quantization noise

Now, we take 101,000 samples of the error signal and construct a histogram with 101 bins representing ranges of amplitude ranging from -LSB / 2 to + LSB / 2.

The result is shown in Figure 5 below.

**Figure 5.** Image courtesy of Discrete-Time Signal Processing.

**Figure 5.**Image courtesy of Discrete-Time Signal Processing.

As you can see, LSB / 2 is approximately 4 Ã— 10-3 for this example.

Interestingly, almost the same number of samples are found in the different bin intervals; the height of the containers is close to the total number of samples (101,000) divided by the number of containers (101). In other words, the amplitude of the noise is evenly distributed within Â± LSB / 2. If we increase the resolution of the quantizer, we will obtain an even more uniform amplitude distribution. This is consistent with the third prerequisite for a valid noise model.

While we examine the histogram for a particular case of quantizer input type and resolution, the result holds for other cases where the quantization error acts as a source of noise. Therefore, we can assume that the noise amplitude is a random variable uniformly distributed over Â± LSB / 2.

The probability density function will be as shown in Figure 6.

*Figure 6*

*Figure 6*

The quantization noise can take a value between Â± LSB / 2, and the probability density function is constant in this range (that is, it is a uniform distribution). Since the integral of the probability density function is equal to one, its value will be 1 / LSB for -LSB / 2

Now, we can calculate the time mean power of the quantization noise as

*Equation 1*

*Equation 1*

This equation gives us the quantization noise power when the noise signal is evenly distributed within Â± LSB / 2. As you can see, increasing the resolution of the quantizer will reduce the LSB and noise power. Note that this equation is consistent with the RMS value that we obtained (in the previous article) for the quantization error of a ramp input.

### Quantization noise power spectral density

The other important parameter of a noise source is the power spectral density, which indicates how the noise power is distributed in different frequency bands. To find the power spectral density, we must calculate the Fourier transform of the noise autocorrelation function.

Assuming that the noise samples are not correlated with each other, we can approximate the autocorrelation function with a delta function in the time domain. Since the Fourier transform of a delta function is equal to one, the power spectral density will be independent of frequency. Therefore, quantization noise is white noise with a total power equal to LSB2 / 12.

To find the one-sided power spectral density, SUnilateral (f), over the Nyquist interval (DC to fsample / 2), we must divide the noise power by fsample / 2. Therefore,

### How is the quantization SNR degraded?

Now that we know the power and power spectral density of the quantization noise, we can use the model in Figure 2 to analyze the quantization process. For example, suppose we have an N-bit quantizer with a full scale value indicated by FS. What will be the SNR at the quantizer output if we apply the sinusoid $$ frac {FS} {2} sin (2 pi ft) $$ to the quantizer? The output will be the input sinusoid plus some noise produced by the quantization process. The desired signal strength can be calculated as

The power of the quantization noise is given by Equation 1. We only need to replace LSB with $$ frac {FS} {2 ^ N} $$. Therefore, the noise power is

The SNR is given by the following equation:

Plugging in the values, we get

This leads to the following expression:

*Equation 2*

*Equation 2*

This is an important equation that allows us to determine the maximum SNR of an ideal N-bit quantizer when the input is a sine wave with the maximum possible amplitude (FS / 2). For example, based on Equation 2, we know that the maximum SNR of a 10-bit ADC is approximately 60 dB. Note that each additional bit of resolution increases SNR by 6.02 dB.

Equation 2 only takes quantization noise into account. If there are some other noise sources in the system, the SNR will be lower than Equation 2 predicts. For example, although we expect a 10-bit ADC to have an SNR of approximately 60 dB, noise from electronic components can lead to a lower SNR. Suppose such additional noise sources reduce the SNR of our 10-bit ADC to 55.94 dB.

In this case, we can insert the SNR of the ADC into Equation 2 to determine the effective resolution of the ADC, which is generally referred to as the “effective number of bits” (ENOB).

So if a 10-bit ADC shows an SNR of 55.94 dB, its ENOB is 9 bits.

As a final note, remember that Equation 2 is derived by assuming that the band of interest is the Nyquist interval. If the input signal has a bandwidth lower than the Nyquist frequency, we can select only the band of interest from the quantizer output and improve the effective SNR of the data converter.

### Summary

- Under certain assumptions, we are allowed to model the quantization error as a noise source.
- The amplitude of the quantization noise is a random variable uniformly distributed between Â± LSB / 2.
- With a uniform amplitude distribution, the quantization noise power is equal to $$ frac {LSB ^ 2} {12} $$.
- The power spectral density of quantization noise is independent of frequency (it is white noise).
- For a sine wave, we can find the maximum SNR of an ideal N-bit quantizer as SNR = 1.76 + 6.02N.

To see a complete list of my articles, visit this page.