DSPRelated.com
Forums

FFT phase

Started by john john December 31, 2006
Ron N. ha scritto:

> Phase is meaningless without a defined reference point. > Therefore your phase is likely not wrong, just referenced to > a different location or with a different polarity than you expect. > > I usually flip the sign of alternating fft results to move the 0 > phase reference to the center of my fft aperature. This way, > any phase interpolation isn't done with reference to a potential > discontinuity or window function null at the aperture boundry. > > > IMHO. YMMV. > -- > rhn A.T nicholson d.0.t C-o-M
You calculations are correct adjusting the phase as you say? You say that if the first phase value is "90" you put there "0" and than subtract at the others value "90"? In this way the first parameter is "0" and the other are rephased to this. Can you post an example about you calculations? At the end of my code I have finally magnitude and phase. The phase is good for some kind of waves and bad for others waves. Seems that need to be adjusted. I have negative and positive phase values. In a different post than google I've seen: ---------------------------------------------- The negative frequencies in the FFT are due to the fact that they are calculated using complex numbers (i.e., numbers that have both real and imaginary components). For the purposes of displaying the calculated frequency levels, you can just ignore the negative frequencies. By the way, if you look at the negative levels, you can see that they are a mirror image of the positive levels. You would need the negative frequency components if you were doing any calculations, however, like if you wanted to perform the inverse FFT and get the original time-series (wave) data back ---------------------------------------------- I'm confused.
Ron N. ha scritto:

> Phase is meaningless without a defined reference point. > Therefore your phase is likely not wrong, just referenced to > a different location or with a different polarity than you expect. > > I usually flip the sign of alternating fft results to move the 0 > phase reference to the center of my fft aperature. This way, > any phase interpolation isn't done with reference to a potential > discontinuity or window function null at the aperture boundry. > > > IMHO. YMMV. > -- > rhn A.T nicholson d.0.t C-o-M
You calculations are correct adjusting the phase as you say? You say that if the first phase value is "90" you put there "0" and than subtract at the others value "90"? In this way the first parameter is "0" and the other are rephased to this. Can you post an example about you calculations? At the end of my code I have finally magnitude and phase. The phase is good for some kind of waves and bad for others waves. Seems that need to be adjusted. I have negative and positive phase values. In a different post than google I've seen: ---------------------------------------------- The negative frequencies in the FFT are due to the fact that they are calculated using complex numbers (i.e., numbers that have both real and imaginary components). For the purposes of displaying the calculated frequency levels, you can just ignore the negative frequencies. By the way, if you look at the negative levels, you can see that they are a mirror image of the positive levels. You would need the negative frequency components if you were doing any calculations, however, like if you wanted to perform the inverse FFT and get the original time-series (wave) data back ---------------------------------------------- I'm confused.
Ron N. ha scritto:

> Phase is meaningless without a defined reference point. > Therefore your phase is likely not wrong, just referenced to > a different location or with a different polarity than you expect. > > I usually flip the sign of alternating fft results to move the 0 > phase reference to the center of my fft aperature. This way, > any phase interpolation isn't done with reference to a potential > discontinuity or window function null at the aperture boundry. > > > IMHO. YMMV. > -- > rhn A.T nicholson d.0.t C-o-M
You calculations are correct adjusting the phase as you say? You say that if the first phase value is "90" you put there "0" and than subtract at the others value "90"? In this way the first parameter is "0" and the other are rephased to this. Can you post an example about you calculations? At the end of my code I have finally magnitude and phase. The phase is good for some kind of waves and bad for others waves. Seems that need to be adjusted. I have negative and positive phase values. In a different post than google I've seen: ---------------------------------------------- The negative frequencies in the FFT are due to the fact that they are calculated using complex numbers (i.e., numbers that have both real and imaginary components). For the purposes of displaying the calculated frequency levels, you can just ignore the negative frequencies. By the way, if you look at the negative levels, you can see that they are a mirror image of the positive levels. You would need the negative frequency components if you were doing any calculations, however, like if you wanted to perform the inverse FFT and get the original time-series (wave) data back ---------------------------------------------- I'm confused.
Ron N. ha scritto:

> Phase is meaningless without a defined reference point. > Therefore your phase is likely not wrong, just referenced to > a different location or with a different polarity than you expect. > > I usually flip the sign of alternating fft results to move the 0 > phase reference to the center of my fft aperature. This way, > any phase interpolation isn't done with reference to a potential > discontinuity or window function null at the aperture boundry. > > > IMHO. YMMV. > -- > rhn A.T nicholson d.0.t C-o-M
You calculations are correct adjusting the phase as you say? You say that if the first phase value is "90" you put there "0" and than subtract at the others value "90"? In this way the first parameter is "0" and the other are rephased to this. Can you post an example about you calculations? At the end of my code I have finally magnitude and phase. The phase is good for some kind of waves and bad for others waves. Seems that need to be adjusted. I have negative and positive phase values. In a different post than google I've seen: ---------------------------------------------- The negative frequencies in the FFT are due to the fact that they are calculated using complex numbers (i.e., numbers that have both real and imaginary components). For the purposes of displaying the calculated frequency levels, you can just ignore the negative frequencies. By the way, if you look at the negative levels, you can see that they are a mirror image of the positive levels. You would need the negative frequency components if you were doing any calculations, however, like if you wanted to perform the inverse FFT and get the original time-series (wave) data back ---------------------------------------------- I'm confused.
Ron N. ha scritto:

> Phase is meaningless without a defined reference point. > Therefore your phase is likely not wrong, just referenced to > a different location or with a different polarity than you expect. > > I usually flip the sign of alternating fft results to move the 0 > phase reference to the center of my fft aperature. This way, > any phase interpolation isn't done with reference to a potential > discontinuity or window function null at the aperture boundry. > > > IMHO. YMMV. > -- > rhn A.T nicholson d.0.t C-o-M
You calculations are correct adjusting the phase as you say? You say that if the first phase value is "90" you put there "0" and than subtract at the others value "90"? In this way the first parameter is "0" and the other are rephased to this. Can you post an example about you calculations? At the end of my code I have finally magnitude and phase. The phase is good for some kind of waves and bad for others waves. Seems that need to be adjusted. I have negative and positive phase values. In a different post than google I've seen: ---------------------------------------------- The negative frequencies in the FFT are due to the fact that they are calculated using complex numbers (i.e., numbers that have both real and imaginary components). For the purposes of displaying the calculated frequency levels, you can just ignore the negative frequencies. By the way, if you look at the negative levels, you can see that they are a mirror image of the positive levels. You would need the negative frequency components if you were doing any calculations, however, like if you wanted to perform the inverse FFT and get the original time-series (wave) data back ---------------------------------------------- I'm confused.
Ron N. ha scritto:

> Phase is meaningless without a defined reference point. > Therefore your phase is likely not wrong, just referenced to > a different location or with a different polarity than you expect. > > I usually flip the sign of alternating fft results to move the 0 > phase reference to the center of my fft aperature. This way, > any phase interpolation isn't done with reference to a potential > discontinuity or window function null at the aperture boundry. > > > IMHO. YMMV. > -- > rhn A.T nicholson d.0.t C-o-M
You calculations are correct adjusting the phase as you say? You say that if the first phase value is "90" you put there "0" and than subtract at the others value "90"? In this way the first parameter is "0" and the other are rephased to this. Can you post an example about you calculations? At the end of my code I have finally magnitude and phase. The phase is good for some kind of waves and bad for others waves. Seems that need to be adjusted. I have negative and positive phase values. In a different post than google I've seen: ---------------------------------------------- The negative frequencies in the FFT are due to the fact that they are calculated using complex numbers (i.e., numbers that have both real and imaginary components). For the purposes of displaying the calculated frequency levels, you can just ignore the negative frequencies. By the way, if you look at the negative levels, you can see that they are a mirror image of the positive levels. You would need the negative frequency components if you were doing any calculations, however, like if you wanted to perform the inverse FFT and get the original time-series (wave) data back ---------------------------------------------- I'm confused.
john john wrote:
> Ron N. ha scritto: > > > Phase is meaningless without a defined reference point. > > Therefore your phase is likely not wrong, just referenced to > > a different location or with a different polarity than you expect. > > > > I usually flip the sign of alternating fft results to move the 0 > > phase reference to the center of my fft aperature. This way, > > any phase interpolation isn't done with reference to a potential > > discontinuity or window function null at the aperture boundry. > > > > > > IMHO. YMMV. > > -- > > rhn A.T nicholson d.0.t C-o-M > > > You calculations are correct adjusting the phase as you say? You say > that if the first phase value is "90" you put there "0" and than > subtract at the others value "90"? In this way the first parameter is > "0" and the other are rephased to this. Can you post an example about > you calculations?
The phase delta for a given offset changes with frequency. For instance, halfway down the aperture is half of 360 (or 180 degrees) for f=1, half of 720 (or 0 degrees) for f=2, half of 3*360 (or 180 degrees) for f=3, etc. So you have to subtract a different phase (might be the same after modulo 2pi) from every dft bin to adjust the reference point. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
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
Rune Allnor wrote:
> Jerry Avins skrev: > > robert bristow-johnson wrote: > > > > > one thing to think about is both the concepts of "negative frequency" > > > in the FFT output as well as "negative time" in the FFT input (this is > > > what the MATLAB function "fftshift()" is for). > > > > I don't know Matlab. Does fftshift() give the same result as inverting > > the sign of all the odd-numbered samples? > > I don't know what effects that sign inversion might have, but I do > know that FFTSHIFT re-arranges the output of the FFT function. > > X = fft(x); > XX = fftshift(X); > > After the first line, X(1) contains the DC component of the spectrum > of x (matlab start indexing at 1, not 0). After the call to FFTSHIFT > the DC coefficient is located near N/2, N being the length of x, and > the spectrum XX is conjugate symmetric around the DC coefficient. > > Rune
Looking at the DFT as a circular convolution, the FFTSHIFT function does not rearrange, but merely rotates the FFT output. The multiplication of alternate inputs by -1 is equivalent to multiplying the input data with half the sampling frequency. In the DFT, by the modulation property, this produces a frequency shift by half the sampling frequency. And moving a lowpass response (centered at DC) to a response centered at half the sampling frequency, converts a lowpass to a highpass response. A convenient choice of phase for the half sampling frequency signal yields values of 1 and -1 that require nothing or a sign change to implement. The circularity of the DFT is a powerful concept that should only be used for good. Beware of creeping linearity assumptions that come from negative and positive being interpreted as opposed directions instead of opposed rotations. Dale B. Dalrymple http://dbdimages.com
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