Machine Kinematics

About

What this site is, why every mechanism here is solved before it is drawn, and the difference between kinematics and everything else a machine has to survive.

This is a growing collection of illustrated essays about mechanism kinematics — linkages, gears and cams, and since then arms, wheels, belts, folded sheets and the assemblies built from many copies of one unit. Each takes a single idea and draws it until the argument is visible — and every position in every figure is the output of a solve rather than a placement.

Nothing here is drawn

A mechanism diagram is normally made by placing the links where they look right. That method is sound when the illustrator is careful, and it has a failure mode with no symptoms: a linkage can be drawn in a configuration it cannot physically reach, and nothing about the picture says so. Animated mechanism diagrams pass through such configurations routinely, because the usual way to animate one is to interpolate the output smoothly between its extremes — which is not what the mechanism does.

Sketch a four-bar that way and the coupler has to change length by about 12% as the crank goes round. Every individual frame is a perfectly plausible picture of a linkage.

So on this site a mechanism is a set of joints and a set of constraints between them, and a configuration is found by driving the constraint residual to zero with Newton–Raphson against an analytic Jacobian. Converged residuals sit at the 10⁻¹⁶ level, against a tolerance of 10⁻⁹, and a linkage that cannot close reaches 3.6 — so the check has nine orders of margin on one side and seven on the other, both measured rather than asserted. If a solve does not converge, the configuration does not exist and the figure fails to build.

The Jacobian is not only a solver detail

Three things fall out of solving rather than placing, and together they are most of what distinguishes this site from an illustrated one.

Mobility gets a second, independent route. Grübler's criterion counts links and joints and knows nothing about the dimensions. The rank of the constraint Jacobian measures the dimensions and knows nothing about the topology. They agree for almost every mechanism, and where they disagree the formula is the one that is wrong — a parallelogram with a redundant third bar is declared a structure with zero degrees of freedom, and it moves. Mechanisms of exactly that kind carry drafting machines, anglepoise lamps and locomotive coupling rods.

Velocities come free, and are checkable. Differentiating the constraints gives a linear system with the same Jacobian, so a full velocity field costs one back-substitution. It can then be checked against a finite difference of two nearby positions, which is a genuinely independent route — and it is the check that catches a sign error, because a sign error still converges and still draws a plausible mechanism. It caught one here, reporting a relative error of exactly 2, which is the signature of a reversal rather than an inaccuracy.

A singularity is visible rather than inferred. Dead centres, toggles and branch points are exactly where the Jacobian loses rank. They are not edge cases on this site; they are where mechanical advantage goes to infinity and where machines jam, and those turn out to be different configurations.

Two routes wherever there are two

The habit is applied everywhere it fits, because agreement between two independent calculations is the only evidence either one is right:

The assertions have to reject, and the gate proves it

Assertions that accept everything would pass every other check while making the whole premise void. So a site-local gate breaks things deliberately and requires the machinery to notice: a linkage whose links cannot close must fail to solve, a triangulated frame must measure zero degrees of freedom, a tooth flank built from circular arcs must fail the involute test, and a cam programme whose rises do not cancel its returns must be refused.

That last one was not a hypothetical. The first version of the cam library had no such check and its test programmes were rise-plus-dwell, which describes a follower that teleports once per revolution. Four assertions failed at once and all four were reporting the same artefact — the step at the seam rather than anything about the motion law.

Turning the crank is the argument

A mechanism is not a state. It is a relation between an input and an output, and the thing being explained is how one becomes the other. So the figures that have an input are draggable, and this is not decoration: moving the crank is the explanation.

Every frame on a slider is produced at build time by the same generator that drew the static figure, evaluated at that input angle. So every assertion the generator makes — loop closure above all — has already been checked at every position the reader can reach, and a configuration the mechanism cannot assemble cannot appear. The static figure carries the whole argument on its own, for a reader with JavaScript off, for a printer and for a crawler.

Where the models stop

This is kinematics, not dynamics. Positions, velocities, accelerations and the geometry of force transmission are all here. Mass, inertia, friction, backlash, clearance, elasticity and wear are not. A transmission angle says how much of an applied force turns into useful output torque; it does not say whether the pin will survive. No figure on this site is a strength calculation and no essay treats one as such.

Most of it is planar, and the exceptions say so. The spatial field closes loops out of the plane — the universal joint, the Sarrus linkage, Bennett's four-bar — by Newton–Raphson on the logarithm of a closure transform, and the arm field composes postures from joint screws. Both count mobility differently from the planar case, and where the counts disagree the essays say which one the mechanism obeys. Everything outside those two fields is in the plane.

