All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.

Description

Application Note 041
The Fundamentals of FFT-Based Signal Analysis and Measurement
Michael Cerna and Audrey F. Harvey
Introduction
The Fast Fourier Transform (FFT) and the power spectrum are powerful tools for analyzing and measuring signals from plug-in data acquisition (DAQ) devices. For example, you can effectively acquire time-domain signals, measure the frequency content, and convert the results to real-world units and displays as shown on traditional benchtop spectrum and network analyze

Tags

Transcript

Application Note 041
National Instruments
™
, ni.com
™,
and LabWindows/CVI
™
are trademarks of National Instruments Corporation. Product and company names mentioned herein aretrademarks or trade names of their respective companies.
340555B-01
©
Copyright 2000 National Instruments Corporation. All rights reserved.July 2000
The Fundamentals of FFT-Based Signal Analysisand Measurement
Michael Cerna and Audrey F. Harvey
Introduction
The Fast Fourier Transform (FFT) and the power spectrum are powerful tools for analyzing and measuring signalsfrom plug-in data acquisition (DAQ) devices. For example, you can effectively acquire time-domain signals, measurethe frequency content, and convert the results to real-world units and displays as shown on traditional benchtopspectrum and network analyzers. By using plug-in DAQ devices, you can build a lower cost measurement system andavoid the communication overhead of working with a stand-alone instrument. Plus, you have the flexibility of configuring your measurement processing to meet your needs.To perform FFT-based measurement, however, you must understand the fundamental issues and computationsinvolved. This application note serves the following purposes.ãDescribes some of the basic signal analysis computations,ãDiscusses antialiasing and acquisition front ends for FFT-based signal analysis,ãExplains how to use windows correctly,ãExplains some computations performed on the spectrum, andãShows you how to use FFT-based functions for network measurement.The basic functions for FFT-based signal analysis are the FFT, the Power Spectrum, and the Cross Power Spectrum.Using these functions as building blocks, you can create additional measurement functions such as frequency response,impulse response, coherence, amplitude spectrum, and phase spectrum.FFTs and the Power Spectrum are useful for measuring the frequency content of stationary or transient signals. FFTsproduce the average frequency content of a signal over the entire time that the signal was acquired. For this reason, youshould use FFTs for stationary signal analysis or in cases where you need only the average energy at each frequencyline. To measure frequency information that is changing over time, use joint time-frequency functions such as theGabor Spectrogram.This application note also describes other issues critical to FFT-based measurement, such as the characteristics of thesignal acquisition front end, the necessity of using windows, the effect of using windows on the measurement, andmeasuring noise versus discrete frequency components.
Application Note 041 2www.ni.com
Basic Signal Analysis Computations
The basic computations for analyzing signals include converting from a two-sided power spectrum to a single-sidedpower spectrum, adjusting frequency resolution and graphing the spectrum, using the FFT, and converting power andamplitude into logarithmic units.The power spectrum returns an array that contains the two-sided power spectrum of a time-domain signal. The arrayvalues are proportional to the amplitude squared of each frequency component making up the time-domain signal.Aplot of the two-sided power spectrum shows negative and positive frequency components at a heightwhere A
k
is the peak amplitude of the sinusoidal component at frequency
k
. The DC component has a height of A
0
2
where A
0
is the amplitude of the DC component in the signal.Figure 1 shows the power spectrum result from a time-domain signal that consists of a 3 Vrms sine wave at 128 Hz, a3Vrms sine wave at 256 Hz, and a DC component of 2 VDC. A 3 Vrms sine wave has a peak voltage of 3.0 ã orabout 4.2426 V. The power spectrum is computed from the basic FFT function. Refer to the Computations Using theFFT section later in this application note for an example this formula.
Figure 1.
Two-Sided Power Spectrum of Signal
Converting from a Two-Sided Power Spectrum to a Single-Sided Power Spectrum
Most real-world frequency analysis instruments display only the positive half of the frequency spectrum because thespectrum of a real-world signal is symmetrical around DC. Thus, the negative frequency information is redundant. Thetwo-sided results from the analysis functions include the positive half of the spectrum followed by the negative half of the spectrum, as shown in Figure 1.In a two-sided spectrum, half the energy is displayed at the positive frequency, and half the energy is displayed at thenegative frequency. Therefore, to convert from a two-sided spectrum to a single-sided spectrum, discard the secondhalf of the array and multiply every point except for DC by two.A
k
2
4------
5.04.03.02.01.00.0020040060080010001200Hz
V r m s
2
G
AA
i
( )
S
AA
i
( )
, i = 0 (DC)=G
AA
i
( )
2S
AA
i
( )ã
, i = 1 to
N
2----1–=
©
National Instruments Corporation3Application Note 041
where S
AA
(i) is the two-sided power spectrum, G
AA
(i) is the single-sided power spectrum, and
N
is the length of thetwo-sided power spectrum. The remainder of the two-sided power spectrum S
AA
is discarded.The non-DC values in the single-sided spectrum are then at a height of This is equivalent towhereis the root mean square (rms) amplitude of the sinusoidal component at frequency
k
. Thus, the units of a powerspectrum are often referred to as quantity squared rms, where quantity is the unit of the time-domain signal. Forexample, the single-sided power spectrum of a voltage waveform is in volts rms squared.Figure 2 shows the single-sided spectrum of the signal whose two-sided spectrum Figure 1 shows.
Figure 2.
Single-Sided Power Spectrum of Signal in Figure 1
As you can see, the level of the non-DC frequency components are doubled compared to those in Figure 1. In addition,the spectrum stops at half the frequency of that in Figure 1.
N
2----through
N
1–
A
k
2
2------A
k
2-------
2
A
k
2-------
0100200300400500600Hz10.08.06.04.02.00.0
V r m s
2
Application Note 041 4www.ni.com
Adjusting Frequency Resolution and Graphing the Spectrum
Figures 1 and 2 show power versus frequency for a time-domain signal. The frequency range and resolution on thex-axis of a spectrum plot depend on the sampling rate and the number of points acquired. The number of frequencypoints or lines in Figure 2 equalswhere
N
is the number of points in the acquired time-domain signal. The first frequency line is at 0 Hz, that is, DC.The last frequency line is atwhere F
s
is the frequency at which the acquired time-domain signal was sampled. The frequency lines occur at
∆
f intervals whereFrequency lines also can be referred to as frequency bins or FFT bins because you can think of an FFT as a set of parallel filters of bandwidth
∆
f centered at each frequency increment fromAlternatively you can compute
∆
f aswhere
∆
t is the sampling period. Thus
N
ã
∆
t is the length of the time record that contains the acquired time-domainsignal. The signal in Figures 1 and 2 contains 1,024 points sampled at 1.024 kHz to yield
∆
f = 1 Hz and a frequencyrange from DC to 511 Hz.The computations for the frequency axis demonstrate that the sampling frequency determines the frequency range orbandwidth of the spectrum and that for a given sampling frequency, the number of points acquired in the time-domainsignal record determine the resolution frequency. To increase the frequency resolution for a given frequency range,increase the number of points acquired at the same sampling frequency. For example, acquiring 2,048 points at 1.024kHz would have yielded
∆
f = 0.5 Hz with frequency range 0 to 511.5 Hz. Alternatively, if the sampling rate had been10.24 kHz with 1,024 points,
∆
f would have been 10 Hz with frequency range from 0 to 5.11 kHz.
Computations Using the FFT
The power spectrum shows power as the mean squared amplitude at each frequency line but includes no phaseinformation. Because the power spectrum loses phase information, you may want to use the FFT to view both thefrequency and the phase information of a signal.The phase information the FFT yields is the phase relative to the start of the time-domain signal. For this reason, youmust trigger from the same point in the signal to obtain consistent phase readings. A sine wave shows a phase of –90°at the sine wave frequency. A cosine shows a 0° phase. In many cases, your concern is the relative phases betweencomponents, or the phase difference between two signals acquired simultaneously. You can view the phase differencebetween two signals by using some of the advanced FFT functions. Refer to the
FFT-Based Network Measurement
section of this application note for descriptions of these functions.
N
2----F
s
2-----F
s
N
-----–
∆
f
F
s
N
-----=DC toF
s
2-----F
s
N
-----–
∆
f
1
N
∆
t
ã
---------------=

Related Search

We Need Your Support

Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks