## Spectrum Lab noise function

Expand Messages
• Wolf Many thanks for all your hard work in writing Spectrum Lab. I have a question about the noise function ... noise(freq1, freq2) returns the noise floor in
Message 1 of 10 , Aug 6, 2012
Wolf

Many thanks for all your hard work in writing Spectrum Lab.

I have a question about the noise function

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

noise(freq1, freq2)
returns the noise floor in the specified frequency range. Uses an algorithm suggested by G4JNT (which is also used in SpecLab's ALERT module).

The definition of noise levels is not easy. Here is the basic algorithm of the 'noise' function:

An array of amplitudes (usually dB values) from the last FFT calculation is sorted into order of increasing amplitude.
The amplitude of the lower quartile value (for example bin number 256 in a sorted set of 1024 points) PLUS 3dB is then returned as an estimate of the mean noise level.

This technique automatically throws away very high values (strong signals) that would otherwise affect the result.

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

In your code for this function, is the complete FFT result contained in the 1024 points or do they represent only one side of the spectrum, plus the DC value?

Is the 3dB a typo? In a book written by G4JNT ("Command", published by RSGB)he mentions 5dB not 3 dB.

I have attempted to check this by computer simulation using voltage data generated by a Gaussian random number generator from the book "Numerical Recipes". For large data sets (say > 32K samples), the results suggest that the factor should be 5dB rather than 3dB.

My reason for seeking clarification of this is that I am using Spectrum Lab to measure S/N of nanowave receivers.

73

Barry, G8AGN
• Hello Barry, The DC component is only included in the calculation if the specified frequency range begins at 0 Hz. Only those frequency bins which represent
Message 2 of 10 , Aug 6, 2012
Hello Barry,

The DC component is only included in the calculation if the specified
frequency range begins at 0 Hz.
Only those frequency bins which represent the specified frequency range
should enter the algorithm, i.e. are sorted by amplitude, etc. The
number of bins isn't necessarily a power of two (it's a power of two if
the frequency range goes from "DC" to the Nyquist frequency, because in
that case the whole FFT enters the calculation, and the FFT size is
always a power of two. At least in spectrum lab.)

Another user has also mentioned that 5 dB should be added instead of 3
dB. I'm not sure about the mathematical reason (must have got something
to do with the Gaussian distribution of a set of random numbers).
I will modify this in the next release if 5 dB is the correct value.
Unfortunately I don't have a copy of the article you mentioned.

All the best,
Wolf .
• Wolf Many thanks for the explanation. 73 Barry, G8AGN
Message 3 of 10 , Aug 6, 2012
Wolf

Many thanks for the explanation.

73
Barry, G8AGN

On 06/08/2012 16:48, wolf_dl4yhf wrote:
> Hello Barry,
>
> The DC component is only included in the calculation if the specified
> frequency range begins at 0 Hz.
> Only those frequency bins which represent the specified frequency range
> should enter the algorithm, i.e. are sorted by amplitude, etc. The
> number of bins isn't necessarily a power of two (it's a power of two if
> the frequency range goes from "DC" to the Nyquist frequency, because in
> that case the whole FFT enters the calculation, and the FFT size is
> always a power of two. At least in spectrum lab.)
>
> Another user has also mentioned that 5 dB should be added instead of 3
> dB. I'm not sure about the mathematical reason (must have got something
> to do with the Gaussian distribution of a set of random numbers).
> I will modify this in the next release if 5 dB is the correct value.
> Unfortunately I don't have a copy of the article you mentioned.
>
> All the best,
> Wolf .
>
>
• ... Interesting. Where can I load the article? I must have missed the SL option to calculate S/N automatic. regards - Henry -- ehydra.dyndns.info
Message 4 of 10 , Aug 26, 2012
wolf_dl4yhf schrieb:

> Another user has also mentioned that 5 dB should be added instead of 3
> dB. I'm not sure about the mathematical reason (must have got something
> to do with the Gaussian distribution of a set of random numbers).
> I will modify this in the next release if 5 dB is the correct value.
> Unfortunately I don't have a copy of the article you mentioned.
>

Interesting. Where can I load the article?

I must have missed the SL option to calculate S/N automatic.

regards -
Henry

--
ehydra.dyndns.info
• Hi Henry, ... I d also like to see it, either online or as a copy. But the article only seems to be available as paperware (aka book ). ... It s hidden in the
Message 5 of 10 , Aug 27, 2012
Hi Henry,

Am 27.08.2012 01:02, schrieb ehydra:

wolf_dl4yhf schrieb:

> Another user has also mentioned that 5 dB should be added instead of 3
> dB. I'm not sure about the mathematical reason (must have got something
> to do with the Gaussian distribution of a set of random numbers).
> I will modify this in the next release if 5 dB is the correct value.
> Unfortunately I don't have a copy of the article you mentioned.
>

Interesting. Where can I load the article?

I'd also like to see it, either online or as a copy. But the article only seems to be available as paperware (aka "book").

I must have missed the SL option to calculate S/N automatic.

