Hi Milad,
Usually one defines the mantissa and exponent of the fixed point
representation of a signal so that it's components are in the range [-1,
1].
To scale the signal to a (possibly) different exponent to prevent fixed
point over/under flows when using an FFT algorithm you'll first need to
determine what exponent that FFT algorithm is capable of working with.
KISSFFT, a very popular C implementation of the FFT, requires your exponent
to be equal to ceiling( log2(SIZE_OF_FFT) ). So, if you're performing a
512
pt. FFT you will use a 9 bit exponent. If you're performing a 2048 bit
FFT
you'll use an 11 pt. exponent. If you're performing a 167 pt. FFT
you'll
use an 8 pt. exponent. Make sense?
Hope that helps,
-Brant
On Thu, Jun 16, 2011 at 3:50 PM, milad wrote:
> **
> Hi,
>
> I have a basic question regarding fixed point scaling.
> Suppose I have frame based DSP system and
> I want to scale each frame such that it is in the appropriate
> range for the fft module to work with.
> How do I compute this value from the samples of a frame?
>
> Thanks,
> Milad
>
>
>
--
Brant Jameson
PhD Candidate
UC Santa Cruz Computer Engineering
http://people.ucsc.edu/~pheese