I need help confirming some basic DSP steps. I have been implementing software for processing accelerometer sensor signals for smartphones, but I have not worked in DSP before.
My program collects real-time accelerometer data at 32 Hz. The output should be the main frequencies of the signal.
My specific questions are:
From a stream in real time I collect a window with 256 samples with an overlap of 50%, as I read in the literature. That is, I add 128 samples at a time to fill the window with 256 samples. Is this the right approach?
The first figure shows one such window with 256 samples. The second image shows the sample window after I applied the Hann / Hamming window function. I read that applying a window function is a typical approach, so I went ahead and did it. Should I do this?
The third window shows the power spectrum (?) From the output of the FFT library. I really have a bunch of pieces that I read. Do I understand correctly that the spectrum increases to 1/2 of the sampling frequency (in this case 16 Hz, since my sampling frequency is 32 Hz), and the value of each point in the spectrum is the spectrum [i] = sqrt (real [i] ^ 2 + imaginary [i] ^ 2)? Is it correct?
Assuming what I did in question 3, correctly, do I understand correctly that the third figure shows the main frequencies of about 3.25 Hz and 8.25 Hz? I know, collecting data that I ran at about 3 Hz, so the 3.25 Hz spike seems to be correct. Thus, there should be noise from other other factors causing a (erroneous) burst at 8.25 Hz. Are there any filters or other methods that I can use to smooth this and other spikes? If not, is there a way to identify “real” spikes from erroneous spikes?
: , , , , . , , , : 256 FFT . , : 50% .
- ( , ). , : ( ), - . , , , : .
: . : 16 . , FFT, 128 (FFT 256 , , ), 16/128 . , , .
8- : , , 1- , , . , , FFT: , , .
, . , , : . , , .
:
, . , , , , , . Hann Hamming , , .
, 3 8 . , 8 . , .
4 ( , ):
? , x y z, mag_acc = sqrt ((x - 0g_offset) ^ 2 + (y - 0g_offset) ^ 2 + (z - 0g_offset) ^ 2). 1g, . , , , ( ). , , , , , . , , .