Log in

View Full Version : Best launch angle and velocity: HANDS DOWN..


Symph
17-02-2014, 19:33
STEMpunk’s shooter, optimized with applied mathematics:
Ever wonder what the single greatest, most spectacular, ABSOLUTE BEST angle and velocity to shoot your game piece at is?Well, for us, it’s 39 degrees at 42.5 feet per second.
(From ~43.3in above the ground. Giving us a 13.5 ft thick strip of the playing field to make the shot on.)
https://fbcdn-sphotos-d-a.akamaihd.net/hphotos-ak-frc1/t31/1920959_599122903497202_1789043029_o.jpg
If you want to optimize your robot like we did ours, for 2014 or any other year involving a goal and a projectile, I would encourage you to read on and find out how got these numbers.
A week into the build season our robot was well past the first basic stages of design. Our team, having decided on the layout of our drivetrain (utilizing an unusual application of the mechanum drive) and our shooter, (a virtually one piece rig functioning as an all in one, passing, shooting, ground/ air pickup mechanism) needed to know now, what results our shooter should produce to classify as a “good shooter”.
The algorithms we contrived to give us this definition, if utilized properly, should afford most teams with the capability to find that one combination of angle and velocity giving them the single greatest, most spectacular, ABSOLUTE BEST strip of the playing field to make the shot from. You can find our results above. This is how we did it:

(See "MathProofCondensed.docx" attachment.)

No doubt you will want someone who enjoys rigorous mathematics suiting these calculations to your own robot, but it’s worth the work, as this not only draws a bold line between a "bad shooter" and a "good shooter", but also marks the difference between a "good shooter" and a "perfect shooter".

Ether
17-02-2014, 19:41
Well, for us, it’s 39 degrees at 42.5 feet per second.

That's an incomplete specification. You need to state what height above the floor that is specified at.

Symph
17-02-2014, 19:48
Thanks, fixed it.

Ether
17-02-2014, 21:21
Uh-oh. Back to the drawing board:

Ymax = ½*a*t2

tmax = sqrt(2*Ymax/a) = 0.58

Lil' Lavery
18-02-2014, 16:55
I disagree. This angle may provide the largest evelope to score from, but that doesn't make it hte best launch angle and velocity. There will be far superior angles in order to score from particular strategic areas of the field, or even more namely, present an easily catchable truss pass. I very much prefer a soft lob over the truss to a line drive if your intent is to get the catch points.

Symph
18-02-2014, 17:11
OOOOH! Never mind, I see where I went wrong! I completely neglected the fact that position was the integral of velocity. I am going to fix this, just give me a minute.

waialua359
18-02-2014, 18:00
The ultimate proof in my book, is how often you score and how high of a shooting percentage, WITH defense applied.

Ether
18-02-2014, 18:11
He's inspired by the "M" part of STEM. That's a good thing.

bduddy
18-02-2014, 18:29
I disagree. This angle may provide the largest evelope to score from, but that doesn't make it hte best launch angle and velocity. There will be far superior angles in order to score from particular strategic areas of the field, or even more namely, present an easily catchable truss pass. I very much prefer a soft lob over the truss to a line drive if your intent is to get the catch points.

The ultimate proof in my book, is how often you score and how high of a shooting percentage, WITH defense applied.
^ And therein lies the difference between the 'M' and the 'E' in STEM!

Symph
18-02-2014, 19:15
I have revised the entire proof, sorry about the inconvenience, it should be sound now. However, considering the fact that I was thinking precisely that same thing last time I submitted this, I would encourage you to feel free to check my math again!
What say you, Ether?

Ether
18-02-2014, 19:58
^ And therein lies the difference between the 'M' and the 'E' in STEM!

FRC is a big tent. There's room for everybody.

Ether
18-02-2014, 20:06
I have revised the entire proof, sorry about the inconvenience, it should be sound now. However, considering the fact that I was thinking precisely that same thing last time I submitted this, I would encourage you to feel free to check my math again!
What say you, Ether?

You forgot to edit your original post. It still says "42.5 feet per second" and "13.5" ft scoring range.

Ether
19-02-2014, 11:43
I have revised the entire proof, sorry about the inconvenience, it should be sound now. However, considering the fact that I was thinking precisely that same thing last time I submitted this, I would encourage you to feel free to check my math again!
What say you, Ether?

This time around I didn't review all your steps again. Instead I did the following two things:

Thing1:

I took your "final answer" of V=29.53 f/s, angle=39 degrees, launch height = 3.61042 feet and calculated the trajectory from that. Your apex occurs at x=13.2555 ft and Rs is 11.3 ft.

Here's the equation for the trajectory using 29.53 f/s & 39 degrees:

y = -0.0305452*x^2 + 0.809784*x + 3.6104

(x is horizontal distance from launch point and y is height above floor)


Thing2:

I did my own calculation to find launch speed and angle to get the desired Rs=13.5 feet.

The result is

launch speed = 31.970 ft/sec at launch angle 35.55 degrees

The trajectory using those numbers is

y = -0.0237769*x^2 + 0.714568*x + 3.6104

max height above floor = 8.9792ft @ 15.0265ft from launch point



Bottom line: whatever you're doing is certainly close enough engineering-wise for FRC application. Mathematically, I suspect you are getting some round-off error due to the calculation method you used.

PS: You forgot to edit your original post. It still says "42.5 feet per second" and "13.5" ft scoring range.

Uriah
19-02-2014, 13:52
He's inspired by the "M" part of STEM. That's a good thing.



Ether,

Not only is he inspired by it, he is driven by it. He's a 16 year old homeschool kid that taught himself calculus. He's a very bright young man and STEMpunk is lucky to have him for another year!

Symph
19-02-2014, 22:38
Ether, I am sorry to say that we are both unfortunately confused. You see, I had redone the math and was going through the process of updating my post in stages; Replacing my "MathProofCondensed.docx" attachment, replacing the graph for my trajectory in the original post and finally responding to you, when my Wi-Fi cut out for a full day. Which I thought was fine, considering that I had finished updating, until I realized that I had neglected to explain why I still went for 39 degrees even with an alternate velocity, and left my original sentence "Well, for us, it’s 39 degrees at 42.5 feet per second." unchanged.
I will first begin by explaining that I chose 39 over 36 degrees knowing full well that it would result in an Rs of 11.5ft rather than a full 162in or 13.5ft, because although 36 degrees does give us the greatest strip of the field, it's furthest point lies in the middle zone rather than the beginning of the first, where we will not be shooting from leaving a potion of that strip wasted, and it's closest point is several feet away from the goalie zone, forcing us to shoot from further away and over build our robot.
If you graph the function "R''s=-115.7137 *csc(⁡a)*cot(⁡a)" in my proof, you will see that one of it's many zeros is in indeed ~36 degrees, and does indeed, as you calculated, result in Rs= 13.5ft.
As you can see now, my math is right, but my final decision does not match what I first defined as "optimal", and so in the name of peace, harmony and all things good in the world, I am going to update my post, once more, this time sticking to my original postulate of "best angle and velocity => biggest Rs".
Hopefully this time, I will have it right,
Wish me luck Ether!

Symph
19-02-2014, 22:43
STEMpunk’s shooter, optimized with applied mathematics:
Ever wonder what the single greatest, most spectacular, ABSOLUTE BEST angle and velocity to shoot your game piece at is?Well, for us, it’s 36 degrees at 31.62 feet per second.
(From ~43.3in above the ground. Giving us a 13.5 ft thick strip of the playing field to make the shot on.)
https://scontent-b-ord.xx.fbcdn.net/hphotos-prn2/t31/1781143_599629600113199_351404786_o.jpg
If you want to optimize your robot like we did ours, for 2014 or any other year involving a goal and a projectile, I would encourage you to read on and find out how got these numbers.
A week into the build season our robot was well past the first basic stages of design. Our team, having decided on the layout of our drivetrain (utilizing an unusual application of the mechanum drive) and our shooter, (a virtually one piece rig functioning as an all in one, passing, shooting, ground/ air pickup mechanism) needed to know now, what results our shooter should produce to classify as a “good shooter”.
The algorithms we contrived to give us this definition, if utilized properly, should afford most teams with the capability to find that one combination of angle and velocity giving them the single greatest, most spectacular, ABSOLUTE BEST strip of the playing field to make the shot from. You can find our results above. This is how we did it:

(See "MathProofCondensed.docx" attachment.)

No doubt you will want someone who enjoys rigorous mathematics suiting these calculations to your own robot, but it’s worth the work, as this not only draws a bold line between a "bad shooter" and a "good shooter", but also marks the difference between a "good shooter" and a "perfect shooter".

Symph
20-02-2014, 15:02
Ether,

Not only is he inspired by it, he is driven by it. He's a 16 year old homeschool kid that taught himself calculus. He's a very bright young man and STEMpunk is lucky to have him for another year!
Awh, thanks man! Q^Q You are a real bro, you know that?

Symph
20-02-2014, 15:06
You forgot to edit your original post. It still says "42.5 feet per second" and "13.5" ft scoring range.



