More than one input

A ratio is a null space

Write a gear train as a graph — bodies for vertices, meshes for edges, and on every edge the body the two axes are stationary in — and one formula covers a countershaft gearbox, a planetary, a harmonic drive and a car's differential. The ratio is the null space of a matrix whose entries are tooth counts, so it comes out as a fraction and not as a number that is nearly one.

Assumes Two inputs and one output and What happens in a mesh.

The trouble with gear trains is that there appear to be two subjects. An ordinary train has fixed shaft centres and its ratio is the product of its stages, which anyone can do on the back of an envelope. An epicyclic has a planet carried round on an arm, and every textbook treats it separately, with Willis’s equation, or with the tabular method, or with a superposition argument, and with a warning about the signs — because planetary ratios are the most commonly misquoted numbers in the whole of mechanism design.

They are not two subjects. They are one relation with one extra label on it, and once the label is written down the same eight lines of arithmetic answer both — and answer a harmonic drive and a car’s differential while they are at it.

A simple planetary, as a graph. Members are vertices and meshes are edges. Each edge carries the two tooth counts and the body the two axes are stationary in — its carrier — and that third label is the whole of what makes an epicyclic different from an ordinary train. Write the mesh relation relative to the carrier and one formula covers both: an ordinary train is the case where every carrier is the frame. This train has 2 meshes across 5 members and 2 freedoms.
Fig. 1 A simple planetary as a graph. Vertices are rigid bodies and edges are meshes. Every edge carries the two tooth counts and — the load-bearing part — the body relative to which the two axes are stationary. For the sun and the planet that body is the carrier, not the frame, and that single label is the whole of what makes an epicyclic different.

The label

A mesh is a rolling contact between two pitch circles. Rolling is a statement about the relative motion of the two bodies, and it is only a clean statement in a frame where the two axes hold still. For an ordinary pair that frame is the frame; for a sun and a planet it is the carrier, because the carrier is what holds the two axes a fixed distance apart while the whole assembly goes round.

So every mesh names a third body, and the relation is

za(ωaωc)  +  σzb(ωbωc)  =  0,z_a\,(\omega_a - \omega_c) \;+\; \sigma\, z_b\,(\omega_b - \omega_c) \;=\; 0,

with σ=+1\sigma = +1 for an external mesh and σ=1\sigma = -1 for an internal one. Read it back: relative to the carrier, the two gears’ rotations are in inverse proportion to their tooth counts, with the sense reversing across an external mesh and not reversing when one gear runs inside the other.

An ordinary train is the case where ωc=0\omega_c = 0 for every mesh, and the relation collapses to zaωa=zbωbz_a\omega_a = \mp z_b \omega_b, which is what everybody’s envelope says. Nothing has been added for the epicyclic case except the word carrier.

One row per mesh

Collect the relations into a matrix, one row per mesh and one column per body, and add a row saying the frame is stationary. For the planetary above — sun 24, planet 24, ring 72 — that is three rows across five columns, and the entries are 24, 24, 72 and their negatives.

The constraint matrix of a simple planetary. One row per mesh, one column per member, and every entry a tooth count. That is the whole of the kinematics: what the train permits is the null space of this matrix, and its dimension — 2 here — is the mobility. Nothing in it depends on where anything has got to, which is the one respect in which this field is easier than the rest of the site: elsewhere a Jacobian is evaluated at a configuration and its rank can change as the mechanism moves. A gear train's cannot. The elimination is done in exact rationals, so the ratio that comes out is a fraction rather than a number near one.
Fig. 2 The same train as a matrix. Every entry is a tooth count with a sign; nothing in it depends on where any gear has got to. The permitted motions are the null space, and its dimension — two — is the mobility.

Two things about that matrix are worth pausing on, and both are unusual for this site.

It has no configuration in it. Every other constraint Jacobian on this site is evaluated at a pose: its entries are sines and cosines of the current angles, its rank can drop somewhere in the travel, and that drop is the whole of what a singularity is. A gear train’s constraint is linear in the speeds with constant coefficients. Its rank is a property of the train and not of the moment, so the mobility a gear train has at one position is the mobility it has everywhere.

