Calculating from sweeps

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

ej_whyte

Well-known member
Joined
Nov 12, 2010
Messages
263
Location
Cambridge, UK
Hi,

I've just been doing some testing today and have a load of nice sweeps. What is the standard method for calculating a final value as would be used in a spec sheet? Obviously looking at a sweep is a more detailed way of presenting the information, but I would like to just have a single figure as well. For example an FFT showing the noise floor, for a single figure would I just choose the highest point, or is it some kind of RMS summation? I've attached a couple of graphs just incase it helps with explanation.

Thanks

fftu.png

noisea.png
 
ej_whyte said:
So how can I calculate a single figure from the graphs (or table of data that the graph is based on)?
I have not actually done such calculations so am reluctant to give firm advice that amounts to an educated guess.

I think the math involves square root of spot voltage squared times bandwidth. (= guess in -60dBu something ballpark).


JR

 
Hmm OK thanks. I did these on a dScope and it did provide just a single noise figure, roughly around -74dBu, but I wanted to take the FFT for more detail. Looking at the data the highest peak is about -74dBu and at 50Hz so I guess its mains hum, without that peak the highest point is -85dBu

Cheers
 
It's not easy to calculate a wideband noise figure from an ordinary FFT because the equivalent noise bandwidth of a bin needs to be known. This involves a relatively complex function of parameters such as sampling frequency, the FFT resolution/number of bins and used windowing function.

Looking at the data the highest peak is about -74 dBu and at 50 Hz so I guess its mains hum, without that peak the highest point is -85 dBu.

There's probably a monitor output where you can monitor the noise (and perhaps distortion) floor on a scope. This will tell you immediately if there's a hum problem or not (yes, from the FFT it looks like there is one--next time you could use a log frequency plot to get better resolution at low frequencies).

Samuel
 
RTA applications like TrueRTA also give a single 'spl' like noise figure in dBu for the displayed frequency range.

The overall SPL figure given in RTA is usually a few dB less (noisier) than the peak for a single dominant frequency.
Because there is always noise in the rest of the bandwidth which aggregates to a couple of dB.

For example mains noise : I will see peaks at fundamental and 2nd harmonic of mains freq.
Each may be around -90dBu on a quiet build.
The rest of the spectrum normally shows a slowly rising hi-freq.

The SPL noise floor would be shown as around -84dBu for 20Hz-20KHz - basically a few dBs down from the dominant peaks.

I need to check if restricting the display bandwidth alters that SPL noise floor figure.
I have a feeling it doesn't - it uses the audio interface sampling freq to calculate on, not the displayed.
Could be wrong - I'll check that.

When I'm measuring, I note the 'overall SPL' figure in dBu at some standard condition of gain in the device under test.
Unity gain throughout is one condition, and then I usually check at some 'sensible' gain structure suitable for the device.

Then I note the signal-applied condition and signal shorted condition and note the relevent info.

That gives me a pretty reasonable measure of things like psu noise levels, overall noise levels and harmonic distortion levels as well as some characterisation of spectral futz distortions.

I quote the SPL figure and the bandwidth because it is kind of a 'worst case' noise floor and usually I say something like 50/100Hz components all below -90dBu.

The accuracy of the measurements, of course is related to the resolution and performance of your tools.
In addition, it is limited to the 'verifiable calibration state' of your measurement chain.

ie. it's no good believing and claiming the figures which can't can't reasonably be justified by using independent means.
Commercial outfits which make claims on accuracy in critical fields  spend a LOT of time continuously verifying measurement means.

For a 'homey' like me, I can measure  an ac voltage confidently to a couple of mV on a cro. So I set up some tests to ensure what I think I am seeing on the RTA can be related back to the CRO measurements.

To within a few dBs on a dBu scale ranging from -120dBu to +20dBu  I think is reasonable accuracy to expect.

All quite servicable, but to get better, I would need an instrumentation amp rig, some weighting filters and probably some notch filters.

And certainly a much more accurate multimeter and probably a better cro too.

