# GNSS Spoofing Detection and Mitigation Based on Maximum Likelihood Estimation
## 4 MLE-Based GNSS Anti-Spoofing Method
### Spoofing Validation and Recovery of Navigation Solution  
It should be noted that when there are severe multipath signals, \(T(\mathbf{y})\) can also exceed the threshold. However, the multipath signals are hardly consistent with each other since they are generated by different reflectors around a receiver. Different from the multipath signals, the spoofing ones may have the collaboration since they are generated sophisticatedly by a spoofer. Based on the difference, the following discrimination method is presented to reduce the false alarms induced by multipath signals and to validate the navigation solution. After evil signals are detected, we calculate the following statistics. \[ \begin{split} T_{1i}(\mathbf{x})&=\frac{2}{K\omega_{0}^ {2}}||\mathbf{g}_{i}(\mathbf{\hat{\rho}}_{1})^{H}\mathbf{x}||^{2}\,,\;i=1,2,\cdots\,,M\\ T_{2i}(\mathbf{y})&=\frac{2}{K\omega_{0}^{2}}||\mathbf{g}_ {i}(\mathbf{\hat{\rho}}_{2})^{H}\mathbf{y}||^{2}\,,\;i=1,2,\cdots\,,M\end{split}  \tag{26}\]  
Then, count the statistics \(T_{1i}(\mathbf{x})\) and \(T_{2i}(\mathbf{y})\) that are over a threshold \(\gamma^{\prime}\), respectively. Since the expressions of \(T_{1i}(\mathbf{x})\) and \(T_{2i}(\mathbf{y})\) are the same as the noncoherent integration result of a single satellite, \(\gamma^{\prime}\) can be given by [26]:  
\[\gamma^{\prime}=-2 ln(P_{f_{a}}) \tag{27}\]  
Denote the numbers of \(T_{1i}(\mathbf{x})\) and \(T_{2i}(\mathbf{y})\) that are over \(\gamma^{\prime}\) as \(r_{1}\) and \(r_{2}\), respectively. If \(r_{1}\) and \(r_{2}\) are larger than four simultaneously, two groups of consistent signals are found in \(\mathbf{x}\), and the detected evil signals can be determined as consistent spoofing signals. The tenet of the method is similar to RAIM, which is based on the self-consistency of pseudorange measurements. In RAIM, the consistency can be determined when more than four measurements are used [26], and in the proposed validation method, signals can be judged as self-consistent only if the peak of the MLE cost function is superimposed by more than four signals. It should be noted that if the multipath signals form consistent measurements, they cannot be distinguished from the spoofing signals. However, in this case, the multipath signals are very similar to the spoofing ones and may mislead the PVT results in the same way as the spoofing ones. Consequently, they can also be categorized as spoofing signals. The spoofing validation probability can be expressed as:  
\[ \begin{split} P_{V}&=P_{V1}\cdot P_{V2}\\ P_{Vk}&=p(\,r_{k}>4\,\,),k=1,2\end{split}  \tag{28}\]where \(p(E)\) denotes the probability of event \(E\). Particularly, when all of the signals' \(C/N_{0}\) are the same, \(P_{Vk}\) has the following simplified form:  
\[P_{Vk}=\sum_{n=5}^{M}{{{M}\choose{n}}P_{dk}^{n}(1-P_{dk})^{M-n}}=1-B(4;M,P_{dk}) \tag{29}\]  
where \(B(k;N,p)\) denotes the cumulative binomial distribution function and \(P_{dk}\) denotes the detection probability of the single signal in the \(k\)-th MLE positioning module, which can be calculated with Equations (22) and (25) by setting \(M\) to one. In order to see when a spoofing detection or a spoofing validation can be performed successfully, we further classify the cases in Figure 2 into nine different scenarios based on the numbers of spoofing and authentic signals in \(x\) and \(y\). Since a peak of the MLE cost function is formed by consistent signals, spoofing signals with inconsistent measurements will not contribute to the peak at \(\rho_{s}\), and their effects will be eliminated by the MLE-based method directly. Therefore, only consistent spoofing signals are considered. The classifications are given in Table 1. **spf** and **auth** denote the numbers of the spoofing and authentic signals, respectively. Case 1 consists of Scenarios 1, 2 and 3. In these scenarios, consistent spoofing signals are more than four, and the total power of them is higher than that of the authentic ones. Therefore, \(\hat{\rho}_{1}\) equals \(\rho_{s}\), and only authentic signals are reserved in \(y\).