Differentiable physics · inverse problems

Differentiable Pendulum: Parameter Inference

Differentiable Pendulum: Parameter Inference
fig. Differentiable Pendulum: Parameter Inference
open full screen ↗

The notebook runs on its own once it loads, so give it about 10 seconds while Python starts up in your browser, and the simulations begin animating. Move the sliders and everything recomputes live. The code is shown alongside the output so you can read exactly how it works; the full editable source is linked below.

A double pendulum is chaotic, but its masses and arm lengths still leave a fingerprint in the motion. I treat the RK4 simulator as a differentiable forward model and run gradient descent on a loss that compares simulated and observed trajectories, recovering the physical parameters from noisy data to within a few percent. It is the mirror image of the chaos work: instead of predicting motion from parameters, I infer parameters from motion.

← back to explorations