• 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

So, you measured 126.5dB on 20kHz BW.
I measured 125.9dB on 22kHz BW, which would be 126.3dB on 20kHz.
And Topping measured 126.4dB (also 20kHz BW)
Looks like a nice confirmation.

A strange difference is the lower 5th harmonic.
On my and Topping measurements, it seems higher than on yours.
At that level, it might be a chip sample variation, though.

Wait.
Are you really measuring at -1 dBFS output ?
Why ?
Hi RJA4000

Regarding the -1 db attenuation on
the D50III screen, above that I saturate.

I am on output = 5V on the D50III

Scaler = 0db, ADC on 4.5veff

I should measure with an oscilloscope
to confirm the voltage level.

I do it and pause the real voltage level
that I see at the DAC output.

Concerning the harmonics, I see, like you
this difference, in addition I am never below
-140dBFS as we see at the manufacturer.
ADC in question -> ???

In addition if we look at the 2 single outputs of the ADC
we see differences on the harmonics; maybe
the distortion correction is badly adjusted.

The correction only acts on H2 and H3, but there, you have to be
careful, it can propagate to H5, the ADC has its own
distortion.

But these are assumptions, and it is true that H5 is weak in
my measurements compared to what I see elsewhere.
 
Comparing different methods to reduce noise and other interference

As far as I understand (please correct me if I'm wrong):
(n is the number of samples resp. the number of channels acquired simultaneously)

Coherent averaging (repetitive measurement with averaging in the time domain, prior to FFT):
- will reduce all random noise (noise contained in the signal as well as noise added by the measurement) -> Not suited for S/N measurement
- will reduce sporadic interference (lorry driving by when measuring with microphone) by 1/n

Incoherent averaging (repetitive measurement with averaging in the frequency domain, after FFT):
- will not reduce the noise level (just reduces the variation of the measurement giving a more reproducible and smoother plot)
- will reduce sporadic interference (lorry driving by when measuring with microphone) by 1/n (maybe this number is not quite right due to the root-mean-square result of the FFT)

Simultaneous measurement with a number of n channels and using the average result:
- will not reduce noise contained in the signal
- will reduce random noise added by the measurement by sqrt(n) (paralleling amplifier stages -> mono mode of E1DA ADC)

Cross correlation:
- will not reduce noise contained in the signal
- will reduce random noise added by the measurement by 5*log10(n)
- will suppress larger disturbing signals (lorry driving by) very effective

All of these methods should not change the level of harmonics, thus THD should be correct.

Expected improvement for random noise on the ADC side:

View attachment 384626
Hi nanook

I think the summary is excellent.

..."I keep".... .

Concerning the cross correlation,

the coefficient 5*log10(n) is true when the
noises are relatively close and low.

Look at the png attached.

I made a correlation between 2 sinuses
1) 1000Hz 2) 1000Hz + 2000HZ

In a single correlation we drop the
2000Hz by more than 100dB, we are far from 5*log10(n)

In addition the decorrelated noise drops by ~ 6/7 dB

Thanks for this summary, great for me

Bye
 

Attachments

  • Correl-2-sinus.png
    Correl-2-sinus.png
    55.3 KB · Views: 56
Are you saying that power can be increased to increase the SNR…
AND
That the time can be increased to increase the total energy, in order to increase the SNR ?
look "Comparing different methods to reduce noise and other interference" from nanook in this discussion
 
Wouldn't that work even better if the 2 input channels are using very different ADCs ?
 
Wouldn't that work even better if the 2 input channels are using very different ADCs ?
I think it would, since it would be able to reduce distortion on the receiving side as well (different amplitudes and probably different phase).
The different ADCs would need a proper time alignment, maybe be even on a sample scale if the method shall work in the upper frequency range.

@KSTR: Do you want to jump in? Afaik this is one of your topics :)
 
Correlation study (functions) let me align transmitted and received patterns without having to analyze and compensate (generally unknown) phase/time differences between Tx and Rx points.
REW uses cross correlation of the microphone channel with a loop-back on the other channel to measure time-of-flight. I think this in turn is used in the calculation of the minimum phase response.
 
The different ADCs would need a proper time alignment
Not sure if that's really required, since cross alignment is, first, used to identify time/phase differences between signal, isn't it ?
Anyway, that should be no issue for me: I usually try to time align everything anyway.
 
The different ADCs would need a proper time alignment
Not sure if that's really required, since cross alignment is, first, used to identify time/phase differences between signal, isn't it ?
above that I saturate.

I am on output = 5V on the D50III

Scaler = 0db, ADC on 4.5veff
You may just change the ADC scale.
I'm using 10V as a target for Scaler, personnaly.
 
I write my own scripts with octave
to better understand audio analysis
and it is not a luxury to delve
into the equations to help understand.

I saw by chance that QuantaSylum offered
measurement noise reduction by cross correlation.

look at the beginning of the following blog:


So I looked for how to realize the function.
I still leave my sources here.


Concerning the theory the calculation for me is simple,
I have the points of the FFT and I can therefore easily
do the calculation indicated in the paper of "Zurich instrument".

FFTcorr=FFT1.*conj(FFT2); # correl FFT1 FFT2
FFT1 = FFT of one channel
FFT2 = FFT of the other channel
conj=FFT complex conjugate

I can do the cumulation and the average then,
each FFT includes a block of N samples.

If you do an analysis with 32K samples, each correl
will take 32K samples,

I let you understand the deep theory of measurement.

time T to F
Corr(g,h) <=> G( f )H* ( f )

