Case 03 / Trajectory optimization
Constrained lunar descent simulation
Optimize a lunar landing trajectory subject to thrust and tilt limits, then inspect altitude, velocity, thrust and estimated propellant use.
3-DOF trajectory optimization · Python / SciPyCan a descent trajectory meet a terminal position and velocity while respecting thrust-direction and acceleration limits?
I formulated a constrained point-mass descent problem under lunar gravity and solved it with SLSQP. The optimized acceleration history meets terminal position and velocity requirements while limiting thrust acceleration and tilt. The replay connects that trajectory with thrust and estimated propellant calculations.
Method and workflow
- 01
State the boundary conditions
Start 150 m above the landing plane with horizontal offset and descent velocity. Require zero terminal position and velocity.
- 02
Constrain the descent
Bound resultant thrust acceleration at 4 m/s² and tilt at 20°. Keep the sampled trajectory above the surface.
- 03
Optimize the controls
Use SLSQP to reduce integrated squared thrust acceleration and control variation across 24 intervals.
- 04
Replay and inspect
Integrate the piecewise acceleration, calculate thrust using changing mass and inspect terminal residuals and constraint feasibility.
Same run. Every view.
Model assumptions and scope
- The model includes three translational degrees of freedom under lunar gravity.
- Attitude follows thrust direction; rotational dynamics, engine lag and surface contact are outside the model.
- The optimization penalizes squared thrust acceleration and control variation. Propellant use is calculated from the resulting trajectory, rather than minimized directly.
Potential extensions
Add rotational and actuator dynamics, then evaluate how a feedback controller tracks the optimized descent under disturbances.
Let’s work through it.
Robotics, simulation and control consultation across Canada, with remote support available internationally. Share your system and the result you need.