• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Using Cross Corelation to lower influence of ADC for DAC measurements

@JohnPM
@Rja4000
@nanook



Hello John

I develop my own measurement scripts.

With the help of fr Rja4000 and nanook we
started a discussion on

"Using Cross Corelation to lower influence of ADC for DAC measurements"

I implemented this feature that I discovered on
an explainer of a Quantasylum analyzer that implements it.

I think that a little interest has emerged on this feature.

I left in the first of this discussion the sources
"octaves" to perform tests .. FFT, weighting windows,
calculation of THD and launch and calculation of the correlation + graph of
result.

Maybe you are reading this discussion.

I would like you to give us your opinion on this.

Of course, you are free to implement it, but, I think, that there are
people who would already like to use it and the validate.

Thanks if you can spend some time for this expertise.

Sincerely

I leave Rja4000 and nanook in copy
 
I don't think you quite have the hang of the conversations system :), but in any case I have added cross-correlation averaging for the next REW beta build, probably this weekend. It uses the reference channel as the second input. When the noise floors of the inputs are dominated by uncorrelated zero mean noise sources the benefit is larger than might be expected from 5*log10(n), but trying it out on a few interfaces I have lying about suggests the gain is more typically much smaller than one might expect.
 
I don't think you quite have the hang of the conversations system :), but in any case I have added cross-correlation averaging for the next REW beta build, probably this weekend. It uses the reference channel as the second input. When the noise floors of the inputs are dominated by uncorrelated zero mean noise sources the benefit is larger than might be expected from 5*log10(n), but trying it out on a few interfaces I have lying about suggests the gain is more typically much smaller than one might expect.

Curious to see what you're seeing, John. Here's a test with E1DA ADC, 64 averages, blue is averaged left channel, red is cross-correlated left and right.

SMSL DO300 DAC right channel feeding both ADC inputs with a splitter cable. The difference appears a bit more than 5*log10(n) would predict, about 12dB. I'll have to double-check why... :)

1722982452023.png
 
Curious to see what you're seeing, John.
If I add uncorrelated noise to the input data even a couple of averages will bring it down more than 10 dB and eventually it will settle below the unaveraged noise floor of the device. In the absence of added noise the reduction for some interfaces I have tried was only a couple of dB, but that may simply mean that the output is noisier than the input so the input noise isn't the limiting factor. I'll try some other interfaces tomorrow.
 
I don't think you quite have the hang of the conversations system :), but in any case I have added cross-correlation averaging for the next REW beta build, probably this weekend. It uses the reference channel as the second input. When the noise floors of the inputs are dominated by uncorrelated zero mean noise sources the benefit is larger than might be expected from 5*log10(n), but trying it out on a few interfaces I have lying about suggests the gain is more typically much smaller than one might expect.
Good morning, John

Yes I am new to ASR and I do not master
not yet the conversation system.

Anyway, thank you for watching, on behalf of everyone.

There are people who will be happy.

regarding the 5*log(n) noise reduction formula
it is true (in measurements) for noise differences relatively
low between DUT and ADC. As what we can see
in our measurements.

Example DAC noise -125dbFS and ADC noise at -120dbFS

I left several graphics throughout the discussion
regarding this noise reduction.

I republish here the noise reduction by correlation
between a 1000Hz signal and a 1000Hz + 2000Hz signal
all frequencies having the same amplitude.

The 2000 Hz signal is considered noise.

The first correlation drops the 2000HZ more
of 100dB.

If we add other correlations we enter the
reduction of 5*log(n) .

This first correlation varies in noise reduction
with the weighting window, but I don't know why.


You can try it with the window
flat top HFT248D which I consider to be the most precise in amplitude
and which has the lowest noise floor I know.

the equation is in my FFT calculation script.

And then make the difference with a Blackman 7.

I think the difference in amplitude precision on windows
modifies the result of the correlation, but it must
prove .

