Fast Fourier Transform (FFT) Frequency Analysis

An oscilloscope provides powerful capability to debug frequency-related effects. Fast Fourier Transform (FFT) math functions have long been part of oscilloscope toolboxes. This tutorial is intended to give a basic understanding of setting up and using FFT based spectrum analysis.

Equipment Required

WaveSurfer MXs-B series Oscilloscope
10:1 High impedance passive probe.

Initial Setup

Displays shown in the tutorial are based on the following initial setup on a WaveSurfer MXs-B scope:

  1. Connect the passive probe from the channel 1 input to the Cal test point on the front panel of the oscilloscope.
  2. Recall the default setup: File pull down > Recall Setup> Recall Default.
  3. Turn off channel 2.
  4. Ato Setup the scope: Press Auto Setup button twice.

This completes the initial setup. The scope display should be similar to Figure 1.

Figure 1:

The initial setup for this tutorial, the input signal is the 1 kHz calibrator square wave

Open the Timebase dialog box by using the Timebase pulldown menu and selecting Horizontal Setup or touching or clicking on the Timebase annotation box. Change the Real-Time Memory Maximum Sample points to 100 kS and the Timebase mode Time/Division to 20 ms as shown in Figure 2. We are now acquiring 100,000 points at 500kS/s for a total record length of 200 ms.

Figure 2:

The timebase acquisition setup to capture a 200 ms record length

Use the Math pulldown menu to open the Math dialog box (Math > Math Setup). Setup the math trace to be the FFT of C1 as shown in Figure 3. Looking at the right hand FFT tab in Figure 3 we have all the FFT setup controls. These include the Output type and Window.

Figure 3:

The basic FFT setup in math trace

The selections available under output type are shown in Figure 4.

Magnitude is the amplitude output in linear units (Volts). This reads the peak value of a sine at each frequency. This is useful as an input to math operations like adding and subtracting spectra.

Power Spectrum (default output type) is the power as a function of frequency using a logarithmic amplitude scale in units of decibels relative to 1 mW (dBm). This is a good general purpose view offering wide dynamic range so that you can see small spectral details.

Figure 4:

The Output Type selections for the WaveSurfer MXs-B

The FFT Status Summary

The FFT Status Summary, as shown in Figure 5, appears on the right hand FFT Tab in the Math setup dialog box when FFT is the selected math function. It summarizes the FFT horizontal setup. In this example it shows that the input time record which contains 100,000 points has been transformed into an output spectrum of 50,001 frequency ‘bins’. The FFT is symmetrical in frequency about 0 Hz so computing the full transform is unnecessary. Only the positive frequency components are computed (plus DC which is the extra value). The amplitude of these components is doubled to account for the missing symmetrical points.

Figure 5:

The FFT status summary

Δf is the resolution bandwidth of the FFT, it is the reciprocal of the scope’s acquisition or capture time. In our example that is 200 ms, hence the resolution bandwidth of 5 Hz. The next line under Δf we find the Span. This reports a span of Δf to one half of the sample rate or 250 kHz. The Suppress DC check box determines if the FFT computes the DC point in the FFT. The default is not to compute the DC point. The user can elect to add the DC point by un-checking this box. Uncheck the Suppress DC box, note that the Span now reads: “DC-250 kHz”, indicating the addition of the DC point. Check the Suppress DC box again.

How FFT Resolution Bandwidth and Span are Determined

As we have seen in the previous section, the resolution bandwidth of the FFT is dependent on the acquisition or record length. Resolution bandwidth, Δf, is the reciprocal of the acquisition or capture time of the scope. The example in Figure 7 has acquired 200 ms of data (20 ms/division times 10 divisions). The resulting resolution bandwidth is 1/200ms or 5 Hz.

The span or the total range of frequencies in the FFT spectrum is one half of the oscilloscopes sample rate. In our setup the sample rate is 500 kS/s so the span is 250 kHz.

Open the timebase dialog box by touching or clicking on the timebase annotation box. Increase the Time/Division setting from 20 ms/division to 50 ms/ division. The sample rate will decrease to 200kS/s. Go back to the Math Setup FFT tab. Note that the span is now 100 kHz; again, one half of the sample rate. The resolution bandwidth has decreased from 5 Hz to 2 Hz because the capture time increased to 500 ms (1/500 ms = 2 Hz).

Restore the Time/division setting to 20 ms. Turn off the channel 1 display by pressing the button marked 1 in the vertical control group on the front panel.

Using the Zoom Tab to Set Displayed Center Frequency and Horizontal Scale

The FFT span, as we discussed previously, is one half of the scopes sample rate. You can use the zoom setting of the math trace to select a center frequency and horizontal scale for the FFT display. Touch or click on the Math dialog box Zoom tab. We are going to view the spectral line at 1 kHz.

