10-31-2005 04:50 AM
Environment:
LabVIEW 7.0
Express VI -Simulate Signal
Express VI -Spectral Measurements
If the number of data elements sent into the Express VI -Spectral Measurements is not an even power of 2. Will the Express VI -Spectral Measurements internally apply zero padding to the next higher power of 2 (e.g. 100 samples is padded up to 256)?
The white paper “LabVIEW Analysis Concepts” states on page 2-12 that “zero padding also helps in improving the frequency resolution by increasing the number of samples”. This can’t be correct; padding zeros doesn’t increase the amount of information. If that was the case I could take 10 samples and pad 4086 zeros and get very fast accurate measurements.
FFT Spectral leakage and window functions:
I have studied the tutorials and examples and tried the various window functions on simple sine waves with the Express VI -Simulate Signal. It works like I expect it to on a pure sine wave, but if I add uniform white noise (which gives a signal that’s a little bit more realistic) I don’t understand the result.
Why is the amplitude in the power spectrum changing almost more if I apply a Flat Top Window than if I have no Window at all? How does the spectral leakage behave for uniform white noise?
Kind regards
10-31-2005 10:58 AM - edited 10-31-2005 10:58 AM
Message Edited by altenbach on 10-31-2005 09:00 AM
10-31-2005 11:09 AM
As the Online Help says...
This Express VI uses the functionality of the following VIs and
functions:
FFT Power
Spectrum
FFT Spectrum
(Real-Im)
FFT
Power Spectral Density
1. By the way I think no zero padding is applied, infact if you have a signal with 1000 samples the express vi yelds a fft trasform with 500 samples, not 512 that you would have in case of zero padding. And remember: zeropadding in time domain means interpolating in frequency domain and viceversa.
2. I think there's a misunderstanding. It's unlikely to
find such an absurdity on a NI document. Obviously zeros don't have the
power to add information...
3. I didn't understand well your question: windowing helps to reduce the "spectrum spreading" effect that takes place when a signal have different values at boundaries; what do you mean for "amplitude in the power spectrum changing"? Are you doing averaging?
Regards,
manga
10-31-2005 11:25 AM
11-01-2005 03:48 AM
Dear Altenbach,
In the case with the DEER signal I can understand that you can fill out the data set with zeros at the end, since the signal washes out, the likelihood for the signals to actually being zero is very high.
Is the red and white curves in your graph two different measurements, both zero padded?
But if the signal is of a more "random" character and you can not predict how the extension of the signal will look like; Then I still don't understand how padding zeros can increase the resolution. If I interpolate points between actual data points in the time domain I make an assumption, but I don’t know, that there is no "fast changing data" in between.
In your example with padding zeros in the frequency domain, it assumes that you have the knowledge that no higher frequency component exists in the signal. But if you don't know if higher frequency components exist?
I'm still confused.
11-01-2005 03:49 AM
Dear Manga,
2. I'm just reading what NI has printed in the document “LabVIEW Analysis Concepts” page 2-12.
3. Let me clarify my question:
Assume that you enter a pure sine wave with a frequency of 50 Hz and an amplitude of 1. Run an FFT without window function. The power spectrum now shows a sharp peak with the amplitude of 1. If you alter the frequency to 53 Hz the power spectrum peak is now lower in height and more blunt, the energy has leaked into other frequency bins.
If I apply a Flat Top window the height of the peak in the power spectrum stays more or less the same regardless if the frequency is 50 or 53 Hz.
If I do continuously FFT's and study the Power Spectrum, when I change the frequency, I can see the peak slide up and down the x-axis (frequency) while the amplitude is going up and down, in the case when I have no window function applied. If I have Flat Top applied I can the peak (in this case wider) slide up and down the x-axis but the peak amplitude stays the same.
When I add some white noise on top up the pure sine signal to create a more "real world signal", something happens that I don't expect.
When I study the power spectrum, that is continuously updated, I see the Flat Top window response now changes up and down in amplitude almost as much as the Power spectrum without any window function. Why is that? Why isn't the Flat Top amplitude more stable for this type of signal?
Thank you both for helping me shed some light on these topics.
11-01-2005 04:47 AM
11-01-2005 12:13 PM
No math wiz wrote:In the case with the DEER signal I can understand that you can fill out the data set with zeros at the end, since the signal washes out, the likelihood for the signals to actually being zero is very high.Is the red and white curves in your graph two different measurements, both zero padded?
The upper panel shows the raw data and the lower pane the DC centers fourier transform AFTER zero padding. Without zero padding, the pattern in the center would only contain a few data points.
But if the signal is of a more "random" character and you can not predict how the extension of the signal will look like; Then I still don't understand how padding zeros can increase the resolution. If I interpolate points between actual data points in the time domain I make an assumption, but I don’t know, that there is no "fast changing data" in between.
In your example with padding zeros in the frequency domain, it assumes that you have the knowledge that no higher frequency component exists in the signal. But if you don't know if higher frequency components exist?
You seem to confuse the meaning of the word "resolution". The word "resolution" does not imply any data quality or richness of information. It only tells you about the spacing of the points in this case. You need to decide if zero padding is appropriate for your particular situation. It often is.
11-02-2005 12:22 AM