# Nonsingular Terminal Sliding Mode Based Finite-Time Dynamic Surface Control for a Quadrotor UAV
## 3 Finite-Time ESO and DSC-Based Control Algorithm Design
### Finite-Time ESO for External Disturbances and Parameter Uncertainties  
Denote \(\iota=[l_{1},\,l_{2},\,l_{3}]^{\mathrm{T}}=[\phi,\,\theta,\,\psi]^{\mathrm{T}},y_{1i}=i_{i},\,y_{2i}=i_{i}\)\((i=1,\,2,\,3)\). The new variables \(f_{3i}=J_{i}^{-1}\) and \(\bar{d}_{j}=f_{3i}(d_{j}-\Delta)i\dot{y}_{2i})\)\((i=1,\,2,\,3;\,j=4,\,5,\,6)\) are defined. Then, the attitude dynamics in (1) can be rewritten as  
\[\begin{cases}\dot{y}_{1i}=y_{2i}\\ \dot{y}_{2i}=-f_{3i}k_{j}\xi_{1}y_{2i}+f_{3i}\xi_{2}u_{i}+\bar{d}_{j}\end{cases} \tag{50}\]with \(\xi_{1}=\begin{cases}l,\text{ if }i=1,2\\ 1,\text{ if }i=3\end{cases},\xi_{2}=\begin{cases}l,\text{ if }i=1,2\\ c,\text{ if }i=3\end{cases}\).  
Firstly, the nonsingular terminal sliding mode manifold is as follows  
\[s_{yi}=y_{2i}+2\zeta\sqrt{\rho+|\arctan(y_{1i})|}(1+y_{1i}^{2})\text{sign}(y_{ 1i}) \tag{51}\]  
with \(i=1\), \(2\), \(3\). Taking the derivative of \(s_{yi}\), one gets  
\[\dot{s}_{yi} =\dot{y}_{2i}+f_{2i} \tag{52}\] \[=-f_{3i}k_{j}\xi_{1}y_{2i}+f_{3i}\xi_{2}u_{i}+\bar{d}_{j}+f_{2i}\]  
where \(f_{2i}(i=1,2,3)\) is represented as  
\[f_{2i}=\begin{cases}\frac{\zeta y_{2i}(1+4y_{1i}(\arctan(y_{1i})-\rho))}{\sqrt {\rho-\arctan(y_{1i})}},\text{ if }y_{1i}<0\\ 0,\text{ if }y_{1i}=0\\ \frac{\zeta y_{2i}(1+4y_{1i}(\arctan(y_{1i})+\rho))}{\sqrt{\rho+\arctan(y_{ 1i})}},\text{ if }y_{1i}>0\end{cases} \tag{53}\]  
Then, (52) can be rewritten as  
\[\dot{s}_{yi}=A_{1i}+B_{1i}u_{i}+\bar{d}_{j} \tag{54}\]  
with \(A_{1i}=f_{2i}-f_{3i}k_{j}\xi_{1}y_{2i}\), \(B_{1i}=f_{3i}\xi_{2}(i=1,2,3)\).  
By utilizing the ESO technique, one can define two new variables \(Z_{3i}=s_{yi}\) and \(Z_{4i}=\bar{d}_{j}\). According to Assumption 1, one can get \(|\dot{Z}_{4i}|\leqslant\mu\). The system in (54) can be expressed as  
\[\begin{cases}\dot{Z}_{3i}=A_{1i}+B_{1i}u_{i}+Z_{4i}\\ \dot{Z}_{4i}=\bar{d}_{j}\end{cases} \tag{55}\]  
with \(i=1\), \(2\), \(3\). The observations of \(Z_{3i}\) and \(Z_{4i}\) are \(\hat{Z}_{3i}\) and \(\hat{Z}_{4i}\). Then, the observation errors of \(Z_{3i}\) and \(Z_{4i}\) are \(\hat{Z}_{3i}=\hat{Z}_{3i}-Z_{3i}\) and \(\hat{Z}_{4i}=\hat{Z}_{4i}-Z_{4i}\), respectively. A finite-time ESO is designed as  
\[\begin{cases}\dot{Z}_{3i}=\hat{Z}_{4i}-r_{3i}\text{sig}^{b_{3}}(\tilde{Z}_{3i} )-L_{3i}\tilde{Z}_{3i}+A_{1i}+B_{1i}u_{i}\\ \dot{\hat{Z}}_{4i}=-r_{4i}\text{sign}(\tilde{Z}_{3i})-L_{4i}\tilde{Z}_{3i} \end{cases} \tag{56}\]  
with \(0<b_{3}<1\), \(r_{3i}>0\), \(r_{4i}>0\), \(L_{3i}>0\) and \(L_{4i}>0(i=1,2,3)\).  
Considering (55) and (56), the observation error dynamics can be written as  
\[\begin{cases}\dot{Z}_{3i}=\tilde{Z}_{4i}-r_{3i}\text{sig}^{b_{3}}(\tilde{Z}_{ 3i})-L_{3i}(\tilde{Z}_{3i})\\ \dot{\hat{Z}}_{4i}=-r_{4i}\text{sign}(\tilde{Z}_{3i})-L_{4i}(\tilde{Z}_{3i})- \dot{\hat{Z}}_{4i}\end{cases} \tag{57}\]  
**Theorem 3**.: _Considering the attitude subsystem presented in (50) and Assumption 1, the proposed finite-time ESO is (56). The proper parameters \(L_{3i}\) and \(L_{4i}\) are chosen, which satisfy_  
\[L_{3i}^{2}>4L_{4i} \tag{58}\]  
_such that observation errors \(\mathbf{\hat{Z}}_{yi}=\big{[}\tilde{Z}_{3i},\tilde{Z}_{4i}\big{]}^{\text{T}}(i=1,2,3)\) can converge into a small residual region in finite time._  
Proof.: The proof is omitted to save space, as it is similar to Theorem 1. Eventually, the estimation error \(\mathbf{\hat{Z}}_{yi}\) will converge to the neighborhood of the origin after finite time.