It is integral. Every entry is a whole number of teeth, so elimination over the rationals keeps everything rational, and the ratio that falls out is a fraction. This is not a stylistic preference. It changes what questions can be asked: whether a ratio is exactly 12, whether two clutch combinations give the same gear, how many trains achieve a target — all of these are questions about equality, and equality of doubles is a different and much worse question than equality of fractions.

The library here therefore does its elimination in BigInt rationals. That sounds like overkill for a matrix of two-digit numbers, and it is not: the elimination multiplies entries together, and a six-member gearset with three-digit tooth counts is at fifteen significant digits after two pivots, which is where a double stops being able to tell 2176/20702176/2070 from a number very slightly different.

Mobility, and then a ratio

The null space of that matrix is the set of motions the train permits. Its dimension is the mobility: two for the planetary, two for the Simpson and Ravigneaux gearsets, two for the differential, one for an ordinary train, one for a compound epicyclic with a ring bolted to the case.

A ratio needs one more row. Hold a member — ωm=0\omega_m = 0 — or lock two together — ωaωb=0\omega_a - \omega_b = 0 — and the null space drops to one dimension. Then any vector in it is the motion, up to scale, and the ratio of two of its entries is the ratio of those two shafts.

For the 24/72 planetary with the ring held, that vector is

(ωframe, ωS, ωP, ωR, ωC)  =  (0, 1, 12, 0, 14),(\omega_{\text{frame}},\ \omega_S,\ \omega_P,\ \omega_R,\ \omega_C) \;=\; (0,\ 1,\ -\tfrac12,\ 0,\ \tfrac14),

exactly. Carrier at a quarter of the sun, so a reduction of 4, which is 1+72/241 + 72/24; and the planet at 12-\tfrac12, running backwards relative to the frame, which is a number nobody quotes and which the same computation hands over without being asked.

Two routes, and the one that knows nothing

The site’s standing rule is that a number is computed twice by routes that share no algebra. Here the two routes are unusually clean.

The null space knows nothing about gearing. It is told a list of rows and eliminates. It does not know which gear is a sun, which body is a carrier, or that the answer ought to look like 1+zR/zS1 + z_R/z_S. If the mesh relation were written with a sign error the elimination would happily return a wrong fraction, confidently.

Willis’s equation knows nothing about matrices. It is three lines about one epicyclic, printed in every reference for a century, and this site already used it in the gears field alongside the tabular superposition method.

assertTheGraphAgreesWithWillis runs the two against each other across thirty sun-and-ring combinations, in both the ring-held and carrier-held cases — the second being the one whose sign is misquoted — and requires the fractions to be identical, not close. They are. There is no tolerance in the check because there is nothing to put a tolerance on.

The harder check is the compound epicyclic, and it is harder for a reason worth naming: it is the only topology in this file where one planet shaft carries two gears meshing two different rings, one of which is bolted to the case. That is where a mesh could be attached to the wrong body without any figure looking wrong. The applied field published a closed form for that drive two phases ago — 1/(1z1z4/z2z3)1/(1 - z_1z_4/z_2z_3) — and the graph reproduces it to the last digit across four sets of tooth counts, returning 53/108853/1088 for the standard one, which inverts to the 2176/1062176/106 that essay quoted.

The constraint matrix of a Ravigneaux gearset. One row per mesh, one column per member, and every entry a tooth count. That is the whole of the kinematics: what the train permits is the null space of this matrix, and its dimension — 2 here — is the mobility. Nothing in it depends on where anything has got to, which is the one respect in which this field is easier than the rest of the site: elsewhere a Jacobian is evaluated at a configuration and its rank can change as the mechanism moves. A gear train's cannot. The elimination is done in exact rationals, so the ratio that comes out is a fraction rather than a number near one.
Fig. 3 The Ravigneaux gearset’s matrix: four meshes, six members, and still nothing in it but integers. Its null space is two-dimensional, and the four ratios its transmission is sold with are four different single rows added to this.

