Adaptive Signal Processing Toolbox
The Adaptive Signal Processing Toolbox
For use with Matlab
Author:
Dr. Eng. John Garas
garas@dspalgorithms.com
garas@dspalgorithms.com
ASPT User Manual
Version 2.1
Fourier Transforms and Frequency Analysis
What is a Fourier Transform?
A Fourier Transform is a mathematical operation that transforms a signal from the time domain to the frequency domain, and vice versa. We are accustomed to time-domain signals in the real world. In the time domain, the signal is expressed with respect to time. In the frequency domain, a signal is expressed with respect to frequency.
What is a DFT? What is an FFT?
What’s the difference? A DFT (Discrete Fourier Transform) is simply the name given to the Fourier Transform when it is applied to digital (discrete) rather than an analog (continuous) signal. An FFT (Fast Fourier Transform) is a faster version of the DFT that can be applied when the number of samples in the signal is a power of two. An FFT computation takes approximately N * log2(N) operations, whereas a DFT takes approximately N2 operations, so the FFT is significantly faster.
What is the difference between Cross Power.vi, Cross Power Spectrum.vi, Auto Power Spectrum.vi, and Power Spectrum.vi?
Cross Power Spectrum.vi and Auto Power Spectrum.vi are high-level VI’s found in the Measurement subpalette. The others are lower-level. It’s usually best to stick with the high-level VI’s. The (Auto)Power Spectrum computes the power present in the signal, but you lose phase information. The Cross Power (Spectrum) computes the power present in both signals and also returns the phase difference between their spectrums.
Some of the analysis VI’s output in units of Vrms2. What does that mean?
This means that the VI’s output is in RMS (root-mean-square) units if the input sequence is in non-RMS units. The RMS value of a waveform can be calculated as the square root of the mean of the squares of each data point. It can be thought of as a kind of average, though not mathematically the same as the arithmetic mean. For example, the RMS amplitude of a sine wave of amplitude 1 would be 1/sqrt(2), or 0.707, while the average value of a sine wave (over an integral number of cycles) is 0.
What is the best VI to use if I want to know the frequency content of a signal?
The most straightforward is Amplitude and Phase Spectrum.vi (measurement subpalette). It provides the amplitude and phase at N/2 frequency components evenly spaced between DC (0 Hz) and the Nyquist frequency (which is half the sampling frequency), where N is the number of samples in the time-domain signal. This VI provides a single-sided spectrum, which differs from the FFT in that there are no “negative frequencies”. Most of our customers don’t need this information anyway.
What is the space between adjacent frequency components when using these VI’s? How can I change the spacing?
Most of these measurement VI’s provide an output labeled “df”. This is the frequency difference between adjacent components, measured in Hz if dt (the difference between time domain samples) is provided to the VI in seconds. df is explicitly calculated as fs / N, where fs is the sampling frequency and N is the length of the time-domain sequence. In order to change df, you must change either fs or N. One way to increase N is to use zero-padding (see question below)
What is zero padding?
This means adding zeros to the beginning and/or end of the time-domain sequence. This addition does not affect the frequency spectrum of the signal. Zero padding is a good idea when the length of the time-domain sequence is not a power of two. Adding enough zeros to make the sequence a power of two will result in faster FFT calculations. Zero padding also increases the frequency resolution of an FFT (see above question).
When using the FFT VI’s, where are the “negative frequencies” stored?
The FFT VI’s are two-sided, which means their output includes negative frequencies that exist purely as a mathematical property of the Fourier Transform. The first half of the FFT output array contains frequencies from DC (0 Hz) to the Nyquist frequency in ascending order. The second half of the array is a mirror image of the first half (mirrored about the middle element) and contains the negative frequencies. What do I wire to the dt input? dt is the time between samples in the time-domain input signal. If you know the sampling rate (fs) at which the signal was acquired, you can easily calculate dt: dt = 1 / fs.
Source: ni.com
-
Recent
-
Links
-
Archives
- May 2009 (3)
- February 2009 (1)
-
Categories
-
RSS
Entries RSS
Comments RSS