Reply by Tim Wescott November 23, 20042004-11-23
seb wrote:

> Thank a lot, > > i understand. This is the explanation. > But, is it the same thing that appends a the top of the spectrum ? i.e > when the windows is apply on a signal which contains frequency near > the (fs/2) frequency ? >
Yes. Because of aliasing the two frequency lines will approach fs/2 just as they approach fs=0. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by seb November 23, 20042004-11-23
Thank a lot,

i understand. This is the explanation.
But, is it the same thing that appends a the top of the spectrum ? i.e
when the windows is apply on a signal which contains frequency near
the (fs/2) frequency ?



r.lyons@_BOGUS_ieee.org (Rick Lyons) wrote in message news:<41a216df.307654937@news.sf.sbcglobal.net>...
> On 20 Nov 2004 13:18:37 -0800, germain1_fr@yahoo.fr (seb) wrote: > > >Hello, > > > >I need help in order to understand what appends in a specify scheme of > >windows modulation before process FFT (excuse my poor english.. > >French). > > > >1) When the input signal contain only one spectral "bin" at the middle > >of the frequecy spectrum, then i modulate the signal with a windows > >(for example Hamming's windows) before making the FFT. In this case, > >the spectrum is symetric around the bin (BIN = 10 ==> bin-2 = 86.9264, > >bin-1 = 300.434, bin = 441.462, bin+1 = 300.434, bin+2 = 86.9264). > >Everything rigth in this case. > > > >2) BUT when the bin is nears bin 0 or (N/2) then something strang > >appends. If BIN = 2 ==> bin-2 = 8.59499e-005, bin-1 = 189.306, bin = > >407.229, bin+1 = 297.604, bin+2 = 86.9264). The symetric is > >missing..... !!!!! > > > >In the two case, the signal contain an exact frequency (at bin = 11 > >for the first case and at bin = 2 for the second case) > > > >What is happening ? Frequency overlapping ? Something else ? > > > >Can someone help me understand ? > >Think > > Hi, > > I'm not sure what you mean by "input signal contain(s) > only one spectral "bin" at the middle of the frequecy spectrum", > but my guess is that assymetry you see is caused by DFT > leakage. Spectral energy from the negative (positive) spectral > component leaks across the 0 Hz point and into the > positive (negative) frequency range. That spectral leakage > is what causes assymetry around the 0 Hz sample. > > [-Rick-]
Reply by Rick Lyons November 22, 20042004-11-22
On 20 Nov 2004 13:18:37 -0800, germain1_fr@yahoo.fr (seb) wrote:

>Hello, > >I need help in order to understand what appends in a specify scheme of >windows modulation before process FFT (excuse my poor english.. >French). > >1) When the input signal contain only one spectral "bin" at the middle >of the frequecy spectrum, then i modulate the signal with a windows >(for example Hamming's windows) before making the FFT. In this case, >the spectrum is symetric around the bin (BIN = 10 ==> bin-2 = 86.9264, >bin-1 = 300.434, bin = 441.462, bin+1 = 300.434, bin+2 = 86.9264). >Everything rigth in this case. > >2) BUT when the bin is nears bin 0 or (N/2) then something strang >appends. If BIN = 2 ==> bin-2 = 8.59499e-005, bin-1 = 189.306, bin = >407.229, bin+1 = 297.604, bin+2 = 86.9264). The symetric is >missing..... !!!!! > >In the two case, the signal contain an exact frequency (at bin = 11 >for the first case and at bin = 2 for the second case) > >What is happening ? Frequency overlapping ? Something else ? > >Can someone help me understand ? >Think
Hi, I'm not sure what you mean by "input signal contain(s) only one spectral "bin" at the middle of the frequecy spectrum", but my guess is that assymetry you see is caused by DFT leakage. Spectral energy from the negative (positive) spectral component leaks across the 0 Hz point and into the positive (negative) frequency range. That spectral leakage is what causes assymetry around the 0 Hz sample. [-Rick-]
Reply by seb November 22, 20042004-11-22
Hello,

i think i found an explanation.
I think that the windows in the negative part of the spectrum overlapp
the windows in the positive part.
With the opposition of phase, it explain the form of the spectrum near
the DC.


"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message news:<6P2dnQDYP-YznzzcRVn-2w@centurytel.net>...
> "seb" <germain1_fr@yahoo.fr> wrote in message > news:23925133.0411211218.6de1a8ab@posting.google.com... > > Hello, > > > > just to see what i mean, look at this : > > > > > > clear all > > > > N = 256; > > I = 2; > > > > T = [0:1:N-1]; > > x = 1 * cos((2 * pi / N) * T * I); > > f = blackmanharris(length(x))'; > > > > y = x.*f; > > > > Y = fftshift(fft(y)); > > Y = 2*Y/length(Y); > > Amp = abs(Y); > > plot(Amp,'-k.'); > > From this I *don't* see what you mean. > Try this: > L=length(x) > f(1:L)=1.0 > > The result in Scilab looks OK to me! That is, the peaks in the plot are > equal. > So, I suspect something about blackmanharris is doing something you don't > want. > > Fred
Reply by Fred Marshall November 21, 20042004-11-21
"seb" <germain1_fr@yahoo.fr> wrote in message 
news:23925133.0411211218.6de1a8ab@posting.google.com...
> Hello, > > just to see what i mean, look at this : > > > clear all > > N = 256; > I = 2; > > T = [0:1:N-1]; > x = 1 * cos((2 * pi / N) * T * I); > f = blackmanharris(length(x))'; > > y = x.*f; > > Y = fftshift(fft(y)); > Y = 2*Y/length(Y); > Amp = abs(Y); > plot(Amp,'-k.');
From this I *don't* see what you mean. Try this: L=length(x) f(1:L)=1.0 The result in Scilab looks OK to me! That is, the peaks in the plot are equal. So, I suspect something about blackmanharris is doing something you don't want. Fred
Reply by seb November 21, 20042004-11-21
Hello,

just to see what i mean, look at this :


clear all

N = 256;
I = 2;

T = [0:1:N-1];
x = 1 * cos((2 * pi / N) * T * I);
f = blackmanharris(length(x))';

y = x.*f;

Y = fftshift(fft(y));
Y = 2*Y/length(Y);
Amp = abs(Y);
plot(Amp,'-k.');
Reply by Fred Marshall November 21, 20042004-11-21
"seb" <germain1_fr@yahoo.fr> wrote in message 
news:23925133.0411201318.2e89f4ad@posting.google.com...
> Hello, > > I need help in order to understand what appends in a specify scheme of > windows modulation before process FFT (excuse my poor english.. > French). > > 1) When the input signal contain only one spectral "bin" at the middle > of the frequecy spectrum, then i modulate the signal with a windows > (for example Hamming's windows) before making the FFT. In this case, > the spectrum is symetric around the bin (BIN = 10 ==> bin-2 = 86.9264, > bin-1 = 300.434, bin = 441.462, bin+1 = 300.434, bin+2 = 86.9264). > Everything rigth in this case. > > 2) BUT when the bin is nears bin 0 or (N/2) then something strang > appends. If BIN = 2 ==> bin-2 = 8.59499e-005, bin-1 = 189.306, bin = > 407.229, bin+1 = 297.604, bin+2 = 86.9264). The symetric is > missing..... !!!!! > > In the two case, the signal contain an exact frequency (at bin = 11 > for the first case and at bin = 2 for the second case) > > What is happening ? Frequency overlapping ? Something else ? > > Can someone help me understand ?
seb, Well, there's a lot that could be happening. There's more to it than saying that there is a single (non-zero) spectral coefficient. To simplify the process, do this: - make sure that the nonzero spectral coefficient is purely real and that it shows up in two places: at frequency indices 0+K and at N-1+1-K=N-K. - equally make sure that the temporal signal is a cosine with an equal number of cycles (less one sample) in the N time domain samples. Then apply the window in time and you should see the affect of it in frequency. Then, do this: - set the temporal signal to be a cosine with an odd number of half cycles (less one sample) in the N time domain samples. This will assure that the spectral leakage is very apparent. The apply the window in time and you should see the affect of it in frequency. These are rather the two "ends" of the possibilities. Any arbitrary cosine you choose will have some integral number of cycles and one fractional part. If the fraction is small or large then the impact will be reduced. If the fraction is around 50% then the impact will be maximized. Keeping the temporal signals cosines (i.e. real and even) will keep the Fourier Transform real. It's easier to deal with and visualize. Here is an example of a real, even discrete time signal that isn't sinusoidal, it's a triangle: 1. .8 .6 .4 .2 0 0 .2 .4 .6 .8 If we were to plot this as a function of time so that its evenness is clear, it might look like this: time -5 -4 -3 -2 -1 0 1 2 3 4 5 signal 0 .2 .4 .6 .8 1.0 .8 .6 .4 .2 0 Where N=11 and the period of the waveform is 11 sample intervals. It is assumed that it is infinitely long and periodic as: 1. .8 .6 .4 .2 0 0 .2 .4 .6 .8 1. .8 .6 .4 .2 0 0 .2 .4 .6 .8 1. .8 .6 .4 .2 0 0 .2 .4 .6 .8 The first sample occurs at sample 1, time=0 and repeats at sample 12, time=11. So, samples 1-11 completely define one period. If the temporal window you want to apply is (for example) this: 0 .2 .4 .6 .8 1. .8 .6 .4 .2 0 Then you will want to rotate the window in time before you apply it. Rotated, it will also be real and even: 1. .8 .6 .4 .2 0 0 .2 .4 .6 .8 The windowed time function will be the product of the window and the signal (which in this case I've made the same and hope it isn't confusing): 1. .64 .36 .16 .04 0 0 .04 .16 .36 .64 which remains to be real and even. In every case, the time and frequency functions should be real and even as above - except when you have fractional numbers of cycles of a sinusoid for the signal. In that case there will be a "jump" between time N-1 and time N (therefore also time zero) and the function won't likely be even in time. All of these things can change the numbers....... Fred
Reply by seb November 20, 20042004-11-20
Hello,

I need help in order to understand what appends in a specify scheme of
windows modulation before process FFT (excuse my poor english..
French).

1) When the input signal contain only one spectral "bin" at the middle
of the frequecy spectrum, then i modulate the signal with a windows
(for example Hamming's  windows) before making the FFT.  In this case,
the spectrum is symetric around the bin (BIN = 10 ==> bin-2 = 86.9264,
bin-1 = 300.434, bin = 441.462, bin+1 = 300.434, bin+2 = 86.9264).
Everything rigth in this case.

2) BUT when the bin is nears bin 0 or (N/2) then something strang
appends. If BIN = 2 ==> bin-2 = 8.59499e-005, bin-1 = 189.306, bin =
407.229, bin+1 = 297.604, bin+2 = 86.9264). The symetric is
missing..... !!!!!

In the two case, the signal contain an exact frequency (at bin = 11
for the first case and at bin = 2 for the second case)

What is happening ? Frequency overlapping ? Something else ?

Can someone help me understand ?
Think