Lossless Convexification for Rocket Landing
Reproduction of “Lossless Convexification of Nonconvex Control Bound and Pointing Constraints of the Soft Landing Optimal Control Problem”
Brief problem formulation
Model
State:
$x(t)= \begin{bmatrix} r(t) \ v(t) \end{bmatrix}\in\mathbb{R}^6,\quad r,v\in\mathbb{R}^3,\qquad m(t)>0.$
Control (thrust):
$T_c(t)\in\mathbb{R}^3.$
Dynamics (as in Eq.~(2) of the paper):
\[\dot x(t) = A x(t) + B\Bigl(g + \frac{T_c(t)}{m(t)}\Bigr),\] \[\dot m(t) = -\alpha \|T_c(t)\|_2.\]Initial/terminal conditions:
$x(0)=x_0,\quad m(0)=m_0,\quad e_1^\top r(t_f)=0,\quad v(t_f)=0,\quad m(t_f)\ge m_0-m_f.$
Path constraints (convex):
\[\|v(t)\|_2 \le V_{\max},\qquad \|E(r(t)-r(t_f))\|_2 \le c^\top\!\bigl(r(t)-r(t_f)\bigr).\]with $E\in\mathbb{R}^{2\times 3}$ selecting horizontal position, $c=e_1/\tan\gamma_{\mathrm{gs}}$.
Control constraints (nonconvex):
$\rho_1 \le |T_c(t)|_2 \le \rho_2,\quad \frac{\hat n^\top T_c(t)}{|T_c(t)|_2} \ge \cos\theta.$
Problem 1 (minimum landing error)
Let $q\in\mathbb{R}^2$ be the desired horizontal touchdown.
\[\begin{aligned} \min_{x(\cdot),\,m(\cdot),\,T_c(\cdot)}\quad & \|E r(t_f)-q\|_2 \\ \text{s.t.}\quad & \dot x = A x + B\bigl(g + T_c/m\bigr), \\ & \dot m = -\alpha\|T_c\|_2, \\ & \text{path constraints},\ \text{control constraints},\ \text{boundary conditions}. \end{aligned}\]Denote the optimal value by
\[d_{P1}^\star := \|E r^\star(t_f)-q\|_2.\]Problem 2 (minimum fuel with P1 landing error)
\[\begin{aligned} \min_{x(\cdot),\,m(\cdot),\,T_c(\cdot)}\quad & \int_0^{t_f} \|T_c(t)\|_2\,dt \\ \text{s.t.}\quad & \dot x = A x + B\bigl(g + T_c/m\bigr), \\ & \dot m = -\alpha\|T_c\|_2, \\ & \text{path constraints},\ \text{control constraints},\ \text{boundary conditions}, \\ & \|E r(t_f)-q\|_2 \le d_{P1}^\star. \end{aligned}\]Convexification and change of variables
Introduce slack $\gamma(t)\ge 0$ and relax $|T_c(t)|_2 \le \gamma(t)$, $\hat n^\top T_c(t) \ge \gamma(t)\cos\theta$, and $\rho_1 \le \gamma(t) \le \rho_2$.
The paper shows this relaxation is lossless.
Define $u(t) = \frac{T_c(t)}{m(t)}$, $z(t) = \ln m(t)$, and $\sigma(t) = \frac{\gamma(t)}{m(t)}$.
Then
\[\dot x(t) = A x(t) + B (g + u(t)),\] \[\dot z(t) = -\alpha\,\sigma(t),\]and $|u(t)|_2 \le \sigma(t)$, $\hat n^\top u(t) \ge \sigma(t)\cos\theta$, $\rho_1 e^{-z(t)} \le \sigma(t) \le \rho_2 e^{-z(t)}$.
The last line is convexified around a nominal $z_0(t)$ with a quadratic lower bound and affine upper bound.
Discretization
Let $t_k = k\,dt$, $k=0,\dots,N-1$. Discrete variables: $x_k\in\mathbb{R}^6$, $u_k\in\mathbb{R}^3$, $z_k\in\mathbb{R}$, $\gamma_k\in\mathbb{R}$.
Discrete dynamics (forward Euler):
\[x_{k+1} = x_k + dt\bigl(Ax_k + B(g+u_k)\bigr),\] \[z_{k+1} = z_k - dt\,\alpha\,\gamma_k, \qquad k=0,\dots,N-2.\]Boundary conditions: $x_0 = x_0^{\text{given}}$, $z_0 = \ln m_0$, and $e_1^\top r_{N-1} = 0$, $v_{N-1}=0$, $z_{N-1} \ge \ln(m_0-m_f)$.
Path constraints (for all $k$):
\[\|v_k\|_2 \le V_{\max},\qquad \|E(r_k - r_{N-1})\|_2 \le c^\top (r_k - r_{N-1}).\]Convexified control constraints (for all $k$): $|u_k|_2 \le \gamma_k$, $\hat n^\top u_k \ge \gamma_k\cos\theta$, and $\gamma_k \ge 0$.
Convex approximation of thrust bounds: let $z_{0,k} = \ln\bigl(m_0 - \alpha\rho_2 t_k\bigr)$ and $\Delta z_k := z_k - z_{0,k}$, then
\[\gamma_k \ge \rho_1 e^{-z_{0,k}} \bigl(1 - \Delta z_k + \tfrac12 (\Delta z_k)^2\bigr),\] \[\gamma_k \le \rho_2 e^{-z_{0,k}}\bigl(1 - \Delta z_k\bigr).\]Problem 3 (discrete convex minimum landing error)
SOCP, variables ${x_k,u_k,z_k,\gamma_k}_{k=0}^{N-1}$:
\[\begin{aligned} \min_{\{x_k,u_k,z_k,\gamma_k\}} \quad & \|E r_{N-1} - q\|_2 \\ \text{s.t.}\quad & x_{k+1} = x_k + dt(Ax_k + B(g+u_k)), \\ & z_{k+1} = z_k - dt\,\alpha\,\gamma_k,\qquad k=0,\dots,N-2, \\ & x_0 = x_0^{\text{given}},\quad z_0 = \ln m_0, \\ & e_1^\top r_{N-1} = 0,\quad v_{N-1} = 0,\quad z_{N-1} \ge \ln(m_0-m_f), \\ & \|v_k\|_2 \le V_{\max},\quad \|E(r_k - r_{N-1})\|_2 \le c^\top(r_k - r_{N-1}), \\ & \|u_k\|_2 \le \gamma_k,\quad \hat n^\top u_k \ge \gamma_k\cos\theta,\quad \gamma_k\ge 0, \\ & \gamma_k \ge \rho_1 e^{-z_{0,k}} \bigl(1 - \Delta z_k + \tfrac12 (\Delta z_k)^2\bigr), \\ & \gamma_k \le \rho_2 e^{-z_{0,k}} \bigl(1 - \Delta z_k\bigr),\qquad k=0,\dots,N-1. \end{aligned}\]Denote the optimal value
\[d_{P3}^\star := \|E r_{N-1}^\star - q\|_2.\]Problem 4 (discrete convex minimum fuel)
Same variables and constraints as (P3), with a different objective and an additional landing-error constraint:
\[\begin{aligned} \min_{\{x_k,u_k,z_k,\gamma_k\}} \quad & \sum_{k=0}^{N-1} \gamma_k\,dt \\ \text{s.t.}\quad & \text{all constraints of (P3)}, \\ & \|E r_{N-1} - q\|_2 \le d_{P3}^\star. \end{aligned}\]Both (P3) and (P4) are second-order cone programs and correspond directly to the CVXPY SCS formulations in the implementation.