• 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

hello @Rja4000

There is a problem with the D50III

You asked me to make the measurements
with 10V on the E1DA adc , D50III = 0db

In this configuration the level
seen by the ADC was 50% (-6db) .

The value I measured was -125.xx dBFSA
for the THD+N .

so with -6dB I could not reach
the ~ 126.5 dbFSA of the first measurements .

"Pkane" gave me a file of his DAC which
was at -8dbFS level , and I found
-128.xx dBFSA , THD+N correlated

So I started again , because I doubted the
10V caliber of the ADC which is less good than the other
calibers.

So I redid the measurement on the 6.7V caliber of the ADC with the output of the D50III at 0db

Here too I find the PB, I can't find the -126.xx dBFSA of the first measurements.
THD+N ~ -125.5 dBFSA .

I lowered the level of the D50III to -1db
There I find THD+N = -126.94 dBFSA .

The D50III increases the noise to 0db ......

I am well at the noise limit
from 100 correlations
I have -126.39 dBFSA of THD+N
 

Attachments

  • D50II_new_measure.png
    D50II_new_measure.png
    55.3 KB · Views: 36
Last edited:
for me is not good , look simulation , i have exactly attenuation = 5*log(N) for these levels with 2noise uncorrelated ~ 134dBFS
I have same reaction using E1DA ADC
Not sure I follow. It's not good because it is delivering exactly the theoretical benefit promised?
 
By the way, I was wondering:
If we are able to clearly make the distinction, with enough difference, between the DAC signal and each ADC channel, maybe we will be able to characterize both DAC and ADC in one single (averaged) measurement session ?
 
Longer FFs provide narrower bin widths, so the noise floor will drop, but the RMS value we are comparing will not change.

Edit: John @JohnPM already answered, should've read ahead.

I think I still don't understand. So you need 1000 correlations to get a 15dB more difference between wanted signal and noise floor.
With longer fft's you would accomplish 3dB per doubling of the fft size.
So a 128 times longer fft will give you 3*7=21 dB gain. Sounds like simpler?
 
I think I still don't understand. So you need 1000 correlations to get a 15dB more difference between wanted signal and noise floor.
With longer fft's you would accomplish 3dB per doubling of the fft size.
So a 128 times longer fft will give you 3*7=21 dB gain. Sounds like simpler?
Longer FFTs do not reduce the RMS (integrated) noise power. Smaller bins and thus processing gain lower the noise per bin, since there is less "noise" in smaller frequency bins, but the overall (integrated, RMS) noise will not change. Processing gain achieved by using more points lowers the FFT noise floor but does not change the SNR of the device being measured.

This old paper might help (attached).
 

Attachments

  • MT-001_ADI_SNR_Paper.pdf
    94.3 KB · Views: 26
Here is the link to the cross correlation bible

It's a little solid but little steps we manage to understand
why "5log(n)" why the FFT of the cross correlation
gives the denoised power spectral density.
+....

I haven't read everything yet...

Plus it's French :facepalm::facepalm::facepalm::facepalm::facepalm:

Cross correlation bible link
 
I took a very quick look but the references I used for cross-correlation were pretty specific to the serial data streams I was working with at the time, not audio stuff. Most of the results of a quick online search did not really delve into noise reduction. This one does provide an overview of cross correlation that may be a little easier to follow, and is in English: https://resources.system-analysis.c...pectrum-for-noise-modelling-and-filter-design Cornell has a bunch of lecture notes posted online that go deeply into correlation, FFTs, and all that jazz. I and coworkers through the years have used cross-correlation in the frequency or time domain with good effect.
 
The "bible link" paper is in English, the authors are French :).
Thanks, I did not even click on the link since I don't read French, duh!

Whilst looking I ran across a presentation I gave on probability of indecision and error correction for serial data. An excellent reminder of just how quickly one forgets the math when out of the workforce. Or just forgets period...
 
Hello everyone

As everyone is waiting for
John to publish his version with the
correlation functionality, I will try to explain
Here what a correlator is.

There will not be much math, just the
necessary.

It starts well we will start from the equation of
cross correlation.

CrossCorrelInTIme.png

We see that the cross correlation function is a function
of time it is composed of a multiplication + an
integral, "Teta" can be replaced by t, "to" is a
time shift of one of the functions.

In electronics we can make this function by
putting a multiplier + integrator.

This circuit does not output the correlation function but the
correlation coefficient if at the input the frequencies are
fixed, it will be necessary to slide a signal (phase variation)
to obtain the correlation function.

To get rid of the division by time, we can
put a low-pass filter in place of the integrator,
this will be sufficient in the frequency range of your analysis.

--------------------------------------------------------------------
1st exercise: extracting a signal drowned in noise.

Let's imagine that we have a "Morse" signal, I don't know
how to say it in English, but this drawing ".--..-.---..."
will tell you something.

. and - will be replaced by a 1000Hz frequency train of
respective duration.
"." short 1000Hz train
"-" long 1000Hz train

You don't see this signal in the noise, so you are unable
to decode it.

We know that this signal contains 1000Hz trains.

So we put this signal on one input and a 1000Hz signal of infinite duration on the other.

A bit of math:

if there is no "morse" signal.

Let's see what happens for one of the noise frequencies called Fnoise.

we multiply Fnoise by our 1000Hz reference signal.

