Testing an inferred invariant
When does a polynomial fitted to a trajectory give a conserved quantity for the whole system? For a harmonic oscillator a quadratic fit recovers the energy. A cubic candidate passes every observation on the same training orbit and fails on a second orbit of the very same equation. Coupling in another oscillator then tests a different claim about the transfer of the genuine energy integral.
Required background. Density searches explains a bounded polynomial ansatz. Jacobi checks fixes the sign of a Hamiltonian time derivative.
Fit a polynomial using its derivative
Section titled “Fit a polynomial using its derivative”Choose unit masses and dimensionless canonical variables. For an uncoupled oscillator fit
On a sampled state the row of the derivative design matrix is . A candidate invariant gives a vector of coefficients in its nullspace. A constant basis function would give a zero column for any dynamics, so omit it. Sample the exact trajectory at , , with analytic derivatives. Kaiser, Kutz and Brunton, §IV-A, Eqs. (12)–(16), derivative library and zero-eigenvalue nullspace
The three columns are the sampled functions , and . Discrete sine and cosine are orthogonal on this grid and each has squared norm . Thus
Its eigenvalues give the exact singular values of . In binary64 the companion finds a smallest singular value of order . Normalizing its right singular vector by the first coefficient gives within . The same calculation on noisy measurements would also pick up errors in the estimated derivatives.
Test a second energy shell without changing the force
Section titled “Test a second energy shell without changing the force”Freeze the fitted coefficients. Change the amplitude to and shift the sample times by . The maximum absolute derivative on these withheld data is about in the recorded calculation. For the exact vector conservation follows for all initial conditions, since the derivative of the general quadratic is .
Why change the amplitude if more time samples are cheap? Suppose the candidate library also contains linear and cubic terms. It can then represent
The second formula uses . On the training circle and vanish at every phase. On the withheld orbit the same candidate has and , where is phase measured from the positive axis. In particular, both orbits go through a point with and . Measuring the slope there immediately distinguishes them. The figure follows the full phase dependence, with time in units of inverse angular frequency.
The candidate along two exact uncoupled oscillator trajectories, parameterized by over one period. The dashed line uses radius , and the solid curve uses radius . The dots mark the common value at a quarter period. The plotted candidate, phase and radii are dimensionless.
Change the Hamiltonian and predict the failure
Section titled “Change the Hamiltonian and predict the failure”Now take
For the quadratic potential is positive definite. Embed the first oscillator’s fitted unchanged. Its derivative is . On the test state it is for and for . These signs and ratios follow from the equations of motion. The derivative would vanish at a turning point with , so samples confined to such points provide a weak test even of the changed system. The total Hamiltonian is conserved because the changes in the two oscillator energies cancel the derivative of . Reproduce the fit, the false candidate and the coupling scan (Python)
The fitted first energy is therefore an exact integral of the original oscillator and fails as an integral of the coupled model. The coupled quadratic model can itself be diagonalized in normal coordinates. Losing a proposed integral tests that particular expression; determining integrability of the new dynamics requires examining the integrals suited to it.
References
Section titled “References”- Kaiser, E., J. N. Kutz, and S. L. Brunton (2018). “Discovering Conservation Laws from Data for Control.” 2018 IEEE Conference on Decision and Control, 6415–6421. DOI.
Connected readings