g,h time signal
G,H FFT of each signal


The cumulation allows to add the correlated signals (frequency line)
is to add the noises in quadratic value, noise = sqrt(noise1^2+noise2^2)

The final average gives directly the FFT with the noise reduction.

But well it is not easy to understand the convolution or correlation,
you need your little paper and make the signals and rack your brains.

If we look at the paper from "Zurich instrument" the noise reduction is
approximately log(NB correlations)*5.

so 10 correlation = -5db
100 = -10db
1000 = -15db
etc ....

Well be careful it is only when the signals are very close in terms of noise to the ADC floor.

A test with a signal at 1000Hz and another signal at 1000Hz + 2000Hz.
In a single correlation you lower the 2000Hz signal by 100db

To reduce the recording time I tested the overlap of the measurement blocks,
it is viable up to 90% overlap, we can reduce the measurement time
by 10 for the same number of correlations.

I will leave here the octave FFT calculation scripts with weighting window,
THD+N calculation and calculation function and launch of the correlation.

I am sure that this will help some and decide some to write their own script.

I assure you, I thought I knew everything about FFT and signal processing
and well I was wrong, while writing the software
I realized that I did not know much.

Hey, who can explain to me seriously, with proof, why the noise floor in an FFT
at a given sampling frequency increases when the number of samples decreases.

Bye and good luck .

----------------------------------------------------------------------------------------------------

Using scripts :

You will certainly need to install octave , I'll let you do it .

You will need to load the signal package , if you are on linux
octave and packages are in your repository .

If you are on windows or mac , I don't know , I only use Linux .
package are under "forge"

clculFFTmain.m :

contains FFT calculation + weighting window + THD+N calculation + display procedure

correl_FFT_optmized.m :

contains correlation calculation and result display
and THD+N calculation

nbCalcul = nb correlation
coeffShift = shift , 1 overlap = 0% , 0.1 overlap = 90%

replace the wav files with yours .
the 2 "S2_x_noise.wav" are used for calculation

The comments are in French, I think you will easily
translate them.

Be careful, I write software like a dog, so be careful.
This is very nice work, thank you for sharing. I would suggest adding a IR start-IR peak distance check after cross correlation. Certain responses with large noise components can cause cc to shift too much in my experience with speaker measurements, not sure if that can happen with DAC measurements.

Also, rather than assigning results to FFTS1NCumul(2, : ) and then back to FFTS1NCumul(1, : ), using direct accumulation and vectorization could speed things up a bit:

FFTS1NCumul(1, : ) += abs(FFT1).^2;
 
Wouldn't that work even better if the 2 input channels are using very different ADCs ?
How?

I think it would, since it would be able to reduce distortion on the receiving side as well (different amplitudes and probably different phase).
The different ADCs would need a proper time alignment, maybe be even on a sample scale if the method shall work in the upper frequency range.

@KSTR: Do you want to jump in? Afaik this is one of your topics :)
What distortion?
The ADC is likely the least of the problems here, but it is possible I am missing some nuance.

Are we talking about a microphone into an ADC, or are we talking about purely electrical signals with no “sound travelling in the air” anywhere ?
 
How?


What distortion?
The ADC is likely the least of the problems here, but it is possible I am missing some nuance.

Are we talking about a microphone into an ADC, or are we talking about purely electrical signals with no “sound travelling in the air” anywhere ?
We speak purely electrical.
So, no, the ADC is not the least of our problem.
 
Certain responses with large noise components can cause cc to shift too much in my experience with speaker measurements, not sure if that can happen with DAC measurements.
I think if that ever happens with a DAC, that means this DAC is very bad. And in that case all this is not required.
 
How?


What distortion?
The ADC is likely the least of the problems here, but it is possible I am missing some nuance.

Are we talking about a microphone into an ADC, or are we talking about purely electrical signals with no “sound travelling in the air” anywhere ?
We are talking about the method in general. Speaker measurements are one possible application.
 
Not sure if that's really required, since cross alignment is, first, used to identify time/phase differences between signal, isn't it ?
Maybe you are right. The convolution will take care of the shift.
It's probably rather that the clock mismatch of the ADCs should not be too large, such that the whole sequence correlates well (and not only part of it).
 
Hi all
Here is a measurement on the D50III Jack output,
we are identical to the manufacturer measurement.

I just have to discuss with Ivan the distortion
never goes below 140db.

bye
Please compare Cosmos ADC in Mono summing mode to CC. Right now you've use single channel vs CC, which is not a valid comparision IMHO.
 
How?


What distortion?
The ADC is likely the least of the problems here, but it is possible I am missing some nuance.

Are we talking about a microphone into an ADC, or are we talking about purely electrical signals with no “sound travelling in the air” anywhere ?
Hello Holmz

The limit of cross correlation is precisely
the correlation of noise in the ADC.

The E1DA uses a single device for the 2 ADCs.

The thermal noise could be correlated on the chip ????.

Having 2 ADCs would overcome this problem (if it exists).

I went down to -20db by correlating the 2 noises of the ADC.

I can guarantee the noise reduction of this value of 20dB.

Bye
 
Please compare Cosmos ADC in Mono summing mode to CC. Right now you've use single channel vs CC, which is not a valid comparision IMHO.
I don't undestand very well , what is CC (cross correlation??)
If CC = cross correlation
I compare the cross correlation with channels with E1DA ADC in stereo mode , because je measure the same
signal on each channel , and it give a direct noise reduction vs stereo channel
 
Back
Top Bottom