Touch or click on the Center Frequency box in the Horizontal zoom area twice. This will bring up a pop up keypad. Enter the desired center frequency of 1 kHz then press OK.

Touch or click on the Scale/Div box twice. This will again bring up a pop up keypad. Enter the value 200 (Hz) then press OK. The FFT display should now have a horizontal scale of 200 Hz per division centered at 1 kHz.

In the Vertical zoom area check the Var(iable) check box this will allow us to set a scale outside of the normal 1-2- 5 progression. Touch or click on the Vertical Scale/div box, enter the value 12 to set the vertical scale to 12 dB/div. Touch or click on the Vertical Center box, it will be highlighted in inverse video. Use the Vertical offset knob on the front panel to move the FFT display vertically until the spectral peak is just below the top of the display as shown in Figure 6.

Figure 6:

Using the Zoom tab on the Math dialog box to set center frequency and span of the FFT display

We have just used the math zoom controls to set up both the vertical and horizontal center and scale settings. Using this technique it is possible to display any part of the FFT spectrum on the screen.

Weighting Window Selection

The Fourier transform calculation assumes that the input signal is infinite in length. Obviously, oscilloscopes have a finite record length. The result of using a finite length input to a Fourier transform is to generate sidebands close to the signal frequencies. These sidebands manifest themselves as broader “skirts’. Return to the FFT tab on the F1 dialog box. Touch or click the Window box. A pop up will show the available weighting window selections as shown in Figure 7. There are five window selections Rectangular, Hamming, Von Hann (Hanning), Blackman Harris, and Flat Top. Select Rectangular.

Figure 7:

The Weighting Window Choices

The rectangular window applies no weighting, but presents the finite record acquired in the oscilloscope to the FFT. You can think of this as an infinite input record weighted by a unity amplitude rectangular pulse with a duration equal to the scope’s acquisition time (hence the name Rectangular). The averaged FFT spectrum should now exhibit broad skirts on each side of the 1 kHz fundamental frequency as shown in Figure 8.

Figure 8:

Applying Rectangular weighting to the FFT spectrum

The other windows apply a variety of raised sinusoidal windows to the signal input of the FFT. In Figure 9 we have overlaid the spectral response for each of the available windows with a horizontal scale of 5 Hz/division. Note that the effect of the weighting function is to reduce the sideband levels but at the same time they tend to broaden the main spectral line. This broadening is indicated by an increased in the effective noise bandwidth (ENBW) indicated in the FFT status.

Figure 9:

The effects of the weighting Windows on the spectral response

In general Rectangular weighting is used for transient signals that can occur anywhere in the acquisition. This is because the weighting is uniform over the acquired record.

Hamming and Vonn Hann weighting are good general purpose windows with good sidelobe suppression and nominal broadening.

The broader response of the Blackman Harris and Flat Top weighting are excellent for frequency domain measurements requiring the highest amplitude flatness.

Complete details of the window characteristics can be found in the oscilloscopes on-line help under FFT.

Return the FFT window setting to Vonn Hann and reset the zoom (Zoom tab > Reset Zoom).

FFT Spectrum Averaging

Oscilloscopes can also average the FFT spectrum as well as time domain waveforms. Spectral averaging is synchronous with the FFT processing and forms an ensemble average where each frequency point in the FFT is averaged with the corresponding point in subsequent FFT’s.

Averaging improves the signal to noise ratio of the spectrum and can increase the dynamic range of the averaged FFT to about 72 dB for an eight bit oscilloscope. As in all averaging processes this improvement is proportional to the number of spectra averaged.

Go to the math dialog box. Press the button marked dual to enable a second math operator in the math trace. Click or touch the Operator 2 box. Select Average from the pop up scroll list. On the right hand side the Average tab will appear. Open the average tab. Press the button labeled Continuous and set the number of averages to 10. The scope screen should appear like that in Figure 10. Note the thickness of the baseline.

Figure 10:

Setting up spectrum averaging

Increase the number of averages from 10 to 100. The average will restart, after 100 sweeps have been averaged note that the thickness of the baseline has decreased. Increase the number averages to 1000, there should be an additional decrease in the baseline noise. Averaging improves the signal to noise ratio of the FFT.

There are two types of averaging Summation and Continuous. Summation averaging will average spectra until the preset number of spectra are included in the average and then will stop. Continuous mode will average continually by maintaining a moving window in which the newer spectra more heavily weighted than the older data. Either mode works the same way in that the greater the number of averages the greater the signal to noise improvement.

Note the Skip Invalid Input check box on the average tab. If this box is checked the average will not include any spectra which are not valid due to overloading the scope input.

Complete and detailed information about the Fast Fourier Transform are available in the oscilloscope’s on-line help. Additional information can be found in the following LeCroy Application briefs available on the LeCroy Website;

“Setting Up An FFT In WaveMaster” LAB WM 714

“Using Long Fast Fourier Transforms” LAB 773

This completes the tutorial.