# Calculating actual speed theoretically

While browsing through these forums to develop a better PID, my attention started to wander and I wondered if there was a way to calculate the actual speed of a robot theoretically. I decided I should practice my physics anyway, so I started deriving a formula for this situation.

Variables used:
ω = angular motor velocity
ωf = angular free motor velocity
τ = motor torque
τs = motor stall torque
W = robot weight
μ = coefficient of friction
v = robot velocity

Starting formulas:
ω = ωf(1 - τ/τs) slightly rearranged from here or here.
τ = Wμr From here.
v = 2πr
ω

Deviation:
Once we have the formulas arranged correctly the derivation is pretty easy.
Start by plugging in the second formula into the first to get
ω = ωf(1 - Wμr/τs)
Then, plug that into the third formula to get our final formula
**v = 2πr
ωf(1 - Wμ*r/τs)**

Example:
Now that we have a formula, to use it we need to determine all of the values for the robot. Both metric and empirical units can be used, but for metric Newtons (N) is the equivalent of lbs not kg (N = kg * 9.80). Also make sure to watch your units (I had to convert from in/min to ft/sec below). Following is an example robot that weighs 12 lbs and has four motors 393 motors powering double roller 2.75" wheels.
ωf = angular free motor velocity = 100 rpm (directly driven, motor specs here)
τs = motor stall torque = 14.76*4 (using 4 393 HS motors)
W = robot weight = 12 lbs
μ = coefficient of friction = 0.84 (see here for other wheels)
r = wheel radius = 2.75 in

plugging in all of the variables will return this
v = 2π2.75100(1 - 120.842.75/(14.76*4))
v = 917 in/min = 917 / 12 / 60 = 1.27 ft/sec

I think the coefficient of friction table linked above is for static friction and not kinetic friction, but I can’t find kinetic friction of the wheels anywhere else. If anyone else has more accurate numbers for kinetic friction please post below. Finally, I am not really sure if this is at all useful because it is easier to actually measure the speed, but it was fun to do and I though I would share it.

1 Like

Just glancing at this, I’m puzzled by your use of coefficient of friction in trying to determine theoretical speed. It seems to me that the coefficient of friction would only be of interest if you were trying to evaluate a situation in which the wheels might slip on the driving surface. For example, it seems to me if you were trying to figure out how much force your robot could exert horizontally, then τ = Wμ*r would be very useful for that.

But to calculate theoretical speed, I think it would be necessary to take into consideration the energy losses induced by the flexibility of the wheels and the driving surface - in other words, the squishiness of the materials. This squishiness would result in lost energy. The work done by the wheels in compressing themselves and the driving surface would be lost as heat. Theoretical speed calculations would take into consideration the measured power output of the motor minus the tiny amounts of squish (energy loss) taking place over each time interval, or over the rotation of the wheels. The heavier the robot, the more things get squished on each revolution. Maybe I’m wrong, but I don’t think of squishiness as being necessarily directly related to the coefficient of friction. I think hypothetically you could have a material with no slippage but be very squishy and have a high energy loss number.

Have you tried calculating this from an energy standpoint rather than from a force balance standpoint?

Maybe have a look at this: http://en.wikipedia.org/wiki/Rolling_resistance

My intention was to calculate the actual (not theoretical) speed of the robot without measuring anything (this was the theoretical part of the title). So I did need the coefficient of friction to calculate the robot speed. I used a force balance standpoint because that is what I know how to do. Additionally, I think it would be hard to account for all sources of loss for this situation.

I think a force balance approach will not lead you to the kind of answer I think you’re looking for. If the robot were pushing against something, then a force balance equation might give you some relevant answers. In your particular scenario I’m not sure what the coefficient of friction is actually doing to the rotating wheel except to allow it to propel the robot.

Let’s have a look at your final equation: v = 2πrωf(1 - Wμr/τs)

If the coefficient of friction, μ, were zero, then what would v become? I think if μ were zero, then in the real world the robot’s wheels would be spinning below it and the robot would be going nowhere fast. But, based on your final equation, the robot itself would be traveling at 2πr*ωf. While your motors might be spinning at ωf (the angular free motor velocity) when μ = zero, in reality the robot itself would not be moving at all. So I don’t think you’re actually calculating what you think you’re calculating.

I agree. This sort of calculation would probably be very non-linear and require lots of knowledge about the specific kinds of wheels and the surface they are driving upon.

Nice catch. The reason behind this is that I assumed for every rotation of the wheel the robot will travel the full circumference of the wheel. This would not happen if the robot is slipping on a surface with a very low coefficient of friction. I have tried to tried to research how calculate wheel slip, but everything I can find uses the robot velocity to do this. Although for a real robot, the wheels would not slip that much so the formula might not be that far off for a regular vex robot.

One way wheel slip can be inferred when the wheel’s encoder is way off from what the accelerometer says for that direction (assuming flat terrain).

Looking at sudden increases to near-top velocity can also be done but that would be harder to catch.

I think you need to approach this problem from an energy (or power) balance standpoint. Your speed will reach an equilibrium when the power output of your motors just equals the power consumed by the external world.

The motors output a certain amount of power vs. their speed. Power is related to the motor speed vs. motor torque curves. In other words motor power is related to torque at a certain speed. These kind of motor curves are available, I think.

The rubber of the wheels and the driving surface compress a certain amount under certain loads. This compression sucks up a certain amount of energy with each revolution of your wheels. When the robot is rolling along, you are compressing X amount of material in T amount of time, which consumes E amount of energy. Energy divided by time is a power relation.

So I think you need to develop a curve for motor power and another curve for power absorbed by the compression of your wheels and the driving surface. At some point those curves will intersect, and that intersection will give you a theoretical speed.

As far as coefficient of friction, μ, is concerned, ask yourself this: do I get any wheel slip if my μ is 0.9? How about μ = 0.8 ? How about μ = 0.5 ? I think so long as μ is above some critical value, your wheels will not slip at all. So if your wheels do not slip at all over a wide range of μ, then what difference would the coefficient of friction make to such a speed calculation?

I will attempt to use the power standpoint to calculate the robot velocity

Taken partly from here.
P = τ*ω and τ = τs(1 - ω/ωf)
P = τs(1 - ω/ωf)*ω

From this resource you gave me about rolling resistance.
Fr = cW
Fr is the Force of rolling friction and c is the coefficient of rolling friction.
τ = F
r and P = τω
P = c
Wrω

To find where these two curves meet we have to set them equal to each other and solve for ω.
τs(1 - ω/ωf)ω = cWrω
τs(1 - ω/ωf) = cWr
(1 - cWr/τs)ωf = ω
now we have angular velocity but we need to convert that to robot velocity. Again I am going to assume that the wheels do not slip because I don’t know how to calculate how much they slip
v = 2πr
ω
v = 2πrωf(1 - Wcr/τs)

This should be our formula to find robot velocity. However this looks very similar to my first equation. Here is a comparison of the two.
v = 2πrωf(1 - Wcr/τs)
v = 2πrωf(1 - W**μr/τs)
Both of these approaches have pretty much led me to the same answer. The only difference between the two is the part the I underlined. One formula uses the coefficient of kinetic friction and the other uses the coefficient of rolling friction. I don’t know that much about rolling resistance but these appear to be measuring the same thing.

Since I am only interested in the robot’s top speed and not its acceleration wheel slip does not happen much. Most of the wheel slip comes from a robot’s change in momentum, but if the robot is constantly at the top speed the momentum will stay constant.

I agree. I think that as long as μ is above a critical value and the robot is not undergoing a significant change in momentum the wheel slip will be negligible.**

The most revealing thing about your formula, v = 2πrωf(1 - Wμr/τs), is that the robot reaches maximum speed when μ is equal to zero. That would happen only if the robot were on a sheet of buttered glass resting on the slope of a very steep, very warm mountain. Have a look at this to read the differences between static friction and kinetic friction and “rolling friction”: http://hyperphysics.phy-astr.gsu.edu/hbase/frict2.html

As the wikipedia article points out, calling rolling resistance a “friction” is a misnomer. Rolling resistance is actually a measurement of a multitude of factors lumped together, factors such as surface roughness, tackiness, deformability, etc.

To illustrate the concepts: consider the extreme case of a pinion setting atop a surface with the texture of a matching rack (of the famous duo, rack and pinion). If allowed to roll, the pinion’s coefficient of rolling resistance would be relatively low. But if not allowed to roll, the pinion’s coefficient of friction against the rack would be very high.

It’s hard for me to imagine that the coefficient of rolling resistance and the coefficient of kinetic friction would necessarily be very close to each other.

I see what you mean now. This quote from the above link helped me understand this concept, “Assuming that a wheel is rolling without slipping, the surface friction does no work against the motion of the wheel and no energy is lost at that point.” Similar to your rack and pinion example I now understand that the robot really is not being affected by kinetic friction (like the pinion dragging across the rack) and is really being affected by rolling friction (like the pinion rolling across the rack).

However, does this mean the the other equation (v = 2πrωf(1 - Wcr/τs)) is accurate (again assuming no wheel slip)? Unfortunately, I can not find any numbers for a realistic coefficient of rolling friction, but should not be too hard to calculate.

