Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Oct 18, 2008


Feedback


Yes No

Related Links - Developer Zone

Related Links - Products and Services

Spectral Measurements (Part 2)

8 ratings | 3.00 out of 5
Print

Overview

This tutorial is part of the National Instruments Measurement Fundamentals series. Each tutorial in this series teaches you a specific topic of common measurement applications by explaining the theory and giving practical examples. This tutorial covers an introduction to RF and microwave spectral measurements.

For the complete list of tutorials, return to the NI Measurement Fundamentals Main page, or for more RF tutorials, refer to the NI RF Fundamentals Main subpage. For more information about National Instruments RF products, visit www.ni.com/rf.

Sampling Rate and Resolution Considerations for FFTs or Power Spectrum Analysis

A fast Fourier transform (FFT) requires a time-domain signal as input and returns an output in the frequency domain. A power spectrum displays this frequency domain output as a graph with frequency on the x-axis and power on the y-axis. Figure 1 shows a 10,000 sample, 500 Hz sine wave acquired at a sampling frequency of 10 kS/s. A baseband FFT of the time-domain signal is computed, and the output power spectrum shown on the right is formed.



Figure 1. FFT Power Spectrum of a 500 Hz sine wave


The spectral resolution unit on the spectrum plot x-axis is defined as a frequency line. The FFT will always produce a number of lines equal to

where N is the number of points in the acquired time-domain signal that passed to the FFT. The frequency range and resolution on the x-axis of a spectrum plot depend on the sampling rate and the number of points acquired. The first frequency line on a spectrum is at 0 Hz, or DC. The last frequency line is at

where Fs is the sampling frequency. Thus, the frequency range is determined by the sampling frequency and spans from

.

The frequency resolution of a spectrum plot is analogous to the space between frequency lines. The frequency lines of a spectrum plot occur at Δf intervals where

.

Alternatively, because Δt of the acquired time-domain signal equals the inverse of Fs, you can compute Δf as

.

NOTE N·Δt is the length of the acquired time-domain signal. Thus, for a given sampling frequency, the number of points acquired in the time-domain signal record determines the frequency resolution. To increase the frequency resolution for a given frequency range, increase the number of points acquired at the same sampling frequency.

Zoom FFT vs. Baseband FFT

The baseband FFT is the best method when you are interested in a broad range of frequencies because it displays all frequency content from zero frequency (DC) to the Nyquist frequency (Fs / 2). However, a baseband FFT might not be effective if you need to obtain a higher frequency resolution over a limited portion of the spectrum, or if you need to zoom in on details of a spectral region. When the frequency range of interest is small compared to the Nyquist frequency, you can improve processing time performance by using a zoom FFT. Zoom FFT algorithms streamline processing so that only the narrow spectrum of interest is analyzed. The zoom FFT is ideal for applications requiring narrow frequency resolution, on-line analysis, and frequent data updates.

Figure 2 illustrates how a zoom FFT detects the presence of two tones of closely spaced frequencies. The baseband FFT—the upper graph—indicates a single peak while the zoom FFT—the lower graph—clearly indicates the presence of two separate tones in the signal.



Figure 2. Baseband FFT Versus Zoom FFT


The National Instruments Spectral Measurements Toolkit (SMT) supports two algorithms for zoom FFT processing: continuous zoom FFT and block zoom FFT. Choosing which zoom FFT to use for a particular application depends on many factors, including system speed, memory, acquisition rate, and user requirements.

Use continuous zoom FFT when you need to quickly analyze the data as it arrives. A decimation process reduces the sampling rate in real time. After the process acquires all the data and decimates it, a relatively small FFT remains. The term "continuous" refers to the fact that you begin the decimation process while data arrives. With a baseband FFT, you must wait until all the data arrives before beginning calculations.

The continuous zoom FFT first shifts the spectral region of interest into the baseband. The technique then applies a lowpass antialias filter and decimates, or downsamples, the data by a factor of M. The zoom factor M yields a new effective sample rate Fs/M. The antialias filter has a cutoff frequency of Fs/(2M) because the Nyquist frequency decreased by a factor of M. After lowpass filtering, the continuous zoom FFT performs a baseband FFT on the reduced sample rate data to produce the zoom spectrum. This entire technique is destructive because the original data changes as the result of the filtering and decimation. If you store the data and batch process it offline, you lose the primary benefit of the technique, which is its real-time capability.

Figure 3 shows the basic steps of frequency shifting, decimation, and FFT.


[+] Enlarge Image
Figure 3. Continuous Zoom FFT Process

The continuous zoom FFT technique is sometimes called the real-time zoom FFT because it continuously performs the frequency shifting, decimation, and filtering processes on the arriving data. The FFT operation itself cannot proceed until you acquire all the data. The FFT operation then occurs in parallel with the next data acquisition.

One advantage of the continuous zoom FFT is that you can update the results continuously to give a smooth display and minimize the time it takes for transients to appear in the displayed spectrum. The continuous zoom FFT supports a feature known as overlap. The default overlap setting is 0%, where each new spectrum will be computed from completely new data. An overlap setting of 75% means that a given spectrum uses 75% previously acquired data from the last spectrum, while 25% of the data is new. This setting would generate updates four times as often as the 0% option, although each update would have only a marginal change in information content. Overlap allows you to use processing power to improve the update rate of your display when performing long-running acquisitions.

