What can move

Counting and measuring mobility

Grübler's criterion counts links and joints and never asks how long anything is. The rank of the constraint Jacobian measures the lengths and never asks what a joint is. Two calculations with no inputs in common, producing one number — which is the only arrangement under which agreement is evidence.

There are two ways to find out how many degrees of freedom a mechanism has, and the interesting thing about them is how little they have in common.

One counts links and joints. It works on a sketch, needs no dimensions, and gives the same answer for every four-bar ever built regardless of the four lengths.

The other takes the constraint equations, differentiates them, and measures the rank of the resulting matrix. It needs every dimension, knows nothing about what a link is, and would give a different answer for a four-bar whose lengths happened to be degenerate.

Neither can be derived from the other, which is exactly why both are computed here.

Mobility, counted and measuredGrü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 four of these five. The parallelogram with a redundant third bar is the exception: the formula declares it a structure with zero degrees of freedom, and it moves. The formula is the one that is wrong, because it cannot see that the third bar's constraint equations are already implied by the other two.GrüblerJacobiantriangulated frame00agreefour-bar11agreeslider-crank11agreePeaucellier cell11agreeparallelogram + third bar01they disagree — the mechanism moves3(n−1) − 2j₁ − j₂ · free coordinates − rank(J)one row where the formula loses
Fig. 1 Five mechanisms put through both routes. The triangulated frame, the four-bar, the slider-crank and Peaucellier’s cell all agree. The parallelogram with a redundant third bar does not — Grübler makes it a structure and the Jacobian makes it a mechanism — and it moves, which settles it.

The counting route

Grübler’s criterion is M=3(n1)2j1j2M = 3(n-1) - 2j_1 - j_2: three freedoms per link, less three for bolting one to the frame, less two for every joint that permits one relative motion and one for every joint that permits two.

Its virtue is that it is a statement about topology. Change every length in a four-bar and the answer stays 1. That makes it the right tool at the point in a design where the dimensions do not exist yet, and it is why mechanism synthesis begins with it.

Its inputs, however, are not facts. They are modelling decisions, and the formula is silent about which decision is right.

How many links is a rigid coupler carrying three pins? One. Written as two distance constraints between three points it looks like two bars pinned together, and gives a different count. Both descriptions produce the same motion.

How many joints is a pin where three links meet? Two, not one. Three links pinned coaxially can rotate independently of each other, and the rule is that a joint connecting k links counts as k − 1. Missing this is the commonest arithmetic error in the subject.

What kind of joint is a roller in a slot? One-freedom if it rolls without slipping, two-freedom if it can also slide. The drawing is identical.

Because of all that, the topology on this site is declared by each mechanism rather than inferred from its constraint list. An earlier version inferred it, and gave a slider-crank −2 degrees of freedom — a number no mechanism has, produced by counting a slider block as no link at all.

The measuring route

The solve that positions a mechanism writes every constraint as an expression that must equal zero, and forms the matrix of partial derivatives of those expressions with respect to the free coordinates. That is the constraint Jacobian, and it is needed for Newton–Raphson whether or not anyone is interested in mobility.

Its rank is the number of linearly independent constraints — how many freedoms are genuinely removed, as opposed to how many equations were written. Mobility is then the number of free coordinates minus the rank.

For the four-bar: four free coordinates, three independent constraints once the input is replaced by the link it stands for, so mobility 1. The number came out of arithmetic on a matrix of derivatives, with nothing anywhere in the calculation that knows what a bar is.

The independence is the point. There is no path by which an error in the topology count could propagate into the rank measurement, or the reverse.

Where the two must be made to line up

One subtlety needs stating, because getting it wrong makes the comparison meaningless in a way that looks like a discovery.

The driving input is a constraint too — it pins the crank pin to a particular angle — so a mechanism with its input applied has mobility 0 by construction. To compare against Grübler, which describes the mechanism without its input, the driving constraint has to be removed.

Removing it is not the same as deleting it. A crank constraint fixes a joint’s position, which encodes the input angle and the link; deleting it removes the link as well. That gave a four-bar two degrees of freedom instead of one, and the disagreement looked exactly like Grübler being wrong when it was the measurement that was. The fix is to substitute the bar the crank stands for.

That kind of error is the reason to be suspicious of a disagreement before celebrating it.

Rank is a decision about zero

In exact arithmetic, rank is the number of nonzero pivots after elimination. In floating point nothing is exactly zero, so rank needs a threshold, and a threshold is a choice.

This site uses a relative one — scaled by the largest entry — and reports how close the decision was. The gap is the ratio between the smallest accepted pivot and the largest rejected one. A gap in the millions means the rank is unambiguous. A gap near one means the matrix is nearly singular and the answer depends on where the line was drawn.

The second case is not a numerical embarrassment to be tuned away. It is what a mechanism looks like at a singular configuration, and reporting the gap is how a figure can say whether it was near one rather than pretending the question does not arise.

The angles this crank cannot reachA non-Grashof four-bar — non-Grashof (triple rocker) — asked for all 360 input angles. It assembled at 273 of them. The dial on the left marks the reachable arcs in green and the refused ones in red; the refusals are not a numerical failure but the mechanism's dead centres, where the crank and coupler line up and the linkage physically stops. Nothing about the four lengths had to be inspected to find them: the solver was asked, and declined.273of 360input anglenon-Grashof (triple rocker) · s + l exceeds p + q by 0.50green: assembles · red: refused
Fig. 2 Singular configurations located by asking rather than by algebra: a non-Grashof four-bar was requested at all 360 input angles and assembled at 273. The red arcs are where the constraints cannot be satisfied — the dead centres — and no closed form for them was needed.

What each route can see

Laying it out plainly is the most useful thing in this essay.

Grübler Jacobian
needs dimensions no yes
needs the topology classified yes no
sees redundant constraints no yes
works before the design exists yes no
depends on a tolerance no yes
gives one answer for a whole family yes no

Neither column is better. The formula is the right tool early and the measurement is the right tool once there is something to measure, and the cases where they part company are the ones worth knowing about.

The disagreement, and what it means

There is exactly one row of the audit where the two differ, and the pattern generalises: Grübler is wrong precisely when a constraint is redundant because of the dimensions.

Three bars between two frames, all parallel and all the same length, is the standard example. Any two of them fix the motion completely; the third writes down constraint equations that are already implied. Grübler counts the third bar’s joints and subtracts for them, and arrives at zero. The Jacobian finds that its rows are linear combinations of rows already present, does not count them twice, and arrives at one.

Three parallel bars, and a formula that says this cannot moveFive links and six pin joints, so Grübler's criterion gives 3(5−1) − 2(6) = 0 and calls it a structure. The Jacobian has rank 5 against 6 free coordinates, so it measures one degree of freedom — and the sweep assembles 59 of 60 positions, which settles the matter. The third bar removes no freedom because its constraint is already implied by the other two, and a formula that counts joints cannot notice that they happen to be parallel. Mechanisms of exactly this kind carry drafting machines, anglepoise lamps and locomotive coupling rods, where the redundant bar is there for load sharing and for keeping the linkage out of its change point.the redundant oneGrübler: 3(5−1) − 2(6) = 0Jacobian: 6 − rank 5 = 1
Fig. 3 The mechanism in question, moving. Five links, six pins, Grübler zero — and 59 of 60 sampled input angles assemble. The single refusal is at the change point, where the parallelogram can flip to an anti-parallelogram and nothing in the geometry chooses.

The mechanisms in this family are not curiosities. They are common, useful, and built on purpose, and the redundancy is usually there for stiffness or for load sharing rather than by mistake.

What this does not settle

Mobility is a count, and a count is not a guarantee.

A mobility of one does not mean the mechanism can move from where it is. A non-Grashof four-bar has mobility 1 and cannot turn through a full revolution; it rocks between dead centres. Mobility is a statement about the constraints at a configuration, and the range of motion is a different question, answered by sweeping.

It does not mean the mechanism can be assembled at all. Four bars whose longest exceeds the sum of the other three has mobility 1 by the count and no configurations whatever. The solver’s answer to that is to refuse every position, which is the correct one.

It says nothing about how well the mechanism works. The transmission angle is where that question lives, and it depends on the dimensions in a way that mobility does not.

Three bars and four barsOn the left, two bars to a common point: three links, three joints, and Grübler gives 3(3−1) − 2(3) = 0. The Jacobian agrees — two free coordinates, rank 2, nothing left over — and the shape cannot change without a bar changing length. On the right, one more bar and one more joint gives mobility 1, and the whole of this site follows from that difference. The triangle is why bridges are triangulated and the quadrilateral is why machines are not.mobility 0 — a structuremobility 1 — a mechanismtriangle: 2 coordinates, rank 2, 0 freeone bar apart
Fig. 4 Where the whole distinction starts: three links and three joints on the left, four and four on the right. One bar apart, and it is the difference between a bridge and a machine.

The general shape of the habit

Two independent routes to one number is not a technique specific to mobility. It is the pattern this whole site is built on, because it is the only arrangement in which agreement is evidence rather than repetition.

The same shape appears in Grashof’s condition predicted and then swept, in a gear’s ratio derived from the base radii and tested on the drawn flank, and in an epicyclic ratio computed two ways. In every case one route knows the formula and the other knows the object, and the interesting output is not the agreement but the occasional failure of it.

