FNODE: Flow-Matching for data-driven simulation of constrained multibody systems
Hongyu Wang, Jingquan Wang, Dan Negrut
TL;DR
FNODE introduces Flow-Matching Neural Ordinary Differential Equations to data-drivenly simulate constrained multibody dynamics by learning accelerations directly, removing the ODE adjoint backpropagation bottleneck. Acceleration targets are computed with a hybrid FFT-based spectral differentiation and finite-difference scheme, while kinematic constraints are enforced via coordinate partitioning so that independent coordinates are learned and dependent coordinates are recovered from constraints. The approach yields substantial gains in training efficiency and prediction accuracy across a range of benchmarks, from simple damped oscillators to chaotic and constrained mechanisms, and shows competitive performance compared to solver-based baselines. Open-source code and benchmarks accompany the work to support reproducibility and further research. FNODE thus offers a scalable, physics-informed alternative for data-driven simulation and rapid prototyping of constrained multibody systems.
Abstract
Data-driven modeling of constrained multibody dynamics remains challenged by (i) the training cost of Neural ODEs, which typically require backpropagation through an ODE solver, and (ii) error accumulation in rollout predictions. We introduce a Flow-Matching Neural ODE (FNODE) framework that learns the acceleration mapping directly from trajectory data by supervising accelerations rather than integrated states, turning training into a supervised regression problem and eliminating the ODE-adjoint/solver backpropagation bottleneck. Acceleration targets are obtained efficiently via numerical differentiation using a hybrid fast Fourier transform (FFT) and finite-difference (FD) scheme. Kinematic constraints are enforced through coordinate partitioning: FNODE learns accelerations only for the independent generalized coordinates, while the dependent coordinates are recovered by solving the position-level constraint equations. We evaluate FNODE on single and triple mass-spring-damper systems, a double pendulum, a slider crank with and without friction, a vehicle model, and a cart-pole, and compare against MBD-NODE, LSTM, and fully connected baselines. Across these benchmarks, FNODE achieves improved prediction accuracy and training/runtime efficiency, while maintaining constraint satisfaction through the partitioning procedure. Our code and scripts are released as open source to support reproducibility and follow-on research.
