Live Sound University Article Thu, December 04, 2008

LSI University | Audio Basics |

Digital Dharma of Audio A/D Converters Part 2

by Dennis A. Bohn

Summary

  • The history and implementation of digital and what it means for audio systems.

The name successive approximation nicely sums up how the data conversion is done. The circuit evaluates each sample and creates a digital word representing the closest binary value. The process takes the same number of steps as bits available, i.e., a 16-bit system requires 16 steps for each sample. The analog sample is successively compared to determine the digital code, beginning with the determination of the biggest (most significant) bit of the code.

The description given in Daniel Sheingold’s Analog-Digital Conversion Handbook (see References) offers the best analogy as to how successive approximation works. The process is exactly analogous to a gold miner’s assay scale, or a chemical balance as seen in Figure 5A. This type of scale comes with a set of graduated weights, each one half the value of the preceding one, such as 1 gram, 1/2 gram, 1/4 gram, 1/8 gram, etc.

You compare the unknown sample against these known values by first placing the heaviest weight on the scale. If it tips the scale you remove it; if it does not you leave it and go to the next smaller value.

PCM (Pulse Code Modulation) and PWM (Pulse Width Modulation)
The successive approximation method of data conversion is an example of pulse code modulation, or PCM. Three elements are required: sampling, quantizing, and encoding into a fixed length digital word. The reverse process reconstructs the analog signal from the PCM code.

The output of a PCM system is a series of digital words, where the word-size is determined by the available bits. For example the output is a series of 8-bit words, or 16-bit words, or 20-bit words, etc., with each word representing the value of one sample.

Pulse width modulation, or PWM is quite simple and quite different from PCM. Look at Fig. 6. In a typical PWM system, the analog input signal is applied to a comparator whose reference voltage is a triangle-shaped waveform whose repetition rate is the sampling frequency. This simple block forms what is called an analog modulator.

If that value tips the scale you remove it, if it does not you leave it and go to the next lower value, and so on until you reach the smallest weight that tips the scale. (When you get to the last weight, if it does not tip the scale, then you put the next highest weight back on, and that is your best answer.) The sum of all the weights on the scale represents the closest value you can resolve.

In digital terms, we can analyze this example by saying that a “0” was assigned to each weight removed, and a “1” to each weight remaining—in essence creating a digital word equivalent to the unknown sample, with the number of bits equaling the number of weights. And the quantizing error will be no more than 1/2 the smallest weight (or 1/2 quantizing step).

As stated earlier the successive approximation technique must repeat this cycle for each sample. Even with today’s technology, this is a very time consuming process and is still limited to relatively slow sampling rates, but it did get us into the 16-bit, 44.1 kHz digital audio world

A simple way to understand the “modulation” process is to view the output with the input held steady at zero volts. The output forms a 50% duty cycle (50% high, 50% low) square wave. As long as there is no input, the output is a steady square wave. As soon as the input is non-zero, the output becomes a pulse-width modulated waveform. That is, when the non-zero input is compared against the triangular reference voltage, it varies the length of time the output is either high or low.

For example, say there was a steady DC value applied to the input. For all samples when the value of the triangle is less than the input value, the output stays low, and for all samples when it is greater than the input value, it changes state and remains high.

Therefore, if the triangle starts higher than the input value, the output goes high; at the next sample period the triangle has increased in value but is still more than the input, so the output remains high; this continues until the triangle reaches its apex and starts down again; eventually the triangle voltage drops below the input value and the output drops low and stays there until the reference exceeds the input again. The resulting pulse-width modulated output, when averaged over time, gives the exact input voltage.

For example if the output spends exactly 50% of the time with an output of 5 volts, and 50% of the time at 0 volts, then the average output would be exactly 2.5 volts.

This is also an FM, or frequency-modulated system—the varying pulse-width translates into a varying frequency. And it is the core principle of most Class-D switching power amplifiers. The analog input is converted into a variable pulse-width stream used to turn-on the output switching transistors.

The analog output voltage is simply the average of the on-times of the positive and negative outputs. Pretty amazing stuff from a simple comparator with a triangle waveform reference.

Another way to look at this, is that this simple device actually codes a single bit of information, i.e., a comparator is a 1-bit A/D converter. PWM is an example of a 1-bit A/D encoding system. And a 1-bit A/D encoder forms the heart of delta-sigma modulation.

Delta-Sigma Modulation & Noise Shaping
After nearly thirty years, delta-sigma modulation (also sigma-delta [4]) has only recently emerged as the most successful audio A/D converter technology. It waited patiently for the semiconductor industry to develop the technologies necessary to integrate analog and digital circuitry on the same chip. Today’s very high-speed “mixed-signal” IC processing allows the total integration of all the circuit elements necessary to create delta-sigma data converters of awesome magnitude [5].

How the name came about is interesting. Another way to look at the action of the comparator is that the 1-bit information tells the output voltage which direction to go based upon what the input signal is doing. It looks at the input and compares it against its last look (sample) to see if this new sample is bigger or smaller than the last one—that is the information transfer: bigger or smaller, increasing or decreasing.

If it is bigger than it tells the output to keep increasing, and if it is smaller it tells the output to stop increasing and start decreasing. It merely reacts to the change. Mathematicians use the Greek letter “delta” (symbol ”) to stand for deviation or small incremental change, which is how this process came to be known as “delta modulation.”

The “sigma” part came about by the significant improvements made from summing or integrating the signal with the digital output before performing the delta modulation. Here again, mathematicians use the Greek letter “sigma” (symbol £) to stand for summing, so “delta-sigma” became the natural name.

Essentially a delta-sigma converter digitizes the audio signal with a very low resolution (1-bit) A/D converter at a very high sampling rate. It is the oversampling rate and subsequent digital processing that separates this from plain delta modulation (no sigma).

Referring back to the earlier discussion of quantizing noise it is possible to calculate the theoretical sine wave signal-to-noise (S/N) ratio (actually the signal-to-error ratio, but for our purposes it’s close enough to combine) of an A/D converter system knowing only n, the number of bits.

Doing a bit (sorry) of math shows that the value of the added quantizing noise relative to a maximum (full-scale) input equals 6.02n + 1.76 dB for a sine wave. For example, a perfect 16-bit system will have a S/N ratio of 98.1 dB, while a 1-bit delta-modulator A/D converter, on the other hand, will have only 7.78 dB!

To get something of a intuitive feel for this, consider that since there is only 1-bit, the amount of quantization error possible is as much as 1/2-bit. That is, since the converter must choose between the only two possibilities of maximum or minimum values, then the error can be as much as half of that. And since this quantization error shows up as added noise, then this reduces the S/N to something on the order of around 2:1 or 6 dB.

One attribute shines true above all others for delta-sigma converters and makes them a superior audio converter: simplicity. The simplicity of 1-bit technology makes the conversion process very fast, and very fast conversions allows use of extreme oversampling.

And extreme oversampling pushing the quantizing noise and aliasing artifacts way out to megawiggle-land, where it is easily dealt with by digital filters (typically 64-times oversampling is used, resulting in a sampling frequency on the order of 3 MHz).

To get a better understanding of how oversampling reduces audible quantization noise, we need to think in terms of noise power. From physics you may remember that power is conserved—i.e., you can change it, but you cannot create or destroy it; well, quantization noise power is similar. With oversampling the quantization noise power is spread over a band that is as many times larger as is the rate of oversampling.

For example, for 64-times oversampling, the noise power is spread over a band that is 64 times larger, reducing its power density in the audio band by 1/64th. See Figures 7A-E, illustrating noise power redistribution & reduction due to oversampling, noise shaping and digital filtering.

Noise shaping helps reduce in-band noise even more. Oversampling pushes out the noise, but it does so uniformly, that is, the spectrum is still flat. Noise shaping changes that.

Using very clever complex algorithms and circuit tricks, noise shaping contours the noise so that it is reduced in the audible regions and increased in the inaudible regions. Conservation still holds, the total noise is the same, but the amount of noise present in the audio band is decreased while simultaneously increasing the noise out-of-band - then the digital filter eliminates it. Very slick.

As shown in Fig. 8, a delta-sigma modulator consists of three parts: an analog modulator, a digital filter and a decimation circuit. The analog modulator is the 1-bit converter discussed previously with the change of integrating the analog signal before performing the delta modulation. (The integral of the analog signal is encoded rather than the change in the analog signal, as is the case for traditional delta modulation.)

