Do Simulators Get Stability Right? Measuring and Calibrating Lyapunov Exponents Against Hardware

Engineers increasingly design robot controllers to be stable in a precise sense. When a disturbance knocks the robot slightly off course, the stable ones shed it, and nearby trajectories pull back together instead of drifting apart. The standard measure is the Lyapunov exponent, the average exponential rate at which two nearly identical trajectories separate (positive) or merge (negative). Recent work optimizes these exponents directly inside physics simulators or learned world models. Almost none of it checks whether the exponent computed in simulation matches the one the physical machine actually has. Simulators are calibrated so their trajectories look like real trajectories. A Lyapunov exponent, however, depends on how the system responds to small differences, which is the slope of the dynamics rather than its path. A simulator can reproduce recorded paths closely and still get those slopes wrong, especially near contact, friction, and actuator delay.

This note proposes treating the Lyapunov spectrum as a quantity to be experimentally validated, just as structural engineers validate a finite-element model against a strain gauge. The plan has three parts. We will build a model-free estimator of finite-time Lyapunov exponents from repeated, lightly perturbed hardware runs. We will use it to audit whether trajectory-calibrated simulators predict real stability. Where they do not, we will add the measured exponents as an extra calibration target, and then test whether controllers optimized for stability in the re-calibrated simulator are measurably more disturbance-tolerant on hardware.

Core Claim

Matching trajectories under-constrains the parts of a simulator that determine stability, so a simulator can pass ordinary validation and still give unreliable stability numbers. We claim that the sim-to-real mismatch in measured Lyapunov exponents is a distinct, measurable validation quantity. We further claim that adding it as a calibration target produces simulators whose stability rankings of controllers transfer to hardware, which trajectory-only calibration does not guarantee. The claim is falsifiable on both sides. If trajectory-calibrated simulators already rank controllers' real stability correctly, the proposal's premise fails. If exponent matching does not improve hardware disturbance recovery beyond trajectory matching with the same data budget, its practical value fails.

Where This Sits

The stability side supplies the objective but stays inside models. Enhancing Robotic System Robustness via Lyapunov Exponent-Based Optimization backpropagates through the sum of Lyapunov exponents, $L_a$, using a differentiable simulator. It reports a quadruped improving from $L_a=-0.56$ to $-0.61$ and a fivefold gain on a planar manipulator, all in simulation with no hardware. Enhancing Robustness in Deep Reinforcement Learning: A Lyapunov Exponent Approach penalizes the maximal exponent estimated from three imagined rollouts in a learned world model. The authors state that its effectiveness is bottlenecked by the world model's accuracy. Continual Learning from Simulated Interactions via Multitask Prospective Rehearsal reports a trajectory exponent of 0.089 versus 0.095 on an ankle exoskeleton, but only as an offline evaluation number. These papers motivate the gap: each optimizes or reports an exponent without validating the model that produced it. Our proposal reuses the first paper's differentiable SVD machinery as its calibration method.

Two hardware works constrain what we can claim. LyEvO uses a Lyapunov ellipsoid from a linearized model to shape simulated safety testing, then deploys on a Quanser Cartpole and an ANT-X quadrotor. It never measures exponents on the physical robot. Power-Based Safety Layer for Aerial Vehicles does estimate the largest exponent online on hardware, detecting divergence in 0.2 s. Its estimate is a single scalar computed from low-pass-filtered tracking errors, and it is used as a trigger rather than compared against any simulator. We differ from both by measuring the spectrum on hardware specifically to compare it with simulation.

The validation side supplies the calibration methods we compete against. DiSECt calibrates cutting parameters against force sensors, reducing normalized mean absolute error from 0.60 to 0.05. gradSim identifies physical parameters from video. REALM tunes 14 friction and armature parameters to reach a sim-real task-progress correlation of r = 0.921, yet its policies still break under behavioral shifts. That last result is the closest evidence that agreement in average behavior does not imply agreement in sensitivity. Sim-to-Real: Learning Agile Locomotion shows that modeling 15–19 ms actuator latency matters for transfer. Latency is exactly the kind of unmodeled effect we expect to distort exponents while leaving average paths mostly intact.

Research Program

Hardware exponent estimator. The first component estimates the Lyapunov spectrum of a real closed-loop system without trusting any model. We run a fixed controller many times from a reference state and inject small, known perturbations, either commanded motor impulses or initial-state offsets. From these runs we fit local linear maps between consecutive time windows by regression over neighboring trajectory segments. We then multiply these maps forward with repeated QR factorization, the standard way to extract a full spectrum. The quantity reported is the finite-time sum

$$\hat L_a(T) = \frac{1}{T}\sum_{t=1}^{T} \sum_i \log |R^{(t)}_{ii}|,$$

where $R^{(t)}$ is the triangular factor from the QR step at window $t$ and $T$ is the number of windows. A negative value means the machine shrinks clouds of nearby states. Sensor noise biases such estimates toward expansion, so the estimator is first validated in a simulation-only setting where the true exponents are known (described below). It is then accepted for hardware only if it recovers known exponents within a stated tolerance at hardware-realistic noise levels.

Audit. The second component asks whether ordinary calibration predicts real stability. On a set of roughly twenty controllers spanning stable and nearly unstable gains, plus learned policies, we compute $L_a$ three ways: in the uncalibrated simulator, in a trajectory-calibrated simulator, and on hardware via the estimator. The audit statistic is the rank correlation across controllers between simulated and measured exponents. A second check is whether either exponent predicts the real disturbance-recovery rate, which is the property the exponent is supposed to stand for.

