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

Meaning of divide by N (DSP-94) #59

Closed
kurtwerbrouck opened this issue Nov 30, 2022 · 1 comment
Closed

Meaning of divide by N (DSP-94) #59

kurtwerbrouck opened this issue Nov 30, 2022 · 1 comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally

Comments

@kurtwerbrouck
Copy link

Hello

I have 2 question on the next formule:

y2_cf[i] = ((y_cf[i * 2 + 0] * y_cf[i * 2 + 0] + y_cf[i * 2 + 1] * y_cf[i * 2 + 1])/N);

What is the meaning of devide by N in above formule.

Why is there not sqrt() function ?

Thanks

@dmitry1945
Copy link
Collaborator

Hi @kurtwerbrouck ,

The result of FFT when you get sprectrum should be divided by sqrt(N),
But we need 20*log10(abs(spectrum)), where
abs(spectrum) = sqrt(real^2 + imag^2)/sqrt(N);

But, we can make so:
20log10(abs(spectrum)) = 10log10(abs(spectrum)^2) = 10*loag10((real^2 + imag^2)/N);

Regards,
Dmitry

@tom-borcin tom-borcin changed the title Meaning of divide by N Meaning of divide by N Apr 3, 2023
@github-actions github-actions bot changed the title Meaning of divide by N Meaning of divide by N (DSP-94) Apr 3, 2023
@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: Done Issue is done internally labels Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

3 participants