Oversampling and noise shaping pushes and contours all the bad stuff (aliasing, quantizing noise, etc.) so the digital filter suppresses it. The decimation circuit, or decimator, is the digital circuitry that generates the correct output word length of 16-, 20-, or 24-bits, and restores the desired output sample frequency. It is a digital sample rate reduction filter and is sometimes termed downsampling (as opposed to oversampling) since it is here that the sample rate is returned from its 64-times rate to the normal CD rate of 44.1 kHz, or perhaps to 48 kHz, or even 96 kHz, for pro audio applications. The net result is much greater resolution and dynamic range, with increased S/N and far less distortion compared to successive approximation techniques—all at lower costs.

Dither - Not All Noise Is Bad
Now that oversampling helped get rid of the bad noise, let’s add some good noise—dither noise.

Just what is dither? Aside from being a funny sounding word, it is a wonderfully accurate choice for what is being done. The word “dither” comes from a 12th century English term meaning “to tremble.” Today it means to be in a state of indecisive agitation, or to be nervously undecided in acting or doing. Which, if you think about it, is not a bad description of noise.

Dither is one of life’s many trade-offs. Here the trade-off is between noise and resolution. Believe it or not, we can introduce dither (a form of noise) and increase our ability to resolve very small values. Values, in fact, smaller than our smallest bit ... now that’s a good trick. Perhaps you can begin to grasp the concept by making an analogy between dither and anti-lock brakes.[7] Get it?

No? Okay, here’s how this analogy works: With regular brakes, if you just stomp on them, you probably create an unsafe skid situation for the car ... not a good idea.

Instead, if you rapidly tap the brakes, you control the stopping without skidding. We shall call this “dithering the brakes.” What you have done is introduce “noise” (tapping) to an otherwise rigidly binary (on or off) function.

So by “tapping” on our analog signal, we can improve our ability to resolve it. By introducing noise, the converter rapidly switches between two quantization levels, rather than picking one or the other, when neither is really correct. Sonically, this comes out as noise, rather than a discrete level with error. Subjectively, what would have been perceived as distortion is now heard as noise.

Lets look at this is more detail. The problem dither helps to solve is that of quantization error caused by the data converter being forced to choose one of two exact levels for each bit it resolves. It cannot choose between levels, it must pick one or the other.

With 16-bit systems, the digitized waveform for high frequency, low signal levels looks very much like a steep staircase with few steps. An examination of the spectral analysis of this waveform reveals lots of nasty sounding distortion products.

We can improve this result either by adding more bits, or by adding dither. Prior to 1997, adding more bits for better resolution was straightforward, but expensive, thereby making dither an inexpensive compromise; today, however, there is less need.

The dither noise is added to the low-level signal before conversion. The mixed noise causes the small signal to jump around, which causes the converter to switch rapidly between levels rather than being forced to choose between two fixed values. Now the digitized waveform still looks like a steep staircase, but each step, instead of being smooth, is comprised of many narrow strips, like vertical Venetian blinds.

The spectral analysis of this waveform shows almost no distortion products at all, albeit with an increase in the noise content. The dither has caused the distortion products to be pushed out beyond audibility, and replaced with an increase in wideband noise. Fig. 9 diagrams this process.

Life After 16 - A Little Bit Sweeter
Current digital recording standards allow for only 16-bits, yet it is safe to say that for all practical purposes 16-bit technology is history [9]. Everyone who can afford the up-grade is using 20- and 24-bit data converters and (temporarily, until DVD-Audio becomes common) dithering (vs. truncating) down to 16-bits.

Here is what is gained by using 20-bits:
* 24 dB more dynamic range
* 24 dB less residual noise
* 16:1 reduction in quantization error
* Improved jitter (timing stability) performance

And if it is 24-bits, add another 24 dB to each of the above and make it a 256:1 reduction in quantizing error, with essentially zero jitter!

As stated in the beginning of this note, with today’s technology, analog-to-digital-to-analog conversion is the element defining the sound of a piece of equipment, and if it’s not done perfectly then everything that follows is compromised.

With 20-bit high-resolution conversion, low signal-level detail is preserved. The improvement in fine detail shows up most noticeably by reducing the quantization errors of low-level signals. Under certain conditions, these course data steps can create audio passband harmonics not related to the input signal.

Audibility of this quantizing noise is much higher than in normal analog distortion, and is also known as granulation noise. 20-bits virtually eliminates granulation noise. Commonly heard examples are musical fades, like reverb tails and cymbal decay. With only 16-bits to work with, they don’t so much fade, as collapse in noisy chunks.

