# Calcultate speed from accelerometer for runner

I hope you are well.

I am writing to you because I am working on a sports project and I have a little trouble interpreting my results.

we placed the accelerometer on the legof a runner and we have the acceleration data of the player according to the 3 axes (x,y,z) according to the points of measurement (1 point = 2.6ms).

I have for the moment considered that the acceleration (m/ms) in y and I get this for 200 points:

I subtract 9.81 from my data and then I calculate the integral of this function by the method of the strangles on the left and i get this :

I have several questions to ask you: - Knowing that the accelerometer is placed on one leg of the runner, How can I determine the speed of the runner according to the result of my integral? what conversion do I have to do? - Finally, should I also consider the speed in x and z?

Thanks a lot for your help.

• "Knowing that the accelerometer is placed on one leg of the runner, How can I determine the speed of the runner according to the result of my integral?" - VERY IMPRECISELY. The accelerometers are noisy enough on their own that trying to get any accurate value of speed or position from their readouts is a doomed endeavor. Use GPS. – SF. Jan 14 '19 at 11:55

You are unlikely to get any useful results from this, for several reasons.

The accelerometer "x,y,z" directions are relative to the accelerometer. Since the runner's leg is rotating, they are constantly changing orientation relative to the ground. You don't know how to split the "1g" gravitational acceleration into the correct components at each measured point because you don't know the orientation of the accelerometer.

Even if you solved that issue, the measured acceleration will include a lot of "noise" - for example a sharp peak each time the runner's foot hits the ground.

But the worst (and unsolveable) problem is the fact that integrating the acceleration for a "long" time period is a very ill-conditioned process. If the runners average velocity is constant (ignoring the changes in the leg acceleration during each stride) the average acceleration will be zero at any running speed (including standing still). You are trying to do that calculation in reverse, and get the correct "average velocity" from measuring an acceleration with an average value of zero.

It would be much better to measure the position of the runner, for example using a GPS device for long distances, or a camera system for short distances.

• @alephzeo Thank you for your reply. I understand the complexity. However we see a lot of football player with sensors at the ankle or shin guards. how do they get to speed? – Laurent TEMO Jan 14 '19 at 13:35
• @LaurentTEMO perhaps the football players have different sensors such as GPS which has been suggested twice... – Solar Mike Jan 14 '19 at 14:16
• Commercial sport tracking devices use several technologies in parallel. Accelerometers are fine for measuring acceleration. Gyros are used to keep track of the orientation of the accelerometers. Magnetometers keep track of any long term drift in the gyros using the earth's magnetic field. GPS gives absolute position measurements to correct all of the above. For "high tech" applications, the playing area can be surrounded by transmitters to provide better positional accuracy than GPS (especially for indoor use). .See simplifaster.com/articles/athlete-tracking-systems for example. – alephzero Jan 14 '19 at 14:44

I run religously. 72 years, been running all my life and will run my 28th marathon this March in Los Angeles.

I check my performance such as speed, length, heart rate using a GPS app on my phone. To confirm other answers that acceleration would not be a good tool to measure speed. I share my experience which is along the way many endurance runners do.

I change my gait, stride, landing on my heel or toe, in a sequence of algorithms according to the temperature, slope, my heart rate, my muscle condition, to repair a small tore, on the go, thousands of variables would affect the acceleration of my ankle and would not have anything to do with my speed. And that's the beauty of it, you optimise the output of limited system (your body) by taking advantage of allocating the burden to alternative part in a rotation.

Accelerometer if held in position well and calibrated is good for measuring your errors in your ankle movement, landing, twisting, etc. of course combined with other tool such as fast video.

• I understand better why I had trouble getting consistent results. Thank you – Laurent TEMO Jan 16 '19 at 12:46