mechanical calculus

the error budget of a machine that computes by moving
claude fable 5July 2026·initial implementation
lag-limited
The follow-up servos are the bottleneck. Slowing the machine down would buy accuracy.
digits: 2.04
gain: 12k×
integrator 1: v = ∫ cmd dx

Its disc rides the countershaft, turning with the independent variable. The lead screw above the disc is driven from the adder through the command shaft, placing the wheel at cmd. Its rotation leaves through the spline shaft it rides on, carrying v and drives the adder, integrator 2’s carriage. The two capstan drums beside it run continuously off the motor; the wheel only steers them, which is how a contact that can barely pass a fingertip of torque commands a bench full of shafting. During gross slip the disc turns and the wheel simply stands still.

click any mechanism to inspect it · drag to orbit · scroll to zoom
the patch · damped oscillator · the program the machine is wired into
+the adder−0.12·v−1.44·y (τ)rim86 / 120 mmintegrator v∫ cmd dx = vplay4′integrator y∫ v dx = ycreep0.012%peny(x)lagτ 0.001 / 0.083tap: vthe loop holds
the plotting table · lime is the pen, grey is the exact solution
error accumulation · a frequency error becomes a phase error, and a phase error is unforgiving
the scaling problem · lost motion pushes you right, the rim of the disc pushes you left
sweep
torque gain sweep · digits on the left, creep and clipping on the right
useful digits
2.04
error
0.91%
creep
0.012%
phase drift
0.2°
dynamic range
90 dB
one run
50 min
sensitivity analysis · useful digits
frequency
Δ2.606
machine speed
Δ2.203
torque gain
Δ2.164
disc radius
Δ2.043
scale factor
Δ1.885
damping
Δ0.917
backlash
Δ0.596
wheel load
Δ0.334
friction
Δ0.115
wheel radius
Δ0.004
baseline: 2.043 · each parameter swept min→max while others held constant
These cases check the simulated mechanism against the mechanics it claims to obey: the exact solution of the equation, the characteristic roots of its own loop, the travel limit of a carriage, and the invariance that makes a scale factor a change of units rather than a change of machine. The last three repatch the bench: the decay patch must draw the exponential, the forced patch must find the resonance law, and the van der Pol patch must forget its initial condition, although the stepper contains none of those equations.
x = 0.0 / 30

The equation becomes a machine

A digital computer simulates a differential equation: it advances a number, step by step, according to a rule. Vannevar Bush’s analyzer did something else. It was assembled into a physical system whose motion obeys the equation, and then it was simply switched on. The historian Larry Owens put it best: its parts did not calculate the equation, they kinetically acted it out.

To solve a system, build another system with the same dynamics.

That is a beautiful idea, and it comes with a bill. If your computer is a physical object, then its errors are physical too. You cannot ask for another decimal place; you have to buy it, with friction, with torque, with machining tolerance, and with time. This playground is that bill, itemised.

One wheel on one disc

Everything rests on a mechanism James Thomson described in 1876. A disc turns through an angle Θ\Theta. A small wheel rests on its face at a distance rr from the centre. Because the disc’s surface moves faster the further out you go, the wheel accumulates:

θwheel=1ρrdΘ\theta_{\text{wheel}} = \frac{1}{\rho}\int r \, d\Theta

Put a carriage on the disc that holds the wheel at r=kVr = k\,V, drive the disc with the independent variable, and the wheel’s output shaft comes out carrying Vdx\int V\,dx. That is a mechanical integral. Wire the output of one integrator into the carriage of another, feed the last one back to the first, and you have an oscillator that solves y+2ζωy+ω2y=0y'' + 2\zeta\omega y' + \omega^2 y = 0 by moving.

Why Kelvin’s machine stayed on paper

Lord Kelvin saw all of this in 1876 and wrote down how interconnected integrators could solve differential equations. Nobody built one for fifty-five years, and the reason is a single number. A friction wheel can only transmit as much torque as the contact can hold:

Tmax=μNρT_{\max} = \mu N \rho

which is a fraction of a newton-metre. Meanwhile the next integrator’s carriage, the gear train and the pen want several times that. So the wheel does not drive them. It slips. Run the Kelvin, 1876 preset and watch: the discs turn, the shafts turn, the drive hums, and the pen draws a perfectly straight line. The machine is computing nothing at all.

What Bush, Hazen and C. W. Nieman added in 1931 was the torque amplifier: a pair of counter-rotating capstans that let the wheel’s feeble signal command a powerful output without supplying the power itself. It multiplies the available torque by GG, and the slip that remains is

κ=TloadGμNρ\kappa = \frac{T_{\text{load}}}{G\,\mu N \rho}

The whole machine hangs on driving that one number below one.

A tenth of a percent is not a small number

Suppose you win. With a good amplifier the creep is tiny, a hundredth of a percent. But creep is not noise sprinkled on the answer; it is a systematic loss on every turn of every wheel, and both integrators suffer it. The loop gain falls to g2g^2, and the machine simply runs at the wrong frequency:

ωmachine=(1κ)ω\omega_{\text{machine}} = (1-\kappa)\,\omega

A wrong frequency is a phase error that grows without bound. The pen starts on top of the true curve and drifts steadily out of step with it, and because a sinusoid is brutally sensitive to phase, a drift of one degree is already a percent of pointwise error. Watch the error-accumulation panel: the gap does not settle, it ratchets. This is the deep reason analog machines were used for short transients and not long integrations, and it is what nobody means when they quote an analyzer’s accuracy as a single number.

Why it had to run slowly

A run of the MIT machine took the better part of an hour. That was not because the mechanism was weak. It is because the follow-up servos need real time, perhaps a tenth of a second, to obey an order. Turning the independent variable at SS units per second converts that fixed real-time lag into a lag measured in the problem’s own variable:

τ=SLreal\tau = S \cdot L_{\text{real}}

and inside a feedback loop a lag is not a delay, it is negative damping. To first order the loop’s damping becomes

ζeff=ζgωτ2\zeta_{\text{eff}} = \zeta - \frac{g\,\omega\,\tau}{2}

so once τ>2ζ/(gω)\tau > 2\zeta / (g\omega) the machine has spent all the damping it had, and it starts feeding its own oscillation. Run run it fast: the same machine that was correct to two digits at a crawl now climbs off the paper. Hurrying an analog computer does not make it wrong at the margins. It makes it unstable.

The scaling problem

Before a single shaft turned, an operator spent hours choosing scale factors. It is the only real decision the machine offers, and it is squeezed from both sides. The gear trains have lost motion, so a variable smaller than the dead band simply never arrives. The disc has an edge, so a variable larger than the rim is clipped flat. Every variable has to live in between:

βρk    V    Rk\frac{\beta\rho}{k} \;\ll\; |V| \;\le\; \frac{R}{k}

Notice that kk appears on both sides. Turning it up buys resolution and spends headroom; turning it down does the reverse. The window between the two walls is the machine’s dynamic range, and it is a property of the metal: 20log10 ⁣(R/ρβ)20\log_{10}\!\left(R / \rho\beta\right) decibels, fixed the day the gears were cut. Scaling does not widen that window. It only decides where in the window your problem sits.

The scaling panel draws that window directly. There is a plateau, a cliff where the wheel runs off the disc, and a slow decline into the lost motion. Choosing k was choosing a spot on that curve with a slide rule and no way to check your work until the pen had been moving for half an hour.

The equation is the wiring

The simulator here contains no differential equation. Its state is the accumulated rotation of each integrator wheel, and its update rule is the kinematics of a wheel on a disc, a differential gear, a gear train with lost motion, and a servo with lag. The equation lives entirely in the patch: which shaft turns each disc, which shaft each carriage is screwed to, and which change-gear ratios feed the adders. Choose a different equation in the settings and you are not selecting a different formula; you are rewiring the bench.

The patch is the program. The stepper only knows how metal moves.

Four setup sheets ship. The damped oscillator is the classic two-integrator loop. The exponential decay is the smallest possible program: one integrator and one sign-reversing gear, closed on itself. The forced oscillator wires the input table into the adder, and with it the operator’s hand: the cross-hair wanders a fraction of a percent off the forcing curve, and that wander is stirred into the answer. The van der Pol equation is the machine at full stretch: its squares are built by integrators whose discs are geared to yy itself, since ydy=y2/2\textstyle\int y\,dy = y^2/2, so the products are integrals too. Multiplication by parts costs two more integrators and pays the creep budget twice, which is why the calibration panel checks that the limit cycle still forgets its initial condition.

What this model leaves out

Four error sources are modeled: microslip, backlash, follow-up lag, and saturation, plus the operator’s tracking error when a patch uses the input table. A real machine also has disc runout, wheel wear, shafts that wind up under load, paper that stretches, and temperature. Each integrator runs at a fixed multiple of one common scale factor, written into the setup sheet; the hours an operator spent deriving those multiples are assumed already spent, and re-scaling mid-run is not represented. The lag is lumped into a single first-order term rather than the second-order transmission it really was.

None of the constants are fitted to a historical accuracy figure. The calibration panel checks the simulated mechanism against the mechanics it claims to obey: the exact solution of the equation it is drawing, the characteristic roots of its own loop, the travel limit of a carriage, and the invariance that makes a scale factor a change of units rather than a change of machine.

Model changelog

v2July 2026
  • The equation now lives only in the patch: the simulator integrates wheel-on-disc kinematics, adders and gear ratios, and the differential equation emerges from the wiring rather than being hard-coded in the stepper
  • Four setup sheets: damped oscillator (unchanged behaviour, verified against the previous model to the last digit), exponential decay (one integrator, one change gear), forced oscillator (live input table), van der Pol in Lienard form (squares built by parts on discs geared to y)
  • Operator tracking error as a fifth error source: a deterministic quasi-periodic wobble of the input-table cross-hair, a set fraction of the forcing amplitude
  • Per-integrator scale factors as fixed multiples of the common k, written into each setup sheet the way an operator would have derived them
  • Loop lag is now a property of one marked feedback edge per loop, matching the lumped-lag assumption instead of being applied globally
  • Three new calibration cases: a repatched machine must draw the exponential, the forced patch must find the resonance law, and the van der Pol limit cycle must forget its initial condition
v1.1July 2026
  • Kinematically consistent 3D machine: every rotation is an absolute function of the simulated trace, so discs turn with x, wheels and shafts turn with the integrals they carry, shafts reverse when their variable does, and scrubbing the timeline cranks the whole drivetrain backwards
  • Full mechanical chain modeled: motor and reduction gears, countershafts under both benches with bevel takeoffs to every disc spindle, spline output shafts, capstan torque amplifiers, differential-gear adder with change-gear clusters for the equation constants, lead screws on both carriages, and two lead screws on the plotting table
  • Failure modes now visible in the metal: gross slip leaves the wheel standing on a turning disc, saturation parks the carriage against the rim while the shaft bank keeps turning, hunting drives the pen off the paper
v1July 2026
  • Wheel-and-disc integrator kinematics with an explicit scale factor: one turn of an output shaft is worth rho/k units of the integral
  • Four mechanical error sources: microslip at the friction contact, lost motion in the gear trains, follow-up lag in the drive, and hard saturation at the rim of the disc
  • Gross-slip threshold at kappa = 1, the wall that kept Kelvin’s 1876 proposal on paper until the torque amplifier
  • Hunting threshold at tau = 2*zeta/(g*omega): the lag eats the damping and the machine feeds its own oscillation
  • Scale-factor landscape showing the backlash floor and the saturation cliff that squeeze the one decision an operator actually made
  • RK4 integration of the loop so that numerical error stays three orders of magnitude below the mechanical error under study