# 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  
In practice, various disturbances impact quadrotor UAVs. These disturbances will have negative impacts on the performance of the control system, for example, by reducing the precision of trajectory tracking, increasing the chattering, and so on. In order to solve these problems, the finite-time ESO was designed to estimate the disturbances. Define the following variables  
\[x_{1}=z,\,x_{2}=\dot{z} \tag{13}\]  
In order to design the observer and controller, one can rewrite the altitude of the position subsystem as [14]  
\[\begin{cases}\dot{x}_{1}=x_{2}\\ \dot{x}_{2}=f_{1}u_{F  
where the gains satisfy \(0<b_{1}<1\), \(r_{i}>0\) and \(L_{i}>0(i=1,2)\). Considering the system in (19) and the ESO in (20), the error system of observer can be written as  
\[ \begin{cases}\dot{\tilde{Z}}_{1}=\tilde{Z}_{2}-r_{1}\text{sig}^{b_{1}}(\tilde{Z} _{1})-L_{1}\tilde{Z}_{1}\\ \dot{\tilde{Z}}_{2}=-r_{2}\text{sign}(\tilde{Z}_{1})-L_{2}\tilde{Z}_{1}-\dot{Z }_{2}\end{cases}  \tag{21}\]  
**Theorem 1**. : _Considering the system in (14) and Assumption 1, the finite-time ESO is proposed as (20). The appropriate parameters \(L_{1}\) and \(L_{2}\) exist, which satisfy_  
\[L_{1}^{2}\geqslant 4L_{2} \tag{22}\]  
_such that observation errors \(\mathbf{\mathcal{Z}}=\left[\tilde{Z}_{1},\tilde{Z}_{2}\right]^{\text{T}}\) can converge into a small residual region in finite time._  
Proof. : Select a Lyapunov function  
\[V_{1}=\frac{1}{2}\mathbf{\mathcal{Z}}^{\text{T}}\mathbf{\mathcal{Z}} \tag{23}\]  
From (21) and (23), \(\dot{V}_{1}\) can be calculated as  
\[ \begin{split}\dot{V}_{1}=&\tilde{Z}_{1}\tilde{Z}_{1 }+\tilde{Z}_{2}\tilde{Z}_{2}\\ =&\tilde{Z}_{1}[\tilde{Z}_{2}-r_{1}\text{sig}^{b_{1}} (\tilde{Z}_{1})-L_{1}\tilde{Z}_{1}]+\tilde{Z}_{2}[-r_{2}\text{sign}(\tilde{Z}_ {1})-\\ & L_{2}\tilde{Z}_{1}-\dot{Z}_{2}]\\ \leqslant&\tilde{Z}_{1}\tilde{Z}_{2}-r_{1}|\tilde{Z}_{1 }|^{b_{1}+1}-L_{1}\tilde{Z}_{1}^{2}+r_{2}|\tilde{Z}_{2}|-L_{2}\tilde{Z}_{1} \tilde{Z}_{2}+\\ &\mu|\tilde{Z}_{2}|\\ \leqslant&-\tilde{\mathbf{Z}}^{\text{T}}\mathbf{Q}\tilde{\mathbf{Z}}+(r_{2}+ \mu)\|\tilde{\mathbf{Z}}\|\end{split}  \tag{24}\]  
with \(\mathbf{Q}= \begin{bmatrix}L_{1}&-1\\ L_{2}&0\end{bmatrix} \). The characteristic equation of \(\mathbf{Q}\) can be written as  
\[ \begin{split} D&=|\lambda\mathbf{I}_{2}-\mathbf{Q}|\\ &=\left|\begin{array}{cc}\lambda-L_{1}&1\\ -L_{2}&\lambda\end{array}\right|\\ &=\lambda^{2}-L_{1}\lambda+L_{2}\end{split}  \tag{25}\]  
where \(\mathbf{I}_{2}\) denotes the two-dimensional identity matrix, and \(\lambda\) represents a Laplace variable. The parameters \(L_{1}\) and \(L_{2}\) satisfy  
\[L_{1}^{2}\geqslant 4L_{2} \tag{26}\]  
such that all eigenvalues of the matrix \(\mathbf{Q}\) are positive constants. By utilizing the basic properties of matrix, the inequality  
\[\lambda_{\text{min}}(\mathbf{Q})\|\tilde{\mathbf{Z}}\|^{2}\leqslant\tilde{\mathbf{Z}}^{ \text{T}}\mathbf{Q}\tilde{\mathbf{Z}}\leqslant\lambda_{\text{max}}(\mathbf{Q})\|\tilde\mathbf{{Z}}\|^{2} \tag{27}\]  
holds, where \(\lambda_{\text{min}}(\mathbf{Q})\) denotes the minimum eigenvalue of \(\mathbf{Q}\), and \(\lambda_{\text{max}}(\mathbf{Q})\) represents the maximum eigenvalue of \(\mathbf{Q}\). Then, substituting (27) into (24) yields  
\[ \begin{split}\dot{V}_{1}&\leqslant-\lambda_{\text{min}}( \mathbf{Q})\|\tilde{\mathbf{Z}}\|^{2}+(r_{2}+\mu)\|\tilde{\mathbf{Z}}\|\\ &=[-\frac{1}{2}((\lambda_{\text{min}}(\mathbf{Q}))|\tilde{\mathbf{Z}}\|-2( r_{2}+\mu))]\|\tilde{\mathbf{Z}}\|-\frac{1}{2}\lambda_{\text{min}}(\mathbf{Q})\|\tilde{\mathbf{Z}}\|^{2} \end{split}  \tag{28}\]If the condition \(\|\tilde{\mathbf{Z}}\|\geq 2(r_{2}+\mu)/\lambda_{\min}(\mathbf{Q})\) is satisfied, one can get \(\dot{V}_{1}\leq 0\).