DSPRelated.com
Forums

FFT phase

Started by john john December 31, 2006
robert bristow-johnson wrote:
> dbd wrote: > > > > > > The circularity of the DFT is a powerful concept that should only be > > used for good. > > > > oh, i guess that leaves me out. i want to use the inherent circularity > of the DFT for evil. > > Dale, how might i use the DFT for something not good?
By giving some poor undergrads an fft which references phase to the circular discontinuity in the fft window, and then asking them to interpolated the frequency and phase of a longer (and thus windowed) non-synchronous sinusoid? :-) -- rhn A.T nicholson d.0.t C-o-M
robert bristow-johnson wrote:
> dbd wrote: >> >> The circularity of the DFT is a powerful concept that should only be >> used for good. >> > > oh, i guess that leaves me out. i want to use the inherent circularity > of the DFT for evil. > > Dale, how might i use the DFT for something not good? > > just curious. > > r b-j >
I guess you haven't worked in defence, or you'd know lots of really evil ways to use DFTs. Steve
robert bristow-johnson wrote:
> dbd wrote: > > > > > > The circularity of the DFT is a powerful concept that should only be > > used for good. > > > > oh, i guess that leaves me out. i want to use the inherent circularity > of the DFT for evil. > > Dale, how might i use the DFT for something not good? > > just curious. > > r b-j
I've always been concerned about the misuse of windows. This is a concern that echos the thoughts of some of the great philosophers of our age: If you asked me to name the three scariest threats facing the human race, I would give the same answer that most people would: nuclear war, global warming and Windows. Dave Barry Windows are an often misunderstood and misapplied stepchild of spectral analysis. Many windows are used in machine processing, not because they are in some way superior, but rather because they are easy to visualize; or are simply generated; or someone thinks that they perform well; or "we've always done it this way". fred harris 1976 Dale B. Dalrymple http://dbdimages.com
Jeff Caunter ha scritto:

> john john wrote: > > >I can't understand the phrase "....this will be modified > >if window function used.". Why? > > The magnitude in the spectrum will be reduced because the input frame is > multiplied by a vector whose elements have a mean amplitude less than > unity. > > Jeff
Do you know any C++ code about how to find and calculate the correct phase and magnitude using hamming window too? Not FFT or FFTW only pls. I have seen they a lot of time but nothing I need really. I need a code to find correct phase value. In the Net there isn't nothing about it. Incredible. Only an incredible amount of theory. Blah. ....and no more with matlab pls :-( . Not all the people knows matlab. My question is different than how to use matlab and its functions.
Jeff Caunter ha scritto:

> john john wrote: > > >I can't understand the phrase "....this will be modified > >if window function used.". Why? > > The magnitude in the spectrum will be reduced because the input frame is > multiplied by a vector whose elements have a mean amplitude less than > unity. > > Jeff
Do you know any C++ code about how to find and calculate the correct phase and magnitude using hamming window too? Not FFT or FFTW only pls. I have seen they a lot of time but nothing I need really. I need a code to find correct phase value. In the Net there isn't nothing about it. Incredible. Only an incredible amount of theory. Blah. ....and no more with matlab pls :-( . Not all the people knows matlab. My question is different than how to use matlab and its functions.
Jeff Caunter ha scritto:

> john john wrote: > > >I can't understand the phrase "....this will be modified > >if window function used.". Why? > > The magnitude in the spectrum will be reduced because the input frame is > multiplied by a vector whose elements have a mean amplitude less than > unity. > > Jeff
Do you know any C++ code about how to find and calculate the correct phase and magnitude using hamming window too? Not FFT or FFTW only pls. I have seen they a lot of time but nothing I need really. I need a code to find correct phase value. In the Net there isn't nothing about it. Incredible. Only an incredible amount of theory. Blah. ....and no more with matlab pls :-( . Not all the people knows matlab. My question is different than how to use matlab and its functions.
Jeff Caunter ha scritto:

> john john wrote: > > >I can't understand the phrase "....this will be modified > >if window function used.". Why? > > The magnitude in the spectrum will be reduced because the input frame is > multiplied by a vector whose elements have a mean amplitude less than > unity. > > Jeff
Do you know any C++ code about how to find and calculate the correct phase and magnitude using hamming window too? Not FFT or FFTW only pls. I have seen they a lot of time but nothing I need really. I need a code to find correct phase value. In the Net there isn't nothing about it. Incredible. Only an incredible amount of theory. Blah. ....and no more with matlab pls :-( . Not all the people knows matlab. My question is different than how to use matlab and its functions.
john john wrote:
> I need a code to find correct phase value.
The phase of what with reference to what? Midnight 1/1/2007 GMT? Or some other point in time? IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
Ron N. ha scritto:

> > The phase of what with reference to what? > Midnight 1/1/2007 GMT? Or some other point in time? > > > IMHO. YMMV. > -- > rhn A.T nicholson d.0.t C-o-M
We have a waveform from a certain number of data, tell 1024. From this waveform you can have a lot of different frequencies. Right? Ok. No think at magnitude. Is not important now. Every frequency has a proper phase. I need to reference this phase with something? Can you show me how? In my calculation I find negative frequecies. Possible? In this days I've searched this informations in the web but I've seen that is impossible to find a code (c, vb, fortran etc) that explain it. I can't believe at this. Look here at my results: Triangular waveform N Magnitude Phase 0) 0.000000 0.000000 1) 103.753218 -90.045649 2) 0.000000 0.000000 3) 11.528425 90.045649 4) 0.000000 0.000000 5) 4.150441 -90.045649 6) 0.000000 0.000000 7) 2.117732 90.045649 8) 0.000000 0.000000 9) 1.281225 -90.045649 10) 0.000000 0.000000 11) 0.857788 90.045649 12) 0.000000 0.000000 13) 0.614248 -90.045649 14) 0.000000 0.000000 15) 0.461450 90.045649 16) 0.000000 0.000000 17) 0.359332 -90.045649 18) 0.000000 0.000000 .................... 1023)............. Square wave N Magnitude Phase 0) 0.000000 0.000000 1) 318.310386 -89.869779 2) 0.000000 0.000000 3) 106.104793 -89.518038 4) 0.000000 0.000000 5) 63.664474 -89.166297 6) 0.000000 0.000000 7) 45.476336 -88.814556 8) 0.000000 0.000000 9) 35.372260 -88.462816 10) 0.000000 0.000000 11) 28.942756 -88.111075 12) 0.000000 0.000000 13) 24.491869 -87.759334 14) 0.000000 0.000000 15) 21.228151 -87.407593 16) 0.000000 0.000000 17) 18.732602 -87.055852 18) 0.000000 0.000000 19) 16.762643 -86.704112 20) 0.000000 0.000000 21) 15.168105 -86.352371 22) 0.000000 0.000000 23) 13.851052 -86.000630 24) 0.000000 0.000000 25) 12.744888 -85.648889 26) 0.000000 0.000000 27) 11.802748 -85.297148 28) 0.000000 0.000000 29) 10.990697 -84.945407 30) 0.000000 0.000000 ........................ 1023).... what about.
john john wrote:
> Every frequency has a proper > phase. I need to reference this phase with something?
Yes. For instance, a weekly cosine wave starting with phase 0 at Sunday midnight will not be the same as a cosine wave starting with phase 0 at Monday noon. A phase of 0 tells you little without a reference point. You will also need a direction if you have a time machine which can go in either direction (past or future).