A window into the frequency domain, part 3
Jit Lim - May 31, 2012
From guest blogger Gina Bonini: Over the last two posts I’ve reviewed two key components of scope FFTs: windowing factors and aliasing. In this final installment I’ll take a look at a little-understood aspect of FFTs: sample length.
To understand the number of samples required to build an FFT, you need to look at several factors, including the time required to discern changes in the signal and sample rate needed to avoid aliasing.
Let’s start by theoretically determining the amount of “time” that you need to sample to create the spectrum. The required time is driven by the desired RBW (resolution bandwidth). If you recall, the RBW is the smallest frequency difference that can be discerned in the frequency axis of the spectrum. For an RBW of 1 Hz, for instance, you’ll need greater than 1 second (1/1 Hz) of data to be acquired for analysis. Essentially, it will take 1 second to tell the difference between a 1,000-Hz and a 999-Hz signal. It takes this long to “count” the full 1,000 cycles in the first signal and the 999 cycles in the second signal. Differences below 1 Hz cannot be discerned over this time interval.
The actual required acquisition time will also be affected by the windowing function you choose for the FFT. The window function has an inherent filter shape that affects the bandwidth of the FFT conversion process, smearing energy into adjacent bins. The window factor specifies the -3-dB bandwidth of the window, in number of FFT bins. The impact of the window factor is to extend the required acquisition time by the window factor as follows:
Required acquisition time = window factor x (1 / RBW)
Here’s a listing of the window factors for the most common FFT windows:
Now that we know the acquisition time required, the next factor to look at is sample rate. The minimum sample rate is driven by the span and center frequency that you desire for the spectrum. The Nyquist Theorem specifies that the sample rate must be a minimum of twice the highest frequency component found within a digitized signal. If the sample rate is insufficient, aliasing will occur, resulting in false indications of signals at frequencies that are not present in the signal. In order to avoid this aliasing, the input signal must be lowpass filtered above the highest frequency of interest.
As a result, the required minimum sample rate is defined as follows:
Sample rate = 2 x filter factor x (center frequency + ½ x span)
The filter factor is a term that is relative to the highest frequency of interest and defines a guard band that ensures that the signal is attenuated below the SFDR (spur-free dynamic range) of the instrument at the Nyquist frequency.
With the required acquisition time and sample rate determined from the above equations, you can easily calculate the number of points required for your FFT spectrum. For example, if you desire to look at noise from a power supply, and need to see a 120-kHz span (with center frequency of 60 kHz), then you need a sample rate of:
Sample rate = 2 x (60 kHz + ½ x 120 kHz) = 240 kSamples/s
I’ve ignored the filter factor for this, since it’s low frequency. Now, assuming an RBW of 100 Hz and a Kaiser window to capture broadband noise, then the required acquisition time is:
Required acquisition time = 2.23 x (1/100) = 22.3 msec
This then brings you to the required number of samples, or required record length, for our acquisition:
Required record length = 22.3 msec x 240 kSamples/s = 5,352 samples
In this case, the required record length was relatively small since it involved a low-frequency signal. If you are looking for errant EMI or looking at the energy profile of your clock signal, the sample rate will need to be higher to give the span you need without aliasing. The record length will increase, as well.
On some performance oscilloscopes, you can actually set the center frequency, span, and resolution bandwidth you desire in the “spectral analysis” math function. The scope will then gate your time-domain signal to give you the desired spectrum view of the signal. On a mixed-domain oscilloscope, the center frequency, span, and resolution bandwidth are set just on the RF channel, allowing you to independently set your controls for viewing the frequency domain on the RF channel, and the time domain on your analog/digital channels.
Gina Bonini is a technical marketing manager for Tektronix. She has worked extensively in various test-and-measurement positions for more than 15 years, including product planning, product marketing, and business and market development. She holds a BSChE from the University of California, Berkeley, and an MSEE from Stanford University.