The interesting thing with RTAs is they all show somewhat different interpretations of the data.
Som much depends on the freq-domain conversion method of 'windowing' and 'bucket' length and all that.

The couple I use can be reasonably related back to fundamentals by a reasonably competent person.
And that gives confidence in the reported results.

Rightmark on the other hand, and in my personal opinion, to which everyone is entitled, is more of a random number generator to me :)
I've never been able to establish any relationship from the reported results to my test equipment.
That could be just me, however :)

it reminds me a lot of the statistical modelling applications I used to use when calculating investment portfolio risk measures.
Not worth ****

 
The answer is about 43dB.

It doesn't matter about bin size and window shapes provided the spectrum displayed is truly amplitude per root Hertz. To simplify matters if we assume the spectrum is essentially flat then to get the rms in a 20KHz bandwidth we need to multiply the average value by the sqaure root of 20KHz which is 141 which expressed in dB is 43dB. So a rough estimate is to find the average. So looking at your noise plot you might guess the average at about -110dB which makes the rms noise around -67dB. Most audio measurement software has a function that does this automatically, taking into account variations with frequency.

Cheers

Ian
 
It doesn't matter about bin size and window shapes provided the spectrum displayed is truly amplitude per root Hertz.

It seems highly unlikely to me that this plot is magically scaled for 1 V/rtHz...

There's a legendary Apogge add which shows a FFT noise floor tuned to sit at exactly -144 dBFS. Proof that their converters have full 24 bit performance! ;D

Samuel
 
Lies, damn lies, and statistics....

Another reason I like NF for evaluating designs.


JR

[edit= while less should generally always be less so OK for relative comparison between similar measurements using same rig. /edit]

 
Samuel Groner said:
It doesn't matter about bin size and window shapes provided the spectrum displayed is truly amplitude per root Hertz.

It seems highly unlikely to me that this plot is magically scaled for 1 V/rtHz...

I do believe it is tha accepted norm for all such plots. Otherwise they are meaningless.

There's a legendary Apogge add which shows a FFT noise floor tuned to sit at exactly -144 dBFS. Proof that their converters have full 24 bit performance! ;D

Samuel

Which is precisely my point because it you subtract the necessary 43dB their rms noise floor over the entire 20KHz bandwidth is only -101dBFS.

Cheers

Ian
 
The semi-pro RTA apps I use don't have any info on the underlying measurement units so I don't know if they are root-Hz/V.
They don't go into that detail in the manuals as far as i can see.

What I do know is that if I change the window method, fft size, averaging filter etc I get very different results on the measurements displayed. Particularly with the headline figures of 'Input Level rms' and 'Input Level peak' dBu.

Best thing is to have a mega-buck audio analyzer!

 
I do believe it is the accepted norm for all such plots.

Then I do feel the duty to inform you that this is definitely not the case... In fact this would simply not be possible without seriously limiting the functionality and flexibility of the FFT function. With an arbitrary equivalent noise bandwidth of the FFT bin you can either scale the plot to show correct readings for coherent signals (i.e. superpositions of sine waves, with the Y axis scaled for V, dBU, dbV) or stochastic signals (i.e. noise, with the Y axis scaled for V/rtHz, dBU/rtHz, dbV/rtHz), but not both at the same time. To have simultaneously correct readings for both coherent and stochastic signals, we need an equivalent noise bandwith of exactly 1 Hz. Everything else just doesn't work out. And constraining the FFT parameters such that only this single equivalent noise bandwidth is possibly would restrict e.g. the frequency resolution to unacceptable levels. Thus is has become accepted practice in the audio world to scale any FFT for correct readings of coherent signals.

If you want to dig into the mathematical details: http://www.rssd.esa.int/SP/LISAPATHFINDER/docs/Data_Analysis/GH_FFT.pdf is excellent reading.

