I am trying to build up some flash programs to demonstrate the DFT and I am pondering something. I am looking at a 16 point DFT and am focusing on the eigth (or ninth, depending on how you look at it) basis function: e^-j2pi*8*n/16. This is also the basis function that is at the folding frequency of the DFT (half the sample rate). what I am realizing is that the DFT will catch cosine energy at one half the sampling frequency but that it entirely misses sine energy at one half the sampling frequency. Any energy that is higher than one half the sampling frequency is folded back down, and everything lower is correctly caught by the DFT. However, this sine energy that is exactly one half the sampling frequency seems to be more like a blind spot. It is not seen or folded at all. But cosine energy at exactly half the sampling frequency would get properly caught by the DFT. Any comment? Thanks Brent

# DFT Blind Spot?

Started by ●March 23, 2008

Reply by ●March 24, 20082008-03-24

<bulegoge@columbus.rr.com> wrote in message news:a6783ad0-fee0-48e3-acd4-f82df2450a38@m44g2000hsc.googlegroups.com...>I am trying to build up some flash programs to demonstrate the DFT and > I am pondering something. > > I am looking at a 16 point DFT and am focusing on the eigth (or ninth, > depending on how you look at it) basis function: e^-j2pi*8*n/16. > This is also the basis function that is at the folding frequency of > the DFT (half the sample rate). > > what I am realizing is that the DFT will catch cosine energy at one > half the sampling frequency but that it entirely misses sine energy at > one half the sampling frequency. > > Any energy that is higher than one half the sampling frequency is > folded back down, and everything lower is correctly caught by the > DFT. However, this sine energy that is exactly one half the sampling > frequency seems to be more like a blind spot. It is not seen or > folded at all. > But cosine energy at exactly half the sampling frequency would get > properly caught by the DFT. > > Any comment? > > Thanks > > BrentThe sampling frequency has to be *greater than* twice the highest frequency in the signal and the components you mention will have zero magnitude - and then there's leakage.... Fred

Reply by ●March 24, 20082008-03-24

On Mar 23, 11:32�pm, "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote:> <buleg...@columbus.rr.com> wrote in message > > news:a6783ad0-fee0-48e3-acd4-f82df2450a38@m44g2000hsc.googlegroups.com... > > > > > > >I am trying to build up some flash programs to demonstrate the DFT and > > I am pondering something. > > > I am looking at a 16 point DFT and am focusing on the eigth (or ninth, > > depending on how you look at it) basis function: �e^-j2pi*8*n/16. > > This is also the basis function that is at the folding frequency of > > the DFT (half the sample rate). > > > what I am realizing is that the DFT will catch cosine energy at one > > half the sampling frequency but that it entirely misses sine energy at > > one half the sampling frequency. > > > Any energy that is higher than one half the sampling frequency is > > folded back down, and everything lower is correctly caught by the > > DFT. �However, this sine energy that is exactly one half the sampling > > frequency seems to be more like a blind spot. �It is not seen or > > folded at all. > > But cosine energy at exactly half the sampling frequency would get > > properly caught by the DFT. > > > Any comment? > > > Thanks > > > Brent > > The sampling frequency has to be *greater than* twice the highest frequency > in the signal and the components you mention will have zero magnitude - and > then there's leakage.... > > Fred- Hide quoted text - > > - Show quoted text -(If my thinking is correct): It has to be greater than twice the highest frequency because it cannot catch sine components at exactly half the sampling frequency. However, if you could construct a signal that had sine and cosine components up to half the sampling frequency **and ** had only cosine components at half the sampling frequency, then everything would be OK.

Reply by ●March 24, 20082008-03-24