Where it really matters most is in measuring very small things. It doesn’t make much difference when measuring big things. If your ruler measures in whole inch increments and you are measuring something 10 feet long, the most you can be off is 1/2 inch. Not a big deal.

However, if what you’re measuring is less than an inch, and your error can be as much as 1/2 inch, well, now you’ve got an accuracy problem. This is exactly the problem in digitizing small audio signals. Graduating our audio digital ruler finer and finer means we can accurately resolve smaller and smaller signal levels, allowing us to capture the musical details. Getting the exact right answer does result in better reproduction of music.

A/D Converter Measuring Bandwidth Note
Due to the oversampling and noise shaping characteristics of delta-sigma A/D converters, certain measurements must use the appropriate bandwidth or inaccurate answers result. Specifications such as signal-to-noise, dynamic range, and distortion are subject to misleading results if the wrong bandwidth is used.

Since noise shaping purposely reduces audible noise by shifting the noise to inaudible higher frequencies, taking measurements over a bandwidth wider than 20 kHz results in answers that do not correlate with the listening experience. Therefore, it is important to set the correct measurement bandwidth to obtain meaningful data.

References

1 Nyquist, Harry, “Certain topics in Telegraph Transmission Theory,” published in 1928.

2 See Clive Maxfield’s book Bebob to the Boolean Boogie (HighText ISBN 1-878707-22-1, Solana Beach, CA, 1995) for the best treatment around.

3 A single +5 V supply is probably more common today, but this illustrates the point.

4 The name delta-sigma modulation was coined by Inose and Yasuda at the University of Tokyo in 1962, but due to a translation misunderstanding, words were interchanged and taken to be sigma-delta. Both names are still used, but only delta-sigma is actually correct.

5 Leung, K., et al., “A 120 dB dynamic Range, 96 kHz, Stereo 24-bit Analog-to-Digital Converter,” presented at the 102nd Convention of the Audio Engineering Society, Munich, March 22-25, 1997.

6 This section is included because of the confusing surrounding the term. However, it is noted that with the truly astonishing advances made in A/D converter resolution technology of the past two years, the need for dither in A/D converters has essentially disappeared, making this section more of historical interest. Dither is still necessary for word-length reduction in other digital processing.

7 Thanks to Bob Moses, Island Digital Media Group, for this great analogy.

8 From Pohlmann, Principles of Digital Audio, 3rd ed., p.44.

9 Historical Footnote: The reason the British divided up the pound into 16 ounces is not as arbitrary as some might suspect, but, rather, was done with great calculation and foresightedness. At the time, you see, technology had advanced to where 4-bit systems were really quite the thing. And, of course, 4-bits allows you to divide things up into 16 different values (since 24 = 16). So one pound was divided up into 16 equal parts called “ounces,” for reasons to be explained at another time. Similarly, the roots of a common American money term come from a simple 3-bit system. A 3-bit system allows eight values (since 23 = 8), so if you divide up a dollar into eight parts, each part is, of course, 12.5 cents. Therefore you would call two parts (or two-bits, as we Americans say) a “quarter” ... obvious.
------------------------------------------------------------------------

Candy, James C. and Gabor c. Temes, eds. Oversampling Delta-Sigma Data Converters: Theory, Design, and Simulation (IEEE Press ISBN 0-87942-285-8, NY, 1992).
“Delta Sigma A/D Conversion Technique Overview,” Application Note AN 10 (Crystal Semiconductor Corporation, TX, 1989).
Pohlmann, Ken C. Advanced Digital Audio (Sams ISBN 0-672-22768-1, IN, 1991).
Pohlmann, Ken C. Principles of Digital Audio, 3rd ed. (McGraw Hill ISBN 0-07-050469-5, NY, 1995).
Sheingold, Daniel H., ed. Analog-Digital Conversion Handbook, 3rd ed. (Prentice-Hall ISBN 0-13-032848-0, NJ, 1986).
“Sigma-Delta ADCs and DACs,” 1993 Applications Reference Manual (Analog Devices, MA, 1993).
The American Heritage Dictionary of the English Language, 3rd ed. (Houghton Miffin ISBN 0-395-44895-6, Boston, 1992).
Watkinson, John. The Art of Digital Audio, 2nd ed. (Focal Press, ISBN 0-240-51320-7, Oxford, England, 1994)

Digital Dharma of Audio A/D Converters