Post Go back to editing

A Poor Engineer's Distortion Analyzer

    Yes, there are poor engineers.  Where I work audio is a sideline, so we do not yet have a dedicated distortion analyzer.  I've been toying  with buying a used one on eBay, but it's interesting to see what can be done with just a ADAU1701 evaluation board and SigmaStudio.

    As shown, this signal flow drives the device under test with a 1000 Hz tone.  In turn that device outputs the tone along with harmonics and noise.  The ADC samples this and the DSP notches out the tone, leaving the rest.  Then it's compared with the tone level to calculate:

THD+N %  = 100 * ((Distortion + Noise) / (Signal + Distortion + Noise)

     Accurately reading the signal and the noise requires true RMS measurements.  SigmaStudio has some RMS-responding blocks, but they're described as "approximate".  Thus my distortion analyzer uses built-from-scratch RMS to DC converters.  These converters are quite noteworthy in themselves -- they employ an implicit method I shamelessly lifted from the venerable AD636 analog RMS-DC converter IC.  That chip is still around after 30+ years because it works so well!  A snippet from its data sheet explains implicit RMS conversion:

    This analyzer is of course limited by the -1701's own THD.  A direct connection from DAC out to ADC in reads 0.007%, so under ideal conditions you can measure down to about 0.01%.  Ideal conditions mean keeping the -1701's input and output levels near, but not right at, their maximums.  Thus you may need to improvise pads to operate your tested device at its desired levels.  Also I recommend running SigmaStudio on a laptop under battery power.  Finally, note that the sine wave output (from the DAC) is common grounded to the analyzer input (the ADC).  Thus, bridged power amplifiers could only be tested one side at a time.  It may be possible to use both input ADCs in a differential mode, but this was not tried.  Of course you'll definitely need some serious external attenuation to route that output into the -1701.   If you use a separate pure 1KHz source, you'll need to tune it carefully (as with the old analyzers I've seen on eBay).

    A PA mixer (not studio quality) tested with this analyzer measured 0.04% distortion normally, and 0.05% when driven into compression.  It always sounded OK to me, but now I know exactly how it performs!

Message was edited to include note on common-ground.

Distortion-meas.dspproj.zip
  • Hello Bob:

    Thank you again for your work.

    I am working on the design and benchmarking the performance of this D.A..

    On a related note, are Gerber files of the 1452 eval board available?

    Thank you,

    Tom

  •      Hi Tom,

         Judging from this thread:

    https://ez.analog.com/message/179869#179869

    AD has been willing to provide these in the past.  Try starting a new similar thread and see what happens.

         I'm using the PEDA as we speak, as where I work we have a new mixer prototype and nothing else with which to test it!

         Best regards,

         Bob

  • Bob:

    Thanks!  I trust the PEDA is giving satisfactory results!

    TomC

  •     Having some recent use for this project, I added a few features:

    • Differential input and output
    • Headphone output to listen to the filtered distortion products
    • Approx. A-weighting filter
    • A display of the first five harmonic amplitudes

         The latter is modeled after a simple RF spectrum analyzer, not around the -1452's FFT capability (which no one seems to know how to use anyway).

        As you can see above, the mixer I was checking out has just under 0.1% THD+N.  At left, the harmonics from 2nd to 5th are shown.

    Distortion-meas_1452-loaded.dspproj.zip
  • Hi Bob, thanks again for sharing this with us!

    Really interesting to have the ability to monitor the distortion product.

    @ADI I would like to see some documentations around the FFT functionality

  •     Heidi,

         Thanks for your appreciation!  I found that listening to the THD+N products is fascinating as well.  It sound nothing like the pure tone input!  And it may provide a clue to the distortion's origin.

         I notice in your schematic a distortion reading that's lower than the residual readings I get by routing the tone output directly back to the analyzer input.  Which DSP are you using?

         Best regards,

         Bob

  • Bob,

    it is a prototyp around the 1452.
    In case it sounds like the pure tone input, maybe it is related to a psychoacoustic effect (missing fundamental) and of cause a  good harmonic distortion spectrum.

    Mine does not sound like the pure tone input, you can hear the 3k if you rise the multiplier. But in this case, the overall noise is dominant and the 3k is in the background. The measurement was taken by a "normal" desktop pc, so maybe there is some influence.

    Best regards,

    Lasse

  • This was the DUT. Next stepp is to test a distortion analyzer based on a sharc+.

  • Nice looking prototype!  And its performance appears to exceed that of a stock -1452 board.

    Bob

  • Thanks Bob Slight smile

    It utilized a ADC/CS5381 and DAC/CS4398 in differential configuration. Clock is a crystek cchd at 24,576mhz with a clock distribution buffer. All mlck inputs a driven by a single low phase noise clock.

    The THD+N must be near/equal to the specs, but i have no acess to an analyzer that is able to measure it, and like the topic, I‘m not able to afford an AP/R&S with adequate performence.

    Maybe today i would choose a different ADC/DAC, but it is still not that simple to beat their specs.