Calculating Serve Speed from a digital Video

maverick1

Semi-Pro
Mike Cottrill said:
http://scienceworld.wolfram.com/physics/DragCoefficient.html shows a hard hit tennis ball with a drag of 0.3 and using Sampras’ serve as a reference you get ~.003. Okay physics guys, prove this formula acceptable.

Mike

Sorry, how did you get the 0.003?

I don't see how you can do anything useful with the The coefficient as defined at Mathworld, without knowing what the "size scale" L is. Presumably it would some function of diameter of the Tennis ball.

The coefficient "c" I used above is equivalent to 0.5 * Cd * Rho * L^2 / m
where
Cd - Mathworld's coefficient of drag
Rho - density
L - Size scale
m - mass

Since the mathworld page says nothing about L, this info is useless.
 

Mike Cottrill

Hall of Fame
maverick1 said:
Sorry, how did you get the 0.003?

I don't see how you can do anything useful with the The coefficient as defined at Mathworld, without knowing what the "size scale" L is. Presumably it would some function of diameter of the Tennis ball.

The coefficient "c" I used above is equivalent to 0.5 * Cd * Rho * L^2 / m
where
Cd - Mathworld's coefficient of drag
Rho - density
L - Size scale
m - mass

Since the mathworld page says nothing about L, this info is useless.

Sorry, my bad. When I glanced over:
c*t1 = 1/87 - 1/120 = 0.00316092 . I did not see t1.
 

maverick1

Semi-Pro
drakulie said:
Guys, how do I count the frames? I've tried with no luck. Any suggestions?

You can try the software Mike suggested in the other thread. Or you can use the camcorder to play the original tape on a TV.

Both the digitial camcorders I have owned had the ability to play one frame at a time. Basically, you pause the video just before the serve makes contact, and then press the step-forward button repeatedly until the ball bounces on the court, and count how many times you had to press the button between contact and the bounce. Often, you will miss the exact event; you see the ball before bounce and then a little after bounce in the next frame. You just have to estimate the fraction of a frame. If one frame shows the ball 6 inches from the court and the next one shows the ball 2 ft after the bounce, you have to count it as 0.2 frames or something like that.
 

Andres

G.O.A.T.
Drakulie, try any digital video editor.
If you don't have one, Quicktime player allows you to move frame by frame ;)
 

norcal

Legend
maverick1 said:
This is a spinoff from another thread:
http://tt.tennis-warehouse.com/showthread.php?t=120776

This is what I said there:
----------------------------------------------------
If your own serve took t frames in standard 30 fps video to cover a distance of d feet in the air,
your serve speed in mph was:

(exp( d / 5280 * 28.3) - 1 ) / 28.3 / (t / 108000)
To make it easier, here is a table converting from the number of frames of standard 30 fps video it took for a down the middle serve to land on the T.
Frames Speed
11 -> 131.6
12 -> 120.6
13 -> 115.8
14 -> 103.4
15 -> 96.5
16 -> 90.5
17 -> 85.2
--------------------------------------------------

I think it is correct, but I went thru a lot of pretentious math that I normally don't do. For all I know it may be unnecessary. I would be happy to hear any comments from the science grad students who I know prowl this forum.
Here is the derivation ....

The model for motion under a drag force is

dv/dt = - k * v^2 /m

Note that this is a statement of Newton's second law,
acceleration = Force/mass.

Drag force is -k*v^2 where k is
a constant related to the drag coefficient.
Let us make up a modified drag cofficient c = k/m to simplify our job
since mass will always be the same(that of a tennis ball)

dv/dt = -c*v^2

The solution to the above separable first order differential equantion is
v = 1/(c*t + c1)
c1 is the constant of integration, and when you set t=0 above, you can see that
c1 must be equal to reciprocal of initial velocity v0
so,
v = 1 / (c*t + (1/v0)) -------> Equation 1