Peaucellier's cell: exact straight-line motion from pin jointsThe rhombus and the two long arms hold |OP| · |OQ| constant at 16 = 5² − 3², which is inversion in a circle about O. Inversion carries circles through the centre to straight lines, and the link CQ makes Q run on exactly such a circle — so P travels on a line, with no approximation anywhere. Measured over 160 solved positions the deviation is 6.5e-16 of the span, which is arithmetic noise rather than a small error.PQOCarm 5, rhombus 3, crank 1.6deviation 6.5e-16 of span
Fig. 5 Eight links, ten joints, and mobility 1 by both routes. Symmetry does not imply redundancy: every side of the rhombus removes a freedom nothing else removes.
What a sketched mechanism costsA four-bar positioned the way one is drawn by hand: the crank pin at its angle, and the rocker interpolated smoothly between its extremes because that is what the motion looks like. Plotted is how long the coupler would have to be at each position, minus how long it is. The error reaches 0.89 on a coupler of 3.5 — 25% — and a reader looking at the drawing would see nothing wrong, because every individual frame is a perfectly plausible picture of a four-bar. This is the failure the solver exists to make impossible: a configuration that does not satisfy the constraints cannot be drawn, because there is nothing to draw it from.-0.50000.50010100200300crank angle (degrees)coupler length errora rigid barcoupler 3.5, worst error 0.890every frame looks fine on its own
Fig. 6 Why the Jacobian is available at all. It exists because the mechanism is being solved rather than drawn, and the cost of not solving is plotted here.

The joints the count has to be told about

Every mobility count begins by classifying the joints, and that classification is where most errors enter — before any arithmetic happens.

In the plane a pin removes two freedoms and a slide removes two, so the two are interchangeable as far as the count goes and completely different as far as the mechanism goes. A rolling contact without slipping removes two. A contact that can slip removes one. A pin-in-slot removes one.

The one-freedom-removed joints are the higher pairs, and the arithmetic treats them differently — which is why Grübler’s criterion has two terms rather than one, and why a cam-and-follower has to be counted as a higher pair unless the roller is modelled explicitly, in which case it becomes two lower pairs and an extra link and the count comes out the same.

That last equivalence is a good check on whether a count has been done honestly. The same physical mechanism modelled two ways must give the same mobility, and if it does not, one of the two models has a joint misclassified.

The trap is that classification is a modelling decision and not an observation. A gear mesh is a higher pair if the teeth are ignored and something else entirely if they are not. A pin with clearance is a pin at the accuracy of this analysis and two freedoms at the accuracy of a vibration analysis. What the count reports depends on what the counter decided the machine was, which the rank test does too — but the rank test at least reports its decision as a matrix that can be inspected.

Why the crank is substituted rather than removed

The count implemented here has a detail worth stating, because getting it wrong produced a wrong answer that looked plausible.

A crank in this library is a constraint that fixes both the length of a link and its angle: it drives the mechanism. For a mobility count the driving part must be set aside — mobility is the number of inputs the mechanism needs, so counting it with an input already applied answers a different question.

The first implementation removed the crank constraint entirely. That deleted the link as well as the drive, and a four-bar with one link missing reported two degrees of freedom, which is the right answer to the wrong mechanism.

The fix is to substitute a plain bar for the crank: keep the length constraint, drop the angle constraint. The link is still there, the drive is not, and the four-bar reports one.

That is the kind of error that is invisible in a count and visible in a figure, and this site had it the other way round — the figures were right and the count was wrong — which is why both routes exist. Two methods that agree are evidence; one method is a claim. The same reasoning caught a reversed velocity solution and a circular gear test, and it is the only habit on this site that has caught bugs in every subject it has been applied to.

When the count is the right tool

Most of this essay argues for the measured route, so it is worth stating plainly where counting wins, because it usually does.

Design sketching. Grübler’s criterion is arithmetic on two integers and can be done on a napkin. A proposed mechanism that counts to zero when one degree of freedom was wanted has a problem worth finding before any coordinates exist, and the count finds it in seconds.

Topology search. Enumerating candidate mechanisms — how many links, arranged how — is a combinatorial problem in which each candidate must be screened cheaply. The count screens; the rank test would require choosing dimensions for every candidate, which is the expensive part of the design.

Communication. “A four-bar has one degree of freedom” is a true and useful thing to say, and saying “the constraint Jacobian has rank seven at every configuration sampled, with a singular-value gap of six orders” is not an improvement for most purposes.

The count’s weakness is precisely bounded: it assumes the constraints are independent, which is true for a mechanism whose dimensions are in general position and often false for one whose dimensions were chosen. So the practical rule is to count first, and to measure when the mechanism has parallel links, equal lengths, symmetry or concurrency — that is, whenever the design has put dimensions in special position on purpose.

Measuring also answers questions the count cannot pose at all. Where does the mobility change? What direction is the extra freedom? Is this configuration near a singularity? Those are the questions that matter once a mechanism exists, and they are all readings of a Jacobian at a configuration rather than of a formula about a family.