Maths Applied1.4

All books

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 mm, nn 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.classify and predict its verdict for a corner
  • recognise a toggle from σmin⁡\sigma_{\min}, 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.

Predict first. Try first: the two-leg corner holds the upper arm with two ball joints instead of a hinge, and has one row more than unknowns. Solve it and the hinge corner at the same lower-arm angle (0.1 rad). Compared with the hinge corner's, its pose is

Choose a prediction

Check answer (without scripting)

Answer: the same, to the solvers' tolerance: the two models describe one motion. Two ball joints on a rigid arm allow exactly the rotation a hinge allows. The spare row restates the arm's rigidity, which the model already says once.

Warm-up: remember

1. The frame's rear pivot is 1 mm out, the arm's is not. Which direction of error raises the floor in proportion to the error?

Question 1
How sure?

2. A camber sweep has a 20° step between two frames, and every frame's residual is about 1e-15. The most likely cause is

Question 2
How sure?

3. The compliant corner's KKT matrix has blocks HH and BTB^{\mathsf T} over BB and 00, with 21 unknowns and 20 constraint rows. Why not use Cholesky or conjugate gradients on it?

Question 3
How sure?

Show answers and explanations

1. Along the line between the two pivots, the arm's axis. The left null vector's weights are the axis direction: the floor is ∣uTe∣|u^{\mathsf T} e|, about 0.70 per unit error along the axis and nearly zero across it.

2. the solve landed on the other assembly at that frame. Both assemblies satisfy the rows to round-off. Seed each frame from the previous one and flag a frame that moves far from its seed (otkd: 0.25 rad or 0.05 m).

3. It is symmetric but indefinite, with one negative eigenvalue per constraint row. With BB of full row rank and HH positive on the null space of BB, the inertia is 21 positive and 20 negative. Cholesky and CG need positive definiteness.

1. Three corners, counted

Setting: the problem, its sets and its symbols

Problem. Given a corner model (its moving bodies B\mathcal B, its joints and one position actuator), find the number of unknowns nn, the rows Φ:Rn×Rp×R→Rm\Phi : \mathbb{R}^n \times \mathbb{R}^p \times \mathbb{R} \to \mathbb{R}^m, and the partition of the row indices into hard, driver, norm and spring rows.

Symbol In Meaning
B\mathcal{B} {lca,uca,up}\{\mathrm{lca}, \mathrm{uca}, \mathrm{up}\} the moving bodies: lower arm, upper arm, upright
qq Rn\mathbb{R}^{n} the unknowns: per body a position (m) and a unit quaternion (dimensionless)
nn N\mathbb{N} the number of unknowns, seven per moving body
gg Rp\mathbb{R}^{p} the data: geometry numbers, points in m, compliances in m/N
θ\theta R\mathbb{R} the drive: the lower arm's angle about its hinge, rad
Φ\Phi Rn×Rp×R→Rm\mathbb{R}^{n} \times \mathbb{R}^{p} \times \mathbb{R} \to \mathbb{R}^{m} the rows Φ(q,g,θ)\Phi(q, g, \theta); each in m (translations, lengths), rad (the driver) or dimensionless (rotations, norms); a pose solves the model when Φ=0\Phi = 0
mm N\mathbb{N} the number of rows
H,D,N,SH, D, N, S ⊆{1,…,m}\subseteq \{1, \dots, m\} index sets of hard, driver, norm and spring rows; disjoint, with union {1,…,m}\{1, \dots, m\}
How these symbols connect

Each of the three corner models assigns seven coordinates per moving body in B\mathcal{B} to form the unknown pose vector q∈Rnq \in \mathbb{R}^n. Given the geometry data g∈Rpg \in \mathbb{R}^p and the lower-arm drive angle θ∈R\theta \in \mathbb{R}, the constraint map Φ(q,g,θ)\Phi(q, g, \theta) produces mm scalar residuals in mixed units, and an assembled pose satisfies Φ=0\Phi = 0. Partitioning {1,…,m}\{1, \dots, m\} into the disjoint index sets HH, DD, NN, and SS 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 B={lca,uca,up}\mathcal{B} = \{\mathrm{lca}, \mathrm{uca}, \mathrm{up}\} contributes three world-frame position coordinates (m) and a dimensionless four-component unit quaternion, giving n=3×7=21n = 3 \times 7 = 21 unknowns for every corner. The ground is fixed and excluded from B\mathcal{B}.

Data $g$ vs drive $\theta$

The parameter vector g∈Rpg \in \mathbb{R}^p holds fixed corner geometry (hardpoints in m, site frames, and any bush compliances in m/N), whereas θ∈R\theta \in \mathbb{R} is the single kinematic input setting the lower arm's hinge angle in rad.