Integrating the solution for v, we get distance
s = ln(c * t + (1/v0))/c + c2
c2 is yet another constant of integration.
Knowing that the distance s is 0 when time t=0,
c2 = -ln(1/v0)/c

The formula for distance is
s = ln(c * t + (1/v0))/c - ln(1/v0)/c
==>
s = [ ln(c * t + (1/v0)) - ln(1/v0) ] / c
==>
s = [(ln(c * t + (1/v0)) / (1/v0) ) ] / c
==>
s = [ ln(v0 * c * t + 1)) ] / c --------> Equation 2
==>
exp(s * c) = v0*c*t + 1
==>
v0 = [exp(s * c) - 1] / (c * t) ------> Equation 3

This v0, the initial velocity is our goal. From our camcorder
experiment, We know s, the distance
traveled and we know t, the time it took to travel that distance.
The only unknown in the above formula is c, the modified drag
coefficient for a Tennis ball. Time to claibrate our model
using a known fact about Sampras' serve - that a 120 mph serve slows
down to 87 mph over 60 feet.
( http://wings.avkids.com/Tennis/Project/speed-02.html)
Substituting the numbers in Equation 1,
87 = 1/(c*t1 + (1/120))
t1 above is whatever time that 120 mph took to travel 60 ft(= 60/5280 miles).
c*t1 = 1/87 - 1/120 = 0.00316092 ----> Equation 4

Now using Equation 2,
60/5280 = [ ln(120 * c * t1 + 1) ] / c
We can plug in the expression for c*t1 from Equation 4
60/5280 = [ ln(120 * 0.00316092 + 1) ] / c
c = [ ln(120 * 0.00316092 + 1) ] / (60/5280)
c = 28.3

We plug this c into Equation 3 to get

v0 = [exp(s * 28.2) - 1] / (28.3 * t)

We want to be able to express time as number of video frames.
t = (F / frame_rate_sec) / 3600
The 3600 is to convert time to hours. If distance s is expressed in feet want to convert the
distance s to miles

v0 = [exp(s / 5280 * 28.2) - 1] / (28.3 * (F / (frame_rate * 3600 )))
After eliminating some parentheses, We arrive at the final
formula for Serve Speed

==================================================================
v0 = [exp(s / 5280 * 28.2) - 1] / 28.3 / F * frame_rate * 3600
==================================================================

where
v0 is the initial speed of the serve,
s is the distance traveled by the serve duting the obeserved interval
F is the number frames of video it took the ball to travel this
distance
frame_rate is usually 30(I think 29.97 is the precise value) with most
camcorders.
I just got an ice cream headache.
 

maverick1

Semi-Pro
Mike Cottrill said:
why, if he knows the frame rate? Which in most cases is 30 or 15fps.

Because I assumed digital cameras(as opposed to camcorders primarily meant for video) had no sophisticated playback features. I have never used a camera for video.
I don't know much about these things and I will stay out of it now.
 

Mike Cottrill

Hall of Fame
maverick1 said:
Because I assumed digital cameras(as opposed to camcorders primarily meant for video) had no sophisticated playback features. I have never used a camera for video.
I don't know much about these things and I will stay out of it now.

You did the leg work. No reason to stay out. The problem is the less the frame rate the more error because of the time between frames and it will be hard to find the ground contact point. I have run the number through some of my videos and it looks pretty darn close. Good job. Now we the physics guys to give the formula the final approval.

lower fps also gives less resolution. Big gaps in MPH per frame count.
 

maverick1

Semi-Pro
Mike Cottrill said:
I have run the number through some of my videos and it looks pretty darn close. Good job. Now we the physics guys to give the formula the final approval.

I have a confession. I was struggling a bit to pin down the constants of integration. In the office next door to me, there are two guys one of whom is a Math PhD and the other a Physics PhD. These guys are not just any Phds, but recruited to be the best of the graduates from the best universties in the world.
I went to their office this morning and talked about this. The math guy quickly did some algebra to show me how to find the constants, and he felt I was doing the right thing overall. That plus the fact that using the formula give sane results is what gave me the confidence to post the formula.
But my co-workers didn't go over every detail since they don't really care about Tennis. So I could still use a review by someone who is actually interested in the topic.
 

drakulie

Talk Tennis Guru
Mike, Maverick..... So here is what I did. On my camera I found out you could stop the video where ever you want before you transfer it to the hard drive. From there you could push the forward button and for each push it will go forward one frame.

I was able to get two video taped serves that landed right on the cross section of the T. One was 100, and the other was 101.

On the 100 mph one, it is reaching the ground between the 13th and 14th frame. When I reach the 14th frame, it starting to bounce. Please keep in mind it may be the 14th and 15th frame as it is hard to tell exactly when the racquet has made contact with the ball.

On the 101 mph one, it is a little more clear when the racquet makes contact with the ball and is reaching the ground exactly on the 14th frame. When I reach the 15th frame, it is already bouncing, more so than the 100 mph one.

In addition, I video taped some serves with the radar exactly on the baseline (in the middle of the center line and side line). The radar was consistently showing between 75-82 mph.

I then put the radar against the back fence (21'3" from the baseline), and in the same position as the previous test. It was showing in the lower rto mid 40's.

Very interesting stuff. I am going to try and post the vids in the next day or two, and also download the material you guys referenced to see if it will open the file.
 

maverick1

Semi-Pro
drakulie said:
On the 101 mph one, it is a little more clear when the racquet makes contact with the ball and is reaching the ground exactly on the 14th frame. When I reach the 15th frame, it is already bouncing, more so than the 100 mph one.

14 frames translates to 103.4. In my opinion, this is more reliable than the 101 from the radar.
I have been saying even before I thought of my formula that your radar would slightly understate speeds for the 2 reasons we discussed in the other thread -
1. The ball will have slowed down a bit before reaching the radar gun's range. We saw in that website that Sampras's serve slows down from 120 to 87 in 60 feet. Physics tells us that more of it happens early on than later. It is safe to say that the ball slows down by at least 2 mph over the first 5 feet even for a slower serve.
2. the radar measures only the component of velocity towards it. if the ball is traveling at some angle (which it must unless it is aimed at the radar gun), the speed measured will be smaller.

(13 frames translates to 111.4, not 115.8 as I originally mistyped. I edited the post, but one of the replies quotes me with the incorrect number)
 

Zets147

Banned
Ten.Is said:
Hmmmmmmmm...LETS PURCHASE A RADAR!!!!!!!!!!!!!!!!
I NEED SOME MONEYYYYYYEYEYEYAYYEYEYEYYEYEYEYEYEYEYEYEYEYYYEYEYEYEYEYEYEYEYEYEYEYEYEYEYEYEYEYEYEYEYYEYEYEYEYEYEYEYEYEYYEYEYEY

Link is down I assume.
 

Mike Cottrill

Hall of Fame
Very nice. I did a c program, but HTM allows all to do the calculation.
We need to make this a sticky. Most likely in the Tips section.
Mike
 

maverick1

Semi-Pro
Mike Cottrill said:
Very nice. I did a c program, but HTM allows all to do the calculation.
Yes, this was my first attempt at writing JavaScript. Was surprisingly easy. Just googled for an example, found a mortgage calculator and modified it.

We need to make this a sticky. Most likely in the Tips section.
Mike

Thanks, "should be sticky" is the ultimate compliment for a post :)

I was thinking that it could be used to verify serve speed claims of people posting their serve videos. I remember reading in some thread that there was a video site that, unlike YouTube, allows you to step through the videos fram by frame. Does anyone know if that is true?
 

drakulie

Talk Tennis Guru
mav and mike, here is a video of 101 mph down the T.

http://www.youtube.com/watch?v=5EJe64Ky7rE

here is the action shot of the video, frame by frame. The first frame is "contact" and at the 14th frame the ball has struck the ground. The 15th and 16th frame the ball has already left the ground.

100_0130.jpg
 

maverick1

Semi-Pro
Drakulie,
Great pictures. You must have better light in Florida than we have in NJ.
Even then, I can't see the ball after the 12th frame. Do you have bigger pictures? Even in the 12th frame, I am guessing. In the 2 dimensional picture, the ball looks to be in V formed by the vertical tape on the net and the line dividing the service boxes. It looks pretty close to landing.
If it landed on the 14th frame, that makes it 13 frames because the ball look right on the racket (EDIT) in the first frame (/EDIT).
What does the the calculator(http://mavericks.cc/tennis/serve_speed.html) say ?
I don't know the exact spot it landed. It could be one the service line or a foot shorter. If you think you strike the ball some distance inside the baseline, you should subtract that from the distance you put in?
I am guessing the speed will be several mph higher than the radar, and I am willing to bet a week's pay that this is closer to your true speed than the radar gun.


Murali
 

maverick1

Semi-Pro
drakulie said:
here are some serves that were recorded as the ball approached the baseline.

this one is 79 mph:
http://www.youtube.com/watch?v=Uo4bkssVVY4

this one is 82 mph:
http://www.youtube.com/watch?v=k8JkyTBiyPk

this one was recorded at the back fence (21'3" away from baseline) at 43 mph:

http://www.youtube.com/watch?v=LKLUEvGwIes

Good info.
Keep in mind that the radar picks up the ball well before the ball reaches it. The first two were picked up before the ball bounced. Does the manual specify a range?
 

drakulie

Talk Tennis Guru
It doesn't necessarily specify an exact range, so I am not sure. I am aware the ball speed has been recorded before it reaches the baseline, I just thought it was interestsing to see the speed as it approaches the baseline and back fence.

As for the picture, I can't get it any larger. On my computer it is much larger and you could clearly see the ball landing. It is directly inside the service line and on the T. For some reason the picture shrinks when I transfer it.

By the way, the video is a ".mov" extension when it is downloaded from my camera to the Kodak software.
 

maverick1

Semi-Pro
drakulie said:
It doesn't necessarily specify an exact range, so I am not sure. I am aware the ball speed has been recorded before it reaches the baseline, I just thought it was interestsing to see the speed as it approaches the baseline and back fence.

As for the picture, I can't get it any larger. On my computer it is much larger and you could clearly see the ball landing. It is directly inside the service line and on the T. For some reason the picture shrinks when I transfer it.

By the way, the video is a ".mov" extension when it is downloaded from my camera to the Kodak software.

One way to test the range of the radar is to put behind the fence, and hit balls at the fence from the other side. See how close to the fence it needs to be before it registers something.

I don't know what TW does with images, so I can't help.

I am not very conversant with video formats, but .mov sounds like Quick Time.
If you like, you can email it as an attachment to me (MaverickOne@gmail.com) and I can post it on the website www.mavericks.cc. Anyone should be able to see it frame-by-frame.
 

maverick1

Semi-Pro
Looking at Drakulie's sequence of stills, I counted 13.5 frames.

The distance was 58.75 feet. Drak said he hits his serves a foot inside the baseline and he saw a mark inches from the service line where this serve landed.

That makes the serve 104.5 mph according to the formula. Drakulies' radar showed 101. The difference is very close to the amount of understating by the Radar I would have predicted, mostly because the Radar picks up the speed some distance after the serve has been hit.

To the extent that the formula is right, Drakulie may be certified to be 3-4 mph faster than his Radar readings.
 

pps

New User
it seems that this method of calculating speed completely ignores the spin of the ball which would lead to a different drag force. Neglecting ball spin introduces inaccuracy 1-10 percent depending on the type of serve. I would suggest rotational speed is 10% of linear speed on first and 30% on second based on http://wings.avkids.com/Tennis/Project/usspin-07.html
At which point do they measure serve speed at the professions tournaments anyway?
 

Mike Cottrill

Hall of Fame
it seems that this method of calculating speed completely ignores the spin of the ball which would lead to a different drag force. Neglecting ball spin introduces inaccuracy 1-10 percent depending on the type of serve. I would suggest rotational speed is 10% of linear speed on first and 30% on second based on http://wings.avkids.com/Tennis/Project/usspin-07.html
At which point do they measure serve speed at the professions tournaments anyway?

Could you please clarify your statement? The formula uses data from an averaged Sampras serve which includes the effects of spin rotation for the drag coefficient.

“The only unknown in the above formula is c, the modified drag coefficient for a Tennis ball. Time to calibrate our model using a known fact about Sampras' serve - that a 120 mph serve slows down to 87 mph over 60 feet. Substituting the numbers into Equation (1),” http://wings.avkids.com/Tennis/Project/speed-02.html

If there was more empirical data available that could be used to calculate the drag coefficient to see the effects that would be great, however that data does not seem to be published. I have compared the formula to ATP radar readings from the AO last year and the calculations were very close to the actual APT radar readings. See the Andy Roddick example included with the serve calculator.

ATP radar guns “make” readings about three feet after ball contact with the string bed.
 

vincent_tennis

Professional
about using the video to find the speed
lets say a camera records @ 30fps
it doesnt mean that each frame is taken 1/30th of a second after another ?
:S
 

WBF

Hall of Fame
vincent, this is irrelevent. Note that they compared using this method with radar results at the australian open and found that the formula provided reasonably accurate results.
 

vincent_tennis

Professional
vincent, this is irrelevent. Note that they compared using this method with radar results at the australian open and found that the formula provided reasonably accurate results.
lol okay but that with better cameras (for tv broadcasting)
 

Mike Cottrill

Hall of Fame
Hi everyone.

I understand the formula to an extent, but that link is no longer a calcualtor (It looks like a list of names to me).

Here is an updated link for the serve speed calculator:
http://www.donthireddy.us/tennis/speed.html

If I were to film my serve, could someone tell me how fast it was going?
If it is decent quality and the video is in the right format it can be done. Film from behind and have the camera were you can see the ball contact the racquet and impact with the court.
 
Last edited:
S

scot989

Guest
real speed / radar guns

http://www.donthireddy.us/tennis/speed.html

Acording this, The calculation below relies on the reported finding that a serve with an initial speed of 120 mph slows down to 87 mph over a distance of 60 feet

So we have a 27,5 % of variation of decreasing speed in 60 ft.
then in 36 ft(more or less the distance between server and net , i mean from where the ball is hit to the net(where radar guns are normally located)): we got some 16, 5% of variation in every serve.

So in my case i got a spped track xtreme radar gun set at net, and i got 106 mph at net, but the real speed(ATP SPEED, WHEN THE BALL IS HIT), i mean the atp/ initial speed will be more or less a 16- 17 % faster. So 106 mph at net means i actually have 123, 3 mph of initial speed.

What do you think guys? am i wrong?
 
S

scot989

Guest
http://www.donthireddy.us/tennis/speed.html

Acording this, The calculation below relies on the reported finding that a serve with an initial speed of 120 mph slows down to 87 mph over a distance of 60 feet

So we have a 27,5 % of variation of decreasing speed in 60 ft.
then in 36 ft(more or less the distance between server and net , i mean from where the ball is hit to the net(where radar guns are normally located)): we got some 16, 5% of variation in every serve.

So in my case i got a spped track xtreme radar gun set at net, and i got 106 mph at net, but the real speed(ATP SPEED, WHEN THE BALL IS HIT), i mean the atp/ initial speed will be more or less a 16- 17 % faster. So 106 mph at net means i actually have 123, 3 mph of initial speed.

What do you think guys? am i wrong?

im talking about when serve to the T :)
 
Top