1. Spectrum Monitoring
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. Whereas, more involved applications build on this idea, possibly keeping a history of the spectrum and performing analysis either in real time or offline.
This article discusses how to build custom spectrum monitoring systems using NI USRP hardware and NI LabVIEW system design software. NI USRP hardware combines with software based on LabVIEW to form a flexible foundation that is effective for many spectrum monitoring applications.
2. Building a Basic Spectrum Analyzer With NI LabVIEW Software and NI USRP Hardware
Flexibility and easy programmability are key strengths of the NI USRP platform. As a PC-hosted peripheral that is programmable with NI LabVIEW, the NI USRP radio transceiver excels at these. The examples presented in this paper address this point and show how you can build custom LabVIEW VIs to control NI USRP hardware and process the signals associated with it.
The example in Figure 1 is a LabVIEW application that implements a basic spectrum analyzer based on NI USRP hardware with a running display of the history. The figure shows a snapshot of the VI Front Panel (user interface) for a NI USRP-2920 radio transceiver examining a 1 MHz band of the local FM broadcast band centered at 90.5 MHz (a local radio station). The plot in the upper right corner shows a fast Fourier transform (FFT)-based power spectrum of the current acquired frame with the y-axis plotted on a dB scale. The spectrum history chart in the lower right corner shows a history of the FFT-based power spectrum depicted on an intensity chart. On this display, you can see a running history of the energy content of the band, with the x-axis showing the historical frame number, the y-axis showing the frequency, and the z-axis (the color axis) showing the dB scaled signal level.
Figure 1. This LabVIEW VI example, niUSRP EX Spectral Monitoring (History).vi, shows the front panel (user interface) for a basic NI USRP spectrum analyzer and is included with the NI-USRP driver.
Figure 2. The block diagram for the Ex Spectral Monitoring.vi example shows the LabVIEW graphical programming that you can use to connect with, configure, and acquire live I/Q baseband signal samples from NI USRP hardware. This example repeatedly acquires new frames of data while calculating and displaying an FFT-based power spectrum of each frame.
Figure 2 shows the block diagram (the LabVIEW graphical source code) of the example niUSRP Ex Spectral Monitoring.vi from Figure 1. The textual annotation on the block diagram points out the action of key parts of the code.
This example sets the NI USRP-2920 radio transceiver to acquire continuously at a rate specified by the I/Q sampling rate (S/s) control on the front panel. Figure 1 shows the example running continuously at a rate of 1 MS/s. You can see the processing is continuously applied—a loop in the LabVIEW code calls the NI USRP Fetch Data subVI (marked Step 5) repeatedly until the user presses the Stop button or an error occurs. With each loop iteration, the driver VI returns a data frame consisting of a user-specified number of complex valued samples. For this example, the samples/frame control on the front panel has been set to 10000, so that number of samples is processed per loop iteration.
3. Wideband Spectrum Monitoring
The above example shows how you can build a simple spectrum analyzer that continuously displays the spectrum in a fixed band. The example also shows a 1 MHz real-time bandwidth being analyzed with a combination of 1 MS/s I/Q sampling rate and 10,000 samples per frame.
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:
- Maximum real-time rate sustainable by the NI USRP-2920
- Computational capability of the host PC
- Amount of memory on the host PC
- Efficiency of the LabVIEW application and other software associated with the NI USRP-2920
- Background processes running on the host PC (for example, background virus scanner)
- Network traffic on the Gigabit Ethernet network hosting the NI USRP-2920
- Efficiency of the host PC network adaptor
Because many of these factors are situation dependent, the maximum sustainable real-time bandwidth is also situation dependent.
Now consider what is possible with the laptop-based system configuration being used to write this text. Figure 3 shows the system information including the Windows performance information for this setup, a laptop running Windows 7 with an Intel Core 2 Duo CPU running at 2.4 GHz, the laptop's 4 GB of RAM, and a Windows Experience Index of 3.4. Also, the system configuration is running several background applications including a virus scanner, a word processor, an image editing application, and an Internet browser.
Figure 3. The system information screen shows some of the key performance characteristics of the PC you are using to run the example VIs with a connected NI USRP-2920.
As discussed earlier, this configuration can continuously process 1 MHz bandwidths using a frame size of 10,000 samples per frame. Although the same configuration handled 5 MHz and 10 MHz bandwidths with the same frame size continuously (Figure 4), this setup was not able to consistently sustain higher rates continuously.
Figure 4. The laptop-based configuration used to write this article was capable of sustaining 5 MHz and 10 MHz bandwidth processing continuously but was not able to consistently sustain higher rates continuously.
4. Wideband Spectrum Analysis With the NI USRP Platform
One way to increase the continuous real-time bandwidth of a spectrum monitoring application based on LabVIEW and NI USRP is to change the system configuration. This involves either optimizing the existing setup or moving to a different setup with a faster CPU, increased memory, and so on.
For applications that do not require continuous processing, you can acquire portions of the spectrum and build an aggregate spectrum piece by piece over time. This idea is implemented in the downloadable Wideband Spectrum Monitoring example shown in figures 5 and 6.
Figure 5. 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, as shown in this example.
Figure 6. The LabVIEW block diagram for the NI USRP example 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.