3A FFT Analysis
-
Upload
hanifperdana -
Category
Documents
-
view
244 -
download
0
Transcript of 3A FFT Analysis
-
8/2/2019 3A FFT Analysis
1/29
FFT Analysis
Understanding the limitations of
synchronisation and frequency
resolution
-
8/2/2019 3A FFT Analysis
2/29
Definitions
N = number of samples taken T = total sampling time = N/Fs
T= time increment between samples =T/N Fs = sample frequency = 1/ T
F= frequency resolution = 1/T = Fs/N
Fmax = Folding frequency =Fs/2
F = frequency
-
8/2/2019 3A FFT Analysis
3/29
What is an FFT
The FFT, or Fast Fourier Transform is a method of
calculating harmonics not one at a time, but as a group,
using a special algorithm.
Advantage
The FFT requires much less processing power than a DFT
for the same number of harmonic results.
Disadvantage
Requires that the number of samples being analysed are N
to a power of 2, such as 64, 128, 256 etc
-
8/2/2019 3A FFT Analysis
4/29
FFT Disadvatages
Frequency Resolution Harmonic Leakage
Requires synchronisation
-
8/2/2019 3A FFT Analysis
5/29
10Hz Waveform sampled at 200Hz
Consider a 10Hz sine wave with an amplitude of 1
As a starting point the sampling frequency (Fs)is 200Hz
The number of samples taken (N) was 256
Sample time = N/Fs =256/200 equals 1.28 seconds
-
8/2/2019 3A FFT Analysis
6/29
Frequency SpectrumFrequency Resolution = Fs/N = 200/256 equals 0.781Hz
Fmax( folding frequency) =Fs/2 equals 100Hz
Solution of (f) 10Hz = f/ F equals 12.8 samples
-
8/2/2019 3A FFT Analysis
7/29
Frequency Spectrum
Because the FFT resolution does not allow the
measurement of 10 Hz
Sample 12 = 9.372 Hz
Sample 13 = 10.153 Hz
Sample 14 = 10.934 Hz
-
8/2/2019 3A FFT Analysis
8/29
Comments
Although the frequency spectrum correctly shows a spike at 10Hz, the spike is notinfinitesimally narrow. In fact, it appears from the frequency spectrum that there is asignificant component of the signal at frequencies near 10Hz (specifically within about5Hz to either side of 10Hz). This unphysical error in the FFT is called leakage, whichappears when the discrete data acquisition does not stop exactly in the same phase of thesine wave as it started, it is not synchronised.
In principle if an infinite number of discrete samples are taken, leakage would not be aproblem. However, any real data acquisition system performing FFTs uses a finite(rather than infinite) number of discrete samples, and there will always be some leakage.
The maximum amplitude of the FFT is not exactly 1 (in fact it is less than 1), eventhough the amplitude of the original signal was exactly 1. This is another consequenceof leakage namely some of the energy at 10Hz is distributed among frequencies near10Hz, thereby reducing the calculated amplitude at 10 Hz
This can be reduced using a correction window function such as a Hanning windowwhich modifies the result of the FFT to mathematically
The frequency range is from 0 to 100Hz, half the sampling frequency (Nyquist criterion)
-
8/2/2019 3A FFT Analysis
9/29
How can leakage be reduced?
Will a higher sample rate help ?
Lets use an increased sample rate of 1000Hz
Consider a 10Hz sine wave with an amplitude of 1As a starting point the sampling frequency (Fs)is 1000Hz
The number of samples taken (N) was 256
Sample time = N/Fs =256/1000 equals 0.256 seconds
-
8/2/2019 3A FFT Analysis
10/29
Increase sample rate to 1000Hz
Higher sampling frequency has vastly improved the resolution
of the sine wave, there are now 100 data points per wavelength.
-
8/2/2019 3A FFT Analysis
11/29
Frequency SpectrumFrequency Resolution = Fs/N = 1000/256 equals 3.91Hz
Fmax( folding frequency) =Fs/2 equals 500Hz
Solution of (f) 10Hz = f/ F equals 2.55 samples
-
8/2/2019 3A FFT Analysis
12/29
Frequency Spectrum
Because the FFT resolution does not allow the
measurement of 10 Hz
Sample 2= 7.82 Hz
Sample 3 = 11.73 Hz
Sample 4 = 15.64 Hz
-
8/2/2019 3A FFT Analysis
13/29
Comments
Increasing the sampling frequency did not improve the frequency spectrum, in fact the
output frequency resolution is worse approximately 3.91Hz whereas at a sampling
frequency of 200Hz the resolution was approximately 0.781Hz
Furthermore, the peak amplitude of the frequency spectrum is now 0.66 significantly
smaller than the known signal amplitude of1. This is due to leakage, which is even
worse in this case because of poor frequency resolution.
Even worse, the peak amplitude of the frequency spectrum occurs at a frequency of11.72Hz instead of the known 10Hz. This is the result of poor frequency resolution.
The only thing gained from increasing the sampling frequency of an FFT is the
corresponding increase in the maximum frequency ( folding frequency ) of the
frequency spectrum but at the loss of frequency resolution.
-
8/2/2019 3A FFT Analysis
14/29
Decrease sample rate to 25HzFor a 10Hz sine wave , a 1000Hz sample rate is overkill.
By the Nyquist criterion, since the maximum frequency is
10Hz, the minimum required sample rate to avoid aliasing is
20Hz, lets consider a sampling frequency of 25Hz
10Hz sine wave with an amplitude of 1
Sampling frequency (Fs)is 25Hz
The number of samples taken (N) was 256
Sample time = N/Fs =256/25 equals 10.24 seconds
-
8/2/2019 3A FFT Analysis
15/29
Frequency SpectrumFrequency Resolution = Fs/N = 25/256 equals 0.0977Hz
Fmax( folding frequency) =Fs/2 equals 12.5Hz
Solution of (f) 10Hz = f/ F equals 102.35 samples
-
8/2/2019 3A FFT Analysis
16/29
Frequency Spectrum
Because the FFT resolution does not allow the
measurement of 10 Hz
Sample 102= 9.996 Hz
Sample 103 = 10.06 Hz
Sample 104 = 10.16 Hz
-
8/2/2019 3A FFT Analysis
17/29
Comments
The frequency resolution is better at 0.0977Hz While there is still some leakage, it is only significant
within about 1Hz to the right or left of the peak at 10Hz
The maximum amplitude is about 0.75, and occurs at
9.96Hz- much closer to the true frequency of 10Hz, due to
greater resolution
This illustrates a very significant, yet unappreciated
fact: Higher sampling rate of an FFT is not alwaysbetter.
-
8/2/2019 3A FFT Analysis
18/29
Increase the number of Samples
Can the FFT results be improved ?The answer is yes but at the cost of more computing time.
The previous case was repeated except the number of samples
are doubled from 256 to 512.
10Hz sine wave with an amplitude of 1
Sampling frequency (Fs)is 25Hz
Sample time = N/Fs =512/25 equals 20.48 seconds
-
8/2/2019 3A FFT Analysis
19/29
Frequency SpectrumFrequency Resolution = Fs/N = 25/512 equals 0.0488Hz
Fmax( folding frequency) =Fs/2 equals 12.5Hz
Solution of (f) 10Hz = f/ F equals 204.8 samples
-
8/2/2019 3A FFT Analysis
20/29
Frequency Spectrum
Because the FFT resolution does not allow the
measurement of 10 Hz
Sample 204= 9.96 Hz
Sample 205 = 10.01 Hz
Sample 206 = 10.06 Hz
-
8/2/2019 3A FFT Analysis
21/29
Comments
The frequency resolution has improved by a factor of two(for the same sampling frequency)
The peak in the spectrum at 10Hz is much narrower, with
reduced leakage.
The peak amplitude is now at 0.934 at a frequency of
10.01Hz
The improvement is due to greater frequency resolution
and reduced leakage.
-
8/2/2019 3A FFT Analysis
22/29
SynchronisationIt is theoretically possible to obtain a perfect FFT from
sampled data.
However this is only possible if the sampled data begins
and ends in the same phase of the signal
10Hz sine wave with an amplitude of 1
Number of samples = 512
Sampling frequency (Fs)is 25.6HzSample time = N/Fs =512/25.6 equals 20 seconds
This T corresponds to exactly 200 complete cycles of the
10Hz sine wave.
-
8/2/2019 3A FFT Analysis
23/29
Frequency SpectrumFrequency Resolution = Fs/N = 25.6/512 equals 0.05Hz
Fmax( folding frequency) =Fs/2 equals 12.8Hz
Solution of (f) 10Hz = f/ F equals sample 200
-
8/2/2019 3A FFT Analysis
24/29
Comments
The peak amplitude is exactly 1V, and occurs at
10HZ
The FFT is perfectly correct because there is no
leakage because of the correct frequency resolution
-
8/2/2019 3A FFT Analysis
25/29
DFT Analysis
The principle of the Fourier Analysis is to test for the
presence of each frequency component by multiplying the
wave form by sine and cosine waveform of the same test
frequency and average the results over one or more cycles.
In the case of DFT analysis, the first step is to determine
the fundamental frequency of the wave form to be
analysed.
The disadvantage of the DFT technique is that it requires
each harmonic to be calculated separately which requires
more computing power
-
8/2/2019 3A FFT Analysis
26/29
Advantages of the DFT
The DFT does not require that the number ofsamples N to be to a power of 2, such as 64, 128,
256 etc
The DFT harmonic frequency resolution isindependent of the sample rate.
The DFT does not suffer from harmonic leakage
because the DFT uses sine and cosine tablesfrequency referenced to the fundamental
frequency measurement.
-
8/2/2019 3A FFT Analysis
27/29
Conclusions
An FFT only returns the correct result thesampling frequency is matched to give theresulting number of samples (2 to the power N)over a complete number of waveform cycles. The
measurements are said to be synchronised to thewaveform .
In real life the sample time is an integer of the
instrument clock frequency and this means that allFFT measurements will be in error due toharmonic leakage
-
8/2/2019 3A FFT Analysis
28/29
Conclusions
Increased sample rate does not increase frequencyresolution.
Window functions such as the Hanning window
reduce the harmonic leakage error but cannot fullycompensate for it over a wide frequency range.
-
8/2/2019 3A FFT Analysis
29/29
Conclusions
An FFT has the advantage of allowing aoverview of a wide range of harmonic
frequencies as used on a Spectrum analyser
or Scope but is limited in accuracy. For an accurate Power Analyser the correct
harmonic measurement solution is to use a
DFT as specified by IEC61000-4-7 , Testing
and measurement techniques