I have been developing a sound visualisation project using the FFT function from the ESP-DSP component. Audio is captured using an INMP441 which is then passed to the FFT function.
I am getting great data for higher frequencies but low frequency input cause a bunch of unwanted data to appear at higher frequencies.
The above image is my FFT's output for an input frequency of 125Hz
I've tried a Hanning window before and after the FTT but the issue still persists.
I've really been struggling with the ESP-DSPs lack of documentation, does anybody have experience that could share some advice?
Advice using FFT on the ESP32 - ESP-DSP Component
-
- Posts: 21
- Joined: Fri Aug 09, 2019 7:02 pm
- Contact:
Re: Advice using FFT on the ESP32 - ESP-DSP Component
Could you share any code samples? Tough to tell without seeing any examples.
- ESP_krzychb
- Posts: 400
- Joined: Sat Oct 01, 2016 9:05 am
- Contact:
Re: Advice using FFT on the ESP32 - ESP-DSP Component
Hi o.copleston,o.copleston wrote: ↑Fri Aug 09, 2019 8:51 pmI've really been struggling with the ESP-DSPs lack of documentation, does anybody have experience that could share some advice?
I assume you have already checked ESP-DSP documentation under https://docs.espressif.com/projects/esp ... index.html
If so, please comment how to improve it
Re: Advice using FFT on the ESP32 - ESP-DSP Component
Hi o.copleston,I am getting great data for higher frequencies but low frequency input cause a bunch of unwanted data to appear at higher frequencies.
I assume that you forgot to use bit reverse operation after the FFT.
Your code should look like this:
Code: Select all
for (int i=0 ; i< N ; i++)
{
y_cf[i*2 + 0] = your_signal_samples[i] * wind[i];
y_cf[i*2 + 1] = 0;
}
dsps_fft2r_fc32(y_cf, N);
dsps_bit_rev_fc32(y_cf, N); // <================= Bit reverce
dsps_cplx2reC_fc32(y_cf, N);// <=============== Complex spectrum in y_cf
Regards,
Dmitry
Who is online
Users browsing this forum: Baidu [Spider] and 127 guests