# Helicopter Safe Landing Trajectory after Main Rotor Actuator Failures
## 4 Formulation of Optimal Control Problem  
The swashplate actuator failure is assumed to take place when the helicopter is in steady flights, which means the faulted actuator is stuck in the trimmed position of a level flight. We formulate the safe landing problem as an optimal control problem, with state variables \(\mathbf{x}=(x,z,v_{x},v_{z},\theta,q)\) and control inputs \(\mathbf{u}=(\theta_{0},\theta_{1s})\), which are subject to Equations (4)-(9).  
The cost function of the optimal control problem is described as follows:  
\[\psi=W_{x}(v_{x}(t_{f})/v_{x,\max})^{2}+W_{z}(v_{z}(t_{f})/v_{z,\max})^{2} \tag{19}\]  
where \(t_{f}\) denotes the final landing time, \(W_{x},~{}W_{z}\) are the weight factors of landing horizontal speed and vertical speed, respectively.  
The optimal control problem is subject to the following path constraints:  
\[\left\{\begin{array}{l}\mathbf{x}_{\min}\leq\mathbf{x}(t)\leq\mathbf{x}_{ \max}\\ \mathbf{u}_{\min}\leq\mathbf{u}(t)\leq\mathbf{u}_{\max}\end{array}\right. \tag{20}\]  
where \(\mathbf{x}_{\min},\mathbf{x}_{\max},\mathbf{u}_{\min},\mathbf{u}_{\max}\) are specific path constraints, which are mainly selected to avoid fierce maneuvers or a large descent rate during flight.  
The terminal constraints are formulated as:  
\[\left\{\begin{array}{l}\mathbf{x}_{\text{tf,min}}\leq\mathbf{x}(t_{f})\leq \mathbf{x}_{\text{tf,max}}\\ \mathbf{u}_{\text{tf,min}}\leq\mathbf{u}(t_{f})\leq\mathbf{u}_{\text{tf,max}} \end{array}\right. \tag{21}\]  
where \(\mathbf{x}_{\text{tf,min}},\mathbf{x}_{\text{tf,max}},\mathbf{u}_{\text{tf, min}},\mathbf{u}_{\text{tf,max}}\) are the terminal constraints when touch down, decided by the safe landing requirements.  
For numerical considerations [25], all state variables are normalized as follows:  
\[\left\{\begin{array}{l}\overline{x}=\frac{x}{10R},\,\overline{z}=\frac{z}{10 R}\\ \overline{v}_{x}=\frac{100v_{x}}{\Omega R},\,\,\,\overline{v}_{z}=\frac{100v_{z}}{ \Omega R}\\ \overline{\theta}=10\theta,\,\,\,\overline{q}=\frac{1000q}{\Omega}\\ \overline{\theta}_{0}=10\theta_{0},\,\,\overline{\theta}_{1s}=10\theta_{1s} \end{array}\right. \tag{22}\]We employ the direct method [26; 27] to solve the optimal control problem. The main idea of this approach is to discretize the optimal control problem and convert it into a nonlinear programming problem. A uniform discretization of time is adopted in this study, with a fixed time step of \(\Delta t=(t_{f}-t_{0})/(N-1)\). Therefore, the time of each node is  
\[t_{i+1}=t_{i}+\Delta t,\text{ for }i=0,\ldots,N-1 \tag{23}\]  
With the above discretization of time, the variables to be optimized can be described as  
\[\mathbf{X}=\left[(\mathbf{x}_{1},\mathbf{u}_{1}),(\mathbf{x}_{2},\mathbf{u}_{ 2}),\ldots,(\mathbf{x}_{N},\mathbf{u}_{N}),t_{f}\right] \tag{244}\]  
The state equations are discretized using the Hermite-Simpson method. Therefore, for \(i=0,\ldots,N-1\), each pair of \((\mathbf{x}_{i},\mathbf{u}_{i}),\ \ (\mathbf{x}_{i+1},\mathbf{u}_{i+1})\) satisfies the dynamic constraints described in Equation (10).  
Finally, the formulated nonlinear programming problem is solved by the sequential quadratic programming algorithm provided by [28].