S02 — One rigid triangle
The book's first suspension model looks at the corner from in front of the car: two
arms and an upright, each one rigid body, joined by pins. It has one degree of
freedom, and solving it means intersecting two circles. Two circles meet twice, so the
model has two answers at every wheel position, and only one of them is a car. This
notebook solves it three ways (closed form, Newton, continuation), reads camber, camber
gain and the instant centre off the pose, and then steps up to otkd's three-dimensional
double-wishbone model to see what the front view costs.
Book pages: 1.2 One rigid triangle (Walkthrough) and Why two circles meet twice
(Deeper) in books/maths-applied. Design: solvers/otkd/docs/problem-mapping.md
§4, §6, §7 and §8.
The question. Fix the lower arm's angle. Where is the wheel, how much does its camber change over ±40 mm of travel, and how do you know the solver handed you the car rather than the other assembly of the same parts?
By the end you can:
- count the front view's freedom and write its two rows as circles
- derive the closed form, and say when the circles stop meeting
- explain why Newton's basins for this system are half-planes bounded by the line BC
- say why seeding each frame from the last keeps the physical branch, and what a fixed seed does
- compute camber, camber gain and the instant centre from a pose, with the right sign
- read otkd's damped Newton history on the 3D corner and measure its order
Assumes: M01 (order from successive errors), M02 (Newton, basins, multiple roots, damping), M08 §1 (the corner as a square 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. The front view: a four-bar with one freedom
Setting: the problem, its sets and its symbols
Problem. Given the design points , , and a lower-arm rotation , find the mobility of the planar linkage of the body set joined by the pin set , and the pose of the upright at .
| Symbol | In | Meaning |
|---|---|---|
| front-view coordinates: lateral, positive outboard; up; m | ||
| otkd's point names: lcaf, lcar, ucaf, ucar, lbj, ubj, wc | ||
design point from geometry.yaml, with forward; m |
||
| lower and upper arm axes cut with the plane ; m | ||
| lower ball joint, upper ball joint, wheel centre (unknowns once is set); m | ||
| their design positions (data); m | ||
| lengths of , and : lower arm, upper arm, upright; m | ||
| rotation of the lower arm about from design, anticlockwise; rad (slider in degrees) | ||
| bodies: ground, lower arm, upper arm, upright; | ||
| pins at , , , ; each removes of a planar body's three freedoms | ||
| mobility, | ||
| wheel travel, the rise of from ; mm |
How these symbols connect
Projecting the 3D design points (, in metres) onto the front-view plane gives the fixed chassis pivots (where each wishbone hinge axis meets ) and the rest positions , which in turn fix the rigid link lengths . Counting the four planar bodies and four pin joints yields the mobility , confirming how many inputs are needed to pose the linkage. Specifying the lower-arm angle (rad) then determines the unknown upright pose in metres and the resulting wheel travel in millimetres.
Symbol-by-symbol notes
$p\lt em>k$ versus $(A, B, C\lt /em>0, D\lt em>0, W\lt /em>0)$ — from 3D geometry to the front view
Each comes from geometry.yaml with outboard, forward and up. The ball joints and wheel centre drop to give , whereas each chassis pivot or is the intersection of the line through its front and rear pivots with the plane .
$R\lt em>A, R\lt /em>B, L$ — the three invariant link lengths
Computed at design as , and in metres, these three positive lengths remain fixed as the linkage moves. Because the upright triangle is rigid, once and are found, follows from its fixed coordinates relative to segment .
$\theta$ — input angle and unit mismatch with the slider
In the equations is measured in radians, anticlockwise from the lower arm's design orientation about . The interactive slider displays degrees for readability and converts to radians before evaluating the pose.
$\mathcal{B}$, $\mathcal{P}$ and $M$ — planar Grübler count
Each of the moving planar bodies starts with three freedoms (two translations and one rotation), and each pin in locks relative translations. Thus gives the linkage's planar mobility count.
$s$ — wheel travel in millimetres
is the vertical rise of the wheel centre from rest, in millimetres, so positive is bump and negative is droop. Note the unit change from metres for all point coordinates to millimetres for .
Look at the corner from in front of the car, outboard and up. Each wishbone
turns about the line through its two chassis pivots. That line runs nearly fore–aft,
so the front view sees it as a point: cut each axis with the plane and the
lower arm pivots about , the upper about
(metres, from otkd's geometry.yaml). The ball joints
and and the wheel
centre are points of one rigid upright: the triangle
of the title.
Four bodies (ground, two arms, upright), four pins, each pin removing two of a planar body's three freedoms:
One freedom. Set the lower arm's angle and the rest follows, up to a choice §2 makes explicit. Three lengths carry the whole model: = 0.4200 m, = 0.3034 m and the upright's = 0.3722 m.
θ = 0.0°: lower ball joint (0.7200, 0.1500), upper ball joint (0.6800, 0.5200), wheel centre (0.7600, 0.3200), wheel travel +0.0 mm. The dotted line is the ground, one tyre radius below the wheel centre at rest. A turn of about ±5.4° covers the chapter's ±40 mm.
2. Two circles: a closed form, and two assemblies
Setting: the problem, its sets and its symbols
Problem. Given , hence , and the data , , , find every with and , and the set of for which one exists.
| Symbol | In | Meaning |
|---|---|---|
| lower-arm rotation from design; rad (slider in degrees) | ||
| the arms' pivots in the front view (data); m | ||
| lower arm, upper arm and upright lengths (data); m | ||
| direction of at design; rad | ||
| lower ball joint, ; m | ||
| upper ball joint: the unknown; m | ||
| the design upper ball joint, the assembly the car is built on; m | ||
| distance from to ; m | ||
| unit vector from towards , and turned anticlockwise by a right angle | ||
| coordinates of in the frame : ; m | ||
| the rotations at which the mechanism assembles |
How these symbols connect
Given the fixed pivots , lengths and design angle , choosing places the lower ball joint directly at on the circle of radius about . That fixes the centre-to-centre distance and defines the orthonormal frame aligned with the segment , in which any candidate upper ball joint is written as . Substituting this form into the two circle equations and determines the coordinates , identifies the feasible drive set where real solutions exist, and uses to distinguish the physical car's assembly.
Symbol-by-symbol notes
$\alpha$ and $C(\theta)$ — explicit position of the lower ball joint
is the fixed angle of at design (rad), so rotating the lower arm by puts without any equation-solving. Once is chosen, acts as known data for finding .
$d$ and $(u, n)$ — the moving local frame on $BC$
(m) is the distance between the two circle centres, points along , and is rotated anticlockwise. Both and are dimensionless unit vectors and rotate as moves.
$a$ and $h$ — local coordinates of $D$
Writing resolves the unknown into a component (m) along the line from and a signed perpendicular offset (m) along . Both and are signed real numbers, not necessarily positive.
$D$ versus $D_0$ — unknown solution versus design reference
is the unknown upper ball joint at a general drive , whereas is the known design position at . Comparing candidate solutions against identifies which assembly matches how the car is bolted together.
$\Theta \subseteq (-\pi, \pi]$ — feasible drive set
collects the angles for which the two circles intersect so that a real exists. Outside , the rigid links cannot close at that value of .
Fix . The lower ball joint is then on a known circle about , so is known. The upper ball joint is from (the upper arm is rigid) and from (the upright is rigid):
Two equations, two unknowns, two circles.
Reveal result (lock in your prediction above first)
The closed form. Put the origin at , let be the unit vector towards , the unit normal to it, and . Write . The two equations become and . Subtracting them removes and leaves a linear equation for :
The is the two assemblies, mirror images in . At rest they are (0.680, 0.520) and (0.349, 0.173): the second has the upright folded down and inboard, almost onto the lower arm. Both satisfy the rows exactly; the book's car is built on the first (design = (0.68, 0.52)).
is real only while . For this corner reaches in droop at = -51.48°: the upper arm and the upright fall into line (a toggle), the two assemblies merge, and beyond it the circles miss. In bump they keep meeting until = 204.8°, far past any wheel travel. Move past the droop limit.
= 0.4703 m, inside [0.0688, 0.6755] m. Design assembly = (0.6800, 0.5200); other (0.3486, 0.1733).
source: `open_textbook.otkd.analysis.analytic._solve` — `solvers/otkd/src/open_textbook/otkd/analysis/analytic.py:190`
otkd's closed-form cross-check meets the same kind of equation in 3D, : two candidates, and it keeps the one nearer the previous angle (continuation, §4). Compare its clip of ratio with the condition above.
def _solve(circle, target: np.ndarray, length: float, near: float) -> float:
centre, a, b = circle
delta = centre - target
aa = 2.0 * float(delta @ a)
bb = 2.0 * float(delta @ b)
cc = length**2 - float(delta @ delta) - float(a @ a)
radius = float(np.hypot(aa, bb))
if radius == 0.0:
raise ValueError("degenerate circle: the arm has no radius")
ratio = max(-1.0, min(1.0, cc / radius))
base = float(np.arctan2(bb, aa))
candidates = [base + np.arccos(ratio), base - np.arccos(ratio)]
return min(candidates, key=lambda angle: abs(_wrap(angle - near)))
When the closed form breaks
- Assumes: the two circles meet:
- When it fails: outside the window and there is no assembly; near its edge is a square root of a small number, so a tiny change in moves the answer a lot
- Check: compute the margin at every frame and stop, naming the frame, when it goes negative
3. Newton on the same two equations: where do the basins go?
Setting: the problem, its sets and its symbols
Problem. Given and the data , , , and a start , find the limit of the Newton iterates , , and the basin of starts whose iterates converge to .
| Symbol | In | Meaning |
|---|---|---|
| upper arm pivot, and the lower ball joint at rest (data); m | ||
| upper arm and upright lengths (data); m | ||
| the rows, ; m² | ||
| the two components of ; m² | ||
| Jacobian of ; m | ||
| Newton step, the solution of ; m | ||
| iterate ; is the start (two sliders); m | ||
| the two roots: the design assembly and the other one; m | ||
| basins: starts whose iterates reach , | ||
| coordinates of in the frame of §2, along ; , at a root; m | ||
| the droop toggle, where (§2); rad | ||
| error against the root reached; m |
How these symbols connect
With and the link lengths fixed, the two squared-distance constraints form the residual map (in ) with Jacobian (in m). From a chosen start , each Newton step solves for and updates , tracking convergence via the error and the local coordinates of §2. Partitioning by which root or the sequence reaches defines the basins and ; at the droop toggle , those two roots coincide.
Symbol-by-symbol notes
$r = (f\lt em>1, f\lt /em>2)$ and $J$ — squared-length residual and its units
Both components and have units of rather than metres, because squaring avoids square roots and keeps polynomial. Differentiating with respect to (m) gives in metres, so the step returns to metres.
$D^{(k)}$ versus $D\lt em>0, D\lt /em>1$ — iterates versus roots
Parenthesised superscripts index Newton's iterate sequence starting at , whereas subscripts and name the two exact roots (design assembly and other assembly) at rest. Do not confuse the start with the design root .
$\mathcal{A}\lt em>0$ and $\mathcal{A}\lt /em>1$ — basins of attraction
is the set of starts whose Newton iterates converge to , and is the set converging to . Starts that do not converge to either root belong to neither basin.
$(a, h)$ and $(a\lt em>*, h\lt /em>*)$ — coordinates in the $BC$ frame
As in §2, any iterate can be written as along and perpendicular to , with denoting the coordinates of a root. Expressing Newton's update in makes its behaviour transparent.
$\theta\lt em>t$ and $e\lt /em>k$ — toggle angle and iterate error
is the droop angle from §2 where and the two assemblies merge into one double root. (m) measures distance to the converged root at step , used to compare the convergence rate at rest against the rate at .
otkd does not look for closed forms; it applies Newton (M02 §2) to whatever rows a model has. Here the rows and their Jacobian are
and each step solves . There are two roots, so every start belongs to the basin of one of them, or of neither (M02 §3).
Reveal result (lock in your prediction above first)
The dashed line is . Of the 3720 grid starts off it, 0 converge to the root on the other side. From (0.20, 0.20) Newton reaches the other assembly; the residual at the end is 2.8e-17, and at either root it is at round-off, so the residual cannot say which one you have.
Why a half-plane. is linear in , and Newton is exact on a linear equation, so after one step : sits on the chord line of §2. Its signed distance from then updates as
whose numerator is positive: keeps its sign, and Newton never crosses . With from the second step on, this is Heron's iteration for , M02 §2's example in disguise. The signed distance along this path: -0.323, -0.275, -0.242, -0.240, -0.240, -0.240 m.
At the toggle. At = -51.48° the two roots are one, the point where the circles touch, and is singular there because and are parallel. Started 36 mm away, Newton's error ratios are 0.663, 0.500, 0.500, 0.500, 0.500, 0.500, 0.500, 0.500: linear, tending to 1/2, the double-root rate of M02 §4. At rest, from the same offset, the errors are 3.6e-02, 2.4e-03, 1.2e-05, 2.8e-10, 1.1e-16: quadratic. Near the toggle the two assemblies are close and the problem is ill-conditioned, whichever method solves it ( = 0.3722 m, = 0.3034 m, so the upright and upper arm are then one straight bar of 0.6755 m).
When Newton on the two circles breaks
- Assumes: the start is off the line and the two roots are distinct
- When it fails: on the Jacobian is singular; at the toggle the roots merge and the convergence becomes linear with ratio 1/2
- Check: watch ; a ratio settling near 0.5 means a double root
4. Following the branch along a sweep
Setting: the problem, its sets and its symbols
Problem. Given the travel grid , , the rotations and a seed rule , find , the Newton limit of §3 for the rows at started from , for (i) with , and (ii) fixed; and the frames at which is not the design root .
| Symbol | In | Meaning |
|---|---|---|
| frame indices | ||
| wheel travel at frame , 1 mm apart; mm | ||
| the rotation giving travel (Brent on a bracket); rad | ||
| design and other root at rotation ; m | ||
| the seed (start) of frame ; m | ||
| the fixed seed , the design wheel centre's ; m | ||
| the fixed seed's height (slider); m | ||
| the answer at frame ; m | ||
| distance of from the line at rest; m | ||
| otkd's branch-change threshold on a body's position, 0.05 m (problem-mapping §7) |
How these symbols connect
The travel grid (, in mm) is mapped by into a sequence of lower-arm angles (rad), each defining a two-circle problem with roots and . At every frame , Newton runs from a seed — either the previous answer (continuation) or the fixed guess — and converges to . Comparing successive poses against otkd's jump threshold and comparing step motion against the rest clearance from the line reveals whether the sweep stayed on or jumped to .
Symbol-by-symbol notes
$s_j$ and $\theta(s)$ — inverting wheel travel to lower-arm angle
The 81 grid points are spaced 1 mm apart in wheel travel, not in angle. For each , the map uses Brent's bracketing root finder to solve for the rotation (rad) that produces that exact vertical rise of .
$D\lt em>0(\theta), D\lt /em>1(\theta)$ versus $D_j$ — true branches versus computed frame
and denote the exact design and folded roots as functions of , whereas is the root Newton actually lands on at frame . A frame has changed branch whenever instead of .
$\sigma\lt em>j$, $S$ and $z\lt /em>s$ — continuation seed versus fixed seed
is the starting guess handed to Newton at frame : under continuation (with ), while the fixed-seed experiment sets for every frame, varying only the height m via the slider.
$h_0$ — rest clearance from the basin boundary
(m) is the perpendicular distance of from the line at rest. As long as one continuation step moves by much less than this clearance, remains on the design side of the next frame's .
$\delta$ — branch-jump detection threshold
is otkd's guard threshold on how far a body's position may move from its seed in one frame; a jump larger than flags a likely branch switch even though the residual is at round-off.
A camber curve is a sweep: steps through the travel and every frame is solved. §3 says which root a frame lands on: the one on the same side of that frame's line as the seed. Seed each frame from the previous answer, and the seed is on the right side unless sweeps past it within one step. At rest is 0.240 m from , so that needs a step far larger than any sweep takes: continuity selects the branch, with no rule about which side is the car.
Seed every frame from one fixed guess instead (a constant x0 passed to a solver in a
loop), and each frame lands on whichever side of its own the guess happens to be.
The line turns as moves, so somewhere in the sweep it may cross the guess.
Move the fixed seed's height.
Seed (0.76, 0.11): 42 of 81 frames land on the other assembly, every one at residual round-off. otkd (problem-mapping §7) flags a frame whose pose moved more than 0.05 m from its seed, which under continuation is the previous frame. The same test on the fixed-seed curve flags 1 frame(s): the jumps. Continuation stays on the design branch throughout.
When continuation breaks
- Assumes: each frame moves the root less than its distance from the line , the of the chord construction
- When it fails: near a toggle , so even a small step can cross into the other basin; a fixed seed crosses whenever sweeps past it
- Check: flag any frame whose answer moved far from its seed (otkd: 0.25 rad or 0.05 m)
5. Camber, camber gain and the instant centre
Setting: the problem, its sets and its symbols
Problem. Given the design-branch pose for mm, find the camber , the camber gain , the instant centre , the roll-centre height and the track change.
| Symbol | In | Meaning |
|---|---|---|
| wheel travel; mm | ||
| lower-arm rotation giving travel ; rad | ||
| arm pivots (data); m | ||
| lower and upper ball joint, wheel centre on the design branch; m | ||
| direction of , anticlockwise from , now and at design; rad | ||
| camber, positive when the top of the wheel leans outboard; degrees | ||
| design camber, as the book declares (otkd's geometry: 0); degrees | ||
| camber gain ; rad/m or °/mm | ||
| instant centre of the upright relative to the body; m | ||
| the upright's angular rate about , per unit of any time-like parameter | ||
| horizontal lever ; m | ||
tyre radius, tyre-radius in geometry.yaml; m |
||
| contact patch, ; m | ||
| ground height, ; m | ||
| roll centre: where the line meets , quoted above the ground; mm | ||
| track change, both sides, ; mm |
How these symbols connect
At any wheel travel , the design-branch pose fixes the upright's orientation relative to , giving camber in degrees. Intersecting the arm lines and gives the upright's instant centre , whose horizontal lever (m) links the upright's angular rate to the wheel's vertical rise and fixes the camber gain (rad/m, convertible to °/mm). Dropping one tyre radius below gives the contact patch and ground height , from which the line yields the roll-centre height above ground and the lateral motion of yields the total track change (both in mm).
Symbol-by-symbol notes
$\phi, \phi\lt em>0$ and $\gamma, \gamma\lt /em>0$ — upright angle versus camber sign
(rad) is the direction of segment measured anticlockwise from , with its design value. Camber (degrees) is positive when the top of the wheel leans outboard (), so an anticlockwise turn tips the top inboard and enters with a minus sign: .
$\gamma_0$ — design camber offset (book versus otkd)
The book declares a static camber (top leaning in at rest), whereas otkd's illustrative geometry starts at . Because is an additive constant, it shifts the camber curve vertically without changing camber change or camber gain .
$I$, $\omega$ and $\ell$ — instant centre and horizontal lever
(m) is the intersection of the lines and , where the upright has momentarily zero velocity; is its instantaneous angular rate about with respect to any smooth parameter. The signed horizontal lever (m) links vertical wheel velocity to upright rotation , giving in rad/m (multiply by for °/mm).
$R\lt em>t$, $P$ and $z\lt /em>g$ — contact patch and ground reference
With tyre radius (m) from geometry.yaml, the contact patch is placed vertically below the wheel centre at , and the fixed ground plane sits at .
$z_{rc}$ — roll-centre height above ground
The roll centre is where the line through and meets the car's centreline . Here is quoted in millimetres measured above the ground height , not above .
$\Delta t$ — total track change (both sides)
For a symmetric axle, shifting one contact patch laterally by moves both tyres by twice that amount, so , converted from metres to millimetres.
Camber from the pose. The wheel plane is fixed in the upright, so the wheel turns exactly
as the upright does. Let be the direction of , measured anticlockwise from
(so outboard, up). Camber is positive when the top of the wheel leans
outboard: otkd's convention (analysis/outputs.py, camber = asin(−n_z) from the axle
vector), and the book's, whose design value is top-in. An anticlockwise
turn carries the top of the upright towards , inboard, so
The instant centre. The lower ball joint moves perpendicular to , the upper one perpendicular to . A point of the upright with zero velocity must lie on both lines, so the upright is momentarily turning about their intersection (Kennedy's theorem for the four-bar). If it turns at rate , the wheel centre rises at with the horizontal lever. Per metre of wheel travel, then,
That is the camber gain, and the reason a far instant centre means a small one. The roll centre is where the line from the contact patch through crosses the centreline .
Reveal result (lock in your prediction above first)
| travel (mm) | arm turn (°) | camber γ (°) | instant centre | roll centre (mm) | track, both sides (mm) |
|---|---|---|---|---|---|
| -40 | -5.4 | -0.13 | 2.21 m inboard, +0.30 m | +47 | +0.5 |
| -20 | -2.7 | -0.54 | 1.88 m inboard, +0.16 m | +33 | +1.3 |
| 0 | +0.0 | -1.00 | 1.60 m inboard, +0.06 m | +19 | +0.0 |
| 20 | +2.7 | -1.51 | 1.36 m inboard, -0.02 m | +5 | -3.5 |
| 40 | +5.4 | -2.08 | 1.15 m inboard, -0.08 m | -9 | -9.2 |
The front view with the book's . Camber moves 1.95° over the 80 mm, an average of 0.024° per mm; the 40 mm of bump alone is worth 1.08°, a little more than half, because the curve bends. At rest the instant centre is 2.36 m from the hub. Those are the book's §1.2 numbers; the instant-centre and roll-centre columns match its table, and the track column its "narrows by 9.2 mm in bump, widens a little in droop". The camber column is the book's too, digit for digit: camber falls in bump, as otkd's does in §6.
| at = +0 mm | value |
|---|---|
| camber | -1.000° |
| instant centre | (-1.602, 0.178) m, +0.058 m above the ground |
| lever | 2.3624 m |
| gain, central difference ( = 0.5 mm, M01 §3) | -0.024254 °/mm |
| gain, | -0.024254 °/mm |
| difference | 2.0e-08 °/mm |
Two routes, one number: the difference is the central difference's own error. The instant centre lies between 1.15 and 2.21 m inboard of the centreline over the travel, so it cannot be drawn to scale beside the wheel; a drawing that shows it there has stretched one axis, and every angle in it is wrong.
When camber gain from the instant centre breaks
- Assumes: the motion is planar: each arm turns about an axis perpendicular to the view
- When it fails: otkd's arm axes tilt by a few degrees, so its front-view centre is a construction and differs from the planar one (by 20 mm here); with parallel arms the centre is at infinity and the formula reads 0
- Check: compare with a central difference of the camber curve; they agree to the difference's own error in the planar model
6. Three dimensions: the same idea, solved by otkd's damped Newton
Setting: the problem, its sets and its symbols
Problem. Given the double-wishbone model (geometry ) and a drive , find with by otkd's damped Newton from the design pose ; record the iterates , step factors and observed orders ; and compare the camber over mm with the front view's.
| Symbol | In | Meaning |
|---|---|---|
| moving bodies: lca, uca, up | ||
| unknowns, : per body a position (m) and a unit quaternion | ||
| the pose of every moving body; the design pose, the final iterate | ||
| geometry numbers: points, axes, the tie-rod length; m | ||
drive of lca-drive, the lower arm's rotation about its 3D hinge; rad |
||
| rows: joint (hard), driver and quaternion-norm rows; | ||
| the residual of the rows; m, rad or dimensionless by row | ||
| , derived symbolically | ||
| Newton step, | ||
| accepted step factor, halved until falls | ||
| error , mixed units | ||
| observed order | ||
| otkd camber from the axle unit vector , change from design; degrees | ||
| wheel travel, set through the front view's ; mm |
How these symbols connect
In otkd's 3D double-wishbone model, the moving bodies supply pose unknowns , and with geometry and drive fixed, the equations form the residual map with symbolic Jacobian . Starting from the design pose , damped Newton solves , halves the step factor until falls, and updates towards the final iterate . Tracking the errors gives the empirical order , while extracting the axle unit vector from at each front-view drive yields to compare against the 2D model over .
Symbol-by-symbol notes
$q$, $q^0$, $q^*$ and $n = 7\,\#\mathcal{B}_m$ — 3D pose vector
Each moving body in (lca, uca, up) carries a 3D position (m) and a dimensionless four-component unit quaternion, giving mixed-unit unknowns in . Superscripts denote Newton iterates from the design pose to the converged pose .
$\mathcal{R}$, $r$ and $J$ — residual rows and symbolic Jacobian
The row set combines hard joint constraints, the lca-drive position driver and one quaternion-norm row per moving body, so mixes metres, radians and dimensionless entries. is differentiated symbolically from the topology and evaluated at each iterate .
$\Delta q$ and $\alpha_k \in (0, 1]$ — damped Newton step
is the full linearised Newton step solving , and is the largest power-of-two factor for which . A full step has ; values indicate backtracking when the full step overshoots.
$e\lt em>k$ and $p\lt /em>k$ — error norm and observed order
takes the largest component difference across mixed units (metres and dimensionless quaternion entries) against the final iterate . From three consecutive nonzero errors, estimates the local order of convergence.
$\gamma_{3D}$ — 3D camber change from design
Computed by otkd as (degrees) from the outboard axle unit vector of the converged 3D pose, with positive camber meaning top-out. Because otkd's illustrative geometry starts at zero camber, is directly the camber change from design, matching the front view's sign convention.
$s$ and $\theta$ — matching frames between 2D and 3D
To compare models at the same inputs, each travel value is converted via the front view's (rad) and passed to otkd's 3D lca-drive actuator.
The double-wishbone model keeps the parts and drops the front view. Each arm is a
body on a revolute hinge about its tilted 3D axis, the upright meets the arms at
spherical joints, and a tie rod (a fixed distance) stops it spinning about the
kingpin. Seven unknowns per moving body (a position and a unit quaternion) give
= 21 unknowns and 21 rows: constraint rows of rank 20,
mobility 1, closed by one driver row. Square, so Newton (M08 §1 has the
row table). The two assemblies are still
there: the upright can still fold about the line between the ball joints.
M08 §1 drove it 0.1 rad from the design pose. Drive it further, each solve cold from the design pose, and measure the order from the errors as in M01 §3: , with the distance to the final iterate.
Reveal result (lock in your prediction above first)
| step | ‖r‖∞ | ‖q − q*‖∞ | α | order p |
|---|---|---|---|---|
| 0 | 1.00e+00 | 9.42e-01 | 1 | |
| 1 | 4.90e-01 | 7.63e-01 | 1 | 0.05 |
| 2 | 1.25e-01 | 7.55e-01 | 0.03125 | 10.67 |
| 3 | 1.24e-01 | 6.75e-01 | 0.03125 | 0.89 |
| 4 | 1.23e-01 | 6.10e-01 | 0.0625 | 1.92 |
| 5 | 1.21e-01 | 5.03e-01 | 0.125 | 1.67 |
| 6 | 1.19e-01 | 3.64e-01 | 0.25 | 0.88 |
| 7 | 1.12e-01 | 2.74e-01 | 1 | 0.90 |
| 8 | 9.89e-02 | 2.13e-01 | 0.5 | 3.30 |
| 9 | 7.59e-02 | 9.20e-02 | 1 | 0.35 |
| 10 | 1.18e-02 | 6.88e-02 | 1 | 9.25 |
| 11 | 3.38e-03 | 4.67e-03 | 1 | 1.51 |
| 12 | 7.09e-06 | 8.02e-05 | 1 | 2.38 |
| 13 | 4.05e-09 | 5.01e-09 | 1 | |
| 14 | 4.11e-16 | 0.00e+00 |
14 steps, 6 of them damped (). Camber at the answer -34.189° (otkd's sign, design 0). The order column scatters about 2 in the last rows and means nothing in the damped ones: an order is a statement about the asymptotic region (M01 §3).
What the front view costs. Both models driven at the same lower-arm angles, camber measured from the design pose in otkd's sign:
The largest gap over the 21 frames is 0.033°: the book's "within 0.033°", inside
the chapter's tenth-of-a-degree budget. In bump both curves fall, as §5 said. The front
view's instant centre at rest is 1.602 m inboard; otkd's
front-view construction, with the tilted hinge axes, puts it at
1.622 m (the payload's design frame). The payload's own two routes,
closed form against symbolic Newton, agree to agreement.max_abs_diff =
2e-13.
Continuation, and cold starts. Seeded from the previous frame, the 21 frames take 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 Newton steps; each solved cold from the design pose takes 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 0, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4. Over ±40 mm a cold start costs at most one step more and lands on the same branch. The difference is in where it fails:
- Followed in steps of 0.01 rad, the design assembly can be continued to 1.23 rad and no further. At 1.0 rad the cold start agrees with it to 1.6e-13 m in the upper ball joint.
- At 1.5 rad, past that limit, the cold start still converges, to residual 1e-15 and camber +25.7°: a pose of the same parts that the design assembly does not reach. A residual at round-off certifies a root, never the root.
- At −0.9 rad, past the front view's droop toggle at -0.8986 rad, it reports "Newton did not converge in 60 steps" with = 1.4e-03: there is no assembly there to find, and otkd says so.
source: `open_textbook.otkd.solvers.newton.newton` — `solvers/otkd/src/open_textbook/otkd/solvers/newton.py:11`
The damping is the inner loop: halve alpha until ‖r‖∞ falls. It guards the first frame and far starts; it does not choose the assembly.
def newton(
system: System,
q0: np.ndarray,
*,
rows: list[int] | None = None,
tol: float = 1e-12,
max_steps: int = 60,
) -> tuple[np.ndarray, int, list[tuple[np.ndarray, np.ndarray]]]:
"""Solve `rows(q) = 0` from `q0`. Returns the solution, step count and residual history."""
q = np.array(q0, dtype=float)
history: list[tuple[np.ndarray, np.ndarray]] = []
for step in range(max_steps):
r = system.residual(q, rows)
history.append((q.copy(), r.copy()))
error = float(np.max(np.abs(r))) if r.size else 0.0
if error < tol:
return q, step, history
jac = system.jacobian(q, rows)
try:
delta = np.linalg.solve(jac, -r)
except np.linalg.LinAlgError:
delta, *_ = np.linalg.lstsq(jac, -r, rcond=None)
if not np.all(np.isfinite(delta)):
raise SolverError("Newton step is not finite", residual=error)
base = float(np.max(np.abs(r)))
alpha = 1.0
for _ in range(40):
trial = q + alpha * delta
if float(np.max(np.abs(system.residual(trial, rows)))) < base or alpha < 1e-8:
break
alpha *= 0.5
q = q + alpha * delta
r = system.residual(q, rows)
index = (rows or system.constrained)[int(np.argmax(np.abs(r)))]
raise SolverError(
f"Newton did not converge in {max_steps} steps: |r|inf = {np.max(np.abs(r)):.3e}, "
f"worst row {system.problem.rows[index].name}",
residual=float(np.max(np.abs(r))),
)
When damped Newton from a far start breaks
- Assumes: a root of the same assembly lies downhill of the start in
- When it fails: beyond an assembly limit there is no root and it stops after 60 steps; far from the design it can converge to another assembly with a residual of 1e-15
- Check: solve by continuation from the design pose, and compare each answer with its seed
Practice
Hint 1
The upright turns about the instant centre: rise .
Hint 2
So the gain is rad per metre; convert to degrees, then divide by 1000.
Mixed practice: which method, and why?
Check yourself (closed book)
Keep these:
- The front view is a four-bar with one freedom; its two rows are circles, and circles meet twice: two assemblies of the same parts.
- Subtracting the rows gives a linear equation: the closed form, the mirror symmetry in , and the toggle where .
- Newton's basins for this system are the two half-planes of ; a residual at round-off says a root, never which.
- Continuation (seed from the previous frame) keeps the branch; flag a frame that moves far from its seed.
- Camber gain is with the lever to the instant centre; mind the sign: an anticlockwise upright is negative camber with outboard.
- otkd's damped Newton is quadratic near the root and damped far from it; the 3D camber is within 0.033° of the front view over ±40 mm.
Your connection
Name another computation you run in a loop over a parameter (a sweep, a time step, a design study). Is each solve seeded from the last, and would you notice if one frame changed branch?
Answers
Practice A. = 0.15938 m, = 0.2542 m.
Practice B. 0.0318 °/mm.
Practice C. ≈ 2.38.
Mixed practice. Brent on the bracket; least squares and the SVD; a central difference; seed from the previous frame.
Where the maths is derived
Optional. These notes give the intuition and application; the sources below give the full derivations and proofs.
§1 The front view as a four-bar
- McCarthy and Soh (2011), Geometric Design of Linkages: mobility counts, planar four-bar linkages and their assembly configurations.
§2 Two circles, two assemblies
- McCarthy and Soh (2011), Geometric Design of Linkages: the four-bar's input-output equation, its two branches and the toggle positions.
§3 Newton on the two circles
- Nocedal and Wright (2006), Numerical Optimization: Newton's method for nonlinear equations and its local quadratic convergence.
§5 Camber gain and the instant centre
- Milliken and Milliken (1995), Race Car Vehicle Dynamics: front-view suspension geometry: instant centre, roll centre and camber change.
§6 Damped Newton on the 3D corner
- Nocedal and Wright (2006), Numerical Optimization: line-search globalisation of Newton's method on a merit function, and why it can still reach an unwanted root.
- otkd, the model, its exports and a generated solver: the rows, the quaternion unknowns and the solver the corner is posed for (docs/problem-mapping.md).
Compiled from notebooks/suspension/s02_one_rigid_triangle.py — run locally with cd notebooks && uv run marimo edit suspension/s02_one_rigid_triangle.py for live Python scratch cells.
Back to the book: 1.2 One rigid triangle · Chapter 1 Review