Apologies regarding the frequency scale presented here
I had an octave Bug, the 2 frequencies are 1000Hz and 2000Hz.

As I said throughout this discussion, it is still necessary
take the equation 5*log(n) with watchful eyes.

In any case I repeat my thanks for watching.

Sincerely
 

Attachments

  • Correl-2-sinus.png
    Correl-2-sinus.png
    55.3 KB · Views: 32
Curious to see what you're seeing, John. Here's a test with E1DA ADC, 64 averages, blue is averaged left channel, red is cross-correlated left and right.

SMSL DO300 DAC right channel feeding both ADC inputs with a splitter cable. The difference appears a bit more than 5*log10(n) would predict, about 12dB. I'll have to double-check why... :)

View attachment 385026
I try it , with a D50III in same condition as you , with Hanning window i suppose .
64 correlations
and retrun the result ASAP
 
Curious to see what you're seeing, John. Here's a test with E1DA ADC, 64 averages, blue is averaged left channel, red is cross-correlated left and right.

SMSL DO300 DAC right channel feeding both ADC inputs with a splitter cable. The difference appears a bit more than 5*log10(n) would predict, about 12dB. I'll have to double-check why... :)

View attachment 385026
I think the correlation calculation
is not good, I leave my measurements here
with the Topping D50III with 64 correlations.
So an ADC noise reduction log10(64)*5~ -9db

Concerning the window I took a BH7

Is also having a noise floor correlation of
-170db FFT, this means that your DAC has a noise
residual of -170db FFT at least -> ????
I assume you are in 48KHZ 32K samples or near
 

Attachments

  • NormalFFT.png
    NormalFFT.png
    38 KB · Views: 39
  • CorrelFFT.png
    CorrelFFT.png
    40.6 KB · Views: 41
  • Normal+CorrelFFT.png
    Normal+CorrelFFT.png
    52.3 KB · Views: 39
I think the correlation calculation
is not good, I leave my measurements here
with the Topping D50III with 64 correlations.
So an ADC noise reduction log10(64)*5~ -9db

Concerning the window I took a BH7

Is also having a noise floor correlation of
-170db FFT, this means that your DAC has a noise
residual of -170db FFT at least -> ????
I assume you are in 48KHZ 32K samples or near
Those measureme,nts are with balanced output, 48kHz, -1dBFS DAC level, 20kHz BW and un-weighted, correct ?
Or is that A-weighted ?

I'll try to replicate the exact same with the APU notch, for comparison.
 
If I add uncorrelated noise to the input data even a couple of averages will bring it down more than 10 dB and eventually it will settle below the unaveraged noise floor of the device. In the absence of added noise the reduction for some interfaces I have tried was only a couple of dB, but that may simply mean that the output is noisier than the input so the input noise isn't the limiting factor. I'll try some other interfaces tomorrow.
In principal the noise of the individual ADC channels should be 100% uncorrelated (resistor noise, voltage and current noise of the OpAmps, ADC noise). In case a considerable amount of noise enters e.g. via a noisy supply line or reference voltage, the noise on the two channels will be partially correlated and will thus only be partially reduced by Cross-correlation.
For sure this should not be the case for a properly designed unit.

(I once had an audio-interface where the microphone phantom power was the dominating noise source, once the source impedances at the differential input were not matched.)
 
Those measureme,nts are with balanced output, 48kHz, -1dBFS DAC level, 20kHz BW and un-weighted, correct ?
Or is that A-weighted ?

I'll try to replicate the exact same with the APU notch, for comparison.
Hi Rja4000

The measurements are (A weighted) it is
indicated in small at the bottom left of
my graphs .

Concerning DAC Scaler and ADC

DAC caliber 5V
Out -0.5dB
Scaler 0dB
ADC caliber 4.5v

If you measure with REW take AES17 2015 standard Notch
to have the same THD+N notch filter .
 
Last edited:
In principal the noise of the individual ADC channels should be 100% uncorrelated (resistor noise, voltage and current noise of the OpAmps, ADC noise). In case a considerable amount of noise enters e.g. via a noisy supply line or reference voltage, the noise on the two channels will be partially correlated and will thus only be partially reduced by Cross-correlation.
For sure this should not be the case for a properly designed unit.
There will always be some common correlated stuff in the noise, like induced mains hum, supply noise etc.

But I think this common noise should cancel out in the cross-correllation process(??) if we use the inputs out of phase (with a proper splitter cable) and invert one aquisition channel.
It also would reduce some even order distortion.
A 10..20dB reduction of common noise would be quite worthwile.

@JohnPM , would it be possible to add a "invert" button for one of the channels? Would also be nice for a baseline null check with a regular splitter cable, using the pseudo-balanced input feature . Thinking that to the end, a gain fine-trim (for one channel would be handy to get deepest null there.

As for real-life testing, may I suggest a passive source with very low source impedance (like a small pickup coil terminated with a big cap to form a bandpass, pickung mains hum or the signal from a field coil)?
Or when using a DAC as source one could divide down the output with a low-valued resistor divider to bring down the source noise well below the ADC noise.
 
@JohnPM , would it be possible to add a "invert" button for one of the channels? Would also be nice for a baseline null check with a regular splitter cable, using the pseudo-balanced input feature . Thinking that to the end, a gain fine-trim (for one channel would be handy to get deepest null there.
If you mean that it already exists:

invert.PNG
 
I think the correlation calculation
is not good, I leave my measurements here
with the Topping D50III with 64 correlations.
So an ADC noise reduction log10(64)*5~ -9db

Concerning the window I took a BH7

Is also having a noise floor correlation of
-170db FFT, this means that your DAC has a noise
residual of -170db FFT at least -> ????
I assume you are in 48KHZ 32K samples or near

Just realized that the screen shot I posted was comparing cross-correlated vector average to a non-vector average, which likely explains the larger (relative) noise floor reduction.

I used 48k signal, 128k FFT size, and Chebyshev 200 window. A -170dB visual floor in an FFT isn't the noise floor of the device. You need to sum up the noise contribution from all the FFT bins to measure the actual noise level. This DAC, as previously measured, has about a -130dB noise floor (unweighted) and a THD+N of -127dB at 1kHz/0dBFS.
 
There will always be some common correlated stuff in the noise, like induced mains hum, supply noise etc.

But I think this common noise should cancel out in the cross-correllation process(??)
I was talking about a partially correlated noise in the inputs of the ADC used with cross-correlation.

You are talking about common mode noise, right? Everything that shows up correlated at the two inputs (e.g. hum due to gnd- loop when measuring at an RCA output) will not be suppressed by cross-correlation. It's part of the signal.
 
You are talking about common mode noise, right? Everything that shows up correlated at the two inputs (e.g. hum due to gnd- loop when measuring at an RCA output) will not be suppressed by cross-correlation. It's part of the signal.
But correlated means identical phases for the frequency component in question. Flipped polarity in on channel (of the common noise, not the payload signal) is not the same identical and should cancel out, actually it should be the best case for cancelling.

Could anyone with better math skills verify this?
 
No, I was referring to inputs, not outputs.
The single input free version include it in preferences,maybe the multichannel one has it for each input.

input.PNG
 
Using this average of cross correlations (or equivalently discarding the imaginary part of either individual cross correlation) also means the vector average of cross correlations becomes a simple average of the real parts.
I am not shure
See results on synthetic signal
 

Attachments

  • CorrelRealOnly.png
    CorrelRealOnly.png
    55.3 KB · Views: 29
  • CorrelRealAndImg.png
    CorrelRealAndImg.png
    52.9 KB · Views: 31
Flipped polarity in on channel (of the common noise, not the payload signal) is not the same identical and should cancel out, actually it should be the best case for cancelling.
Wouldn't this just flip the sign of the correlation result?
 
Back
Top Bottom