AnsweredAssumed Answered

1024 FFT for SPT simulation issues with model base design toolbox 

Question asked by Morris Li on Sep 27, 2019
Latest reply on Sep 27, 2019 by Melutu Iulian Bulancea

 I tried to simulate 1024 FFT using model base design toolbox. 

 

 The twiddle factor was generated by following code

NFFT =1024

 

for mm = 0:1:(NFFT-1)
theta = (-2*pi*mm*1/NFFT);
twiddle(mm+1) = cos(theta) + (1i*(sin(theta)));
end
twiddle = twiddle*0.99997*2^15;

 

The window function was generate as following

win = chebwin(NFFT,100);
win = round(win*0.99998*2^15).';

 

A cos signal with 10* time of  frequency resolution (delta_f) was used as test signal;

NFFT =1024;
fs = 20.e6;
delt_f = fs/NFFT;
f1 = 10* delt_f;

S = cos(2*pi*f1*[0:NFFT-1]/fs + (rand * 2 *pi)) * (0.25);

S = round(S * 2^11);
S = S .* 2^2;

 

Then it was passed to spt functions to simulate 1024 FFT results by following

quad_ext_fft = 'QUAD_EXT';

win_out = win_mex(complex(win),complex(S),'MULTIPLE_COEFF',0);

Stage_0 = rdx4_mex(twiddle, win_out,'WIN_DISABLED','MULTIPLE_COEFF',0,quad_ext_fft,'NO_COMBINED_FFT',0);
Stage_1 = rdx4_mex(twiddle, Stage_0,'WIN_DISABLED','MULTIPLE_COEFF',1,quad_ext_fft,'NO_COMBINED_FFT',0);
Stage_2 = rdx4_mex(twiddle, Stage_1,'WIN_DISABLED','MULTIPLE_COEFF',2,quad_ext_fft,'NO_COMBINED_FFT',0);
Stage_3 = rdx4_mex(twiddle, Stage_2,'WIN_DISABLED','MULTIPLE_COEFF',3,quad_ext_fft,'NO_COMBINED_FFT',0);
Stage_4 = rdx4_mex(twiddle, Stage_3,'WIN_DISABLED','MULTIPLE_COEFF',4,quad_ext_fft,'NO_COMBINED_FFT',0);

 

However, it could not get correct peak at Stage_4 output. The results was following

FFT output for 1024 FFT

Is anything I forgot or missed ?

Outcomes