Stemious · Research First · Digital twin

Pendulum twin

A physics model of a simple pendulum, calibrated against 29 accelerometer runs at ten string lengths. Change the length or release angle and the twin predicts the swing and the sensor signal. Pick a measured run to replay it against the real data.

60.0 cm
Measured to the bob, as in your sheet. The twin adds a calibrated 0.9 cm on average to reach the bob's centre of mass.
60°
9.81 m/s²
Period…
Small-angle T…
Frequency…
Amplitude now…
Bob speed…
Sensor R…

Accelerometer signal

Twin predictionMeasured run
Resultant acceleration R from the sensor on the bob, in m/s². It peaks twice per swing, at the bottom of each pass, and dips at each turning point, so its minimum reveals the swing angle.

Period against length

Measured (first 10 s)Twin at release angleSmall-angle formula
g from your runs, amplitude-corrected…
g if large swings are ignored…
Twin fit error, median…

Measured runs

Tap a run to replay it

R² over time

R² from 2 s to tR² in each 3 s window0.9 mark

Fit report

Timing…median period error. Pass mark ±1%.
Damping…median error in swing angle at 25 to 30 s
Waveform…median signal error per 5 s window, after lining up peaks
Strict match…median R² point by point. Timing drift lowers it.

Timing error by run

10 cm steps5 cm steps
LengthRunMeasured periodTiming errorSwing at 30 s
measured / twin
Waveform errorStrict RMSER²Verdict
Tap a row to replay that run. Verdicts: Good means timing within 0.5% and waveform error under 0.5 m/s². Fair means within 1% and under 0.8 m/s². Drift means outside both.

How to read the fit

Predicted from length is the real test. The twin gets only the recorded string length and the first 2 s of each run, which it uses to read the release angle and the start time. Length offset, damping and sensor offset are shared values taken across all runs. Everything after 2 s is a prediction and is scored against the sensor.

Calibrated to each run lets the model tune length, angle and damping for that one run. It shows how well the physics can describe the data at best, and the gap between the two modes shows what the shared settings miss.

A single R² can mislead on an oscillating signal. A timing error of 0.5% moves the peaks by about a tenth of a second after 30 s. The shape stays right, but the peaks no longer line up, so point-by-point R² drops. The report therefore scores timing, damping and waveform separately.

Every run reads about 0.30 m/s² above the physics, even at rest. That is the accelerometer's zero offset, and the twin now adds it to its predicted signal.

How the twin works

The bob follows the full nonlinear equation θ'' = −(g/L)·sin θ − b·θ' − k·L·θ'|θ'|, integrated with fourth-order Runge-Kutta. The sensor reading is the string tension per unit mass, R = g·cos θ + L·θ'², which is what an accelerometer riding on the bob reports.

Each of your runs was fitted for effective length, release angle, linear damping b and air-drag k. The fitted lengths sit on average 0.9 cm beyond the lengths you recorded, which is the distance from the string's end to the bob's centre of mass. The twin uses the median damping across all runs.

Your runs start at release angles near 60°, where the period is about 7 to 8% longer than the textbook 2π√(L/g). The twin uses the exact large-angle period, which is why it sits close to the measured points while the small-angle curve falls below them. The measured points average over the first 10 s, as the swing decays, so they sit slightly under the twin's curve for the release angle.