bulegoge@columbus.rr.com wrote:> I am trying to build up some flash programs to demonstrate the DFT and > I am pondering something. > > I am looking at a 16 point DFT and am focusing on the eigth (or ninth, > depending on how you look at it) basis function: e^-j2pi*8*n/16. > This is also the basis function that is at the folding frequency of > the DFT (half the sample rate). > > what I am realizing is that the DFT will catch cosine energy at one > half the sampling frequency but that it entirely misses sine energy at > one half the sampling frequency. > > Any energy that is higher than one half the sampling frequency is > folded back down, and everything lower is correctly caught by the > DFT. However, this sine energy that is exactly one half the sampling > frequency seems to be more like a blind spot. It is not seen or > folded at all. > But cosine energy at exactly half the sampling frequency would get > properly caught by the DFT. > > Any comment?You seem surprised. That probably shows that you have a misconception of what proper sampling requires (and hence other subtleties about the sampling process) The simple explanation is that the sampling frequency must be strictly *greater than* twice the highest frequency in the signal. (You probably assumed *greater than or equal*. Tsk tsk!) A subtlety is that the time to reliably recognize a frequency component f is proportional to 1/f or 1/(fs/2 - f), whichever is greater. The constant of proportionality depends in part on the SNR. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������

Reply by ●March 24, 20082008-03-24

On Mar 23, 11:47�pm, Jerry Avins <j...@ieee.org> wrote:> buleg...@columbus.rr.com wrote: > > I am trying to build up some flash programs to demonstrate the DFT and > > I am pondering something. > > > I am looking at a 16 point DFT and am focusing on the eigth (or ninth, > > depending on how you look at it) basis function: �e^-j2pi*8*n/16. > > This is also the basis function that is at the folding frequency of > > the DFT (half the sample rate). > > > what I am realizing is that the DFT will catch cosine energy at one > > half the sampling frequency but that it entirely misses sine energy at > > one half the sampling frequency. > > > Any energy that is higher than one half the sampling frequency is > > folded back down, and everything lower is correctly caught by the > > DFT. �However, this sine energy that is exactly one half the sampling > > frequency seems to be more like a blind spot. �It is not seen or > > folded at all. > > But cosine energy at exactly half the sampling frequency would get > > properly caught by the DFT. > > > Any comment? > > You seem surprised. That probably shows that you have a misconception of > what proper sampling requires (and hence other subtleties about the > sampling process) The simple explanation is that the sampling frequency > must be strictly *greater than* twice the highest frequency in the > signal. (You probably assumed *greater than or equal*. Tsk tsk!) > > A subtlety is that the time to reliably recognize a frequency component > f is proportional to 1/f or 1/(fs/2 - f), whichever is greater. The > constant of proportionality depends in part on the SNR. > > Jerry > -- > Engineering is the art of making what you want from things you can get. > �����������������������������������������������������������������������- Hide quoted text - > > - Show quoted text -I understood that all the books claimed that it needs to be greater than twice the sampling period. I am looking at how the DFT uses the basis functions to find cosine enrgy and sine energy at each discrete frequency. I see that it can find the cosine energy up to and including the frequency that is half the sampling frequency, but it totally misses energy that is sinusoidal at half the sampling frequency. Of course, higher frequencies get folded back down. Of course, a frequency component is rarely phased to be a perfect sine or cosine, so in practice you will be messed up if you don't sample at>2 times the highest frequency component.

Reply by ●March 24, 20082008-03-24

On Mar 23, 11:55�pm, buleg...@columbus.rr.com wrote:> On Mar 23, 11:47�pm, Jerry Avins <j...@ieee.org> wrote: > > > > > > > buleg...@columbus.rr.com wrote: > > > I am trying to build up some flash programs to demonstrate the DFT and > > > I am pondering something. > > > > I am looking at a 16 point DFT and am focusing on the eigth (or ninth, > > > depending on how you look at it) basis function: �e^-j2pi*8*n/16. > > > This is also the basis function that is at the folding frequency of > > > the DFT (half the sample rate). > > > > what I am realizing is that the DFT will catch cosine energy at one > > > half the sampling frequency but that it entirely misses sine energy at > > > one half the sampling frequency. > > > > Any energy that is higher than one half the sampling frequency is > > > folded back down, and everything lower is correctly caught by the > > > DFT. �However, this sine energy that is exactly one half the sampling > > > frequency seems to be more like a blind spot. �It is not seen or > > > folded at all. > > > But cosine energy at exactly half the sampling frequency would get > > > properly caught by the DFT. > > > > Any comment? > > > You seem surprised. That probably shows that you have a misconception of > > what proper sampling requires (and hence other subtleties about the > > sampling process) The simple explanation is that the sampling frequency > > must be strictly *greater than* twice the highest frequency in the > > signal. (You probably assumed *greater than or equal*. Tsk tsk!) > > > A subtlety is that the time to reliably recognize a frequency component > > f is proportional to 1/f or 1/(fs/2 - f), whichever is greater. The > > constant of proportionality depends in part on the SNR. > > > Jerry > > -- > > Engineering is the art of making what you want from things you can get. > > �����������������������������������������������������������������������- Hide quoted text - > > > - Show quoted text - > > I understood that all the books claimed that it needs to be greater > than twice the sampling period. �I am looking at how the DFT uses the > basis functions to find cosine enrgy and sine energy at each discrete > frequency. I see that it can find the cosine energy up to and > including the frequency that is half the sampling frequency, but it > totally misses energy that is sinusoidal at half the sampling > frequency. �Of course, higher frequencies get folded back down. > > Of course, a frequency component is rarely phased to be a perfect sine > or cosine, so in practice you will be messed up if you don't sample at > > > > >2 times the highest frequency component.- Hide quoted text - > > - Show quoted text -- Hide quoted text - > > - Show quoted text -at "greater" than 2 times the sampling frequency. (haha) I put ">2" and google messed it up.