Looks like my original post is now too old for me to edit. :(

matthewdenny
20-02-2014, 15:22
According to the model we are using there is a strange occurrence:

From a height of 3.5'
And an angle of 35 deg.
And a ball speed of 35 fps

There is a pretty decent window.

Not quite perfect, but it would have been a good design point to start at.

Ether
20-02-2014, 17:07
According to the model we are using

Is it a simple parabolic model (like Gabe is using)? Or does it include air drag?

For a simple parabolic trajectory with those launch parameters, the max height of the top of the ball is 10.8 feet*, which exceeds the top of the goal.

* assuming you meant that the 3.5' launch height was the top of the ball, rather than the center

Chris is me
20-02-2014, 19:43
Great work on the kinematics, though the pedant in me objects to absolute terms like "best" and "ideal". There are a variety of factors at play driving the shot of a ball.

Now, for extra credit, using reasonable assumptions for energy transfer, figure out how much spring potential energy your team's system needs to make this shot. :)

One thing I didn't see, but I'm too busy to compute - for what range of distances is the ball able to go in the goal?

matthewdenny
20-02-2014, 19:55
The model we are using includes air drag (but not spin).

matthewdenny
20-02-2014, 20:10
Ether, 3.5' was the bottom of the ball.

Ether
20-02-2014, 20:36
The model we are using includes air drag (but not spin).

Some follow-up questions, if I may?

- are you using a linear or quadratic air drag model?

- how did you validate the model? i.e. How did you determine the proper value for the drag coefficient for this year's game piece?

Ether
20-02-2014, 20:44
One thing I didn't see, but I'm too busy to compute - for what range of distances is the ball able to go in the goal?

Check out post#13.

Ether
20-02-2014, 20:52
I put together a few observations about parabolic trajectories in a short 2-page paper here (http://www.chiefdelphi.com/media/papers/2946).

I'll be adding more as time permits.

matthewdenny
20-02-2014, 21:06
Some follow-up questions, if I may?

- are you using a linear or quadratic air drag model?

- how did you validate the model? i.e. How did you determine the proper value for the drag coefficient for this year's game piece?


I used a terminal velocity of 36fps, which someone on here had obtained. To double check it I translated it to a Cd of .58, which given the calculated Reynolds number, corresponded to a NASA page relating drag on a sphere to Cd.

Once I had Cd, I used .01sec intervals starting from the launch position, Calculate Vx, Vy, and Drag Force, I use Drag force and gravity to adjust the numbers for the new angle of motion and Velocity, and repeat to trace the arc.

Here is my Spread Sheet. See the sheets for 'Flight Calc' and 'Flight Path' to get all the details. (You can check out the other sheets too if the interest you)

Ether
22-02-2014, 14:53
Here is my Spread Sheet. See the sheets for 'Flight Calc' and 'Flight Path' to get all the details. (You can check out the other sheets too if the interest you)

Nice job on the spreadsheet. Thanks for posting it.

I used .01sec intervals starting from the launch position, Calculate Vx, Vy, and Drag Force, I use Drag force and gravity to adjust the numbers for the new angle of motion and Velocity, and repeat to trace the arc.

May I offer a suggestion? The way you implemented the integration appears to have accuracy/stability issues, which could easily be fixed.

All the plots below are based on the parameters in your spreadsheet (launch speed = 35 ft/sec, launch angle = 35 deg,
g = 32.2 ft/sec2, terminal velocity = 36 ft/sec, ball weight =3 lbf etc):

Plot1 shows your results compared to the true* flight path.

Plot2 shows your model with the time step changed from 0.01 to 0.005. Notice the improvement.

Plot3 shows your model with the time step changed to 0.003. It is beginning to diverge.

Plot4 shows your model with the time step changed to 0.002. It is very much off track.

Plot5 shows what is possible with a carefully-implemented Euler method at 0.01 timestep

Plot6 shows Euler with a 0.002 timestep.

Plot7 shows Trapezoidal integration of X and Y at 0.01 timestep. Notice you can't even see the red.


Trapezoidal integration is easy to do in Excel for problems of this type. I can write a short paper explaining how to do it if anyone is interested.


*mathematically "true" based on the model used. I computed the true flight path using second-order Runge-Kutta at 0.01 time step. With RK2, smaller time steps are not necessary for this application as they yield virtually identical results: See PlotRK

Ether
23-02-2014, 12:13
By the way, switching gears for a moment from math to real-world engineering, here's a comparison between the parabolic trajectory and the air_drag trajectory, assuming terminal velocity of game piece is 36 ft/sec and air drag is proportional to the square of velocity.

Does anyone else have test data they'd be willing to share, that could be used to confirm the air drag?

matthewdenny
23-02-2014, 17:50
I found the calculations for sphere terminal velocity here:

http://hyperphysics.phy-astr.gsu.edu/hbase/airfri2.html

it seems to mesh with the previous numbers we used for Vterm.

Ether, I'm still digesting the plots, and learning about the methods. I'll have more to say once I learn more.

Ether
24-02-2014, 23:56
I created a simple spreadsheet to graphically show the effect of air drag vs parabolic (no air drag) flight path.

Just enter your launch parameters (speed, angle, & height) into cells A1, A2, & A3 and the graph will update.

You can download it here:

http://www.chiefdelphi.com/media/papers/2946

Have fun!