Projectile Motion Primer for FIRST Robotics

Share

Projectile Motion Primer for FIRST Robotics

It is that FIRST Robotics competition time of the year. Basically, in FIRST, high school students work in teams to build robots that compete in specific tasks. Apparently, this year a task involves throwing a basketball into a goal.

And this leads to the popular question: how do I tell my robot to throw the ball? Oh? Projectile motion you say? Well, not so fast. Let us check some things first (or FIRST).

Quick note: just about all of the following has been posted somewhere before on my blog. You could treat this as a quick tutorial for FIRST teams. I just wanted you know that I know that I am repeating myself.

Can You Neglect Air Resistance?
——————————-

For basic projectile motion, the assumption is that the only force acting on the object is the gravitational force. This may work well if you toss a marble, but clearly doesn't work when you toss a ping pong ball. The air resistance force can usually be modeled with the following expression:

With the following variables:

ρ is the density of air.

C is the drag coefficient that depends on the shape of the object. A smooth sphere has a drag coefficient of 0.47.

A is the cross sectional area of the object. For a ball, this would be the area of a circle.

v is the magnitude of the object's velocity.

So, when do you have to include this air resistance force? Let me draw a force diagram for two objects moving at the same speed (after being thrown or something). The first object is a ping pong ball. The second is a solid wood ball of the same size.

Same speed and the same size (and shape) means they have the same air drag. But look at the wood ball's forces. The gravitational force is much larger in that case. This means that the air drag force has less influence on the net force for that object.

Ah HA! But the air drag still has some effect, right? Technically, yes. One way to get a feeling for the size of this force is with a simple calculation. If I know something about the ball and something about how fast it will be going, I can compare these two forces (the gravitational force and the air drag force). Let me do that with some made up numbers. I will use the following:

A smooth ball that is 8 inches in diameter (I am pretty sure this is what is used in FIRST).

I am really not sure about the mass of the ball, let me just guess 0.5 kg.

Suppose I throw this with a maximum speed of 10 m/s.

The magnitude of the gravitational force is easy to calculate. This will just be the product of the mass and the gravitational constant (g).

And now for the magnitude of the air drag force:

So 0.9 Newtons seems large compared to 4.9 Newtons. But it is probably ok to ignore the air resistance? Why? Because for much of the motion of a thrown ball, the speed will be lower than 10 m/s. Ok. You don't like that answer, do you? I guess the only thing to calculate the motion of a ball both with and without air resistance. Without air resistance, you have straight projectile motion (straight from an introductory physics book).

But what about motion with air resistance? This really can only be calculated by breaking the motion into a whole bunch of small steps. During these small steps, I can pretend the forces are constant. Essentially, the basic idea behind a numerical calculation. Here is a plot for the trajectory of two balls. One has an air resistance force, and the other does not.

Well, the difference in distance is a little more than I expected - about 1 meter farther without air resistance. However, that is a pretty far shot for a robot (9 meters or around 30 feet). Also, I guessed about the mass of the ball. The more massive the ball, the smaller the difference between these two. I am still not worried about air resistance. Do you know why? This is why. Here is the same plot with one extra trajectory added.

The red curve represents the same ball with air resistance, but thrown just a 0.5 m/s faster than the blue ball. I suspect that the launch speeds of a ball will vary enough that they would overshadow any effects from air resistance. How about one more plot. What if I reduce the launch speed to 7 m/s?

Here you can see an increase of 0.5 m/s makes the ball go farther than the ball with no air resistance.

What about the magnus force?
—————————-

The magnus force is a force due to the rotation of a moving object in a fluid. Essentially, the relative speeds of the surface of the ball are different for the top and bottom (or on two different sides) of the ball. The result is a differential force that can cause the ball to curve.

Do you need to account for this magnus force? Probably not. First, it would make your aiming calculations rather difficult and second, just don't spin the ball. Even if the ball does spin, I suspect the effects will be small compared to the variations in the initial conditions of the throw (like above).

How should you throw the ball?
——————————

So, we assume that the ball has only the gravitational force on it. Is this a bad idea? Maybe, but it is still the best place to start. The key to projectile motion are the two kinematic equations for the x- and y-directions of motion:

Here the "1" notation refers to the starting position and velocities and the "2" refers to the final position. The t is the change in time from the starting point to the finishing point. Oh, you don't care about t? Well, you can solve to eliminate that. Also, there is a connection between the starting x- and y-velocities:

There is no number subscript for the horizontal velocity since it is constant and doesn't change. In order to remove t from the expressions, I can solve the x-equation for t. Before I do that, let me simplify a bit. Let me call the starting location of the ball the origin so that x1 = 0 meters and y1 = 0 meters. This gives me:

Now I can substitute this t into the y-equation:

There you have it. That is your golden equation. If you know how far from the basket you are (x2) and how high the basket is above the starting location of the ball (y2), you can use this to find the launch speed (v) and launch angle (θ). Yes, that is just one equation with two things to find. You are going to have to make a choice. Perhaps your robot can shoot the ball at three different speeds. In that case, solve for the appropriate angle for each speed and then pick the best one.

Of course, once you do this, you will probably have to make some adjustments to your actual values. Also, be careful. This equation isn't trivial to solve for θ.

Other Considerations
——————–

If that wasn't enough work for you, there is something else you can consider: the goal. The ball is smaller than the basketball goal (at least I assume). So, you will have some leeway in your shot. The higher the angle the ball has with respect to the basketball rim, the better. Just pretend you are the ball and you are going towards the goal. If you are at a low angle (more horizontal), the rim will look like this:

If you (as the ball) are approaching the goal from a high angle, it will look more like this:

Which shot do you think would be easier? Yes, the higher angle one. Do you want some more ideas about hitting the goal? Check out this older post on basketballs.. And what about shots off the backboard? (I assume there actually is a backboard). Honestly, I haven't looked at any backboard shots yet.