Reply by ●March 24, 20082008-03-24

<bulegoge@columbus.rr.com> wrote in message news:60ec4bb0-1ee6-4432-bf4b-a0feef7dc312@b1g2000hsg.googlegroups.com... On Mar 23, 11:32 pm, "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote:> <buleg...@columbus.rr.com> wrote in message > > news:a6783ad0-fee0-48e3-acd4-f82df2450a38@m44g2000hsc.googlegroups.com... > > > > > > >I am trying to build up some flash programs to demonstrate the DFT and > > I am pondering something. > > > I am looking at a 16 point DFT and am focusing on the eigth (or ninth, > > depending on how you look at it) basis function: e^-j2pi*8*n/16. > > This is also the basis function that is at the folding frequency of > > the DFT (half the sample rate). > > > what I am realizing is that the DFT will catch cosine energy at one > > half the sampling frequency but that it entirely misses sine energy at > > one half the sampling frequency. > > > Any energy that is higher than one half the sampling frequency is > > folded back down, and everything lower is correctly caught by the > > DFT. However, this sine energy that is exactly one half the sampling > > frequency seems to be more like a blind spot. It is not seen or > > folded at all. > > But cosine energy at exactly half the sampling frequency would get > > properly caught by the DFT. > > > Any comment? > > > Thanks > > > Brent > > The sampling frequency has to be *greater than* twice the highest > frequency > in the signal and the components you mention will have zero magnitude - > and > then there's leakage.... > > Fred- Hide quoted text - > > - Show quoted text -(If my thinking is correct): It has to be greater than twice the highest frequency because it cannot catch sine components at exactly half the sampling frequency. However, if you could construct a signal that had sine and cosine components up to half the sampling frequency **and ** had only cosine components at half the sampling frequency, then everything would be OK. **************** You might want to take a look at the Gibby-Smith criterion for the shape of the spectrum that's being sampled. It's like a special set of cases for spectral shape that extends beyond fs/2. That is, there are pulses with the same zero crossings as a sinc that have energy beyond fs/2. Fred

Reply by ●March 24, 20082008-03-24

bulegoge@columbus.rr.com wrote: (snip)> I understood that all the books claimed that it needs to be greater > than twice the sampling period. I am looking at how the DFT uses the > basis functions to find cosine enrgy and sine energy at each discrete > frequency. I see that it can find the cosine energy up to and > including the frequency that is half the sampling frequency, but it > totally misses energy that is sinusoidal at half the sampling > frequency. Of course, higher frequencies get folded back down.> Of course, a frequency component is rarely phased to be a perfect sine > or cosine, so in practice you will be messed up if you don't sample atIt is important to remember the boundary conditions of the DFT. The DFT has periodic boundary conditions. All the basis functions are periodic with period the length of the transform. The sum of such functions is also periodic with the same period. With N sin or cos basis functions you can choose your favorite set of consecutive harmonics, usually 0 to N-1 for the COS terms, and 1 to N for SIN terms. sin(0*t) is zero for all t. If you don't need the cos(0) term you can have 1 to N for COS, too. -- glen

