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) ?

## Output of spectrum Analyzer

### Re: Output of spectrum Analyzer

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.

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

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.

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

Gerry

Technical Specialist

Technical Specialist

### Re: Output of spectrum Analyzer

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?

Regards Sebastian

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?

Regards Sebastian

### Re: Output of spectrum Analyzer

Hi Sebastian,

I'm not seeing what you're describing.

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.

Regards,

Gerry

I'm not seeing what you're describing.

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.

Regards,

Gerry

Gerry

Technical Specialist

Technical Specialist