## 3 Phase Sensitive Detection
### Median De-Redundancy Algorithm  
Mathematically, the time points and number of median-crossing marks from Criterion 1 are accurate, but for an actual yaw angle time history, it is necessary to remove the redundancy in the zero-crossing mark set \(T_{0}\). The reason for this operation is that, during an aircraft flight, there are always some deviations in the angle history due to factors such as weather conditions, geographic environment, etc.; however, these small deviations or oscillations near the median cannot denote hovering or S turn maneuvers. A threshold for such minor deviations will be set based on actual flight conditions so as to eliminate redundancy of such time points in \(T_{0}\).  
Let the deviation threshold of yaw angles in a profile be \(c\) and the zero-crossing set of the yaw angle signal \(\Psi^{\prime}\) be as follows:  
\[T_{0}=\{t(1),t(2),\cdots,t(i),\cdots,t(n_{0})\}=\{t_{1},t_{2},\cdots,t_{i}, \cdots,t_{n_{0}}\},\;t_{i}=t(i),\;i=1,2,\cdots,n_{0}. \tag{3}\]  
Then, we developed a de-redundancy algorithm that only retains the zero-crossing marks with a yaw angle variation larger than \(c\) in a small interval.  
As shown in Figure 2, for a segmental sequence \(\{t_{i-1},t_{i},t_{i+1},t_{i+2}\}\in T_{0}(i=2,3,\cdots,\)\(n_{0}-2)\), define a semi-open interval \([t_{i-1},t_{i+2})\subset\mathbf{N}*\) where \(\mathbf{N}*\) is the positive natural number field; then, the elements of the yaw angle within this argument interval partition are as follows:  
\[\Psi_{si}=\big{\{}\psi^{\prime}(t_{i-1}),\psi^{\prime}(t_{i-1}+1),\cdots,\psi ^{\prime}(t_{i+2}-1)\big{\}}. \tag{4}\]  
Let \(A_{si}=\max(\Psi_{si})-\min(\Psi_{si})\) and let the set of redundant zero-crossing points be \(\widetilde{T}_{0}\). The criterion to judge whether zero-crossing points \(t_{i}\) and \(t_{i+1}\) are redundant is as follows: Criterion 2: If \(A_{si}<c\), then \(t_{i}\) and \(t_{i+1}\) are redundant and \(\{t_{i},t_{i+1}\}\subseteq\widetilde{T}_{0}\).  
Similar to obtaining set \(T_{0}\) through Criterion 1, set \(\widetilde{T}_{0}\) can be yielded through Criterion 2. The meaning of Criterion 2 is that, for the zero-crossing points \(t_{i}\) and \(t_{i+1}\), if the maximum fluctuation value of the yaw angles near them is less than the threshold \(c\), it is determined that both of them are caused by small deviations in the yaw angles, but not the zero-crossing points that can represent a hover or S turn.  
Calculate the difference set \(\hat{T}_{0}=T_{0}\backslash\backslash\widetilde{T}_{0}\), where \(T_{0}\) and \(\widetilde{T}_{0}\) are the zero-crossing set and the zero-crossing redundant set, respectively; the symbol \({}^{\alpha}\backslash\backslash^{\alpha}\) denotes the difference operator, that is, removing the elements belonging to \(\widetilde{T}_{0}\) from \(T_{0}\) we can write the following:  
\[\hat{T}_{0}=\{\hat{t}_{1},\hat{t}_{2},\cdots,\hat{t}_{i},\cdots,\hat{t}_{\hat {n}_{0}}\}=\{\hat{t}(1),\hat{t}(2),\cdots,\hat{t}(i),\cdots,\hat{t}(\hat{n}_{0 })\},\;\hat{t}_{i}=\hat{t}(i),\]  
where \(\hat{n}_{0}\) is the length of \(\hat{T}_{0}\). Thus, \(\hat{n}_{0}\) is the number of effective zero-crossing or median-crossing marks in the yaw angle signal \(\Psi^{\prime}\), as shown in Figure 3.  
Figure 2: The interval partition from zero-crossing marks.