unexpected difference between offline and real-time processing using SHARC's FFTA/IFFTA
hi guys,
rn my implementation is quite simple, using SHARC's FFTA then IFFTA to see the result fits the theory or not, so we are able to design more things based on this implementation.
offline implementation
N = 512, V = 32, H = 16
Using SHARC's accelerator to process FFT then IFFT.
Input data came from ADSP's example(inputcomplx512.dat)
FFT follows ADSP's implementation
IFFT using the twiddles generated by Python, also confirmed with ADI's twiddles and data sheet, which is correct.
The output of IFFT which is in packed data format, so I use a simple equation( sqrt(Re[n]^2+Im[n+1]^2), n denotes the index of IFFT output vector ) to retrieve information back to time domain then stored in the DMA.
(inputcomplx512.dat vs ifft_result.dat)
with above's conclusion, now I'm migrating my design from offline to real-time processing.
real-time implementation
Same configuration as above, N = 512, V = 32, H = 16
NUMSAMPLES(buffer size) is 512.
Using SHARC's accelerator to process FFT then IFFT.
Input from codec ADC, output to codec DAC.
In real-time processing, a chirp tone(20Hz to 22000Hz) was feeding into the input of codec.
if i'm using the equation( sqrt(Re[n]^2+Im[n+1]^2) to reconstruct information in time domain the result contains a lot of harmonics, and fundamental frequency was disappeared. If i only take the Real part of the IFFT's product, the result seems correct. (Check first screenshot in below!)
To double confirm the result from 6,7, I prepared a sine function wave data ("sine.dat") stored in the DMA and bypass the input data from codec ADC, and repeat the same procedure as 6. And the result is still disappointing, if I'm using sqrt( Re[n]^2+Im[n+1]^2 ) to reconstruct waveform there's bunch of harmonics, if I'm only using the Real part of the IFFT product, the result fits theory again!(Check second screenshot in below!)
(chirp tone result; chirp tone vs chirp tone IFFT(sqrt( Re[n]^2+Im[n+1]^2 )) vs chirp tone IFFT(REAL parts only))
(sine tone result; sine tone vs sine tone IFFT(sqrt( Re[n]^2+Im[n+1]^2 )) vs sine tone IFFT(REAL parts only))
Edit Notes
update comments of the screenshot
[edited by: kweiwen at 6:03 AM (GMT -4) on 9 Apr 2021]
sharc
accelerator
Hi kweiwen,
Apologies for the delayed reply.
We suggest you to refer the below mentioned ADSP-SC58x FFTA Benchmarks FAQ,
ez.analog.com/.../adsp-sc58x-ffta-benchmarks
www.analog.com/.../sharc-benchmarks.html
Regards,
Anand Selvaraj.
Please log in to reply.
