# The gearbox problem

At afternoon tea yesterday we were discussing a problem regarding racing slot-cars (electric toy racing cars).  A very practical problem indeed! Basically, what we want to know is how do we optimize the size of the electric motor and gear-ratio (it only has one gear) in order to achieve the best time over a given distance from a stationary start?

There's lots of issues that come in here. First, let's think about the motors. A more powerful motor gives us more torque (and more force for a given gear ratio), but comes with the cost of more mass. That means more inertia and more friction. But given that the motor is not the total weight of the car, it is logical to think that stuffing in the most powerful motor we can will do the trick.

Electric motors have an interesting torque against rotation-rate characteristic. They provide maximum torque at zero rotation rate (zero rpm), completely unlike petrol engines. Electric motors give the best acceleration from a standing start – petrol engines need a few thousand rpm to give their best torque. As their rotation rate increases, the torque decreases, roughly linearly, until there reaches a point where they can provide no more torque. For a given gear ratio, the car therefore has a maximum speed – it's impossible to accelerate the car (on a flat surface) beyond this point.

Now, the gear ratio. A low gear leads to a high torque at the wheels, and therefore a high force on the car and high acceleration. That sounds great, but remember that a low gear ratio means that the engine rotates faster for a given speed of the car. Since the engine has a maximum rotation rate (where torque goes to zero) that means in a low gear the car has good acceleration from a stationary start, but a lower top-speed. Will that win the race? That depends on how long the race is. It's clear (pretty much) that, to win the race over a straight, flat track, one needs the most powerful engine and a low gear (best acceleration, for a short race) or a high gear (best maximum velocity, for a long race). The length of the race matters for choosing the best gear. Think about racing a bicycle. If the race is a short distance (e.g. a BMX track), you want a good acceleration – if it's a long race (a pursuit race at a velodrome), you want to get up to a high speed and hence a huge gear.

One can throw some equations together, make some assumptions, and analyze this mathematically. It turns out to be quite interesting and not entirely straightforward. We get a second-order differential equation in time with a solution that's quite a complicated function of the gear-ratio. If we maximize to find the 'best' gear, it turns out (from my simple analysis, anyway) that the best gear ratio grows as the square-root of the time of the race. For tiny race times, you want a tiny gear (=massive acceleration), for long race times a high gear.   If one quadruples the time of the race, the optimum gear doubles. Quite interesting, and I'd say not at all obvious.

The next step is to relax some of the assumptions (like zero air resistance, and a flat surface) and see how that changes things.

What it means in practice is that when you're designing your car to beat the opposition, you need to think about the time-scales for the track you're racing on. Different tracks will have different optimum gears.