I am an experienced software engineer with some knowledge of DSP College. I am working on a smartphone application for processing signal data, for example, from a microphone (with sampling at a frequency of 44100 Hz) and an accelerometer (sampling at 32-50 Hz). My applications will, for example, pitch detectors, etc.
I want to implement a low-pass filter (LPF) on my phone to remove frequencies with an alias, especially for an accelerometer that has a low sampling rate. However, I find a contradiction when trying to apply the FFT-based fast convolution method . Any help would be appreciated.
Here is my line of reasoning:
I am reading a signal and I want to use LPF for smoothing (removing aliases).
To implement LPF on my smartphone, I decided to apply a FIR filter (namely, the sinc window function) to the signal in the time domain. Let x [n] be my signal and f [n] be the coefficients for my filter core. So I want to do a convolution between x [n] and f [n], where x [n] has a length N (usually 512) and f [n] has a length M (usually 256).
I implemented a simple 1D convolution on my smartphone (Android and iPhone). The algorithm is a typical version of a nested loop and runs in O (NM). It works too slow on a smartphone for N = 512 and M = 256.
, O (N lgN). , : x [n] = IFFT (FFT (x). * FFT (f)), FFT - fft, IFFT - , . * - .
: IFFT ( FFT (x). * FFT (f)). , x [n], x [n] . 1!
, ? LPF, LPF?
. EE, LPF , .
: FFT (x) .
, . , , : , 44,1 , , .
, 30 (): . , 44,1 , , . ( , , ). , , ~ 20 .
. , , . 20 , 2x , . , FFT (x) , , . .
, --, , 1 2 , (64 * 44,1 ) . - . , , ( ) . . 30 , -.
. , . - , alalog - , . - , . , , .
, .. . , , , .
FFT - , , . 2 , , . , ( ..) , , ( ) .
. X . Y = X*F , F (.. ) .
X
Y = X*F
F