## 2 Materials and Methods
### Design of ADRC and ST-SMC Hybrid Control
#### 2.3.3 ADRC and ST-SMC Hybrid Control  
This control algorithm effectively combines ADRC and the ST-SMC algorithm to achieve complementary performance. Under conditions of random airflow disturbances, the hybrid algorithm design allows for the dynamic compensation characteristics of ADRC to stabilize external disturbances, while the robustness of ST-SMC suppresses the effects of system nonlinearities and uncertainties on control accuracy. This method significantly enhances the UAV's attitude stability and self-balancing performance in complex environments, ensuring excellent dynamic and static control under random disturbances while maintaining high real-time performance and control efficiency. The following Figure 4 shows the system block diagram of the algorithm implementation. * ADRC Design The core of ADRC is based on ESO for disturbance compensation and control law design. 1. Extended State Observer (ESO) By introducing the control input \(\mathrm{u}\) and disturbance \(d(t)\) into the model, the dynamics can be rewritten as:  
Figure 3: The phase trajectory of the super-twisting algorithm. \[\dot{x}=f(x)+g(x)u+d(t) \tag{23}\]  
The ESO is utilized to estimate both the disturbance \(d(t)\) and the system states:  
\[ \begin{split}\dot{z}_{1}&=z_{2}-\beta_{1}(z_{1}-y),\\ \dot{z}_{2}&=z_{3}-\beta_{2}(z_{1}-y)+g\cdot u,\\ \dot{z}_{3}&=-\beta_{3}(z_{1}-y)\end{split}  \tag{24}\]  
where \(z_{1},z_{2},\) and \(z_{3}\) correspond to the observed variable's value, its first derivative, and its second derivative, respectively. \(y\) is the measured system output, and \(\beta_{1},\)\(\beta_{2},\) and \(\beta_{3}\) are the gain coefficients of the ESO. To ensure the convergence and stability of the ESO, the gain coefficients \(\beta_{1},\)\(\beta_{2},\) and \(\beta_{3}\) can be determined using the pole placement method. Assuming the poles of the ESO are located at \(-\omega_{1},\) the gain coefficients are designed as:  
\[\beta_{1}=3\omega_{0},\ \beta_{2}=3\omega_{0}^{2},\ \beta_{3}=3\omega_{0}^{3} \tag{25}\]  
where \(\omega_{0}\) is the bandwidth parameter of the ESO, which determines the convergence speed of the ESO. (2) Control Law Design  
The ADRC control law is based on the output of the ESO:  
\[u=-\frac{1}{g}\Big{(}\hat{f}(x)+\hat{d}(t)+k_{s}e\Big{)} \tag{26}\]  
where \(\hat{f}(x)\) is the estimated system dynamics, \(\hat{d}(t)\) is the estimated disturbance, and \(k_{s}\) is the error feedback gain. To compensate for the unknown part of the system, \(f(x)+d(t),\) the control input \(u_{\text{ADRC}}\) is defined as:  
\[u_{\text{ADRC}}=\frac{\hat{f}(x)+\hat{d}(t)}{g(x)} \tag{27}\]  
where \(\hat{f}(x)\) and \(\hat{d}(t)\) are the estimates of \(f(x)\) and \(d(t)\) by the ESO, \(g(x)\) is used to normalize the control input \(u,\) ensuring that the control law can accurately compensate for the nonlinear dynamics of the system. Substituting these values eliminates most of the unknown dynamics, and the remaining terms are the estimation errors \(\overset{\sim}{f}=f-\hat{f}\) and \(\overset{\sim}{d}=d-\hat{d}.\)  
Figure 4: Block diagram of the algorithm implementation system. (3) Error Feedback Gain Design  
The error feedback gain can be designed using Equation (28):  
\[k_{\rm e} =2\zeta\omega_{n} \tag{28}\]  
where \(\zeta\) is the damping ratio, and \(\omega_{n}\) is the natural frequency. By adjusting \(\zeta\) and \(\omega_{n}\), the dynamic response characteristics of the system can be controlled. * ST-SMC Design  
Although sliding mode control, as a new nonlinear control method proposed by modern control theory, not only possesses strong robustness but also features high dynamic performance, its design approach involves creating a sliding surface to drive the system states toward the designed surface, thereby achieving high-precision dynamic tracking of complex nonlinear systems. However, in practical applications, traditional sliding mode control exhibits high-frequency chattering during the switching between sliding surfaces, which limits the controller's effectiveness.