Numbers that were measured

The matrix a calibration inverts

One row for every number an instrument reads, one column for every parameter that might be wrong. Every entry is a derivative the tolerance field has been computing since its first essay — so this field's central object arrived already built, and what is new is which way it is read.

Assumes A dimension is a measurement.

The object this field is about is a matrix, and the useful thing to know first is that this site has been computing its entries for years of essays without stacking them.

Write down every number an instrument reads off a machine. Write down every parameter of the model that might not be what the drawing says. The identification Jacobian has one row for the first and one column for the second, and the entry where they meet is the derivative of that reading with respect to that parameter.

That is the whole definition. What follows from it is everything in this field.

The identification Jacobian of a four-bar, read by protractor. One row for every number the instrument reads and one column for every parameter that might be wrong. Each cell is the derivative of that reading with respect to that parameter, drawn to the right of its centre line when positive and to the left when negative, with the largest entry in the whole matrix at 4.07e-1. 12 rows against 4 columns: far more equations than unknowns, which is what makes an identification a least-squares problem rather than a solve, and what makes the question of which combinations of columns cancel a real one. These are the same derivatives the tolerance field computes one at a time — the same matrix read down instead of across.
Fig. 1 Twelve readings against four parameters. The bars run right of their centre line when the derivative is positive and left when it is negative, so a column can be read as a pattern rather than as twelve numbers.

Where the entries come from

They are not new and they are not differenced.

The tolerance field’s second route differentiates through the constraint equations. The mechanism satisfies f(x, ℓ) = 0 for every ℓ in a neighbourhood, so differentiating with respect to a length gives

J ∂x/∂ℓ + ∂f/∂ℓ = 0   ⟹   ∂x/∂ℓ = −J⁻¹ ∂f/∂ℓ

where J is the analytic Jacobian the solver has been taking Newton steps against since the foundation. One linear solve per parameter gives the derivative of every joint coordinate, and the chain rule through atan2 gives the derivative of the output angle.

So a row of the identification Jacobian is four numbers that the tolerance field would call sensitivities and would print one at a time. Nothing about the arithmetic changes. What changes is that there are now twenty-four rows and the question is about all of them at once.

A column is a sensitivity; a row is a pose; the whole is the derivative of the map from parameters to observable motion. Holding those three readings of one object in mind is most of what it takes to follow the rest of the field.

Four parameters, four different objects

Writing the entries out rather than differencing them is a choice, and the reason is that the four lengths of a four-bar are four genuinely different things to the solver, of which only two are called len.

The coupler and the rocker are bar constraints. A bar’s residual is |b − a| − L, so the derivative with respect to its length is −1 in that row and nothing anywhere else. Two of the four columns are that simple.

The crank is a driven constraint, two rows rather than one, with residual b − a − L·(cos θ, sin θ). Its derivative is (−cos θ, −sin θ), which depends on where the crank is pointing — so unlike the bars, this column changes shape as the machine turns.

And the ground length appears in no residual at all. It is the x-coordinate of the fixed pivot O₄, and it enters through the constant part of the rocker’s row rather than through a length. Its derivative is −(Bₓ − g)/|B − O₄|, and there is a second contribution nothing else has: the output angle is measured at O₄, so moving O₄ rotates the reading even with B held perfectly still.

Dropping that second contribution is the mistake that makes the ground length look like the least critical of the four when it is usually the most. It is a mistake a finite-difference routine cannot make, and a finite-difference routine also cannot say that the four columns are four different kinds of object — which is worth more than the accuracy.

The identification Jacobian of a four-bar, read by coordinate machine. One row for every number the instrument reads and one column for every parameter that might be wrong. Each cell is the derivative of that reading with respect to that parameter, drawn to the right of its centre line when positive and to the left when negative, with the largest entry in the whole matrix at 3.11e+0. 16 rows against 6 columns: far more equations than unknowns, which is what makes an identification a least-squares problem rather than a solve, and what makes the question of which combinations of columns cancel a real one. These are the same derivatives the tolerance field computes one at a time — the same matrix read down instead of across.
Fig. 2 The same machine read by an instrument that returns positions: two rows per pose rather than one, and six columns rather than four, because where the tracing point sits on the coupler is a parameter of the model too.
What 12 poses determine. The singular values of the identification Jacobian, on a log axis, with the rank cut at 1e-9 of the largest. 3 of 4 parameters are determined; 1 is not, and the one that is not sits at 3.51e-15 against the largest at 1.53e+0. That is not a small number, it is nought: the gap between the last kept value and the first discarded one is a factor of 8.4e+13, so the decision does not depend on where the cut is put. The condition number over the recovered directions is 5.21.
Fig. 3 Twelve poses of a four-bar, and the four numbers that say what those twelve readings determine.

What a model is, and what it is not

The column list is a decision and it is the first decision a calibration makes.

The four lengths are the obvious parameters. Where the tracing point sits on the coupler is another two, and they belong in the model whenever the instrument watches that point — a coordinate machine that measures the tracer while the model pretends to know where it is has a parameter the model has not got, which is a failure with its own essay.

What must not be in the column list is anything that changes nothing. If two parameters have the same column, up to a factor, no measurement separates them and the model is not minimal — the fit then has a whole line of exactly equivalent answers and returns whichever one the damping prefers. That is a defect of the model and not of the data, it cannot be repaired by measuring more, and on a serial arm it is the normal state of affairs rather than an exotic one.

So the matrix is where a model is judged. A column list whose columns are independent describes a machine a measurement can pin down; a column list whose columns are not describes one it cannot, however well it fits.

Tall, and why that is the point

Twenty-four rows and four columns. The system is tall by a factor of six, and the whole field lives in the consequences of that shape.

A square system — three prescribed pairs against three coefficients, which is what synthesis solves — has a solution or it does not. Asking whether one of its unknowns is determined is meaningless: it determines all of them or none.

A tall system can be blind in one direction and perfectly informative in the others. Every row is a good equation, every reading is real, and one combination of the columns can still be exactly zero — because a linear combination of columns is not a linear combination of rows, and adding rows does nothing to a dependency among columns. Twenty-four rows, four columns, and a rank of three: that is not a shortage of data.

This is also why a calibration is a least-squares problem rather than a solve, and why it is the practical problem. A machine that exists gives as many readings as anybody cares to take, they disagree with each other because instruments do, and what is wanted is the machine that disagrees with all of them least. The square problem is the designer’s and the tall one is the owner’s.

What the whole matrix answers

Three things, all read off one singular value decomposition.

How many parameters the readings determine. That is the rank, and it is a decision about which singular values are nought. On a four-bar read by protractor it is three of four, and the decision is not close: the last kept value is 0.379 and the first discarded one is 3.85 × 10⁻¹⁵, a gap of fourteen orders. A rank decision with that gap does not depend on where the cut is put, which is the difference between a measurement and a convention.

Which combinations they do not determine. That is the null space, and its basis vectors are directions in parameter space along which the machine can be moved with no reading changing. On a four-bar the direction is the four lengths themselves, which is to say the size of the machine.

And how much better the best-recovered parameter is than the worst. That is the condition number over the kept directions — 5.2 for a protractor on this machine, 162 for a coordinate machine on the tracing point, 26 for both together. It is what decides how far the instrument’s error travels into the answer, and it is the number a pose set is chosen to improve.

What each instrument recovers. The same twenty poses of the same four-bar, read three ways. A protractor on the output link recovers 3 of the four lengths and leaves the fourth exactly invisible, because its readings are dimensionless in the lengths and scaling the machine does not move them. A coordinate machine on the tracing point recovers all six parameters — the four lengths and the two that say where the tracer sits — at a condition number of 162.3. Using both recovers the same six at 26.1, 6.2 times better, which is the case for putting two instruments on one machine: not more parameters, better-conditioned ones.
Fig. 4 The three answers for three instruments, from the same sixteen configurations of the same machine.

The poses that are not there

A calibration measures the machine it has, and the machine it has does not go everywhere.

Ask this site’s crank rocker for an output reading at a crank angle beyond its own travel and there is no reading: the solve does not converge because there is no configuration to converge to. A routine that treated that as a failure would be wrong twice over — it is not a failure of the instrument, and it is not a failure of the arithmetic. It is the machine declining to be somewhere.

So a pose that cannot be reached is dropped from the matrix and counted, and the count is reported beside the rank. On a full turn of a crank rocker the count is zero, because the crank turns all the way round; on a double rocker it is most of the turn, and a sweep of twenty-four poses of one of those contributes seven rows.

That is a real constraint on where a calibration can look, and it is a constraint of a kind nothing else in this field has. Conditioning says some poses are worth more than others; reachability says some poses are worth nothing because they do not exist. The second is the harder one to design around, because it moves as the parameters move: a mechanism out of true by enough to matter reaches a slightly different set of angles from the nominal one, so the pose list a calibration was planned with is not quite the pose list it gets.

What the matrix cannot say

Three things, and naming them is what keeps the rest of the field honest.

It cannot say whether the model is right. The identification Jacobian is built from the model’s own parameters, so a model missing something the machine has produces a perfectly well-conditioned matrix of full rank, and the fit converges to numbers that are not the machine’s. The rank is a statement about the model’s parameters and not about the machine.

It cannot see a discrete ambiguity. A rank deficiency is a direction, which is a local object; two separate parameter vectors that both fit the data exactly are not a direction at all, and no derivative anywhere detects them. Three linkages tracing one coupler curve is precisely that case, and the matrix at any one of the three is of full rank and perfectly ordinary.

And it is a first-order object. Every statement it makes is about a neighbourhood of the parameters it was built at. That is the right model for a machine that is nearly what its drawing says, which is nearly always the case; it stops being the right model at a configuration where the mechanism is singular, and it stops being the right model for a parameter that is out by a lot rather than a little.

The identification Jacobian of a four-bar, read by coordinate machine. One row for every number the instrument reads and one column for every parameter that might be wrong. Each cell is the derivative of that reading with respect to that parameter, drawn to the right of its centre line when positive and to the left when negative, with the largest entry in the whole matrix at 2.10e+0. 30 rows against 6 columns: far more equations than unknowns, which is what makes an identification a least-squares problem rather than a solve, and what makes the question of which combinations of columns cancel a real one. These are the same derivatives the tolerance field computes one at a time — the same matrix read down instead of across.
Fig. 5 Both instruments at once, which is three rows per pose in two different units — and the reason the rows have to be scaled before any condition number off this matrix means anything.
The direction no protractor can see. The measured null direction of the identification Jacobian against the four link lengths themselves, both normalised so the largest entry is one. They are the same vector to 2.4e-15. That is Euler's relation rather than a coincidence: the output angle depends only on the ratios of the lengths, a function homogeneous of degree zero is annihilated by its own argument, and the residual over all 20 rows is 7.61e-15. Scaling this four-bar by any factor whatever produces a machine no reading of its output angle can distinguish from it.
Fig. 6 And what a decomposition of it returns: a direction in parameter space, drawn against the direction the algebra says it must be.

The decomposition, and the one that will not do

Every statement above is read off a singular value decomposition, and which one is a decision rather than a detail.

The routine this site has used for subspaces since it first wrote about spatial mechanisms accumulates the Gram matrix Σvvᵀ and takes its symmetric eigenbasis. For a screw system that is exactly right — six by six, well scaled, and the geometry retained. It has one property that had not been written down: forming AᵀA squares the condition number, so the smallest singular value it can distinguish from nought is about 1.5 × 10⁻⁸ of the largest, whatever tolerance a caller hands it.

The null space this field looks for sits at 10⁻¹⁵ of the largest. Through the Gram route it comes back as a kept direction and the nullity comes back as zero — a wrong answer that looks exactly like a right one, produced silently, on a matrix nobody would call badly behaved.

So the decompositions here go through a one-sided Jacobi instead, which orthogonalises the columns directly and computes small singular values to high relative accuracy. A ratio of 10⁻¹⁴ is resolved rather than lost. That is a result from numerical analysis and is used here as theirs; what belongs to this field is the consequence, which is that a rank decision about a mechanism has to be made by an instrument whose floor sits below the thing being decided, and the floor of the obvious instrument sits above it.

Reading a column

The three readings of the matrix are not equally useful and the column is the one worth practising, because every result in this field is a statement about columns.

Take the ground length’s column on this site’s four-bar over a full turn. It is not constant and it does not average to nothing: the output angle responds to a change in the ground length differently at every crank position, most strongly where the coupler and rocker are nearly in line and least where they are square. A reader who has been through the tolerance field’s allocation has seen that column plotted, one entry at a time, as a curve — and the curve is the column.

Now take two columns together. What matters is not how big either of them is but how nearly parallel they are. Two columns pointing the same way mean the two parameters do the same thing to every reading, so no set of readings tells them apart; two columns at right angles mean the two parameters are independently visible. The rank counts how many mutually independent directions the columns span, and the condition number measures the worst near-parallelism among them.

That reframing is the useful one. Is this parameter observable is the wrong question, because a parameter on its own is never the problem. Is this parameter’s column outside the span of the others is the right one, and it is a question about geometry in a space whose dimension is the number of readings.

Two implementations of one measurement

Every derivative in this file is available two ways, and the site’s habit is to have both.

The implicit route is the one above: one linear solve per parameter against the analytic Jacobian, exact up to the conditioning of that solve, and blind to everything the solver does around it. The re-solve route builds the mechanism at ℓ + h, builds it at ℓ − h, solves both, and subtracts. It goes through the initial guess, the branch selection and the line search, so it measures the derivative of what the site actually draws rather than of the equations the drawing comes from.

They must agree, and where they stop agreeing is a result rather than an error: at a toggle the implicit route returns nothing, because the Jacobian is singular and the derivative genuinely does not exist, while the difference route happily returns a large number computed from two solves on opposite sides of a fold.

For this field the agreement does one job the tolerance field did not need. A sign error in any single column would break the exact null identity that the next essay rests on — and that identity is checked by feeding it a Jacobian with one column deliberately one per cent wrong, which takes the residual from 7.6 × 10⁻¹⁵ to 4.6 × 10⁻³. An identity that holds to fifteen figures is worth nothing until something has been shown to break it.

Rows in different units

One more thing the matrix does not say on its own, and it is worth knowing before reading any condition number in this field.

An instrument that reads both an angle and a position produces rows in radians and rows in millimetres, and a decomposition compares them whether or not that means anything. Change the length unit and every position row is multiplied while every angle row is not; the singular values move, the condition number moves, and nothing about the machine has changed.

The fix is to scale each block of rows to unit root-mean-square before decomposing, which makes the comparison a statement about the mechanism rather than about a choice of unit. It is done here and it is reported rather than done silently, because the singular values afterwards live in the scaled frame — and a reader comparing one of them against a sensitivity quoted in radians would be comparing two different matrices.

That is a small piece of bookkeeping with a large moral attached. A rank is invariant under scaling the rows; a condition number is not. So the first of this field’s three answers is a fact about the mechanism, and the third is a fact about the mechanism, the instrument and the units together — which is the same lesson the field’s first essay draws about null spaces, arriving one level down.

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

CalibrationConstraint rankIdentifiableIdentification jacobianKinematic solveLeast-squaresMeasurement residualSingular value