Mixed row units of $\Phi$

Entries of Φ(q,g,θ)∈Rm\Phi(q, g, \theta) \in \mathbb{R}^m 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 {1,…,m}\{1, \dots, m\} into hard joints (HH), the driver (DD), quaternion norms (NN), and spring rows (SS). 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 n=3×7=21n = 3 \times 7 = 21 unknowns qq. 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 nn 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 RR and the design pose q0q_0, let J=∂ΦR/∂q (q0)∈Rm×nJ = \partial \Phi_R / \partial q\,(q_0) \in \mathbb{R}^{m \times n}. Find its singular values, its numerical rank rr at a tolerance rtol\mathrm{rtol}, bases of ker⁡J\ker J and ker⁡JT\ker J^{\mathsf T}, and the range of rtol\mathrm{rtol} over which rr does not change.

Symbol In Meaning
RR ⊆{1,…,∣Φ∣}\subseteq \{1, \dots, \lvert\Phi\rvert\} the rows kept: joint and norm rows H∪N∪SH \cup N \cup S (as check takes them), or the equation rows, all but deflecting springs (as classify takes them)
m,nm, n N\mathbb{N} m=∣R∣m = \lvert R \rvert rows kept; n=21n = 21 unknowns
q0q_0 Rn\mathbb{R}^{n} the design pose: zero positions (m), identity quaternions
JJ Rm×n\mathbb{R}^{m \times n} the Jacobian of the kept rows at q0q_0; entry (i,k)(i, k) in row ii's unit per unit of qkq_k
U,VU, V O(m),  O(n)O(m), \; O(n) orthogonal matrices of left vectors ui∈Rmu_i \in \mathbb{R}^m (over rows) and right vectors vi∈Rnv_i \in \mathbb{R}^n (over unknowns)
σi\sigma_i R≥0\mathbb{R}_{\ge 0} the singular values, i=1,…,min⁡(m,n)i = 1, \dots, \min(m, n), descending; Jvi=σiuiJ v_i = \sigma_i u_i
rtol\mathrm{rtol} (0,1)(0, 1) the relative rank tolerance, dimensionless; otkd uses 10−1010^{-10}
rr {0,…,min⁡(m,n)}\{0, \dots, \min(m, n)\} the numerical rank: the number of σi>rtol σ1\sigma_i > \mathrm{rtol}\,\sigma_1
ker⁡J\ker J ⊆Rn\subseteq \mathbb{R}^{n} right null space: motions δq\delta q with J δq=0J\,\delta q = 0
ker⁡JT\ker J^{\mathsf T} ⊆Rm\subseteq \mathbb{R}^{m} left null space: row weights uu with uTJ=0u^{\mathsf T} J = 0
How these symbols connect

Selecting a row subset RR of Φ\Phi and linearising at the design pose q0q_0 yields the m×nm \times n Jacobian J=∂ΦR/∂q (q0)J = \partial \Phi_R / \partial q\,(q_0), which maps small pose changes δq∈Rn\delta q \in \mathbb{R}^n to first-order residual changes J δq∈RmJ\,\delta q \in \mathbb{R}^m. Factorising J=UΣVTJ = U \Sigma V^{\mathsf T} produces orthogonal bases U∈O(m)U \in O(m) over rows and V∈O(n)V \in O(n) over unknowns, linked by the descending singular values σ1≥⋯≥σmin⁡(m,n)≥0\sigma_1 \ge \dots \ge \sigma_{\min(m, n)} \ge 0 via Jvi=σiuiJ v_i = \sigma_i u_i. Comparing each σi\sigma_i against rtol σ1\mathrm{rtol}\,\sigma_1 determines the numerical rank rr and separates active directions from the two null spaces ker⁡J\ker J and ker⁡JT\ker J^{\mathsf T}.

Symbol-by-symbol notes
Row subset $R$ (check vs classify)

The row count m=∣R∣m = \lvert R \rvert depends on which rows are selected: check keeps H∪N∪SH \cup N \cup S (excluding the driver DD), whereas classify keeps all rows except deflecting springs (including DD).

Jacobian $J$ and mixed units

Each entry Jik=∂Φi/∂qkJ_{ik} = \partial \Phi_i / \partial q_k at q0q_0 carries row ii's unit divided by unknown kk's unit, so the singular values σi\sigma_i 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 (UTU=ImU^{\mathsf T} U = I_m, VTV=InV^{\mathsf T} V = I_n), but they live in different spaces: columns uiu_i of UU weight rows in Rm\mathbb{R}^m, while columns viv_i of VV describe pose motions in Rn\mathbb{R}^n.

$\ker J$ vs $\ker J^{\mathsf T}$

