Using audio line receiver for measuring stereo DAC with cheap ADC

1727186592231.jpeg
 
I expected to see the 'good' DAC, the 'not so good' DAC whose distortion you want to measure, and a 'bad' ADC in the sketch. I also expected an amplifier (a 'good' amplifier that adds less harmonics than the DAC you want to measure) with a gain that can be switched higher in the case where you are doing the fundamental subtraction. I assume the ADC is hidden behind 'Analog in', but I see only one DAC box, not two, with a total of four DAC outputs. I also see what I assume are three op-amps with (I guess) differential inputs, two of them fed by four DAC outputs, and one by the outputs from the first two op-amps. Where is the low distortion DAC that allows you to (mostly) only cancel the fundamental frequency out of the DAC you want to measure? Also, all your amps are listed with '-6 dB'. I don't see how that would allow you to gain signal level for the harmonics you want to measure after the cancellation of the fundamental.
 
Last edited:
I understand the idea, but how to decide that the good DAC is good enough when having only a bad ADC? Especially when harmonics have phases shifted and their vector subtraction can actually increase the resultant amplitude? IMO the standard measurement method with notch filter is OK - REW pre-measures the notch params automatically and compensates its effect during the measurement, reconstructing original amplitudes and phases of all FFT bins.
 
An ADC is mostly bad if it is heavily loaded. Much better if the signal is -20 and less. So if one can cancel the fundamental but not the harmonics then the harmonics are easy to measure. And the measurement can be swept or gain changed with REW.
But then you need a clean fundamental that can be synced with the dac that you want to measure.
Notch is great but a movable notch is not that easy to implement.
 
Clean fundamental can be achieved with expensive DAC, phofman method of filter and number crunching or maybe another method?
I tried to use the setup to cancel 2.nd, 4.th and 3.rd harmonic. More diffcult to make it moveable in frequency, but at least it can be low in the lows of the combfiltered 3.rd harmonic.
 
It may also be possible to remove distortion on output A by using phofman method on output B. Then using those correction values on output A. It will not go down to -144 but maybe go down -10 dB? Then measurement and calibration can be continious
Post #50 and #54
 
Last edited:
Also, all your amps are listed with '-6 dB'. I don't see how that would allow you to gain signal level for the harmonics you want to measure after the cancellation of the fundamental.
Thats the differential BB INA2137 I've got. They are -6dB.
I do not need to gain signal level of the harmonics. If the fundamental is redused before the ADC the ADC will distort way less. (Until the -60 dBFS distortion is reached) - 18 dBFS and lower in this example
1727205299703.png
 
But then you need a clean fundamental that can be synced with the dac that you want to measure.
Yes, but clean and synced are VERY tough requirements.
It may also be possible to remove distortion on output A by using phofman method on output B. Then using those correction values on output A.
If you already have a clean sine signal, you can use it to directly measure ADC distortions and compensate them digitally, just like the DAC distortions.

Also the differential stage introduces its own distortions which may not be negligible.
 
Thats the differential BB INA2137 I've got. They are -6dB.
I do not need to gain signal level of the harmonics. If the fundamental is redused before the ADC the ADC will distort way less. (Until the -60 dBFS distortion is reached) - 18 dBFS and lower in this example
View attachment 1359963
Right right right, because the fundamental that would create the harmonics is suppressed. You would only need the extra gain if you were worried about noise.
But I still don't see the 'good' DAC. If all the DACs are the same, then you are subtracting as much harmonics as you are subtracting fundamental. And that still leaves the clock and phase alignment problem that phofman mentioned to be dealt with.
So, which of the two DACs (I assume the paired outputs are just differential outputs from the same DAC, not really separate DACs) is the good one, if they are all sitting in the same box?
 
For my setup I need to differenciate two and two outputs to get a somwhat nice sine and low noise. But with better dac and software for DSP you could just use L channel to correct R chanel. Then you also only need one differential amp
 
If you already have a clean sine signal, you can use it to directly measure ADC distortions and compensate them digitally, just like the DAC distortions.
But can you do it in real time. At the same time as you are doing a sweep?
My understanding was that you could compensate for one level and frequency then use those values to measure one level and frequency
No need for differential amp of course.
 
I was inspired by the combfilter of the 3. harmonic to investigate that a little further. Now using onlo channel 0. So single ended into the two -6dB stages.
Found the level of 3.rd harmonic at -3 dB signal generator out. Generated" the same" level of syntetic 3.rd harmonics and had a digital differantiator.
The delay of the syntetic 3.rd harmonic was set to 13 samples at 96kHz sampling freq.
Guess what. first dip at around 1 k
Then I maxed out FFT with and repetitions.
Was able to lower 3.rd harmonic about -15 dB when averaging.
Of cource about 6dB higher 3.rd harmonic when no cancelling occurs
1727452628304.png
 
But can you do it in real time. At the same time as you are doing a sweep?
My understanding was that you could compensate for one level and frequency then use those values to measure one level and frequency
That is true, the dynamic compensation of harmonics simply generates sine waves at same amplitude and opposite phase as the measured distortions. While the distortions can be pre-measured at various frequencies and levels and vector-interpolated between these points, it would take many pre-measurements for a frequency-sweep measurement.

Yet IMO the very same issue applies to the method which subtracts a clean synchronous fundamental - how would you generate a distortion-clean and synchronous frequency-swept fundamental?
 
Post number #44 #45 and #46 try to mimic that case.Its a
  1. Codec card without filter that distort way less, clean fundamental
  2. Codec card with filter that distorsts, DUT
1 and 2 are daisychained via ADAU DSP. ADAU can send SPDIF on input directly to output with ultralow latency

Think I should remeasure that setup with more resolution/averages

1. could also be one of the -120dB thd DACs that is no longer that expencive. But I do not have one, yet. A spdif splitter would be needed for same input signal to 1and 2.
 
Last edited:
I also speculate if 1 could be channel b if chanel a is DUT. But think there must be some tinkering of chanel b if that should work. The harmonics must be phase changed or somthing on 1 to not cancel the distortion of 2.
Do not now an easy way to do it without FIR and analyzing the fundamental. Maybe there are some trick in the book?
 
2. and 4. is cancelled quite good with balancing. 3.rd can be cancelled with method in #76. But I lack a way to adjust the delay of the syntetic 3rd harmonic, based on the fundametal frequency or the projected estimated value.
I believe the dB value of the third at a frequency can be premeasured.
My measures on my DACs are pretty stable THD dB values up to 1 k. Then they start to rise at different gradients