## 3 Incremental Nonlinear Dynamic Inversion Control Law Design
### Angular Acceleration Estimation  
In terms of angular rate control, the state derivative \(\dot{\mathbf{x}}_{0}\) serves as an estimate of the angular acceleration, encompassing both the inner nonlinear dynamics and outer disturbances encountered by the aircraft. The accuracy of this estimation is critical for achieving optimal control performance. CF is commonly used in attitude estimation due to its high computational efficiency and simple structure. As depicted in Figure 2, a proportional integral (PI) compensator is used to correct the estimated error, and the state dynamics can be expressed in the Laplace transform domain as follows:  
\[\hat{a}=\bigg{(}x_{s}-\hat{a}\frac{1}{s}\bigg{)}\bigg{(}K_{p}+\frac{K_{I}}{s} \bigg{)}+a_{m} \tag{11}\]  
where \(K_{p}\) and \(K_{I}\) are PI compensator gains; \(x_{s}\) corresponds to gyroscope measurements, while \(a_{m}\) denotes the results obtained from the mathematical model calculations. Specially, \(a_{m}\) is equivalent to \(\dot{x}_{m}\). Additionally, the variable \(\hat{a}\) signifies the estimation result for angular rate, which is equal to \(\hat{x}\). Equation (11) can be rearranged as  
\[\hat{a}=S(s)x_{s}+T(s)a_{m} \tag{12}\]  
where  
\[S(s)=\frac{K_{p}s+K_{I}}{s^{2}+K_{p}s+K_{I}}s;\;T(s)=\frac{s^{2}}{s^{2}+K_{p} s+K_{I}} \tag{13}\]  
Figure 2: Block diagram of complementary filter for acceleration estimations [27]. The PI compensator gains can be chosen as \(K_{I}=\omega_{n}^{2}\) and \(K_{P}=2\zeta\omega_{n}\). The transfer function of \(S(s)/s\) and \(T(s)\) are complementary, and their sum equals 1. Figure 3 presents the Bode plot of the transfer function \(S(s)/s\) and \(T(s)\) with a cut-off frequency of \(\omega_{n}\)= 30 rad/s and the damping coefficient \(\zeta=1\). A higher value of \(\omega_{n}\) introduces more measurement information to estimate the angular acceleration, leading to a better response to external disturbances and model uncertainties and a faster response speed [27]. However, it also amplifies the measurement noise. Moreover, the high-pass filter \(T(s)\) introduces model information to improve the phase margin [28]. The choice of \(\omega_{n}\) is crucial in CF, as it determines the weighting factor for different input signals. The optimal cut-off frequency can be obtained by analyzing the noise properties of the measurements and the estimation error using power spectral density in the frequency domain [29]. Alternatively, least square estimation in the time domain can be used to minimize the estimation error and avoid manual selection of filter parameters [30]. Moreover, the cut-off frequency value can be adjusted on the basis of different flight conditions to achieve better estimation results [31]. To address the issue of measurement noise not being attenuated in the high-frequency region in the transfer function \(S(s)\) given by Equation (13) and the resulting interference of noise with the estimated angular acceleration signal, an extended state observer (ESO) [19] can be used to estimate the angular acceleration. By taking the mathematically calculated information \(\dot{x}_{m}\) as control inputs, the following equation can be obtained as  
\[ \begin{split}\dot{x}=u+f_{m}\\ \dot{f}_{m}=w\end{split}  \tag{14}\]  
where \(u=\dot{x}_{m};f_{m}\) is the angular acceleration residuals outside the model information; and \(w\) is the derivative of \(f_{m}\), which is unknown but bounded. Then, a second-order ESO is designed to estimate the residuals, which can be formulated as  
\[ \begin{split}\dot{z}_{10}=l_{1}(y-z_{10})+u+z_{20}\\ \dot{z}_{20}=l_{2}(y-z_{10})\end{split}  \tag{15}\]  
where \(y\) is the output of the gyroscope and \(y\ =x_{s};z_{10}\) and \(z_{20}\) are the estimation of \(x\) and \(f_{m}\), respectively; \(l_{1}\) and \(l_{2}\) are the observer gains. The error dynamics of the ESO can be calculated as  
\[ \begin{split}\dot{e}_{1}=-l_{1}e_{1}+e_{2}\\ \dot{e}_{2}=-l_{2}e_{1}-w\end{split}  \tag{16}\]  
Figure 3: Bode diagram of the complementary filter transfer functions.