DSPRelated.com
Forums

FFT precision

Started by Curl November 27, 2001
Hello

My question may be stupid..
I have overflow problem with 16bits IFFT (inverse transform)

In audio applications : Is FFT precision at least 32 bits ??
Or (in other words) can you do audio processing with 16 bits FFT ??

Thank you
	
hi curl,

    if u r doing a 16 bit IFFT there is a chance of
getting overflow in q15 formats.if u take care of
saturation by shifting after each accumulation then u
can avoid this problem.
if u  go for 32 bits still there is a chance of
getting overflow if u use Q31 ,unless u go for P.Q
format ,
where P depends on number of samples used in IFFT

hope i am right

-shetty

--- Curl <curl@curl...> wrote:
> Hello
> 
> My question may be stupid..
> I have overflow problem with 16bits IFFT (inverse
> transform)
> 
> In audio applications : Is FFT precision at least 32
> bits ??
> Or (in other words) can you do audio processing with
> 16 bits FFT ??
> 
> Thank you
> 
> 
>
	__________________________________________________

	
hi,
 i'm not an audio expert.. however here are some 
basics.. 

 if you have N bits, it is generally split as 1:I:F , 
where F=N-I-1, i.e., 1 sign bit, I integer bits and F=N-
I-1 fractional bits. you need to trade off between the 
values of I and F. 

  Higher the value of I, lesser are the chances of 
overflow. if you know the dynamic range of the input to 
the system, then you can choose a value of I that 
avoids overflow problem 100%.. however remember that it 
is done at the expense of F, which decides your output 
quality. trading them off depends on the application.

  say for example you are designing a cell-phone.. you 
can afford to hear a beep (overflow) once in a while.. 
but instead if you gain clarity in the speech, you may 
as well go for it.. but if you are designing a missile, 
you can afford that to hit 1 meter away than it 
bouncing back and tracing you :-). 

 there are some scaling methodologies like L1,L2 L 
infinity scaling etc. to decide on how to choose I. you 
can refer to any standard text on filter design.

hope this helps.
bye
ganesan

hi curl,

    if u r doing a 16 bit IFFT there is a chance of
getting overflow in q15 formats.if u take care of
saturation by shifting after each accumulation then u
can avoid this problem.
if u  go for 32 bits still there is a chance of
getting overflow if u use Q31 ,unless u go for P.Q
format ,
where P depends on number of samples used in IFFT

hope i am right

-shetty

--- Curl <curl@curl...> wrote:
> Hello
> 
> My question may be stupid..
> I have overflow problem with 16bits IFFT (inverse
> transform)
> 
> In audio applications : Is FFT precision at least 32
> bits ??
> Or (in other words) can you do audio processing with
> 16 bits FFT ??
> 
> Thank you
	
--- In audiodsp@y..., "Curl" <curl@n...> wrote:
> Hello
> 
> My question may be stupid..
> I have overflow problem with 16bits IFFT (inverse transform)
> 
> In audio applications : Is FFT precision at least 32 bits ??
> Or (in other words) can you do audio processing with 16 bits FFT ??
> 
> Thank you

Hi Curl,

 The FFT/IFFT has a gain factor of the size of fft used, e.g. FFT16 
adds a x16 gain. You should either add guard bits to your signal 
before the FFT, or use a Block Floating Point FFT. In either way, the 
precision using 16bits is high enough for any audio processing.

cheers,
 Uri
	
hi all,
    Iam giving this answer as per our implementation
of AAC standard. FFT of atleast 32 bits is required
for the data to be precise and not overflow. If u
start from 16 bits ie Q15 representaion , then the
Coder fails for certain conformance testing and the
overflow happens only in the FFT module. So it is
better to start with 32 bit representation  ie Q31 and
finally truncate it to 16 bits. But it is better if
the FFT goes with 32 bit precision.
cheers
sundi

Sundararaman 
Texas Instruments India Limited
Bangalore , India.

--- urinix@urin... wrote:
> --- In audiodsp@y..., "Curl"
<curl@n...> wrote:
> > Hello
> > 
> > My question may be stupid..
> > I have overflow problem with 16bits IFFT (inverse
> transform)
> > 
> > In audio applications : Is FFT precision at least
> 32 bits ??
> > Or (in other words) can you do audio processing
> with 16 bits FFT ??
> > 
> > Thank you
> 
> Hi Curl,
> 
>  The FFT/IFFT has a gain factor of the size of fft
> used, e.g. FFT16 
> adds a x16 gain. You should either add guard bits to
> your signal 
> before the FFT, or use a Block Floating Point FFT.
> In either way, the 
> precision using 16bits is high enough for any audio
> processing.
> 
> cheers,
>  Uri
> 
> 
> 
>
	====	__________________________________________________