# Simulation of a Quadrotor under Linear Active Disturbance Rejection
## 4 System Simulation  
The simulation in this paper is carried out by MATLAB/Simulink. The model parameters, RBF\(-\)ADRC robust controller parameters and classic LADRC parameters are used in the simulation, see Table 2, respectively. The initial position and initial attitude coordinates of the quadrotor are \( \begin{bmatrix}0&0&0\end{bmatrix} \). All examples are compared with the classic ADRC [29]. In this paper, three simulation cases are designed for the tracking and interference immunity of quadrotor UAVs. Simulation case 1 is designed to test the trajectory tracking of the quadrotor UAV under the REF\(-\)ADRC control scheme, simulation case 2 is designed to compare the control effect of AP\(-\)ADRC and classical LADRC and simulation case 3 is designed to test the attitude tracking of the quadrotor UAV under the REF\(-\)ADRC control scheme. The results show that the designed AP\(-\)ADRC can effectively eliminate the parameter deviations caused by external disturbances by adjusting the controller parameters online, and the designed RBF\(-\)ADRC control scheme can effectively seek the optimal attitude of the quadrotor UAV with better anti\(-\)dist \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Parameter** & \(\mathbf{K_{p}}\) & \(\mathbf{K_{d}}\) & \(\mathbf{r}\) & \(\mathbf{h}\) & \(\mathbf{b_{0}}\) & \(\mathbf{\omega_{0}}\) \\ \hline \(x\) & 800 & 7 & 5 & 0.2 & 1 & 50 \\ \(y\) & 730 & 9 & 5 & 0.2 & 1 & 50 \\ \(z\) & 850 & 6 & 5 & 0.2 & 1 & 50 \\ \(\theta\) & 600 & 10 & 5 & 0.2 & 1 & 50 \\ \(\varphi\) & 610 & 19 & 5 & 0.2 & 1 & 50 \\ \(\psi\) & 900 & 36 & 5 & 0.2 & 1 & 50 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Controller parameters. **Example 1**. : _Simulation case 1 is to verify the trajectory tracking performance of the quadrotor under the RBF\(-\)ADRC robust control scheme. The given expected signal is as follows:_  
\[\left\{ \begin{array}{l}x_{d}=\sin(0.3t)\\ y_{d}=\sin(0.2t)\\ z_{d}=0.25t\\ \Psi_{d}=\frac{\pi}{4}\end{array} \right. \tag{36}\]  
Simulation case 1 is designed to test the trajectory tracking of a quadrotor UAV under the proposed REF\(-\)ADRC robust control scheme. The tracking objective function is given by Equation (36) with initial position coordinates and attitude angle initial values, and the trajectory tracking curve is given in Figure 5. The results show that the designed control scheme reaches the reference signal at 0.3 s. The quadrotor UAV system can track the given desired signal quickly and achieves stable tracking after that with a stable positive and negative error of 0.01 and no significant overshoot. It is demonstrated that the proposed REF\(-\)ADRC robust control scheme has a fast response time, reliable performance and good trajectory tracking performance. **Example 2**. : _Simulation case 2 is to test the tracking performance of classical LADRC and AP\(-\)ADRC on the position channel, given the desired signal as follows:_  
\[\left\{ \begin{array}{l}x_{d}=\sin(0.6t)\\ y_{d}=\sin(0.2t)\\ z_{d}=0.1t\\ \Psi_{d}=\frac{\pi}{6}\end{array} \right. \tag{37}\]  
Simulation case 2 is designed to compare the control effectiveness of the proposed AP\(-\)ADRC control scheme with the classical LADRC control scheme. The tracking target function is given by Equation (37) and the initial position coordinates and attitude angle initial values are \( \begin{bmatrix}0&0&0\end{bmatrix} \). The values of \(K_{p}\) and \(K_{d}\) are changed in real time, so the controller parameters can be adjusted in real time by the dynamic characteristics of the quadrotor  
Figure 5: Track trace curve. UAV and external disturbances. The results show that the AP\(-\)ADRC control scheme can accurately track the input reference signal after 0.4 s. Compared with the classical LADRC, its response is faster and the adaptive control adjusts the PD controller parameters online instead of manual parameter adjustment. This proves that our introduction of adaptive control to optimize the parameters of the LADRC are effective and reliable.