harmonic engine

a wave as a sum of turning wheels
θ
sin
cos
the chain, and the path of its last pin
one turn, computed
-1-0.500.510°90°180°270°360°θ
━ written, sine channel
highest point
1.0000
at θ = 90.000°, sine channel
harmonic distortion
9.1e-16
of the written curve, measured
wheels
1
one pin, one yoke
RMS error
3.66e-16
against the target, over a turn
pen stops
clear
at 1.00× gain the pen needs 1.00 of 1.42
gear ratios
1
harmonics found in the written curve, and the pin radii set
0.00.501.012345678harmonic, turns per turn

One wheel

A pin at radius rr on a wheel turned through θ\theta is at (rcos⁡θ, rsin⁡θ)(r\cos\theta,\ r\sin\theta). The yoke has a horizontal slot the pin slides along and can itself move only up and down, so it keeps the pin's height and discards its horizontal position:

yyoke=rsin⁡θy_{\text{yoke}} = r\sin\theta

Nothing in the linkage is approximate. The pin's radius is the amplitude of the sine, the gearing that turns the wheel is its frequency, and the angle the pin is set at is its phase: a harmonic is three numbers, and a crank has a part for each. Paper fed past the pen at a rate proportional to θ\theta turns the motion into a graph.

Wheels on wheels

Carry a second wheel on the first wheel's pin, geared to turn nn times as fast, and its pin is at the sum of two such vectors. A chain of wheels puts its last pin at

P(θ)=∑kak e i(nkθ+φk)P(\theta) = \sum_k a_k\, e^{\,i(n_k\theta + \varphi_k)}

and the yoke writes Im⁡P\operatorname{Im} P, a sum of sines. With radii 4/(nπ)4/(n\pi) on the odd harmonics the sum approaches a square wave; with (2/π)(−1)n+1/n(2/\pi)(-1)^{n+1}/n on all of them, a sawtooth; with 8/(nπ)28/(n\pi)^2 and alternating signs, a triangle. A negative coefficient is a pin set half a turn round. The selector turns the whole chain through an angle ψ\psi, so the yoke reads Im⁡(eiψP)\operatorname{Im}(e^{i\psi}P): at a quarter turn, the other coordinate, Re⁡P\operatorname{Re} P.

The overshoot that stays

In 1898 Michelson and Stratton built a harmonic analyser that summed eighty harmonics with springs on a lever. Its square waves have flat tops, steep sides, and beside every jump a spike the flat top does not have. Michelson wrote to Nature that year about what a Fourier series converges to beside a jump; Gibbs answered in the same journal, and in a correction the next spring gave the overshoot. Wilbraham had found it in 1848. The height of the spike tends to

2πSi⁡(π)=2π∫0πsin⁡tt dt=1.178980…\frac{2}{\pi}\operatorname{Si}(\pi) = \frac{2}{\pi}\int_0^{\pi}\frac{\sin t}{t}\,dt = 1.178980\ldots

of the half-jump, at five wheels or five hundred. More wheels narrow the spike and move it toward the jump, to π/2N\pi/2N after it for NN wheels, without lowering it: the series converges at every point and not uniformly. Measured on the machine at eighty wheels, the peak is 1.178993 at 1.125°. A sawtooth slopes beside its jump, so its peak is lower, but its excess over the ramp converges to the same 0.179: the constant belongs to the jump, not to the curve.

The other channel

On the cosine channel the same wheels write the conjugate series. For a square wave it has a logarithmic spike at each jump,

max⁡θRe⁡PN(θ)≈2π(ln⁡4N+γ)\max_\theta \operatorname{Re} P_N(\theta) \approx \frac{2}{\pi}\left(\ln 4N + \gamma\right)

which grows without bound: 2.72 at ten wheels, 3.60 at forty, 4.04 at eighty. The pen runs into its stops. A curve with a jump has a conjugate that is not a curve at all, and a machine that reads both coordinates of the same chain shows it at once.

Kelvin's machine

The first machine of this kind was built to predict tides. The tide at a port is a sum of sinusoids whose speeds are fixed by the motions of the Moon and Sun and whose amplitudes and phases are fixed by the port. Kelvin's machine of 1872 summed ten of them with a wire over pulleys and wrote a year of tides in a few hours; tide tables were computed this way until the 1960s. Set the wheels to NOAA's ten largest constituents for San Francisco and the machine writes a great diurnal range of 1.758 m over a year; the gauge there, over nineteen years, measured 1.780 m. Adding NOAA's other twenty-seven constituents, or the 18.6-year nodal cycle, moves the machine by millimetres: the last 1.2% is not in the harmonic constants.

Two wheels at nearly the same speed beat. M2 and S2, the Moon's and the Sun's semidiurnal tides, come back into step every 14.7653 days, half a synodic month: springs and neaps. K1 and O1 beat at half the tropical month and M2 and N2 at the anomalistic month, perigee to perigee. The envelope of the tide is the length of the chain, which the pen never draws and the paper records anyway.

Where the inequality falls

K1 and O1 turn together at exactly M2's speed, 15.041069 + 13.943035 = 28.984104 degrees an hour, so the phase combination

gK1+gO1−gM2=225.6∘g_{K_1} + g_{O_1} - g_{M_2} = 225.6^\circ

never drifts: it is a constant of the station, and it decides whether the difference between a day's two tides shows in the high waters or the low. Near 180° the diurnal wave peaks with a low water and the lows are unequal; near 0° with a high water. San Francisco's 225.6° puts most of it in the lows, 0.346 m against 0.186 m. The selector adds one phase to every constituent and so changes this constant, which a change of date cannot: sweep it and the inequality moves from the lows to the highs, and at 180° the tide is upside down.

Limits

The machine is kinematic: rigid, frictionless, exactly geared. Kelvin's gears approximated each speed ratio with whole numbers of teeth, and Michelson's springs stretched. The tide's phases carry no calendar, so its curves have San Francisco's shape but predict no particular day. Each of these is listed, with what would falsify it, in the assumptions panel.

Every number in the calibration is measured off what the machine writes, by sampling, Fourier analysis or tabulating highs and lows, and compared with a value from outside the model.

Model

v1.0September 2026
  • the ideation's selector, which blended the sine and cosine pens linearly, is a rotation of the whole chain by the selector angle. At a quarter turn both write cos θ; on the way the blend wrote a sine whose amplitude dipped to 0.71 halfway, and the rotation keeps the amplitude and moves only the phase.
  • the ideation's single pin becomes the first of a chain of wheels carried on each other's pins, the construction that makes a Fourier series visible as a sum of vectors. Kelvin summed with a wire and Michelson with springs; any exact summing linkage writes the same curve.
  • the overshoot is measured against the target at the peak, not as the peak alone. The two agree for a square wave, which is flat beside its jump, and disagree for a sawtooth, whose slope puts its peak below 1.179 while its overshoot is the same 0.179.
  • the tide's full scale on the paper is fixed at the sum of all ten amplitudes, so removing constituents visibly shrinks the tide instead of being rescaled away.
  • the beat of M2 and N2 is compared with the whole anomalistic month, not half of it: N2 exists to carry the monthly change in the Moon's distance, one perigee per month. An earlier draft halved it, as for the other two pairs, and was off by a factor of two.
  • tidal datums are computed from the machine's own record the way a gauge record is tabulated, higher high and lower low per tidal day, over a year in the viewer and nineteen years in the calibration, the length of NOAA's epoch.
  • the selector sweep for the tide runs over half a turn with a year per point. Over sixty days the slow beats between constituents dominate and the ranges wander by ten centimetres; over a year what remains is the selector's own effect on g(K1) + g(O1) - g(M2), which moves the diurnal inequality between the high and the low waters.