One idea is measuring movement as directionless acceleration, or acceleration magnitude.
We have no idea what a step looks like in acceleration data.
We need acceleration data with steps that have been identified manually.
Once we have this, we can find the "shape" of a normal step.
Here's what that process might look like:
Researchers used a similar process and found that this shape is an ideal template:
Then, counting steps becomes a similarity problem. That is, at what timestamps does the data most closely match the step pattern?
Example #1: A close match!
Example #2: Not a close match at all!
Our data is just like these graphs, just more complex!
At each timestamp, let's find the similarity between the data and a step pattern.
On the left is the similarity plot, and on the right is our data:
A peak occurs in the similarity plot when the similarity is high - that is, when a step occurs! So our similiarity problem becomes a peak counting problem.
Here's an easy way to count peaks: Take the biggest data point in some interval around itself. Wider intervals ignore subsequent peaks and smallest ones capture even local minimums:
Notice how the end of one step generally lines up with the beginning of the next step!
This is exactly what we want, since walking is cyclic and steps are discrete.
We hope you enjoyed learning about how your phone counts steps! Here's a quick summary:
To learn more, see our writeup, data, and the original paper:
We welcome your feedback!
If you have any questions or comments about this visualization, please feel free to reach out.
Thank you for exploring this interactive visualization with us!