A Hamiltonian Neural Differential Dynamics Model and Control Framework for Autonomous Obstacle Avoidance in a Quadrotor Subject to Model Uncertainty
Highlights
- A Hamiltonian neural differential model (HDM) is proposed, which formulates quadrotor dynamics on the SE(3) manifold with learnable inertia parameters and a neural network-approximated control input matrix.
- The model is reformulated into a control-affine form, enabling controller synthesis with control Lyapunov functions (CLFs) for stability and exponential control barrier functions (ECBFs) for rigorous safety guarantees.
- The HDM provides a physically interpretable and plausible dynamics representation by incorporating physical priors (e.g., SE(3) constraints, energy conservation), overcoming the limitations of handcrafted and black-box models.
- The integrated safety-critical control framework ensures stable and safe trajectory tracking in obstacle-dense environments, advancing the reliability of autonomous quadrotor operations.
Abstract
1. Introduction
- A novel Hamiltonian neural differential dynamics model (HDM) for quadrotors is proposed, which incorporates physical priors, including manifold constraints and energy conservation, while maintaining a simple and trainable structure. By making inertia parameters explicitly learnable and using a single NN for the control input matrix, the HDM provides a physically interpretable, data-driven representation that is both accurate and easy to train.
- A safety-critical control framework that integrates the learned HDM with a CLF-ECBF-QP controller is proposed. A key step is the reformulation of the HDM into a control-affine form, enabling the direct application of CLFs and ECBFs for stability and safety certification. This integration provides a rigorous and practical solution for safe and stable trajectory tracking in obstacle environments.
- The proposed method is validated through simulations and real-world flight experiments. Results demonstrate that the framework enables a quadrotor to accurately track desired trajectories while actively avoiding multiple obstacles, confirming its effectiveness, generalization capability, and practical viability.
2. Preliminaries
2.1. Control Lyapunov Function (CLF) on SO(3)
2.2. Control Barrier Function (CBF)
2.3. Data-Driven Model Based on Neural ODE Networks
3. Hamiltonian Differential Dynamics Model for Quadrotor
3.1. Kinematics of Quadrotor on SE(3)
3.2. Dynamics of Quadrotor Based on Port-Hamiltonian Formulation
3.3. Data-Driven Hamiltonian Neural Differential Dynamics Model (HDM)
3.4. Data Collection and Training Process
4. Safety-Critical Control Based on Learned HDM
4.1. Rectellipsoidal Safety Barrier Regions
4.2. Safety Control Based on ECBF
4.3. CBF-CLF-QP Control for Tracking Trajectory
5. Simulation Verification
5.1. Simulation Setup and Training Details
- 1) The NODE model [33]. This serves as a standard, non-physics-informed black-box learning baseline. As the standard NODE formulation is designed for autonomous systems, this paper adapts it to a control-affine structure to ensure a fair comparison. Specifically, the dynamics is modeled as , where and are two independent NNs with parameters . This model is trained using the same dataset, loss function, and optimization procedure as the HDM.
- 2) Physics-based Models with Errors: To illustrate the limitations of traditional model-based control under model mismatch, the following two deliberately mis-specified nominal models is compared:
- -
- Nominal I: The nominal dynamics model with error in the inertia parameters.
- -
- Nominal A: The nominal dynamics model with error in the aerodynamic parameters.
5.2. Prediction Result of HDM
5.3. Trajectory Tracking with Multiple Static Obstacles
5.4. Trajectory Tracking with Dynamic Obstacles
6. Experiments
7. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| HDM | Hamiltonian neural differential model |
| CLF | control Lyapunov function |
| ECBF | exponential control barrier function |
| QP | quadratic programming |
References
- Chen, J.Y. Uav-guided navigation for ground robot tele-operation in a military reconnaissance environment. Ergonomics 2010, 53, 940–950. [Google Scholar] [CrossRef] [PubMed]
- Ma, Z.; Wang, Q.; Chen, H. A joint guidance and control framework for autonomous obstacle avoidance in quadrotor formations under model uncertainty. Aerosp. Sci. Technol. 2023, 138, 108335. [Google Scholar] [CrossRef]
- Guo, J.; Qi, J.; Wang, M.; Wu, C.; Ping, Y.; Li, S.; Jin, J. Distributed cooperative obstacle avoidance and formation reconfiguration for multiple quadrotors: Theory and experiment. Aerosp. Sci. Technol. 2023, 136, 108218. [Google Scholar] [CrossRef]
- Gong, W.; Li, B.; Ahn, C.K.; Yang, Y. Prescribed-time extended state observer and prescribed performance control of quadrotor UAVs against actuator faults. Aerosp. Sci. Technol. 2023, 138, 108322. [Google Scholar] [CrossRef]
- Bemporad, A.; Morari, M. Robust model predictive control: A survey. In Robustness in Identification and Control; Springer: London, UK, 1999; pp. 207–226. [Google Scholar]
- Fukushima, H.; Kim, T.-H.; Sugie, T. Adaptive model predictive control for a class of constrained linear systems based on the comparison model. Automatica 2007, 43, 301–308. [Google Scholar] [CrossRef]
- Guo, J.; Qi, J.; Wang, M.; Wu, C.; Ping, Y.; Li, S.; Jin, J. Collision-free formation tracking control for multiple quadrotors under switching directed topologies: Theory and experiment. Aerosp. Sci. Technol. 2022, 131, 108007. [Google Scholar] [CrossRef]
- Wang, X. Research on Trajectory Tracking and Obstacle Avoidance Control of UAV Based on Data-Driven Modeling; Harbin Institute of Technology: Harbin, China, 2022. [Google Scholar]
- Bauersfeld, L.; Kaufmann, E.; Foehn, P.; Sun, S.; Scaramuzza, D. Neurobem: Hybrid aerodynamic quadrotor model. arXiv 2021, arXiv:2106.08015. [Google Scholar] [CrossRef]
- Saviolo, A.; Li, G.; Loianno, G. Physics-inspired temporal learning of quadrotor dynamics for accurate model predictive trajectory tracking. IEEE Robot. Autom. Lett. 2022, 7, 10256–10263. [Google Scholar] [CrossRef]
- Faessler, M.; Franchi, A.; Scaramuzza, D. Differential flatness of quadrotor dynamics subject to rotor drag for accurate tracking of high-speed trajectories. IEEE Robot. Autom. Lett. 2018, 3, 620–626. [Google Scholar] [CrossRef]
- Vinogradska, J.; Bischoff, B.; Nguyen-Tuong, D.; Schmidt, H.; Romer, A.; Peters, J. Stability of controllers for gaussian process forward models. In Proceedings of the 33rd International Conference on Machine Learning, New York, NY, USA, 20–22 June 2016; pp. 545–554. [Google Scholar]
- Lopez-Sanchez, I.; Moyrón, J.; Moreno-Valenzuela, J. Adaptive neural network-based trajectory tracking outer loop control for a quadrotor. Aerosp. Sci. Technol. 2022, 129, 107847. [Google Scholar] [CrossRef]
- Pan, Y.; Theodorou, E. Probabilistic differential dynamic programming. In Proceedings of the 28th International Conference on Neural Information Processing Systems, Montreal, QC, Canada, 8–13 December 2014; Volume 27, pp. 1–9. [Google Scholar]
- Deisenroth, M.P.; Fox, D.; Rasmussen, C.E. Gaussian processes for data-efficient learning in robotics and control. IEEE Trans. Pattern Anal. Mach. Intell. 2015, 37, 408–423. [Google Scholar] [CrossRef]
- Aswani, A.; Gonzalez, H.; Sastry, S.S.; Tomlin, C. Provably safe and robust learning-based model predictive control. Automatica 2013, 49, 1216–1226. [Google Scholar] [CrossRef]
- Khansari-Zadeh, S.M.; Billard, A. Learning control lyapunov function to ensure stability of dynamical system-based robot reaching motions. Robot. Auton. Syst. 2014, 62, 752–765. [Google Scholar] [CrossRef]
- Ravanbakhsh, H.; Sankaranarayanan, S. Learning lyapunov (potential) functions from counter examples and demonstrations. arXiv 2017, arXiv:1705.09619. [Google Scholar]
- Ito, Y.; Fujimoto, K.; Tadokoro, Y. Second-order bounds of gaussian kernel-based functions and its application to nonlinear optimal control with stability. arXiv 2017, arXiv:1707.06240. [Google Scholar]
- Akametalu, A.K.; Fisac, J.F.; Gillula, J.H.; Kaynama, S.; Zeilinger, M.N.; Tomlin, C.J. Reachability-based safe learning with gaussian processes. In Proceedings of the 2014 IEEE 53rd Annual Conference on Decision and Control, Los Angeles, CA, USA, 15–17 December 2014; pp. 1424–1431. [Google Scholar]
- Ames, A.D.; Xu, X.; Grizzle, J.W.; Tabuada, P. Control barrier function based quadratic programs for safety critical systems. IEEE Trans. Autom. Control 2017, 62, 3861–3876. [Google Scholar] [CrossRef]
- Nguyen, Q.; Sreenath, K. Exponential control barrier functions for enforcing high relative-degree safety-critical constraints. In Proceedings of the 2016 American Control Conference, Boston, MA, USA, 6–8 July 2016; pp. 322–328. [Google Scholar]
- Xiao, W.; Belta, C. Control barrier functions for systems with high relative degree. In Proceedings of the 2019 IEEE 58th Conference on Decision and Control, Nice, France, 11–13 December 2019; pp. 474–479. [Google Scholar]
- Zheng, L.; Yang, R.; Wu, Z.; Pan, J.; Cheng, H. Safe learning-based gradient-free model predictive control based on cross-entropy method. Eng. Appl. Artif. Intell. 2022, 110, 104731. [Google Scholar] [CrossRef]
- Wang, L.; Theodorou, E.A.; Egerstedt, M. Safe learning of quadrotor dynamics using barrier certificates. In Proceedings of the 2018 IEEE International Conference on Robotics and Automation, Brisbane, Australia, 21–25 May 2018; pp. 2460–2465. [Google Scholar]
- Lurie, A.I. Analytical Mechanics; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2013. [Google Scholar]
- Holm, D.D. Geometric Mechanics; World Scientific Publishing Company: Singapore, 2008. [Google Scholar]
- Shivarama, R.; Fahrenthold, E.P. Hamilton’s equations with euler parameters for rigid body dynamics modeling. J. Dyn. Syst. Meas. Control 2004, 126, 124–130. [Google Scholar] [CrossRef]
- Lee, T.; Leok, M.; McClamroch, N.H. Global Formulations of Lagrangian and Hamiltonian Dynamics on Manifolds; Springer: Berlin/Heidelberg, Germany, 2017. [Google Scholar]
- Finzi, M.; Wang, K.A.; Wilson, A.G. Simplifying hamiltonian and lagrangian neural networks via explicit constraints. Adv. Neural Inf. Process. Syst. 2020, 33, 13880–13889. [Google Scholar]
- Greydanus, S.; Dzamba, M.; Yosinski, J. Hamiltonian neural networks. In Proceedings of the 33th International Conference on Neural Information Processing Systems, Vancouver, BC, Canada, 8–14 December 2019; Volume 32. [Google Scholar]
- Zhong, Y.D.; Dey, B.; Chakraborty, A. Symplectic ode-net: Learning hamiltonian dynamics with control. arXiv 2019, arXiv:1909.12077. [Google Scholar]
- Chen, R.T.; Rubanova, Y.; Bettencourt, J.; Duvenaud, D. Neural ordinary differential equations. In Proceedings of the 32th International Conference on Neural Information Processing Systems, Montreal, QC, Canada, 2–8 December 2018; Volume 31. [Google Scholar]
- Duong, T.; Atanasov, N. Hamiltonian-based neural ode networks on the se(3) manifold for dynamics learning and control. arXiv 2021, arXiv:2106.12782. [Google Scholar] [CrossRef]
- Ames, A.D.; Galloway, K.; Sreenath, K.; Grizzle, J.W. Rapidly exponentially stabilizing control lyapunov functions and hybrid zero dynamics. IEEE Trans. Autom. Control 2014, 59, 876–891. [Google Scholar] [CrossRef]
- Wu, G.; Sreenath, K. Safety-critical and constrained geometric control synthesis using control lyapunov and control barrier functions for systems evolving on manifolds. In American Control Conference; IEEE: Piscataway Township, NJ, USA, 2015; pp. 2038–2044. [Google Scholar]
- Bullo, F. Geometric Control of Mechanical Systems; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2005. [Google Scholar]
- Bangura, M.; Mahony, R.E. Real-time model predictive control for quadrotors. In Proceedings of the 19th IFAC World Congress, Cape Town, South Africa, 24–29 August 2014; Volume 47, pp. 11773–11780. [Google Scholar]
- Giernacki, W.; Skwierczynski, M.; Witwicki, W. Crazyflie 2.0 quadrotor as a platform for research and education in robotics and control engineering. In International Conference on Methods and Models in Automation and Robotics; IEEE: Piscataway Township, NJ, USA, 2017; pp. 37–42. [Google Scholar]








