Accelerometer data filtering during standing balance measurement

2 views (last 30 days)
I was using a body worn tri-axial accelerometer for measuring sway during standing balance. In the literature, I have read something about eliminating gravitational component followed by filtering the data in the accelerometer. As I am from medical background I don't have much knowledge on this. does anyone knows something about this and filtering a accelerometer data measured at 100hz sampling rate like what kind of filtering and cut-off frequency i should use for those data..

Answers (1)

Star Strider
Star Strider on 2 Dec 2014
The filter you design depends on the signals you have. In order to filter out the gravitational component (a constant), you probably need to design a bandpass filter with a stopband lower cutoff of 0.1 Hz, and an upper cutoff of about 40 Hz. If you have the Signal Processing Toolbox, you can see if this filter design does what you want:
Fs = 100; % Sampling Frequency (Hz)
Fn = Fs/2; % Nyquist Frequency (Hz)
passband = [5.0 20]/Fn; % Passband (Hz)
stopband = [0.1 40]/Fn; % Stopband (Hz)
passripple = 1; % Passband Ripple (dB)
stopripple = 10; % Stopband Ripple (dB)
[n,Wn] = buttord(passband, stopband, passripple, stopripple);
[z,p,k] = butter(n,Wn);
[sos,g] = zp2sos(z,p,k);
figure(1)
freqz(sos,[0:0.1:50], Fs)
then use the filtfilt function to filter your data. See the documentation for the various functions for details on them. If you get too much noise, reduce the upper passband and stopband frequencies. You will probably have to experiment with it to get the result you want.
  8 Comments
Surendar
Surendar on 3 Dec 2014
So, you mean to say, i can filter the data first and after that can do the Sway analysis. I am quite confused in this as this may affect my entire analysis as i mounted the sensor upside down..
Star Strider
Star Strider on 3 Dec 2014
If you mounted the sensor upside down your other axes would likely be flipped as well, so you would likely need to negate all your x,y,z data with d=-d for the rest of your analyses. You may have to re-run your experiment with the accelerometer oriented correctly to determine how best to correct your current data.
Otherwise, since the idea of the filter is to eliminate the constant offsets and high-frequency noise, the filter should not adversely affect your results. You may want to correct for the baseline effects, the baselines given by their respective means over a range of data:
BLI = 20000:100000; % Representative Baseline Data Indices
dm = mean(d(BLI,:)); % Means
xm = dm(1); % X-Mean
ym = dm(3); % Y-Mean
zm = dm(2); % Z-Mean
You can use those to adjust your data based on those collected with your accelerometer mounted correctly.
The orientation of your accelerometer will not affect the results of the filter output. You may want to add back the ‘xm’, ‘ym’, and ‘zm’ offsets to the filtered data depending on how you designed your experiment.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!