Skip to content

St. John's, Newfoundland.

Engineering casebook

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 / SciPy
OptimizationScientific PythonFlight control & GNC
The engineering question

Can 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.

Inside the method

Method and workflow

  1. 01

    State the boundary conditions

    Start 150 m above the landing plane with horizontal offset and descent velocity. Require zero terminal position and velocity.

  2. 02

    Constrain the descent

    Bound resultant thrust acceleration at 4 m/s² and tilt at 20°. Keep the sampled trajectory above the surface.

  3. 03

    Optimize the controls

    Use SLSQP to reduce integrated squared thrust acceleration and control variation across 24 intervals.

  4. 04

    Replay and inspect

    Integrate the piecewise acceleration, calculate thrust using changing mass and inspect terminal residuals and constraint feasibility.

Explore the result

Same run. Every view.

Loading the numerical recording…
Technical notes

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.

Have a related problem?

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.

Request consultation
Next case / Machine learning & inspectionWind-turbine defect detection