This is the Python CasADi implementation code for the article titled "Optimal planetary landing with pointing and glide-slope constraints".
This repository contains the numerical implementation and theoretical analysis of a vertical powered descent problem for planetary landing. The project models the optimal trajectory of a lander while strictly adhering to glide-slope (state) constraints and thrust pointing (input) constraints.
The continuous optimal control problem is discretized and solved using Python and CasADi/IPOPT. The implementation numerically verifies the theoretical derivations from the source paper, successfully reproducing the "Max-Min-Max" (Bang-Bang) optimal control structure.
This project is based on the theoretical framework and proofs established in the following research paper:
Title: [Optimal planetary landing with pointing and glide-slope constraints]
Authors: [Clara Leparoux, Bruno Hérissé, Frédéric Jean]
Link: Read the full article here
The vehicle's motion is modeled using point-mass dynamics in a two-dimensional inertial frame.The state vector includes position
-
Kinematics:
$\dot{r} = v$ -
Kinetics:
$\dot{v} = \frac{T}{m}u - g$ (where (T) is maximum thrust, (u) is the normalized thrust vector, and (g) is gravity) -
Mass Depletion:
$\dot{m} = -q ||u||$ (where $q$ is the maximum mass flow rate)
The numerical optimization confirms the mathematical proofs. The solver successfully finds a trajectory that strictly respects the physical boundaries (the
-
Initial Position:
$(x_0, z_0) = (2000 \text{ m}, 1500 \text{ m})$ -
Initial Velocity:
$(v_{x0}, v_{z0}) = (100 \text{ m/s}, -75 \text{ m/s})$ -
Initial Mass (
$m_0$ ):$1905 \text{ kg}$ -
Maximum Thrust (
$T$ ):$16573 \text{ N}$ -
Thrust Bounds:
$0.3 \le ||u|| \le 0.8$ -
Gravity (
$g_0$ ):$3.71 \text{ m/s}^2$ (Mars) -
Mass Flow Rate (
$q$ ):$0 \text{ kg/s}$
Figure: The simulated optimal trajectory (x vs. z), the bang-bang control norm profile (Max-Min-Max), and the saturated thrust pointing direction.
- CasADi (Nonlinear Optimization Framework)
- IPOPT (Interior Point Optimizer)
- Matplotlib (Visualization)