Quantization Noise

If the bull ain't stoked it don't matter how good the cowboy, he ain't gonna get much of a ride.

I heard this aphorism at our local rodeo this year, after witnessing a particularly disappointing ride by a highly rated rodeo star. The bull popped out of the chute, stopped, looked around, and carried his ride straight to the feed pen at the far end of the arena. No jumping, no thrashing. It did not matter how much the rider kicked and hollered, that bull wanted only one thing—the sweetened corn waiting in the feed pen just outside the arena.

That happens all the time, which is why bull-riding events are scored half for the skill of the rider, and half for the tempestuous nature of the bull.

Life often benefits from the interplay of two good elements, like Laurel and Hardy, Crosby and Hope, or piano and bass. The list goes on forever.

This summer I have been involved in a ying-yang project with local metal sculptor Bernie Hosey. He likes to make art, and he likes it BIG. Working together, we invented a way to cut templates from 1/2" thick steel plates, cold-press the templates into convex sections (this requires a BIG press), and then tessellate the sections together to form huge, perfect, metal spheres.  Here are some photos of our work from last fall. These little monsters measure about 36 in. across. The biggest ones Bernie has made to date are about 9 feet in diameter.

My technical topic today concerns the measurement of very low levels of analog distortion, something that requires two complementary things: a very good source and a very good instrument for signal detection.

The application at hand involves a 12-bit ADC. Jayaram plans to apply a pure sine wave carrier to the ADC input and then store the resulting sampled data stream. Analysis of the sampled data will tell him how well the ADC is performing.

Imperfections in the ADC quantization levels should show up as spurious harmonics in the sampled data. In this test, it is extremely important that the source waveform not contain its own spurious harmonics. Unfortunately, Jayaram has only an Agilent 33250A Arbitrary Waveform Generator for a source, so he plans to follow that source with a linear, low-pass filter to knock down the level of spurious harmonics.

Quantization Noise

Jayaram, working for Ittiam Systems of Bangalore, India writes [edited]:

My mixed signal board contains a 12-bit ADC operating at 80MHz.  I am characterizing the performance of this ADC. I am are using three pieces of equipment:

  • Agilent signal generator (33250A)
  • A low pass filter (TTE LE1182-10M-50-69B, 10MHz, Elliptical)
  • Tektronix Scope (TDS7104)

To check the signal purity of the source input that I plan to use for testing this ADC, I first set the signal generator to create an 8MHz sine wave. This signal I pass through the filter, and on to my scope. I capture waveforms through the scope and analyze them using a Matlab script. 

Here is my problem: I am getting a SINAD measurement of only 45 to 50dB with the filter in the path. [Ed note -- SINAD is the ratio of total signal power to the sum of power in all the spurious harmonics; the bigger the SINAD the better the quality of the measured signal.]

With the filter not included in the path (Agilent 33250A straight into the scope) I am getting the same range of SINAD. The script used for measuring the SINAD is per the IEEE 1241 standard that suggests a 4-parameter sine wave fit algorithm.

Could you clarify for me the following?

  1. Since I do not have any reference figures to compare with, how do I know that the SINAD I am getting is correct?
  2. Why is the SiNAD measurement with and without filter the same?

Thanks and regards, 
Jayaram

The Tek. TDS7000 series scopes have only an 8-bit A/D converter. If you turn on the vertical averaging mode they claim to achieve an 11-bit accuracy, but you would need to average hundreds (or thousands) of waveforms to gain this advantage.

The resolution of that scope is just not adequate for measuring distortion in test signals for a 12-bit A/D application.

You can check out the impact of the scope A/D resolution by changing the vertical scale on your oscilloscope. First, establish a signal level that gives you full-screen amplitude on your scope and measure the signal distortion. Now change the vertical scale on your scope so the same waveform occupies only half the screen. The signal now exercises only half of the A/D quantization levels in your scope. Relative to the signal, you now have only half the A/D resolution. If scope resolution is a problem, this test magnifies it.

If the vertical-gain experiment changes your measured results by 6 dB, it is a sure sign that you are measuring mostly just distortion inherent to your scope, not distortion in your source signal.

Best Regards,
Dr. Howard Johnson

Dear Dr. Johnson,

Thank you very much for your reply. I checked the impact of the scope A/D resolution by changing the vertical scale in the scope.

Following are my results.

  • With 1V/Div and 16 waveform Average acquisition, SiNAD = 37.178dB
  • With 115mV/Div and 16 waveform Average acquisition, SiNAD = 53.873dB
  • With 1V/Div and 10,000 waveform Average acquisition, SiNAD = 40.160dB
  • With 115mV/Div and 10,000 waveform Average acquisition, SiNAD = 60.55dB

