DSPRelated.com
Forums

DFT Leakage

Started by Sandeep Chikkerur September 30, 2004
Hi,

When the DFT of an integer multiples of the input signal is taken,
then the
mahgnitude response shows that there are no sidelobes.

However, when the DFT of a non-interger multiples of the input signal
is taken,
we get the sidelobes, which we call the DFT leakage.

Ex: 
when input signal has 5 cycles, and you obtain the DFT at any analysis
frequency(m*fs/N), we get only the main lobe.

But, when input signal has 5.6 cycles, along with the main lobe, we
also get the
side lobes.

So, how does the difference of 0.6 cycles in the input signal cause
the side lobes?

Thanks
Sandeep
Sandeep,

as a general advice try my DFT tutorial at 
http://www.dspdimension.com/html/dftapied.html to get started.

Re: your question. You can think of it that way: the DFT evaluates the 
signal at discrete frequencies. If the period of your input frequency 
is exactly a multiple of a period of these frequencies, only one DFT 
bin will be required to represent it.

If the frequency of your time sequence falls between the DFT bin 
frequencies, the neighboring DFT bins are needed to "help correcting" 
for that deviation, so that all the DFT bin frequencies add up to 
produce the correct time sequence.
-- 
Stephan M. Bernsee
http://www.dspdimension.com

Sandeep Chikkerur wrote:

>Hi, > >When the DFT of an integer multiples of the input signal is taken, >then the >magnitude response shows that there are no sidelobes. > >However, when the DFT of a non-integer multiples of the input signal >is taken, >we get the sidelobes, which we call the DFT leakage. > >Ex: >when input signal has 5 cycles, and you obtain the DFT at any analysis >frequency(m*fs/N), we get only the main lobe. > >But, when input signal has 5.6 cycles, along with the main lobe, we >also get the >side lobes. > >So, how does the difference of 0.6 cycles in the input signal cause >the side lobes? > >
Sandeep, The DFT of your set of signal samples actually represents the frequency components of an 'artificial continuous signal' that is made up of that same set of samples repeating over and over indefinitely. ( The DFT is NOT a set of frequency components representing an isolated set of signal samples, with zero voltage before and after. Equally, it is NOT a set of frequency components representing the original real-world continuous signal.) If there are five complete cycles in the original set of samples, then the 'artificial continuous signal' is a pure sinusoidal function and can be represented by a single frequency-component. (The component is usually complex, and usually has positive and negative frequency parts.) If there are 5.6 cycles present then the 'artificial continuous signal' has regular discontinuities, and requires a number of different frequency-components to represent it. The spectral 'leakage' you see is simply the frequency-components that would be required to construct a continuous signal consisting of 5.6 cycles of a sinusoidal function repeating indefinitely, with the consequent phase and amplitude discontinuities. The discontinuities would be heard as a buzz, and are seen in the time domain as extra frequency-components. Regards, John
On 2004-09-30 07:44:26 +0200, Stephan M. Bernsee <spam@dspdimension.com> said:

> > Sandeep, > > as a general advice try my DFT tutorial at > http://www.dspdimension.com/html/dftapied.html to get started. > > Re: your question. You can think of it that way: the DFT evaluates the > signal at discrete frequencies. If the period of your input frequency > is exactly a multiple of a period of these frequencies, only one DFT > bin will be required to represent it. > > If the frequency of your time sequence falls between the DFT bin > frequencies, the neighboring DFT bins are needed to "help correcting" > for that deviation, so that all the DFT bin frequencies add up to > produce the correct time sequence.
Another way of looking at it would be the high frequency content produced by the discontinuity at the frame borders. This is a bit more involved as it needs understanding that in the world of a DFT frame, there is no "outside" - everything wraps around and repeats. So by not fitting in a waveform properly, you're creating a discontinuity (you can hear this as buzzing noise if you play a DFT frame loop) that causes high frequencies to appear. Both explanations are different views of the same thing, actually. -- Stephan M. Bernsee http://www.dspdimension.com
Sandeep Chikkerur wrote:

