Re: determing the scaling factor
- From: John <sampson164@xxxxxxxxx>
- Date: Tue, 12 Aug 2008 04:00:37 -0700 (PDT)
On Aug 11, 10:28 pm, "tonga" <binwei_w...@xxxxxxxxxxx> wrote:
I'm writing some code for power spectral estimation using FFT. The data
format I used is Q15 fixed point format. Since I need to scale the original
signal within the Q15 range between -1~0.9999, I need to choose a proper
scaling factor for the original data sequence. But how can I choose this
scaling factor so that it does not cause overflow, nor does it cause
underflow? I tried several different values for this scaling factor but it
either resulted in overflow or underflow. I guess the reason is because the
power spectrum involves with successive accumulation of square magnitude of
FFT output, which may easily goes beyond [-1,1) range. But I don't know how
to select this scaling factor in my case. Anyone has idea on this?
You should divide each input sample by 32768 before windowing.
The window should be floating point between [-1,1].
The window should sum to one if you are looking for accurate tone
power.
Check the scaling performed by the forward FFT.
Divide each FFT mag^2 value by the total number of FFTs performed
before accumulating.
For a bin centered pure tone input, you should get a result of 1 == 0
dBFS at the the expected bin.
John
.
- References:
- determing the scaling factor
- From: tonga
- determing the scaling factor
- Prev by Date: Re: Question regarding Coherence
- Next by Date: Re: determing the scaling factor
- Previous by thread: determing the scaling factor
- Next by thread: Re: determing the scaling factor
- Index(es):
Relevant Pages
|