ej_whyte

Calculating from sweeps
« on: April 05, 2013, 03:44:37 PM »
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




JohnRoberts

Re: Calculating from sweeps
« Reply #1 on: April 05, 2013, 04:53:43 PM »
Yup you generally present noise data for a 20kHz bandwidth. Those plots are showing per Hz.

JR 
Don't only half-ass tune your drums. Visit https://circularscience.com to hear what properly "cleared" drums sound like.

ej_whyte

Re: Calculating from sweeps
« Reply #2 on: April 06, 2013, 06:17:25 AM »
So how can I calculate a single figure from the graphs (or table of data that the graph is based on)?

JohnRoberts

Re: Calculating from sweeps
« Reply #3 on: April 06, 2013, 10:43:21 AM »
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

Don't only half-ass tune your drums. Visit https://circularscience.com to hear what properly "cleared" drums sound like.

ej_whyte

Re: Calculating from sweeps
« Reply #4 on: April 06, 2013, 12:26:40 PM »
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

Samuel Groner

    Zürich, Switzerland
  • Posts: 2935
Re: Calculating from sweeps
« Reply #5 on: April 07, 2013, 09:45:14 AM »
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.

Quote
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

alexc

Re: Calculating from sweeps
« Reply #6 on: April 07, 2013, 08:34:17 PM »
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 ****

« Last Edit: April 07, 2013, 09:00:27 PM by alexc »
I ping therefore I am

ruffrecords

Re: Calculating from sweeps
« Reply #7 on: April 08, 2013, 04:57:59 AM »
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
www.customtubeconsoles.com
https://mark3vtm.blogspot.co.uk/
www.eztubemixer.blogspot.co.uk


'The only people not making mistakes are the people doing nothing'

Samuel Groner

    Zürich, Switzerland
  • Posts: 2935
Re: Calculating from sweeps
« Reply #8 on: April 08, 2013, 02:16:37 PM »
Quote
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

JohnRoberts

Re: Calculating from sweeps
« Reply #9 on: April 08, 2013, 02:18:50 PM »
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]

Don't only half-ass tune your drums. Visit https://circularscience.com to hear what properly "cleared" drums sound like.


ruffrecords

Re: Calculating from sweeps
« Reply #10 on: April 08, 2013, 05:18:05 PM »
Quote
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.

Quote
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
www.customtubeconsoles.com
https://mark3vtm.blogspot.co.uk/
www.eztubemixer.blogspot.co.uk


'The only people not making mistakes are the people doing nothing'

alexc

Re: Calculating from sweeps
« Reply #11 on: April 08, 2013, 07:03:32 PM »
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 ping therefore I am

Samuel Groner

    Zürich, Switzerland
  • Posts: 2935
Re: Calculating from sweeps
« Reply #12 on: April 09, 2013, 03:45:37 AM »
Quote
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.

Quote
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.

Quote
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
« Last Edit: April 09, 2013, 04:13:41 AM by Samuel Groner »

ruffrecords

Re: Calculating from sweeps
« Reply #13 on: April 09, 2013, 05:01:07 AM »
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
www.customtubeconsoles.com
https://mark3vtm.blogspot.co.uk/
www.eztubemixer.blogspot.co.uk


'The only people not making mistakes are the people doing nothing'

alexc

Re: Calculating from sweeps
« Reply #14 on: April 09, 2013, 06:06:22 AM »
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 :)
I ping therefore I am

Samuel Groner

    Zürich, Switzerland
  • Posts: 2935
Re: Calculating from sweeps
« Reply #15 on: April 10, 2013, 03:03:48 AM »
Quote
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

ruffrecords

Re: Calculating from sweeps
« Reply #16 on: April 10, 2013, 04:34:00 AM »
Quote
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
www.customtubeconsoles.com
https://mark3vtm.blogspot.co.uk/
www.eztubemixer.blogspot.co.uk


'The only people not making mistakes are the people doing nothing'

Samuel Groner

    Zürich, Switzerland
  • Posts: 2935
Re: Calculating from sweeps
« Reply #17 on: April 14, 2013, 01:54:53 PM »
Quote
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

abbey road d enfer

Re: Calculating from sweeps
« Reply #18 on: April 30, 2013, 03:25:44 AM »
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
Who's right or wrong is irrelevant. What matters is what's right or wrong.
Star ground is for electricians.

Re: Calculating from sweeps New
« Reply #19 on: May 05, 2013, 01:45:26 PM »
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 :)
« Last Edit: May 05, 2013, 04:41:35 PM by VictorQ »


 

Related Topics

  Subject / Started by Replies Last post
7 Replies
4430 Views
Last post August 28, 2009, 02:43:59 PM
by leswatts
2 Replies
1916 Views
Last post January 29, 2010, 11:12:49 AM
by benlindell
2 Replies
2261 Views
Last post January 02, 2013, 05:47:09 PM
by bruno2000
6 Replies
2886 Views
Last post August 10, 2013, 09:01:30 AM
by zamproject