On Feb 9, 11:16 am, "kubush" <ab.saybas
...@gmail.com> wrote:
> Hi,
> I have a fixed point FFT implementation that I wrote from scratch in C. It
> is based on radix-2 Cooley-Tukey. I have the same implementation in
> floating point too.
> - When I have periodic input data both floating and fixed point
> implementations work properly.
> - When I have non-periodic input data, let's say x[i] = i; floating point
> implementation is fine but fixed point is completely wrong.
wel, even if you're floating point, the non-windowed non-periodic data
will likely have a nasty discontinuity as you wrap from x[N-1] to
x[0]. but i presume you are expecting that.
> I don't understand what the input type has to do with fixed point data
> structures/operations.
> I would appreciate any help.
try reducing your input amplitude and make sure your word size is big
enough to start with (like 32 bits). another thing, you should (until
you get to block floating-point) use the DFT definition that has
either 1/N (divide by 2 each FFT pass) or 1/sqrt(N) (divide by 2 every
other FFT pass) in front of the summation.
this all will put your output data deeper into predictable noise, but
if your fixed-point numbers overflowed (especially if they wrapped
instead of saturated), you will get some *real* ugly shit in your
output.
r b-j