FFT of sensor data

20 ビュー (過去 30 日間)
A VP
A VP 2017 年 6 月 8 日
コメント済み: Walter Roberson 2017 年 6 月 8 日
Hello everyone!
I am a beginner in Signal processing. I have a time series plot of sensor data that has 200000 values. I need to calculate the FFT of the same data. When I perform fft(x), (assuming x is the time series signal), I get a plot with two peaks , one at 0 and one at 200000. The peak at 0 has an amplitude of 110 and the peak at 200000 has an amplitude of 7. The FFT should be mirror images. Why am I not observing any mirror images on this plot? The sample time of sensor is 0.01s (1000Hz).
Also I expect a resonant frequency of the sensor to be around 70-80 Hz. I do not see any peaks in the FFT at this frequency range. Please help.

採用された回答

Walter Roberson
Walter Roberson 2017 年 6 月 8 日
The peak at 0 is equal to the sum of your readings. It would disappear if you were to subtract the mean of your readings from your input.
If your readings are real-valued, then the peak at the last bin is the complex conjugate of the peak at bin #2; both correspond to the lowest non-zero frequency.
  2 件のコメント
A VP
A VP 2017 年 6 月 8 日
If I want to obtain the resonant frequency of the time series plot, how can I do it? Thank you in advance .
Walter Roberson
Walter Roberson 2017 年 6 月 8 日
One thing to keep in mind is that fft() assumes that the signal is periodic. If you cut the signal at a point that does not happen to be the end of all of the cycles, then you will get some edge effects leading to some unexpected frequencies showing up. There are two common cases for that:
  • if you zero-pad a signal, then you are effectively convolving it with a sync function, which will give you large narrow peaks near time 0 in the time domain, which would be high frequencies in the frequency domain
  • when people synthesize signals, it is common for them to use something like t = 0 : delta_t : 10 and then sin() or cos() of some integer frequency times 2 * pi of t. The problem with that is that it starts with a 0 (for sine) and ends with a zero (because the upper bound is an integer, multiplied by 2*pi times an integer), and since the signal is assumed to be periodic, that effectively gives you two 0's together. When you are synthesizing a signal, be sure to end one sample before the return to the original conditions.

サインインしてコメントする。

その他の回答 (1 件)

Santhana Raj
Santhana Raj 2017 年 6 月 8 日
You are getting mirror images. except that matlab's FFT results are different from what you have read in your books. Normally FFT algorithm results are from -Fs/2 to +Fs/2, where Fs is the sampling frequency. Matlab's output gives from 0 to Fs. Saying that, if you want to see the plot from -Fs/2 to Fs/2, use the command fftshift.
Your peak at 0 frequency means there is a large DC value. To remove it, find the mean of x and subtract it from each and every value of x.
y=x-mean(x);
This should remove the mean value.
If your x has the senor's resonance, then it should be visible as soon as you have removed the mean. if not, provide the x data in the question, so that people can check it and give you better answers.

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by