DSPRelated.com
Forums

FFT noise measuring error

Started by isa October 21, 2003
hello.

In Matlab I am generating a signal and noise. 

I am trying to measure both the signal and the noise (separately) to check I am
generating the correct values.
I use a 512 point FFT for this. The FFT is complex. My input signal is real
only. My sample rate 512MHz. My signal is 100MHz.
The reading I use is the maximum of all the outputs after taking the magnitude.


If I have a 1 volt peak to peak input signal, my FFT reads 13 dBm (assuming into
50 Ohm).
If I have a 1 volt RMS input signal, my FFT reads 10 dBm (assuming into 50 Ohm).
I think this is correct.


If I then try to test my noise I get a 3dB error.

My noise is 
10dB noise figure
20 dB gain
300K temperature

So into my peak bin I expect to see
1.38x10^-23 x 300 x 1x10^6 x 10 x 100
=4.14X10-12
=-83.8dBm

However when generate this noise I get -80.3 dBm reported using the same FFT as
I checked using the sine signal.



To generate my output I do the following:

Take the FFT
Find the modulus of each bin
Multiply by 1/512 to correct for the FFT gain
square the values and multiply by 1000/50, to get mW into 50 ohm
multiply by two because I split my power between +freq and -freq. (This bit
concerns me)
take the maximum value as my peak bin

This gives me my expected 10dBm and 13dBm numbers.
So I get the right numbers, so I think I am doing it right.
Can you tell me if I got it right deliberately or just by chance?


To calculate noise, I add a further stage to generate the average of 100 FFT
outputs.

I need to know if I have an error in my measurement, or I am generating the
wrong values for the signal or the noise, or to understand why I do not get the
number I expect.
Thank you if you can help me.

Isa
isa wrote:

> hello. > > In Matlab I am generating a signal and noise. > > I am trying to measure both the signal and the noise (separately) to check I am > generating the correct values. > I use a 512 point FFT for this. The FFT is complex. My input signal is real > only. My sample rate 512MHz. My signal is 100MHz. > The reading I use is the maximum of all the outputs after taking the magnitude. > > > If I have a 1 volt peak to peak input signal, my FFT reads 13 dBm (assuming into > 50 Ohm). > If I have a 1 volt RMS input signal, my FFT reads 10 dBm (assuming into 50 Ohm). > I think this is correct.
I don't think so. 1 V P-P = .3535 V RMS. If 1 V RMS ��������-> 10 dBm (10 mW), then 1 V P-P (1/8th of the power; 9 dB less), is 1 dBm. 1 V peak = .707 V RMS. 1 V P-P is half of that.
> > > If I then try to test my noise I get a 3dB error. > > My noise is > 10dB noise figure > 20 dB gain > 300K temperature > > So into my peak bin I expect to see > 1.38x10^-23 x 300 x 1x10^6 x 10 x 100 > =4.14X10-12 > =-83.8dBm > > However when generate this noise I get -80.3 dBm reported using the same FFT as > I checked using the sine signal. >
Maybe you need to recalibrate.
> >
... Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Jerry.

You are correct that I have an error, but it is just in what I wrote. 
My input signal is 1 volt amplitude. +1 volt to -1 volt.
This gives 13 dBm, so I think my calibration is OK.

Do you think my method is right.
Is there a general reference of how to get from FFT output to dBm?
Is there anything special about measuring noise when in an FFT? 

Thank you

Isabelle.







