Manuscript Offprint
arXiv:2610.39099Data Driven Modeling of a Magnetic Newton's Cradle using the Optimization of a Discrete Loss
Abstract
We investigate the dynamics of a magnetic Newton’s cradle (MNC) using experiments, simulations through forward and inverse data driven models. In the MNC magnetic forces replace the instantaneous elastic collisions of the classical design. We compare point-dipole and finite-current-loop interaction models, identifying their parameters from direct measurements as well as through pendulum trajectories using the method of Optimizing a Discrete Loss (ODIL). For a synthetic three-pendulum twin, ODIL reproduces discretized trajectories to round-off accuracy and infers accurately magnet strength and damping from sparse data even when only one pendulum is observed. Model comparison shows that the point-dipole model compensates for near-field errors by underestimating the magnetic moment and produces structured residuals at each momentum transfer. The current-loop model removes this bias and, on full-precision recordings, also recovers the magnet radius. The continuous magnetic coupling reproduces the classical cradle’s key behavior while enabling richer dynamics, including normal modes and a static repulsion offset. These results demonstrate that ODIL can infer physical parameters, and quantify model-form errors from sparse, noisy observations. Ultimately, this work establishes the magnetic Newton’s cradle not merely as a physical curiosity, but as a rigorously quantifiable testbed for computational inverse modeling.
Contents
| 1 | Introduction | 3 |
|---|---|---|
| 2 Methods | 4 | |
| 2.1 | Experimental apparatus | 4 |
| 2.2 | Theoretical model | 5 |
| 2.2.1 | A magnet as a current loop | 5 |
| 2.2.2 | The far-field (dipole) limit | 6 |
| 2.2.3 | Inter-magnet force, torque, and the scaling | 6 |
| 2.2.4 | Equations of motion and damping | 6 |
| 2.3 | Parameter identification by Optimizing a Discrete Loss | 7 |
| 2.3.1 | The cradle model used for identification | 7 |
| 2.3.2 | Optimization using a discrete loss | 8 |
| 2.3.3 | Minimization of the loss | 9 |
| 3 Results | 10 | |
| 3.1 | Linear normal modes | 11 |
| 3.2 | Direct measurement of the magnet strength | 11 |
| 3.3 | Damping: from an indirect estimate to a direct measurement | 12 |
| 3.4 | Parameter identification with ODIL on a synthetic three-pendulum cradle | 13 |
| 3.5 | ODIL calibration on the measured trajectories | 17 |
3.5.1 Repeatability of the identified magnet ..... 18 3.5.2 Identifying the damping ..... 20 3.5.3 Three- versus five-pendulum trials, and the directly measured parameters ..... 22 3.6 Prediction across 2-5 pendulums ..... 23 3.7 Energy transfer in the MNC ..... 24 3.8 Linear normal-mode spectra ..... 25 3.9 Parameter study and the classical-cradle limit ..... 26 3.10 Limitations and Next steps ..... 27
4 Conclusion ..... 28
A Implementation details of the ODIL solver ..... 29
The behavior of the NC and the MNC can be modeled by a set of coupled differential equations. The key modeling question involves the formulation of the magnetic force between pendulums. The classical approach uses point-dipole approximations. In [1] the authors built an anharmonic chain of magnetic pendulums as an experimental paradigm for moving breathers described as spatially localized, dynamically stable oscillating states in a discrete nonlinear lattice. In [2] the authors presented a forced-damped array of coupled pendulums and observed a stability reversal of intrinsic localized modes (discrete breathers) near a critical coupling. Molerón et al. [3] studied a one dimensional chain of repelling magnets and showed experimentally, numerically, and theoretically that it supports amplitude-dependent solitary waves, with a smooth profile at low energy and single site localization at high energy. García-Raffi et al. [4] studied nonlinear wave propagation with a similar chain of magnetically coupled pendulums, reporting harmonic generation from the interplay of nonlinearity and dispersion.
None of these works required an accurate near field force law, because they were concerned with dynamics at moderate to large pendulum spacing relative to magnet size, for which the dipole approximation is adequate. However, the point dipole approximation is not adequate at close spacings. Alternative formulations involve modeling the magnets as finite current loops. On the magnetostatics side, closed-form expressions for the force between coaxial cylindrical permanent magnets have been derived in terms of elliptic integrals [5], and via the equivalence between the amperian current model and a thin coil [6]. Both results confirm that the force between two axially-magnetized magnets scales as the square of the magnetization at any separation, and reduces to the familiar dipole-dipole interaction law only at large separation.
In this paper, we investigate both models and their capability to reproduce the experimental data. We find that the two models differ already at the static gap of the cradle, where the pivot spacing is only a few magnet radii, and increasingly at the close approaches of larger swings.
The models that we investigate involve also gravity terms as well as air drag. We identify all model parameters in two ways. First, by directly measuring the coefficients and then by extracting physical parameters such as the true magnetic field strength and microscopic rod asymmetries using inverse modeling through the pendulum trajectory data. Traditional inverse solvers that rely on forward numerical integration become fragile when the cradle reaches large amplitudes: the onset of chaos makes simulated trajectories diverge exponentially from the data for any small parameter error, and the landscape seen by the optimizer becomes rugged[7, 8]. This paper treats the inverse dynamics of the magnetic Newton's cradle with the Optimizing a Discrete Loss (ODIL) framework [9, 10]. The discrete equations of motion are imposed as residuals of a least-squares problem whose unknowns are both the system state at every time step and the hidden physical parameters. Because each residual couples only three neighboring time levels the Jacobian is sparse and Gauss–Newton steps are cheap. We use the framework in three ways. First, as an identification tool: on a synthetic twin of the three-pendulum cradle, with parameters representative of the apparatus of §2, we quantify how well the magnet strength and the damping can be recovered from sparse, noisy angle data (§3.4). Second, as a model-discrimination tool: fitting the point-dipole model to data generated by finite magnets exposes the model form error of the far field
This system was posed as IYPT 2026 Problem 15 with the instruction to explain and study its motion.
approximation as a bias in the identified moment and as a structured residual, both of which vanish when the current-loop model is fitted instead. Third, as a calibration tool on the measured trajectories themselves: two independent recordings of the five-pendulum cradle and five of the three-pendulum cradle at spacings of 2–8 cm are fitted with both magnet models, with the initial state, per-rod natural frequencies and angle-calibration offsets treated as nuisance unknowns, and the identified parameters are compared with each other and with the direct measurements of the magnet strength (Hall probe, §3.2), radius and damping (§3.5). The same machinery is used to ask whether the amplitude-dependent damping of §2.2.4 can be identified from the cradle’s own motion.
The paper is organized as follows. Section 2 describes the experimental apparatus, the two magnet models and the ODIL methodology. Section 3.1 discusses the linear normal modes. Section 3 presents the results: the direct measurements, the ODIL identification and model discrimination on a synthetic twin (§3.4), the ODIL calibration on the measured three- and five-pendulum trajectories, its repeatability and the comparison with the directly measured parameters (§3.5), the closed-loop predictions for 2–5 pendulums, the mode spectra and the classical-cradle limit. The paper concludes with a discussion of the present findings, which together establish a calibrated digital twin of the magnetic Newton’s cradle.
2 Methods
2.1 Experimental apparatus
In this section we describe the MNC apparatus and the experimental protocol used in this study. Experiments were carried out on a self-made, 3D-printed frame (Fig. 1) that holds –5 identical pendulums, each a thin rod terminating in a circular enclosure containing axially magnetized N45 neodymium disc magnet (15.9 mm and 1.6 mm). Magnets are mounted in alternating polarity, , so that neighboring magnets repel and next nearest neighbors attract. Pivot spacing is adjustable over 2 cm to 10 cm. The pendulum motion is filmed at high frame rate using a Nikon D850 camera and digitized with Tracker software [11] to compute the angle of every pendulum. In each test, the pendulums are released from rest at a measured held angle, , .

Figure 1: The 3D printed MNC. Here we show the 5 magnet model. Color dots on the MNC arms are used for the motion tracking.
To develop the models every relevant parameter is measured independently (Table 1). Both damping coefficients are obtained from single-pendulum free decays (§3.3); the magnet strength , once determined, is transferred unchanged between configurations.
| quantity | method | value |
|---|---|---|
| magnet radius | calipers (15.9 mm diameter) | 7.95 mm |
| magnet thickness | calipers | 1.6 mm |
| length / center of mass | balance against a known mass | 0.173 m / 0.104 m |
| mass | scale | 7.0 g |
| moment of inertia | bare-swing period, | |
| natural frequency | each pendulum's free swing from camera data | |
| magnet strength | Hall-probe axial field map, all 5 magnets (§3.2) | 1160(34) A |
Table 1: Independently measured constants. The value of is the direct Hall-probe measurement of §3.2 (mean ± standard error over five magnets); the closed-loop predictions of §3.6 use the value fitted once to a three-pendulum recording (≈1120 A), which agrees with it.
2.2 Theoretical model
The angular oscillations of each pendulum are determined by the torques due to the magnetic interactions between pendulums, gravity, as well as air drag for each pendulum.
We investigate two models for the magnet’s behavior: (i) magnet as a current loop and a (ii) magnet as a dipole
2.2.1 A magnet as a current loop
A uniform magnetization is equivalent to bound currents (volume) and (surface). For a uniformly axially-magnetized disk (, constant), , so there is no volume current; on the rim, , there is a current circulating around the edge. For thickness this surface sheet reduces to a single loop of current
The exact equivalent of the magnet is a surface current sheet of height ; the single thin loop is its limit. For the disks in this study (see Table I) we have and , so this is a reasonable approximation. This approximation is also checked below against the closed-form finite-cylinder force [5, 6].
The Biot–Savart law for a loop of radius in the plane, , is evaluated at a field point by parametrizing the loop with and substituting ; every term collapses onto the complete elliptic integrals[12]
With , ,
with on the axis. Every component is linear in and exact at all distances — in particular, at the sub-diameter separations the cradle operates at.
2.2.2 The far-field (dipole) limit
For large distances between magnets ( ), we find that , , and (3) reduce to the field of a point dipole of moment , with
, and the force between two dipoles reduces to the familiar law used in most prior magnetic-pendulum work [1, 2]. With A, A m . Figure 2 quantifies where the two models diverge: the dipole over-predicts the force by at 2 cm separation, falling to only by 8 cm. When the cradle is operated over this range, the exact loop field of (3) is required for an accurate predictive model.
Why a current loop, not a dipole: they agree far away but differ where the cradle works

Figure 2: Force between two magnets: current-loop model vs. the point-dipole approximation. The dipole over-predicts by at 2 cm, converging to the loop result only beyond cm (shaded band = the cradle's operating range).
2.2.3 Inter-magnet force, torque, and the scaling
A current carrying loop exposed to an external field experiences the Lorentz (motor) force; loop i in loop j's field feels
evaluated numerically by the trapezoidal rule around the loop. Since and the integrand carries a further factor of , the force — and hence the torque — scales exactly as
With alternating orientation , the force carries a factor : (repel) for neighbors, (attract) for next-nearest neighbors. Pendulum hangs from pivot with magnet position , giving the planar torque about the pivot, . Because this torque is times a function of angles alone, we tabulate the unit-current torque once per spacing and rescale by at run time.
2.2.4 Equations of motion and damping
Based on the above observations the governing equations for the motion of the pendulums are expressed as:
\boxed{I_{k}\ddot{\theta}_{k}=\underbrace{I_{\mathrm{m a g}}^{2}\sum_{j\neq k}\tau_{k j}^{\mathrm{u n i t}}(\theta_{k},\theta_{j})}_{\mathrm{m a g n e t i c~i n t e r a c t i o n s}}-\underbrace{M g l_{\mathrm{c o m}}\sin\theta_{k}}_{\mathrm{g r a v i t y}}-\underbrace{b\dot{\theta}_{k}}_{\mathrm{l i n e a r~d r a g}}-\underbrace{c\dot{\theta}_{k}|\dot{\theta}_{k}|}_{\mathrm{q u a d r a t i c~d r a g}}},k=1,\cdots N_{k}} \tag{7}where denotes the total number of pendulums.
2.3 Parameter identification by Optimizing a Discrete Loss
The model parameters of the cradle can be identified by using a video of the experimental apparatus. One approach to find the parameters is by optimization: initialize the model parameters integrate the equations of motion forward in time, compare the simulated angles with the measured ones, adjust the parameters, repeat[8]. This works well when the motion is gentle. It works badly when the motion is chaotic, because then a tiny error in the parameter makes the simulated trajectory wander off from the measured one after a few swings, and the optimization process diverges.
In ODIL [9, 10] the angles of all pendulums at all time steps are treated as unknowns, in addition to the physical constants. These unknowns are identified via an optimization requiring that the equations of motion hold as well as possible at every time step and the simulated angles pass as close as possible to the measured ones. These requirements are written as sums of squares, the discrete loss which is then minimized. Schematically,
If there are no data and the constants are known, the minimum of is zero and the minimizer is exactly the solution a time-stepping scheme would produce. In this case ODIL must reproduce a conventional simulation to round-off, a useful self-check. If there are data the physics term only nudges the trajectory towards obeying the equations of motion. The data term at the minimum is a direct measure of how well the model can explain the data throughout the recording. This allows for the two models using the dipole and current-loop magnets to be compared on equal terms.
2.3.1 The cradle model used for identification
We use a simplified version of (7) with pendulums: each is a point mass at the end of a massless string of length , the magnet sits at the mass, damping is linear, and the magnets keep their orientation as the pendulums swing. Measuring lengths in units of and time in units of , the angle of pendulum obeys
where the three terms are gravity, damping and the magnetic torque. The two dimensionless constants,
will be identified by ODIL. Magnets are mounted with alternating polarity , so neighbors repel and the two end magnets attract weakly. Pendulum hangs from , so its magnet sits at .
The magnetic torque is where the two magnet models differ. Both are written as an interaction energy between pairs of magnets; the torque on pendulum is then simply minus the slope of that energy with respect to ,
which we evaluate by automatic differentiation (AD) in JAX so that both models run through identical code.
Model D (point dipole). Treating each magnet as a point dipole, the pair energy depends only on the distance between the two magnet centers and on how far the line joining them, , is from the magnets' common axis:
For two magnets side by side on the axis ( ) this gives a force of magnitude in these units, i.e. the familiar far-field repulsion between antiparallel dipoles. The energy grows without bound as , so a tiny softening distance ( , ) is added to keep intermediate optimizer iterates finite.
Model L (exact current loop). Here each magnet is a circular loop of wire of radius carrying a current that gives it the same magnetic moment as the dipole. The energy of two current loops is, , where the mutual inductance is Neumann's double line integral around both loops. In SI units,
where is the point on loop at angle around its rim and is the dot product of the two tangent directions. Once the pendulums swing the two loops are parallel but no longer share an axis, and there is no closed form; we simply place equally spaced points around each loop and replace the double integral by a double sum over the pairs of points. Because the integrand is smooth and periodic this “trapezoidal rule” is extremely accurate: with we reproduce the exact elliptic-integral result for two coaxial loops [5, 6] to twelve digits. When the loop radius is small compared with the distance between magnets, Model L reduces to Model D with a correction of order —that is why both models can share the same constant . When is comparable to , as it is at the closest approach in the cradle, the two models differ substantially (Fig. 2 and §3.4).
The numerical values used in §3.4-κ = 5 × 10⁻⁵, γ = 0.02, pivot spacing and -are of the same order as in the apparatus of Table 1 (R/l = 0.046, at 4 cm spacing).
2.3.2 Optimization using a discrete loss
The principle of ODIL requires that we divide the time interval into equal steps of length and call the (unknown) angles at step . Replacing the second derivative in (9) by a central difference and the first derivative by a centered difference gives, at every interior time step, the residual
Two more residuals impose the release from rest at the held angles : fixes the starting angles and fixes the starting velocity to zero (the second term is the small displacement gravity and magnets produce during the first half step). Finally, each measurement—pendulum observed at time step with value —contributes the residual . The discrete loss is the weighted sum of all these residuals squared:
The unknowns are all the and, in the inverse problem, the constants to be identified. We optimize , and rather than the constants themselves; this keeps them positive automatically, and one optimizer step changes them by a percentage rather than by an amount.
For the forward problem (constants known, no data) is attainable and the minimizer is exactly the trajectory one gets by solving (14) for and marching forward in time,
We use this recursion in two ways: as the check that the optimizer has really found the minimum, and as an inexpensive way to produce a starting trajectory. Synthetic measurements for the tests in §3.4 are generated with a high-order integrator (DOP853, relative tolerance ) of the continuous equations, so that the discretization error of (14) is present in every inverse test just as it would be with real data.
2.3.3 Minimization of the loss
is a sum of squares of residuals , where collects all unknowns. We use the Gauss–Newton method which linearizes the residuals about the current guess, with the Jacobian matrix, and choose the step that minimizes the linearized sum of squares,
The extra term (Levenberg-Marquardt damping, the diagonal of ) shortens the step when the linearization is poor: is decreased after every successful step and increased after every step that fails to lower . Near the solution the iteration converges quadratically.
The Jacobian is large ( for ) but sparse: residual depends only on , so each row of has just nine non-zeros (plus one per identified constant). We build it exactly with nine forward-mode automatic-differentiation passes, using the trick that time steps never share a residual and can therefore be differentiated together (Appendix A), store it as a sparse matrix, and solve (17) with a sparse LU factorization. One iteration then costs a time proportional to : about 0.05s for Model D and 0.6s for Model L (whose torque involves the double sum for each pair of magnets at each time step) on a laptop. This “Newton mode” of ODIL is what we use for all results. For comparison, we also minimize the same loss with a gradient-based method of the kind used to train neural networks (Adam, followed by L-BFGS); §3.4 shows why the Newton mode is preferred here.
Starting guesses. For the forward problem we start from the constant trajectory on a coarse grid with steps, converge, interpolate the solution onto a grid twice as fine, converge again, and repeat, a one-way version of the multigrid idea of [10]. When solving a family of forward problems (several magnet radii) the previous solution is the starting point of the next. For the inverse problem we start from the trajectory obtained by running the recursion (16) with the guessed constants; the measurements themselves are deliberately not used to build the starting trajectory, for a reason shown in §3.4. Algorithm 1 summarizes the procedure.
Algorithm 1 ODIL identification for the magnetic cradle.
Require: magnet model (D or L); known constants; held angles ; time grid ; measurements (none for a forward problem); initial guess for the constants to be identified
1: trajectory recursion (16) with the guessed constants
2:
3: repeat
4: evaluate all residuals (14)–(15), with the torque from (11) and the energy of Model D (12) or Model L (13)
5: assemble the sparse Jacobian (nine AD passes for the trajectory, one per identified constant)
6: solve (17) for the step
7: if the step lowers : accept it and decrease ; else reject it and multiply by 4
8: until is below tolerance or no step is accepted
Ensure: trajectory, identified constants, root mean square (RMS) data misfit, physics residual
Three uses of Algorithm 1 are reported in §3.4. Forward consistency: no constants identified, no data; the ODIL trajectory must agree with the recursion (16) to round-off, and differs from the DOP853 solution only by the error of the scheme. Identification: data generated with Model D and known are fitted by Model D starting from a deliberately wrong guess, for several observation patterns and noise levels, to see how accurately the constants come back. Model discrimination: data generated with the finite-size Model L are fitted by (i) Model D for , (ii) Model L with the radius known, and (iii) Model L for . If the point dipole were an adequate description, fit (i) would return the true and a misfit at the noise level. How far it misses in , equivalently in , and in the leftover misfit to noise free data, measures the model-form error of the far-field approximation.
Calibration on the measured trajectories. For the experimental data, the same algorithm is run with the rigid-rod model of (7) rather than the point-mass twin: the magnets sit a distance from the pivot and turn with the rod, and the time unit is with , so that and . Four practical differences matter. (i) The recordings start while the first pendulum is still held, so the frames before release are dropped and the initial angles and velocities of all pendulums are left free, no release-from-rest assumption is made. (ii) Each rod may have a slightly different natural frequency and each tracked angle a small calibration offset, so per-pendulum frequency factors (prior ) and offsets (prior ) are added as nuisance unknowns. The damping enters through and (the quadratic term of (7)), either of which can be held at its directly measured value or released as an unknown; a third, optional term acting on the mean angular velocity of the row is used in §3.5.2 to test for losses through the common motion of all pendulums. (iii) The physics weight in (8) is increased in stages (continuation from to ): the first, “soft” stage lets the trajectory follow the data while the constants adjust; the last, “hard” stage forces the trajectory to obey the model, so that its remaining misfit is the genuine predictive error of the calibrated model. (iv) Every video frame is a measurement of all angles, so the observation set is dense, and the solver grid uses two steps per frame.
3 Results
Here we present an analysis of the linear modes to show the agreement of our method with existing works. We then describe results from the inverse modeling process and compare the two models for the magnets.
3.1 Linear normal modes
For a classical NC, small-amplitude approximations with , energy , and the drag torque removes energy at a rate per cycle, giving the amplitude-decay equation
When we model the drag using only the linear term we obtain a constant fractional decay rate. The quadratic drag adds a correction that grows with amplitude and dominates above . The equation of motion (7) is integrated with a differentiable solver (diffrax/JAX). In turn the model parameters are fitted with scipy's trust-region least-squares.
Writing about the static equilibrium and Taylor-expanding the total torque to first order gives , with stiffness matrix
Seeking solutions gives the generalized eigenvalue problem
An symmetric has real eigenvalues, hence normal modes for pendulums. The lowest mode is the in-phase mode, : for vertical rods the magnet spacings do not change and ; the static offsets shift it by , less than 1% for the present rig. In this mode the magnetic interaction is not loaded, just as touching balls swinging together are not compressed in a classical cradle. Higher modes compress the magnets and are magnetically stiffened, raising their frequency. The center pendulum sits at a node of every antisymmetric mode and shows only the symmetric modes — 3 of 5 for , 2 of 3 for — a prediction confirmed directly in the per-pendulum Fourier spectra (§3.8).
The eigenfrequencies of (20) are exact in the limit. At the small amplitudes of the recordings analyzed here ( ) the finite-amplitude corrections to the gravitational and magnetic restoring torques shift them by less than 1%, and they are not treated further in this paper.
3.2 Direct measurement of the magnet strength
Throughout §2.2–§3.1 the magnet strength was treated as a constant to be measured. We have made that measurement directly. We used a Hall probe that was swept along the axis of each of the five magnets used in the cradle, recording the axial field from 0.2 mm to 57 mm from the magnet face (Fig. 3). Each sweep is fit to the exact finite current-sheet field of a uniformly magnetized cylinder of height L and radius R (the surface-current generalization of (3), with surface current density ),
rather than the thin-loop limit, since several probe positions are closer to the magnet than its own thickness, where the thin-loop approximation is least reliable. The five independent fits give
(mean ± standard error; magnet-to-magnet spread 6.6%), which agrees with the value fitted to the multi-pendulum dynamics (≈1120 A; the ODIL calibrations of §3.5 give 1112–1151 A) to within 4%, about one standard error. Hence, the two independent determinations of , one magnetostatic and one dynamical, agree. The implied remanent field T is lower than the N45 datasheet remanence (1.32 T to 1.35 T). Because the pendulum dynamics independently give the same moment, the difference is unlikely to be an artifact of the field fit; the most likely explanation is that the magnets are of a lower grade than specified.
Hall-probe axial field sweeps, all 5 magnets fit to the exact finite current-sheet model