> When the DFT of an integer multiples of the input signal
> is taken, then the mahgnitude response shows that > there are no sidelobes.
> However, when the DFT of a non-interger multiples of the
> input signal is taken, we get the sidelobes, which we call > the DFT leakage.
> Ex: > when input signal has 5 cycles, and you obtain the DFT at any analysis > frequency(m*fs/N), we get only the main lobe.
> But, when input signal has 5.6 cycles, along with the main lobe, we > also get the side lobes.
The result from DFT is the result from a periodic signal. If you make a periodic signal from 5.6 cycles, it will likely have a sharp discontinuity in it. The frequencies needed to form that sharp discontinuity will all appear in the resultant spectrum. -- glen
On 29 Sep 2004 20:47:21 -0700, sandeep_mc81@yahoo.com (Sandeep
Chikkerur) wrote:

>Hi, > >When the DFT of an integer multiples of the input signal is taken, >then the >mahgnitude response shows that there are no sidelobes. > >However, when the DFT of a non-interger multiples of the input signal >is taken, >we get the sidelobes, which we call the DFT leakage. > >Ex: >when input signal has 5 cycles, and you obtain the DFT at any analysis >frequency(m*fs/N), we get only the main lobe. > >But, when input signal has 5.6 cycles, along with the main lobe, we >also get the >side lobes. > >So, how does the difference of 0.6 cycles in the input signal cause >the side lobes?
Sandeep, You're getting good answers from others, but I'll summarize a little bit. The interesting thing here is that there are multiple, valid, ways to explain this. Understanding all of them really helps, but initially just understanding one goes a long ways. The two fundamental explanations, both of which have already been described, go something like this: 1. The sidelobes (aka, leakage energy) are there, you just can't see them because the frequency samples fall on exactly the zeros of the sinx/x frequency response sidelobes when the input sinewave has an exact integer number of cycles within the input window. The concept of the "input window" is critical here, because the Fourier Transform of the input window also provides the description of the sidelobe behavior. Shortening the length of the input window while holding the number of samples constant, and the input signal constant, will also reveal the sidelobes since the locations of the zeros will move. In other words, shorten your DFT by zeroing some of the samples on the end of the input sequence. This has the effect of shrinking the input window while nothing else changes. The DFT output will no longer be just a single spike for the integer-cycle input case across the FFT aperture. 2. The discontinuties at the end of a non-integer-cycle sequence require additional frequencies to create, so the additional Fourier Coefficients that are required start to appear. Only the case where there is no discontinuity in the input requires a single coefficient (this gets back to the periodic input assumption discussion). Above I described that shortening the input window with an integer number of cycles across the DFT input aperture reveals the sidelobes. The alternate explanation is that now a discontinuity has been created which requires additional frequencies to support. If you understand Gibbs phenomena, which is a reasonably simple idea, then this explanation should be fairly straightforward to grasp. Both of the above points of view are easily supportable mathematically and so are consistent for trying to understand behavior in other contexts. The second argument, in my opinion, goes best with the view that the DFT is working on a repeating sequence of the input aperture, in other words, the DFT input is infinitely periodic. The first argument doesn't really need to make that assumption, since the windowing effects completely account for the sidelobe behavior. If you only understand one of these points of view you can do anything you need to do with DFTs/FFTs and be consistent and get good results. Understanding both is even better. ;) Eric Jacobsen Minister of Algorithms, Intel Corp. My opinions may not be Intel's opinions. http://www.ericjacobsen.org
Sandeep Chikkerur wrote:

> Hi, > > When the DFT of an integer multiples of the input signal is taken, > then the > mahgnitude response shows that there are no sidelobes. > > However, when the DFT of a non-interger multiples of the input signal > is taken, > we get the sidelobes, which we call the DFT leakage. > > Ex: > when input signal has 5 cycles, and you obtain the DFT at any analysis > frequency(m*fs/N), we get only the main lobe. > > But, when input signal has 5.6 cycles, along with the main lobe, we > also get the > side lobes. > > So, how does the difference of 0.6 cycles in the input signal cause > the side lobes? > > Thanks > Sandeep
Sandeep, In another thread, I've taken the view that mathematics doesn't make a feature of a signal, but it does elucidate it. You've gotten a lot of good answers so far, but I want to provide a purely mathematical one that goes back to the simplest basis of a Fourier transform. To find the strength of a frequency component wt of a signal f(t), one simply computes the definite integrals b b integral sin(wt)f(t)dt and integral cos(wt)f(t)dt a a to find the sine and cosine components. If the interval from a to b represents an integer number of cycles of every component of f(t), those integrals will evaluate to zero for every frequency not equal to wt. That is the condition of no leakage. When the number of cycles in not an integer, the part left over contributes to the value of the integral. You can think of that as causing leakage, or as being leakage. Whatever you like. When the interval includes many cycles, the contribution od the partial one is a small part of the whole. Otherwise, the leakage can be large. Nearly all of very low frequencies "leak" into the DC bin. Jerry -- ... they proceeded on the sound principle that the magnitude of a lie always contains a certain factor of credibility, ... and that therefor ... they more easily fall victim to a big lie than to a little one ... A. H. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Eric Jacobsen wrote:
(snip)

>Sandeep, > >You're getting good answers from others, but I'll summarize a little >bit. The interesting thing here is that there are multiple, valid, >ways to explain this. Understanding all of them really helps, but >initially just understanding one goes a long ways. > >The two fundamental explanations, both of which have already been >described, go something like this: > >1. The sidelobes (aka, leakage energy) are there, you just can't see >them because the frequency samples fall on exactly the zeros of the >sinx/x frequency response sidelobes when the input sinewave has an >exact integer number of cycles within the input window. > >
(snip)
>2. The discontinuities at the end of a non-integer-cycle sequence >require additional frequencies to create, so the additional Fourier >Coefficients that are required start to appear. Only the case where >there is no discontinuity in the input requires a single coefficient >(this gets back to the periodic input assumption discussion). > >
(snip) Eric, I agree completely with your second interpretation, but not with the first, where you say that the sidelobes "are there." Using Sandeep's original example of a set of signal examples making up exactly five cycles of a sinusoidal wave, he found that the DFT yields up only one component.( A complex component representing the amplitude of the sin and cos components of a pure sinusoidal signal.) No suprises here of course, but it is clear that there is simply no room for any further components, as the original signal can be exactly reconstructed from this one component. Any further components 'between the bins' so to speak would imply that the original signal was not a pure sinusoid. In fact, any components 'between the bins' would imply that the supposed pure sinusoidal signal was in fact modulated by a signal that had a period longer than five cycles of the original signal. Regards, John
On Sun, 03 Oct 2004 18:27:46 +1000, John Monro
<johnmonro@delete.optusnet.com.au> wrote:

>Eric Jacobsen wrote: >(snip) > >>Sandeep, >> >>You're getting good answers from others, but I'll summarize a little >>bit. The interesting thing here is that there are multiple, valid, >>ways to explain this. Understanding all of them really helps, but >>initially just understanding one goes a long ways. >> >>The two fundamental explanations, both of which have already been >>described, go something like this: >> >>1. The sidelobes (aka, leakage energy) are there, you just can't see >>them because the frequency samples fall on exactly the zeros of the >>sinx/x frequency response sidelobes when the input sinewave has an >>exact integer number of cycles within the input window. >> >> >(snip) > >>2. The discontinuities at the end of a non-integer-cycle sequence >>require additional frequencies to create, so the additional Fourier >>Coefficients that are required start to appear. Only the case where >>there is no discontinuity in the input requires a single coefficient >>(this gets back to the periodic input assumption discussion). >> >> >(snip) > >Eric, >I agree completely with your second interpretation, but not with the >first, where you say that the sidelobes "are there." >Using Sandeep's original example of a set of signal examples making up >exactly five cycles of a sinusoidal wave, he found that the DFT yields >up only one component.( A complex component representing the amplitude >of the sin and cos components of a pure sinusoidal signal.) No suprises >here of course, but it is clear that there is simply no room for any >further components, as the original signal can be exactly reconstructed >from this one component. > >Any further components 'between the bins' so to speak would imply that >the original signal was not a pure sinusoid. In fact, any components >'between the bins' would imply that the supposed pure sinusoidal signal >was in fact modulated by a signal that had a period longer than five >cycles of the original signal. > >Regards, >John
Hi John, I thought Eric's post was very good! I agree Eric that there are two interpretations (explanations) of DFT "leakage". If you have a finite-length x(n) time sequence representing 5 cycles of a sinewave, you can perform the DFT on those x(n) samples to obtain the X(m) freq-domain samples. The question is, "What do those X(m) samples represent?" There are two different, but equivalent interpretations of the X(m) samples. Interpretation# 1: The X(m) sequence represent samples of the continuous Fourier transform (CFT) of the finite-length x(n) time sequence. Because x(n) is only five cycles of a sinewave (as opposed to an infinite number of cycles), its CFT is a sin(x)/xlike continuous function (a continuous curve). The DFT computes individual samples lying on that curve. In this case, the DFT sidelobes exist because of the sin(x)/x spectrum of a truncated (finite-length) x(n) sinusoid. Interpretation# 2: The X(m) sequence is the CFT of an infinitely long time sequence comprising infinite repetitions of the x(n) time sequence. Using this interpretation, some people say, "X(m) is the Fourier transform of a periodic version of x(n)". (What people should *never* say, however, is, "The DFT assumes it's input sequence is periodic.") In this case, the DFT sidelobes exist because of any discontinuity between the last sample of x(n), in one repetition, and the first sample of x(n) in the next repetition. As far as I know, both interpretations are valid, and equivalent to each other. Sheece! I hope the above makes some sense. [-Rick-]
This is a multi-part message in MIME format.
--------------040004050201070104070005
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Rick Lyons wrote:

>On Sun, 03 Oct 2004 18:27:46 +1000, John Monro ><johnmonro@delete.optusnet.com.au> wrote: > > > >>Eric Jacobsen wrote: >>(snip) >> >> >> >>>Sandeep, >>> >>>You're getting good answers from others, but I'll summarize a little >>>bit. The interesting thing here is that there are multiple, valid, >>>ways to explain this. Understanding all of them really helps, but >>>initially just understanding one goes a long ways. >>> >>>The two fundamental explanations, both of which have already been >>>described, go something like this: >>> >>>1. The sidelobes (aka, leakage energy) are there, you just can't see >>>them because the frequency samples fall on exactly the zeros of the >>>sinx/x frequency response sidelobes when the input sinewave has an >>>exact integer number of cycles within the input window. >>> >>> >>> >>> >>(snip) >> >> >> >>>2. The discontinuities at the end of a non-integer-cycle sequence >>>require additional frequencies to create, so the additional Fourier >>>Coefficients that are required start to appear. Only the case where >>>there is no discontinuity in the input requires a single coefficient >>>(this gets back to the periodic input assumption discussion). >>> >>> >>> >>> >>(snip) >> >>Eric, >>I agree completely with your second interpretation, but not with the >>first, where you say that the sidelobes "are there." >>Using Sandeep's original example of a set of signal examples making up >>exactly five cycles of a sinusoidal wave, he found that the DFT yields >>up only one component.( A complex component representing the amplitude >>of the sin and cos components of a pure sinusoidal signal.) No suprises >>here of course, but it is clear that there is simply no room for any >>further components, as the original signal can be exactly reconstructed >> >> >>from this one component. > > >>Any further components 'between the bins' so to speak would imply that >>the original signal was not a pure sinusoid. In fact, any components >>'between the bins' would imply that the supposed pure sinusoidal signal >>was in fact modulated by a signal that had a period longer than five >>cycles of the original signal. >> >>Regards, >>John >> >> > >Hi John, > > I thought Eric's post was very good! I agree Eric that there are >two interpretations (explanations) of DFT "leakage". > >If you have a finite-length x(n) time sequence representing 5 cycles >of a sinewave, you can perform the DFT on those x(n) samples >to obtain the X(m) freq-domain samples. The question is, "What >do those X(m) samples represent?" There are two different, but >equivalent interpretations of the X(m) samples. > >Interpretation# 1: The X(m) sequence represent samples of the >continuous Fourier transform (CFT) of the finite-length x(n) time >sequence. Because x(n) is only five cycles of a sinewave >(as opposed to an infinite number of cycles), its CFT is a >sin(x)/xlike continuous function (a continuous curve). The DFT >computes individual samples lying on that curve. In this case, >the DFT sidelobes exist because of the sin(x)/x spectrum of >a truncated (finite-length) x(n) sinusoid. > > >Interpretation# 2: The X(m) sequence is the CFT of an >infinitely long time sequence comprising infinite repetitions >of the x(n) time sequence. Using this interpretation, some people >say, "X(m) is the Fourier transform of a periodic version of x(n)". >(What people should *never* say, however, is, "The DFT assumes >it's input sequence is periodic.") >In this case, the DFT sidelobes >exist because of any discontinuity between the last sample >of x(n), in one repetition, and the first sample of >x(n) in the next repetition. > >As far as I know, both interpretations are valid, and >equivalent to each other. > >Sheece! I hope the above makes some sense. >[-Rick-] > >
Rick, It does make sense, and I found it interesting to reflect further on the two interpretations. I did not like the idea of 'hidden' sidelobes in interpretation no.1, however the sidelobes turn out to contain information that could be used to reconstruct a version of the time-domain signal, and this would appear as a short burst, preceded and followed by infinite periods of silence. On the other hand, in interpretation no. 2, the sampled CFT (the DFT) contains information that could be used to reconstruct another verson of the time-domain signal, and this signal would appear as the same short burst of signal, but repeating over an over. I prefer the second interpretation as it seems to me to relate more closely to practical applications; the overlap / save FIR filter for example. I do tend to agree that both interpretations are valid though. I particularly liked Eric's remark: If you only understand one of these points of view you can do anything you need to do with DFTs/FFTs and be consistent and get good results. Understanding both is even better. ;) Thanks for an interesting explanation of the two points of view. Regards, John --------------040004050201070104070005 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"> <title></title> </head> <body text="#000000" bgcolor="#ffffff"> Rick Lyons wrote:<br> <blockquote type="cite" cite="mid415fe1c0.3450781@news.sf.sbcglobal.net"> <pre wrap="">On Sun, 03 Oct 2004 18:27:46 +1000, John Monro <a class="moz-txt-link-rfc2396E" href="mailto:johnmonro@delete.optusnet.com.au">&lt;johnmonro@delete.optusnet.com.au&gt;</a> wrote: </pre> <blockquote type="cite"> <pre wrap="">Eric Jacobsen wrote: (snip) </pre> <blockquote type="cite"> <pre wrap="">Sandeep, You're getting good answers from others, but I'll summarize a little bit. The interesting thing here is that there are multiple, valid, ways to explain this. Understanding all of them really helps, but initially just understanding one goes a long ways. The two fundamental explanations, both of which have already been described, go something like this: 1. The sidelobes (aka, leakage energy) are there, you just can't see them because the frequency samples fall on exactly the zeros of the sinx/x frequency response sidelobes when the input sinewave has an exact integer number of cycles within the input window. </pre> </blockquote> <pre wrap="">(snip) </pre> <blockquote type="cite"> <pre wrap="">2. The discontinuities at the end of a non-integer-cycle sequence require additional frequencies to create, so the additional Fourier Coefficients that are required start to appear. Only the case where there is no discontinuity in the input requires a single coefficient (this gets back to the periodic input assumption discussion). </pre> </blockquote> <pre wrap="">(snip) Eric, I agree completely with your second interpretation, but not with the first, where you say that the sidelobes "are there." Using Sandeep's original example of a set of signal examples making up exactly five cycles of a sinusoidal wave, he found that the DFT yields up only one component.( A complex component representing the amplitude of the sin and cos components of a pure sinusoidal signal.) No suprises here of course, but it is clear that there is simply no room for any further components, as the original signal can be exactly reconstructed </pre> </blockquote> <pre wrap=""><!---->&gt;from this one component. </pre> <blockquote type="cite"> <pre wrap="">Any further components 'between the bins' so to speak would imply that the original signal was not a pure sinusoid. In fact, any components 'between the bins' would imply that the supposed pure sinusoidal signal was in fact modulated by a signal that had a period longer than five cycles of the original signal. Regards, John </pre> </blockquote> <pre wrap=""><!----> Hi John, I thought Eric's post was very good! I agree Eric that there are two interpretations (explanations) of DFT "leakage". If you have a finite-length x(n) time sequence representing 5 cycles of a sinewave, you can perform the DFT on those x(n) samples to obtain the X(m) freq-domain samples. The question is, "What do those X(m) samples represent?" There are two different, but equivalent interpretations of the X(m) samples. Interpretation# 1: The X(m) sequence represent samples of the continuous Fourier transform (CFT) of the finite-length x(n) time sequence. Because x(n) is only five cycles of a sinewave (as opposed to an infinite number of cycles), its CFT is a sin(x)/xlike continuous function (a continuous curve). The DFT computes individual samples lying on that curve. In this case, the DFT sidelobes exist because of the sin(x)/x spectrum of a truncated (finite-length) x(n) sinusoid. Interpretation# 2: The X(m) sequence is the CFT of an infinitely long time sequence comprising infinite repetitions of the x(n) time sequence. Using this interpretation, some people say, "X(m) is the Fourier transform of a periodic version of x(n)". (What people should *never* say, however, is, "The DFT assumes it's input sequence is periodic.") In this case, the DFT sidelobes exist because of any discontinuity between the last sample of x(n), in one repetition, and the first sample of x(n) in the next repetition. As far as I know, both interpretations are valid, and equivalent to each other. Sheece! I hope the above makes some sense. [-Rick-] </pre> </blockquote> <br> Rick,<br> It does make sense, and I found it interesting to reflect further on the two interpretations.&nbsp; <br> <br> I did not like the idea of&nbsp; 'hidden' sidelobes in interpretation no.1,&nbsp; however the sidelobes turn out to contain&nbsp; information that could be used to reconstruct a version of the time-domain signal, and this would appear as a short burst, preceded and followed by infinite periods of silence.&nbsp; <br> On the other hand, in interpretation no. 2, the sampled CFT (the DFT)&nbsp; contains information that could be used to reconstruct another verson of the time-domain signal, and this signal would appear as the same short burst of signal, but repeating over an over.<br> <br> I prefer the second interpretation as it seems to me to relate more closely to practical applications; the overlap / save FIR filter for example.&nbsp; I do tend to agree that both interpretations are valid though.<br> <br> I particularly liked Eric's remark:<br> <blockquote>If you only understand one of these points of view you can do anything you need to do with DFTs/FFTs and be consistent and get good results.&nbsp; Understanding both is even better. ;)<br> </blockquote> Thanks for an interesting&nbsp; explanation of the two points of view.<br> <br> Regards, <br> John<br> <blockquote><br> <br> <br> </blockquote> </body> </html> --------------040004050201070104070005--