FFT with DFB possible?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
RaAl_264636
Level 6
Level 6
50 sign-ins 25 sign-ins 10 solutions authored

Hi,

I'm doing CapSense proximity sensing. Since I need information about the distance, I work with the sensor raw data. This works well. The only disadvantage is that the the raw data has some noise on it (if necessary, I can provide data). To get rid off the noise, I use the DFT block to process the CapSense raw data values. However, it seems that it's hard to setup the DFB the right way.

   

On a first thought, I think I need something like a FFT on the data, with only the DC bin as returned value. Is a FFT possible with the DFB? If not, how can I figure out how to setup the DFB to clean the noise out of the signal?

Regards,

Ralf

0 Likes
1 Solution
3 Replies
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received
0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Ralf, using FFT for noise reduction is quite unusual. I don't believe that much success can be achieved this way. My guess that issue you having with Filter block is that it does not configures well for very low frequencies (<50Hz), so you still have a lot of AC noise. It is possible to cheat the Filter and get into ~1 Hz low-frequency cut-off. Try to set Filter to low-pass with cut-off 100 Hz, and input frequency 1 kHz, but feed Filter input with 10 Hz (using DMA or direct write), you should get effective filter cut-off at about 1 Hz. Using FIR setting, I was able to get about 1-2 Hz cut-off, but not 0.1 Hz.

Other thing is that for low frequency measurements the Filter is overkill, you can make simple IIR filter in code with very long decrement time. See also KBA

https://community.cypress.com/docs/DOC-12679

Other issue can be type of noise from cap sense. Inspect the output for possible spikes (non-random noise). This kind of noise will not be removed by the Filter. I would try to use a median filter before the Filter block (see link below)

Re: Feature request: add Median Filter component to Digital Filter component

RaAl_264636
Level 6
Level 6
50 sign-ins 25 sign-ins 10 solutions authored

Hello anks & odissey1,

thank you for your hints. I'll try that and compare the results.

Regards,

Ralf

0 Likes