(back)

Starship Landing Trajectory Optimization





One of the most enjoyable tools I have learned recently is trajectory optimization. Given the amazing existing optimization libraries (namely CASADI and Ipopt) this has been fairly straightforward to do. I initially experimented with single degree of freedom systems and have slowly moved my way up the non-linearity / underactuated food chain to flying machines (next up is walking robots!). The clip above was made while waiting for starship SN15 to launch, I took some initial condition data from previous flights along with some estimated vehicle parameters and asked my optimization setup to land the rocket. After making a quick animation of the result, to my absolute amazement, it lined up nearly perfectly with a video of the actual landing from a previous flight.

// Behind the Scenes

After posting a clip of this to twitter, I decided to do a quick writeup to explain what was going on and the tools I used to achieve it. This took the form of a medium article. I find it very rewarding to attempt to explain topics in simple language, because it helps demystify what's going on for those not familiar with, and forces me to check if I actually know what is going on myself. Medium Article Link

// Other Trajectory Optimization Tests

Some early tests of my trajectory optimization setup:

an image lol

Inverted Pendulum Swing-up

an image lol

First working implementation of a 2D multirotor flip

an image lol

Revised 2D multirotor flip including extra cost on angular velocity

// Next Steps

While cool animations are great, they are a long way away from being able to command a maneuver like this out of a physical system.

Taking a trajectory and turning it into a set of linear feedback controllers is the next logical step, but requires a bit more framework to be implemented. I haven't yet figured out a nice, "elegant" way to generate and then implement a time varying LQR controller

The other option is to run online optimization, resulting in an MPC controller. This could either be used to stabilize a non-linear system, with or without a pre-planned trajectory. This also requires more work than the pre-planning approach, as online optimization needs refinement and testing to make sure it is safe to run live on a physical system.

I have also been getting very tempted to build myself a thrust vectoring VTOL testbed.

> cd ..