Jerry Avins <jya@ieee.org> wrote in message news:<bn55ji$9ah$1@bob.news.rcn.net>...
> isa wrote: > > > hello. > > > > In Matlab I am generating a signal and noise. > > > > I am trying to measure both the signal and the noise (separately) to check I am > > generating the correct values. > > I use a 512 point FFT for this. The FFT is complex. My input signal is real > > only. My sample rate 512MHz. My signal is 100MHz. > > The reading I use is the maximum of all the outputs after taking the magnitude. > > > > > > If I have a 1 volt peak to peak input signal, my FFT reads 13 dBm (assuming into > > 50 Ohm). > > If I have a 1 volt RMS input signal, my FFT reads 10 dBm (assuming into 50 Ohm). > > I think this is correct. > > I don't think so. 1 V P-P = .3535 V RMS. If 1 V RMS &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;-> 10 dBm > (10 mW), then 1 V P-P (1/8th of the power; 9 dB less), is 1 dBm. > > 1 V peak = .707 V RMS. 1 V P-P is half of that. > > > > > > If I then try to test my noise I get a 3dB error. > > > > My noise is > > 10dB noise figure > > 20 dB gain > > 300K temperature > > > > So into my peak bin I expect to see > > 1.38x10^-23 x 300 x 1x10^6 x 10 x 100 > > =4.14X10-12 > > =-83.8dBm > > > > However when generate this noise I get -80.3 dBm reported using the same FFT as > > I checked using the sine signal. > > > Maybe you need to recalibrate. > > > > > ... > > Jerry
isa wrote:

> Jerry. > > You are correct that I have an error, but it is just in what I wrote. > My input signal is 1 volt amplitude. +1 volt to -1 volt. > This gives 13 dBm, so I think my calibration is OK. > > Do you think my method is right. > Is there a general reference of how to get from FFT output to dBm? > Is there anything special about measuring noise when in an FFT? > > Thank you > > Isabelle. > > > > > > > > Jerry Avins <jya@ieee.org> wrote in message news:<bn55ji$9ah$1@bob.news.rcn.net>... > >>isa wrote: >> >> >>>hello. >>> >>>In Matlab I am generating a signal and noise. >>> >>>I am trying to measure both the signal and the noise (separately) to check I am >>>generating the correct values. >>>I use a 512 point FFT for this. The FFT is complex. My input signal is real >>>only. My sample rate 512MHz. My signal is 100MHz. >>>The reading I use is the maximum of all the outputs after taking the magnitude. >>> >>> >>>If I have a 1 volt peak to peak input signal, my FFT reads 13 dBm (assuming into >>>50 Ohm). >>>If I have a 1 volt RMS input signal, my FFT reads 10 dBm (assuming into 50 Ohm). >>>I think this is correct. >> >>I don't think so. 1 V P-P = .3535 V RMS. If 1 V RMS &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;-> 10 dBm >>(10 mW), then 1 V P-P (1/8th of the power; 9 dB less), is 1 dBm. >> >>1 V peak = .707 V RMS. 1 V P-P is half of that. >> >>> >>>If I then try to test my noise I get a 3dB error. >>> >>>My noise is >>>10dB noise figure >>>20 dB gain >>>300K temperature >>> >>>So into my peak bin I expect to see >>>1.38x10^-23 x 300 x 1x10^6 x 10 x 100 >>>=4.14X10-12 >>>=-83.8dBm >>> >>>However when generate this noise I get -80.3 dBm reported using the same FFT as >>>I checked using the sine signal. >>> >> >> Maybe you need to recalibrate. >> >>> >> ... >> >>Jerry
Square and sum your samples, dividing the sum by the number of samples; don't bother with the FT. That will give you a number proportional to power. Do the same for signal and for noise; that will give you a conversion. Note that I wrote "proportional". The actual measure depends on calibrations outside the calculation: the converter reference, gain between the signal source and the converter, gain or attenuation in filters. dBm refers to power relative to one milliwatt. Technically, it is independent of impedance level, but many workers use it as a voltage measure, assuming that the impedance is 600 ohms. The proper unit in that case is dBu, but few have heard of it and fewer use it. 0 dBu = sqrt(.6) volts, or about .7746 volts. To calibrate an FFT or other power calculation, you need to tie the numbers the world outside the computer. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
isa wrote:

> Jerry. > > You are correct that I have an error, but it is just in what I wrote. > My input signal is 1 volt amplitude. +1 volt to -1 volt. > This gives 13 dBm, so I think my calibration is OK. > > Do you think my method is right. > Is there a general reference of how to get from FFT output to dBm? > Is there anything special about measuring noise when in an FFT? > > Thank you > > Isabelle. > >
... Whatever your reference may be, you described a 2 V P-P signal. Assuming sinusoidal waveform. that's .707 V RMS, a tad less than 0 dBu, and 3 dB less than 1 V RMS. Does that help? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;