Abstract
This paper introduces a "gray-box" approach to robot learning that integrates Hamiltonian mechanics into a Neural Ordinary Differential Equation (ODE) framework. By embedding physical constraints directly into the neural architecture, the proposed method ensures that learned dynamics respect energy conservation and $SE(3)$ kinematics. This structured approach enables high data efficiency and supports an energy-based adaptive controller capable of real-time compensation for disturbances such as wind or actuator failure.
Introduction
In robotics, accurate dynamics models are essential for safe and precise control. However, engineers typically face a trade-off between first-principles models, which are physically consistent but often too simple to capture complex disturbances, and black-box machine learning models, which can fit complex data but may predict unphysical behavior. This paper addresses the challenge of learning dynamics for rigid-body systems, such as drones and underwater vehicles, that operate on the $SE(3)$ manifold (the space of 3D positions and orientations). The goal is to develop a model that is flexible enough to capture environmental disturbances while remaining strictly physically plausible.
Methodology: Hamiltonian-based Neural ODEs
The core innovation is the Hamiltonian-based Neural ODE. Rather than using a neural network to predict the next state directly, the authors decompose the robot's dynamics into interpretable physical components, each represented by a neural network:
- Mass/Inertia Matrix ($M_\theta$): Learned via a neural network.
- Potential Energy ($V_\theta$): Learned via a neural network.
- Input Gain ($g_\theta$): Learned via a neural network.
- Disturbance Model ($W_\phi$): A feature network that captures external forces.
These components are plugged into Hamilton’s equations of motion. Because the architecture itself is the equation, the resulting model automatically respects energy conservation and $SE(3)$ kinematics by construction. For control, the authors utilize Interconnection and Damping Assignment Passivity-Based Control (IDA-PBC), which treats the robot as an energy-storing system. An adaptation law updates the disturbance weights online, allowing the robot to "feel" and compensate for disturbances like steady crosswinds in real-time.
Experimental Setup
The approach was evaluated using the PyBullet simulator with a model of a Crazyflie quadrotor. The training data consisted of 8 different disturbance realizations, including horizontal winds (ranging from $\pm 0.25$ to $\pm 0.5$ m/s) and motor degradations (rotors operating at 94-98% of nominal thrust). High data efficiency was a key highlight; the model was trained on trajectories consisting of only 5 sampling points each.
Key Results and Insights
The system was tested on a challenging task: tracking a spiral trajectory while facing a constant wind of 0.75 m/s and two defective rotors operating at 80% thrust.
As shown in the results, the nominal controller without adaptation drifted significantly from the path. In contrast, the physics-guided adaptive controller estimated the disturbance online within seconds and successfully tracked the spiral trajectory with high precision.
By forcing the neural network to operate within the structure of Hamiltonian mechanics, the search space for the model is drastically reduced, leading to superior data efficiency compared to standard black-box MLPs. Furthermore, the model remains interpretable, as the learned mass matrix and potential energy can be physically inspected.
Limitations and Future Work
While promising, the current work is limited to simulation environments. Future research is needed to demonstrate performance on physical hardware where sensor noise and communication latency are present. Additionally, the assumption that disturbances are a linear combination of learned features may struggle with highly non-linear, state-dependent disturbances like complex turbulent wakes. Finally, the computational overhead of solving an ODE inside a control loop remains a challenge for resource-constrained robotic platforms.
Summary updated