• 0

High THD at Analog Discovery 2 input.


Question

Hello. I have a problem with my Analog Discovery 2, and it's existing since i received it. I wanted to test the device parameters and simply plugged W1 output to 1+ scope input. Twisted 1+ and 1- cables and shorted 1- input to ground.  The measured NF is quite ok (but i thought it would be better) - it's around -91dBV. But THD is really high. I'm measuring a CABLE so there should be no distortion and I receive around -70dB dBV THD (so it's around 0,03%). The output waveform is 1kHz sine, amplitude of 2V. I use spectrum analiser with averaging on, I've set the highest range (50V) - using maximum range helped a bit but i'm still not there. The frequency range is 10Hz - 50kHz. Couple of screenshots should picture the problem. 

Are my settings wrong? Is waveform generator not precise enough? Is the input somehow clipping - if yes, why? Is Analog Discovery 2 simply not capable of measuring THD lower than -70dB? 

I also marked with light blue circle a lot of artifacts on the spectrum - what's that?!

Thanks for the answer and have a nice day.

 

 

wavegen.png

spectrumNF.png

spectrum-1khz-2v.png

Link to post
Share on other sites

13 answers to this question

Recommended Posts

  • 0

I can offer one possible reason for what you are seeing: 

The test signal is one cycle of a 1 KHz sine wave. For the spectrum analyser to "see" this as presented on the scope display, the entire waveform must fit exactly within the data record input to the spectrum analyser. However, the spectrum analyser record length, (number of samples), is probably of a length that does not contain only the entire waveform and no part of the wave before or after. This means that the actual waveform you are doing an FFT upon is a whole sine wave + some segment of either the next or the preceding sine wave or both. This may be the "Fourier glitch" you are seeing the results of within the blue circle.  The same glitch happens with any non-integer number of cycles within the FFT data set. The available windowing functions can help with this, but or course each different window has a different set of trade-offs.

Edited by P. Fiery
Link to post
Share on other sites
  • 0

Hi @P. Fiery

I don't think the windowing or non-integer periods cause the distortions. In think this mostly comes from the AWG.

In the below experiment BNC cable was used.

Here with with blue you can see the 1kHz signal which is not integer for the 204.8ms capture, 8192 samples at 40kHz.
The yellow has 1.024ms period which is exactly 200 cycles.
Both with the default "flat top" window :

image.thumb.png.0f5742fe771e76a2cf36e6f20f0eb72d.png

 

Here the pink is with window and yellow without window (rectangular).
The harmonics are the same, only the noise floor changes and the main lobe width, (resolution bandwidth):

image.thumb.png.b547feda1cad00a6fb215ccee886b068.png

 

Start and end of the 1.024ms period signal captured with 40kHz, 8192 samples.

image.thumb.png.59a6fabd6d54e9fd5e8cf23f1d83bd69.png

 

Here with blue you can see 1k sine generated with an expensive AWG. This shows more harmonic distortions than the AD AWG with yellow.

image.thumb.png.d7d24b1e4dacca6c9a576b44ad6922c4.png

Link to post
Share on other sites
  • 0

Attila, yes I see what you mean. The piecewise corner artifacts of an AWG, (or any other DAC for that matter), generate harmonics that are somewhat similar as a spectrum signature as a Fourier glitch produces, and of greater amplitude it seems.  I didn't think about the source of the sine wave when I gave my advice. (Which, Kkubik, is not wrong advice, but in this case it's not the main cause of what you see in the spectrum.) 

For audio work, it's hard to beat this ancient circuit realized with an excellent opamp:  (From Analog Devices LT1037 overview)

image.png.711b3506c65134b082cf00038917a565.png

This probably won't have any high harmonics to speak of; the 0.0025% should consist mainly of low-order harmonics due to the time constant of the lamp resistance. However as the AD2 has a 14 bit digitizer, the quantization noise floor limits the measurable THD floor and will create similar harmonic artifacts. This resolution can be further improved with other signal processing techniques applied both before and after the FFT. 

 

Link to post
Share on other sites
  • 0

>> However as the AD2 has a 14 bit digitizer, the quantization noise floor limits the measurable THD floor and will create similar harmonic artifacts.

Not sure if I'd sign that. When the used number of bits gets very low, quantization noise correlates with the signal, creating harmonic-like artifacts and I might inject dithering to decorrelate it. But with 14 bits and a reasonably set level, the quantization noise is white across the bandwidth, uncorrelated with the signal, uniform amplitude PDF. Good luck with DSP magic ...

Link to post
Share on other sites
  • 0

The ADC/DAC non-linearity can induce distortions, harmonics.

I think the 11-12 effective number of bits obtained from the 14bit DAC and ADC loopback is good, the best it can be obtained.

This corresponds to the specs in the ADC/DAC datasheet, so the attached circuitry, amplifiers in the devices do not deteriorate the signal.
https://www.analog.com/media/en/technical-documentation/data-sheets/AD9648.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/ad9714_9715_9716_9717.pdf

Link to post
Share on other sites
  • 0

The AD2 specs and overall circuit performance is excellent. A mathematically perfect 14 bit A/D would have exactly identical bit steps and a flat noise floor.  Delta sigma converters do have effectively identical bit steps, but currently they top out at about 10 MSPS.  The AD9648 appears to be a clever "successively approximating flash converter" running at 100 MSPS. It specs no missing codes, which implies it is monotonic but like all such converters, the actual size of each LSB step is not guaranteed to be the same. This means for example that a given LSB can represent a change of say 100 uV with the next step making up the difference with a 540 uV change, etc. The average step size can thus be 320 uV, (as I recall), but the individual steps can be uneven. The particular spectral signature this creates in the noise floor for a given input signal likely varies device to device, all within the spec though. There may be other factors at work too due to undisclosed details of the device, but looking at the AD9648 data sheet spectral examples with this in mind helps them make sense to me. All of this is way down below FS, and is really excellent. It is useful to at least have some approximate insight into why things look the way they do.  Similar real-world considerations probably apply to the DAC in the AWG.

Edited by P. Fiery
Link to post
Share on other sites
  • 0

Thank you guys for the input. I will try to understand all you are writing about, but so far i think i'm not wise enough to get it. Can you please simply tell me is it possible to measure THD as low as -80dB with AD2? And what causes a problem - built in generator or analyzer? Thanks.

Edited by kkubik
One more question
Link to post
Share on other sites
  • 0

Hi @kkubik

It looks like the AWG causes the minimal THD.

In this experiment I have generated the signal using the laptop sound card. Here only the 3rd harmonic is significant, -76dBV. The NF with averaging option is below -105dBV

image.thumb.png.eb32a61e2fba6de8ab49671cd980a401.png

 

In case you have good audio codec with line in, you could try the WaveForms application with sound card.
Note that this will be only AC input, limited frequency range, uncalibrated...
On my laptop I only have no line in, only mic, so the capture is noisy.

image.thumb.png.6446e9c6b7514ec10de77dc8b98f53b8.png

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now