I am trying to make calculate the PSD of white noise sampled in the spectrum analyzer however Im having some trouble combining several frequency bands.
I saw another answer by Gerry where the power is supposedly calculated as
power = (sum of (V^2)) / impedance Forum Post 88891
This means I should be able to calculate the power spectral density (V/sqrt(Hz) by dividing my voltages from the spectrum analyzer by sqrt(binsize), and the PSD of the white noise should be the same magnitude however when I do this my PSDs are not in the same order of magnitude.
I use a rectangular window as I'm sampling white noise and I view the data in dbV and export it as (linear) voltage.
Observations:
-If I use different binsizes / amounts of bins in the same frequency range the magnitude of the PSD matches as expected.
However with different frequency ranges the magnitude of the PSD doesn't match in magnitude after calculation.
Can anyone help me see what I'm doing wrong and explain how the output of the spectrum analyzer are calculated? Are the units not just V (/bin) ?
As you can see the Average value is (approximately) -58.25dBm.
Using this calculator here: http://coretechgroup.com/dbm_calculator/), we have:
-58.25dBm = 0.00268 V[p-p], or 0.0009475 V[rms] / sqrt(Hz)
= 0.0000008978 V[rms]^2 / Hz
The number of bins used here were 131072, which gives us
0.0000008978 * 131072 * 2 = 0.2353 V^2 (we need to double the number of bins to include the negative frequency spectrum not shown in the FFT plot)
The Scale used was dBm which is the voltage dissipated into a 600 ohm load, which means that the noise power is approximately given by:
0.2353 / 600 = 0.0003922 W or 392uW
If you look at the value given for the Total Power of the noise spectrum in the Spectrum Plot, you will see that the value is 273uW which is a difference of +1.57 dBm (which is a bit larger than I expected but certainly nothing like an order of magnitude different).
I hope this gives you a better explanation.
Regards,
Gerry
-->
Hi Sek,
In the post you refer to I mentioned that the calculation that we perform was corrected to power = sum of (V^2) / impedance, to make a clear enough distinction from the way we were performing the calculation, without referring to any in depth maths. Technically, this will actually (not supposedly) give you the correct value, but there are some calculations you need to do prior to that to get there from a Spectrum Plot.
Where your confusion arises is that the plotted values in Spectrum Mode are actually not voltages. If you were to use the Linear y-axis then the plotted values would be V/sqrt(Hz), however, if you're using a dB scale (which I'm guessing is what you're using because you have a lot of difficulty finding the signal in a linear y-scale plot unless it's very high level) then they are dBm/sqrt(Hz).
So, if you wanted to perform the calculation manually you would need to first convert each dBm/sqrt(Hz) value back to V/sqrt(Hz) from its decibel value, and then square each value to get V^2/Hz, and divide by the number of values to get V^2 (which are the parts I didn't include for the calculation in your link, for brevity as mentioned). Then you need to sum each value over the complete frequency range, to get the total of V^2, and finally divide by the impedance to get the power.
Worked Example
So, to do an example calculation, in the example below I've used a white noise signal source, which allows us to simplify the calculations by using a reasonably close mean of all of the plotted values. I've left the wave-forms running with the Display mode set to 'Average' to get a more accurate statistical mean for calculation.
White noise example.psdata
As you can see the Average value is (approximately) -58.25dBm.
Using this calculator here: http://coretechgroup.com/dbm_calculator/), we have:
-58.25dBm = 0.00268 V[p-p], or 0.0009475 V[rms] / sqrt(Hz)
= 0.0000008978 V[rms]^2 / Hz
The number of bins used here were 131072, which gives us
0.0000008978 * 131072 * 2 = 0.2353 V^2 (we need to double the number of bins to include the negative frequency spectrum not shown in the FFT plot)
The Scale used was dBm which is the voltage dissipated into a 600 ohm load, which means that the noise power is approximately given by:
0.2353 / 600 = 0.0003922 W or 392uW
If you look at the value given for the Total Power of the noise spectrum in the Spectrum Plot, you will see that the value is 273uW which is a difference of +1.57 dBm (which is a bit larger than I expected but certainly nothing like an order of magnitude different).
Hi Gerry
Thanks you answer however I am still confused because you say the unit is V/sqrt(Hz). It's not the actual calculations I have problems with it's the consistency of the output of the spectrum analyzer using the same waveform but different settings in the spectrum analyzer.
When the numbers of bins change(and therefore binsize) the magnitude changes. If the unit is V/sqrt(Hz) the magnitude should stay the same with different bin sizes as it should be normalized with root binsize.
For example I observe going from 16k to 8k bins change the magnitude ~-3dB
This change lead me to believe the unit was V/bin but then the change should be the other way around: I would expect +3dB with twice the binsize since it contains twice the power.
Can you clarify this change in magnitude related to the # of bins?
Below is a screen shot of a square wave from the Sig Gen at just below the maximum level of the ±1V input range (I used the largest possible signal, without creating an over-range warning, to show the maximum amount of change possible) displayed in spectrum mode at maximum frequency resolution (using 1048576 bins).
Below is a video capture of stepping back up through the number of bins, and as you can see there is a minor variation (less than 1dBV) that is non-deterministic and certainly not -3dB with every halving of the number of bins (or doubling of the bin size).
Our Spectrum Mode plot is of a Voltage or Amplitude Spectrum (as opposed to a Power Spectrum), so the units of the values are V/√Hz (to quote Wikepedia from here: https://en.wikipedia.org/wiki/Spectral_density "Sometimes one encounters an amplitude spectral density (ASD), which is the square root of the PSD; the ASD of a voltage signal has units of V Hz^[-1/2]"). It is a Voltage Spectrum because we apply coherent gain to the window function to allow the amplitude level to be conserved before and after the FFT, which is what my video capture shows.
Could you post an example of what you're describing as a psdata file so that we can step through the bin sizes and see what is happening.
This is an old thread by now, but I'm also confused by the units in PicoScope 6's spectrum mode.
Gerry, thank you for showing the above example. I do however see the effect that Sek is referring to. Below are a series of spectra taken on the same DC - 1MHz white noise source while keeping the same frequency band and changing the number of frequency bins. For every change in bin number by a factor of 8, the amplitude of the measured white noise signal changes by ~9 dBV. The spectrum seems to show units of dBV/bin.
You are not seeing a change in the signal amplitude in your square wave example when you change bin number, because you are not resolving the very narrow peak. At the frequency of your square wave, the signal you are providing is much much larger than the noise floor. And so the amount of signal/bin that you see remains constant at that frequency, since the entire signal always fits within 1 bin. If you were able to increase your frequency resolution in order to see the spectral width of the fundamental tone of your square wave (which is going to be <<1 Hz for any signal generator worth a damn), then you would see the signal amplitude change as you changed your bin size. Watch how your noise floor changes in your example; that is resolvable, and I bet that is changing as you change your bin size.