An ideal joint is the default, and there is a field about what that costs. A pin is a point and a slide is a line unless an essay says otherwise. The as-built field is the exception: it gives every length a range and every pin a hole, and measures the output band, the lost motion and the backlash that follow — including the mechanisms that stop assembling altogether.

A member is rigid unless it is a strand. A link holds two points at a distance, in both directions, and that assumption is in every mobility count and every closure equation here. A belt, a rope, a chain and a tendon do neither: their path is decided by the bodies they touch and their constraint is an inequality that does nothing until it is taut. They have a field of their own, and nothing in it is a statement about tension.

A mobility is measured rather than counted, and on a large assembly the two are far apart. Grübler's arithmetic is right about the difference between an assembly's freedoms and the number of its constraints that repeat one another, and is read here as a claim about neither until a rank says which is which. The network field is where that matters: a deployable ring the count calls a structure has one deployment and four repeated constraints, and a folded sheet of a hundred and forty-four panels is counted at minus ninety-nine and has one freedom.

A network is not analysed one loop at a time. Everywhere else here a configuration is found by writing a mechanism's closure equations and solving them. An assembly of many copies of one unit has loops that share their unknowns, so there is no order in which they can be solved separately, and the whole of the field is one routine: assemble the constraint Jacobian, take its rank, and read both null spaces off it. Nothing in it is a force, and the second null space — which an engineer would read as a state of self-stress — is used here only as a count of constraints that repeat.

A constraint is an equation unless the surfaces can separate. A pin holds two points together, a bar holds two apart, a mesh holds a ratio, and every mobility count on this site is arithmetic on constraints of that kind. Two rigid bodies resting against each other are not one: the contact says only that they may not come closer, so what a part may do is a cone of velocities rather than a subspace, a freedom stops being two-sided, and whether the part can move at all stops being the rank of a matrix. The counts change with it — six independent constraints fix a body in space and six contacts fix nothing, because six vectors can span six dimensions and can never positively span them.

Nothing in that field is a force either. Whether a set of contacts leaves a part any motion is decided by where the origin sits inside the convex hull of one row per contact, and every number in it survives with every force in the assembly unknown: no friction, no preload, no stiffness and no material. The dual statement — that such a set can resist any load — is the same fact read through forces and belongs to statics rather than here. Every contact is frictionless, which is a restriction rather than an approximation: a frictionless hold is a hold under any friction, so what is computed is a lower bound on what a real fixture does.

A mechanism's connections are a separate object from its dimensions, and one field is about only the first. Strip every length, angle and position from a linkage and what remains is a graph: a vertex for each link, an edge for each joint. Almost every claim in the subject is decided there — whether the thing is a mechanism at all, how many different machines it gives when different links are held still, whether its position problem has a closed form, how many ways it can be assembled, how many independent loops a tolerance analysis must satisfy. Every quantity of that kind survives multiplying each link by a different scale factor, because there is nothing to scale; and everything a designer usually asks about — reach, transmission angle, whether the crank turns fully, what the coupler traces — is decided by the dimensions and is invisible to it.

The mobility count fails in two directions and only one of them was known here. Grübler's rule can be too small, when link lengths are special and a mechanism moves although the arithmetic says it cannot; a Jacobian rank catches that immediately, which is why this site computes both. It can also be too large, at ordinary dimensions, when some subset of the links is already a structure — and neither route sees that, because a rigid triangle removes exactly the freedoms the count says it does. Establishing it takes a third instrument, a mobility counted over every subset of the links rather than over the whole, and at ten links it separates 230 mechanisms from 1,878 graphs that satisfy every other test.

What a joint permits is a group, and the count is its dimension. A revolute, a prismatic and a helical pair each take one freedom's worth away from nothing and leave one, and every mobility count on this site reports the same number for all three. What they actually permit is three different sets of displacements, each closed under composition, and the difference decides what a chain of them produces and whether a loop of them can move. The sets come out of the surfaces: a lower pair is two bodies touching over a surface, so what it permits is that surface's own symmetry group, computed here from the surface's normals rather than looked up. Eleven surfaces give six groups, which is where the six lower pairs in every textbook come from.

An overconstrained mechanism moves for one of two reasons, and now both have names. A planar four-bar and Bennett's linkage report the same count, the same rank and the same redundancy. Take the displacements each of them actually reaches, take their logarithms, and close them under the Lie bracket: the planar one gives three dimensions and the classification names them planar motion, Sarrus's linkage gives one and the name is a translation, and Bennett's gives six — its motion is inside no proper group at all. That is what the word paradoxical has meant here for several fields, stated as an integer for the first time.

