SciPy 2023

Controlling Self-Landing Rockets Using CVXPY
07-10, 08:00–12:00 (America/Chicago), Classroom 104

In this tutorial, attendees will learn hands-on how to optimize the trajectory of a self-landing rocket in a real-time simulated setting using CVXPY, a Python-embedded modeling language for convex optimization. We integrate the optimization with the Kerbal Space Program, to showcase a complete landing mission without human intervention, ideally in one piece. CVXPY allows solving complex problems declaratively, letting convex optimization find an optimal way of meeting target conditions with respect to an objective function. After solving the initial problem, attendees will use a selection of advanced CVXPY features while making the example gradually more realistic.


After giving an introduction to CVXPY at SciPy 2022, we want to follow up and provide an in-depth, worked example about one of the most inquired applications of convex optimization: controlling a self-landing rocket. Indeed, this is also one of the most complex problems to solve and practical usefulness has only recently been achieved.
Nevertheless, CVXPY makes it possible to elegantly solve a simplified yet at its core realistic version of the problem. The application serves as a common thread that attendees can work along while being introduced to convex optimization and CVXPY in particular, as well as some of the more advanced features of the library.

The tutorial will start by introducing the problem of controlling a self-landing rocket and why it is important. We will then provide an overview of convex optimization and how it can be used to solve this problem. Next, we will dive into the details of CVXPY, starting from a simple hello-world example and gradually moving towards expressing the full problem. Stating the problem should look familiar to anyone who has worked with NumPy before, and only requires high-school level physics knowledge to understand.

We have integrated our problem with the Kerbal Space Program, which fits the theme of our tutorial nicely. It allows us to make our problem gradually more realistic by incorporating conditions such as drag, fuel usage, and wind. We will run the scripts written by the attendees to see if it manages to land a rocket safely.

As we solve the problem, we will showcase some of the more advanced features of CVXPY, including DPP and CVXPYgen, which can give a significant speedup in practice.

By the end of the tutorial, attendees will have a thorough understanding of how to use CVXPY to solve complex optimization problems, and how to apply it to real-world problems such as controlling a self-landing rocket. No prior knowledge of convex optimization is assumed, making this tutorial accessible to beginners in the field.


Installation Instructions

https://github.com/cvxpy/cvxkerb

Prerequisites
  • High-school level physics
  • No prior knowledge of convex optimization is assumed

Main instructor Philipp Schiele
Philipp Schiele's educational background is in finance and economics and he is currently pursuing a PhD in financial econometrics at the Ludwig Maximilian University of Munich, where he taught various courses in statistics. He is a CVXPY maintainer and has presented a tutorial at SciPy 2022. Generally, he is enthusiastic about finance, optimization, and technology, especially open-source projects.

This speaker also appears in:

Steven Diamond works on large scale battery optimization at Gridmatic. Steven received a PhD in Computer Science from Stanford University, where he studied optimization under Prof. Stephen Boyd. He is the original developer and BDFL of CVXPY.

Eric Luxenberg is a PhD candidate in the Electrical Engineering department at Stanford University, advised by Stephen Boyd. His research interests include robust optimization and mathematical finance. He is a contributor to CVXPY, and has developed an open-source package for saddle optimization called DSP. He has also served as the primary instructor of Stanford’s convex optimization course.

This speaker also appears in: