A 32 point FFT in embedded MATLAB using fixed point arithmetic

version 1.0.0.1 (12.7 KB) by Kiran Kintali
The attached model implements a 32 point fft using embedded MATLAB and fixed point arithmetic

3.5K Downloads

Updated Thu, 01 Sep 2016 15:06:50 +0000

View License

DFT plays important role in DSP and used in wide variety of applications like correlation and spectral analysis. Understanding quantization errors in its computation is an important aspect of its design either for s/w or h/w implementation.
A complex DFT of N points has N complex (4N real) mutliplications. In the fixed point implementation of the DFT each mutliplication introduces a quantization error (all the errors are mutually uncorrelated and uncorrelated with input sequence as well).

FFT provides an efficient way to compute DFT. Even though FFT has significantly less number of multiplications the quantization errors do not decreate accordingly. Each butterfly operation (ignoring some multiplications are trivial +/-1) involves one complex (four real) multiplication(s). The quantization errors introduced in each butterfly propagate through N/2 stages.

Analysis of quantization related noise effects in a FFT is a challenge. Since FFT algorithm consists of sequence of stages, it is possible to have different scaling strategies in each stage. The attached model shows how fixed point numeric type and fimath can be changed at each stage of the FFT (implemented as a sub function in the embedded MATLAB script).

To achieve desired numerical behavior of the algorithm for the specific application requirements, each multiplication and sum in the attached model can be tweaked independently. The complex magnitude result of FFT output is plotted and compared to its corresponding behavioral block.

Cite As

Kiran Kintali (2022). A 32 point FFT in embedded MATLAB using fixed point arithmetic (https://www.mathworks.com/matlabcentral/fileexchange/15837-a-32-point-fft-in-embedded-matlab-using-fixed-point-arithmetic), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2007a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

fft32_eml_7a/

fft32_eml_7a/