Re: FFT phase errors
From: Martin Leese (please_at_see.Web.for.e-mail.INVALID)
Date: 01/19/05
- Previous message: attackack_at_yahoo.com: "FFT phase errors"
- In reply to: attackack_at_yahoo.com: "FFT phase errors"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 18 Jan 2005 19:16:34 -0700 To: attackack@yahoo.com
attackack@yahoo.com wrote:
> 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.
The inherent problem is that phase is cyclical so,
when you represent it with a finite variable, you
get discontinuities. These discontinuities are not
errors, merely a limitation of how quantities are
represented inside a computer.
One solution is to *display* the phase using a
representation that is also cyclical. An example
is a pseudocolour look-up-table which starts and
ends with the same colour.
Another solution is to leave the phase in its real
and imaginary components, perhaps normalized. This
maintains its cyclical nature
-- Regards, Martin Leese E-mail: please@see.Web.for.e-mail.INVALID Web: http://members.tripod.com/martin_leese/
- Previous message: attackack_at_yahoo.com: "FFT phase errors"
- In reply to: attackack_at_yahoo.com: "FFT phase errors"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|