Tips for using an FFT with an oscilloscope

Article By : Arthur Pini

The FFT vertical or amplitude response is affected by a number of factors which should be kept in mind when using an FFT.

The fast Fourier Transform (FFT), added to an oscilloscope or digitizer, permits measuring the frequency domain spectrum of the acquired signals. This provides a different and usually helpful perspective; signals can be viewed as plots of amplitude or phase versus frequency (Figure 1).

amplitude plot of FFTFigure 1 The amplitude FFT of a 100-MHz sine wave is a single spectral line located at 100 MHz. The amplitude of the impulse is 150 mV, matching the peak amplitude of the input sine wave.

There are a number of factors that affect the FFT vertical readouts, including the choice of output type, FFT processing issues, signal duration, and non-FFT instrument characteristics. This article will focus on these issues.

FFT vertical output formats

The FFT calculation is based on the discrete Fourier transform (DFT) as described by the equation:

discrete Fourier transform equation

where:
X(k) = frequency domain points
x(n) = time domain samples
n = index of time samples
k = index of frequency points
N = number of input samples in the record

The physical interpretation of the Fourier transform is that the input samples, x(n), are tested by multiplication of a series of sinusoids represented by the complex exponential, e-jπkn/N, in the equation. At each test frequency the product is averaged. The result is nonzero only if the input has energy at the test frequency.

This is a mathematically complex equation, and each output point has two elements. The computation normally computes the real and imaginary parts of each output point. The outputs can be displayed in a number of formats based on the calculated real and imaginary FFT output components.

The FFT native output data types, real (R) and imaginary (I), are both expressed in units of volts, all other formats are derived from them:

Linear magnitude (volts) = (R2+I2)1/2

Magnitude squared (volts2) = R2+I2

Phase (radians) = TAN-1(I/R)

Power spectrum (dBm) = 10*Log10{(R2+I2)/1 mW)}

Power spectral density (dBm/Hz) = 10Log10{(R2+I2)/(1mWΔf*ENBW)}

where:
R = real part of the FFT
I = imaginary part of the FFT
Δf = resolution bandwidth
ENBW = effective noise bandwidth, weighting dependent

Different oscilloscope suppliers may offer various combinations of these FFT output formats and may scale them differently. In this example, based on Teledyne LeCroy’s Maui Studio application, which simulates a number of their oscilloscopes, the FFT is available in these five formats along with the native real and imaginary format.

The linear magnitude format, which is displayed in Figure 1, is calculated as a root mean square value, but is scaled to read spectral amplitude as peak volts so that the peak amplitude of the spectral line matches the peak amplitude of the input sine wave.

The power spectrum format scale is logarithmic, and the values are in units of decibels relative to a milliwatt (dBm). The power spectral density normalizes the power spectrum value to the effective resolution bandwidth so that its value does not change with changes in analysis bandwidth. It is expressed in units of dBm/Hz.

FFT processing factors affecting the FFT vertical output

The frequency spectrum produced by the FFT is discrete; it has valid amplitude data only at k uniformly spaced frequency values. The discrete nature of the FFT output can cause some confusion in interpreting the spectral amplitude. You might think of the FFT output as being the result of passing the input through a bank of bandpass filters with center frequencies offset by a fixed frequency increment, which is sometimes described as the FFT bin width or resolution bandwidth. If the input signal frequency falls in the center of one of these bandpass filters the full output amplitude is shown at the output. If the input signal frequency falls between the two bandpass filter center frequencies, the amplitude is lower (Figure 2).

The resolution bandwidth of the FFT is the reciprocal of the time duration of the input signal. In our example, the input time signal has a duration of 5 μs and the resolution bandwidth is 200 kHz. Setting the input frequency to exactly 50 MHz centers the signal in the resolution bandwidth and the amplitude of the spectral peak is 150 mV.

FFT output plot shows the amplitude responseFigure 2 An expanded view of the FFT output shows the amplitude response as the input frequency is changed in increments of one half the resolution bandwidth.

Changing the input frequency to 50.1 MHz places the input signal between the two filters at 50.0 MHz and 50.2 MHz. Energy is split between the two filters and the peak amplitude falls to 95.6 mV, a loss of 3.9 dB. Stepping the frequency by increments of 100 kHz, the FFT output amplitude is seen to rise and fall. This is called the “picket fence” effect or “scallop” loss and it occurs in all FFT calculations.

Another issue that occurs when the input frequency varies is more easily seen looking at the FFT baselines in Figure 3. In addition to the lower peak amplitude, moving the input frequency between cells spreads and raises the spectrum baseline. When the frequency is at 50.0 MHz, the start and stop points of the input waveform, shown in the upper left grid in yellow, are at the same level, nominally zero volts. When the input frequency is 50.1 MHz, shown in the lower left grid in red, the start and stop points are at different levels.

The FFT calculation is a circular one with the last point looped back to the first point, so a change in the amplitude values looks like a discontinuity. This is a form of angle modulation which spreads the spectrum due to modulation sidebands and results in the baseline of the spectrum being raised in frequency cells adjacent to that of the excited cell; this is called spectral leakage. Any signals in the adjacent cells combine with the leakage component, changing the amplitude in that cell. This causes the greatest error when the signals in adjacent cells have small amplitudes.