The other zoom algorithm in the NI Spectral Measurements Toolkit is a block zoom FFT. The block zoom FFT calculates a portion of a large FFT, and works best in situations where you cannot access data until the data acquisition is complete. The operation allows you to improve the frequency resolution, Δf, by increasing the number of points that the FFT processes.

A block zoom FFT uses only the part of a large FFT that represents the frequency range you want to analyze. For example, if the input data has a length LM, an FFT on the original data results in LM points of FFT spectrum. If you want to analyze only 1/M of the whole spectrum, or L frequency bins, you can use a block zoom FFT. The block zoom FFT computes L points of the original LM point spectrum faster and with fewer calculations than if you perform a large FFT on the entire data set and remove the unwanted portion. The block zoom FFT is a nondestructive zoom FFT because it stores data before processing, so the data is available in its original form if you need it for other operations.

The block zoom FFT also is useful for real-time applications where the data rate is too high for a continuous zoom FFT to keep up in real time. You cannot predict whether the continuous zoom FFT can keep up with a certain acquisition rate in real time, so the best option is to try running the application using the SMT Cont Zoom FFT VI. If you receive buffer overflow errors from the acquisition VI, either reduce the acquisition rate or use the block zoom technique. If you need to process the entire data set, provide enough memory to store the data until the block zoom FFT can process it. If processing every data point is not critical, use the block zoom FFT with the latest data available.

Superior Spectral Measurements Algorithms

The NI SMT provides a set of flexible spectral measurements in LabVIEW and LabWindows™/CVI™, including power spectrum, peak power and frequency, power in band, adjacent channel power, and occupied bandwidth, as well as 3D spectrogram capabilities. In addition, the NI SMT contains VIs and functions for performing modulation-domain operations such as passband (IF) to baseband (I/Q) conversion, I/Q to IF conversion, and generation/analysis of analog modulated signals. The combination of these optimized algorithms and the gigahertz processing of your PC delivers unmatched measurement throughput.

SMT contains VIs for LabVIEW and functions for LabWindows/CVI that perform the following operations:

  • Analog modulation—SMT includes analog modulation functions that perform amplitude, frequency, and phase modulation and demodulation. Functions and VIs are included to perform upconversion and downconversion on baseband and passband signals.
  • Spectrum averaging—SMT includes averaging VIs that average several records of data to reduce the effect of noise on a signal and its spectrum. SMT supports averaging types such as root-mean-square (RMS) averaging, vector averaging, and peak-hold averaging.
  • Spectral measurements—SMT contains functions and VIs that can measure power in band and adjacent channel power (ACP). Power in band measures the total power within any specified frequency range or band. ACP measures the way a particular frequency band of interest, known as a channel, and its two adjacent channels distribute power. Figure 4 illustrates a typical ACP measurement and the center frequency, bandwidth, and spacing that describe the channels.

Figure 4. ACP Measurement

  • Unit conversion—SMT unit conversion supports typical radio frequency (RF) units such as volts RMS squared (V2RMS), decibel (dB), decibel milliwatts (dBm), and dBm per hertz (dBm/Hz). You can use SMT to convert a raw FFT spectrum to a power spectrum or power spectral density for noise measurements.
  • Zoom frequency configuration and analysis—SMT zoom FFT functions and VIs allow you to zoom in on a narrow frequency range in a spectrum. Specialized configurations allow you to use conventional measurement settings, such as center frequency, span, and resolution bandwidth (RBW) to configure zoom processing. The configuration functions and VIs return an acquisition size based on your spectrum settings.
  • Peak power and frequency determinations—SMT includes a spectrum peak search algorithm that determines peak levels and frequency. The algorithm uses interpolation to precisely locate frequency peaks in the amplitude or power spectrum in any units or scaling. You can also specify whether to locate a single maximum peak or multiple peaks that exceed a specified threshold amplitude.
  • Spectrogram—SMT contains VIs and functions that allow you to compute joint-time and frequency-domain calculations and display the results as a spectrogram. SMT implements the short-time Fourier transform (STFT) with a zoom FFT to give you a zoom spectrogram. The SMT Zoom STFT VI calculates FFTs on equivalent segments of your signal at fixed time intervals. This VI applies a window to each signal segment, calculates an FFT on the windowed segment, and arranges the resulting FFTs in chronological order. This feature is supported only in LabVIEW. Figure 5 shows an example of a completed spectrogram over a time period of 18 µs, with a center frequency of 16 MHz and a span of 16 MHz.

Figure 5. Spectrogram Example

Relevant NI Products

Customers interested in this topic were also interested in the following NI products:

Conclusions

This document is meant to provide a brief overview of RF and microwave spectral measurements.

For the complete list of tutorials, return to the NI Measurement Fundamentals main page, or for more RF tutorials, refer to the NI RF Fundamentals main subpage.

8 ratings | 3.00 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).