# A Method of Detections' Fusion for GNSS Anti-Spoofing
## 3 Performance Evaluation
### Two Detectors
#### 3.1.1 Monitoring of Correlator Outputs  
Monitoring of the received signal power is a usual method of spoofing detection, and it can be implemented in several ways, such as the monitoring of absolute power, \(C/N_{0}\) and the correlator outputs [8]. The anomaly of correlator outputs reflects the abnormal change of the power of received GNSS signals. Some methods have been proposed to monitor the correlator outputs, such as testing the goodness of fit based on the \(\chi^{2}\) distribution [10; 15], Herein, another practical way of correlator output monitoring is proposed.  
In the case of the spoofing attack, it is difficult for the spoofer to calibrate the power of the spoofing signal to maintain a stable level at the target receiver because of the uncertainty of the relative motion between spoofer and receiver. Besides, correlator outputs may be abnormal because the tracking loop is disturbed by spoofing. Monitoring the stationarity of correlation values is a practical way to detect the anomaly of the signal. Denote the correlator outputs in time \(k\) as \(r[k]\). There are jumps in correlator outputs because of the change of navigation data. Denote \(x[k]\) as:  
\[x[k]=D[k]\cdot r[k] \tag{21}\]  
where \(D[k]\) represent the navigation data and its value is one or \(-1\). Then, \(x[k]\) can be approximated as a Gaussian random variable because it is determined by several factors, such as signal power, tracking errors, noise, etc. Assuming that the signal is locked and the parameters of the receiver do not change, the mean value of \(x[k]\) reflects the power of the signal while the variance of \(x[k]\) represents other effects, such as noise and errors. The outputs of the correlator are steady in the case of authentic signals and unsteady in the case of the spoofing attack. Denote two sample sets of correlator outputs in different times as \(X=\{x[1],x[2],\cdots,x[K]\}\) and \(Y=\{y[1],y[2],\cdots,y[K]\}\); they conform to a Gaussian distribution as:  
\[\left\{\begin{array}{rcl}X&\sim&N(\mu_{x},\,\sigma_{x}^{2})\\ \\ Y&\sim&N(\mu_{y},\,\sigma_{y}^{2})\end{array}\right. \tag{22}\]As mentioned previously, the mean value reflects the power of the signal, while the variance represents the effects of random factors. Therefore, the spoofing detection based on the monitoring of correlator outputs can be equivalent to the following hypothesis testing:  
\[\left\{\begin{array}{ll}H_{0}:&\mu_{x}=\mu_{y}\\ \\ H_{1}:&\mu_{x}\
eq\mu_{y}\end{array}\right. \tag{23}\]  
Assuming \(\sigma_{x}^{2}=\sigma_{y}^{2}=\sigma^{2}\) and because \(\sigma^{2}\) is unknown, define the test statistic as follows:  
\[T=\sqrt{K}\cdot\frac{\bar{x}-\bar{y}}{\sqrt{\hat{\sigma}_{x}^{2}+\hat{\sigma}_ {y}^{2}}} \tag{24}\]  
where \(\bar{x}\) and \(\bar{y}\) are the mean value of \(X\) and \(Y\) with a data length of \(K\) and \(\hat{\sigma}_{x}^{2}\) and \(\hat{\sigma}_{y}^{2}\) are estimations of \(X\) and \(Y\), respectively. \((\hat{\sigma}_{x}^{2}+\hat{\sigma}_{y}^{2})/2\) is an unbiased estimation of the variance of sample group \(\{X,Y\}\); \(\bar{x}\) and \(\hat{\sigma}_{x}^{2}\) are given as:  
\[\left\{\begin{array}{ll}\bar{x}=\frac{1}{K}\sum_{k=0}^{K-1}x[k]\\ \\ \hat{\sigma}_{x}^{2}=\frac{1}{K}\sum_{k=0}^{K-1}\left(x[k]-\bar{x}\right)^{2} \end{array}\right. \tag{25}\]  
\(\bar{y}\) and \(\hat{\sigma}_{y}^{2}\) can be obtained in the same way. The test statistic as Equation (24) has been used for GPS interference detection [16]. Under hypothesis \(H_{0}\), the test statistic conforms to Student's \(t\) distribution with \(2K-2\) degrees of freedom [17] as follows:  
\[T\ \sim\ t(2K-2) \tag{26}\]  
Thus, Equation (23) is equivalent to:  
\[\left\{\begin{array}{ll}H_{0}:&\left|T\right|\leq\gamma\\ \\ H_{1}:&\left|T\right|>\gamma\end{array}\right. \tag{27}\]  
where \(\gamma\) is the threshold of detection, and it can be given as follows:  
\[\gamma=Q_{t(2K-2)}^{-1}(1-P_{fa}/2) \tag{28}\]  
where \(Q_{t(2K-2)}^{-1}(\cdot)\) represents the inverse function of the cumulative density function (CDF) of Student's \(t\) distribution.