Forum Discussion
Altera_Forum
Honored Contributor
17 years agoAltera FFT - output scaling. How to do this correctly?
Hi, I do not get correct scaled results if I do everything the FFT user guide recommends. I have instantiated a 1024 points FFT, with single output and burst architecture. The data width...
Altera_Forum
Honored Contributor
17 years agoI mean the exponent is 6bits signed and can range from 1 to -15, referring to page A-2 of the FFT user guide.
The user guide tells to scale the output with the exponent value of the processed block. Doesn't that mean that I have scale every block of 1024 points I process? But if not, what is the exponent output for? The question is: Do I have to use the exponent value? And how do I have to apply it exactly. The goal is to get the amplitude spectrum. Right now I calculate the magnitude this way: mag = sqrt(16bitreal^2 + 16bitimag^2) ...(the result is too small) I also tried: mag = sqrt((16bitreal^2 * 2^(-exponent)) + (16bitimag^2 * 2^(-exponent)) ) ... the result is too large, compared to the input range. Is this correct?