Appropriate window from accelerometer data
10 次查看(过去 30 天)
显示 更早的评论
I am attempting to put my data through the fat function however, it seems that due to high spikes at the ends I may need to use a window or/and a low pass filter. I am completely new to this and I am unsure how to go about this. For example should I use the Blackman-Harris filter? If I do how do I work the value for N etc.
Sorry for such a basic question
Bran
回答(8 个)
Wayne King
2013-12-17
By the "fat" function, did you really mean fft()?
The question is, do you really need the data at the ends? If you trying to estimate periodicities in the data, then maybe you just don't need that data. Especially if you have a sufficient number of data points, you can just select a representative section of the data where the data is "stationary".
If you want to try windowing, you simply form a window function equal in length to your data and then multiply your data element by element
x = randn(1500,1);
win = hamming(1500);
y = x.*win;
I would not worry too much about the type of window -- a Blackman window is just
win = blackman(1500);
Also, since you have the Signal Processing Toolbox, why not just periodogram() instead of fft()?
0 个评论
Wayne King
2013-12-17
If the data is nonstationary, then:
Yes, if you can clearly section the data by condition, you can divide your data into sections and then window each section followed by Fourier analysis.
Or you can do a spectrogram.
It sounds like if you have 3 experimental conditions where you know the start and stop times of data collection, then the former would work well.
0 个评论
Bran
2013-12-18
2 个评论
Wayne King
2013-12-18
I'm assuming that you your x is a row vector because window is a column vector, try
x = x';
y = x.*win;
Bran
2013-12-19
编辑:Wayne King
2013-12-19
1 个评论
Wayne King
2013-12-19
I don't see any plot of your data attached anywhere.
Yes, the above code will not work because you are padding the fft() but then you create a frequency vector just based on the length of the signal, so those lengths will not match.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Blackman 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!