how to apply butterworth filter

12 views (last 30 days)
joo
joo on 24 Nov 2012
hello,
this is the data of a gait laboratory analysis. i need to apply a butterworth filter to my output data (columns 13(xx),14(yy),15(zz)) and its derivates. yy has little noise, zz has lots of noise and the derivates has huge noise.
so my sampling frequency is 40 hz. i read in an article to apply a cutoff frequency to gait data of 3 hz (does it make sense to my data? i don't understand nothing of filters, if you have other suugestions please tell). having this information how can i apply the butterworth filter. i dont know anything about filters and here http://www.mathworks.com/help/signal/ref/butter.html there are so many ooptions that i can't understand the difference. if any one can advise me please with anything i would be very grateful.
thank you so so much.

Answers (1)

Jan
Jan on 25 Nov 2012
Which order is suggested for the Butterworth filter of 3Hz?
rate = 40;
freq = 3;
[b, a] = butter(Order, freq / (rate * 2), 'low');
'Low' means, that only the low frequencies pass the filter and the high frequencies are treated as noise. This can be useful e.g. for the position of the trunk. But for the position of the heel such a filter will destroy the important heel strike.
If the positions of different landmarks are filtered, there can be unexpected effects to the mechanical model, e.g. the distance between ankle and knee, or knee and hip joint center will vary, although the corresponding bodies (bones!) are rigid elements. Therefore using smarter methods is recommended: E.g. adjusting the parameters of a forward simulation until the multibody system of rigid elements reaches a minimum distance to the measurement data. But such an approach is demanding.
  2 Comments
joo
joo on 26 Nov 2012
thank you. but why do you consider cutoff frequency=freq / (rate * 2)??
this is the nyquist frequency right? why here^? i have posted a new question related to this one http://www.mathworks.com/matlabcentral/answers/54766-butterworth-residuals-vs-cutoff-frequency-fc. if you please can see. thank you for the important info
Jan
Jan on 26 Nov 2012
I consider the cutoff frequency according to the documentation of Matlab. Please read "help butter" and "doc butter".

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!