# Average Acceleration of a golf swing

1. Apr 17, 2013

### monostable

Hello,

I'm actually working on a project, which record the acceleration of a golf club via an accelerometer.
And with the data of it i have manage to draw a graphic of a golf swing.

My question is : how can i get the average speed of the recorded data.
Indication, the time is in ms.

2. Apr 17, 2013

### phinds

Your title says you want the average acceleration but your question says you want the average speed. Be more clear.

3. Apr 17, 2013

### monostable

oh yes sorry my bad i didn't reread the title before posting, i actually want to get the average speed out of this.

4. Apr 17, 2013

### sophiecentaur

The final speed will be the integral (area under the acceleration / time graph). One form of 'average' speed would be half of the final speed. Another form of average could be the mean value of speed - which you could get by plotting the value of the integral from time t = 0 to time t, for all values of time - giving you a, 's' shaped curve - and calculating the mean value of this. I wonder what, exactly, you want to use this figure of average speed for. Are you sure it's what you need?

5. Apr 18, 2013

### monostable

i just would like to see if it is possible to display the average speed of a golf swing with an accelerometer.
What integration technique would you advise ?
Trapezoidal Rule, Bode Rule ...

6. Apr 18, 2013

### jbriggs444

The graphed acceleration data that I see is only for one direction. If you are after average "speed" than you would need to integrate the x, y and z components separately and combine the resulting component velocities using the Pythagorean formula to compute speed.

The graphed acceleration data that I see appears to have a sharp cut-off value. It is unlikely that this reflects reality. It is more likely a limitation of the accelerometer.

Trapezoidal rule should be fine for the integrations of the component acceleration to yield component velocitys. No need to get fancy when the underlying measurements are suspect anyway.

Also, the acceleration reported for each data point probably amounts to a weighted average of the actual acceleration in some small time period. My intuition says that getting fancy with something like Simpson's rule would be, in some sense, averaging an average -- adding fuzz to fuzz.

7. Apr 18, 2013

### monostable

you've guessed well about the limitation, but it's just a hardware issue, it can be replace by a more performant accelerometer.

Thanks for the answer on the average speed.

I also have another question, in the data i record i assume there is the gravitational acceleration, should i subtract it to get the real speed of the object moving ?

8. Apr 18, 2013

### xAxis

No, gravitational acceleration is not detected by accelerometer.

9. Apr 18, 2013

### sophiecentaur

Strictly true, maybe, but an accelerometer will still know which way up it is when you lay it down on a table.

10. Apr 18, 2013

### A.T.

Yes. An accelerometer at rest in the ground frame will show 1g upwards acceleration. You obviously don't want to integrate that to determine velocity in the ground frame, because it is not causing any velocity changes in the ground frame.

And here is the problem: You have to know how the accelerometer is oriented in the ground frame, to know which way is 1g upwards. So you need gyroscopes to track rotation.

11. Apr 18, 2013

### sophiecentaur

I would still be fascinated to know what useful information the "average speed" of a golf ball whilst it is being struck will tell you. The average force on it and the final speed would be useful information in calculating what will happen to it but "average speed"??

12. Apr 19, 2013

### monostable

Thanks for so many replies.

It is actually the average speed of a golf swing I'm trying to determine.
I was actually thinking about getting a gyroscope track the rotation angle of the golf shaft.

although I think I'm having trouble about the integration part,
I do integrate the curve I posted earlier, and then divide it by the duration time, i get a high number(15k ish), and even with the gravity constant i don't think i should get that much.

13. Apr 19, 2013

### sophiecentaur

If you want to measure the average speed (= total distance ÷ time) then you only need a timed exposure on a camera and measure the angle with a protractor or measure the length of the curve with some basic software (or the equivalent with a TV camera and count frames).
But what will this statistic actually tell you? It's only worth losing sleep over how to obtain a statistic if the number produced has some has some actual relevance. And what that is, totally escapes me. It says nothing about the Kinetic Energy of the ball, or its momentum, or the work that your muscles are doing.

14. Apr 19, 2013

### Khashishi

Take the integral over the acceleration to get the instantaneous speed. Then take the average of that.

15. Apr 19, 2013

### jbriggs444

The graph you show has an acceleration peaking at 89 meters/sec2 with a duration of less than one second. That means that the result of the integration should be no more than 89 meters per second.

How many sample values are you integrating over? One per millisecond?
Did you multiply each measured acceleration value by its associated duration (e.g. .001 second) when doing the integration?

Why would you want to divide by duration? The result of the integration up until time t will give the instantaneous speed at time t. If you add up all of the computed speeds you should divide by the number of computed speeds to get the average.

More precisely you would be multiplying each computed speed by the width of the interval during which that is the estimated speed, adding up those products and dividing by the total duration. If you forgot to multiply by that .001 interval size a second time, that could be the source of your problem.

Even more precisely, you should be integrating vector-valued acceleration to get vector-valued velocity, taking the magnitude of the velocity to get scalar speed and averaging that.

Last edited: Apr 19, 2013
16. Apr 22, 2013

### monostable

Thanks again for so much help, your answer JBringgs444 about assiciate the duration with the acceleration value permited me to see the mistake i had in my program which is supposed to integrate the curve, now i get plausible speed.

And SophieCentaur, i just wanted to test if i could use an accelerometer to determine precisely the speed of an object, i though it would be easy, but there is so much parameter to take in account.

i think i will combine this accelerometer with a gyroscope to have an even more accurate speed reading.

Thank you all you helped me for this project !

17. Apr 23, 2013

### sophiecentaur

That's a good enough reason in itself. I was just questioning the usefulness of that figure in the pursuit of golf.
The nice thing is that you can actually check on your answers with an optical method. It would be interesting to see just how the dead reckoning errors add up. I guess it would depend upon the quality of the accelerometer. btw, did you consider using a force meter to measure the radial force on the head of the club? That would give additional information about the process. It might spoil an otherwise good golf club, though.