Posted on September 2, 2013 by Seb Madgwick

Latest version using x-IMU3

The latest version is available on GitHub and uses the x-IMU3, our third generation, high-performance IMU.

I explored many applications of IMU technology during my Ph.D research but spent most of the first year focusing on gait analysis. I had read several papers by Xiaoping Yun et al and seen how an IMU attached to a foot could be used to track position through dead reckoning and integral drift corrected for each time the foot hit the ground. There was not enough enough information to recreate the algorithm described in the paper but I was able to create my own algorithm based on the same principles. I used an x-IMU attached to my foot to log data and MATLAB to generate a 3D animation of the foot’s motion. After a bit of tweaking the tracking seemed to be fairly accurate so I uploaded a video to YouTube demonstrating the system.

Since uploading the video (2.5 years ago!) the video has received over thirty thousand views and lots of people have requested the source code. I have been meaning to tidy up the code and share on-line for a long time but have only now got round to it. All the source files are available on GitHub and include the original the datasets and my SixDofAnimation function so that anyone can process the raw detail to recreate the visualisations shown in the video. Since this initial development, I have created new algorithms for more robust gait phase classification and gait kinematic analysis to improve the tracking performance. However, these extra components complicate the core system so the code I am sharing here is based on the original demonstration video.

The work has not been published as an academic paper but is mentioned as future work in the last section of my 2011 paper describing the IMU/AHRS sensor fusion algorithm; and a co-authored 2011 paper where an x-IMU was used to evaluate the impact of an ankle brace on gait.