That’s a very good question. Personally, I would not feel confident in answering that unless I had started from the very beginning, checked all the assumptions, and cranked through the math myself. Which I really don’t have time or sanity left to do in the foreseeable future. However, your question does make an excellent challenge for matching theory to practice. The part I love about doing an analysis of this sort is that you end up with a set of variables and sometimes the resulting equation reveals unexpected relationships between the variables that would not otherwise have been obvious. Sometimes those unexpected relationships allow you to capitalize on some aspect of your system that you might otherwise never pay attention to. The important thing to remember about any final result is to perform a “sanity check” on the resulting formula - check to see what happens when certain variables go to zero or when they approach infinity, etc. If absurd things happen in the formula when you know they can’t happen in reality with those values, then you can be fairly certain something isn’t right.

Keep us posted as you make progress with this! Don’t forget to factor in the energy lost in deforming the foam playing field. Ok, so here is my “sanity check”

Once again here is the equation and variables: v = 2πrωf(1 - Wc*r/τs)
v = robot velocity
ωf = angular free motor velocity
W = robot weight
c = coefficient of rolling friction
τs = motor stall torque

Testing ωf for critical values:
as ωf approaches 0 velocity would approach 0 (Makes sense, if max motor speed is 0 the robot won’t move anywhere)
as ωf approaches ∞ velocity would approach ∞ (Makes sense, if motors are turning infinitely fast the robot will go infinitely fast)

Testing W for critical values:
as W approaches 0 velocity would approach 2πr*ωf (If the robot is weightless it wouldn’t have traction on the ground, but I assumed that the there would be no slip of the wheels so this is fine for normal situations)
as W approaches ∞ velocity would approach -∞ (Negative velocity would actually mean that the robot is not moving, I think this is ok)

Testing c for critical values:
as c approaches 0 velocity would approach 2πr*ωf (Makes sense, as rolling resistance is 0 it should be able to go at free speed)
as c approaches ∞ velocity would approach -∞ (Negative velocity would actually mean that the robot is not moving, I think this is ok)

Testing r for critical values:
as r approaches 0 velocity would approach 0 (Makes sense, 0 radius wheels can’t move the robot)
as r approaches ∞ velocity would approach -∞ (This is a bit weird but I think it comes from the fact the bigger wheels need more torque to turn and in this case the wheels wouldn’t move)

Testing τs for critical values:
as τs approaches 0 velocity would approach -∞ (Makes sense, Negative velocity means stationary robot)
as τs approaches ∞ velocity would approach 2πr*ωf (Makes sense, with infinite torque the motors don’t care about the robot)

Other notable cases:
Wcr/τs = (torque required to move robot)/(stall torque)
as Wcr/τs approaches 1 velocity would approach 0 (Makes sense, when the torque required = stall torque, the robot will stall)
if Wcr/τs is greater than 1 velocity would be less than 0 (This is the cause of the weird negative speeds, the problem comes from when there is more torque required than the stall torque. This is ok if we assume negative velocities mean the robot doesn’t move)

For what I can tell the only weird thing about these test cases are when the velocity is negative. As stated above this happens when the torque required to move robot exceeds the stall torque. In this circumstance the robot would not move. As long as we assume that negative velocities mean the robot doesn’t move, then the formula will work.

As far as I can reason, the formula is correct given the following assumptions.
Assumptions:
The wheel slip is negligible and is taken in account for this formula.
Negative numbers mean that the robot does not move.
The only force in the x direction of reasonable magnitude is the applied force and rolling resistance (drag and other forces are negligible).

EDIT:
As posted later, I missed an assumption that is the cause for the negative numbers and would therefore replace the second assumption above. The assumption is as follows:
The formula only works when required torque (Wcr) is less than or equal to stall torque (τs).

Hmmm… That’s the sort of thing that would make me go back and check all of my presumptions. Have you done a google search to see if anyone has done a similar type of analysis, say, for electric vehicles or solar powered vehicles - the kind of studies done where efficiency and energy loss via tire compression, etc. are of utmost importance?

The only time I’ve ever seen nonsensical values become acceptable to the physics community is in computations involving quantum mechanics, where they deal with calculations involving totally abstract concepts like negative frequencies and probabilities that exceed 1.0, etc.

The problem of the negative numbers comes from this formula:
ω = ωf(1 - τ/τs)
where,
ω = angular motor velocity
ωf = angular free motor velocity
τ = motor torque
τs = motor stall torque

In my derivation I made another assumption that the motor would be able to output the torque needed to move the robot. Under this assumption I set the motor torque equal to the torque required for the robot to move. Most times this would be correct as the motor would be able to provide the required torque. However, in such a case where the motors are not powerful enough (required torque>stall torque), the motor torque will be incorrectly set to the required torque. This is why the formula is able to negative velocities. So, as far as I can tell, the formula is correct, but the assumptions need an amendment. The formula only works when required torque is less than or equal to stall torque.

I believe this is what rolling resistance is. So this was taken into account for the formula.

I somehow think the most sane option would be stopwatch and measuring tape. Perhaps if you figure everything out, you can figure out some simple formula or tool that normal mortals can understand without spending hours studying it and then easily use it.