## 4 Stability Analysis
### Sliding Mode Position following Control  
**Theorem 2**.: _Consider the translational dynamic model described in (21) and the control for position following in (32)-(33). The position following error dynamics is then asymptotically stable._  
**Proof.** The translational dynamics is  
\[\ddot{p}=\frac{1}{m}u+\frac{u_{d}}{m} \tag{57}\]  
where  
\[u=\begin{bmatrix}u_{x}\\ u_{y}\\ u_{z}\end{bmatrix}={}^{W}R_{B}f-\begin{bmatrix}0\\ 0\\ mg\end{bmatrix} \tag{58}\]  
The nominal dynamics is  
\[\ddot{p}=\frac{1}{\widehat{m}}u+\frac{\dot{u}_{d}}{\widehat{m}} \tag{59}\]  
where \(\widehat{m}\) is the nominal mass and \(\dot{u}_{d}=0\).  
The sliding surface \(s_{2}\in R^{3}\) is  
\[s_{2}=\dot{p}-\dot{p}_{d}+\Lambda_{2}(p-p_{d}) \tag{60}\]  
Using (57) yields  
\[\dot{s}_{2}=\frac{1}{\widehat{m}}u-\ddot{p}_{d}+\Lambda_{2}\big{(}\dot{p}- \dot{p}_{d}\big{)} \tag{61}\]  
and  
\[\dot{s}_{2}=\frac{1}{\widehat{m}}\dot{u}-\dddot{p}_{d}+\Lambda_{2}\big{(}\dot{ s}_{2}-\Lambda_{2}\big{(}\dot{p}-\dot{p}_{d}\big{)}\ \big{)} \tag{62}\]  
Define the Lyapunov function  
\[V_{2}=\frac{1}{2}s_{2}^{T}\Lambda_{3}s_{2}+\frac{1}{2}\dot{s}_{2}^{T}\dot{s}_ {2}+\gamma ABS(s_{2}) \tag{63}\]  
where  
\[\gamma=[\gamma_{1}\ \gamma_{2}\ \gamma_{3}]\]  
It follows from (63) that  
\[\dot{V}_{2}=\dot{s}_{2}^{T}\big{(}\dot{s}_{2}+\Lambda_{3}s_{2}+\Lambda_{4}\ \mathit{ SGN}(s_{2})\big{)} \tag{64}\]  
where \(\Lambda_{4}\) is a diagonal matrix with diagonal elements \([\gamma_{1}\ \gamma_{2}\ \gamma_{3}]\).  
Then  
\[\ddot{s}_{2}+\Lambda_{3}s_{2}+\Lambda_{4}\ \mathit{SGN}(s_{2})=-K_{2}\dot{s}_{2} \tag{65}\]  
and  
\[\dot{V}_{2}=-K_{2}\dot{s}_{2}^{T}\dot{s}_{2} \tag{66}\]  
Using (62) and (65) yields  
\[\dot{u}=\widehat{m}\big{(}-(K_{2}+\Lambda_{2})\dot{s}_{2}-\Lambda_{3}s_{2}- \Lambda_{4}\ \mathit{SGN}(s_{2})+\dddot{\
u}_{d}+\Lambda_{2}^{2}\big{(}\dot{p}-\dot{p}_{d} \big{)}\big{)} \tag{67}\]Substituting \(\dot{s}_{2}\) from (61) into (64), we have  
\[\dot{u}=-(K_{2}+\Lambda_{2})u+\widehat{m}\big{(}(K_{2}+\Lambda_{2})\ddot{p}_{d}+ \dddot{p}_{d}-K_{2}\Lambda_{2}\big{(}\dot{p}-\dot{p}_{d}\big{)}-\Lambda_{3}s_{2} -\Lambda_{4}\;SGN(s_{2})\big{)} \tag{68}\]  
We can derive from LaSalle-Yoshizawa theorem and (66) that \(\dot{s}_{2}\to 0\). On the basis of (62) and the [PERSON]'s lemma, one can conclude that \(\ddot{s}_{2}\to 0\). Therefore, we have the following from (65)  
\[\Lambda_{3}s_{2}=-\Lambda_{4}\;SGN(s_{2}) \tag{69}\]  
which ensures that  
and the desired positions  
\[\left[x_{d}\Big{(}t_{f}\Big{)}\quad y_{d}\Big{(}t_{f}\Big{)}\quad z_{d}\Big{(}t_{ f}\Big{)}\right]=\left[20\quad 10\quad 5\right]\]  
where \(t_{f}=20\). The desired attitudes are  
\[\phi_{d}=0,\ \theta_{d}=0,\ \psi_{d}=0\]  
The desired path is defined as  
\[x_{d}(t)=2.5\cdot 10^{-2}\ t^{3}-1.875\cdot 10^{-3}\ t^{4}+3.75\cdot 1 0^{-5}\ t^{5}\] \[y_{d}(t)=1.25\cdot 10^{-2}\ t^{3}-9.375\cdot 10^{-4}\ t^{4}+1.875\cdot 1 0^{-5}\ t^{5}\] \[z_{d}(t)=6.25\cdot 10^{-3}\ t^{3}-4.6875\cdot 10^{-4}\ t^{4}+9.375 \cdot 10^{-6}\ t^{5}\]  
Now, we use the following control parameters for simulation:  
\[\Lambda_{1}=10\ I_{2}\,\Lambda_{2}=4I_{3},\ \Lambda_{3}=40\ I_{3},\ \Lambda_{4}=I_{3},K_{1}=I_{3},\]  
\[K_{2}=4I_{3},K_{3}=4I_{3},\ K_{4}=10I_{3},k_{ci}=4I_{3},\ \ k_{mi}=0.1I_{3},\ \ (i=1,2,3).\]