The sign that is not about the shape of the gears

Now the correction, because this file got one thing wrong in a way that is instructive and that no drawing would have caught.

The first version of the bevel differential was written as two external meshes: left gear against pinion, pinion against right gear, both carried by the cage. That is a true description of the hardware. It is also, in this algebra, wrong — and it is wrong in the worst possible way, which is that it produces a perfectly reasonable answer.

With two external meshes the two relations are

zL(ωLωc)+zP(ωPωc)=0,zP(ωPωc)+zR(ωRωc)=0,z_L(\omega_L - \omega_c) + z_P(\omega_P - \omega_c) = 0, \qquad z_P(\omega_P - \omega_c) + z_R(\omega_R - \omega_c) = 0,

and subtracting gives zL(ωLωc)=zR(ωRωc)z_L(\omega_L - \omega_c) = z_R(\omega_R - \omega_c), so for equal side gears ωL=ωR\omega_L = \omega_R. The model said a differential’s two wheels always turn together. It said, in other words, that a differential is a solid axle. Every figure would have drawn, the mobility would have come out at 2, and the mechanism would have been describing a part that does not exist.

The mistake is that σ\sigma is not a fact about whether the gears are external or internal. It is a fact about whether the two relative rotations have the same sense about a common axis direction. For a parallel external pair they are opposite, and for an internal pair the same, which is why the shorthand works for spur gears. A bevel differential’s two side gears are coaxial and face each other, so their axes are oppositely oriented, and the pinion between them is an idler: whatever it does to one it undoes to the other, so it drops out of the relation entirely and what remains is one row,

zL(ωLωc)+zR(ωRωc)=0,z_L(\omega_L - \omega_c) + z_R(\omega_R - \omega_c) = 0,

which for equal side gears says the cage turns at the mean. The pinion does not appear because it constrains nothing; its own spin is a derived quantity, computed for the drawing and used nowhere else.

A bevel differential, turning. cage in, hold left, with every member's speed taken from the train's null space and every angular position that speed integrated. The teeth are marked at the pitch points rather than cut as involutes — the flank is the teeth field's subject — but the count is the tooth count and the positions are the solved ones, so what turns and how fast is real. Drag it and watch which way each member goes: left 0.000 · right 2.000 · cage 1.000.
Fig. 4 The differential with its pinion drawn and its relation not containing it. The pinion’s spin is worked out afterwards so that the picture turns correctly; the kinematics is one equation in two wheel speeds and the cage.

Two things follow that are worth carrying beyond this file. First, a model that returns a plausible number is not thereby a model of the right thing — the failure here was not a wrong digit, it was a mechanism turned into a different mechanism, and the only reason it was caught is that the answer was one everybody knows by heart. Second, the check that now guards it does not merely assert the doubling; it also asserts that a differential with unequal side gears does not give the plain mean, so the test can tell the difference between a right answer and a right answer for the wrong reason.

Four mechanisms, one call

The claim that this is one relation rather than several is worth testing on mechanisms that do not look alike, and the library’s list is deliberately varied.

An ordinary train — 20 : 40 and 15 : 60 on three shafts — has every mesh carried by the frame. Its matrix has mobility 1 and its ratio is 1/8, positive because two external meshes reverse the sense twice.

A harmonic drive is one internal mesh between a flexspline of 200 teeth and a circular spline of 202, carried by the wave generator. That is a single row, and holding the circular spline gives −1/100.

A differential is one row too, and the shape of that row is the subject of the correction two sections below.

A Ravigneaux gearset is four rows across six members, one of the meshes being planet-on-planet with both axes carried by the same carrier, which is the case that makes it a gearset rather than two gearsets side by side.

