# What information can I gain from the fourier transform?

I have acceleration data in 3D vectors (x,y,z).

For detecting certain patterns within the data stream, I use a fixed moving window to generate many statistic features, like mean, max, kurtosis,...

I use these feature vectors to detect key strokes.

My results are already quite ok, but I want to improve them. And many papers in this field used the fourier transformation (or fft) to improve their results.

I never worked in the frequency domain, so I don't know what this is used for and what information I could gain from using fft. Most articles I found on this topic are focused on audio stuff.

Here a sample plot of the data I capture (only the right graph): These graphs correspond to the sequence of "0123034880". The spikes occur during a tap event

Can someone please give me a more general explanation of the fft and what information I can gain from it having a time series of data?

• a) confused about keystrokes vs 3D acceleration. b) could you provide time series plots which will help knowledgeable FFT people give you a judgement on usefulness of FFT for your specific problem – seanv507 Jan 23 '17 at 0:38
• @seanv507 I just added a graph. and on the keystroke idea: researchgate.net/publication/… – keinabel Jan 23 '17 at 0:48
• Could you label the time series ie what keys does each time segment correspond to. – seanv507 Jan 23 '17 at 7:35
• I just added it. The spikes belong to tap events. – keinabel Jan 23 '17 at 14:43

The FFT is used to analyse periodic data. You use the Short Time Fourier Transform ( basically the FT over small segments of the time series) to analyse how the frequencies change over time ( eg in music).

your plots are too low detail to zoom in, but I cannot imagine that a keystroke has any particular repetitive signal (eg that your fingers vibrate differently based on the key pressed) [ I have little imagination:) ].

I could imagine you look at frequency information to remove periodic noise (?you are on a train).

another possible use would be to identify typing frequency and maybe stretch your signal accordingly ( ie to standardise your signal across typing speeds)

Informally speaking frequency domain tells us "how fast things change". And the different "components" of you data.

You mentioned about audio data, which is a perfect example to understand frequency domain. The low frequency components can be the sound from base guitar, and the high frequency components can be sound from lead guitar. Suppose we want to know "how much work" has been done for two players. The "power spectrum on different frequency components" can tell you that. Also, suppose you want to practice lead and filter out the lead sound in original track. Frequency analysis can help to design a filter to do such task.

Back to your example of sensor data. Suppose you have some sensor on a person that can collect all the movement data. The data should be very complicated that contains slow movements (such as walk) and fast movements (such as heart beat).

Similar to the audio example, frequency analysis will give you different roles. Say, suppose you want to get the heart beat data only, a special filter can be derived and applied to your data to get that.

BTW, here is a related question from me. You can see if your data is periodic (as shown in your figure), using Fourier basis is better.

What's wrong to fit periodic data with polynomials?

• "Similar to the audio example, frequency analysis will give you different roles. Say, suppose you want to get the heart beat data only, a special filter can be derived and applied to your data to get that." so, you'd suggest that I extract the same features, I so far extracted from m 3D polynomal interpolation, but for the fourier? – keinabel Jan 23 '17 at 19:18

FFT will give you an idea of the dominant frequencies that are associated with the tap events you mention above. My guess is that you would see different spectral 'signatures' for each tap event (or for small sets of events like consecutive taps of the same number/button).

• so, in terms of extracting features from this, what could be a meaningful thing to derive from the FFT? – keinabel Jan 23 '17 at 19:15
• Well, assuming you can isolate each button press event, you could perform the FFT and extract features such as the dominant (peak) frequencies, etc. This post seems quite relevant too - stackoverflow.com/questions/27546476/… – harrisniall Jan 24 '17 at 23:36