FFT phase errors

attackack_at_yahoo.com
Date: 01/18/05


Date: 18 Jan 2005 10:04:27 -0800

I've a c++ code about FFT and when i calculate the phase parameters i
see some errors. In a PDF file about FFT i've seen that:

''...this error occurs whenever the real part is negative. This problem
can be
corrected by testing the real and imaginary parts after the phase has
been
calculated. If both the real and imaginary parts are negative, subtract
180°
(or PI radians) from the calculated phase. If the real part is negative
and the
imaginary part is positive, add 180°(or PI radians). Drill this into
your mind. You have to see the phase only
extending to ±1.5708.
The smallest possible value is always chosen, keeping
the phase between -PI and PI.
It is often easier to understand the phase if it does not have these
discontinuities, even if it means that the phase extends above PI, or
below -PI.
This is called unwrapping the phase.
.............''

Now i ask...there is a c++ code that calculate the phase correctly whit
all the different options?
P.S.: naturally i have real and imaginary component by FFT.



Relevant Pages

  • FFT phase errors
    ... I've a c++ code about FFT and when i calculate the phase parameters i ... from the calculated phase. ... imaginary part is positive, add 180°(or PI radians). ... discontinuities, even if it means that the phase extends above PI, or ...
    (sci.math.num-analysis)
  • Re: How do I Phase shift a signal?
    ... I need to shift the phase of a time-discrete signal by a variable ... I tried to do the fft, ... even get a sine transformed into a cosine that way... ... But did you remember to convert phase from degrees into radians? ...
    (comp.soft-sys.matlab)
  • Re: Where can I get non-radix-2 FFT matlab model?
    ... of a signal.the FFT from Xilinx gives me the real and the imaginary ... arctan/real) will give phase in radians ... Reverse name to reply ...
    (comp.soft-sys.matlab)
  • Re: FFT phase errors
    ... > from the calculated phase. ... That is what atan2 is for. ... Unwrapping the phase is sometimes useful in intepretting visibility data. ... naturally i have real and imaginary component by FFT. ...
    (sci.math.num-analysis)