A demand can be an equation rather than a list of positions, and then the mechanism is compiled rather than searched for. Every other field here is handed its specification geometrically — three positions, a sampled path, a ratio at each angle — and hands back a linkage that is right where it was asked and approximately right in between. Give the demand as a polynomial instead and the arithmetic changes character: a polynomial in the coordinates of a two-link arm's tip is a finite sum of cosines of whole-number combinations of the arm's two angles, each cosine is a link a handful of bars holds at the right angle, and the sum being zero is the linkage closing. The traced point then satisfies the polynomial everywhere the machine moves, and what is paid is size — five bars for a straight line, four hundred and thirteen for a general quintic, three quarters of the largest machine spent carrying angles from where they were computed to where they are used.

A mechanism whose output is a computation hides its own failures. Bar lengths do not determine an assembly: a parallelogram's four bars also close crossed, so a machine built from many of them has an assembly for each. Sixteen assemblies of one twenty-bar compiled linkage, eight of which close — four put the tracing point on its curve and four put it somewhere else, all of them satisfying every bar to 10−14. Nothing on this site could have found that, because every check here asks whether a loop closes and these loops close perfectly. What finds it is a measurement from outside the constraint set: the polynomial, evaluated at a point the mechanism reached without knowing the polynomial exists.

A link is a distance between two points, and a distance cannot collide with anything. For twenty-three fields that was the right model and it was free: a mobility count, a coupler curve, a transmission angle and a tolerance band are all indifferent to how fat a bar is. Give every link a body and a question arrives that none of the constraint equations can ask — an inequality between pairs of parts rather than an equation in the loop, not local, not smooth, and not in the plane the mechanism is drawn in. Not one of the nine machines measured here fits in a single plane, and the four-bars need three: their material overlaps somewhere on the turn while the drawing is perfectly correct about the motion.

Turning all the way round and being made of something pull against each other. Grashof's inequality decides which four-bars have a crank that turns fully, and it turns out to decide a second question with the opposite sign: every fully rotating four-bar measured here sweeps a link straight over one of its own ground pivots, so its closest approach is exactly zero and no bearing pedestal of any size fits there. Not one of the rockers does, and they admit links a fifth of their shortest member wide. That is why a crank is hung on a stub shaft with a bearing on one side — a decision about the third dimension, forced by a condition about four lengths.

Every dimension here is a demand, and a machine that exists has measurements instead. Twenty-five fields take the numbers on a drawing as given: chosen by a designer, cut by a machinist, and thereafter known. Run the same kinematics with the parameters as the unknowns and the motion as the data and a question appears that neither of the other two directions can ask — not what the lengths are, but which of them a measurement can recover at all. It has exact answers. A four-bar's output angle depends only on the ratios of its lengths, so the vector of those lengths is annihilated by every row of its own identification Jacobian, to 7.6 × 10⁻¹⁵ — and a protractor therefore recovers three parameters and never four, however long it measures. What it does recover is the shape, which is most of what anybody wanted: the Grashof class, the transmission angle through the turn, the velocity ratio, the coupler curve up to similarity. The size needs one reading with a length in it.

Which turns a question about instruments into a question about units. An angle reading is dimensionless in the lengths and a position reading is not, so what a measurement can determine is decided by what kind of number the instrument produces rather than by how good it is. Running that question over the site's own quantities sorts them: a transmission angle, a velocity ratio and a Grashof class are unchanged by making the machine bigger and are recoverable from angles; a clearance, a swept area and a path curvature are not. A tolerance band computed from a fixed ±0.01 turns out to be a size rather than a shape, which is why one direction of a four-bar's tolerance box does nothing at all — an all-aluminium machine heated by a hundred kelvin has a kinematic error of zero, and one with a steel frame has 0.076°.

A length on a drawing is derived from the holes it is made from. Nobody makes a distance; a machinist positions a spindle twice and the distance is what the two errors leave behind. If both holes are bored in one setup the common part of the error cancels out of the distance and only the independent part survives, so a tolerance analysis on the four lengths is optimistic by exactly √2 when the holes are located independently and pessimistic without limit when they are not. The two analyses agree at one value of a number that is a fact about a factory, and it is the first quantity on this site that is measured somewhere else and stated rather than computed here.

The proportions are conventions. A gear's addendum is one module and its dedendum 1.25, because that is the standard; a cam's design limits — 30° pressure angle, 40° transmission angle — are rules of thumb with reasons rather than theorems. Where a number is a convention this site says so, because every result downstream depends on it.

On being wrong

Corrections are welcome and will be made. A mechanism drawn in an impossible configuration looks exactly like one drawn in a possible configuration, which is the entire argument for computing the configuration.