Spectral Leakage is a a phenomenon that takes place due finite windowing of the data. Generally when we take data and pass it to the DFT/FFT algorithm without pre-windowing, we are enforcing a rectangular window over the data. Now this window in frequency domain is sinc in nature. As a result, in addition to the lobe due to the frequency components, additional lobes starts appearing in the DFT spectrum. So instead if you can use a window that is not rectangular in shape and its frequency domain characteristics are uniform in nature, you can reduce the effect. Read about Gibb's phenomenon for further information. Different windows are hanning, hamming, chebychev, parzen, etc. You can find them in matlab. plot them and find their spectrum to have an idea.
Scalloping: When you are using a finite data length, your selected frequency bins are also finite uniformly distributed within [0, Fs/2]. Where Fs is the sampling frequency. As a result, practically due to this finite nature of the frequency bins, the original frequency present in the signal might fall within two adjacent bins. This leads to biased estimate of the frequency, and might also result in biased amplitude estimate.
FFT is used for estimating spectrum of Finite length sequence x[n]. FFT has N finite samples as input with sampling frequency Fs and N finite samples as output. if the input signal has frequency which is integer multiple of Fs/N then entire energy of sequence will fall to one sample and remaining all samples will have zero energy. What it means is that if signal is having integer number of cycles over N samples then Spectrum will have only one component with finite energy. If input frequency is not integer multiple of Fs/N then there will be leakage of energy at the output of FFT into other samples. This condition arises because of rectangular window nature of input sequence which will have SINC like response at the FFT output. SINC function will have one Mainlobe with many side lobes and nulls.
For example : FFT output will have samples placed at ....,(m-2)*Fs/N,(m-1)*Fs/N,m*Fs/N,(m+1)*Fs/N,........
--> if Fin = m Fs/N; then sample containing Peak value will be present exactly at centre of mainlobe of SINC function i.e. at m*Fs/N and remaining Samples will be present at Nulls of SINC function.
--> if m is not an integer then rest of samples apart from Peak value will not be present at null of SINC and will have some finite energy which will be seen as leakage of energy from peak value.
--> This phenomenon of leaking energy from peak value to other samples is called Spectral leakage.
--> This reduction in energy from main lobe is called scalloping loss.
Spectral leakage cannot be eliminated but it can be reduced by using proper windowing technique before applying FFT.
The resolution of DFT is given by k = Nfk / fs, where k=integer (or bucket number), fk is bucket frequency, N is number of samples and fs is sampling frequency.
For example, for a 400 Hz waveform we expect the maximum amplitude to occur at k = Nfk / fs = 2048 * 400 / 8000 =102.4. Each bucket (k value) corresponds to a frequency, not a range of frequencies. And it is always an integer. Thus how can the DFT represent energy at k = 102.4? The answer is that the energy leaks between the instance (buckets) k=102, and 103 and thus the name spectral leakage.
Solution- Using Windows:
“Windowing” means amplitude modulates the input signal so that the spectral leakage is evened out (spreading on-bucket signals more and off-bucket signals less). Thus, windowing reduces the amplitude of the samples at the beginning and end of the window, altering leakage. Windowing is implemented by multiplying the input signal with a windowing function.
It has remarkable figures to understand the phenomenom and practical codes to execute and expand the comprehension. In addition, it supports two solutions to the problem: zero-padding and expanding the window. However, it must be enrich the content with the window change alternative. Regards
In my openion leakage, is a power spread over a frequency spectrum that occurs when the measured signal is not periodic in the sampling interval. This happens because discrete sampling results in the efficient calculation of a Fourier series of a waveform having discontinuities, resulting in additional frequency components. Leakage is the most common mistake encountered in digital signal processing, and although its effects cannot be entirely eliminated, they can sometimes be reduced with the help of a suitable apodization function.