Since an 8bit A/D Scope with all the options set for highest resolution seems not sufficient to analyze the purity of the test signals for my 12-bit ADC, could you please suggest any other instrument? Would a spectrum analyzer work better?

Dear Jayaram,

Wow! Changing the vertical gain made a HUGE difference in your measured noise. That was a sure sign that the A/D quantization levels in your scope were definitely limiting your measurements.

A good spectrum analyzer will do substantially better. These instruments have a dynamic range on the order of 80 to 100 dB, as compared to only about 48 dB for the 8-bit ADC in your scope. That means they can see tiny levels of distortion at one frequency superimposed on top of a large main carrier.

If you must continue using the scope, let's think about how averaging works. The averaging feature reduces the *uncorrelated* noise power according in proportion to the number of waveforms averaged.

For example, when you increase the number of waveforms averaged from 16 to 10,000, the noise-canceling improvement (taken as the ratio of the noise power in the 16-waveform average compared to the noise power in the 10,000-waveform average) should work out to:

                                 10*log(10,000/16)=28 dB

In your data, looking at the 115 mV/div experiments, you obtained a benefit of only 7 dB when you increased the number of waveform acquisitions from 16 to 10,000.

This clue tells me that the spurious noise in your signal must be correlated with the signal. If it had been uncorrelated, it would have averaged out. Since it did not go away, it must be correlated.

The most likely source of correlated noise has to do with how you synchronize the trigger on the scope. If you trigger the start of scope acquisition from the waveform itself, then you may simply be recording the same series of 8-bit, heavily quantized samples every time through the waveform memory.

This sort of distortion never averages out (it's the same every time through). Averaging only helps if your scope records different samples on each waveform. Some scopes free-run the sample head, so that the exact starting position of each track is uncorrelated with your signal, and then compute the "effective" trigger point after-the-fact, interpolating between samples. This is a nice feature, and it helps with averaging.

Another issue with noise correlation has to do with the relation between the frequency of your signal source and the frequency of acquisition. Do not let these frequencies be integrally related. If they are locked together, you may see peaks in the computed spectrum that look like harmonics of your signal, but are not. Suppose, for example, that in your setup the source rate were 8.000000 MHz, and the scope sample rate 1.00000 ns. This combination produces exactly 125 samples per period, in a repeating pattern. The pattern of quantization errors in each cycle repeats every 125 samples. Harmonics of the quantization error waveform, since it repeats at the same rate as the signal waveform, line up with the signal harmonics.

Better to offset the source rate to, say, 8.031415926 MHz. Now the scope records each cycle of the waveform with a slightly different initial phase. The quantization errors do not repeat. You will see the same total quantization noise power either way, but with an offset source frequency, the quantization error power spreads out into a flat carpet of noise, rather than aggregating into bothersome peaks.

Some day you may find yourself stuck triggering on the same waveform the same way every time. In that case, adding a little bit of very well-distributed white noise can sometimes jiggle your sampling circuit into producing different results each time, results that average out beautifully. This technique de-correlates the quantization noise from your signal, but raises the carpet of white noise spread out under your entire measured spectrum.

I used this idea in the sub-band coding schemes I designed for Phonemail, the first integrated voicemail system. When quantizing a signal band with only one or two bits, the quantization noise becomes highly correlated with the input signal. For some relatively pure signal types, like singing, the distortion becomes quite noticeable. Adding a little white noise before quantization (and then digitally subtracting it on the downstream side of the quantizer) de-correlates the quantization noise from the input signal, changing the perceived "distortion" into a less objectionable, general level of background hiss.

The usual procedure adds white Gaussian noise with a standard deviation equal to a couple of quantization levels. Of course, in your case you may have no way to produce an adequately flat, calibrated white noise source. As an educational experiment, you might try adding a sine wave, uncorrelated to the signal under test. The addition must be done in analog fashion before it goes into the scope, and you must still have access to the original, unmodified signal to use as a trigger. You may need to do the averaging in MatLab, as I don't know how many fractional bits of precision the scope retains when doing averaging. This sounds pretty complicated, and it is. You are better off using a spectrum analyzer.

Last, I should point out that whatever you do, you are stuck with the fact that scope A/D levels are not terribly precise. They will be monotonic, occurring in strict sequence with no crossovers, but you cannot count on every level to be exactly halfway between adjacent levels. When Tek claims that their 8-bit A/D can give you "11 bits" of precision using averaging, that tells you that the quantization levels are, on average, accurately placed only to within about one part in 8 of their correct levels. A misplaced level produces noise correlated with your sine wave source, something that can never truly be averaged away.

You know what I am going to say next: get a spectrum analyzer.

Best Regards,
Dr. Howard Johnson