To download NI software, including the products shown below, visit ni.com/downloads.
From a high level, spectrum monitoring involves examining the frequency content of a spectral band as a function of time. At a lower level, the requirements and complexity of spectrum monitoring applications range from straightforward to quite involved. On the straightforward side, you may need to perform only a quick visual inspection of a running, averaged spectrum over a specific band. More involved applications build on this idea, possibly keeping a history of the spectrum and performing analysis either in real-time or offline.
NI USRP hardware offers up to 20 MHz real-time bandwidth and up to 40 MHz real-time bandwidth in a reduced dynamic range mode. Because the NI USRP-2920 relies on the host computer for processing, the real-time bandwidth that it can continuously sustain depends on a variety of factors:
Because many of these factors are situation-dependent, the maximum sustainable real-time bandwidth is also situation dependent.
For applications that require bandwidth monitoring greater than the real-time bandwidth acquisition capability of the NI USRP radio transceiver, you can construct an aggregate spectrum. This example shows you how to acquire portions of the spectrum and build an aggregate spectrum piece by piece over time.
The example block diagram shows an aggregate spectrum built up band by band. The acquisition VI marked as step 4 is surrounded by two For Loops. With each iteration of the outer loop, the VI retunes the NI USRP radio transceiver to a new sub-band frequency for a new set of acquisitions at that frequency. The inner loop calls the acquisition VI multiple times to acquire a set of acquisitions to calculate an averaged spectrum.
LabVIEW 2011 or compatible
NI USRP 1.1 or compatible
NI USRP 292x RF Transceiver
Download and unzip WB Spectrum Example VIs.zip.
Open Simplified WB Averaged Spectrum.vi.
Input the USRP IP Address of your device and configure the Rx parameters.
Run the VI and observe the FFT Power Spectrum.
Other spectral monitoring examples can be found in the NI-USRP shipping examples located in the Start Menu >> National Instruments >> NI USRP Examples.
Additional-Separate-2Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
I get the following error message:
Property Nodes (arg 5) in subsetupRxHWParameters.vi->subSetParameters(HL).vi->Simplified WB Spectrum Sense (Averaged).vi <ERR>
The specified attribute ID is not recognized.
There is no content in link for the description.
The example requires the ni-usrp driver Ver 1.1 or higher. Ver 1.1 includes some new properties that werent part of Ver 1.0. The new driver will be released in less than a month and is avail now as a prerelease.
--Sam
Sam Shearman
Senior Product Mgr, National Instruments
Cell: (512) 576-6170
Sent from my iPhone.
Hi,
there is a little mistake in the program:
if you try to average with: RMS average, Linear, Number of averages = 2,
the mistake will be visible in the spectrum,
for example in the wideband spectrum with only one strong narow carrier, instead of one line you can see two lines.
The second line, moved to upper frequencies exactly by the half of "df" is the mistake.
The "ghost" carrier, which should not be there is made by averaging moved by one iteration.
In the smallest loop in the main VI, there is shift register, but the iteration number "i" should be shifted by shift register too.
Problem solved.
Thanks for nice example.
Regards.
Neo
VSB Technical University Ostrava.
Czech republic
Hello Neo -
These suggestions are very helpful. Please post your updated code to this
page in the community. We would very much like to learn how you are using
the USRP and LabVIEW in your research.
Best Regards,
Erik
I'm getting a change in the gain as the program steps through the frequencies. Below shows the IQ waveform samples at their original scale:
After stepping through the first few frequency ranges, there is a jump in the gain. Notice the jump in the amplitude. The underlying signal is just noise.
Upping the sampling rate so that the entire frequency range is covered in one step shows that the spectrum is clean:
The following shows the modifications I made to monitor the input waveform:
Any help would be appreciated.
-John
University of Virginia
I found a new problem with the spectrum monitoring software. Here is a sweep of the FM spectrum with a strong signal at 97.5 MHz with a sampling rate of 200 kHz:
Here is the same spectrum swept with a sampling rate of 1MHz:
The 97.5 channel appears at a higher frequency as you increase the sampling rate.
-John
Hi John,
I've just posted a revised version of the example (see the zip file dated 9/6/2012) that addresses theproblem of a frequency shift being a function of sampling rate. As you rightly pointed out, the sampling rate (bandwidth) should b independant of the location of the peaks and other components of the spectrum. The gain change is another issue that I'm still working on for this example.
--Sam
Hi everybody,
When I run the example "Simplified WB Spectrum Sense (Averaged)", some errors are reported: niUSRP Open Rx Session.vi<ERR>A runtime or configuration error occurred. Code: 1440 Details: RuntimeError: Please update the firmware and FPGA images for your device. See the application notes for USRP2/N-Series for instructions. Expected protocol compatibility number [7 to 11], but got 12: The firmware build is not compatible with the host code build. I use the USRP N200 and Labview 2012. The installed USRP driver is niUSRP 110. Is there anybody can tell me the reason? thanks a lot!
I have downloaded the 952012 version of this code and am getting the same error as YYYs:
Property Node (arg 5) in subsetupRxHWParameters.vi->subSetParameters(HL).vi->Simplified WB Spectrum Sense (Averaged).vi <ERR>
The specified attribute ID is not recognized.
Any help would be appreciated 🙂
Hello -
Are you using the NI USRP 1.2 version of the driver?
https://www.ni.com/en/support/downloads/drivers/download.ni-usrp.html#306988
Erik
Hi Sherman,
I could not find the updated version (see the zip file dated 9/6/2012). I can only see the old version. Can you please reattach it.
Thanks
The code posted contains the latest updates made to the example in september of 2012. Feel free to make improvements and post your own enhanced code!
Hi airflyflame,
The reason for your error is that you are using the wrong FPGA bit file. Load the one, which is provided with the NI driver and you'll be fine.
I have the same issue, but I cannot use the provided FPGA bit file, because I have my own FPGA bit file, which is a self-developed extension to the Ettus FPGA source code, which has protocol compatibility number 12. As long as I worked with earlier versions of the FPGA source code, the NI driver was functional too. Could NI tell us, when you are going to update the Labview driver to be compatible with the latest Ettus FPGA bit file?
Vojtech
Hi, I have a question. What parameter (time in Rx Average power) ? Acq duration is averaging time????
Hi, Thanks for the example.
I am new to USRP and Labview, I need to do exactly the same thing you are doing in this code. I need to find out the signal strengths of higher frequencies.
Being from Computer Science background I have no idea about transforms and averaging etc.
I am getting an error while running the code, Can you please help me with it.
Error : -1074118626 niUSRP Initiate.vi<ERR>The local oscillator did not lock within the allotted time.
PLEASE HELP ME
I changed the Acq Duration to 10m otherwise the code won't start and I would get the same error in the beginning.
Error : -1074118626 niUSRP Initiate.vi<ERR>The local oscillator did not lock within the allotted time.
I an doing wideband spectrum monitoring. USRP 2920 is sweeping across 50 MHz to 01 GHz. I get this error mostly in 1st sweep and sometimes after sweeping the whole band 02 times.
Any help would be valuable.
Hi sshearman you have done good work uploading the example code for wide band spectrum analysis. As per the comments above which are quite old i couldn't find your updated example code. Could you please update the code and any updates on gain?