## 3 Quadrotor Control Design Aided with Bioinspired Neural Dynamics
### Bioinspired Sliding Attitude Control System  
In this section, we present the development of a robust sliding mode control strategy for a quadcopter drone. The proposed attitude control system combines traditional sliding mode control with the bioinspired neural dynamics model (8) to effectively address the issue of signal chattering commonly encountered in traditional sliding mode controllers. The angle commands \(u_{v1},u_{v2}\) generated by the bioinspired backstepping position control system, along with the desired yaw angle \(\psi_{d}\), are utilized as inputs to the attitude control system. Subsequently, the bioinspired sliding mode controller generates torque control signals \(u_{\Omega}\) to guide the quadcopter drone model towards the desired state. The defined sliding surface is expressed as follows:  
\[S=\dot{e}_{\Omega}+a_{1}e_{\Omega}+a_{2}\int e_{\Omega} \tag{13}\]  
where \(a_{1}\) and \(a_{2}\) are defined as positive constants. Taking the derivative of Equation (13), we have:  
\[\dot{S}=\ddot{e}_{\Omega}+a_{1}\dot{e}_{\Omega}+a_{2}e_{\Omega} \tag{14}\]  
From Equation (14), we can see that when the system operates on the sliding surface \(\dot{S}=0\), we have:  
\[\ddot{e}_{\Omega}+a_{1}\bigg{(}\dot{\Omega}_{d}^{B}-\dot{\Omega}^{B}\bigg{)} +a_{2}e_{\Omega}=0 \tag{15}\]  
By substituting the quadcopter dynamics model (5) into Equation (15), we obtain:  
\[\ddot{e}_{\Omega}+a_{1}\bigg{(}\dot{\Omega}_{d}^{B}-\Big{(}G_{\Omega}u_{ \Omega}+I^{-1}\Big{[}G_{a}-\Omega^{B}\times\Big{(}I\cdot\Omega^{B}\Big{)} \Big{]}+\Delta_{\Omega}\Big{)}\bigg{)}+a_{2}e_{\Omega}=0 \tag{16}\]Therefore, the design of the equivalent control law is given by:  
\[u_{q}=G_{\Omega}^{-1}\bigg{(}\frac{1}{a_{1}}\big{(}\tilde{e}_{\Omega}+a_{2}e_{ \Omega}\big{)}+\hat{\Omega}_{d}^{B}-I^{-1}\Big{[}G_{a}-\Omega^{B}\times\Big{(}I \cdot\Omega^{B}\Big{)}\Big{]}-D_{\Omega}\bigg{)} \tag{17}\]  
where \(D_{\Omega}\) represents the compensation for aerodynamic moments by the sliding mode controller, satisfying:  
\[D_{\Omega}=d_{\Omega 2}-d_{\Omega 1}sgn(S) \tag{18}\]  
\(d_{\Omega 1}=(\delta_{U}+\delta_{L})/2\) and \(d_{\Omega 2}=(\delta_{L}-\delta_{U})/2\), where \(\delta_{U}\) represents the upper bound of the aerodynamic moment and \(\delta_{L}\) represents the lower bound. Due to the computational challenges in calculating \(\tilde{e}_{\Omega}\) is stated in Equation (17), an approximation can be made by defining \(\tilde{e}_{\Omega}=k_{e}\tilde{e}_{\Omega}\), where \(k_{e}\) represents a feedback control gain. The conventional sliding mode control law can be expressed as follows:  
\[u_{\Omega}=u_{q}+k_{s}sgn(S) \tag{19}\]  
Chattering in traditional sliding mode control signals is a result of the sign function \(sgn(\cdot)\). To mitigate this issue, a commonly used approach is to substitute the sign function with a saturation function. Consequently, the sliding mode control law incorporating the saturation function can be expressed as follows:  
\[u_{\Omega}=u_{q}+k_{s}sat(S)\]  
\[sat(S)=\left\{ \begin{array}{ll}B_{S},&k_{s}S>B_{S}\\ k_{s}S,&B_{S}\geq k_{s}S\geq\\ D_{S},&D_{S}>k_{s}S\end{array} \right. \tag{20}\]  
where \(B_{S}\) and \(D_{S}\) denote the upper and lower bounds of the saturation function, respectively. Although the saturation function effectively reduces control signal chattering in the presence of small control signals, it may not be suitable for all applications in complex operating environments where larger control signals are necessary to ensure stable flight. To address this limitation, a combination of biologically inspired neural dynamics (Equation (8)) and sliding mode control is proposed. The resulting biologically inspired sliding mode control commands are defined as follows:  
\[u_{\Omega}=u_{q}+E_{S} \tag{21}\]  
The proposed biologically inspired sliding mode controller in this paper effectively mitigates the problem of control signal chattering that is commonly encountered in traditional sliding mode control methods.