Introduction
In the field of robotics, the ability to accurately model system dynamics is fundamental to achieving precise control and safety. Traditionally, engineers have relied on first-principles models derived from physical laws. While these models are inherently safe and interpretable, they often struggle to account for complex, non-linear real-world effects such as aerodynamic drag or intricate friction patterns. Conversely, black-box machine learning approaches, such as standard Neural Ordinary Differential Equations (ODEs), offer high expressivity but frequently fail to respect fundamental physical constraints, leading to energy drift or violations of mathematical manifold requirements.
This paper introduces a "gray-box" learning framework that bridges this gap by embedding port-Hamiltonian mechanics and Lie group constraints directly into the Neural ODE architecture. By construction, this model ensures that the learned dynamics are physically consistent while remaining flexible enough to capture unmodeled disturbances.
Methodology
The core innovation lies in the formulation of a Port-Hamiltonian Neural ODE on Lie Groups. This approach integrates structural priors from physics with the flexibility of deep learning.
1. Structural Priors and Energy Decomposition
Rather than training a single neural network to predict raw acceleration, the framework decomposes the system into four distinct components, each represented by a neural network:
- Kinetic Energy ($T$): Represents the energy associated with the robot's motion.
- Potential Energy ($V$): Captures energy related to position, such as gravitational effects.
- Dissipation ($D$): Explicitly models energy loss due to friction and air resistance, a critical addition for real-world viability.
- Input Matrix ($B$): Defines how control inputs (e.g., motor thrust) are mapped to generalized forces.
2. Lie Group Integration
Robotic systems typically operate in 3D space where orientations and poses are defined on non-Euclidean manifolds like $SO(3)$ (rotation matrices) or $SE(3)$ (rigid body transformations). The proposed model embeds these manifold constraints into the ODE structure. This ensures that the robot’s state remains mathematically valid throughout the integration process, preventing the "numerical drift" common in standard neural networks.
3. Energy-Based Control (IDA-PBC)
Because the learned model adheres to the port-Hamiltonian structure, the authors can leverage Interconnection and Damping Assignment Passivity-Based Control (IDA-PBC). This control strategy "shapes" the system's energy to follow a desired trajectory. A significant advantage of this method is its robustness; it allows for stable control even when the exact mass or inertia of the robot is not known a priori.
Experimental Evaluation
The framework was validated across four diverse environments to test its versatility and robustness:
- Simulated Pendulum: A benchmark for energy conservation on the $SO(3)$ manifold.
- Simulated Omnidirectional UGV: Testing planar movement on the $SE(2)$ manifold.
- Simulated Crazyflie Quadrotor: An underactuated system tested within the PyBullet physics engine.
- Real-World PX4 Quadrotor: Data was collected from a physical drone equipped with an Intel NUC, flying in a motion-capture-controlled arena.
Key Insights
- Energy as an Implicit Regularizer: By forcing the network to learn an underlying energy function, the model becomes self-regularizing. It is physically incapable of "creating" energy, which significantly enhances long-term prediction stability compared to black-box models.
- Scale Invariance: The authors demonstrate that Hamiltonian systems are scale-invariant regarding momentum. Even if the neural network learns a scaled version of the true energy, the resulting control laws remain effective.
- Real-World Dissipation: Unlike previous Hamiltonian Neural Networks that assumed conservative (lossless) systems, this port-Hamiltonian approach explicitly accounts for dissipation. This makes it uniquely suited for robotics where air resistance and friction are non-negligible.
Results and Performance
The Port-Hamiltonian Neural ODE demonstrated superior performance across several metrics:
- Physics Preservation: In 50-second simulations, the model maintained $SO(3)$ orthogonality and energy conservation, whereas black-box models diverged almost immediately.
- Tracking Accuracy: On the real-world PX4 quadrotor, the learned model improved trajectory tracking by a factor of 2 to 4 compared to standard geometric controllers using nominal CAD parameters.
- Rapid Adaptation: The model showed impressive transfer learning capabilities. When a payload (a "coffee can") was added to the drone, the model regained high precision after only 100 training steps.
- Computational Efficiency: The controller operates with a latency of approximately 2.5 ms on a standard CPU, meeting the requirements for high-frequency real-time control loops.
Limitations and Future Directions
While the model respects Lie group structures, the training process currently occurs in a higher-dimensional Euclidean space ($R^{n \times n}$). Future research could involve training directly on the manifold using specialized Lie group ODE solvers. Additionally, the current framework assumes smooth dynamics and does not yet account for hybrid events such as contact dynamics (e.g., foot impacts or grasping). Finally, extending the model to handle structural changes or modular robotics remains an open area for exploration.
Summary updated