-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FFT4 discrepancy (DSP-139) #87
Comments
@andg1 , The FFT radix-2 and FFT radix-4 produce the same output in case if the length is the same. Thank you, |
Thank you for the reply! Also from So if the first 2 input/output array definition is the correct how the array is populated in "FFT4" example is wrong if I understood the documentation correctly |
@andg1
Or something like this. We will fix it soon in next release. Thank you very much! |
So if I'm correct even the way the array is populated in FFT4 is wrong. Instead of Thanks in advance |
@andg1 real[0...N-1] -> FFT-> dsps_bit_rev4r_fc32() -> Cplx[0...N/2-1] -> dsps_cplx2real_fc32() -> Cplx[0...N/2-1] = complex spectrum of real input signal. The FFT (R2 and R4) is always working with complex input. But, if you have real input signal that is located in one real array, like float[512], then you can imagine, that you have a complex[256] array, and you will have odd real samples as Re[...] input data, and even input samples as Im[...] input data. In simple words, Or... Regards, |
Answers checklist.
General issue report
Testing FFT4 example but with real adc data is generating incorrect output of the fft. Comparing to the FFT example the radix-2 input vector is populated in a completely different way and it's not well documented in esp-dsp documentation, also there are some comments simply copy-pasted that are wrong and "input/output array with size of N2. An elements located: Re[0],Re[1], , … Re[N-1], any data… up to N2 result of DCT will be stored to this array from 0…N-1. Size of data array must be N*2!!! " suggest that the vector in radix4 should be half populated with real and half img, if so why use x1[i] = 10 * log10f((x1[i * 2 + 0] * x1[i * 2 + 0] + x1[i * 2 + 1] * x1[i * 2 + 1] + 0.0000001) / N); copied from FFT example?. To get the fft working properly I had to use FFT example (so using radix2) and populate the array using format Re[0], Im[0], … Re[N-1], Im[N-1]
The text was updated successfully, but these errors were encountered: