Pedometers: Designing a More Intuitive Algorithm
I've developed the habit of scouring, among my general surfing destinations on the web, LinkedIn groups that are relevant and interesting to me technically. Quite often, I come across something that grabs my attention and poses an interesting problem to work on. This one turned out to be one such case.
In a subgroup related to Algorithms, I found a post claiming that there really wasn't an efficient solution to determining step and stride in the walk of a person through an attached accelerometer (a device for measuring accelerations in two or three axes), in a pedometer or any other device (most smartphones these days contain accelerometers, that's how orientations and movement is recognized).
This was puzzling in part because such a problem should already have been solved. In a pedometer, the data is available accurately, the motion of the walk of a human is very well known, and simplistic models show that the accelerometer readings correspond rather well (in any orientation) with the walk and with a little computation, the step and stride can be determined within appreciable error limits soon enough.
I mentioned the case to a friend of mine, Suneeth, and we looked up the available material on the subject, and it turned out that the problem was quite a little more hairy than I first thought. It turns out that there is such a thing as being too accurate: accelerometers can measure even the short but high-value (or to be precise, short but high change in value from the previous value) that may be present in the walk of a person but not account for much distance covered. In addition, the accelerations generated in the course of a walk are more variably spread out over two different directions than we first thought. Luckily, the step and stride of a person tended to remain constant (within limits) over a walk, and this gave up some hope of solving the problem.
We discovered that quite often, a lot of the current mechanisms tend to use approximations based on specific calibrations and formulae derived from empirical data sets. We decided to see if we could come up with a more intuitive approach that resulted in a technique for measuring the step and stride length of a walk based on the mechanism of the human walk itself.
This involved, without going into too much detail, measuring the various accelerations generated and taking them into account, while having to smoothen out the acceleration waveforms being used so that short (~0.01s) bursts of accelerations or decelerations didn't throw the result off. As the accelerometer, being in a phone or other device, could be in any orientation, we had to take all three directions into account while performing the calculation. Eventually, with much experimentation both physical (our sympathies to all those who did the walking - but you're the healthier for it!) and mathematical in nature (not a few 'solutions' were tossed out the window), we found a model that was able to estimate step and stride lengths within error bars comparable to conventional models present in the field.
This was quite an interesting experience in terms of independent research, as well as solving problems directly pertinent to real-world applications. And needless to say, quite a lesson in never to underestimate any problem!
The paper detailing the research was published at the Compulational Intelligence, Modelling and Simulation (CIMSim) conference in September 2012 and can be found here.