Do not swap the two null spaces. The right null space ker⁡J⊆Rn\ker J \subseteq \mathbb{R}^n holds infinitesimal motions δq\delta q with J δq=0J\,\delta q = 0; the left null space ker⁡JT⊆Rm\ker J^{\mathsf T} \subseteq \mathbb{R}^m holds row weights uu with uTJ=0u^{\mathsf T} J = 0.

$\mathrm{rtol}$ and numerical rank $r$

Because floating-point round-off turns exact zeros into tiny positive numbers, numerical rank counts singular values satisfying σi>rtol σ1\sigma_i > \mathrm{rtol}\,\sigma_1. Scaling by σ1\sigma_1 keeps rtol∈(0,1)\mathrm{rtol} \in (0, 1) dimensionless; otkd defaults to 10−1010^{-10}.

Linearise the rows about a pose: a small motion δq\delta q changes the rows by J δqJ\,\delta q, with JJ the m×nm \times n Jacobian. Every matrix factors as

J=UΣVT,Jvi=σiui,JTui=σivi,J = U \Sigma V^{\mathsf T}, \qquad J v_i = \sigma_i u_i, \qquad J^{\mathsf T} u_i = \sigma_i v_i,

with UU (m×mm \times m) and VV (n×nn \times n) orthogonal and σ1≥σ2≥⋯≥0\sigma_1 \ge \sigma_2 \ge \dots \ge 0 on the diagonal of Σ\Sigma. There are min⁡(m,n)\min(m, n) singular values. The two sets of vectors answer two different questions.

VV lives in the space of unknowns, UU in the space of equations. A redundancy is an equation too many, so it is a left vector.

Predict first. otkd check ranks the two-leg corner's joint and norm rows, leaving the driver out: a 21×2121 \times 21 matrix of rank 20. Its SVD shows exactly one zero singular value. That zero belongs to

Choose a prediction

Check answer (without scripting)

Answer: both a free motion and the spare row. Square, rank 20: n−r=1n - r = 1 right null vector, the wheel's travel, and m−r=1m - r = 1 left null vector, the spare row. One zero carries both.

Reveal result (lock in your prediction above first)

Counting. If rr singular values are non-zero, the last n−rn - r columns of VV span the right null space and the last m−rm - r columns of UU the left one. The list holds min⁡(m,n)\min(m, n) values, so it shows min⁡(m,n)−r\min(m, n) - r zeros. For a constraint matrix:

mobility=n−r,redundancy=m−r,zeros shown=min⁡(m,n)−r.\text{mobility} = n - r, \qquad \text{redundancy} = m - r, \qquad \text{zeros shown} = \min(m, n) - r .

The zeros shown equal the redundancy only when m≤nm \le n, and the mobility only when n≤mn \le m.

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
1611162110⁻¹⁷10⁻¹³10⁻⁹10⁻⁵10⁻¹hingetwo-legbushedsingular value numberjoint and norm rows (check)
1611162110⁻¹10⁰hingetwo-legbushedsingular value numberequation rows (classify)

The dashed line is otkd's tolerance, 10−10σ110^{-10}\sigma_1. 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 vv): 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 10−1710^{-17} here, so rank means "singular values above rtol⋅σ1\text{rtol}\cdot\sigma_1". The decision is trustworthy only if nothing changes when the tolerance moves: the tolerance must sit in a gap between the last value kept, σr\sigma_r, and the first discarded, σr+1\sigma_{r+1}. Move it and watch which verdicts survive.

Figure 1
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 σr/σ1\sigma_r/\sigma_1, 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 σ20\sigma_{20} and σ21\sigma_{21}, 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 m−rm - r and n−rn - r, 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 Φ(⋅,θ):R21→R22\Phi(\cdot, \theta) : \mathbb{R}^{21} \to \mathbb{R}^{22} at θ=0.1\theta = 0.1 rad and their least-squares solution q⋆q^\star, let J=∂Φ/∂q (q⋆)J = \partial\Phi/\partial q\,(q^\star). Find a unit u∈ker⁡JTu \in \ker J^{\mathsf T} and the rows it names; for each row ii, the rank and condition number of J(i)J_{(i)}; and how q⋆q^\star compares with the square solution qsqq_{\mathrm{sq}} and with the hinge corner's solution qhingeq_{\mathrm{hinge}}.

Symbol In Meaning
θ\theta R\mathbb{R} the drive, 0.1 rad
q⋆q^\star R21\mathbb{R}^{21} least-squares solution: minimises 12∥Φ(q,θ)∥2\tfrac12 \lVert \Phi(q, \theta) \rVert^2 (m and dimensionless)
JJ R22×21\mathbb{R}^{22 \times 21} the Jacobian of all 22 rows at q⋆q^\star
jij_i R21\mathbb{R}^{21} row ii of JJ, as a column; i∈{1,…,22}i \in \{1, \dots, 22\}
uu R22\mathbb{R}^{22} a left null vector, ∥u∥=1\lVert u \rVert = 1, sign fixed so its largest entry is positive; weights, dimensionless
II ⊆{1,…,22}\subseteq \{1, \dots, 22\} the rows named: ∣ui∣>10−10\lvert u_i \rvert > 10^{-10}, the tolerance diagnose uses
J(i)J_{(i)} R21×21\mathbb{R}^{21 \times 21} JJ with row ii deleted
κ\kappa [1,∞][1, \infty] condition number σ1/σr\sigma_1/\sigma_{r}, dimensionless
aa R3\mathbb{R}^{3} unit vector of the upper arm's axis, from ucaf to ucar
qsqq_{\mathrm{sq}} R21\mathbb{R}^{21} Newton's solution with uca-front.ty dropped
qhingeq_{\mathrm{hinge}} R21\mathbb{R}^{21} Newton's solution of the hinge corner at the same θ\theta
How these symbols connect

At drive θ=0.1\theta = 0.1 rad, solving the two-leg corner's 22 rows by least squares gives a pose q⋆∈R21q^\star \in \mathbb{R}^{21} and the 22×2122 \times 21 Jacobian JJ with rows jiTj_i^{\mathsf T}. A unit left null vector u∈ker⁡JTu \in \ker J^{\mathsf T} picks out the index set II of rows with ∣ui∣>10−10\lvert u_i \rvert > 10^{-10}, whose weights we read against the upper arm's axis aa. Deleting a single row ii leaves a square 21×2121 \times 21 Jacobian J(i)J_{(i)} with condition number κ\kappa, and solving the reduced square system by Newton gives qsqq_{\mathrm{sq}} to compare with q⋆q^\star and with the hinge corner's pose qhingeq_{\mathrm{hinge}}.

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 θ=0.1\theta = 0.1 rad, obtained by three routes: least squares on all 22 two-leg rows (q⋆q^\star), Newton on the 21 two-leg rows after dropping uca-front.ty (qsqq_{\mathrm{sq}}), and Newton on the 21-row hinge corner (qhingeq_{\mathrm{hinge}}).

Row vector $j_i$ vs matrix $J$

Each ji∈R21j_i \in \mathbb{R}^{21} is row ii of J∈R22×21J \in \mathbb{R}^{22 \times 21} written as a column, so row ii is jiTj_i^{\mathsf T}. The left-null equation uTJ=0u^{\mathsf T} J = 0 then reads ∑i=122uijiT=0\sum_{i=1}^{22} u_i j_i^{\mathsf T} = 0.

Sign of $u$ and named rows $I$

A unit left null vector is defined only up to an overall sign ±1\pm 1; choosing its largest-magnitude entry to be positive fixes the plot. The support set I={i:∣ui∣>10−10}I = \{i : \lvert u_i \rvert > 10^{-10}\} uses diagnose's cutoff to ignore round-off weights.

$J_{(i)}$ and $\kappa$

Deleting row ii from JJ produces the square 21×2121 \times 21 matrix J(i)J_{(i)}, with subscript (i)(i) marking the omitted row. Its dimensionless condition number κ=σ1/σr\kappa = \sigma_1 / \sigma_r uses the retained singular values (all 21 when J(i)J_{(i)} has full rank) to measure sensitivity of the square step.

Upper-arm axis $a$

The dimensionless unit vector a∈R3a \in \mathbb{R}^3 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 uu. Its non-zero weights (above 1e-10, the tolerance diagnose uses to name rows):

uca-front.ty-0.699uca-front.tz-0.035uca-rear.ty0.699uca-rear.tz0.035uca.unit0.14weight in the left null vector u

∥uTJ∥∞\|u^{\mathsf T} J\|_\infty = 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: a=(0.0000,−0.9988,−0.0499)a = (0.0000, -0.9988, -0.0499). The weights follow it: the tz to ty ratio is 0.0500 and the axis's zz to yy 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 aya_y to aza_z.

Predict first. Any one of the five named rows can be dropped to make the system square, and the answer is the same. Drop uca-front.tz (weight about 0.035) instead of uca-front.ty (about 0.70). The condition number of the square system that remains is

Choose a prediction

Check answer (without scripting)

Answer: about ten times larger. Dropping a row with a small weight leaves the strongly dependent rows behind, nearly, not exactly, dependent: the bound below forces a small σmin⁡\sigma_{\min}.

Reveal result (lock in your prediction above first)