| Truth | Prediction | Scaled | Error | |
|---|---|---|---|---|
| m [kg] | 1 | 1.831 | 1.001 | |
| k | 1 | 1.826 | 0.998 | |
| [] | 7.0 | 14.27 | 7.03 | |
| [] | 7.0 | 14.27 | 7.03 | |
| [] | 13.7 | 28.43 | 14.00 | |
| 0.25 | 0.507 | 0.249 | ||
| b | 0.2 | 0.396 | 0.195 |
| Minimal Distance with Obstacle [m] | Tracking Error [m] | |||
|---|---|---|---|---|
| 1 | 2 | 3 | ||
| HDM | 0.421 | 0.405 | 0.403 | 0.151 |
| Nominal I | 0.401 | 0.223 (×) | 0.415 | 0.203 |
| Nominal A | 0.482 | 0.489 | 0.348 (×) | 0.221 |
| NODE | 0.415 | 0.22 (×) | 0.052 (×) | × |
| Minimal Distance with Obstacle [m] | Tracking Error [m] | |||
|---|---|---|---|---|
| Dynamics 1 | Obstacle | Dynamics 2 | ||
| HDM | 0.409 | 0.402 | 0.413 | 0.45 |
| Nominal I | 0.391 (×) | 0.372 (×) | 0.494 | 0.47 |
| Nominal A | 0.421 | 0.512 | 0.361 (×) | 0.62 |
| NODE | 0.385 (×) | 0.284 (×) | 0.714 | × |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Wang, X.; Liu, Y.; Du, D.; Xu, H.; Qi, N. A Hamiltonian Neural Differential Dynamics Model and Control Framework for Autonomous Obstacle Avoidance in a Quadrotor Subject to Model Uncertainty. Drones 2026, 10, 64. https://doi.org/10.3390/drones10010064
Wang X, Liu Y, Du D, Xu H, Qi N. A Hamiltonian Neural Differential Dynamics Model and Control Framework for Autonomous Obstacle Avoidance in a Quadrotor Subject to Model Uncertainty. Drones. 2026; 10(1):64. https://doi.org/10.3390/drones10010064
Chicago/Turabian StyleWang, Xu, Yanfang Liu, Desong Du, Huarui Xu, and Naiming Qi. 2026. "A Hamiltonian Neural Differential Dynamics Model and Control Framework for Autonomous Obstacle Avoidance in a Quadrotor Subject to Model Uncertainty" Drones 10, no. 1: 64. https://doi.org/10.3390/drones10010064
APA StyleWang, X., Liu, Y., Du, D., Xu, H., & Qi, N. (2026). A Hamiltonian Neural Differential Dynamics Model and Control Framework for Autonomous Obstacle Avoidance in a Quadrotor Subject to Model Uncertainty. Drones, 10(1), 64. https://doi.org/10.3390/drones10010064

