# Semi-Analytical Planetary Landing Guidance with Constraint Equations Using Model Predictive Control
## 2 Problem Description and Decoupled Trajectory Planning
### One-Dimensional Analytical Derivation  
Assume that the one-dimension motion of the lander is vertical and subject to the following assumptions [26]: (a) the only forces acting on the lander are gravity and thrust, i.e., aerodynamic effects are ignored, (b) the thrust direction can only be vertical upward, (c) the gravitational acceleration is constant, (d) the propulsion system is capable of mass flow rates between zero and a fixed upper limit, (e) the landing point is set to be the origin, and the vertical upward is positive. Under these assumptions, the dynamic equations are expressed as:  
\[\dot{r}(t)=v(t) \tag{1}\]  
\[\dot{v}(t)=\frac{T_{\max}}{m(t)}u(t)-g \tag{2}\]  
\[\dot{m}(t)=-\frac{T_{\max}}{I_{\rm sp}g_{0}}u(t) \tag{3}\]  
where \(r(t)\), \(v(t)\), and \(m(t)\) are the lander's position, velocity, and mass, respectively; \(T_{\max}\) is the \(\max\) amplitude of thrust; \(g\) is the absolute value of gravity acceleration; \(u(t)(0\leq u(t)\leq 1)\) is the control, \(I_{\rm sp}\) is the specific impulse, and \(g_{0}\) is the standard gravity, equal to 9.807 m/s\({}^{2}\). By eliminating \(u(t)\), we obtain  
\[\dot{v}(t)=-I_{\rm sp}g_{0}\frac{\dot{m}(t)}{m}-g \tag{4}\]  
By denoting the final time as \(t_{\rm f}\), and integrating Equation (4) from 0 to \(t_{\rm f}\), we obtain  
\[m_{\rm f}=m_{0}{\rm exp}\bigg{(}\frac{v_{0}-gt_{\rm f}}{I_{\rm sp}g_{0}}\bigg{)} \tag{5}\]  
where \(m_{0}\), \(v_{0}\), and \(m_{\rm f}\) are the initial mass, initial velocity, and final mass, respectively. It is shown that the final mass is a strictly monotonic decreasing function of the final time \(t_{\rm f}\). Therefore, minimizing the final time \(t_{\rm f}\) is equivalent to minimizing the fuel consumption. The time-minimum problem is now considered. The performance index is chosen as  
\[J=\int_{t_{0}}^{t_{\rm f}}1\,dt \tag{6}\]  
The Hamiltonian for this optimal problem is  
\[H(\mathbf{s},u,\mathbf{\lambda})=1+\lambda_{\rm r}v+\lambda_{\rm v}\bigg{(}\frac{T_{ \max}}{m}u-g\bigg{)}-\lambda_{\rm m}\frac{T_{\max}}{I_{\rm sp}g_{0}}u \tag{7}\]where \(\mathbf{s}=[r,v,m]^{T}\) represents the state variables, and \(\mathbf{\lambda}=[\lambda_{r},\lambda_{v},\lambda_{m}]^{T}\) are costate variables, which satisfy the Euler-Lagrange condition:  
\[\dot{\mathbf{\lambda}}=-\frac{\partial H(\mathbf{s}^{*},u^{*},\mathbf{\lambda})}{\partial \mathbf{s}^{*}} \tag{8}\]  
Therefore,  
\[\dot{\lambda}_{r}=0,\ \dot{\lambda}_{v}=-\lambda_{r},\ \dot{\lambda}_{m}= \lambda_{v}\frac{T_{\max}}{m^{2}}u \tag{9}\]  
According to [PERSON]'s minimum principle, the form of the optimal control \(u^{*}\) is obtained:  
\[u^{*}(t)\left\{ \begin{aligned} &=0,\ \xi>0\\ &=1,\ \xi<0\\ &\in[0,1],\ \xi=0\end{aligned} \right. \tag{10}\]  
where \(\xi=\lambda_{v}T_{\max}/m-\lambda_{m}T_{\max}/l_{\mathrm{sp}}/g_{0}\). According to Equation (10), \(u^{*}\) holds singular only if \(\xi=0\). In Ref. [26], [PERSON] rigorously proved that (1) the singularity condition could not hold on any finite closed interval in \([0,t_{\mathrm{f}}]\) and (2) there was at most one switching in \([0,t_{\mathrm{f}}]\). In other words, the time optimal control of this one-dimension problem has only two modes: \(u(t)=1,t\in[0,t_{\mathrm{f}}]\) or \(u(t)=0,t\in[0,t_{\mathrm{1}}];u  
To allow analytic treatment of a portion of the dynamics, one decoupling assumption is introduced: the lander first experiences a period of unpowered landing with an initial velocity; then, the engines switch on at \(t_{1}\), and the lander lands on the ground at \(t_{\rm f}\). After the ignition time \(t_{1}\), \(\mu_{\rm x}T_{\rm max}\) is used to adjust the position and velocity in the X direction, \(\mu_{\rm y}T_{\rm max}\) is used in the Y direction, and \(\sqrt{1-\mu_{\rm x}^{2}-\mu_{\rm y}^{2}}T_{\rm max}\), denoted as \(\mu_{\rm z}T_{\rm max}\), is used for vertical deceleration (\(0\leq\mu_{\rm x,y,z}\leq 1\)).