## 3 Quadrotor Control Design Aided with Bioinspired Neural Dynamics
### Bioinspired Backstepping Position Control System  
Designing a backstepping position controller for a quadcopter using Lyapunov functions is relatively straightforward. However, the drone's state and external disturbances can cause unrealistic velocity changes that are not achievable for a drone with limited inputs. To address this issue, this section proposes a bioinspired backstepping position controller that combines the shunting model (Equation (8)) with the backstepping control strategy. The focus of this article is primarily on controlling the quadcopter drone to track a spiral ascent trajectory in three-dimensional space, as shown in Figure 2. Therefore, the relationship between the desired position state and the desired velocity state for the drone's trajectory tracking is expressed as:  
\[\begin{bmatrix}v_{dx}^{e}\\ v_{dy}^{e}\\ v_{dz}^{e}\end{bmatrix}=\begin{bmatrix}\dot{x}_{d}\\ \dot{y}_{d}\\ \dot{z}_{d}\end{bmatrix} \tag{9}\]  
The objective of the outer-loop position control system is to produce control inputs for the thrust, roll angle, and pitch angle. The position controller in the system generates velocity control inputs to drive the quadcopter to a certain speed, thus minimizing the tracking error towards zero. Figure 2 shows the tracking position error in the X, Y, and \(Z\) axis directions of the inertial coordinate system as \(e_{P}=\begin{bmatrix}e_{x}&e_{y}&e_{z}\end{bmatrix}^{T}\), combined with the velocity error obtained from Equation (9) as \(e_{V}=\begin{bmatrix}e_{yx}&e_{vy}&e_{rz}\end{bmatrix}^{T}\). Consequently, the position control inputs for the quadcopter, based on the backstepping control approach, are as follows:  
\[u_{V}=G_{V}^{-1}\bigg{[}\ddot{P}_{d}^{E}+G+k_{V}e_{V}\bigg{]}\]  
\[\dot{V}^{E}=\ddot{P}_{d}^{E}+k_{V}e_{V}\]\[\dot{P}^{E}=V^{E}=\dot{P}_{d}^{E}+k_{P}e_{P} \tag{10}\]  
\(k_{P}\) and \(k_{V}\) refer to the position control gain and velocity control gain, respectively. These parameters are defined as \(k_{P}=diag(k_{p1},k_{p2},k_{p3})\) and \(k_{V}=diag(k_{v1},k_{v2},k_{v3})\). Equation (10) reveals that in scenarios where the drone is in its initial stage or affected by external disturbances, resulting in significant tracking errors in position and velocity, the terms \(k_{V}e_{V}\) and \(k_{P}e_{P}\) may lead to abrupt changes in velocity during displacement motion. To mitigate this issue, a backstepping control strategy combined with the bioinspired neural dynamics model is proposed. The new virtual control commands are defined as follows:  
\[u_{V}=G_{V}^{-1}\bigg{[}\ddot{P}_{d}^{E}+G+k_{V}E_{V}\bigg{]} \tag{11}\]  
where \(E_{P}\) and \(E_{V}\) represent the outputs of the shunting model for the quadcopter, replacing the position and velocity error inputs, \(e_{P}\) and \(e_{V}\). The error terms in the virtual control commands must satisfy the following inequality:  
\[k_{P}D_{P}<k_{P}E_{P}<k_{P}B_{P}\ \,\ k_{V}D_{V}<k_{V}E_{V}<+k_{V}B_{V} \tag{12}\]  
\(B_{P}\) and \(B_{V}\) represent positive constants, while \(D_{P}=-B_{P}\) and \(D_{V}=-B_{V}\). Consequently, by carefully selecting appropriate desired velocity \(\dot{P}_{d}^{E}\) and desired acceleration \(\ddot{P}_{d}^{E}\), the virtual control command \(u_{V}\) remains within its dynamic constraints and is bounded. Furthermore, thanks to the filtering capability of the bioinspired neural dynamics model, the bioinspired backstepping controller can provide smooth control inputs, even in the presence of noise. The stability of the bioinspired backstepping controller is demonstrated in Section 3.4.