It's hidden in the noise calculation function ("noise", or "noise_n", the latter normalises the noise floor to 1 Hz bandwidth regardless of the FFT size). It doesn't measure SNR directly, but -depending on the nature of the signal- this can be achieved by subtracting the noise level from the signal peak (peak_a function).

http://www.qsl.net/dl4yhf/speclab/interpr.htm#noise_func

Somehow related to signal/noise estimation is the sinad function (signal + noise + distortion  to  noise+distortion), which is also described in the manual:

All the best,
Wolf .

(Sorry for not answering the other questions being asked here recently.. no time yet to dig in deeper. The Perseus SR calibration is implemented, but urgent family matters kept me busy, so I couldn't pack a new installer and upload it)

• Wolf I will try to find time to write a report about my modelling of this as I posted the original enquiry. 73 Barry, G8AGN
Message 6 of 10 , Aug 27, 2012
Wolf

I will try to find time to write a report about my modelling of this as
I posted the original enquiry.

73
Barry, G8AGN

On 27/08/2012 22:08, wolf_dl4yhf wrote:
> Hi Henry,
>
>
> Am 27.08.2012 01:02, schrieb ehydra:
>>
>> wolf_dl4yhf schrieb:
>>
>> > Another user has also mentioned that 5 dB should be added instead of 3
>> > dB. I'm not sure about the mathematical reason (must have got something
>> > to do with the Gaussian distribution of a set of random numbers).
>> > I will modify this in the next release if 5 dB is the correct value.
>> > Unfortunately I don't have a copy of the article you mentioned.
>> >
>>
>> Interesting. Where can I load the article?
>>
>
> I'd also like to see it, either online or as a copy. But the article
> only seems to be available as paperware (aka "book").
>
>> I must have missed the SL option to calculate S/N automatic.
>>
> It's hidden in the noise calculation function ("noise", or "noise_n",
> the latter normalises the noise floor to 1 Hz bandwidth regardless of
> the FFT size). It doesn't measure SNR directly, but -depending on the
> nature of the signal- this can be achieved by subtracting the noise
> level from the signal peak (peak_a function).
>
> http://www.qsl.net/dl4yhf/speclab/interpr.htm#noise_func
>
> Somehow related to signal/noise estimation is the sinad function (signal
> + noise + distortion to noise+distortion), which is also described in
> the manual:
>
>
> All the best,
> Wolf .
>
> (Sorry for not answering the other questions being asked here recently..
> no time yet to dig in deeper. The Perseus SR calibration is implemented,
> but urgent family matters kept me busy, so I couldn't pack a new
>
>
• Wolf I will be posting a note in the Yahoo Group s Files section which discusses my simulations. 73 Barry, G8AGN
Message 7 of 10 , Aug 30, 2012
Wolf

I will be posting a note in the Yahoo Group's Files section which
discusses my simulations.

73
Barry, G8AGN
• Thanks Wolf! ... -- ehydra.dyndns.info
Message 8 of 10 , Aug 30, 2012
Thanks Wolf!

wolf_dl4yhf schrieb:
>> I must have missed the SL option to calculate S/N automatic.
>>
> It's hidden in the noise calculation function ("noise", or "noise_n",
> ...
--
ehydra.dyndns.info
• Hello Barry, Many thanks for the noise simulation, and for the presentation of the results ! Users may be a bit surprised when the next version of Spectrum Lab
Message 9 of 10 , Aug 30, 2012
Hello Barry,

Many thanks for the noise simulation, and for the presentation of the results !

Users may be a bit surprised when the next version of Spectrum Lab will deliver different noise results, but it's better to do the change now than later.
I noticed a small difference between 'true' noise (from a noisy diode, connected to a software defined radio) and the amplitude-limited noise from Spectrum Lab's test signal generator. So for the next tests I will use 'radio noise', and compare the result of the noise()-function and the total power in the same observed frequency range.
Will let you know the results as soon as I have them.

All the best,
Wolf  DL4YHF .

Am 30.08.2012 19:49, schrieb Barry Chambers:

Wolf

I will be posting a note in the Yahoo Group's Files section which
discusses my simulations.

73
Barry, G8AGN

• Evening Wolf When I get some more free time, I ll run some simulations with a restricted bandwidth to see how the results look. 73 Barry, G8AGN
Message 10 of 10 , Aug 30, 2012
Evening Wolf

When I get some more free time, I'll run some simulations with a
restricted bandwidth to see how the results look.

73
Barry, G8AGN

On 30/08/2012 21:00, wolf_dl4yhf wrote:
> Hello Barry,
>
> Many thanks for the noise simulation, and for the presentation of the
> results !
>
> Users may be a bit surprised when the next version of Spectrum Lab will
> deliver different noise results, but it's better to do the change now
> than later.
> I noticed a small difference between 'true' noise (from a noisy diode,
> connected to a software defined radio) and the amplitude-limited noise
> from Spectrum Lab's test signal generator. So for the next tests I will
> use 'radio noise', and compare the result of the noise()-function and
> the total power in the same observed frequency range.
> Will let you know the results as soon as I have them.
>
> All the best,
> Wolf DL4YHF .
>
Your message has been successfully submitted and would be delivered to recipients shortly.