Misinterpreting FFT noise floors is a very common mistake in the audio world. So let me stress the point again: Unless you have unambiguous information on the equivalent noise bandwidth of the FFT bin (in 99% of all cases you don't), or the FFT is explicitly scaled to give correct reading of noise signals by the software, you can't conclude anything with respect to absolute noise levels from an FFT.

What I do know is that if I change the window method, fft size, averaging filter etc I get very different results on the measurements displayed.

A direct result from the above.

Best thing is to have a mega-buck audio analyzer!

In fact not even the top-notch SYS-2722 Audio Precision directly supports FFTs scaled in V/rtHz, which is a tremendous pitty. I have to import the measurement data into Matlab and run my custom FFT code.

Samuel
 
Thanks for putting me right. You clearly know a lot more about this than I do. So, my secondary conclusion 'else they are useless' for measuring noise was depressingly accurate. I shall remember this next time someone shows an FFT plot of of their tube circuit and claims an unbelievable noise performance as a result.

An ancillary question. Most of these packages have a function that calculates the rms noise or S+N/N ratio. Is that done from the same data used to create the FFT plot?

Cheers

Ian
 
Thanks Samuel for the discussion and the link to the FFT whitepaper.

I think I might have a try to analyse some noise floor recording files of my soundcard 'loopback' in a mathematical analysis application.

It's been a few years since I programmed up DFTs and spectral density estimations and all that, so it will be an interesting exercise in relating the results I get with my bench method to some elementary theory.

I have some time to kill and some brain plaques to rattle :)
 
Most of these packages have a function that calculates the rms noise or S+N/N ratio. Is that done from the same data used to create the FFT plot?

I'm not sure on this either. I think some do, but of course it would also be perfectly feasible to implement full bandpass and notch filters for a direct measurement of these figures, as done for analog analyzers (APs have a full set in both domains). For sure I share your reservations about the accuracy of an FFT-based method. I think those procedures which are used to measure SNR/ENOB for ADCs require that the excitation signal frequency lies pretty accurately at a bin center. That way, it is possible to use a rectangular window (often called "no" window), which avoids the signal energy attenuation and main lobe issues inherent in more typical (and for general work far more useful) windows such as Hamming, Han, flat top etc.

Samuel
 
Samuel Groner said:
Most of these packages have a function that calculates the rms noise or S+N/N ratio. Is that done from the same data used to create the FFT plot?

I'm not sure on this either. I think some do, but of course it would also be perfectly feasible to implement full bandpass and notch filters for a direct measurement of these figures, as done for analog analyzers (APs have a full set in both domains). For sure I share your reservations about the accuracy of an FFT-based method. I think those procedures which are used to measure SNR/ENOB for ADCs require that the excitation signal frequency lies pretty accurately at a bin center. That way, it is possible to use a rectangular window (often called "no" window), which avoids the signal energy attenuation and main lobe issues inherent in more typical (and for general work far more useful) windows such as Hamming, Han, flat top etc.

Samuel

Presumably, calculating the rms value of a period of t samples in the absence of signal gives the noise from 1/t to fs/2. Ought to be simple to do.

Cheers

Ian
 
Presumably, calculating the rms value of a period of t samples in the absence of signal gives the noise from 1/t to Fs/2.

Yes, apart from the fact that the downsampling/decimation filters of the used ADC may alter the effective ENB a bit. Ought to be irrelevant usually, as they are very steep and close to Fs/2.

Samuel
 
ej_whyte said:
So how can I calculate a single figure from the graphs (or table of data that the graph is based on)?
Check the AP website
Their bulletin Audio.TST April 2013 deals with that.
"Sound Advice: Deriving Fractional Octave Spectra from the FFT"
There's also a download
The APx FFT to Octave Conversion Utility
 
The broadband figure can be calculated from the time series as well as the fft. This is equivalent to Parseval's theorem. Do it in both domains, then you'll know you have the math right if you get the same number.
The formula for fft is:
e_rms=sqrt(sum(abs(bin)^2)/NBW), where NBW is the time window noise bandwidth (3/2 for Hann window, 1 for uniform/rectangular) and bin is the (complex) fft bin value.

The sum should only be over positive frequencies, and the DC and infrasonic bins should probably be omitted.

EDIT: corrected formula.. Plus it occurred to me, that the formula is the same for time domain. Oh the beautiful symmetry :)
 

Latest posts

Back
Top