An ordinary train, as a graph. Members are vertices and meshes are edges. Each edge carries the two tooth counts and the body the two axes are stationary in — its carrier — and that third label is the whole of what makes an epicyclic different from an ordinary train. Write the mesh relation relative to the carrier and one formula covers both: an ordinary train is the case where every carrier is the frame. This train has 2 meshes across 4 members and 1 freedom.
Fig. 5 An ordinary two-stage train in the same notation. Every edge names the frame as its carrier, which is the whole of the difference from an epicyclic — and the reason this train has one degree of freedom while the planetary has two is that with the carrier fixed to the frame there is one member fewer to move.
The constraint matrix of a Simpson gearset. One row per mesh, one column per member, and every entry a tooth count. That is the whole of the kinematics: what the train permits is the null space of this matrix, and its dimension — 2 here — is the mobility. Nothing in it depends on where anything has got to, which is the one respect in which this field is easier than the rest of the site: elsewhere a Jacobian is evaluated at a configuration and its rank can change as the mechanism moves. A gear train's cannot. The elimination is done in exact rationals, so the ratio that comes out is a fraction rather than a number near one.
Fig. 6 The Simpson gearset’s matrix: four meshes across six members. The two rows that share a member are the two planetaries sharing a sun, and the column with entries in all four rows is that sun. Nothing about the layout of the gearbox is in the matrix; the connection is entirely in which columns the rows touch.

Where the signs actually come from

One dividend of doing it this way is that the sign rules stop being rules.

Ask for the ordinary train 20 : 40 : 15 : 60 — two stages, two external meshes — and the null space returns 1/81/8, positive. Ask for a single external pair and it returns a negative number. Ask for the planetary with the carrier held and it returns 3-3. Nobody has told the elimination that “each external mesh reverses the direction” or that “an idler does not change the ratio”; those are consequences of the σ\sigma in each row and of what the elimination does with them, and they come out whether or not the person calling it remembers them.

The same is true of the rule that the number of external meshes decides the direction. It is a parity statement, and parity statements are exactly what an elimination over a product of signed rows produces. The rule is real and this is where it is from.

A bevel differential, as a graph. Members are vertices and meshes are edges. Each edge carries the two tooth counts and the body the two axes are stationary in — its carrier — and that third label is the whole of what makes an epicyclic different from an ordinary train. Write the mesh relation relative to the carrier and one formula covers both: an ordinary train is the case where every carrier is the frame. This train has 1 meshes across 4 members and 2 freedoms.
Fig. 7 A differential in the same notation, and the smallest graph in the field: two vertices, one edge, one carrier. The pinion is not a vertex at all, for the reason the next section works out.
What a Ravigneaux gearset can be made to do. Every distinct ratio the gearset offers, as a reduction. Each one is the same mechanism with one more constraint imposed — a brake holding a member to the case or a clutch locking two members together — and the input is a choice as well, which is why a four-speed needs an input clutch rather than four brakes. The shaded rows are the 5 a real transmission on this gearset is sold with; the rest are ratios the mechanism has and the gearbox does not buy the elements to reach. Every value is exact: the reductions are ratios of integers and are printed as such.
Fig. 8 What the elimination is for. Seven exact fractions out of a four-row matrix, every one of them a ratio a real gearbox either sells or leaves on the table — and every comparison that decided they were seven rather than twenty-seven was a comparison of integers.

What the graph does not know

Three limitations, since the machinery is general enough to be trusted too far.

It says nothing about whether the train can be built. The matrix is happy with a sun of 25 in a ring of 73 and a planet of 24, and returns a ratio for it. That gearset cannot be assembled with three equally spaced planets, for reasons that are pure arithmetic and are the subject of the gearset that could not be assembled. Kinematics and manufacturability are different questions and this machinery only answers one.

It says nothing about tooth geometry. Whether the flanks are conjugate, whether the pinion is undercut, what the contact ratio is — all of that is the teeth field’s, and the relation used here assumes only that the mesh delivers a constant velocity ratio, which is precisely what an involute flank is for. The chain drive in the applied field is the standing counter-example: its ratio is not constant within a tooth, so a single row cannot describe it and the graph would be lying if it tried.

It says nothing about which permitted motion happens. That is the boundary the whole field keeps, and it will be restated as often as it is needed.