Figure 3: Axial field sweeps for all five magnets used in the cradle, each fit independently to the exact finite current-sheet model. The five fitted values of (legend) agree with each other to 6.6% and with the dynamics-fit value used throughout the predictions of §3.6 to within 4%.
3.3 Damping: from an indirect estimate to a direct measurement
A small amplitude bare pendulum free decay is a clean exponential on a log-amplitude plot, consistent with linear drag. Fitting its slope gives N m s. This value, however, underdamps the multi-pendulum cradle and the gap between model and data grows with amplitude. Hence, some additional, amplitude-dependent dissipation is implied by the data. We subsequently recorded a dedicated large-amplitude () single-pendulum free decay and jointly fit both terms of (18) to that one record, resolving and self-consistently:
This directly measures the quadratic term from an isolated pendulum, rather than inferring it indirectly from the multi pendulum residual. The linear coefficient of this joint fit is, however, twice the small-amplitude value; a single pair does not describe both decays, so the damping law of (7) is itself only approximate. The revised gives a damping ratio , with a amplitude decay time of s. Propagating the refined pair through the closed-loop multi-pendulum predictions of §3.6 changes the reported RMS errors by only a few hundredths of a degree, confirming that the magnetic coupling, not damping, governs the cradle's dynamics. We checked candidate physical mechanisms for the quadratic term: ordinary aerodynamic drag is ruled out and eddy-current damping at these field strengths is very weak. We therefore treat as an effective interaction loss term, most plausibly representing out-of-plane or frame motion at the close magnetic approaches, rather than a proven aerodynamic effect.

Figure 4: Large-amplitude ( ) free-decay envelope: linear-only fit vs. the joint linear+quadratic fit that resolves b and c self-consistently.
3.4 Parameter identification with ODIL on a synthetic three-pendulum cradle
All results in this subsection use the reduced model (9) with , the release protocol of the experiments (pendulum 1 held at rad and released from rest, pendulums 2-3 at the static repulsion offset), a horizon ( swing periods) and time steps (). All computations run on a laptop CPU.
Forward problem: ODIL reproduces the discrete dynamics to round-off. Starting from a constant trajectory and no time integration, the sparse Gauss–Newton solver drives the discrete loss to in 276 iterations over the three grids ( steps; 7s), Fig. 5. The ODIL trajectory agrees with the explicitly time-stepped Verlet solution of the same stencil to rad, confirming that the optimizer finds the exact minimizer, and with the DOP853 reference to rad, the error of the stencil itself. The dynamics are those of a cradle: the released pendulum’s momentum passes through the middle magnet to pendulum 3, which swings out to 0.53 rad at , while the neighbor separation never drops below 0.07l (Fig. 5, middle). The first-order baseline behaves very differently: 1000 Adam steps followed by 5000 L-BFGS iterations on the same loss (at ) stall at a loss of with an trajectory error (Fig. 6). The stiff near-field force makes the problem badly conditioned for first-order methods, in line with the observations of [9]; all subsequent results use the Newton mode.

Figure 5: Forward ODIL solve of the three-pendulum cradle (point-dipole model). Top: angles from ODIL (color) over the DOP853 reference (gray). Middle: neighbor separations—the bobs never touch. Bottom: ODIL minus reference, i.e. the error of the Störmer–Verlet stencil at .

Figure 6: Convergence of the discrete loss. Gauss–Newton with the exact sparse Jacobian (blue) reaches round-off on each grid of the coarse-to-fine hierarchy; Adam followed by L-BFGS (orange, abscissa rescaled to its 6000 steps) stalls at .
Inverse problem: magnet strength and damping from sparse noisy angles. Synthetic observations are taken every 20th step (100 samples per observed pendulum over the horizon) with Gaussian noise rad = 0.6°, comparable to the Tracker digitization error of the experiments. The initial guess is deliberately poor: four times and five times their true values. Table 2 and Fig. 7 summarize the recovery. With all three pendulums observed both parameters are identified to 2% in 30 Gauss–Newton iterations (4s); with only the far pendulum observed—the pendulum that never directly touches the released one—the coupling is still identified to 1.7%, because the physics residual propagates the information through the unobserved pendulums. With noise-free data the residual errors (0.05%, 0.02%) are the discretization bias of the stencil and shrink with . The parameter iterates (Fig. 7, right) travel together with the trajectory: nothing moves for the first ~10 iterations while the trajectory is being pulled onto the data, then both parameters converge in a further 10–15 iterations.
| case | observed | [rad] | error | error | GN its. |
|---|---|---|---|---|---|
| A | pendulums 1–3 | 0.01 | 2.1% | 1.9% | 30 |
| B | pendulum 3 only | 0.01 | 1.7% | 3.1% | 39 |
| C | pendulums 1–3 | 0 | 0.05% | 0.02% | 23 |
| B' | pendulum 3 only | 0.01 | spurious minimum () | 200 | |
Table 2: ODIL identification of the magnetic coupling and the damping from synthetic angle data sampled every 20th step, starting from 4× and 5× too large. Cases A-C initialize the trajectory with a time-stepped solution for the guessed parameters; B' () initializes it by interpolating the sparse observations

