# Event-Triggered Fault-Tolerant ADRC for Variable-Load Quadrotor with Prescribed Performance
## 2 Modeling of Variable-Load Quadrotor
### Cascade Active Disturbance Rejection Controller Based on Particle Swarm Optimization
The fitness function plays a crucial role in determining optimization results. It must properly evaluate particle quality to effectively guide the particle swarm's search direction. Overly complex function designs may decrease iteration counts. However, the computational time required for these complex operations could lower overall efficiency. Therefore, the design of the fitness function needs to balance guidance and efficiency. With the goal of trajectory tracking, the tracking error of the quadrotor on the target trajectory is crucial for evaluating the control performance. For a quadrotor system operating in three dimensions, the trajectory tracking error is defined as  
\[e_{q}=\sqrt{(x-x_{d})^{2}+(y-y_{d})^{2}+(z-z_{d})^{2}}. \tag{41}\]  
In quadrotor flight control, attitude stability is as important as trajectory tracking accuracy. To quantitatively evaluate the degree of oscillation of the attitude angle, the standard deviation is used as a key indicator. Taking the roll angle \(\phi\) as an example, the standard deviation calculation expression is  
\[s_{\phi}=\sqrt{\frac{1}{n}\sum_{i=1}^{n}(\phi_{i}-\bar{\phi})^{2}}, \tag{42}\]  
where \(n\) is the number of samples and \(\bar{\phi}\) is the sample mean. The designed fitness function is  
\[Y=a\int_{0}^{t}\tau e_{q}(\tau)d\tau+b(s_{\phi}+s_{\theta}+s_{\psi}), \tag{43}\]  
where \(a\) and \(b\) are positive parameters and \(s_{\phi}\), \(s_{\theta}\), and \(s_{\psi}\) are the standard deviation of the roll, pitch, and yaw angles, respectively. In the design of this function, time is considered as the weight of the error. The function treats time as an error weighting variable, where increased duration enhances tracking error influence on fitness function. The fitness function output \(Y\) inversely relates to controller performance. Lower \(Y\) values correspond to better control effectiveness. The algorithm integrating PSO for online parameter adaptation in cascade ADRC is shown in Algorithm 1. To achieve online self-tuning of the PSO in the controller, an event-triggered mechanism is designed as follows:  
\[ \begin{cases}\omega_{(\cdot)}=\omega_{oa},\omega_{ca},\omega_{op},\omega_{cp}\\ \omega_{(\cdot)}(t)=\omega_{(\cdot)}(t_{p}),\quad t\in[t_{p},t_{p+1})\\ t_{p+1}=inf\bigg{\{}t>t_{p}+\big{|}e_{q}(t)>\gamma_{p}\bigg{\}}\end{cases} , \tag{44}\]  
where \(t_{p}\) denotes the trigger instant of parameter adaptation; \(t_{p+1}\) denotes the next trigger instant; \(t\) denotes the minimum trigger interval, equivalent to the cooling time; and \(\gamma_{p}\) is the fixed threshold of the designed event trigger. The presence of a trigger interval avoids the Zeno phenomenon in the event-triggered mechanism. The stable flight control of a quadrotor must meet trajectory tracking accuracy and attitude stability requirements. Simulation results demonstrate that omitting attitude angle constraints enables fast trajectory convergence. However, this approach generates substantial high-frequency attitude oscillations. Such oscillations ultimately impair real flight performance.