# Semi-Analytical Planetary Landing Guidance with Constraint Equations Using Model Predictive Control
## 2 Problem Description and Decoupled Trajectory Planning
### One-Dimensional Analytical Derivation
To further reduce the complexity caused by the unfixed mass flow, we assume that the adjustments in three directions begin simultaneously at \(t_{1}\) and stop simultaneously at the final time \(t_{\rm f}\). Then, the mass flow rate of the lander after ignition is a constant parameter, and its value is equal to \(-\eta\). Under this control mode, the decoupled dynamic equations after \(t_{1}\) are expressed as:  
\[[\dot{x}(t),\dot{y}(t),\dot{z}(t)]^{T}=[v_{\rm x}(t),v_{\rm y}(t),v_{\rm z}(t)]^ {T} \tag{13}\]  
\[[\dot{v}_{\rm x}(t),\dot{v}_{\rm y}(t),\dot{v}_{\rm z}(t)]^{T}=\left[\frac{\mu _{\rm x}T_{\rm max}}{m(t)}\dot{\alpha}_{\rm x}(t),\frac{\mu_{\rm y}T_{\rm max} }{m(t)}\dot{\alpha}_{\rm y}(t),\frac{\mu_{\rm z}T_{\rm max}}{m(t)}-g\right]^{T} \tag{14}\]  
\[\dot{m}(t)=-\eta \tag{15}\]  
where \(\alpha_{\rm x}(t),\alpha_{\rm y}(t)\in\{-1,1\}\) represent the X- and Y- thrust directions, respectively. Then, we will analyze the form of \(\alpha_{\rm x}(t)\) and \(\alpha_{\rm y}(t)\) through [PERSON]'s maximum principle. The performance index is chosen as  
\[J=\int_{t_{1}}^{t_{\rm f}}\eta\,dt \tag{16}\]  
The Hamiltonian for this optimal control problem is  
\[ \begin{split} H=&\eta-\lambda_{\rm m}\eta+[\lambda_ {\rm x},\lambda_{\rm y},\lambda_{\rm z}]\cdot[v_{\rm x}(t),v_{\rm y}(t),v_{\rm z }(t)]^{T}\\ &+[\lambda_{\rm vx},\lambda_{\rm vy},\lambda_{\rm vz}]\cdot \left[\frac{\mu_{\rm x}T_{\rm max}}{m(t)}\dot{\alpha}_{\rm x}(t),\frac{\mu_{ \rm y}T_{\rm max}}{m(t)}\dot{\alpha}_{\rm y}(t),\frac{\mu_{\rm z}T_{\rm max}}{ m(t)}-g\right]^{T}\end{split}  \tag{17}\]  
where \(\lambda_{\rm m}\), \(\lambda_{\rm r}=[\lambda_{\rm x},\lambda_{\rm y},\lambda_{\rm z}]^{T}\), and \(\lambda_{\rm v}=[\lambda_{\rm vx},\lambda_{\rm vy},\lambda_{\rm vz}]^{T}\) are costate variables, which satisfy the Euler-Lagrange condition:  
\[\dot{\lambda}_{\rm m}=-\frac{\partial H}{\partial m} \tag{18}\]  
\[[\dot{\lambda}_{\rm x},\dot{\lambda}_{\rm y},\dot{\lambda}_{\rm z}]^{T}=\left[ -\frac{\partial H}{\partial x},-\frac{\partial H}{\partial y},-\frac{\partial H }{\partial z}\right]^{T}=[0,0,0]^{T} \tag{19}\]  
\[[\dot{\lambda}_{\rm vx},\dot{\lambda}_{\rm vy},\dot{\lambda}_{\rm vz}]^{T}= \left[-\frac{\partial H}{\partial v_{\rm x}},-\frac{\partial H}{\partial v_{ \rm y}},-\frac{\partial H}{\partial v_{\rm z}}\right]^{T}=[-\lambda_{\rm x},- \lambda_{\rm y},-\lambda_{\rm z}]^{T} \tag{20}\]  
The solutions of Equations (19) and (20) can be expressed as  
\[[\lambda_{\rm x},\lambda_{\rm y},\lambda_{\rm z}]^{T}=[C_{1},C_{2},C_{3}]^{T} \tag{21}\]  
\[[\lambda_{\rm vx},\lambda_{\rm vy},\lambda_{\rm vz}]^{T}=[-C_{1}t+D_{1},-C_{2}t +D_{2},-C_{3}t+D_{3}]^{T} \tag{22}\]  
where \(C_{1\sim 3}\) and \(D_{1\sim 3}\) are constant. According to the [PERSON]'s minimum principle, the optimal \(\alpha_{\rm x}^{*}\) and \(\alpha_{\rm y}^{*}\) are obtained  
\[\alpha_{\rm x(y)}^{*}\left\{ \begin{array}{l}=-1,\,\lambda_{\rm vx(y)}>0\\ =1,\,\lambda_{\rm vx(y)}<0\\ \in\{-1,1\},\,\lambda_{\rm vx(y)}=0\end{array} \right. \tag{23}\]  
where \(\alpha_{\rm x(y)}^{*}\) are singular when \(\lambda_{\rm vx(y)}=0\). According to Equation (22), \(\alpha_{\rm x(y)}^{*}\) hold singular only if \(\{C_{1(2)},D_{1(2)}\}=\{0,0\}\). For these cases, the costate variables \(\lambda_{\rm x}\), \(\lambda_{\rm y}\), \(\lambda_{\rm vx}\), and \(\lambda_{\rm vy}\)equal zero for the whole flight. Neglecting these singular cases, there is at most one isolated singular point. This also means that the thrust direction in the X (or Y) direction switches at most once after \(t_{1}\).