S04 — The redundancy was ours
otkd's two-leg corner has one equation more than it needs. This notebook finds which
one, with the singular value decomposition of the corner's Jacobian, and asks whose
fault the spare equation is. It runs three of otkd's corners side by side:
double-wishbone (the upper arm on a hinge), double-wishbone-two-leg (the hinge
replaced by two ball joints) and double-wishbone-ubj (the hinge corner with a bush
at the upper ball joint). Then it drives the hinge corner to a pose where a singular
value really does fall to zero, and watches Newton there.
Book: books/maths-applied, Chapter 1, §1.4 The redundancy was ours (the
Walkthrough and the Deeper page What a singular value is telling you). Design:
solvers/otkd/docs/problem-mapping.md §4.1, §6 and §8. Every solver number here is
otkd's own, run live and cached.
The question. The two-leg corner has 22 equations for 21 unknowns. Which equation is the spare one, how does the solver know, and is the spare equation a fact about the suspension or about how we wrote it down?
By the end you can:
- say which null space of a Jacobian holds the free motions and which the spare rows, and count each from , and the rank
- say why a list of singular values can hide a redundancy, or show a zero that is not one
- judge a rank decision by the gap around the tolerance
- name the redundant rows with
diagnose, and choose which one to drop- read
System.classifyand predict its verdict for a corner- recognise a toggle from , the condition number and Newton's step count, and say why Newton slows there
Assumes: M02 (Newton, multiple roots), M03 (condition number, least squares, the SVD and rank), M08 §1–2 (the corner as a square and as a redundant system).
How to use it: predict before you reveal, commit before you check, and move the controls until the equation's behaviour stops surprising you.
Warm-up: remember
1. Three corners, counted
Setting: the problem, its sets and its symbols
Problem. Given a corner model (its moving bodies , its joints and one position actuator), find the number of unknowns , the rows , and the partition of the row indices into hard, driver, norm and spring rows.
| Symbol | In | Meaning |
|---|---|---|
| the moving bodies: lower arm, upper arm, upright | ||
| the unknowns: per body a position (m) and a unit quaternion (dimensionless) | ||
| the number of unknowns, seven per moving body | ||
| the data: geometry numbers, points in m, compliances in m/N | ||
| the drive: the lower arm's angle about its hinge, rad | ||
| the rows ; each in m (translations, lengths), rad (the driver) or dimensionless (rotations, norms); a pose solves the model when | ||
| the number of rows | ||
| index sets of hard, driver, norm and spring rows; disjoint, with union |
How these symbols connect
Each of the three corner models assigns seven coordinates per moving body in to form the unknown pose vector . Given the geometry data and the lower-arm drive angle , the constraint map produces scalar residuals in mixed units, and an assembled pose satisfies . Partitioning into the disjoint index sets , , , and separates rigid joints, the actuator, quaternion norms, and compliant springs before any linear algebra is run.
Symbol-by-symbol notes
$q \in \mathbb{R}^n$ and $\mathcal{B}$
Each moving body in contributes three world-frame position coordinates (m) and a dimensionless four-component unit quaternion, giving unknowns for every corner. The ground is fixed and excluded from .
Data $g$ vs drive $\theta$
The parameter vector holds fixed corner geometry (hardpoints in m, site frames, and any bush compliances in m/N), whereas is the single kinematic input setting the lower arm's hinge angle in rad.
Mixed row units of $\Phi$
Entries of carry each row's own physical unit: translations and lengths in metres, the driver in radians, and orientation and quaternion-norm rows dimensionless.
Row groups $H, D, N, S$
The four sets form a disjoint partition of into hard joints (), the driver (), quaternion norms (), and spring rows (). Their counts show how many equations of each kind exist, not yet whether those rows are independent.
Each corner has three moving bodies: the lower arm lca, the upper arm uca and the
upright up. otkd gives each body seven pose coordinates, a position and a unit
quaternion, so every corner has unknowns . Each joint
contributes rows: a revolute locks five of a body's six relative freedoms (tx ty tz rx
ry, leaving rz), a spherical locks the three translations, a distance joint one
length. One driver row sets the lower arm's angle, and one norm row per body
keeps its quaternion of unit length. A spring row is a joint direction that
deflects under load instead of holding exactly.
The three corners differ in one joint each. Pick one and read its rows; the counts for all three are below it.
| joint or body | group | rows | count |
|---|---|---|---|
lca-ground |
hard | tx ty tz rx ry | 5 |
uca-front |
hard | tx ty tz | 3 |
uca-rear |
hard | tx ty tz | 3 |
lca-up |
hard | tx ty tz | 3 |
uca-up |
hard | tx ty tz | 3 |
tie-rod |
hard | length | 1 |
lca-ground |
driver | rz | 1 |
lca |
norm | unit | 1 |
uca |
norm | unit | 1 |
up |
norm | unit | 1 |
| corner | unknowns | rows | hard | driver | norm | spring |
|---|---|---|---|---|---|---|
double-wishbone |
21 | 21 | 17 | 1 | 3 | 0 |
double-wishbone-two-leg |
21 | 22 | 18 | 1 | 3 | 0 |
double-wishbone-ubj |
21 | 21 | 14 | 1 | 3 | 3 |
Counting says the two-leg corner has one row more than unknowns, and nothing else: not which row, nor whether the other 21 are independent. The bushed corner has as many rows as the hinge corner, but three of them are springs. The two-leg corner's joints:
source: solvers/otkd/examples/double-wishbone-two-leg/topology.yaml:23-30
joints:
- {name: lca-ground, kind: revolute, a: ground, b: lca, site: lca-hinge}
# two sphericals pin two points of one rigid body: six rows, five independent
- {name: uca-front, kind: spherical, a: ground, b: uca, site: ucaf}
- {name: uca-rear, kind: spherical, a: ground, b: uca, site: ucar}
- {name: lca-up, kind: spherical, a: lca, b: up, site: lbj}
- {name: uca-up, kind: spherical, a: uca, b: up, site: ubj}
- {name: tie-rod, kind: distance, a: ground, b: up, from: tri, to: tro}
2. Singular values, and the two null spaces
Setting: the problem, its sets and its symbols
Problem. Given a corner, a set of its rows and the design pose , let . Find its singular values, its numerical rank at a tolerance , bases of and , and the range of over which does not change.
| Symbol | In | Meaning |
|---|---|---|
the rows kept: joint and norm rows (as check takes them), or the equation rows, all but deflecting springs (as classify takes them) |
||
| rows kept; unknowns | ||
| the design pose: zero positions (m), identity quaternions | ||
| the Jacobian of the kept rows at ; entry in row 's unit per unit of | ||
| orthogonal matrices of left vectors (over rows) and right vectors (over unknowns) | ||
| the singular values, , descending; | ||
| the relative rank tolerance, dimensionless; otkd uses | ||
| the numerical rank: the number of | ||
| right null space: motions with | ||
| left null space: row weights with |
How these symbols connect
Selecting a row subset of and linearising at the design pose yields the Jacobian , which maps small pose changes to first-order residual changes . Factorising produces orthogonal bases over rows and over unknowns, linked by the descending singular values via . Comparing each against determines the numerical rank and separates active directions from the two null spaces and .
Symbol-by-symbol notes
Row subset $R$ (check vs classify)
The row count depends on which rows are selected: check keeps (excluding the driver ), whereas classify keeps all rows except deflecting springs (including ).
Jacobian $J$ and mixed units
Each entry at carries row 's unit divided by unknown 's unit, so the singular values inherit that mixed-unit scaling rather than a single physical unit.
$U \in O(m)$ vs $V \in O(n)$
Both matrices are square and orthogonal (, ), but they live in different spaces: columns of weight rows in , while columns of describe pose motions in .
$\ker J$ vs $\ker J^{\mathsf T}$
Do not swap the two null spaces. The right null space holds infinitesimal motions with ; the left null space holds row weights with .
$\mathrm{rtol}$ and numerical rank $r$
Because floating-point round-off turns exact zeros into tiny positive numbers, numerical rank counts singular values satisfying . Scaling by keeps dimensionless; otkd defaults to .
Linearise the rows about a pose: a small motion changes the rows by , with the Jacobian. Every matrix factors as
with () and () orthogonal and on the diagonal of . There are singular values. The two sets of vectors answer two different questions.
- A right vector with is a motion of the unknowns that changes no row to first order: a motion the joints allow.
- A left vector with is a weighted sum of rows whose gradient is identically zero: a combination of equations that constrains nothing, a dependence among rows.
lives in the space of unknowns, in the space of equations. A redundancy is an equation too many, so it is a left vector.
Reveal result (lock in your prediction above first)
Counting. If singular values are non-zero, the last columns of span the right null space and the last columns of the left one. The list holds values, so it shows zeros. For a constraint matrix:
The zeros shown equal the redundancy only when , and the mobility only when .
| corner | matrix | m x n | rank r | values listed | zeros shown | mobility n - r | redundancy m - r | smallest σ |
|---|---|---|---|---|---|---|---|---|
| double-wishbone | joint and norm rows (check) | 20 x 21 | 20 | 20 | 0 | 1 | 0 | 8.6e-02 |
| double-wishbone | equation rows (classify) | 21 x 21 | 21 | 21 | 0 | 0 | 0 | 8.6e-02 |
| double-wishbone-two-leg | joint and norm rows (check) | 21 x 21 | 20 | 21 | 1 | 1 | 1 | 5.5e-17 |
| double-wishbone-two-leg | equation rows (classify) | 22 x 21 | 21 | 21 | 0 | 0 | 1 | 8.7e-02 |
| double-wishbone-ubj | joint and norm rows (check) | 20 x 21 | 20 | 20 | 0 | 1 | 0 | 8.6e-02 |
| double-wishbone-ubj | equation rows (classify) | 18 x 21 | 18 | 18 | 0 | 3 | 0 | 1.2e-01 |
The dashed line is otkd's tolerance, . Every value is plotted, an exact zero
clipped to 1e-18; the hinge and bushed check matrices are the same matrix, so their points
coincide. Read the table across: the hinge's 20 x 21 joint and norm rows have rank
20, one free motion and no zero singular value at all. The two-leg's 22 equation
rows have one spare row and also no zero. Only the two-leg's square joint and norm matrix shows a
zero, and that zero is the travel and the spare row at once.
The hinge's free motion, split by body (norm of each body's seven entries of ): lca 0.47, uca 0.84, up 0.26.
Every body moves: it is the wheel's travel.
Rank is a decision. In floating point an exact zero computes as round-off, about here, so rank means "singular values above ". The decision is trustworthy only if nothing changes when the tolerance moves: the tolerance must sit in a gap between the last value kept, , and the first discarded, . Move it and watch which verdicts survive.
| corner | matrix | rank at 1e-10 | rank at 1e-10 | tolerances giving the same rank |
|---|---|---|---|---|
double-wishbone |
joint and norm rows (check) | 20 | 20 | 0 to 2.1e-02 |
double-wishbone |
equation rows (classify) | 21 | 21 | 0 to 2.1e-02 |
double-wishbone-two-leg |
joint and norm rows (check) | 20 | 20 | 1.3e-17 to 2.1e-02 |
double-wishbone-two-leg |
equation rows (classify) | 21 | 21 | 0 to 2.1e-02 |
double-wishbone-ubj |
joint and norm rows (check) | 20 | 20 | 0 to 2.1e-02 |
double-wishbone-ubj |
equation rows (classify) | 18 | 18 | 0 to 3.4e-02 |
A rank changes only once the tolerance leaves its window. Most windows run from 0 (no value to discard) up to , between 2.1e-02 and 3.4e-02 here: any tolerance below that agrees. The two-leg's square joint and norm matrix has a real gap, about 15 decades between and , and otkd's 1e-10 sits in the middle of it. Above 3e-02 every verdict collapses: the tolerance is then discarding genuine stiffness of the linkage.
When a rank read from singular values breaks
- Assumes: a clear gap between the last kept and the first discarded singular value, with the tolerance inside it
- When it fails: near a toggle, or with badly scaled rows, the values decay with no gap and the rank flips as the tolerance moves; a zero can also be forced by the shape alone
- Check: move the tolerance a few decades each way and see the rank stay put; report and , never a count of zeros
3. Naming the spare row
Setting: the problem, its sets and its symbols
Problem. Given the two-leg corner's rows at rad and their least-squares solution , let . Find a unit and the rows it names; for each row , the rank and condition number of ; and how compares with the square solution and with the hinge corner's solution .
| Symbol | In | Meaning |
|---|---|---|
| the drive, 0.1 rad | ||
| least-squares solution: minimises (m and dimensionless) | ||
| the Jacobian of all 22 rows at | ||
| row of , as a column; | ||
| a left null vector, , sign fixed so its largest entry is positive; weights, dimensionless | ||
the rows named: , the tolerance diagnose uses |
||
| with row deleted | ||
| condition number , dimensionless | ||
unit vector of the upper arm's axis, from ucaf to ucar |
||
Newton's solution with uca-front.ty dropped |
||
| Newton's solution of the hinge corner at the same |
How these symbols connect
At drive rad, solving the two-leg corner's 22 rows by least squares gives a pose and the Jacobian with rows . A unit left null vector picks out the index set of rows with , whose weights we read against the upper arm's axis . Deleting a single row leaves a square Jacobian with condition number , and solving the reduced square system by Newton gives to compare with and with the hinge corner's pose .
Symbol-by-symbol notes
$q^\star$, $q\lt em>{\mathrm{sq}}$, and $q\lt /em>{\mathrm{hinge}}$
All three are 21-coordinate poses at the same drive rad, obtained by three routes: least squares on all 22 two-leg rows (), Newton on the 21 two-leg rows after dropping uca-front.ty (), and Newton on the 21-row hinge corner ().
Row vector $j_i$ vs matrix $J$
Each is row of written as a column, so row is . The left-null equation then reads .
Sign of $u$ and named rows $I$
A unit left null vector is defined only up to an overall sign ; choosing its largest-magnitude entry to be positive fixes the plot. The support set uses diagnose's cutoff to ignore round-off weights.
$J_{(i)}$ and $\kappa$
Deleting row from produces the square matrix , with subscript marking the omitted row. Its dimensionless condition number uses the retained singular values (all 21 when has full rank) to measure sensitivity of the square step.
Upper-arm axis $a$
The dimensionless unit vector points from front pivot ucaf to rear pivot ucar in world coordinates at the design geometry, giving the direction joining the upper arm's two spherical joints.
Solve the two-leg corner by least squares at a lower-arm angle of 0.1 rad and take the SVD of all
22 rows at the answer. The rank is 21, so there is 1
left null vector . Its non-zero weights (above 1e-10, the tolerance diagnose uses to name rows):
= 2.0e-16: a combination of five rows that is zero, which you can check by hand. At the design pose the same vector comes back to 6e-16, so the dependence does not depend on the pose.
Why these five. Each ball joint pins one point of the upper arm, three rows each. Two pinned
points of a rigid body are a fixed distance apart, and the arm's unit-quaternion row uca.unit
already says the arm is rigid. So the component of the two pins along the line joining them
restates a length the model knows. That line is the arm's axis, from ucaf to ucar:
. The weights follow it: the tz to ty ratio
is 0.0500 and the axis's to ratio is
0.0500. Front and rear carry opposite signs because it is their difference
that measures the distance between the pins; each pin's ty and tz weights are in the ratio
of to .
Reveal result (lock in your prediction above first)
Why. Write for row of . Since , deleting row leaves (that is, without entry , of length ) with . For the square that gives
A row that hardly takes part in the dependence leaves the others almost dependent.
| row dropped | weight | rank after | condition | after | bound |
|---|---|---|---|---|---|
uca-rear.ty |
0.699 | 21 | 46.8 | 8.84e-02 | 1.55e+00 |
uca-front.ty |
0.699 | 21 | 46.8 | 8.84e-02 | 1.56e+00 |
uca.unit |
0.140 | 21 | 56.3 | 7.19e-02 | 2.83e-01 |
uca-rear.tz |
0.035 | 21 | 473.2 | 8.67e-03 | 5.53e-02 |
uca-front.tz |
0.035 | 21 | 470.8 | 8.71e-03 | 5.57e-02 |
Dropping either tz row multiplies the condition number by
10.1. Dropping any one of the other
17 rows instead leaves rank 20 in 17 of 17 cases: a real constraint removed, an under-determined model that otkd
refuses. "Which member is removed is arbitrary" (the comment in study-square.yaml) holds for
the answer, not for the conditioning: drop the row with the largest weight.
Drop it, and compare. study-square.yaml drops uca-front.ty; otkd then classifies the 21 remaining rows as square and solves them by Newton.
source: solvers/otkd/examples/double-wishbone-two-leg/study-square.yaml:1-9
analysis: kinematics
drivers:
- actuator: lca-drive
law: {kind: linear, from: -0.1, to: 0.1, steps: 81}
# The row the SVD names as dependent. Which member of a dependent set is removed is
# arbitrary; that the solution does not change is the point.
drop: [uca-front.ty]
Reveal result (lock in your prediction above first)
At 0.1 rad, all 21 pose coordinates:
| comparison | largest difference |
|---|---|
two-leg, least squares on 22 rows, against two-leg, Newton with uca-front.ty dropped |
9.1e-16 |
| two-leg, least squares, against the hinge corner, Newton | 3.4e-12 |
The least-squares residual history is 1.0e-01, 4.7e-03, 1.2e-05, 1.8e-09, 3.7e-16, 3.7e-16, final cost 1.1e-31: every row holds to round-off, so the spare row agrees with the rest. (The cost is evidence that the rows are consistent, not that the answer is right; the comparison is.) And the two-leg corner is the hinge corner to the solvers' tolerance: two pinned points on a rigid arm allow exactly a hinge's rotation. The redundancy was ours: the mechanism has none; the equations restate the arm's length once more than needed.
source: `open_textbook.otkd.solvers.svd.diagnose` — `solvers/otkd/src/open_textbook/otkd/solvers/svd.py:23`
diagnose is this section in one function: one SVD, one tolerance for the rank and for naming rows, and names rather than indices.
def diagnose(system: System, q: np.ndarray, *, rows: list[int] | None = None, rtol: float = 1e-10) -> Diagnosis:
"""Rank, left null space and participating row names at `q`.
`rtol` governs both decisions: singular values at or below `rtol * s[0]` are
treated as zero when computing `rank`, and rows whose largest left-null
coefficient exceeds `rtol` are named in `dependent_rows`.
"""
rows = system.constrained if rows is None else rows
jac = system.jacobian(q, rows)
rank, null, s = left_null(jac, rtol=rtol)
names = [system.problem.rows[i].name for i in rows]
if null.shape[1]:
weight = np.max(np.abs(null), axis=1)
dependent = tuple(name for name, w in zip(names, weight) if w > rtol)
else:
dependent = ()
condition = float(s[0] / s[rank - 1]) if rank else float("inf")
return Diagnosis(
singular_values=s,
rank=rank,
redundancy=len(rows) - rank,
dependent_rows=dependent,
null_space=null,
condition=condition,
)
When naming the spare row from the left null vector breaks
- Assumes: the rows are consistent and the left null space is one-dimensional, so its vector is unique up to sign
- When it fails: with two spare rows any basis mixes the two dependences, so weights are not row by row; with an inconsistency the residual stalls and least squares averages rows that disagree
- Check: and the final residual at round-off; drop the largest-weight row and compare square Newton with least squares
4. Choosing the solve: System.classify
Setting: the problem, its sets and its symbols
Problem. Given a corner's rows , its compliances and the design pose , find the class from the deflecting springs and the rank of .
| Symbol | In | Meaning |
|---|---|---|
| the number of unknowns, 21 | ||
the design pose, where classify looks |
||
compliance of each spring row, m/N; the bushed corner's three are those of uca-up in |
||
| deflecting springs: spring rows with | ||
| the equation rows: every row not in , the driver included | ||
| the Jacobian of the equation rows at | ||
| the rank of at |
How these symbols connect
At the design pose , System.classify first reads the compliance vector on the spring rows to find the deflecting springs and excludes them from the equation rows . It then builds the Jacobian of those equation rows (driver included) and computes its numerical rank at . Together, , , , and assign the corner to one of four solver classes: equilibrium, under, square, or redundant.
Symbol-by-symbol notes
Compliance $c$ and deflecting springs $S_c$
Each compliance is in m/N (deflection per unit force, the reciprocal of stiffness). Rows with belong to and deflect under load; setting removes a row from so it acts as a rigid equation again.
Equation rows $E$ vs check rows
Whereas otkd check in §2 drops the driver and keeps all springs, classify drops only the deflecting springs and keeps the driver inside , so .
$J\lt em>E$ and rank $r$ at $q\lt /em>0$
The Jacobian has shape with , evaluated once at the design pose ; its rank is computed at otkd's relative tolerance .
Single-pose scope at $q_0$
Because classify evaluates only at , its verdict reflects the design pose alone and cannot detect a rank drop that arises elsewhere in a sweep.
M03 §6 showed this function on a toy matrix. It runs once, at the design pose ,
on the equation rows: every row except a spring that deflects. A spring with zero
compliance is a rigid row again. Then: any deflecting spring means equilibrium
(minimise the energy subject to the rest); otherwise rank below is under and
refused, rows equal to rank is square (Newton), and more rows than rank is
redundant (least squares, then diagnose).
source: `open_textbook.otkd.solvers.system.System.classify` — `solvers/otkd/src/open_textbook/otkd/solvers/system.py:78`
def classify(self) -> str:
"""`square`, `redundant`, `under`, or `equilibrium`."""
if self.springs:
return "equilibrium"
rank, _, _ = rank_and_null(self.jacobian(self.problem.q0()), rtol=1e-10)
n = self.problem.n
if rank < n:
return "under"
return "square" if len(self.constrained) == rank else "redundant"
source: `open_textbook.otkd.solvers.system.rank_and_null` — `solvers/otkd/src/open_textbook/otkd/solvers/system.py:89`
def rank_and_null(matrix: np.ndarray, rtol: float = 1e-10) -> tuple[int, np.ndarray, np.ndarray]:
"""Rank, an orthonormal basis of the right null space, and all singular values."""
_, s, vt = np.linalg.svd(matrix, full_matrices=True)
if s.size == 0:
return 0, np.eye(matrix.shape[1]), s
rank = int((s > rtol * s[0]).sum())
return rank, vt[rank:].T, s
| corner | deflecting springs | equation rows | rank | classify |
solver | |
|---|---|---|---|---|---|---|
double-wishbone |
0 | 21 | 21 | 21 | square | Newton |
double-wishbone-two-leg |
0 | 22 | 21 | 21 | redundant | least squares, then diagnose |
double-wishbone-ubj |
3 | 18 | 18 | 21 | equilibrium | minimise the energy subject to the rigid rows |
What the bush changes. The bushed corner's 21 rows are the hinge corner's 21 rows: the two
Jacobians at differ by exactly 0. A bush changes no equation, only the role of three of
them (compliance.uca-up.tx 1e-06 m/N, compliance.uca-up.ty 1e-06 m/N, compliance.uca-up.tz 1e-06 m/N). Taken out of the equation rows, they leave 18 rows of rank 18, three short of
: by the rank test alone the corner is under-determined, with three free motions, the bush's
translations. classify asks about springs before it asks about rank, because those motions
are closed by the energy, not by an equation. Turn the switch: with zero compliance the springs
are rigid rows again and the verdict is the hinge corner's.
classify looks once, at . Nothing in it can see a pose elsewhere in the sweep where the
square system loses rank. That is the next section.
When `System.classify` breaks
- Assumes: the rank at the design pose is the rank everywhere the sweep goes
- When it fails: a toggle inside the travel makes the square system singular there, and
classify, which looks once at , cannot see it - Check: track , or Newton's step count, across the sweep
5. A toggle: where a singular value falls to zero
Setting: the problem, its sets and its symbols
Problem. Given the hinge corner's square rows , let be the largest drive for which has a solution reached continuously from . For rad, find and of at the solution , and the residual history of Newton started from ; and at , the singular vectors of .
| Symbol | In | Meaning |
|---|---|---|
| the drive and its largest feasible value, rad | ||
| distance to the fold, , rad | ||
| the solution followed continuously from | ||
| at , all 21 rows including the driver | ||
| the largest and smallest singular values of | ||
| condition number , dimensionless | ||
| arc length along the solution curve , mixed units | ||
| a constant of the curve near the fold | ||
| Newton's iterate at step | ||
| the residual Newton reports, in row units | ||
| left and right singular vectors of at | ||
| machine epsilon, about 2.2e-16 |
How these symbols connect
As the drive approaches the fold limit from below with gap , following the continuous solution branch (parametrised along the curve by arc length , with local curve constant ) gives a Jacobian whose extreme singular values set and limit pose accuracy relative to . Starting Newton from generates iterates tracked by the max-norm residual , while at itself the singular vectors of reveal the critical row dependence and free motion.
Symbol-by-symbol notes
$\theta^*$ and $\delta = \theta^* - \theta$
Here (rad) is the largest drive angle reached continuously from on this assembly branch; past no nearby solution exists. The positive distance rad measures how close sits below that fold.
$J$, $\sigma\lt em>1$, $\sigma\lt /em>{\min}$, and $\kappa$
With the driver included, the hinge corner's Jacobian at is square () with singular values . The dimensionless ratio grows without bound as .
Arc length $s$ and curve constant $c$
Near , parametrising the solution locus by arc length stays smooth where the curve turns back in , and is a local geometry constant of that turn. Because and carry mixed units, has mixed units too.
Iterates $q\lt em>k$, $\lVert \Phi(q\lt /em>k) \rVert_\infty$, and $\epsilon$
Every Newton run starts from the same pose and tracks the largest absolute row entry across all 21 rows (in their own units); machine epsilon sets the round-off scale against which bounds pose accuracy.
Singular vectors $u, v$ at $\theta^*$
At the fold, (left) and (right) are the unit singular vectors paired with : as in §2, describes an infinitesimal pose motion and weights the 21 rows, driver included.
Drive the hinge corner's lower arm well past its travel (the study sweeps ±0.1 rad). Stepping the angle by 0.05 rad and starting each Newton solve from the last pose, otkd's Newton converges at 1.20 rad and fails at 1.25 rad. Somewhere between lies the largest angle at which the corner can be assembled at all. Call the distance to it . At the square Jacobian is singular: the solution curve turns back, and the driver row, which sets the angle, stops being independent of the joints.
Reveal result (lock in your prediction above first)
rad, about 70.9°, found by the secant method on , which is nearly linear in for exactly this reason. The fitted slope of against is 0.499; the condition number rises with slope , from 150 at = 1e-1 to 1.5e+06 at = 1e-9.
Why one half. Along the solution curve , parametrised by arc length, the rows hold identically. At the fold is at a maximum, so , while , a smooth function crossing zero, is linear in . Eliminate : , and . M03 §3's bound then says a round-off residual buys a pose accurate only to about : about 3e-10 at = 1e-9.
Newton on the way in. Each solve starts from the pose at , as a
sweep frame would, and runs otkd's own newton. Move towards the fold.
At = 1e-6.0: 11 steps (against 5 at 1e-1), = 8.12e-05, condition number 4.61e+04. Residual ratios step to step: 0.50, 0.65, 0.82, 0.74, 0.23, 0.06, 0.07, 0.15, 0.07, 0.01, 0.00. No step has a residual between 10δ and 1e-4 at this distance. At = 1e-9 that median is 0.24.
This is M02 §4's multiple root in 21 dimensions. Near the fold the root is nearly double, the residual behaves like the square of the pose error, and Newton removes only half the error per step: a residual ratio near 1/4, while the residual is still large next to . The quadratic finish returns only once the error is smaller than the distance to the other branch, which shrinks like . So the slow phase lengthens as the fold nears: 5 steps at 1e-1, 15 at 1e-9.
What is singular at the fold. At , Newton's residual is 9.2e-13 and = 2.5e-08 against = 3.74.
- The right vector, a motion the rows allow. Split by body:
lca1.1e-08,uca6.4e-07,up1.0e+00. Only the upright moves. Rates at which its points move along it:lbj3.7e-08,ubj2.4e-07,tro1.3e-01,wc6.6e-02. The two ball joints stay put and the tie-rod end moves: the upright spins about the line through its ball joints, the steering axis. That spin is the freedom the tie rod controls, and here the tie rod has lost its grip: the cosine between the tie rod and the velocity of its outer end is -8.0e-07, so a small spin does not change the tie rod's length to first order. - The left vector, a dependence among the rows. It has weight above 1e-10 on 21 of the 21 rows; the driver row's weight is 0.14. Yet the rows are consistent: Newton reached 9e-13. A dense left vector is not by itself a conflict; the residual decides.
- Past the fold. At otkd's Newton, capped at 20 steps, raises: "Newton did not converge in 20 steps: |r|inf = 8.496e-04, worst row up.unit". No pose satisfies the rows; the residual stalls at a floor, the signature of an inconsistent system.
None of this shows at , where classify looked: the condition number there is
47.3. The fold sits about 71° from it, far outside the
study's ±0.1 rad, which is why the corner is safe to sweep. A study that drove further would
see Newton's step count climb first.
When Newton near a toggle breaks
- Assumes: the Jacobian is nonsingular at the root
- When it fails: at a fold the root is double: convergence goes linear, grows like , and past the fold Newton stalls at a residual floor and raises
- Check: a residual ratio near 1/4 per step in the slow phase, and halving for every factor of four in
Practice
Hint 1
near a fold.
Hint 2
falls by , so falls by .
Mixed practice
Check yourself (closed book)
Keep these:
- Right null space: motions the rows allow, dimension . Left null space: dependences among rows, dimension .
- A list of singular values shows zeros, which can hide a redundancy or show a mobility. Count from the rank.
- A rank is a decision with a tolerance; trust it when the tolerance sits in a wide gap.
- The left null vector names the spare rows; drop the one with the largest weight, and compare the square Newton answer with least squares.
- The two-leg corner's spare row was ours: it restates the arm's rigidity, and the pose is the hinge corner's.
classifylooks once, at . A toggle elsewhere shows as , linear Newton, and a pose good only to .
Your connection
Think of a model of your own with more equations than it needs, or a sweep that slowed near the end of its range. Which null space would have told you, and what would you have dropped?
Answers
Practice A. 0.0557 (measured 0.0087).
Practice B. 8.08, against the measured 8.12.
Practice C. 20 steps.
Mixed practice. keep Newton and watch the fold; diagnose and drop; minimise the energy subject to the rigid rows.
Where the maths is derived
Optional. These notes give the intuition and application; the sources below give the full derivations and proofs.
§2 Singular values, and the two null spaces
- Trefethen and Bau (1997), Numerical Linear Algebra: the SVD, the subspaces it reveals, rank, and low-rank approximation (lectures 4–5).
§3 Naming the spare row
- otkd, the model, its exports and a generated solver:
diagnose, and the two-leg corner's rows and dependent set (docs/problem-mapping.md§6 and §8).
§4 Choosing the solve
- otkd, the model, its exports and a generated solver:
System.classifyand the solver each class calls (docs/problem-mapping.md§4.1).
§5 A toggle
- Nocedal and Wright (2006), Numerical Optimization: Newton's method for nonlinear equations, and the nonsingular Jacobian its quadratic convergence needs (ch. 11).
- Trefethen and Bau (1997), Numerical Linear Algebra: conditioning and the bound from relative residual to relative error (lecture 12).
Compiled from notebooks/suspension/s04_the_redundancy_was_ours.py — run locally with cd notebooks && uv run marimo edit suspension/s04_the_redundancy_was_ours.py for live Python scratch cells.
Back to the book: 1.4 The redundancy was ours · Chapter 1 Review