Re: Computed Power Range Does Not Match Spectrum Analyzer



>Bhaskar Thiagarajan wrote:
>> "allendm2001" <allendm2001@xxxxxxxxx> wrote in message
>> news:6uKdnfHS15In5iDenZ2dnUVZ_v6dnZ2d@xxxxxxxxxxxxxxx
>> > I'm new to DSP and am attempting to use an FFT to approximate in
software
>> > the output of a hardware spectrum analyzer. Using MATLAB, I
calculate the
>> > power as follows:
>> >
>> > fftOut = fft(samples,512);
>> > magnitude = fftOut. * conj(fftOut);
>> > scaled = magnitude. / 512;
>> > power = 10 * log10(scaled);
>> >
>> > The resultant power spectrum looks like the signal displayed on the
>> > spectrum analyzer, however the range is much different. Power values
from
>> > the Matlab power spectrum range between +90 and +150dB, whereas
power
>> > values on the spectrum analyzer range from -40 to -100dB. Am I
doing
>> > something wrong in my calculation, or do I have to adjust my output
by
>> > some constant. If I do have to adjust, why?
>>
>> Power values on the spectrum analyzer are probably in dBm (not dB).
This
>> means they are absolute amplitude measurements (not relative...which
would
>> be dB). dBm is a power value reference to 1 milliwatt of power. A
spectrum
>> analyzer is a calibrated receiver and can apply the appropriate offsets
and
>> scaling based on it's internal gain and attenuation settings.
>>
>> When you make power spectrum measurements in Matlab, you are going to
need
>> some information about your sampled data to apply similar corrections.
>> Without this, the best you can do is to normalize your fft output to
the
>> largest signal. That'll give a 0dB (not dBm) output for your largest
signal
>> and you can look at other signals relative to this.
>>
>> So I'd do something like
>> scaled = magnitude/max(magnitude). (BTW, what you have isn't magnitude
but
>> power here).
>>
>> At this point you should only be off by a single offset value between
the
>> spectrum analyzer and your matlab output.
>>
>> Cheers
>> Bhaskar
>>
>> > Thank you,
>> >
>> > Doug Allen
>> > Praxis Engineering Technologies, Inc.
>> > dmallen@xxxxxxxxxxxxx
>> >
>
>This is something I've dealt with many times, and it can be tricky. It
>also depends on whether your input signal is noise or tones. Here is
>one approach for tones. Start by feeding a maximum value, Fs/4 sequence
>into the FFT. For example if you have a 16 bit ADC, feed in
>32767,0,-32768,0,etc. After you convert your FFT bin magnitudes into
>decibels (10log10(I^2+Q^2)), add a scale factor to adjust the center
>bin up to zero dB. This factor will vary with the window. After the
>factor is applied, your FFT is producing data in units of dBFS, or dB
>relative to ADC full scale.
>
>The next step is to figure out how much input signal produces peak
>value samples from your ADC. You can do this by looking at some of your
>ADC values as feed a sine wave into it from a signal generator. Try a
>sinewave with a low digital frequency and adjust the level until the
>peaks get close to the maximum and minimum values, 32767 and -32768.
>Then record the power of the signal generator, typically in dBm. A
>typical value might be -10 dBm, but it depends on what is in front of
>the ADC, the ADC itself, as well as the output impededance of your
>generator. You can work this out from the schematic and data sheet but
>you will want to test it anyway.
>
>If you know that -10 dBm produces full scale ADC values, then you can
>just add 10 dB to the scaled FFT output to convert those values into to
>dBm at the generator output. If you have RF and IF gain in front of the
>ADC, then you can subtract that gain directly to get dBm at the antenna
>input.
>
>John
>
>

Thank you all for taking the time and being so incredibly responsive to my
questions.

Doug


.



Relevant Pages

  • Re: Computed Power Range Does Not Match Spectrum Analyzer
    ... >> I'm new to DSP and am attempting to use an FFT to approximate in software ... >> The resultant power spectrum looks like the signal displayed on the ... >> spectrum analyzer, however the range is much different. ... relative to ADC full scale. ...
    (comp.dsp)
  • Re: SNR of quantisation noise
    ... the total noise power is going to be the same after a Fourier transform ... fft resolution has effect in the sense of measurement. ... Windowing is relevant if it masks the noise floor. ... ADC + signal combination is totally agnostic to the FFT, ...
    (comp.dsp)
  • Re: SNR of quantisation noise
    ... the total noise power is going to be the same after a Fourier transform ... so the SNR won't change. ... fft resolution has effect in the sense of measurement. ... ADC + signal combination is totally agnostic to the FFT, ...
    (comp.dsp)
  • Re: PSD on a spectrum analyzer.
    ... Ordinary spectrum analyzers sweep the filter across the band of interest, so what you see is not only the power in that filter bandwidth, but the power that's at each frequency at the moment the filter is there. ... So what you see on a spectrum analyzer is heavily influenced by the relationship between the nature of the modulation causing the bandwidth spreading and the sweep rate of the analyzer. ...
    (rec.radio.amateur.homebrew)
  • Re: How was it known that mics were good before the advent of hi-fi playback?
    ... need for a FFT in a communications receiver, ... perhaps as an extra-fancy tuning indicator. ... ham receiver at home; it's just an ordinary if somewhat ... don't get seen on a regular spectrum analyzer. ...
    (rec.audio.pro)