# Tracking 3d gait from accelerometer data

35 views (last 30 days)
Giovanni Mastromatteo on 16 Nov 2016
Commented: Sharah on 16 Nov 2016
Hi, I'm testing a LPMS b2-bluetooth-imu board and I get from the device the accelerometer, gyro, magnetometer, Euler angles and Quaternions data.
The idea is to realize something similar to this (https://www.youtube.com/watch?v=6ijArKE8vKU).
Now, after two integrations of the linear acceleration data for three directions, I have found the resultant displacement.
How could I rebuild the step gait combining the result for each axis?

Sharah on 16 Nov 2016
What do you mean by "rebuild the step gait combining the result for each axis"?
Usually you would do double integration on all 3 axis x y z. You shouldn't combined them all together if you want the real movement in all 3 direction. On the other hand, if you only require resultant displacement, then you'll combined the data from all theree axis as in:
xyz = sqrt(x^2 + y^2 + z^2)
And if you want a graphical representation of the gait, you will plot the data from all three axis.
_
SAM
Human Robotics Group
Imperial College London

Giovanni Mastromatteo on 16 Nov 2016
Sorry, I didn't explain well. What i would to track is the gait from the obtained values of displacement in the three axes. I've integrated the arrays of linear acceleration in 3-axis, in the sintax shown below:
vX=cumtrapz(Time, aX);
sX=cumtrapz(Time, vX);
vY=cumtrapz(Time, aY);
sY=cumtrapz(Time, vY);
vZ=cumtrapz(Time, aZ);
sZ=cumtrapz(Time, vZ);
Plotting the resulting arrays for the displacement I obtain these graphs
I wish to track the gait as this example