plot shows input frequency not cell centeredFigure 3 If the input frequency is not cell centered, the first and last point of the time record have different amplitudes and energy spreads or leaks into adjacent cells, altering the amplitude in those cells.

Both of these effects are countered by amplitude modulating the signal input so that the end points are forced to zero amplitude. This process is called weighting and the modulating waveshape is called a weighting window. The shape of the window function determines the spectral response, including the shape of the spectral line and the amplitude of any sidebands. The characteristics of commonly-used weighting functions are shown in Table 1.

Table 1 The characteristics of common FFT weighting (window) functions

FFT window function characteristics
Window type Highest sidelobe (dB) Scallop loss (dB) Effective noise bandwidth (cells) Coherent gain (dB)
Rectangular (none) -13 3.92 1.00 0.0
Von Hann (Hanning) -32 1.42 1.50 -6.02
Hamming -43 1.78 1.37 -5.35
Flat top -44 0.01 3.43 -11.05
Blackman Harris -67 1.13 1.71 -7.53

The table summarizes the ability of each window to minimize sidelobes and scallop loss. Note that the effective noise bandwidth (ENBW) broadens the width of the FFT filter cells. The broader the cell, the less scallop loss. The 3.9 dB loss shown in Figure 2, where the rectangular weighting was used, can be reduced to as low as 0.01 dB by using the flat top weighting.

Note also that applying weighting decreases the sidelobe amplitudes due to spectral leakage. The coherent gain is the change in amplitude when the weighting function is applied. Most oscilloscope suppliers compensate for this attenuation so that changing the selected weighting function does not change the displayed signal amplitude.

Figure 4 shows the effect that the window functions produce on the spectral lines for the same input signal.

plot shows the effect that the window functions produceFigure 4 The selection of the weighting window affects the shape of the FFT cell frequency response. Narrower windows yield better frequency resolution, while broader windows reduce scallop loss and spectral leakage.

The spectral lines broaden as indicated by the ENBW. The broader responses decrease scallop loss, which makes sense since signals in adjacent cells will overlap at higher amplitudes for broader responses thereby minimizing scallop loss. The weighting functions also affect the amplitude of the sidelobes. With no weighting, the highest sidelobe is -13 dB below the spectral peak. The weighting functions reduce this with the Blackman-Harris weighting function reducing it to -67 dB.

The selection of a window function depends on the user’s needs. If you are measuring transients that are smaller than the acquisition window, then a window function should not be used as the amplitude of the spectrum peak will change based on the transient’s location in the acquisition window. In that case, the rectangular window (no weighting) is the best choice. The narrower window responses provide better frequency resolution, while the broader responses (Blackman Harris or flat top) produce more accurate amplitude measurements. If you need both then a good compromise is Von Hann or Hamming weighting. Most oscilloscopes use Von Hann or Hanning weighting as their default weighting window.

Frequency response and amplitude flatness

Another issue that affects the FFT vertical output levels is the frequency response and amplitude flatness of the oscilloscope or digitizer front end. Remember that the signal amplitude will be attenuated by 1 or 3 dB at the instrument’s bandwidth, depending on the manufacturer’s specification of the bandwidth. Additionally, most suppliers have a specification for the flatness of the frequency response. This is usually on the order of 0.25 to 1.0 dB. The flatness is generally repeatable for a specific setup and can be corrected. Any probes used may also affect the instrument’s frequency response flatness.

Effect of signal duration on FFT peak amplitude

If the input signal duration is less than the full input record length it will also affect the amplitude of the FFT. Keeping in mind that the linear magnitude of the FFT is basically a rms calculation, it is expected that the amplitude will be proportional to the input signals duty cycle relative to the input record length. Figure 5 shows the FFT peak amplitude response to signals with six different durations.

plot shows FFT peak amplitudeFigure 5 The effect of signal duration on the FFT peak amplitude response is shown here.

The M1 trace in the upper left grid shows the 150-mV peak input signal filling the 500 ns input record length; this is the reference signal. Below that grid is the FFT of the signal showing a peak amplitude of 150 mV. Trace M3, the third grid down in the left-hand column, shows the signal duration reduced to 400 ns or 80% of the available record length. Below that trace is its FFT with a peak amplitude of 120 mV. The signal duration is 80% of the input record length and the peak FFT response is 80% of the full duration signal. The signal duration is decreased in steps of 60, 40, 20, and 10% of the input record length and the peak FFT response follows linearly.

The FFT vertical or amplitude response is affected by a number of factors which should be kept in mind when using an FFT. It is proportional to the input signal level. Variations in the input level caused by frequency response variations in the input signal chain result in variations in the FFT amplitude response. The frequency of the input signal can cause variations in the FFT amplitude produced by scallop loss and spectral leakage when the signal is not centered in an FFT frequency cell. This effect is frequency dependent and can be ameliorated by the use of weighting. Finally, the FFT amplitude response is affected by the signal duration relative to the input record length.

This article was originally published on EDN.

Arthur Pini is a technical support specialist and electrical engineer with over 50 years experience in electronics test and measurement.

Related articles:

 

 Lucky Draw 2021

Leave a comment