View Full Version : Calculate Motor and Wheel Size

02-06-2009, 03:05 AM
It helps to draw a picture.


When you do this type of analysis it also helps to pick a unit system. I like MKS -- meters, kilograms, seconds -- just cause I'm an old physicist. The forward force on a wheel on a bot is equal to the torque (t) of the motor divided by the radius (r) of the wheel. The bigger the wheel the smaller the force. In MKS units the torque is in Newton-meters and the radius is in meters. Go here (http://www.onlineconversion.com/torque.htm) to convert.

For ascending an incline, we set the force of gravity equal to the force of the wheels. This gives us the maximum radius -- the wheel size that results in stalling going uphill. Naturally if you want to actually climb the hill you need a smaller wheel. But this is the upper limit.

The force of gravity on the bot is the mass of the bot times the gravitational acceleration. In this case 2 (Kg) times 9.8 (m/s^2). But it's on an incline, so the force that contributes to pushing the bot backward is the component of gravity in opposition to forward motion. That would be the sine of the angle from vertical times the force. It works out to roughly 5 Newtons.

Putting it all together and solving for the radius:

r = t / (g * m * sin (theta))

So, given 47 oz-in of torque with four motors (1.3 Newton-meters), mass of 2 Kg and an angle of 15 degrees, the answer is:

r = 1.3 / (9.8 * 2 * 0.26) = 0.26 m

For stalled motors 26cm radius (52cm diameter) wheels are your limit. Smaller wheels will give you more force and will move your bot rather than standing still. This is the absolute lower limit and gives you an idea about how to calculate a wheel size that will move your bot.

Boy, I hope my numbers are right. Those are giant wheels. Looking forward to corrections.

02-06-2009, 09:42 AM
Meta I didn't do the math ... but +rep for taking the time to put it into a visual format. Great stuff!!!

02-07-2009, 12:24 AM
Wow what a great post. I think this should be a tutorial.

02-07-2009, 05:30 AM
Wow! Now that's an answer. Thank you metaform3d! I'm going to do the empirical to confirm the theoretical. I'll keep you posted as to my results.

02-08-2009, 04:58 PM
What this computes is the maximum wheel size, which is the size at which the robot stalls going uphill. If the force that we're trying to counter from gravity is f, and the stall torque of the motor is t, then this maximum radius r1 is given by:
r1 = t / f
For 1.3 Nm of torque and a force of 5 N, r1 is 0.52 m, about 20 inches. With smaller wheels the robot will move, although it may not move very fast, and because real robots are not like the ideal model it may not even overcome static friction. The result just shows that reasonable-sized wheels for this bot may be possible. If we computed that the wheels could be no larger than, say, a millimeter, that would show that the motors are way too weak.