Figure 7: Left: ODIL trajectories (color) fitted to noisy observations (dots) over the truth (gray) for cases A (top) and B (bottom, only pendulum 3 observed). Right: iterates of and for cases A–C; the dashed line is the true value.
The one failure (case B') is instructive. If the trajectory is initialized by interpolating the sparse data the solver settles in a spurious minimum in which the coupling and the damping are driven to zero and the observed pendulum is fitted as a free pendulum. Initializing the trajectory instead with the time-stepped solution for the guessed parameters removes the problem in every case we tried. For the experimental application this costs one forward integration and is the recommended protocol.
Model discrimination Figure 8 shows the static force between a repelling pair for the two magnet models at equal moment. At the rest gap () the loop force is 98, 93 and 76% of the dipole value for , 0.025 and 0.05; at the closest approach the cradle reaches during a momentum transfer () it drops to 82–86%, 51–59% and 18–24%, the same near-field discrepancy identified in dimensional form in Fig. 2. Solving the forward problem with ODIL for each radius, Fig. 9, the magnet is indistinguishable from a dipole ( rad over ), the 0.025 magnet drifts by 0.05–0.08 rad, and the 0.05 magnet is a visibly different cradle:
the first transfer to pendulum 3 arrives later ( instead of ) and smaller ( instead of rad), the bobs approach to instead of , and the trajectories separate by rad within four periods.

Figure 8: Static repulsion between two magnets of equal moment: point dipole () vs. exact current loops of three radii. Right: force ratio; the finite size weakens the force by up to a factor of five at the separations the cradle reaches during a momentum transfer.
The inverse problem turns this into a quantitative statement about model form error (Table 3, Fig. 10). Fitted to noise-free data produced by finite magnets, the point-dipole model can only lower its effective moment and raise its damping: the identified is 0.95, 0.84 and 0.64 times the true value for the three radii, i.e. an equivalent current under-reported by 2, 8 and 20%, and is over-estimated by 1, 6 and 12%. What the effective moment cannot absorb remains as an irreducible RMS misfit of , and rad that is not noise-like but spikes at every momentum transfer (Fig. 10, right). For magnets of the size used here the dipole misfit is therefore comparable to the digitization noise of a real measurement, so the dipole model would be rejected by its residual and, if accepted regardless, would silently return a magnet current 20% low. The current-loop model fitted with , and free recovers all three to better than 1% from the same noise free data, from an initial guess with more than three times too large in the smallest case, and its misfit ( rad) is at the level of the stencil error. With 1% measurement noise the loop model with known recovers to 0.8%; inferring as well gives 5% and 7% low. The two parameters both control the close-range force and are partly degenerate at this noise level, which is an argument for measuring the magnet radius independently, as done in Table 1, and for observing the system where the transfers occur.
| true | dipole model fitted () | loop model fitted () | |||
|---|---|---|---|---|---|
| ( equiv.) | misfit [rad] | error | error | misfit [rad] | |
| 0.0125 | 0.953 (-2%) | < 0.05% | +0.9% | ||
| 0.025 | 0.844 (-8%) | < 0.05% | +0.2% | ||
| 0.05 | 0.635 (-20%) | < 0.1% | +0.1% | ||
Table 3: Model discrimination with ODIL. Noise-free data generated with the current-loop model are fitted by both models from the same poor initial guess ( 4×, 5×, ). The dipole model absorbs part of the finite-size effect into a biased effective moment and leaves the rest as an irreducible, structured misfit; the loop model recovers every parameter. The rig's discs () correspond to the last row.

Figure 9: Forward ODIL solutions with identical and release for the point-dipole model and current loops of radius . Top: pendulum 3. Middle: difference to the dipole solution. Bottom: closest neighbor separation (dotted lines: magnet radii).
3.5 ODIL calibration on the measured trajectories
We now apply Algorithm 1 to the measured trajectories of the apparatus. The primary data set consists of two independent recordings of the five-pendulum cradle at 4 cm pivot spacing (N45 discs of 15.9 mm diameter and 1.6 mm thickness pressed into the printed enclosures with their axes along the row): in each, pendulum 1 was pulled out and released and the angles of all five pendulums were tracked at 59.94 fps for about 31 s (recordings DSC 6824 and DSC 6823, hereafter trials A and B). Trial A was exported from Tracker at full precision; the angles of trial B were rebuilt from the tracked pixel positions with the pivots of trial A, the camera not having moved between the two takes. Both records show the static repulsion offsets ( in A and in B) and five clean spectral peaks at 1.44, 1.83, 2.41–2.42, 3.14–3.16 and 3.95–3.97 Hz whose cross-spectral shapes are the five normal modes of §3.1. The older three-pendulum recordings at pivot spacings 2, 4, 6 and 8 cm (DP2-DP8), exported with a hand-placed origin per pendulum and angles rounded to , are analyzed with the identical protocol in §3.5.3.
Every fit identifies, besides the physical parameters listed in the tables, the initial state, five (three) rod frequency factors and five (three) angle-calibration offsets, the latter two with Gaussian priors of 3% and . The quadratic damping coefficient is fixed at its single-pendulum value (§3.3) in every fit that does not list among the identified parameters. The magnet strength and radius are identified on the first 10 s after release, where the signal-to-noise ratio is highest; the damping coefficients on the first 25 s.


Figure 10: Model-form error of the point-dipole approximation quantified by ODIL. Left: identified relative to the true value vs. true magnet radius, for the dipole (blue) and loop (green) models. Center: RMS misfit to noise-free data; the dotted line marks a 1% (0.6°) measurement noise. Right: residual of pendulum 3 for the two fits to data with 1% noise and ; the dipole residual (blue) spikes at every momentum transfer, the loop residual (green) does not (shaded band: ).
3.5.1 Repeatability of the identified magnet
Table 4 lists the parameters identified from the two five-pendulum trials side by side. Three results follow. First, the current-loop model identifies the magnet correctly and repeatably: it returns and 1134 A from the two trials ( and , a 1% spread), within 3% of the independent Hall-probe value of 1160(34) A and of the closed-loop dynamics fit of §3.6 ( A). The point-dipole model fitted to the same data needs 990 and 1000 A, 15% low in both trials, the same direction and similar magnitude as the bias found in the synthetic study of §3.4 for magnets of this size ( ), although that study used a point-mass model and larger releases. Second, on full-precision data the magnet radius is recovered from the motion alone: with left free the two trials give 7.6 and 8.3 mm, bracketing the caliper value of 7.95 mm. The near-field force law of the real discs is measurably different from a dipole’s and the data promote the loop model. Third, the calibrated loop model is predictive: it reproduces the outer pendulums to RMS over 10 s, against an overall misfit of for the dipole model, and its linearized modes (1.817, 2.404, 3.121, 3.916 Hz for trial A) are within 1% of the measured peaks (Fig. 11). The one exception, pendulum 2 at in both trials, is a constant bias rather than a dynamical error: its measured rest angle sits inside the mirror value of pendulum 4, a tracking-calibration offset that the prior did not allow the fit to absorb on the 10-s window (it is absorbed on the 25-s window, where the data outweigh the prior, and the misfit of pendulum 2 drops to ).
| model | (A m²) | (A) | (mm) | (10⁻⁵ N m s) | RMS misfit (deg) |
|---|---|---|---|---|---|
| point dipole | 0.197 / 0.199 | 990 / 1000 | – | 1.81 / 2.33 | 0.35 / 0.41 |
| loop, measured | 0.223 / 0.225 | 1122 / 1134 | 7.95 | 1.85 / 2.35 | 0.30 / 0.35 |
| loop, inferred | 0.220 / 0.227 | 1110 / 1145 | 7.6 / 8.3 | 1.84 / 2.36 | 0.30 / 0.35 |
| direct measurement | 0.230 | 1160 ± 34 | 7.95 | 2.65 |
Table 4: Repeatability of the ODIL calibration on the two independent five-pendulum recordings (4 cm spacing, first 10 s after release, hard-physics stage); each cell gives trial A / trial B. is quoted for mm throughout so that the moments can be compared directly with the Hall-probe value. The quadratic damping is fixed at its single-pendulum value . The initial state, five rod frequency factors and five calibration offsets were identified alongside; the frequency factors stayed within 0.15% of each other and the offsets within 0.1° of zero. RMS misfit over all five pendulums; the per-pendulum values for the loop model are 0.19/0.54/0.20/0.18/0.20° (A) and 0.32/0.58/0.28/0.27/0.19° (B).

Figure 11: ODIL calibration of the five-pendulum cradle (trial A) with the current-loop model (hard-physics stage): measured angles (gray) and the calibrated model trajectory (color) for the five pendulums over the first 10s after release, and the residuals (bottom). The constant offset of pendulum 2 is a calibration bias of the tracked angle; the dynamics of all five pendulums are reproduced to 0.2°.
3.5.2 Identifying the damping
The direct measurement of §3.3 resolved the linear and quadratic damping coefficients from a single-pendulum decay at 37°. Can the cradle trajectories themselves identify ? The discrete loss makes the test straightforward: (in the form ) is added to the list of unknowns and the 25-s window is fitted again. Table 5 collects the outcome for trial A with the loop model, together with the point-dipole result and the corresponding fits for trial B.
| trial | model | free | RMS misfit, pend. 1–5 (deg) | all | |||
|---|---|---|---|---|---|---|---|
| A | loop | 1.80 | 2.7 (fixed) | – | 0.22 / 0.39 / 0.22 / 0.17 / 0.21 | 0.25 | |
| A | loop | 59 | – | 0.24 / 0.40 / 0.22 / 0.18 / 0.23 | 0.26 | ||
| A | loop | 1.74 | 2.7 (fixed) | 1.6 | 0.22 / 0.39 / 0.22 / 0.16 / 0.21 | 0.25 | |
| A | dipole | 60 | – | 0.39 / 0.33 / 0.24 / 0.18 / 0.30 | 0.29 | ||
| B | loop | 70 | – | 0.30 / 0.49 / 0.24 / 0.25 / 0.22 | 0.32 | ||
| B | loop | 2.25 | 2.7 (fixed) | 4.1 | 0.26 / 0.48 / 0.22 / 0.23 / 0.16 | 0.29 | |
| B | dipole | 71 | – | 0.48 / 0.42 / 0.24 / 0.20 / 0.34 | 0.35 | ||
| direct (§3.3) | 2.65 | 2.72 | |||||
Table 5: Damping identified on the 25-s window (hard-physics stage). “free” lists the damping parameters identified together with , the initial state, the frequency factors and the offsets; in N m s, in N m s, (common-mode term, see text) in N m s. “” marks a parameter driven to the lower bound of its logarithmic parametrization. The identified moment is A m in every loop fit of trial A.
With held at the single-pendulum value, N m s reproduces the 25-s record to . Releasing does not improve the fit: the Levenberg-Marquardt iteration wanders along a flat valley of the loss to the opposite corner: and N m s, twenty to twenty-five times the single-pendulum value at an RMS misfit of , indistinguishable from the linear fit. The same happens with the point-dipole model and in trial B. A third form, a common-mode (“frame”) term acting on the mean angular velocity of the row, which would model losses through the net reaction of the pendulums on the support, is identified at and in trials A and B, a tenth to a fifth of , again with at most a marginal change of the misfit. The non-identifiability is expected from the amplitudes involved: the trials were released from , where the peak angular velocity is rad/s and the ratio of the quadratic to the linear torque at the measured coefficients, , has fallen to after 10 s; the single-pendulum decay of §3.3 started from , five times that velocity, where the ratio is 0.6, which is why it could resolve the two terms. The three-pendulum recordings confirm the picture from the other side: at 6 cm spacing the loop model returns with , while the point dipole returns with on the same data (Table 6)—the split between the two terms is not a property of the cradle but of which force law is left to absorb the residual.
Projecting the measured angles on the five normal modes of the calibrated model and fitting an exponential to each modal envelope (Fig. 12) gives decay rates of 0.10 and 0.15 s for the in-phase mode in trials A and B but only 0.04-0.05 s for the highest mode, with the intermediate modes in between. A linear torque damps every mode at the same rate (0.14 s for the direct value); the observed rates correspond to for the in-phase mode and 0.8-1.0 for the highest one. The quadratic term is the only parameter of the present model that produces mode-dependent rates (the in-phase mode has the largest velocity amplitude), which is the direction in which the free fit moved. However, the modal envelopes remain exponential rather than hyperbolic, so the mechanism is more plausibly a loss that depends on the mode shape—the in-phase mode is the one in which all five pendulums push on the support together—than on the velocity squared. The misfit is insensitive to this because the fast modes carry a few tenths of a degree of amplitude. A release in a pure high mode, or a cradle on a stiffer support, would settle it; the identification machinery needs no change.

Figure 12: Decay of the five normal modes in the two measured five-pendulum trials: envelopes of the modal coordinates obtained by projecting the measured angles on the mode shapes of the calibrated loop model, with exponential fits (dashed). Linear damping predicts the same rate for all modes; the in-phase mode decays two to three times faster than the highest mode.
3.5.3 Three- versus five-pendulum trials, and the directly measured parameters
The same protocol was applied to the five older three-pendulum recordings, whose pivot spacing ranges from 2 to 8 cm. Table 6 sets the loop-model parameters identified trial by trial against the directly measured values of Table 1 and §3.3.
| direct | three pendulums (spacing 2–8 cm) | five pendulums (4 cm) | ||||||
|---|---|---|---|---|---|---|---|---|
| DP2 | DP4 | DP6(1) | DP6(2) | DP8 | A | B | ||
| (A), loop | 1376 | 1151 | 1120 | 1112 | 1269 | 1122 | 1134 | |
| (A), dipole | 1288 | 1043 | 1050 | 1041 | 1219 | 990 | 1000 | |
| (A m²), loop | 0.230 | 0.273 | 0.229 | 0.222 | 0.221 | 0.252 | 0.223 | 0.225 |
| (mm), loop with free | 7.95 | 18.4 | 18.2 | 13.5 | 18.3 | – | 7.6 | 8.3 |
| (), fixed, 10 s | 2.65 / 1.24 | 4.7 | 2.3 | 2.8 | 2.5 | 1.8 | 1.8 | 2.4 |
| (), free, 25 s | 2.65 | 3.3 | 3.0 | – | ||||
| (), free, 25 s | 2.72 | 249 | 90 | – | 59 | 70 | ||
| RMS misfit (deg), loop, 10 s | 0.85 | 1.23 | 0.34 | 0.45 | 0.67 | 0.30 | 0.35 | |
| static offset of pend. 1 (deg) | 9.3 | 5.0 | 1.9 | 2.2 | 1.3 | 5.3 | 5.5 | |
Table 6: Parameters identified by ODIL, trial by trial, against the direct measurements (hard-physics stage; magnet parameters on the 10-s window, damping as indicated). DP2–DP8: three-pendulum recordings at 2–8 cm pivot spacing, digitized with a hand-placed origin per pendulum and angles rounded to 0.1°; A, B: the two full-precision five-pendulum recordings at 4 cm. The two direct values of are the large- and small-amplitude single-pendulum measurements. DP8 has the weakest coupling (static offsets 1.3°) and its free-radius and 25-s fits are degenerate (), marked –.
Four observations follow. (i) The magnet strength is consistent across data sets. The three-pendulum trials at 4 and 6 cm give and 1112 A, and the two five-pendulum trials 1122 and 1134 A: five recordings, two apparatus configurations and two digitization procedures agree to within 3.5%, all within 1.5 of the Hall-probe mean (1160(34) A), while the dipole values for the same recordings (990–1050 A) lie 3–5 below it. The two extreme spacings deviate from the Hall-probe value: DP2 (2 cm) gives +19% and DP8 (8 cm) +9%. At 2 cm the discs face each other across a gap of only 2.3 and the identified moment is most sensitive to the geometry—the static offsets fix , so and a 1 mm error in the pivot spacing or in the position of the magnet in its enclosure moves by 10%; the 2 cm record is also the one with the largest static offsets (9.3°), where the hand-placed tracking origin weighs most. At 8 cm the coupling is weak (offsets of 1.3°, with a 0.3° asymmetry between the outer pendulums that the model cannot produce), so the strength is identified from mode splittings of a few hundredths of a hertz in angles rounded to 0.1°. (ii) The dipole bias is systematic. The point-dipole strength is 4–15% below the loop value in every trial, so the 15% bias of §3.5.1 is not a property of one recording. (iii) The magnet radius is the parameter that exposes the data quality. With free the full-precision five-pendulum exports return 7.6 and 8.3 mm, the three-pendulum exports 13–18 mm. The radius is set by the difference between the information in the static offsets and in the mode splitting; we attribute the failure on the three-pendulum data to an angle-scale error of a few percent in the hand-digitized exports (§3.5.1) shifts exactly that difference; the radius, unlike the strength, can only be read from full-precision data. (iv) The linear damping agrees with the direct large-amplitude measurement. With held at its single-pendulum value, is identified between 1.8 and N m s in all trials at 4–8 cm (the 2 cm trial, whose misfit is dominated by the near-field model error, gives ), bracketing the direct large-amplitude value and above the small-amplitude one (). Between the two five-pendulum trials differs by 25% (1.85 against ); trial B was released from a larger angle (7.3° against 6.0° peak amplitude) and decays faster, the same direction of amplitude dependence as the direct measurement.
3.6 Prediction across 2–5 pendulums
With measured, fixed from §3.3, and fitted once to a three-pendulum recording and then transferred unchanged, each configuration is integrated closed-loop from its measured release angles alone — nothing magnetic is re-fit between configurations, so reproducing a new pendulum count is a genuine prediction rather than an independent fit. Fig. 14 shows two consistency checks: the static repulsion offset across pivot spacings and the fitted across configurations.
| pendulums | spacing | mean RMS | notes |
|---|---|---|---|
| 2 | 8 cm | 0.55° | best of three 2-pendulum spacings tested (8 cm to 10 cm) |
| 3 | 6–8 cm | ~0.50° | two independent 6 cm runs agree on to ~1% |
| 4 (single) | 4 cm | 0.21° | six interaction pairs |
| 5 | 4 cm | 0.28° | ten interaction pairs |
Table 7: Closed-loop prediction accuracy vs. pendulum count. One magnet, measured once, predicts every configuration.
4-pendulum cradle (dp=4cm, single release) — closed-loop prediction from starting angles, Imag=1120A (mean RMS 0.21°)

5-pendulum cradle (dp=6cm) — closed-loop from starting angles, Imag=1120A, no sensor offset, 0° per pendulum (5 ft) (mean RMS 0.39°)

Figure 13: Model (red, dashed) vs. measured (gray/black) angle traces. Left: 4-pendulum single release, predicted to 0.21°. Right: five-pendulum, predicted to 0.28°.


Figure 14: Consistency checks. Left: the static repulsion offset of the end pendulum, produced by the alternating-polarity mounting, collapses from 9.4° at 2 cm spacing to ≈0° by 8 cm, reproduced with a single magnet current. Right: the fitted is essentially constant across pendulum count and spacing — a property of the magnet, not of any one fit.
At large release amplitude the prediction error grows (Fig. 15): larger swings bring the magnets closest at their extremes, exactly where the finite-loop near-field force law is least exact, and the motion becomes increasingly sensitive to the initial conditions.
3.7 Energy transfer in the MNC
Like a classical cradle, energy released at one end of the chain travels to the other. The mechanism differs: a classical cradle transfers energy discretely — one ball in, one out, the middle balls stationary — whereas the magnetic coupling is continuous, so energy spreads along the chain as a beat, the same physical picture that underlies the normal-mode decomposition of §3.1. Perpendulum swing energy, , is computed from the differentiated, one-period-smoothed tracked angle (removing the within-swing kinetic↔potential exchange) and normalized to a fraction of the total. This is a proxy for where the energy is, not the full conserved budget: it omits the magnetic interaction energy, which is shared between a pair of magnets and cannot be assigned to a single pendulum, and which we separately recover by integrating the

Figure 15: RMS prediction error vs. release amplitude. The error grows as larger swings bring the magnets closer and make the motion more sensitive to the initial conditions.
conservative torque,
giving , which is conserved up to the slow damping.
Both transfer energy end-to-end (similar to a regular cradle); classical is discrete, magnetic is continuous

Figure 16: End-to-end energy transfer. Top: an ideal classical cradle (energy confined to the two end balls, simulated). Bottom: the magnetic five-pendulum cradle (measured) — energy released at the left end spreads continuously down the chain and back.
3.8 Linear normal-mode spectra
The first-principles eigenfrequencies of (20) — computed with no fitting to the Fourier data — match the measured fast Fourier transform (FFT) peaks to 1-2% (Table 8).
| N | predicted modes [Hz] | measured FFT peaks [Hz] |
|---|---|---|
| 3 | 1.45, 2.00, 2.87 | 1.46, 1.97, 2.81 |
| 4 | 1.45, 1.90, 2.59, 3.46 | 1.45, 1.88, 2.58, 3.44 |
| 5 | 1.45, 1.82, 2.41, 3.12, 3.92 | 1.45, 1.84, 2.41, 3.14, 3.95 |
Table 8: First-principles eigenfrequencies vs. measured FFT peaks (4 cm spacing).

Figure 17: Measured FFT (black) with predicted mode frequencies (red, dashed) for . The lowest mode is the in-phase mode at ; higher modes are magnetically stiffened and fan out as pendulums are added.
The symmetry argument of §3.1 is confirmed directly in the per-pendulum spectra (Fig. 18): the center pendulum of the 5-chain shows only its 3 symmetric modes, with the antisymmetric peaks reduced to residual noise reflecting the small real-world asymmetry (rod-to-rod variation of , imperfectly one-sided release) of an otherwise mirror-symmetric rig.
3.9 Parameter study and the classical-cradle limit
Sweeping the model's eigenfrequencies against pivot spacing , pendulum length , and magnet strength (holding the rest of the model fixed) locates two universal facts. First, the in-phase mode stays within 1% of the free-pendulum frequency at every point in parameter space, since it does not load the magnetic interaction. As the coupling vanishes ( or ) all modes collapse onto : the zero-coupling limit is a row of independent pendulums, with no energy transfer. The classical cradle lies at the opposite extreme, an interaction of zero range and very high stiffness that lasts a short time compared with the swing period; the magnetic interaction lasts a sizable fraction of a period, so energy moves by beating between modes rather than by impulsive collisions. Second, coupling strength enters symmetrically through spacing and magnet strength: decreasing or increasing both fan the higher modes upward from , while increasing or decreasing collapse them back onto the degenerate uncoupled limit. Neither

Figure 18: Per-pendulum FFT of the 5-cradle. Symmetric modes (present for all pendulums) and antisymmetric modes (absent at the center, which sits on their node) separate exactly as predicted by the reflection symmetry of §3.1.
limit is singular: as the model saturates to a finite frequency (the finite loop size prevents divergence, and the magnets cannot physically overlap below ), and as every mode returns smoothly to . Pendulum length instead moves every frequency together as , since it rescales gravity rather than the coupling.
3.10 Limitations and Next steps
The model is planar and treats the frame as rigid. Out-of-plane motion and frame compliance are not represented; frame compliance is the most plausible origin of the mode-dependent damping of §3.5.2. The current-loop force law is itself the thin-disc () approximation to the true finite-height current sheet. For the 1.6 mm discs used here this is checked against, and agrees with, the exact finite-cylinder closed forms of [5, 6], but is not exact. The magnet strength is now measured directly by Hall probe (§3.2), agreeing with the independent dynamics fit value to within 4%. Per-pendulum natural frequencies are calibrated per rig, since the rods of the three-pendulum rig differ by ; an uncorrected error of this size accumulates into several radians of phase over 30 s. Finally, the classical cradle used for qualitative energy-transfer comparison (§3.7) is an idealized, simulated one-in/one-out cradle and we have not conducted experiments. This can be the topic of another investigation. Finally, the recordings analyzed here start at , where forward-shooting fits also converge; demonstrating the advantage of ODIL on large-amplitude, chaotic recordings is left for future work.
From the ODIL study the identified magnet strength depends on the magnet model: fitting a point dipole to a cradle built from discs returns a current 4-15% low in every recording, and it is the current-loop value that agrees with the Hall probe. That value is repeatable to 1% between the two five-pendulum recordings and to 3.5% across the five-pendulum and the 4- and 6-cm three-pendulum data sets, so the three determinations of —magnetostatic (1160(34) A), closed-loop dynamics fit (1120 A) and ODIL (1112–1151 A) are consistent to within 4%. The

Figure 19: Eigenfrequencies vs. pivot spacing: magnetic cradle (5 modes, one color per mode), uncoupled pendulums (, degenerate), and their overlay. Coupling collapses onto the uncoupled limit as and saturates (does not diverge) as .
outlying 2- and 8-cm trials mark the limits of the near-field geometry () and of weak coupling, respectively. The data term of the discrete loss is a sharp diagnostic of data quality: the same exports could not be made consistent by any model, and the inconsistency disappeared with a full-precision export. The same machinery answers the question of which damping the cradle can identify. Released as an unknown, the quadratic coefficient is not resolved by trajectories that start at : linear, quadratic and common-mode forms of dissipation fit the 25-s records equally well (), the free fit drifting to , without any gain. The identifiable quantity is the total dissipation, and the linear coefficient obtained with fixed at its single-pendulum value ( N m s across recordings) agrees with the direct large-amplitude measurement.
4 Conclusion
We present a concise study of data driven parameter identification in a magnetic Newton's cradle model. Modeling each magnet as a finite current loop rather than a far-field point dipole, and measuring, rather than fitting, every constant that can be measured independently, provides a magnetic Newton's cradle that is not only a qualitative demonstration but a well quantified dynamical system. A single magnet current — independently confirmed by direct Hall-probe field mapping to agree with its dynamics-fit value to within 4% — predicts chains of 2 to 5 pendulums to sub-degree accuracy from their release angles alone. The same near-field model, linearized about equilibrium, predicts the full normal-mode spectrum to 1–2% with no fitting to the Fourier data and, cast as the residual of a discrete loss, allows the magnet strength, the damping, and the magnet radius to be identified jointly with the trajectory by ODIL — to within 1–2% from sparse noisy synthetic angles, and on the measured recordings at 4 and 6cm repeatedly to within 4% of the Hall-probe current, with the magnet radius recovered to within 5% on the two full-precision recordings, with the linear damping matching its direct measurement and the quadratic term shown to be unidentifiable at the amplitudes recorded. The magnetic cradle shares the in-phase mode of the classical cradle, the one motion that does not load the interaction. The magnetic cradle differs from it not in whether energy transfers end-to-end, but in how and in the richer spectrum of normal modes that the continuous, near-field magnetic coupling makes possible.
Future work will investigate how a longer chain (8–12 magnets) can produce solitary-wave and single-site-localization regimes reported by Molerón et al. [3]. Extending the present study will allow for a system whose near-field force law is validated in closed form rather than assumed.
We believe that ODIL provides a simple and quantitative way of introducing inverse problems as a methodology for the study of complex dynamical systems that can be easily understood and experimented with.
A Implementation details of the ODIL solver
This appendix collects the formulas behind §2.3 for readers who want to reproduce or extend the solver; the accompanying notebook implements them verbatim.
Dipole force in closed form. With the magnet axes and , the force on magnet that follows from (12), , is
and the torque about the pivot is . This closed form is used only as a check of the automatic-differentiation torque (agreement to ).
Loop geometry and quadrature. Loop lies in the plane perpendicular to and extends in the out-of-plane direction with tangent , so and
The double integral (13) is replaced by
For coaxial loops at axial distance the exact result is with ; the quadrature (27) matches it to a relative error of for , . On the axis as , which reproduces the dipole energy exactly. A disc of finite thickness is represented by loops equally spaced over the thickness, each carrying of the current.
Jacobian blocks. Differentiating (14) with respect to the three time levels it involves gives blocks
so the Jacobian with respect to the trajectory is block-tridiagonal, and the only non-trivial block is the Hessian of the magnetic energy (the magnetic part of the stiffness matrix in (20)). The columns for the identified constants are
(Model L only).
(29)
Assembly by coloring. Rather than coding (28), the sparse Jacobian is obtained exactly from forward-mode automatic differentiation. For each color and each component a tangent vector is formed with at all time levels and zero elsewhere; one Jacobian-vector product then returns, for every residual row, the derivative with respect to the single unknown of that color and component that the row depends on. Nine products give all non-zeros without cancellation; one further product per identified constant gives (29). The result was verified against a dense automatic-differentiation Jacobian to .
Levenberg-Marquardt control. With and a trial step from (17), the gain ratio compares the actual to the predicted decrease. A step is accepted if decreases; is then multiplied by , otherwise the step is rejected and multiplied by 4. Iterations stop when (forward) or (inverse), or when no step is accepted. The first-order baseline uses 1000 Adam steps (learning rate ) followed by up to 5000 L-BFGS iterations with a zoom line search on the same loss.
References
[1] F. M. Russell, Y. Zolotaryuk, J. C. Eilbeck, and T. Dauxois. Moving breathers in a chain of magnetic pendulums. Physical Review B, 55:6304–6308, 1997.
[2] J. Cuevas, L. Q. English, P. G. Kevrekidis, and M. Anderson. Discrete breathers in a forced-damped array of coupled pendula: modeling, computation, and experiment. Physical Review Letters, 102:224101, 2009.
[3] M. Molerón, A. Leonard, and C. Daraio. Solitary waves in a chain of repelling magnets. Journal of Applied Physics, 115:184901, 2014.
[4] L. M. García-Raffi, L. J. Salmerón-Contreras, N. Jiménez, A. Mehrem, V. J. Sánchez-Morcillo, R. Picó, and J. F. R. Archilla. Nonlinear waves in a chain of magnetically coupled pendula. In Proceedings of Meetings on Acoustics, volume 34, page 045037, 2018.
[5] D. Vokoun, M. Beleggia, L. Heller, and P. Sittner. Magnetostatic interactions and forces between cylindrical permanent magnets. Journal of Magnetism and Magnetic Materials, 321:3758–3763, 2009.
[6] R. Ravaud, G. Lemarquand, S. Babic, V. Lemarquand, and C. Akyel. Cylindrical magnets and coils: fields, forces, and inductances. IEEE Transactions on Magnetics, 46(9):3585–3590, 2010.
[7] E. Baake, M. Baake, H. G. Bock, and K. M. Briggs. Fitting ordinary differential equations to chaotic data. Physical Review A, 45(8):5524–5529, 1992.
[8] Antônio H. Ribeiro, Koen Tiels, Jack Umenberger, Thomas B. Schön, and Luis A. Aguirre. On the smoothness of nonlinear system identification. Automatica, 121:109158, 2020.
[9] P. Karnakov, S. Litvinov, and P. Koumoutsakos. Solving inverse problems in physics by optimizing a discrete loss: Fast and accurate learning without neural networks. PNAS Nexus, 3(1):pgae005, 2024. Preprint: arXiv:2205.04611, “Optimizing a Discrete Loss (ODIL) to solve forward and inverse problems for partial differential equations using machine learning tools”.
[10] P. Karnakov, S. Litvinov, and P. Koumoutsakos. Flow reconstruction by multiresolution optimization of a discrete loss with automatic differentiation. The European Physical Journal E, 46:59, 2023.
[11] D. Brown, R. Hanson, and W. Christian. Tracker video analysis and modeling tool (version 6.3.5). Open Source Physics, https://opensourcephysics.github.io/tracker-website/, 2026.
[12] John David Jackson. Classical Electrodynamics. John Wiley & Sons, New York, 3 edition, 1999.