[LogoShip]

Home

Daqarta for DOS Contents

Introduction

Downloads

Free Registration

Contact Us
Daqarta for DOS
Data AcQuisition And Real-Time Analysis
Shareware for Legacy Systems

From the Daqarta for DOS Help system:
 

DISTORTION MEASUREMENT:

To analyze the distortion products, harmonic or inharmonic, produced by a system or device under test, you must first insure that the stimulus signal itself does not contain these same products. If it does, then they must be accounted for when viewing the output of the test system.

Connect the stimulus signal directly from the source to the input of the ADC board (with suitable attenuation, if needed) and observe the spectrum. You will need to use a window function to reduce FFT leakage skirts unless you carefully adjust the source frequency. Otherwise, the skirts may be much larger than the distortion components you are seeking. If you are using STIM3A to generate tones, the StepN option allows locking the tone frequency to a single spectral line without need for windowing.

Use FFT32 mode for best resolution of low-level components. If you see unintended frequency components at levels above the noise floor, you know there is a problem with the source or with the ADC board. Although ADC problems are not common, sound cards in particular often have gain stages ahead of the ADC that may exhibit saturation effects. In any case, if you can determine the source of the distortion you may be able to deal with it.

If your stimulus is a single sine wave frequency, you can try substituting with a lower-distortion source and see if the spectrum improves. If you can't obtain such a source, there are some other tricks you can try: Reduce the signal with a passive attenuator before feeding it to the ADC board. You can use a simple voltage divider made of 2 resistors:

 Source >---- R0 -----.--------------> To ADC
                      |
                      Rg
                      |
    Gnd >-------------^--------------> Gnd
If both resistors are equal (10 kohms is a good value), the signal will be cut in half (-6 dB). If the distortion is coming from the source, it should now be reduced along with the signal by the amount of the attenuation. If it is not reduced that much, the ADC board is clearly at fault and is showing the equivalent of crossover distortion. But if it IS reduced that much, the board can't be ruled out yet, since any saturation-type nonlinearity would be expected to produce less distortion at lower levels.

A much more elegant and effective test is to measure the intermodulation distortion of the ADC board, since any system nonlinearities will show up there. This test requires two separate sources, which you may already have if you were going to measure IM in the test system anyway.

The beauty of the IM test is that it is easy to create a signal with essentially NO intermodulation distortion, even if the individual sources have relatively high harmonic distortion. The trick is simply to add the two sources together linearly, which you can do with a simple passive resistor network:

   Source 1 >--- R1 -----.--------------> To ADC
                         |
   Source 2 >--- R2 -----|
                         |
                         Rg
                         |
        Gnd >------------^--------------> Gnd
You can use 10 kohms for each resistor... the value is not critical. Since resistors are very linear devices, they will create essentially NO difference tones. And it doesn't matter how much HARMONIC distortion is present in each source, since that won't affect the INHARMONIC distortion which only arises when one tone interacts with another in a nonlinear system.

The two sources can be external oscillators, sound card synthesizer outputs, or STIM3A DAC outputs. You can use one DAC and one external oscillator, etc. STIM3A allows the StepN option to insure that both DAC output frequencies (and hence all distortion products) will fall exactly on spectral lines for easy measurements or low-level components.

The level of each source alone should be high, but within the ADC range. The resistor network with all values equal cuts each signal to 1/3 as it combines them, which insures that the sum will never exceed the ADC input limits.

Set the two source frequencies such that difference tones will be easy to spot. For example, if the sources are at 500 and 700 Hz, the quadratic difference tone would be expected at 700 - 500 = 200 Hz and the cubic at 2 * 500 - 700 = 300 Hz. Neither of these is a harmonic multiple of 500 or 700 Hz, so if they are present they will stand out clearly from any harmonic distortion in either source.

On the other hand, if the sources were at 500 and 1000, the quadratic difference tone would fall at 1000 - 500 = 500 Hz and would thus be covered by the source tone, while the cubic would fall at 2 * 500 - 1000 = 0 Hz and would be hard to tell apart from harmless DC offset. In addition, all the upper difference tones would be 500 Hz apart and would thus fall on harmonics of the inputs.

There is an additional precaution: If either source tone has harmonics (or harmonic distortion components generated by the ADC board) that exceed the Nyquist frequency, then when they are reflected down by aliasing they could end up at the same locations as the difference tones you wish to monitor. To check for this, first view only one source at a time and look for unexpected peaks.

For example, if one source is 7000 Hz, it could have harmonics at 14000, 21000, etc. If the sample rate is 20 kHz, a 14000 Hz component is 4000 Hz above the Nyquist reflection point and will thus land at 10000 - 4000 = 6000 Hz, while a 21000 Hz component will be reflected first at 10 kHz and then again at 0 to land at 1000 Hz. If you check each source separately and neither alone produces components at the difference frequencies, then proceed to turn them both on at once and look for intermodulation.

Alternatively, if you are using external sources or the built-in OPL3 synthesizer sources from a sound card, there is a simpler test for harmonics capable of interfering with intermodulation measurements: Apply both tones, then vary the sample rate and see what happens. Source and difference tones will be unchanged in frequency (though of course the frequency scale is changing, so they will move in unison on the screen), whereas any reflected harmonics will move independently.

NOTE
You can't do this when using STIM3A sources, since when you are changing the sample rate there is no automatic recomputation of the waves in the output buffer until you go back to the STIM3A control menu. The output frequencies will thus track changes in sample rate, and the display will appear unchanged.

One more potential problem: A source with a poor output stage might generate intermodulation via leakage from the other source back through the resistor network. If you see difference tones and this is suspected, try raising the level of one source and cutting the other by a comparable amount, so that the total signal to the ADC input is unchanged. If any measured distortion product increases or decreases by the same amount, then the problem was in one of the sources... the one whose level was changed in that direction.

Otherwise, if the sources are OK and the new overall level is the same, any distortion arising in the ADC board should not change much. (This test and much more on the measurement of nonlinearity in ADCs was detailed in an article by Rathmell, Scott, and Parker in the October 1997 Journal of the Audio Engineering Society.)

If you see actual difference tones from these tests, you can assume that there is intermodulation in your ADC or some input stage on your board. If the distortion is smaller than what you are trying to measure in the test system, this may be acceptable. If not, try cutting both source levels (or the board sensitivity) in half. If that causes the distortion to drop by substantially more than 6 dB, you may still be able to use the ADC board with careful attention to input levels. Otherwise, you may need to consider a new board.

If a new board is not an option there are "exotic" ways around this problem. They are cumbersome by comparison, but they illustrate general concepts for squeezing the maximum resolution from a measurement system.

GO:

Questions? Comments? Contact us!

We respond to ALL inquiries, typically within 24 hrs.
INTERSTELLAR RESEARCH:
25 Years of Innovative Instrumentation
© Copyright 1999 - 2006 by Interstellar Research