The rank, and what it says when it surprises

One more quantity falls out of the elimination and is worth reading rather than skipping: the rank.

For the simple planetary, three rows — two meshes and the ground — reduce to rank 3 across five members, leaving mobility 2. For the Ravigneaux, five rows across six members give rank 5 and mobility 2 again, so the four meshes are independent. For the compound epicyclic the rank comes out at 4 across five members and the mobility is 1, which is the arithmetic statement of the fact that a ring bolted to the case is one of the constraints.

This is the one place on this site where a rank does not surprise anybody, and the contrast is worth drawing. The spatial field is largely a record of counts being wrong: Kutzbach’s formula declares a universal joint, a Sarrus linkage and a Bennett loop immobile, and the rank of the constraint Jacobian says otherwise in each case. The formula is wrong there because it assumes the constraints are independent and they are not — the geometry has coincidences in it.

A gear train has no such coincidences available. Its constraint rows are built from tooth counts, and two rows are dependent only when the tooth counts make them so, which is a much rarer accident than two axes happening to be parallel. So the count and the rank agree, and they agree at every position, and this is the one field where mobility is a genuinely easy question.

Which trains turn as a block. Give every member the same speed and ask each mesh whether it is satisfied. A train whose frame carries no teeth says yes — nothing is straining, because every mesh relation is about differences of speeds — and that one motion is what makes the lever diagram exact. A train with a gear on the frame says no, and has no lever at all. The bar is the largest mesh residual, in teeth per unit of speed; the first four are exactly zero and the last two are not near it.
Fig. 9 Which trains admit the motion where everything turns together — the one dependency that is generic here. It is not a numerical accident: it is the statement that a mesh relation is about differences of speeds, and it is what gives a gearset its second degree of freedom in the first place.

What the exactness is for

It would be possible to do all of this in floating point and be right to fourteen digits everywhere. Three results later in the field would then be unavailable, and it is worth naming them now.

  • Counting trains. Two shafts that must be in line enumerates reverted trains, which are the ones whose input and output shafts are coincident, and the question is how many sets of four integers give a target ratio and one shared centre distance. “How many” requires deciding equality twenty-four million times, and every one of those decisions has to be exact or the count is a fact about the tolerance.
  • Distinct ratios. The enumeration of a gearset’s brakes and clutches asks whether two combinations give the same gear. For the Ravigneaux twenty-seven combinations collapse to seven distinct ratios, and the collapse is by exact comparison of fractions.
  • Whether a ladder is geometric. The steps are not free measures how far a gearbox’s ratios are from a geometric progression. The departures are per cent, not parts per million, so exactness is not needed to see them — but knowing that the ratios carry no error at all is what makes the departure a fact about the design instead of a fact about the arithmetic.

The next essay takes the same null space and reads something off it that looks like a drawing aid and is not: the lever diagram, which is exact, and which exists exactly when the frame carries no teeth.

The graph formulation is worth one more sentence about what it buys, because one formula covers four mechanisms undersells it. What the null space gives is a ratio and its exactness at the same time. The matrix entries are tooth counts, which are integers, so the null space can be computed over the rationals and the answer is an exact fraction rather than a floating-point number that looks like one. That is why the site can state a compound epicyclic’s reduction as 2176/106 rather than as 20.528301886, and why comparing two ratios for equality is a comparison of integers rather than a tolerance. A formulation that carried the same information in radians per radian would have lost that the moment anything was divided. The graph’s arithmetic stays in the integers because the mechanism’s does, and every claim of exactness in the transmission field rests on the two matching.

What this makes readable

Essays that name this one as a prerequisite.

About the same objects

Not linked from either essay — found by the objects both name.

What links here

The 8 of 9 essays linking to this one that name the most of the same objects.

The objects this essay names

Each one links to every other essay that touches it.

CarrierEpicyclicExact arithmeticMeshMobilityNull spaceRankTransmission relationTwo-degree of freedomVelocity ratioWillis equation