# An Anti-Interference Method Based on Energy Residual Searching in GNSS Positioning Applications
## 4 Anti-Interference Method Based on Energy Residual Searching
### Performing Peak Searching on the Energy Residual  
The non-interpolative root mean square method is employed to perform peak searching on the one-dimensional energy residual function. Initially, the step size, error tolerance, and starting point are specified. Subsequently, search sequences are determined, using Equations (10) and (11), and an initial search interval is constructed:  
\[\left\{ \begin{array}{l}u_{0}=a\\ g(u_{0})=-res(u_{0})\end{array} \right. \tag{10}\]  
\[\left\{ \begin{array}{l}u_{i}=F_{i}\cdot T_{0}+a,\\ g(u_{i})=-res(u_{0}),\;\;\;\;g(u_{n-1})<g(u_{0}),g(u_{n})>g(u_{0})\end{array} \right. \tag{11}\]  
where \(F_{n}\) denotes the n-th Fibonacci number; \(u_{i}\) denotes the i-th search variable (with a maximum value not exceeding 2); \(g_{i}\) denotes the i-th search function (obtained by inverting the energy residual function calculated in the previous steps); and n is the number of search points. The initial point \(u_{0}\) of the search interval is set to the starting point \(a_{0}\), and the end point of the search interval is determined as the first search variable where the value of the search function exceeds that of the initial search function. If \(n<2\), the initial step size is reduced to one third of its original value and the above steps are repeated until a reasonable search sequence and search interval are obtained. The root mean square values of the aforementioned points are computed using Equation (12), and these values are inserted into the search sequence in ascending order of the search variables. We let the point that minimizes the energy residual function within the search interval be denoted as \(B\), with its left neighboring point as \(A\) and its right neighboring point as \(C\). A new search sequence and interval are constructed based on these three points, and the root mean square values of these three points are calculated using Equation (13):  
\[u_{rms,k}=\sqrt{\frac{\sum_{i=0}^{n}u_{i}^{2}}{n+1}},k=0 \tag{12}\]  
\[u_{rms,k}=\sqrt{\frac{A^{2}+B^{2}+C^{2}}{3}},k=k+1 \tag{13}\]  
Based on the calculated mean square values, we assume \(\varepsilon\) is the noise tolerance, if the condition \(|u_{rms,k}-u_{rms,k-1}|<\varepsilon|u_{rms,k}|\) is met, the iteration is terminated, and the mean square value point is selected as the peak of the energy residual function. Otherwise, the calculated mean square value point is added to the search sequence, a new search interval is constructed according to Equation (11), and the mean square value is recalculated as per Equation (13). The process then returns to this step. Using the peak points of the energy residual function obtained from the search, we perform the fractional Fourier transform (FRFT) inverse transformation according to the order specified in (3). This process yields the discrete GNSS satellite original signal after the interference has been filtered out. Based on the above analysis, the procedure of the proposed non-interpolative root mean square method is shown in Algorithm 1.The overall algorithm structure is shown in Algorithm 2. The overall computational complexity of our method is as follows: the FrFT has a complexity of \(O(NlogN)\), the optimization process employs a variant of the Fibonacci search with a complexity of \(O(logN)\), and the energy residual calculation has a linear complexity of \(O(N)\). Given these complexity levels, the combined approach can be efficiently executed on platforms with moderate computational capabilities, ensuring feasibility for applications that require real-time or near-real-time processing. ```
1:Notations: \(U=[u_{0},u_{1},\ldots,u_{n}]\) : The search point sequence. \(G=\left[g(u_{0}),g(u_{1}),\ldots,g(u_{n})\right]\) : The objective function sequence. \(u_{\text{rms},k}\) :The root mean square value. \(\varepsilon\) :The error tolerance. \(T_{0}\) :The initial step size \(\varepsilon\) :The error tolerance \(a\) :The starting point \(p\) :Optional fractional order
2:Input: \(T_{0}\), \(\varepsilon\), \(a\). 3:Output: \(p\).