Reply by ●March 24, 20082008-03-24

On Sun, 23 Mar 2008 20:55:36 -0700 (PDT), bulegoge@columbus.rr.com wrote: (Snipped by Lyons)>I understood that all the books claimed that it needs to be greater >than twice the sampling period. I am looking at how the DFT uses the >basis functions to find cosine enrgy and sine energy at each discrete >frequency. I see that it can find the cosine energy up to and >including the frequency that is half the sampling frequency, but it >totally misses energy that is sinusoidal at half the sampling >frequency. Of course, higher frequencies get folded back down. > >Of course, a frequency component is rarely phased to be a perfect sine >or cosine, so in practice you will be messed up if you don't sample at >>2 times the highest frequency component.Hi, The DFT "misses" the sinewave at Fs/2 because the time samples of that sinewave are all zero-valued samples. You're performing a DFT on a string of zeros! The DFT "catches" a cosine at Fs/2 because the time samples of that cosine are alternating +1 & -1's. (Non-zero-valued samples.) Add a little phase shift to your time-domain Fs/2 sinewave by changing your sinewave definition from: Sig = sin(2*pi*(Fs/2)*Time) = sin(2*pi*(Fs/2)/Fs) = sin(pi) = 0 to: Sig = sin(2*pi*(Fs/2)/Fs + pi/8). Now your DFT will not "miss" that sinewave. But as you probably know, in normal spectrum analysis using the DFT we would be VERY* worried if our time signal has appreciable signal energy in the vicinity of Fs/2 Hz. Such high-freq energy would indicate that our Fs sample rate was too low relative to the bandwidth of some sampled analog signal. Good Luck, [-Rick-]

Reply by ●March 24, 20082008-03-24

On Mar 24, 7:09�am, Rick Lyons <R.Lyons@_BOGUS_ieee.org> wrote:> On Sun, 23 Mar 2008 20:55:36 -0700 (PDT), buleg...@columbus.rr.com > wrote: > > � �(Snipped by Lyons) > > >I understood that all the books claimed that it needs to be greater > >than twice the sampling period. �I am looking at how the DFT uses the > >basis functions to find cosine enrgy and sine energy at each discrete > >frequency. I see that it can find the cosine energy up to and > >including the frequency that is half the sampling frequency, but it > >totally misses energy that is sinusoidal at half the sampling > >frequency. �Of course, higher frequencies get folded back down. > > >Of course, a frequency component is rarely phased to be a perfect sine > >or cosine, so in practice you will be messed up if you don't sample at > >>2 times the highest frequency component. > > Hi, > � The DFT "misses" the sinewave at Fs/2 because the > time samples of that sinewave are all zero-valued > samples. �You're performing a DFT on a string of > zeros! �The DFT "catches" a cosine at Fs/2 because the > time samples of that cosine are alternating +1 & -1's. > (Non-zero-valued samples.) > > Add a little phase shift to your time-domain Fs/2 > sinewave by changing your sinewave definition from: > > � �Sig = sin(2*pi*(Fs/2)*Time) � > > � � � �= sin(2*pi*(Fs/2)/Fs) = sin(pi) = 0 > > to: > > � �Sig = sin(2*pi*(Fs/2)/Fs + pi/8). > > Now your DFT will not "miss" that sinewave. > > But as you probably know, in normal spectrum analysis > using the DFT we would be VERY* worried if our > time signal has appreciable signal energy in the > vicinity of Fs/2 Hz. �Such high-freq energy would > indicate that our Fs sample rate was too low relative > to the bandwidth of some sampled analog signal. > > Good Luck, > [-Rick-]Thanks for the reply. The half frequency basis function (sine componant) is all zeros as you stated above. Whereas, I read a lot about frequencies folding above fs/2 and that the DFT is good (theoretically) up to fs/2, then what is happening at fs/2? I see that it is a blind spot. It misses the sine componants. As an example, if you had a time function that had discreet frequencies up to 7 Hz and samples the wave form at 16 Hz and did a 16 point DFT. If you added a perfect sine comonant at 8hz, regardless of the amplitude of the signal you would get the exact same answer for the DFT. This blind spot is subtle.