LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Leakage

Solved!
Go to solution

Hi all,

 

I am trying to demonstrate the concept of leakage and the effect of using windowing. I implemented a simple VI that is attached using LabVIEW 2011.

 

My question is, why the amplitude of the signal in the frequency domain decreases instead of increasing at the peak frequency when I apply windowing function.

As I understand, applying a window means that I overcome the leakage problem and that I should get a higher amplitude (than without using a window) at the peak frequency. Am I right?, or this higher amplitudes will be only in the frequencies around the peak frequency?

 

Another thing, Why if the number of cycles exceeds 2.5, I begin to see folding occur. If this is related to aliasing, why didn't I see folding this beyond number of cycles 2 (Nyquist Theroem) not of 2.5.

 

I appreciate your help.

0 Kudos
Message 1 of 4
(2,775 Views)
Solution
Accepted by Cowboy12

Part of the explanation of the reduced amplitude is straightforward while other parts can be more complicated.

 

The easy part: After windowing there is less energy in the signal.  The parts near the beginning and end of the data segment have reduced amplitude compared to the un-windowed signal. Recall that the Fourier transform involves integrating over infinite time. Essentially that means that the energy in each frequency bin is averaged over the duration of the signal. The peak amplitudes of both the windowed and un-windowed signals are ~1 but the averages are quite different.

 

Window means.png

 

The more complicated part: The location (exact frequency) of the energy within a bin and the number of bins occupied by the signal affect the amplitude of the highest peak. In the images below about 50 points are above -40 dB with the window off while only 4 are above -50 dB in the window on image.  If you properly account for all the energy in the signal, it is there.

 

Window off.png

 

Window on.png

 

The folding that you see is due to fractional cycles when you concatenate the arrays. For any value of cycles which is not an integer multiple of 0.5 you will see strange waveforms at the output of the window case structure.  When you have an odd number of half cycles you get the appearance of a phase inversion.  I really do not understand what you are trying to do with the top half of your block diagram.

 

Lynn

Message 2 of 4
(2,757 Views)

Thanks alot johnsold for this great explanation.

0 Kudos
Message 3 of 4
(2,707 Views)

Glad to be of assistance. 

 

The topic of spectral leakage is fairly easy to describe but not necessarily easy to compensate. Most texts which discuss spectral analysis will have some discussion of leakage. The approach which works best for your application may take some effort to determine. If one "fix" worked for all problems, there would be only one window function. Changing the number of samples, synchronous sampling, windows, and other techniques can all be helpful in various situations.

 

Lynn

0 Kudos
Message 4 of 4
(2,699 Views)