Port-Hamiltonian Neural ODE Networks on Lie Groups For Robot Dynamics Learning and Control


Thai Duong
Abdullah Altawaitan
Jason Stanley
Nikolay Atanasov
Department of Electrical and Computer Engineering
University of California, San Diego
Under review, 2023.

[Paper]
[Code]


Accurate models of robot dynamics are critical for safe and stable control and generalization to novel operational conditions. Hand-designed models, however, may be insufficiently accurate, even after careful parameter tuning. This motivates the use of machine learning techniques to approximate the robot dynamics over a training set of state-control trajectories. The dynamics of many robots are described in terms of their generalized coordinates on a matrix Lie group, e.g. on SE(3) for ground, aerial, and underwater vehicles, and generalized velocity, and satisfy conservation of energy principles. This paper proposes a (port-)Hamiltonian formulation over a Lie group of the structure of a neural ordinary differential equation (ODE) network to approximate the robot dynamics. In contrast to a black-box ODE network, our formulation guarantees energy conservation principle and Lie group's constraints by construction and explicitly accounts for energy-dissipation effect such as friction and drag forces in the dynamics model. We develop energy shaping and damping injection control for the learned, potentially under-actuated Hamiltonian dynamics to enable a unified approach for stabilization and trajectory tracking with various robot platforms.


Paper

Thai Duong, Abdullah Altawaitan, Jason Stanley, Nikolay Atanasov

Port-Hamiltonian Neural ODE Networks on Lie Groups For Robot Dynamics Learning and Control

Under Review, 2023.

[pdf]    

Overview and Results



Overview




Given a training dataset from the true dynamics, we want to find an approximated dynamics with parameter theta that minimizes the loss function.



The dynamics of many robots are described in terms of their robot states on Lie groups, and satisfy conservation of energy principles, e.g. via Hamiltonian formulation.



For example, the states of ground, aerial, and underwater vehicles are described by their SE(3) pose and generalized velocity, which evolves on the SE(3) manifold,



To enforce these constraints by construction, we embed these constraints in the architecture of the parametric function approximated dynamics



We place the approximated dynamics function in a neural ODE framework (Chen et. al., NeurIPS'18) which predicts the state at a future time using an ODE solver and back-propagates the loss gradients efficiently using adjoint method.


Experiments




For quadrotors, we use our customized PX4 quadrotor and collect training data from 9 flights between waypoints.



After learning the dynamics from data, we design an energy-based controller for trajectory tracking. We verify our controller design with circle, lemniscate and piecewise-linear trajectories using the learned Halmiltonian-based dynamics.



If the dynamics change, e.g. by adding a coffee can to the quadrotor, we re-collect training data again and re-train the model for only 100 steps, starting from the previously-trained model.



Our controller performs better now with the updated model, tracking circle, lemniscate and piecewise-linear trajectories.

Code


 [github]


Citation


If you find our papers/code useful for your research, please cite our work as follows.

1. T. Duong, A. Altawaitan, J. Stanley, N. Atanasov. Port-Hamiltonian Neural ODE Networks on Lie Groups For Robot Dynamics Learning and Control. under review, 2023.

@article{duong23porthamiltonian,
author = {Thai Duong, Abdullah Altawaitan, Jason Stanley AND Nikolay Atanasov},
title = {Port-{H}amiltonian Neural {ODE} Networks on Lie Groups For Robot Dynamics Learning and Control},
journal = {arXiv preprint arXiv:2401.09520},
year = {2023},
}



1. T. Duong, N. Atanasov. Hamiltonian-based Neural ODE Networks on the SE(3) Manifold For Dynamics Learning and Control. Robotics: Science and Systems (RSS), 2021.

@inproceedings{duong21hamiltonian,
author = {Thai Duong AND Nikolay Atanasov},
title = {{Hamiltonian-based Neural ODE Networks on the SE(3) Manifold For Dynamics Learning and Control}},
booktitle = {Proceedings of Robotics: Science and Systems},
year = {2021},
address = {Virtual},
month = {July},
DOI = {10.15607/RSS.2021.XVII.086}
}




Acknowledgements

We gratefully acknowledge support from NSF CCF-2112665 (TILOS).
This webpage template was borrowed from https://akanazawa.github.io/cmr/.