Research Article
Hamiltonian Neural Network 6-DoF Rigid-Body Dynamic Modeling Based on Energy Variation Estimation
Algorithm 1
VHNN forward inference and training algorithm.
| | Require: | | | Ensure:, , , | | (1) | Initialize , , , . | | (2) | Loop until the loss converges: | | (3) | while loss not converged do | | (4) | , and output and . | | (5) | Input , and output . | | (6) | Input , and output . | | (7) | Calculate the next state of the missile , using formula (12) and (13). | | (8) | Input , and output . | | (9) | Calculate the mechanical energy from . | | (10) | Calculate the loss using (16) and gradient. | | (11) | Update all , , , . | | (12) | end while | | | return, , , |
|