# Fractional-Order Sliding Mode with Active Disturbance Rejection Control for UAVs
## 3 Flight Controller Design
### External Loop Controller (Fractional Order Convergence Law Smooth Mode Controller Design)  
In the outer loop control part, in order to improve the corresponding speed of the controller, an SMC is selected to achieve a fast response, and it is designed for the attitude control system of the UAV. The tracking error of the attitude angle is first defined as follows:  
\[ \begin{pmatrix}e_{\phi}\\ e_{\theta}\\ e_{\psi}\end{pmatrix} = \begin{pmatrix}\phi_{d}-\phi\\ \theta_{d}-\theta\\ \psi_{d}-\psi\end{pmatrix}  \tag{2}\]  
where \(e_{\phi},e_{\theta},e_{\psi}\) are the errors generated by subtracting the desired and actual values of roll angle, pitch angle, and yaw angle, respectively, which are obtained by taking the derivation of both sides of Equation (2) with respect to time t:  
\[ \begin{pmatrix}\dot{e}_{\phi}\\ \dot{e}_{\theta}\\ \dot{e}_{\psi}\end{pmatrix} = \begin{pmatrix}\dot{\phi}_{d}-\dot{\phi}\\ \dot{\theta}_{d}-\dot{\theta}\\ \dot{\psi}_{d}-\dot{\psi}\end{pmatrix}  \tag{3}\]  
For the attitude ring, reference [21] designed a sliding mode surface as follows:  
\[s_{\phi}=c_{\phi}\times(\phi_{d}-\phi)+(\dot{\phi}_{d}-\dot{\phi})=c_{\phi} \times e_{\phi}+\dot{e}_{\phi} \tag{4}\]  
\[s_{\theta}=c_{\theta}\times(\theta_{d}-\theta)+(\dot{\theta}_{d}-\dot{\theta}) =c_{\theta}\times c_{\theta}+\dot{e}_{\theta} \tag{5}\]  
\[s_{\psi}=c_{\psi}\times(\psi_{d}-\psi)+(\dot{\psi}_{d}-\dot{\psi})=c_{\psi} \times e_{\psi}+\dot{e}_{\psi} \tag{6}\]  
where the coefficients \(c_{\phi},c_{\theta},c_{\psi}\) are all positive constants. Both sides of the equation are obtained by derivation with respective to time \(t\):  
\[\dot{s}_{\phi}=c_{\phi}\times\dot{e}_{\phi}+\ddot{e}_{\phi} \tag{7}\]  
\[\dot{s}_{\theta}=c_{\theta}\times\dot{e}_{\theta}+\ddot{e}_{\theta} \tag{8}\]  
\[\dot{s}_{\psi}=c_{\psi}\times\dot{e}_{\psi}+\ddot{e}_{\psi} \tag{9}\]  
Figure 3: The proposed controller framework. Based on Equations (1) and (7)-(9), the quadrotor attitude loop SMC control law can be determined as follows:  
\[u_{2}=I_{x}/l[C_{\phi}(\dot{\phi}_{d}-\dot{\phi}-\dot{s}_{\phi}+\ddot{\phi}_{d})]- \dot{\phi}\dot{\psi}(I_{y}-I_{z})/l-J_{r}\dot{\phi}\Omega_{r}/l+K_{4}\dot{\phi} \tag{10}\]  
\[u_{3}=I_{y}/l[C_{\theta}(\dot{\theta}_{d}-\dot{\theta}-\dot{s}_{\theta}+\ddot{ \theta}_{d})]-\dot{\phi}\dot{\psi}(I_{z}-I_{x})/l+J_{r}\dot{\phi}\Omega_{r}/l+ K_{5}\dot{\theta} \tag{11}\]  
\[u_{4}=I_{z}[C_{\phi}(\dot{\psi}_{d}-\dot{\psi}-\dot{s}_{\psi}+\ddot{\psi}_{d})] -\dot{\phi}\dot{\theta}(I_{x}-I_{y})+K_{6}\dot{\psi} \tag{12}\]  
In terms of design reaching law, we use traditional reaching law, such as exponential reaching laws:  
\[s_{\theta}=c_{\theta}\times(\theta_{d}-\theta)+(\dot{\theta}_{d}-\dot{\theta}) =c_{\theta}\times c_{\theta}+\dot{e}_{\theta} \tag{5}\]0  
where \(\dot{s}=-k\mathrm{s}\) is the exponential reaching term, which is solved by \(s=s(0)\mathrm{e}^{-k\mathrm{f}}\). The rate of reaching depends on k, and the exponential term \(-k\mathrm{s}\) ensures that the system state reaches the sliding state at a large rate when s is large. The exponential reaching alone may not guarantee that the system state reaches the sliding mode surface in a finite time, so it is necessary to add an isovelocity reaching term \(\dot{s}=-\varepsilon sgn(s)\). That is, when the sliding mode variable s is close to 0, the reaching velocity is \(\varepsilon\) instead of 0. In order to better cut down the phenomenon of jitter, it is chosen to replace the sign function on the exponential reaching term with a hyperbolic tangent function and incorporate a fractional-order calculus operator. The fractional-order calculus operator has the memory property, which ensures the influence of historical information on the present and future and helps to improve the quality of control. Compared with the traditional integer-order controller, it can describe the real object more accurately and adequately because of its fractional-order property while providing superior dynamic performance and robustness [22; 23].