From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

RF Measurement Devices

cancel
Showing results for 
Search instead for 
Did you mean: 

Power Spectrum VI gives different peak amp. vs RFSA front panel?!?

Hey guys,

I have a problem that's been bothering me for some time.  The issue is that the FFT Power Spectrum and PSD VI gives me a different peak amplitude for test signals that the RFSA soft front panel gives me.  Here's what I'm doing:

 

I transmit a sine wave at IQ rate of 2MHz, carrier freq. 5.5GHz from a VSG (separate box) into the RFSA.  When looking at the spectrum in in the Soft Front Panel application, the height of the peak is -50dBm and very stable.  I also tested this by transmitting into our other HP spectrum analyzer, and got nearly the exact same result, -50dBm peak height.  So, I am quite confident that this is an accurate measure of the received signal power.

 

However, when I try to use the very same RFSA to receive a signal and analyze with a simple labView program, I get problems.  I take the output of the RFSA Fetch IQ VI, and funnel it into the FFT Power Spectrum and PSD VI, and plot the result on screen.  The spectrum looks as it should, except that the peak height of the sine wave is at -60 dBm!  I have the VI set to power spectrum, not PSD. 

 

Has anyone seen this strange behavior?  I have tried at least 5 different methods of computing a power spectrum in Labview, but none of them give me the same peak height as the Soft Front panel, and the spectrum analyzer hardware!  Our experiment depends on getting accurate amplitude information, and I feel that there is a problem with how the peak is being computer in the VI, or I am missing something.  Could someone experienced with the Power Spectrum VI please help?  I need to know how to hook up the Power Spectrum VI such that it gives me the same result as the Soft Front Panel.

 

Thanks so much!

Brian

0 Kudos
Message 1 of 12
(9,490 Views)

Hi Brian,

I set up a test of this and I'm not seeing the same discrepancy between the two programs. I started with the example RFSA Acquire Continuous IQ.vi and made the modifications shown below to turn the IQ data into a scaled complex waveform, and then ran that into the FFT Power Spectrum and PSD.

 

RFSA Acquire Continuous IQ Modifications.png

 

The steps above de-interleave (or decimate) the array of IQ pairs and then combine them into a complex number. After that I scaled them by the number of samples (in this case 10000) and made the step size the inverse of the bandwidth (20M). Running this into a waveform graph shows a signal that passes the eye test of being the same as what the Soft Front Panel shows. There may be some difference since I didn't do a peak search but nothing like the 10 dBm shift you are seeing.

 

FFT PS vs SFP.png

 

Are you performing the same calculations on the samples in your LabVIEW program? If so then I would double check the "Amptd" settings in the SFP to make sure they align with the settings in your program.

 

Regards,

Peter Williams

0 Kudos
Message 2 of 12
(9,471 Views)

Hmm, thank you for taking a look at this.  I am also using the RFSA Acquire Continuous IQ VI as a base.  In my version, I use the waveform instance of the RFSA fetch IQ VI, which gives complex data.  I am then feeding it directly into the PS/PSD VI.  Why are you scaling the data in your version like this? 

 

I figured my issue was something to this effect.  If you could explain why you manipulate the output of the Fetch VI like this, I think I will understand my problem.  From my perspective, the Fetch VI gives you complex WDT, measured in volts, so it could be fed into the PS/PSD VI directly.  Apparently this is wrong. 

 

Thanks for clarifying.

Brian

0 Kudos
Message 3 of 12
(9,454 Views)

Hi Brian,

 

If you do not need to simultaneously view the spectrum and analyze the IQ data for other purposes, you may consider setting the acquisition type to Spectrum rather than IQ.  In this mode, you can specify parameters like Span and RBW directly and the NI-RFSA driver will then handle creating the spectrum for you.  In general, this is the mode that the NI-RFSA Soft Front Panel is using to display the spectrum.

 

For an example of calculating a spectrum from IQ data in the same way as the NI-RFSA Soft Front Panel, I recommend looking at the Triggered Spectrum Example found at:

https://decibel.ni.com/content/docs/DOC-22813

This example utilizes the Spectral Measurements Toolkit (SMT) for calculating the spectrum.

 

0 Kudos
Message 4 of 12
(9,432 Views)

Thank you for the examples.  I was aware that the RFSA can generate the spectrum directly.  However, what I am really trying to understand is why this is wrong:

RadioBOT server spectrum map screenshot.jpg

There must be some scaling of the data that I am missing.  I want to know what the problem is here so that I can avoid it in the future.  The waveform graph displays output that is about 10dBm LOWER than what is displayed on the soft front panel. 

Thank you for the examples and other info.  If you can tell me why the above is giving me bad output, I will greatly appreciate it and close the topic.  Thanks for your help!

Brian

0 Kudos
Message 5 of 12
(9,419 Views)

I'm facing the exact same problem.

I'm not 100% I'm still studying the problem my guess is it could connected to the Video BW settings of the RFSA

 

http://venus.ni.com/white-paper/13869/en

 

Any suggestion is more than welcome.

For the sake of clarity my test signal is similar to DME signal: a couple of pulses spaced by 12us on a carrier of 1GHz.

 

Regards

Filippo

 

 

FiloP
It doesn't matter how beautiful your theory is, it doesn't matter how smart you are. If it doesn't agree with experiment, it's wrong.
Richard P. Feynman
0 Kudos
Message 6 of 12
(9,203 Views)

I'm glad someone has reproduced this issue.  I still don't know the answer.  Hopefully someone from NI will hook up a VI like I have shown and can explain why we don't get the right spectrum amplitude. 

0 Kudos
Message 7 of 12
(9,194 Views)

Hi Brian,

 

I believe you are seeing this because the SFP is returning the value in dBm whereas the FFT Power Spectrum and PSD VI is allowing you to choose dB or Vrms but not dBm. By returning the value as Vrms (dB On? to False) and then manually converting the peak to dBm then the value was coming out to what I was seeing on the SFP, at least for the few test cases I tried. Digging into the FFT... subVI functions there is a conversion to dB with a reference to "1" that isn't clearly labeled, but most likely isn't 1 mW for dBm. If you want the graph to show exactly what is in the SFP then I would recommend looking at the examples Matt linked above that reference the actual architecture of the SFP and use the Spectral Measurements Toolkit VIs instead.

 

Regards,

Peter W.

0 Kudos
Message 8 of 12
(9,171 Views)

OK thanks, I think I see your point.  From now on we will compute the FFT's, being more mindful of the unit of measurement.  Hopefully that will take care of whatever scaling problem is occurring.

-Brian

0 Kudos
Message 9 of 12
(9,150 Views)

I just posted a seperate post on a similar topic...as I too have been running into issues trying to convince myself I understand what NI's vi's are giving me and what the units really mean.

 

I've noticed that if you drill down into the Power Spectrum and PSD.vi....you'll find there's a vi called, "One Sided Power Spectrum".  In this vi...there's another VI called "Power Spectrum.vi", that ends in a code interface node.  However, the artwork of this vi suggests that it takes in IQ samples, and returns V^2_rms.

 

This V^2_rms then goes into the "Convert to dB.vi"...where, with the "Power Spectrum" option chosen, simply does 10*log10(V^2_rms).

 

Based on Peter's suggestion....I took the "dB" output from the Power Spectrum and PSD.vi...went back to V^2_rms....then dividedn that by 50ohms and divided again by 1mW....THEN did 10*log10 of that to get to dBm.  However....the "dBm" result is about 10 higher than the "dB" result.....which is leading me to think that the V^2_rms that the Power Spectrum and PSD.vi calculates is already scaled by 50ohms and referenced to a mW?

 

Is this possible?  As I mentioned, I'm unable to verify this by looking at the code since the VI that does this computation is a CIN.

 

---

Brandon

0 Kudos
Message 10 of 12
(9,058 Views)