Table of Contents
Fetching ...

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.

FNODE: Flow-Matching for data-driven simulation of constrained multibody systems

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.

Paper Structure

This paper contains 24 sections, 57 equations, 19 figures, 8 tables, 2 algorithms.

Figures (19)

  • Figure 1: The discretized forward pass for FNODE for general MBD
  • Figure 2: Temporal evolution of state variables for the single-mass-spring-damper system. The left and right columns depict the displacement ($x$) and velocity ($v$), respectively. Dashed lines indicate model predictions over the training interval ($t \in [0,3]$), while dotted lines represent extrapolated predictions on the test interval. The mean squared error (MSE) for each model is provided: FNODE ($\epsilon=1.9\text{e-}2$), MBD-NODE ($\epsilon=1.3\text{e-}1$), LSTM ($\epsilon=7.0\text{e-}1$), and FCNN ($\epsilon=4.2\text{e}1$).
  • Figure 3: Comparative phase-space trajectories ($v$ vs. $x$) for the single-mass-spring-damper system. Model performance on the training and test data is differentiated by dashed and dotted lines, respectively. The subplots correspond to the predictions of (a) FNODE, (b) MBD-NODE, (c) LSTM, and (d) FCNN.
  • Figure 4: Triple mass-spring-damper system. The setup is similar to the single mass-spring-damper system, except for the addition of two more masses, springs, and dampers.
  • Figure 5: Predicted temporal evolution for the triple-mass-spring-damper benchmark. The left column presents the displacement ($x$) and the right column presents the velocity ($v$) for each of the three masses. Dashed and dotted lines denote predictions on the training ($t \in [0,3]$) and test sets, respectively. The associated MSEs are: FNODE ($\epsilon=3.0\text{e-}2$), MBD-NODE ($\epsilon=5.0\text{e-}2$), LSTM ($\epsilon=1.0\text{e}0$), and FCNN ($\epsilon=1.3\text{e}0$).
  • ...and 14 more figures