Stability-matched calibration. The third component adds exponent agreement to the calibration objective:

$$\min_\theta \; \mathcal{E}_{\text{traj}}(\theta) + \beta \sum_k \big(L_a^{\text{sim}}(\theta, \pi_k) - \hat L_a^{\text{real}}(\pi_k)\big)^2 .$$

Here $\theta$ are the simulator's physical parameters, $\mathcal{E}_{\text{traj}}$ is the usual trajectory-matching error, $\pi_k$ are the calibration controllers, and $\beta$ weights the stability term. The gradient of $L_a^{\text{sim}}$ comes from the differentiable SVD pipeline of Fadini-style optimization. Because a free parameter could simply absorb the mismatch, we calibrate on some controllers and conditions and test on held-out ones. These include a changed pole mass on the cartpole and a changed latency in the simulation-only testbed. This guards against the overfitting the research file warns about, such as an unphysical friction coefficient compensating for backlash.

Downstream optimization. Finally, we optimize controllers for negative $L_a$ in each calibrated simulator, deploy them, and measure hardware recovery.

Baselines

Uncalibrated simulator. The naive reference is the simulator with nominal parameters. It sets the floor for both the audit correlation and downstream hardware recovery.

Trajectory-only calibration. The strongest competitor is the REALM recipe of REALM: gradient or black-box tuning of friction, armature, damping, and latency parameters to match recorded trajectories. REALM reports a task-progress correlation of r = 0.921. On force-profile matching, DiSECt reports normalized mean absolute error falling from 0.60 to 0.05. No reported result was found on Lacuna for the sim-real agreement of Lyapunov exponents under any calibration method, so this proposal establishes that number. For fairness, the baseline receives exactly the same hardware runs, including the perturbed ones, so that it sees the same excitation. It also receives the same parameter set and the same optimizer budget. Beating it means two things. On held-out controllers, the stability-matched simulator must achieve higher rank correlation with measured hardware exponents and with recovery rate. Its trajectory error must not be meaningfully worse.

Strongest existing stability-certified controller. On the cartpole, the comparison controller is LyEvO. It reports a 6.14× safe-region expansion over linear-matrix-inequality baselines on the Quanser Cartpole, with no measured hardware Lyapunov exponent reported. We re-run it on our unit with its published procedure under a reduced compute cap. That cap is stated explicitly, because the original quadrotor run used 31 hours on up to 1,000 cores. We measure its real $\hat L_a$ and recovery rate alongside ours. Matching it with far less compute counts as a practical win. Exceeding its recovery rate counts as a substantive win.

Ablations. Two ablations isolate the key ingredient. Exponent-only calibration, with no trajectory term, tests whether the stability term alone is enough. A spread-matching calibration matches only the variance of perturbed runs, without Lyapunov structure. This tells us whether the benefit comes from the exponent specifically or from any sensitivity-aware target.

Why not just…?

Why not just do trajectory system identification with richer excitation? This is the real threat. If perturbed runs are included in the data, trajectory matching might recover the correct local slopes on its own. The baseline design above settles it, because the trajectory-only baseline receives exactly the same perturbed data. If its held-out exponent correlation equals ours, the honest conclusion is that the value lies in the perturbation protocol and in the hardware exponent estimator as a validation check, not in the extra loss term. The note would then be rewritten around the audit alone.

Why not just use domain randomization and skip calibration? RRLS finds that domain randomization gives the strongest average-case returns under parameter shifts. Average return is not stability, though. The Lyapunov DRL study shows high-return policies with positive maximal exponents. Randomization also leaves unanswered whether the simulator's stability ranking can be trusted. We include a randomization-trained policy in the controller set and report its measured hardware exponent and recovery rate.

Why not just measure recovery rate directly and ignore exponents? Recovery trials are the ground truth here, and we run them. They are a coarse pass/fail outcome, however, and each trial consumes hardware time and wears the hardware. Exponents are continuous and differentiable in simulation, which is what makes them usable as a calibration and design target. The audit tests directly whether measured exponents actually predict recovery. If they do not, that negative result constrains the whole Lyapunov-design literature.

Why not just ground a learned world model with real data? This would address the world-model bottleneck stated in the Dreamer-based study. A learned model fitted to trajectories inherits the same under-constraint in its slopes that we hypothesize for simulators. We include a world model fine-tuned on the same hardware data as a third simulator in the audit.

Proposed Experiments

Simulation-only testbed. The first stage uses the DeepMind Control Suite cartpole and hopper tasks. A modified copy of each plays "reality": stiffer contacts, 15–19 ms latency following the Minitaur study, joint backlash, and sensor noise. Because the true exponents are computable here, this stage validates the estimator's bias and variance. It also runs the full audit and calibration comparison with ten seeds.

Hardware stage. The second stage repeats the audit and calibration on a Quanser Cartpole. A friction or backlash insert may be added to widen the reality gap. Held-out conditions include a changed pole mass. Recovery is scored as the fraction of known motor-impulse disturbances, at graded magnitudes, after which the pole returns to balance.

Decisive checks. The proposal hinges on three results. The first is whether trajectory-calibrated simulators show weak rank agreement with measured hardware exponents on held-out controllers; this is the premise. The second is whether stability-matched calibration raises that agreement beyond trajectory-only calibration given identical data; this is the method. The third is whether controllers optimized in the stability-matched simulator recover from more hardware disturbances than controllers optimized in the trajectory-calibrated one; this is the payoff. Any of the three failing is informative and reported as such.