Skip to content
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

FFT is wrong by factor 2. Violation of the Parseval–Plancherel identity (DSP-130) #81

Open
4 tasks done
Bobobel opened this issue Feb 1, 2024 · 2 comments
Open
4 tasks done

Comments

@Bobobel
Copy link

Bobobel commented Feb 1, 2024

Answers checklist.

  • I have read the ESP-DSP documentation and the issue is not addressed there.
  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my ESP-DSP branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

I know that the prefactor of FFT/DFT is under heavy discussion. But for me the Parseval–Plancherel identity has to be obeyed!
Please check your example dsps_fft_main.c without windowing and you will see, that the absolute magnitudes of x1 and x2 are not represented in the frequency domain but with a factor of 2. Their relative value is OK, so you did not notice a problem.
This was hidden because you used the windowing facility (thanks for showing that anyway!).
Thanks for that DSP component!

@github-actions github-actions bot changed the title FFT is wrong by factor 2. Violation of the Parseval–Plancherel identity FFT is wrong by factor 2. Violation of the Parseval–Plancherel identity (DSP-130) Feb 1, 2024
@dmitry1945
Copy link
Collaborator

Dear @Bobobel,

thank you for the issue.

We will change the documentation (or the code). The factor of 2 is related to calculation performance.

Regards,
Dmitry

@Bobobel
Copy link
Author

Bobobel commented Feb 7, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants