The matrix a calibration inverts
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.
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.
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.
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 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.
- The direction no protractor can see Numbers that were measured
About the same objects
Not linked from either essay — found by the objects both name.
- How many poses are enough calibration · identifiable · identification jacobian · least-squares · singular value
- The instrument's error, multiplied calibration · identification jacobian · least-squares · measurement residual · singular value
- What another measurement is worth calibration · identifiable · identification jacobian · least-squares · singular value
- Every length wrong, every reading right calibration · identification jacobian · least-squares · measurement residual
- One set of lengths, two machines calibration · identifiable · kinematic solve · measurement residual
- Reading a residual calibration · identification jacobian · least-squares · measurement residual
What links here
The 8 of 12 essays linking to this one that name the most of the same objects.
- Four indices, four answers Numbers that were measured
- Two instruments disagree about the worst Numbers that were measured
- A calibration is a synthesis with more equations Numbers that were measured
- A parameter the model has not got Numbers that were measured
- Three machines, one curve Numbers that were measured
- Nine parameters, two of them invisible Numbers that were measured
- The direction no protractor can see Numbers that were measured
- What this field cannot measure Numbers that were measured
The objects this essay names
Each one links to every other essay that touches it.
CalibrationConstraint rankIdentifiableIdentification jacobianKinematic solveLeast-squaresMeasurement residualSingular value