FFT data looks strange
Here is a short video of my results The sound is horrible, but please bear with me.
To me, that looks a little strange. Whats with the massive spike on the first few bins? Whats the deal with the non-linearity?
I'm plotting the square root of the sum of the squares of the real and imaginary parts. I've tried using a logarithm on top of that, but I get a lot of movement of the baseline, that is, the spectrum doesn't stay center开发者_运维问答ed in the screen.
If you can point me in the right direction, I'd appreciate it!
Actually your posted FFT results looks fairly normal.
You have a huge DC offset which affects the first few bins of the FFT result.
You also have harmonics or harmonic distortion in your time-domain signal creating the train of overtones you see above your sine-wave frequency sweep peak in the FFT result.
You have aliasing, possibly from a lack of sufficient low pass filtering before sampling, causing these overtones to wrap completely across or around the frequency response from the complex conjugate peak on the other side of the FFT result, and thus appear to be moving the other direction.
Since your frequency sweep produces frequencies that are not at the FFT bin centers, and you are not using any kind of "flat-top" window, this will cause the slight Sinc response magnitude scalloping you are seeing in the main signal peak.
Since you appear to have used a rectangular window, you have further Sinc response magnitude "bumps" radiating to the side from you main peak whenever a frequency peak isn't at an FFT bin center. Sometimes called "spectral leakage".
The first bin is DC. If your sample window has a DC bias (in other words it has an average that's not 0) then there will be a lot of energy in the DC bin. This could be as simple as passing in unsigned data centered around 2^{n-1} rather than signed data centered around 0.
I'm not sure what you mean by "nonlinearity" from your text or your video.
精彩评论