so at the output of the multiplier we have ::

A*sin(2*pi*Fnoise*t)*B*sin(2*pi*1000*t). A and B the amplitudes.

Yes but

sin A * sin B = 1/2((cos(A-B) - cos(A+B))

the 2nd part, we see, is a periodic signal.

If A-B and A+B belong to our measurement frequency range.
the output of the integral or the low-pass filter will give "0" so
no signal.

So for all the noise frequencies will be eliminated,
except the noise at 1000Hz which I hope will be very small.

Now we multiply a frequency train by our 1000Hz reference signal

at the output of the multiplier we will have:

A*sin(2*pi*1000)*B*sin(2*pi*1000), I'll spare you the phase
it's the mind that counts.
so

(sin A)^2 = 1/2 -1/2 cos 2*A .

We see that this time a continuous value "1/2" will be detected at the
integrator output, therefore signal detection.

In summary, it is only a small trigonometric function that switches the
visibility and decoding of our "morse" signal.

I think that now if you extrapolate this example to the cross correlation that
we are trying to set up we understand better.

replace the 2 previous signals with the same signal from the 2 channels of our ADC.

The first signal will be our noisy signal, the 2nd our reference signal, for
each frequency of our reference signal we apply what was done above.

I'll let you think about it.

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

2nd example: let's build a spectrum analyzer with a correlator.

Yes ... it exists in HF, in the 80s (Yes, Yes, I'm old ...)
A person had made an HF spectrum analyzer in a small box
that was connected to an oscilloscope in this way, one channel contained
the output signal of the correlator the other channel a ramp representing the
frequency.

Let's take our correlator again.

On one of the inputs you have your signal to analyze, on the other a
sinus reference signal whose frequency increases linearly with time.

For each frequency of the reference signal you apply what was
said in the detection of a signal drowned in noise.

The analyzer will output a peak each time a frequency line is detected
in the signal to analyze.

So you get a spectrum analyzer ....

A spectrum analyzer is nothing more than a system that can extract signals
from noise either by FFT or by correlation.

I'll let you imagine all that can be done with a correlator.

Look at this paper from Zurich Industry that only talks about correlators:

Zurick Industry correlator application link
 
A message from the author of Virtins MultiInstrument on this subject
Yes, We are aware of this technique.

In fact, uncorrelated noise cancellation using vector averaging on cross-spectrum was already employed in the intra-frame average of the dual-channel transfer function measurement in MI when [FFT size] < [Record Length].
The only thing is that it has not been implemented for the dual-channel measurement of the signal itself.
The feature should be available in the next software release.
After that, the four averaging methods mentioned in posting #16 [in this thread] will all be available.
 
Last edited:
Looking at this discussion and quick progress that it triggers, that should remind us why the World Wide Web was invented by some CERN nerds in the early 90s, in the first place.

Thanks @FrenchFan for triggering and feeding this discussion.

Thanks @amirm for this place and your continuous involvement that makes all this possible.
 
... why the World Wide Web was invented by some CERN nerds in the early 90s, in the first place.
These nerds really hit the nail.

And they are the ones - among others - who are driving the development of KiCAD - an extremely good PCB design tool and simulator.
 
Last edited:
Looking at this discussion and quick progress that it triggers, that should remind us why the World Wide Web was invented by some CERN nerds in the early 90s, in the first place.

Thanks @FrenchFan for triggering and feeding this discussion.

Thanks @amirm for this place and your continuous involvement that makes all this possible.
 
As the NET is there to get ideas across.

I'm launching another thing

The "flat top HFT248D" weighting window

This is the most precise weighting window
in amplitude and which has the lowest noise floor
that I know of.

I implemented this window in my script.

I have never seen it in a BF analyzer.

I leave you attached an overview of
what this represents.

And the pdf from the faculty that analyzed a
large quantity of flat top windows
Written in 2002.

I made a comb of 100 frequencies that I analyze
with several windows..

be careful, the amplitudes of the combs are linear, not
in dB.

The measurement accuracy concerning the amplitude as a function of the windows

flat top HFT248: ~2/10000

blackman Harris 7 terms: ~5/100

Hanning: ~15/100

The accuracy is due to the derivative at the top of each
line.

For BH7/Hanning the FFT is missing points of the FFT so the amplitude
varies.

This does not impact the THD+N which is done by integral
and weighting on the FFT.

But the THD is impacted by the weighting windows.

This has really little impact when the distortions are
close to the noise < 20db, the noise modifying a lot
the amplitude of the distortion, we no longer know who is who.
 

Attachments

  • SpectrumDFTandNewFlatWindow.pdf
    2.3 MB · Views: 24
  • HFT248_Blackman7.png
    HFT248_Blackman7.png
    102.9 KB · Views: 29
As the NET is there to get ideas across.

I'm launching another thing

The "flat top HFT248D" weighting window

This is the most precise weighting window
in amplitude and which has the lowest noise floor
that I know of.

I implemented this window in my script.
To measure noise accurately, I always try to use Rectangle (no) window.
It's not always possible though.
you need good sync between DAC and ADC, and to align fundamental to a FFT bin center.

An interesting comparison of various FFT window functions is
 

Attachments

  • BH7-HFT248-2.png
    BH7-HFT248-2.png
    54.2 KB · Views: 35
Back
Top Bottom