Why. Write jiTj_i^{\mathsf T} for row ii of JJ. Since ∑kukjkT=0\sum_k u_k j_k^{\mathsf T} = 0, deleting row ii leaves u′u' (that is, uu without entry ii, of length 1−ui2\sqrt{1 - u_i^2}) with u′TJ′=−ui jiTu'^{\mathsf T} J' = -u_i\, j_i^{\mathsf T}. For the square J′J' that gives

σmin⁡(J′)≤∣ui∣ ∥ji∥1−ui2.\sigma_{\min}(J') \le \frac{|u_i|\,\|j_i\|}{\sqrt{1 - u_i^2}} .

A row that hardly takes part in the dependence leaves the others almost dependent.

row dropped weight ∣ui∣\lvert u_i \rvert rank after condition σ1/σ21\sigma_1/\sigma_{21} σmin⁡\sigma_{\min} 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: uTJu^{\mathsf T} J 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 Φ\Phi, its compliances cc and the design pose q0q_0, find the class classify⁡∈{square,redundant,under,equilibrium}\operatorname{classify} \in \{\text{square}, \text{redundant}, \text{under}, \text{equilibrium}\} from the deflecting springs ScS_c and the rank rr of JEJ_E.

Symbol In Meaning
nn N\mathbb{N} the number of unknowns, 21
q0q_0 Rn\mathbb{R}^{n} the design pose, where classify looks
cc R≥0∣S∣\mathbb{R}_{\ge 0}^{\lvert S \rvert} compliance of each spring row, m/N; the bushed corner's three are those of uca-up in x,y,zx, y, z
ScS_c ⊆S\subseteq S deflecting springs: spring rows with ci>0c_i > 0
EE ⊆{1,…,∣Φ∣}\subseteq \{1, \dots, \lvert \Phi \rvert\} the equation rows: every row not in ScS_c, the driver included
JEJ_E R∣E∣×n\mathbb{R}^{\lvert E \rvert \times n} the Jacobian of the equation rows at q0q_0
rr {0,…,n}\{0, \dots, n\} the rank of JEJ_E at rtol=10−10\mathrm{rtol} = 10^{-10}
How these symbols connect

At the design pose q0q_0, System.classify first reads the compliance vector cc on the spring rows SS to find the deflecting springs Sc={i∈S:ci>0}S_c = \{i \in S : c_i > 0\} and excludes them from the equation rows EE. It then builds the Jacobian JE∈R∣E∣×nJ_E \in \mathbb{R}^{\lvert E \rvert \times n} of those equation rows (driver included) and computes its numerical rank rr at rtol=10−10\mathrm{rtol} = 10^{-10}. Together, ScS_c, ∣E∣\lvert E \rvert, rr, and nn 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 ci≥0c_i \ge 0 is in m/N (deflection per unit force, the reciprocal of stiffness). Rows with ci>0c_i > 0 belong to ScS_c and deflect under load; setting ci=0c_i = 0 removes a row from ScS_c so it acts as a rigid equation again.

Equation rows $E$ vs check rows

Whereas otkd check in §2 drops the driver DD and keeps all springs, classify drops only the deflecting springs ScS_c and keeps the driver inside EE, so ∣E∣=∣Φ∣−∣Sc∣\lvert E \rvert = \lvert \Phi \rvert - \lvert S_c \rvert.

$J\lt em>E$ and rank $r$ at $q\lt /em>0$

The Jacobian JEJ_E has shape ∣E∣×n\lvert E \rvert \times n with n=21n = 21, evaluated once at the design pose q0q_0; its rank r≤min⁡(∣E∣,n)r \le \min(\lvert E \rvert, n) is computed at otkd's relative tolerance rtol=10−10\mathrm{rtol} = 10^{-10}.

Single-pose scope at $q_0$

Because classify evaluates JEJ_E only at q0q_0, 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 q0q_0, 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 nn 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 nn 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 q0q_0 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 nn: 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 q0q_0. 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 q0q_0, cannot see it
  • Check: track σmin⁡/σ1\sigma_{\min}/\sigma_1, 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 Φ(⋅,θ):R21→R21\Phi(\cdot, \theta) : \mathbb{R}^{21} \to \mathbb{R}^{21}, let θ∗\theta^* be the largest drive for which Φ(q,θ)=0\Phi(q, \theta) = 0 has a solution reached continuously from q0q_0. For δ=θ∗−θ∈[10−9,10−1]\delta = \theta^* - \theta \in [10^{-9}, 10^{-1}] rad, find σmin⁡\sigma_{\min} and κ\kappa of JJ at the solution q(θ)q(\theta), and the residual history of Newton started from q(θ∗−0.05)q(\theta^* - 0.05); and at θ∗\theta^*, the singular vectors of σmin⁡\sigma_{\min}.

Symbol In Meaning
θ,θ∗\theta, \theta^* R\mathbb{R} the drive and its largest feasible value, rad
δ\delta (0,∞)(0, \infty) distance to the fold, θ∗−θ\theta^* - \theta, rad
q(θ)q(\theta) R21\mathbb{R}^{21} the solution followed continuously from q0q_0
JJ R21×21\mathbb{R}^{21 \times 21} ∂Φ/∂q\partial \Phi / \partial q at q(θ)q(\theta), all 21 rows including the driver
σ1,σmin⁡\sigma_1, \sigma_{\min} R≥0\mathbb{R}_{\ge 0} the largest and smallest singular values of JJ
κ\kappa [1,∞][1, \infty] condition number σ1/σmin⁡\sigma_1 / \sigma_{\min}, dimensionless
ss R\mathbb{R} arc length along the solution curve (q(s),θ(s))(q(s), \theta(s)), mixed units
cc R\mathbb{R} a constant of the curve near the fold
qkq_k R21\mathbb{R}^{21} Newton's iterate at step k∈Nk \in \mathbb{N}
∥Φ(qk)∥∞\lVert \Phi(q_k) \rVert_\infty R≥0\mathbb{R}_{\ge 0} the residual Newton reports, in row units
u,vu, v R21\mathbb{R}^{21} left and right singular vectors of σmin⁡\sigma_{\min} at θ∗\theta^*
ϵ\epsilon R\mathbb{R} machine epsilon, about 2.2e-16
How these symbols connect

As the drive θ\theta approaches the fold limit θ∗\theta^* from below with gap δ=θ∗−θ>0\delta = \theta^* - \theta > 0, following the continuous solution branch q(θ)q(\theta) (parametrised along the curve by arc length ss, with local curve constant cc) gives a 21×2121 \times 21 Jacobian JJ whose extreme singular values σ1,σmin⁡\sigma_1, \sigma_{\min} set κ=σ1/σmin⁡\kappa = \sigma_1 / \sigma_{\min} and limit pose accuracy relative to ϵ\epsilon. Starting Newton from q(θ∗−0.05)q(\theta^* - 0.05) generates iterates qkq_k tracked by the max-norm residual ∥Φ(qk)∥∞\lVert \Phi(q_k) \rVert_\infty, while at θ∗\theta^* itself the singular vectors u,vu, v of σmin⁡\sigma_{\min} reveal the critical row dependence and free motion.

Symbol-by-symbol notes
$\theta^*$ and $\delta = \theta^* - \theta$

Here θ∗\theta^* (rad) is the largest drive angle reached continuously from q0q_0 on this assembly branch; past θ∗\theta^* no nearby solution exists. The positive distance δ∈[10−9,10−1]\delta \in [10^{-9}, 10^{-1}] rad measures how close θ\theta sits below that fold.

$J$, $\sigma\lt em>1$, $\sigma\lt /em>{\min}$, and $\kappa$

With the driver included, the hinge corner's Jacobian J=∂Φ/∂qJ = \partial \Phi / \partial q at q(θ)q(\theta) is square (21×2121 \times 21) with singular values σ1≥⋯≥σ21=σmin⁡≥0\sigma_1 \ge \dots \ge \sigma_{21} = \sigma_{\min} \ge 0. The dimensionless ratio κ=σ1/σmin⁡∈[1,∞]\kappa = \sigma_1 / \sigma_{\min} \in [1, \infty] grows without bound as σmin⁡→0\sigma_{\min} \to 0.

Arc length $s$ and curve constant $c$

Near θ∗\theta^*, parametrising the solution locus (q(s),θ(s))(q(s), \theta(s)) by arc length ss stays smooth where the curve turns back in θ\theta, and cc is a local geometry constant of that turn. Because qq and θ\theta carry mixed units, ss 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 q(θ∗−0.05)q(\theta^* - 0.05) and tracks the largest absolute row entry ∥Φ(qk)∥∞\lVert \Phi(q_k) \rVert_\infty across all 21 rows (in their own units); machine epsilon ϵ≈2.2×10−16\epsilon \approx 2.2 \times 10^{-16} sets the round-off scale against which κϵ\kappa \epsilon bounds pose accuracy.

Singular vectors $u, v$ at $\theta^*$

At the fold, u∈R21u \in \mathbb{R}^{21} (left) and v∈R21v \in \mathbb{R}^{21} (right) are the unit singular vectors paired with σmin⁡\sigma_{\min}: as in §2, vv describes an infinitesimal pose motion and uu 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 θ∗\theta^* at which the corner can be assembled at all. Call the distance to it δ=θ∗−θ\delta = \theta^* - \theta. At θ∗\theta^* the square 21×2121 \times 21 Jacobian is singular: the solution curve turns back, and the driver row, which sets the angle, stops being independent of the joints.

Predict first. As δ→0\delta \to 0, the smallest singular value of the square Jacobian falls like

Choose a prediction

Check answer (without scripting)

Answer: the square root of delta. δ≈cs2\delta \approx c s^2 at the turning point and σmin⁡\sigma_{\min} is linear in ss, so σmin⁡∝δ\sigma_{\min} \propto \sqrt\delta: slope 1/2 on log–log axes.

Reveal result (lock in your prediction above first)
10⁻⁹10⁻⁷10⁻⁵10⁻³10⁻¹10⁻⁶10⁻³10⁰10³10⁶smallest singular valuecondition numberδ = θ* − θ (rad)value

θ∗=1.2375939765\theta^* = 1.2375939765 rad, about 70.9°, found by the secant method on σmin⁡2(θ)\sigma_{\min}^2(\theta), which is nearly linear in θ\theta for exactly this reason. The fitted slope of log⁡σmin⁡\log\sigma_{\min} against log⁡δ\log\delta is 0.499; the condition number rises with slope −1/2-1/2, from 150 at δ\delta = 1e-1 to 1.5e+06 at δ\delta = 1e-9.

Why one half. Along the solution curve q(s)q(s), parametrised by arc length, the rows Φ(q(s),θ(s))=0\Phi(q(s), \theta(s)) = 0 hold identically. At the fold θ\theta is at a maximum, so θ∗−θ≈c s2\theta^* - \theta \approx c\,s^2, while σmin⁡(J(q(s)))\sigma_{\min}(J(q(s))), a smooth function crossing zero, is linear in ss. Eliminate ss: σmin⁡∝δ\sigma_{\min} \propto \sqrt\delta, and κ=σ1/σmin⁡∝δ−1/2\kappa = \sigma_1/\sigma_{\min} \propto \delta^{-1/2}. M03 §3's bound then says a round-off residual buys a pose accurate only to about κϵ\kappa\epsilon: about 3e-10 at δ\delta = 1e-9.

Newton on the way in. Each solve starts from the pose at θ∗−0.05\theta^* - 0.05, as a sweep frame would, and runs otkd's own newton. Move δ\delta towards the fold.

02.755.58.251110⁻¹⁴10⁻¹¹10⁻⁸10⁻⁵10⁻²1e-11e-6Newton stepmax |Φ|

At δ\delta = 1e-6.0: 11 steps (against 5 at 1e-1), σmin⁡\sigma_{\min} = 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 δ\delta = 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 δ\delta. The quadratic finish returns only once the error is smaller than the distance to the other branch, which shrinks like δ\sqrt\delta. 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 θ∗\theta^*, Newton's residual is 9.2e-13 and σmin⁡\sigma_{\min} = 2.5e-08 against σ1\sigma_1 = 3.74.

None of this shows at q0q_0, 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, κ\kappa grows like δ−1/2\delta^{-1/2}, 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 σmin⁡\sigma_{\min} halving for every factor of four in δ\delta

Practice

Practice A (steps partly filled). Bound σmin⁡\sigma_{\min} of the square system left when uca-front.tz is dropped. Its weight is ∣ui∣|u_i| = 0.0350 and its row has ∥ji∥\|j_i\| = 1.5935. The bound is ∣ui∣ ∥ji∥/1−ui2=  ?|u_i|\,\|j_i\| / \sqrt{1 - u_i^2} = \;? Enter it.

Worked solution

0.0350×1.5935/1−0.03502=0.05570.0350 \times 1.5935 / \sqrt{1 - 0.0350^2} = 0.0557. The measured σmin⁡\sigma_{\min} after the drop is 0.0087, 6.4 times below the bound, and 9.8 times below the hinge corner's smallest value, 0.0857. The bound is loose; the small weight is what it captures.

Practice B (with a hint). At δ\delta = 1e-4 the hinge corner's smallest singular value is 8.077e-04. Predict it at δ\delta = 1e-8. Enter σmin⁡×106\sigma_{\min} \times 10^6.

Worked solution

8.077e-04 / 100 = 8.077e-06, so enter 8.08. otkd measures 8.121e-06 at δ\delta = 1e-8.

Hint 1

σmin⁡∝δ\sigma_{\min} \propto \sqrt\delta near a fold.

Hint 2

δ\delta falls by 10410^4, so σmin⁡\sigma_{\min} falls by 104=100\sqrt{10^4} = 100.

Practice C (on your own). On the fold itself the root is exactly double. From a pose error of 1e-3, how many Newton steps until the error is below 1e-9?

Worked solution

At a double root each step halves the error (M02 §4), so nn steps give a factor 2n2^n. 2n≥1062^n \ge 10^6 needs n≥log⁡2106≈19.9n \ge \log_2 10^6 \approx 19.9: 20 steps, against about three for a simple root from the same start.

Mixed practice

1. Which method, and why? A sweep's Newton step count climbs from 4 to 15 near the end of the travel, and in the middle steps the residual falls by about 4 each time.

Question 1
How sure?

2. Which method, and why? A model has 24 rows, 21 unknowns and rank 21, and least squares reaches a residual of 1e-16.

Question 2
How sure?

3. Which method, and why? Three joint rows become springs; the remaining rigid rows have rank n−3n - 3, and the corner carries a load.

Question 3
How sure?

Show answers and explanations

1. Keep Newton, and watch the smallest singular value: a fold is near. A residual ratio of 1/4 is a double root (M02 §4). Track σmin⁡\sigma_{\min} against the drive; past the fold there is no assembly at all.

2. Diagnose: read the left null space, drop the largest-weight rows, rerun Newton. m−r=3m - r = 3 spare rows, named by the SVD (M03 §6, this notebook §3). The square Newton answer matching least squares is the evidence.

3. Minimise the energy subject to the rigid rows. The springs' energy closes the three free motions: a constrained minimisation, whose Newton matrix is the KKT saddle point (M04, M08 §3).

Check yourself (closed book)

1. A 22×2122 \times 21 Jacobian has rank 21. How many singular values does it have, and how many of them are zero?

Question 1
How sure?

2. The two-leg corner's left null vector weights uca-front.ty about 0.70 and uca-front.tz about 0.035. Drop one of them to make the system square. Which leaves the better-conditioned system?

Question 2
How sure?

3. The bushed corner has 18 rigid rows of rank 18 and 21 unknowns. Why does System.classify not call it under-determined?

Question 3
How sure?

4. Drive a square mechanism towards a fold, where the drive angle reaches its limit. With δ\delta the distance to the fold, the smallest singular value of JJ falls like

Question 4
How sure?

5. The two-leg corner and the hinge corner, solved at the same drive, agree to about 3×10−123 \times 10^{-12} in every pose coordinate. What does that say about the spare row?

Question 5
How sure?

6. At the toggle the left singular vector of the smallest σ\sigma has weight on every row, yet Newton reaches round-off there. What follows?

Question 6
How sure?

Show answers and explanations

1. 21, and none is zero. min⁡(22,21)=21\min(22, 21) = 21 values, and rank 21 leaves none at zero. The redundancy m−r=1m - r = 1 is a column of UU beyond the rank, not a singular value.

2. uca-front.ty, the larger weight. Deleting row ii leaves u′=uu' = u without entry ii, with u′TJ′=−ui jiTu'^{\mathsf T} J' = -u_i\,j_i^{\mathsf T}. A large ∣ui∣|u_i| keeps that bound loose; a small one forces a small singular value.

3. It checks for springs first: the energy closes the three free motions. if self.springs: return "equilibrium" runs before any rank. The three bush translations are fixed by minimising the energy, not by equations.

4. the square root of delta. δ≈cs2\delta \approx c s^2 at a fold and σmin⁡∝s\sigma_{\min} \propto s, so σmin⁡∝δ\sigma_{\min} \propto \sqrt\delta and κ∝δ−1/2\kappa \propto \delta^{-1/2}.

5. It is in the equations, not in the mechanism: both models describe one motion. Two ball joints on a rigid arm allow exactly the hinge's rotation. The extra row restates the arm's rigidity, which the unit quaternion already says.

6. A dense left null vector does not by itself mean the rows conflict. Consistency is decided by the residual. At a fold the rows are consistent and merely dependent to first order; the density reflects coordinates, not conflict.

Keep these:

  1. Right null space: motions the rows allow, dimension n−rn - r. Left null space: dependences among rows, dimension m−rm - r.
  2. A list of min⁡(m,n)\min(m, n) singular values shows min⁡(m,n)−r\min(m, n) - r zeros, which can hide a redundancy or show a mobility. Count from the rank.
  3. A rank is a decision with a tolerance; trust it when the tolerance sits in a wide gap.
  4. The left null vector names the spare rows; drop the one with the largest weight, and compare the square Newton answer with least squares.
  5. The two-leg corner's spare row was ours: it restates the arm's rigidity, and the pose is the hinge corner's.
  6. classify looks once, at q0q_0. A toggle elsewhere shows as σmin⁡∝δ\sigma_{\min} \propto \sqrt\delta, linear Newton, and a pose good only to κϵ\kappa\epsilon.

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 σmin⁡\sigma_{\min} 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

§3 Naming the spare row

§4 Choosing the solve

§5 A toggle


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

Settings

Colour scheme

Light or dark pages. Your colour and layout stay the same.

Colour

The paper, ink and lettering. Your layout stays the same.

Quiet colours
Bold colours
Reading offline

Keep this book on this device and read it offline.