Physics-informed neural networks for spacecraft trajectory optimization with exact boundary conditions
Authors: Samuel Schönherr, Günther Waxenegger-Wilfing, Sascha Ranftl
Organizations: TU Graz, Graz, 8010, Austria Graduate Student Researcher, Institute of Theoretical and Computational Physics, Petersgasse 16/II · Julius Maximilian University Würzburg, Würzburg, 97074, Germany Professor, Institute of Computer Science, Am Hubland. · German Aerospace Center (DLR), Hardthausen am Kocher, 74239, Germany Group Leader, Institute of Space Propulsion, Am Langen Grund. · Brown University, Providence, Rhode Island, 02912 Fellow, Division of Applied Mathematics, 182 George Street. · Purdue University, West Lafayette, Indiana, 47907 Assistant Professor, School of Mechanical Engineering, 585 Purdue Mall.
We use neural networks to optimize trajectories by modeling the position as a function of time and minimizing the thrust with respect to the network parameters. This corresponds to an unsupervised training procedure in which physical laws are incorporated directly into the optimization objective. In standard physics-informed neural networks, initial and terminal states are enforced through additional weighted loss terms, resulting in a multi-objective optimization problem that is highly sensitive to the choice of loss weights and can lead to poor convergence and reduced accuracy. To address this challenge, we construct a simple transformation, exploiting the mathematical structure of trajectory optimization problems, to enforce boundary conditions exactly a-priori. This transformation can be interpreted as a reparameterization of the solution space that embeds the boundary conditions directly into the function. This converts the original constrained optimization problem into an unconstrained one over admissible trajectories. I.e. the transformation eliminates the boundary condition penalty terms and reduces the problem to a single-objective optimization. Crucially, trajectory optimization comes with a low-dimensional boundary, which allows particularly simple and stable constructions of distance functions compared to general domains in partial differential equations. Numerical experiments demonstrate that the proposed approach meaningfully improves convergence behavior and solution accuracy.
Table 1: Positions and gravitational masses GMi of celestial bodies
Figure 1: Swing-by trajectory in 2D. Comparison of the naive PINN, our method (exact BC), and the baseline. All units normalized. Arrows scaled for visualization.
Figure 2: Swing-by trajectory in 3D. Comparison of the naive PINN, our method (exact BC) with and without preconditioning, and the baseline. All units normalized. Arrows scaled for visualization.
Figure 3: Circular orbit transfer with fixed terminal angle. Comparison of our transformed PINN with exact boundary conditions to the OpenGoddard baseline.
Figure 4: Circular orbit transfer with free terminal angle. Comparison of our transformed PINN with exact boundary conditions to the OpenGoddard baseline.
Figure 5: Hold-Point Rendezvous in LEO with initial offset between target and chase.
Figure 6: Box plots for 100 randomly initialized PINNs, comparing naive PINNs with soft BCs to our transformed PINNs with exact BCs, and a pre-conditioned variant of the latter.
Example
Method
mean of ΔV
variance of ΔV
CPU-time / s
Swing-by 2D
OpenGoddard (baseline)
9.76×10−8
-
34.72
(Sec. 5.1 )
PINN with soft BCs ∗
5.84×10−3
8.76×10−6
30.70
PINN with exact BCs
2.06×10−3
5.60×10−7
23.51
Swing-by 3D
OpenGoddard (baseline)
1.07×10−7
-
113.57
Sec. 5.2
PINN with soft BCs
3.43×10−3
1.11×10−6
24.04
PINN with exact BCs
1.35×10−3
1.06×10−7
26.26
Table 2: Summary metrics and comparisons for the five numerical examples Sec. 5.1 to Sec. 5.5 . We used 100 samples each. PINNs with soft BCs did not converge in some examples (denoted as n.c.).
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
Dim.
T
NADAM
max(NLBFGS)
Best λBC
2
Optimizable
2000
100000
0.324
3
Optimizable
2000
100000
0.421
Appendix
Table 3: Optimizer parameters and results of boundary loss-weight ( λBC ) grid search. From left to right: problem dimension, total TOF T set to fixed or optimizable, number of training iterations with ADAM, maximum number of training iterations with LBFGS optimizer, respectively, and the best resulting boundary weight λBC .
Figure 7: Boundary loss weight λBC grid search for the naive PINNs. Best total loss values are marked with crosses.
Figure 8: Influence of TOF: Parameter sweep for fixed TOF values. Left column: T∈[1.0,1.1] in increments of 0.02, resulting in direct trajectories on or close to the (x,y) -plane. Right column: T∈{1.0,1.25,1.5,1.75,2.0,3.0} resulting in detour trajectories leaving the (x,y) -plane. Top row: Resulting trajectories. Middle row: resulting thrust magnitude. Bottom row: Gravitational pull experienced by the spacecraft.
Trajectory optimization computes motion or control sequences that minimize costs while satisfying system dynamics, safety limits, and task constraints.
This paper develops an Optimality-Informed Neural Network (OINN) approach for the energy-optimal, free-final-time powered descent of a lunar lander from any initial position, velocity, and mass within a bounded operating envelope to a fixed landing site with zero terminal velocity. Building on a recent framework that jointly embeds Pontryagin's minimum principle and the Hamilton-Jacobi-Bellman equation for general nonlinear optimal control, the proposed OINN approach specializes that idea to a lunar landing problem with free time of flight and fixed terminal state. Every boundary and transversality condition is hard-encoded into the network architecture by construction, the closed-form Pontryagin-optimal thrust magnitude and direction law is substituted directly rather than learned, and the remaining state, costate, and an auxiliary value-function output are trained against a physics-residual loss formed entirely from the necessary conditions of optimality, with no precomputed optimal trajectories required. A preliminary theoretical analysis is explored, establishing a stochastic-optimization stationarity guarantee for the offline training procedure, an explicit bound translating the achieved training residual into bounds on touchdown position, touchdown velocity, and flight-time error, and a fixed, input-independent onboard computational and memory cost suitable for real-time deployment. Numerical simulations evaluate the trained policy, with no retraining, against an independently solved indirect-method boundary-value problem at six representative initial states spanning the operating envelope and against eighty additional Monte Carlo simulation runs, demonstrating close agreement with the indirect-method solution and consistently small dynamics and transversality residuals throughout the envelope.
Zhenbo Wang
Department of Mechanical and Aerospace Engineering The University of Tennessee 1512 Middle Drive, Knoxville, TN 37996
Efficient and robust optimization is essential for neural networks, enabling scientific machine learning models to converge rapidly to very high accuracy -- faithfully capturing complex physical behavior governed by differential equations. In this work, we present advanced optimization strategies to accelerate the convergence of physics-informed neural networks (PINNs) for challenging partial (PDEs) and ordinary differential equations (ODEs). Specifically, we provide efficient implementations of the Natural Gradient (NG) optimizer, Self-Scaling BFGS and Broyden optimizers, and demonstrate their performance on problems including the Helmholtz equation, Stokes flow, inviscid Burgers equation, Euler equations for high-speed flows, and stiff ODEs arising in pharmacokinetics and pharmacodynamics. Beyond optimizer development, we also propose new PINN-based methods for solving the inviscid Burgers and Euler equations, and compare the resulting solutions against high-order numerical methods to provide a rigorous and fair assessment. Finally, we address the challenge of scaling these quasi-Newton optimizers for batched training, enabling efficient and scalable solutions for large data-driven problems.
Anas Jnini, Elham Kiyani, Khemraj Shukla +5
Department of Information Engineering and Computer Science, University of Trento, Trento, Italy · Division of Applied Mathematics, Brown University, Providence, RI, USA · Departament de Física, Universitat d’Alacant, Spain +3
Physics-informed neural networks (PINNs) have emerged as a promising route to solve partial differential equations, yet they have struggled to reach the precision of classical solvers. The obstacle is increasingly understood to be one of optimisation, owing to the severely ill-conditioned loss landscape. We present DSGNAR: Doubly-Sketched Gauss-Newton with Adaptive Ratio, a scalable second-order optimisation framework that confronts this ill-conditioning and, in doing so, obtains unprecedented accuracy and speed. DSGNAR couples a doubly-sketched Gauss-Newton model with a novel strategy that carefully controls both regularisation and step length. Across a suite of problems spanning nonlinear, chaotic, multi-scale, high-dimensional, and Navier-Stokes, the framework greatly improves on the state of the art: able to attain relative ℓ2 errors as low as 3×10−16 in double precision, improve contemporary results by five orders of magnitude on the canonical Burgers' equation, and as much as eight orders on a high-dimensional Poisson problem, while remaining markedly faster. We further show that, in single precision, solutions at the limit of round-off error can be obtained very quickly: Burgers' equation to ℓ2rel=4.75×10−7 in under ten seconds. The framework is also robust to the choice of architecture, arithmetic precision, and initial hyperparameters. The code is available at https://www.github.com/wephy/physics-informed-neural-networks
Joseph Webb, Sadok Jerad, Coralia Cartis
Mathematical Institute, University of Oxford, Oxford, United Kingdom