The problem backwards

The linkage that is only nearly right

Stop demanding that a linkage pass exactly through three points, and ask instead that it be close everywhere. Three linkages result, none of them passing exactly through anything, and each is the best by a different measure — the least-squares fit beats the interpolant on average error and loses to it on the worst case. An optimiser gives exactly what it was asked for and nothing else.

Assumes Where the precision points go.

Everything in this field so far has been exact. A construction, a theorem, and a linkage that satisfies its conditions to fourteen decimal places — three positions, four, five, three angle pairs. The exactness has never been the point; it has been a consequence of asking for as many conditions as there are free numbers.

Ask for fewer conditions and there is freedom left over. Ask for more and there is no solution. Ask for a range — be close everywhere, rather than exact anywhere — and the problem changes character entirely, because “close everywhere” is not a set of equations.

It is an objective, and an objective has to be chosen.

That sentence is the whole departure. Every construction in this field so far has been indifferent to preference: Burmester’s dyad condition is what it is, and two people prescribing the same three poses get the same centre-point curve. An objective is a preference, written down as a formula, and two reasonable people write down different ones. The mathematics stops being about the mechanism and starts being about what the mechanism is for.

Three linkages, one function

The same log10\log_{10} over the same range, by three routes.

The interpolant. Three Chebyshev precision points, the 3 × 3 linear solve, exact at three places. Worst error 0.2232°, root-mean-square error 0.1476°.

A least-squares fit. Minimise the sum of squared error over 121 samples across the range, by search over the three link lengths. Worst 0.3900°, RMS 0.1203°.

A minimax fit. Same search, minimising the largest error instead. Worst 0.2105°, RMS 0.1463°.

The error between the precision points. chebyshev: worst 0.2232°, RMS 0.1475°; least-squares: worst 0.3900°, RMS 0.1203°; minimax: worst 0.2105°, RMS 0.1463°. The error is zero at each precision point by construction and nowhere else. minimax has the smallest maximum here, and which curve is best depends entirely on which measure is asked for.
Fig. 1 Three four-bars generating one function, differing only in what was asked of them. The interpolant crosses zero three times; the two fits cross it more often and never touch it exactly.

Read the rows and the pattern is immediate. Each fit wins on the measure it was given and loses on the other.

The least-squares fit is 18% better than the interpolant on RMS and 75% worse on the maximum. The minimax fit is 6% better on the maximum and slightly worse on RMS than least squares. There is no linkage here that is best at everything, and the choice between them is a choice about what “accurate” is going to mean.

The assertion that had to be rewritten

The first version of the check in the gate required the fitted linkage to beat the interpolant on the largest error. It failed.

The failure was correct and the check was wrong. The fit was minimising the sum of squares — it had never been shown the maximum, and there was no reason for it to be good at it. Asking an optimiser about a measure it was not given is asking about something it has no opinion on.

So assertEachObjectiveWinsOnlyItsOwnMeasure is now four-way, and every clause is required:

  • the least-squares fit beats the interpolant on RMS;
  • the minimax fit beats the interpolant on the maximum;
  • the least-squares fit is worse than the minimax fit on the maximum;
  • the minimax fit is worse than the least-squares fit on RMS.

The last two are what make it a statement about objectives rather than a statement that optimisation is good. Without them, one fit that happened to be better at everything would pass, and this essay’s point would be unsupported by the thing checking it.

There is a fifth clause and it is the trade the whole essay is about: the fitted linkage passes through none of the precision points exactly, where the interpolant passes through three. The check requires that too. What optimisation buys is bought with exactness, and it is worth having on the record rather than implied.

The error between the precision points. chebyshev: worst 0.2232°, RMS 0.1475°; least-squares: worst 0.3900°, RMS 0.1203°. The error is zero at each precision point by construction and nowhere else. chebyshev has the smallest maximum here, and which curve is best depends entirely on which measure is asked for.
Fig. 2 The interpolant against the least-squares fit alone, so that the crossings can be counted. Three for the interpolant, more for the fit, and none of the fit’s at a place anybody chose.

An optimised linkage has no precision points, and that is visible

The clearest way to tell the three designs apart is to count the zero crossings of the error curve.

The interpolant crosses zero exactly three times, at its three precision points, because that is what it was built to do. Each crossing is a place where the linkage is right.

Both fits cross zero more often — five or six times across the range — and none of the crossings is anywhere in particular. They are wherever the error happens to change sign, which is a consequence of the optimisation rather than a specification. A crossing of a fitted curve is not a guarantee about that input; it is the point where being slightly high turned into being slightly low.

That distinction matters when somebody later asks “at what input is this mechanism exact?” For the interpolant the answer is three specific values, known in advance and choosable. For a fit the honest answer is that the question does not apply.

What is being optimised over

Three numbers: the crank, coupler and rocker, with the ground link fixed at 1 to remove the scale.

That is a small search space and it is smaller than it needs to be. The two angle offsets — where the crank’s zero and the rocker’s zero sit — are also free, and including them would give five parameters and a better fit. They are left out here for a reason worth stating: the comparison is against a three-point interpolant, which has three free numbers, and an optimiser given five parameters against an interpolant given three is not a comparison of methods but of budgets.

The objective is the structural error over 121 samples spread evenly across the range, with a large penalty added for any sample the mechanism cannot reach.

That penalty is not a fudge. A linkage that comes apart partway through its sweep is infinitely bad at generating a function over that sweep, and an optimiser is entitled to be told so. Without it the search wanders happily into regions where the mechanism assembles at some samples and not others, and reports a small error computed over the samples that worked.

Why the optimiser has no derivative

The search is Nelder–Mead — a simplex method that only ever compares objective values and never differentiates. That is an unusual choice in 2026 and it is deliberate.

The objective here is the structural error, and computing it means solving the mechanism at 121 crank angles. At some of those angles, for some parameter values, the mechanism does not assemble. So the objective is not merely non-convex; it is not everywhere defined, and its domain has a boundary whose location is itself the answer to a nonlinear problem.

A gradient method needs a rule for what the gradient is at the edge of the feasible region, and any such rule is a piece of invention. A simplex needs no rule, because it can only compare — it moves away from bad points without needing to know why they are bad.

The cost is that it is slow and it finds a local minimum. Both are real limitations and neither is hidden: the fits above took a few hundred objective evaluations, each of which is 121 solves, and there is no claim anywhere that they are global.

What “the best” would mean

Chebyshev’s equioscillation theorem says the best minimax approximation has its error peaks all of equal height. The interpolant’s evenness — smallest peak over largest — is 0.924, and that is what Chebyshev spacing achieves without optimising at all.

The minimax fit should push it towards 1, and improve the maximum, and it does: 0.2105° against 0.2232°.

Six per cent. For an optimiser, over a search space of three numbers, with several hundred evaluations, against a choice of interpolation points made by a formula.

That is the honest headline of this essay and it points the other way from the usual one. The classical spacing gets most of the available improvement for nothing. The gap between a well-chosen interpolant and an optimised design, on this problem, is a few per cent — and the gap between a well-chosen interpolant and a badly-chosen one is a factor of three, which the previous essay measures.

An engineer’s time is better spent on where the points go than on optimising afterwards, at least at three points and on this function. That conclusion would not survive many more precision points, or a function that bends more, and it is stated as a measurement rather than as advice.

The error between the precision points. minimax: worst 0.2105°, RMS 0.1463°; least-squares: worst 0.3900°, RMS 0.1203°. The error is zero at each precision point by construction and nowhere else. minimax has the smallest maximum here, and which curve is best depends entirely on which measure is asked for.
Fig. 3 The two fits against each other. The minimax curve is flatter at its peaks and larger in the middle; the least-squares curve is the other way round.

Two measures, and what each is a statement about

The choice between the sum of squares and the maximum is not a matter of taste, and it is worth setting out what each one asserts about the machine.

Least squares minimises the average of the squared error over the range. It is a statement that errors compound or accumulate — that being slightly wrong in many places is what matters — and it is the right objective when the mechanism’s output is integrated, averaged, or fed into something that smooths. It is also, not coincidentally, the objective with the best numerical behaviour: the squared error is smooth in the parameters wherever the mechanism assembles, so a search over it is well behaved.

Minimax minimises the largest error anywhere. It is a statement that there is a tolerance, and that the mechanism either stays inside it or does not. That is the shape of almost every specification a component is bought against, and it is the objective an engineer usually means by “accurate to a fifth of a degree”.

The two disagree in a predictable direction. Least squares is happy to accept a large error in a small region if that buys small errors over a wide one; minimax is not. The measurement above shows exactly that: the least-squares linkage’s worst error is 0.39° and the minimax linkage’s is 0.21°, while their average errors differ by less than a fiftieth of a degree.

Minimax is also the harder search. Its objective is the maximum of many functions, which is non-smooth wherever the argmax changes from one sample to another — the objective has corners, and a gradient method would struggle at exactly the points where the answer lives. That is a second reason the simplex method is used here, and it is the more principled of the two.

Why the fitted linkage is not the best possible

Neither fit is claimed to be the global optimum, and the reasons are worth listing because the claim is easy to make by accident.

The search is local. Nelder–Mead descends from where it starts and stops when the simplex is small. A different start would find a different minimum, and nothing here shows that any of them is the lowest.

The seed came from the interpolant. Both fits start from the Chebyshev interpolant’s link lengths, which is a sensible choice and a strong prior — it means the fits are exploring the neighbourhood of a design that already works, and the improvement measured is the improvement available near that design.

The objective is sampled. 121 points, not the whole range. A minimax fit over 121 samples is not a minimax fit over the interval, and the difference is bounded by how much the error curve can move between adjacent samples. On a curve this smooth that is small; it is not zero.

Three parameters. Adding the two angle offsets would give more room and a better answer.

Each of those would make the fits better. None of them changes the finding, which is about the relationship between the three linkages rather than about any one of them, and that relationship is forced by the objectives rather than by how well the search went.

Where the exactness went

It is worth being clear about what has been given up, because “approximately right everywhere” sounds strictly better than “exactly right in three places” and is not.

An exact precision point is a guarantee. It says that at this input, the output is this, to the accuracy of manufacture. A designer can put a precision point where accuracy matters — at a calibration value, at a range boundary, at the operating point — and know that the structural error there is zero by construction.

A fit has no such place. Its error is small everywhere and zero nowhere, and there is no input at which the designer can say the mechanism is right.

For a component that is calibrated against a standard at one point, that is a genuine loss. For a component whose accuracy matters uniformly across its range, it is not a loss at all. The two situations are common and different, and the objective should be chosen from the situation rather than from the fashion.

A four-bar that computes log₁₀. The output rocker's angle, mapped back into y, against the input crank's angle mapped back into x. The pale curve is log₁₀ x and the solid one is what the linkage does. They agree exactly at the 3 precision points and nowhere else; the largest disagreement over the range is 0.2232° of rocker, which is 7.47e-4 in y. The chebyshev spacing put the precision points at 1.0670, 1.5000, 1.9330.
Fig. 4 The interpolant, drawn against the function it approximates. The three places where the curves genuinely touch are the guarantee that a fit does not have — and at this scale they are also the only thing distinguishing the two designs.

The penalty is doing more work than it looks

The unreachable-sample penalty deserves a second look, because it is the only place in this construction where the mechanism enters the optimisation as anything other than a function evaluator.

Without it, the search has no reason to stay in the region of parameter space where the linkage is a working machine over the whole sweep. Three positive numbers always give a four-bar; whether that four-bar’s crank can rotate through the required 90° is Grashof’s question, and it is not in the objective anywhere else.

With the penalty, that condition enters in a peculiar form: not as a constraint the optimiser knows about, but as a very large value of the thing it is minimising, sampled at the crank angles that fail. The optimiser has no idea it is respecting a classical criterion. It simply avoids a region where the numbers are bad.

That is a legitimate way to impose a constraint and it has a known weakness. A penalty region with a hard edge makes the objective discontinuous, and a simplex crossing that edge sees a step rather than a slope — so the search slows down near the boundary and can get stuck against it. A design whose optimum sits on the Grashof boundary would be found badly, and there is no reason to think that never happens: linkages that just barely rotate are often the compact ones.

Handling that properly means a constrained optimisation with the condition written out algebraically, which is a different piece of machinery than this file contains. It is named here as a limit of the method rather than left for a reader to discover from a fit that stalls.

How many points a linkage will take. function generation: 5 free numbers, 1 net constraint per point, 5 precision points; motion generation: 4 free numbers, 1 net constraint per point, 5 precision points; path generation: 9 free numbers, 1 net constraint per point, 9 precision points. Every count in the literature that differs from these differs about what is being counted as free, not about the geometry.
Fig. 5 What a larger approximate synthesis is optimising over. Nine free numbers for path generation, against the three this essay searches.
Exact, and out of reach. 345 poses of the six-joint arm, each with all eight postures constructed exactly, sorted by how many of the eight lie inside a plausible set of joint limits. The mean is 3.23; the number worth reading is the first bar, which is 39 poses — 11% — that the arm can reach in eight ways and hold in none. That is the same shape the synthesis field found in Burmester's construction: exactness is not the scarce quantity, and a solution that satisfies every equation can still be a solution to nothing.
Fig. 6 The same shape on a robot arm. A six-joint arm’s inverse problem returns eight postures, every one exact to 10⁻¹⁵, and a machine with ordinary joint limits can hold about three of them — and at 11% of poses, none at all. Exactness is not the scarce quantity in either case, and what disqualifies a solution is a question the construction cannot ask.

The three-parameter search is not the interesting one

The optimisation here is small on purpose, and the version of this problem that people actually run is much larger and much harder.

A serious approximate synthesis optimises over everything: link lengths, angle offsets, the coupler point, sometimes the mapping itself — nine or more parameters — against hundreds of sampled positions, with constraints for Grashof condition, transmission angle, packaging and branch consistency. The objective is non-convex, the feasible region is disconnected, and the answer depends heavily on where the search started.

That last is the subject of the next essay, and it is where the classical constructions come back into the story: an atlas of coupler curves, or an exact synthesis through a few positions, is a very good way of producing the starting guess that a general optimiser cannot supply for itself.

The one thing that does not change with scale is the finding above. An optimiser returns the minimum of the function it was given, and the function it was given is a choice made by a person, and no amount of optimisation compensates for choosing the wrong one. Least squares and minimax differ here by a factor of two on the maximum error, on a three-parameter problem where both converged.

Chebyshev's point, and the straightest one. Both curves are traced by the same linkage over the same working arc; only the tracing point differs. The classical point is the coupler's midpoint, which is where the mechanism's own symmetry puts it. Ball's point is where the motion says the straightest path is — the one point whose path holds its tangent to fourth order rather than second — and it is 3.26 coupler lengths away. Over the whole stroke the classical point departs from its chord by 12.4 per cent of the span and Ball's by 3.5. positioned by solving, not by drawing.
Fig. 7 Chebyshev’s linkage with its own tracing point and with the one the motion says is straightest, which is three and a quarter coupler lengths off the mechanism. The second curve is straighter in relative terms and barely better in absolute ones.

The three linkages each being best by a different measure is the finding, and the honest conclusion from it is one a designer has to make rather than compute. There is no linkage that is best, because best is not a property a mechanism has until somebody says which norm they are minimising — and the three norms in play here are three different engineering requirements. Least squares minimises the average departure, which is what matters when the error accumulates over a stroke. Minimax minimises the worst departure, which is what matters when a single excursion is what fails. Interpolation forces the error to zero at chosen places, which is what matters when particular positions are the ones that count. So the question which linkage is best is the question which of the errors hurts, and it belongs upstream of any synthesis. That is worth stating because approximate synthesis is often presented as producing an answer; it produces a family of answers indexed by a norm, and choosing the norm is the design decision the optimisation cannot make.

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 13 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.

Approximate synthesisFunction generationLeast-squaresMinimaxNelder meadObjective functionPrecision-pointStructural error