I need help understanding the output of DFT / FFT calculations.
I am an experienced software engineer and you need to interpret some indications of the smartphone’s accelerometer, for example, to find the main frequencies. Unfortunately, I overslept most of my EE college colleges fifteen years ago, but I read DFT and FFT the last few days (apparently not much good).
Please no answers from "go take the EE class". I actually plan to do this if my employer pays me. :)
So here is my problem:
I captured the signal at 32 Hz. Here is a 1 second 32-point sample that I outlined in Excel.

Then I got some FFT code written in Java from Columbia University (after following the sentences in the message " Reliable and Fast FFT in Java ").
The result of this program is as follows. I believe that it runs FFT in place, so it reuses the same buffer for input and output.
Before: Re: [0.887 1.645 2.005 1.069 1.069 0.69 1.046 1.847 0.808 0.617 0.792 1.384 1.782 0.925 0.751 0.858 0.915 1.006 0.985 0.97 1.075 1.183 1.408 1.575 1.556 1.282 1.06 1.061 1.283 1.701 1.101 0.702 ] Im: [0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ] After: Re: [37.054 1.774 -1.075 1.451 -0.653 -0.253 -1.686 -3.602 0.226 0.374 -0.194 -0.312 -1.432 0.429 0.709 -0.085 0.0090 -0.085 0.709 0.429 -1.432 -0.312 -0.194 0.374 0.226 -3.602 -1.686 -0.253 -0.653 1.451 -1.075 1.774 ] Im: [0.0 1.474 -0.238 -2.026 -0.22 -0.24 -5.009 -1.398 0.416 -1.251 -0.708 -0.713 0.851 1.882 0.379 0.021 0.0 -0.021 -0.379 -1.882 -0.851 0.713 0.708 1.251 -0.416 1.398 5.009 0.24 0.22 2.026 0.238 -1.474 ]
So, at the moment, I can’t make any head or tail tails. I understand the concepts of DFT, such as the real part, which is the amplitudes of the component cosine waves, and the imaginary part - the amplitudes of the component sine waves. I can also follow this diagram from the big book " A Guide for Design Engineers and Digital Signal Processing Engineers ": 
So my specific questions are:
From the conclusion of the FFT, how do I find the "most common frequencies"? This is part of my analysis of accelerometer data. Should I read real (cosine) or imaginary (sine) arrays?
I have 32 point input in the time domain. Should the FFT output be a 16-element array for real and a 16-element array for imaginary? Why does the program give me real and imaginary outputs of arrays of size 32?
In connection with the previous question, how do I parse indexes in output arrays? Given my input of 32 samples taken at 32 Hz, I understand that the output from an array of 16 elements must have its own index, evenly distributed up to 1/2 of the sampling frequency (32 Hz), so I correctly understand that each element (32 Hz * 1/2) / 16 = 1 Hz?
Why is the FFT output negative? I thought that the values are the amplitudes of the sine wave. For example, the output Real [3] = -1.075 should mean an amplitude of -1.075 for a cosine wave with a frequency of 3. Is this correct? How can the amplitude be negative?
java fft audio signal-processing accelerometer
stackoverflowuser2010 Jul 18 '11 at 23:17 2011-07-18 23:17
source share