Appropriate window from accelerometer data
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
Antworten (8)
Wayne King
am 17 Dez. 2013
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 Kommentare
Wayne King
am 17 Dez. 2013
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 Kommentare
Bran
am 18 Dez. 2013
2 Kommentare
Wayne King
am 18 Dez. 2013
I'm assuming that you your x is a row vector because window is a column vector, try
x = x';
y = x.*win;
Bran
am 19 Dez. 2013
Bearbeitet: Wayne King
am 19 Dez. 2013
1 Kommentar
Wayne King
am 19 Dez. 2013
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.
Siehe auch
Kategorien
Mehr zu Blackman finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!