AET 2050 - Daw Production

4. Conversion Principles - Quantization

Objectives:

- Describe the process of quantization..
- Explain the sugnificance of bit depth on quantization.
- Define quantization error.
- Define dither.
- Give examples of the results of using dither.
- Differentiate between the different types of dither.

Reading

Chapter 2.4.3-2.4.6, __Desktop Audio
Technology__ - Rumsey

Quantization

Sampling results in a series of time-discreet pulses. After sampling, the modulated pulse chain is quantized.

**Quantization** is the process
of assigning
a discreet
amplitude value
to
each discreet
pulse.

The pulse's amplitude is measured against a scale of
discreet quantities. Its amplitude is assigned to the closest quantity. *(See
fig. 2.19, p. 19, text)*

The value is then given a binary number that can be
stored or processed.

Significance of Bit Depth

The assignment of the value is an approximation - the
measurement is "rounded off" to the closest predefined quantity,
or quantization interval (**Q**).

The quantizer's accuracy is defined by the size of Q. The size of Q is defined by the number of intervals available.

The number of intervals available
is equal to 2* ^{n}*, where

example:2

^{4}= 16 steps, or levels2

^{16}= 65,536 levels2

^{24}= 16,777,216 levels

Each bit that is added doubles the number of available
steps. *(See fig 2.20, p. 20, text)*

The maximum signal range is divided by the number of quantizing intervals which determines the size of each step.

The total range does not increase with extra bits, but
the *step size decreases*.

example:A given system has a voltage range of 10v.

If 16-bit quantization is used, each step would be 10 / 65,536, or

.15 mvper step.If 24-bit quantization is used, each step would be 10 / 16,777,216, or

596 nVper step.

Here are some practical comparisons:

If a sheet of paper represents one quantization level, how high would a stack of paper representing the entire range be?

If 16 bits, the stack would be 22 ft.

If 20 bits, the stack would be 352 ft.

If 24 bits, the stack would be 5,632 ft. - over a mile!

Or, if the distance between Los Angeles and New York was measured with 24-bit accuracy, the measurement would be accurate within 9 inches.

There is error involved with quantization, due to the approximation of the level being quantized.

Error size will be a maximum of +/- half the amplitude
of one quantizing interval (**1/2 Q**).

Since the quantizing interval is constant, *the maximum
error is also constant*.

The quantization error level is independent of the signal amplitude.

As the signal level gets smaller, the signal-to-error
* ratio* gets larger. Therefore, the error is more apparent with lower levels
of
audio.

example:A system with a 20v range is quantized at 16 bits. Each step has a size of approximately .3 mv; therefore there is a maximum error of .15 mv.

If a signal were at 0dBu (2.2 v), the signal-to-error ratio would be approx .007%.

If a signal is at -60dBu (2.2 mv), the signal-to error ratio would be approx 6.8%!

Important points regarding quantization error:

- Quantization error is
**correlated**to the signal, and manifests as**distortion**. - The smallest amplitude that can be quantized is 1/2
Q ; therefore, any signal with an amplitude below Q is quantized
to
!**zero**

*Digital Signal-to-Noise and Dynamic Range*

With complex audio (music), error is spread over a large amplitude and dynamic spectrum, and manifests more as noise.

Unlike analog noise, *quantization noise only exists
when signal
is present*, since it is the result of quantization error.

Also, keep in mind that the smallest amplitude that can be quantized is 1/2 Q.

Therefore, a quantization signal-to-error ratio can be evaluated like a signal-to-noise ratio, or overall dynamic range. Analysis of the error noise level has given way to the following formula for digital signal-to-error(noise) ratio:

*6.02n + 1.76 dB*

This implies a dynamic range of just over 6dB per bit. 8 bits deliver S/E of around 50 dB, 16 bits give around 98 dB.

Error that is spread out over the frequency spectrum manifests more as noise, not distortion.

If wideband noise is quantized, then the resulting distortion is transformed into a random, noise-like signal as well.

** Dither** is just such a signal - a wideband
noise (e.g. white noise) at a very low level (usually 1/2 the LSB level)
that
is combined with the signal before quantization. The dither has the effect
of removing the quantization distortion by distributing it accross the
frequency spectrum.

Using dither in the quantization process provides several results:

- Distortion is spread across the frequency spectrum, giving it a noise-like characteristic.
- Dither effectively linearizes the quantization process.
- Dither allows for the encoding of signals whose amplitudes are below the least significant bit.
- Dither adds a constant noise, raising the S/N level approx 6 dB. This added noise is considered superior to the distortion (the ear accepts noise better than distortion).

Distortion is the result of correlation between the signal and the error, and is subjectively annoying.

(see p 23, *Rumsey)*

The random noise signal effectively randomizes the error, making it noise-like as well.

(see p 25, *Rumsey)*

Since dither is full-spectrum, and low-level, its quantized
result wil randomly change from one quantization level to another. It is
not unlike a pulse train (only random instead of periodic). The chance
of its landing on one level or another is approximatly equal and the average
energy level *over
time* is
zero.

White noise near LSB before and after quantization. Note "pulse width" appearance.

40 samples of 1-bit quantization. Note random pattern.

As a signal with dither is quantized, the changing
signal amplitude will skew the probability of the dither's quantization
level. The result is like **pulse width modulation**.

(see p 26, *Rumsey)*

The modulation skews the energy of the dither up or down, according to the input signal. The resultant energy is then linear, following the signal.

Dither can encode signals whose levels are below the
LSB. When a low-level signal is mixed with the dither, it causes **pulse
width modulation** of the dithered signal. When the resultant signal
is heard, the ear averages the modulations, and the small signal is perceived.

Two types of dither: ** analog** and

- Analog is used during the A/D process. If not used, the disrtion WILL remain and cannot be corrected.
- Digital dither is used any time requantization is performed, such as reduction from 24 to 16 bits. If bits are simply truncated, quantization error is re-introduced.

Dither is characterized by probability of the bit changing. There are three different types:

- Rectangular
- Triangular
- Gaussian

Consider throwing of dice:

1 die, all numbers have same probability. This is **Rectangular Probability Distribution (RPDF)**

2 dice, the numbers 6-8 have greater probability than2
or 12. This is **Triangular Probability Distribution (TPDF)**.

Analog white noise has **Gaussian probability**.

Research has shown that the most suitable dither is TPDF with a p-p value of 2 Q. If Rectangular is used, the p-p value should be 1 Q.