If we take the desired speed under load into account then things become a lot more interesting. Given the RPM p of a wheel of radius r, the speed s is given by:
s = p * 2pi * r / 60
(Dividing by sixty converts from "per minute" to "per second".) If we treat pi as approximately 3 (and we're really not doing computations any more accurate than that) this resolves to:
s = p * r / 10
If we take the RPM of the drive motor without load and call that p0, then we can rearrange this to compute the minimum radius for a wheel that will drive our bot at the desired speed. Let's call this r0:
r0 = 10 * s / p0
For an RPM of 60 and a speed of 0.5 m/s (18"/s), r0 works out to 0.08m, about 3 inches. Under no load the motors will run at 60 RPM, so the bot will move at the desired speed. Under load -- going uphill for example -- the motors will run slower and we'll need larger wheels, although it will stall when we hit r1. So we know the ideal size (if it exists) is between r0 and r1: 3 and 20 inches.

But what is the ideal size, the size at which the bot moves at the desired speed going up the incline? As the wheels get bigger the potential speed goes up, but the force they can deliver goes down. Is there an ideal size, and what other parameters can we adjust to get the size and speed we want? Turns out we can compute this, but it's a little more complex. Let me continue in another message.

02-08-2009, 05:36 PM
Motor speed is linearly proportional to load. Under no load the motor spins at its max RPM p0, while at stall torque it runs at zero RPM. So the RPM p of a motor under a torque load of L is:
p = p0 * (t - L) / t
The torque load is the force the wheel needs to deliver times the radius, so this is:
p = p0 * (t - r * f) / t
The speed is also related to the radius by the third equation in the previous message. So the speed under load is:
s = r * p0 * (t - r * f) / (10 * t)
Rearranging we get:
10 * s / p0 = r - r * r * f / t
The term on the left is what we previously calculated is r0, the minimum radius under no load. And f/t is 1/r1. Since this is a quadratic equation we have to get it into canonical form:
r * r / r1 - r + r0 = 0
Using the quadratic formula we can solve for r:
r = r1 * (1 +/- sqrt (1 - 4 * r0 / r1)) / 2
This may look daunting, but it has some very interesting features. The "+/-" means that there are two solutions -- one that comes from 1 + something and the other from 1 - something. This makes sense: one solution has a small wheel that can't cover much ground but can turn faster because it experiences less load torque, and the other has a large wheel that turns slowly because of the higher load torque but covers more ground because of it's longer circumference.

The "something" in this case is the square root term. The part inside the square root is called the discriminant, normally written as D.
D = 1 - 4 * r0 / r1
If r1 is bigger than 4 times r0 then this term is negative and there is NO solution. In that case there is no possible combination of big and slow or small and fast that will make this bot hit the target speed. For the values we've been using for this experiment, the ratio of r1 to r0 is 6.5, so no solution is possible. Sorry, kaos116.

Of course we can also use this equation to spec out motors that would work for this bot. To be continued...

02-08-2009, 06:14 PM
The optimal solution is when D is zero. I'm just going to stipulate this, but intuitively it means that we don't have so much torque or speed that we need to make the wheels extra large or extra small. They are "just right." So:
4 * r0 / r1 = 1
Since r1 is related to torque, we can keep all the other parameters the same as solve for torque:
4 * r0 * f / t = 1

t = 4 * f * r0
For our case this works out to 1.6 Nm, only about 20% more than originally specified. This is 4 motors at about 55 oz-in each. If the discriminant is zero then the equation for r becomes simply:
r = r1 / 2
So with our stronger motors we need wheels about 12" in diameter to hit the target uphill speed. If we back-compute some other numbers we find that the RPM is also reduced in half. Our wheels are rotating at 30 RPM. What's going on is that the optimal solution splits the difference perfectly between speed and load. The motor has cut its RPM in half in order to provide force to move against gravity. More force and the speed would be lower; more speed and the force would be lower.

Perhaps you don't have old LPs lying around, so you'd like to find motors to fit the wheels you have. If you have a target radius for your wheel R, you just have to assure that r1 is twice that size:
r1 = 2 * R

t / f = 2 * R

t = 2 * R * f
Since r1 is four times r0, we can also compute the no-load RPM from the desired speed.
4 * r0 = r1

4 * 10 * s / p0 = 2 * R

p0 = 20 * s / R
By the one-half rule we discovered earlier, this is twice the RPM you'd need to get the desired speed if the bot wasn't going uphill.

Plugging in the numbers from the first post we get a torque of 0.8 N and 120 RPM. For four continuous-rotation servos you'd need 30 oz-in with a speed of 0.08 sec/60 degrees.

02-08-2009, 07:25 PM
EDIT: There's something wrong with these numbers -- not sure what. Any thoughts on where I went wrong would be welcome.

02-08-2009, 08:24 PM
I honestly haven't gone through your posts with a fine-toothed comb yet. I trust you vetted your own numbers, implicitly. :)

Since you note an apparent discrepancy, I'll see if I notice anything as soon as I'm done for the evening.

02-09-2009, 02:03 AM
I believe the mathematics are essentially correct. I sprinkled some specific numeric examples through the text, however, and when I go back to verify those I get inconsistent results. I need to run some sets from scratch to verify everything. There may be a fringe condition I didn't consider.

02-09-2009, 11:49 AM
As I suspected a combination of logic, transcription and arithmetic errors made my examples give bad results. The mathematics are completely sound.

The most basic error is in post #6. In fact a solution only exists if the ratio of r0 to r1 is greater than 4, not less than as I said there. This makes more logical sense, since a large ratio results from stronger and faster motors. I also said that the example bot wouldn't work because the ratio was 6.5. But I had used the wrong numbers there. The ratio was really 3.8, so the bot still won't meet the goals but because the ratio is less than 4, not because it's greater.

Finally, because of stupid arithmetic errors I thought that the equation for r could sometimes result in values smaller than r0, which should be impossible. I was wrong -- that can't happen. So it all appears consistent, as it should be.

As penance, let's compute how heavy koas116's bot can be given the motors he has. Again we set the ideal ratio between r0 and r1 to 4 and solve for mass.

r1 = 4 * r0

t / f = 4 * r0

g * m * sin(a) = t / (4 * r0)

m = t / (4 * r0 * g * sin(a))
This works out to 1.6 Kg (3.5 lbs), with wheel radius of 2 * r0, or 0.16m (about 12" diameter). The wheels have to be big to generate the desired speed given the low RPM, but then the bot can't be too heavy since large wheels mean low pushing force.

02-09-2009, 07:20 PM
I thought I would take a crack at the question of acceleration -- how long does it take a wheeled bot to get to its maximum speed? For the idealized bot it turns out the answer is: never. On a level surface (and in the absence of friction) a bot's max speed s given by the unloaded RPM of the motor p0 and wheel radius r.
s = p0 * r / 10
At full speed there is zero torque on the wheels -- the full power of the motor is being converted to RPM. At a standing start, however, the motors are stalled and giving their full torque. As the bot speeds up the torque drops, and the rate of acceleration approaches zero as the bot reaches its full speed. No matter how fast the bot goes, there's never quite enough torque to get it to full speed.

Mathematically this is represented by a linear differential equation. Torque is related to velocity such that at 0 we have full torque and at speed we have zero. I'm using uppercase T for torque here since t is time. (I was using tau in my notes, but I don't have a tau key.)
T(v) = T0 * (1 - v / s)
Acceleration (the derivative of velocity) is given by force divided by mass. Force is torque divided by radius. Multiplying it out we get:
v' = T0 * (1 - v / s) / (r * m)
I'll spare you the tedious details, but by doing some old-fashioned calculus we can determine a closed form solution for velocity as a function of time:
v(t) = s - s * exp ( -t * T0 / (s * r * m))
So at time zero the speed is zero. It rises rapidly after that but then levels off and becomes asymptotic to the max speed. Of course for practical purposes there's a point where it's going about as fast as it can. The bot will be at 95% when the exponent reaches -3:
-t * T0 / (s * r * m) = -3
Solving for t:
t = 3 * r * m * s / T0
Alternately if we have a desired time we can rearrange to solve for torque:
T0 = 3 * r * m * s / t

02-09-2009, 07:54 PM
Let me put these last formulas to practical use. Suppose you're working on your heavyweight combat robot to end all combat robots. It weighs 220 lbs, has 10-inch tires, and you want it to have a max speed of 35 mph and get up to speed in 2 seconds from a standing start. What motors do you need?
m = 100 Kg
r = 0.15 m
s = 15 m/s
t = 2 s
From the max speed we can compute the RPM:
p0 = 10 * s / r
1000 RPM. From the desired time we can compute the stall torque:
T0 = 3 * r * m * s / t
Required torque is 250 ft-lbs (340 Nm). Better get out your checkbook. In combat of course you want to both speed and strength. If your bot is pushing another bot at half its max speed, then half of the motor power is going to torque. What would that look like? Half speed would be 18 mph. Half torque would be a force of:
f = 0.5 * T0 / r
250 pounds of force (1100 N). That ought to be enough to throw the competition around.

02-09-2009, 08:06 PM



Greek Alphabet as cut-pastable 8bit characters...

Thanks for your continued efforts, Meta!

04-17-2009, 04:24 PM
I've completed an introductory tutorial based (http://forums.trossenrobotics.com/showthread.php?t=3183) on insights from this analysis. Still using T instead of tau though.