## 4 Detection and Removal of Counterfeit Signals  
Since a wide correlator with 0.5 chips spacing between early and prompt correlators (or the spacing between prompt and late correlators) of the code loop is vulnerable to multipath effects or similar spoofing, the spacing \(d\) is typically set to 0.5 chips to validate the effectiveness of the proposed anti-spoofing method. It is assumed that the target receiver has locked authentic signals before spoofing is applied. It is well-known that the carrier frequency difference between the counterfeit signal and its corresponding authentic signal makes spoofing very easy to be detected. Since the repeater and the target receiver are usually very close, the repeater obtains the carrier frequency of the authentic signal before delaying and amplifying the authentic signal. As a result, the carrier frequency of the counterfeit signal rebroadcasted by the repeater is close to that of the authentic signal received by the target receiver. Hence, the carrier frequencies of the counterfeit signal and its corresponding authentic signal are set to be the same [19]. The counterfeit signal is effectively overlapped with the authentic signal only when the distance between the correlation peaks of the two signals is less than 1.5 chips. If the distance between the correlation peaks of the counterfeit signal and the authentic signal is greater than 1.5 chips, then the counterfeit signal is considered to have a long delay. This kind of counterfeit signal cannot directly affect the result of the code phase discriminator, but the partial energy of its correlation peak may stimulate a number of correlators with long time delays in the multi-correlator structure. Accordingly, this will adversely affect the estimation of signal parameters and lead to erroneous restoring of the authentic signal. Therefore, the multi-correlator structure should have self-checking capabilities, i.e., it should be able to detect whether the counterfeit signal has a long delay to help the receiver to take reasonable countermeasures in the face of spoofing at different stages (see Figure 2). For these reasons, we let \(N=8\) and note that \(\beta_{0},\beta_{1},\beta_{2},\cdots,\beta_{M}\) are equal to \(\tau_{0},\tau_{1},\tau_{2},\cdots,\tau_{N}\), respectively. \(\beta_{n}\) are set to \(0.2n\) chips, respectively, where \(n=0,1,2,\cdots,N\). The time delays of the counterfeit signals for spoofing are usually not equal to those of the deployed multi-correlator. Detection and removal of counterfeit signals should be carried out according to the following steps. Step 1: Determine whether the signal amplitude of the \(n\)-th correlator is valid. According to Equations (20) and (21), the estimated \(x_{n}\) and \(y_{n}\) are obtained as \(\hat{x}_{n}\) and \(\hat{y}_{n}\) and \(\hat{A}_{n}=\sqrt{\hat{x}_{n}^{2}+\hat{y}_{n}^{2}}\) denotes the estimate of \(A_{n}=a_{n}A_{0}\). In order to facilitate the discussion, \(\hat{A}_{n}\) is termed as the signal amplitude of the \(n\)-th correlator. We choose the value of threshold \(A\) based on the carrier-to-noise ratio \(C/N_{0}\) of the authentic signal. That is, the value of \(A\) is set according to \(A_{0}\), which can be obtained from the stimulation of the authentic signal to the first correlator based on the assumption that the target receiver locks authentic signals in advance. If \(\hat{A}_{n}>A\), \(\hat{A}_{n}\) is valid. Otherwise, \(\hat{A}_{n}\) is invalid. Step 2: Determine whether the counterfeit signal has a long delay. If the counterfeit signal has a long delay, the correlation peak of the counterfeit signal is closest to that of the correlator with a time delay of 1.6 chips. The stimulating effect on this correlator is also the most significant. Hence, if \(\hat{A}_{8}>\hat{A}_{7}+A\), the counterfeit signal is considered to have a long delay and not to be overlapped effectively with the authentic signal. Then go to Step 6. Otherwise, continue to Step 3.