# Spoofing Detection Algorithm Based on Pseudorange Differences
## 3 Simulation Tests
### Comparison with Other Methods  
To further evaluate the performance of the algorithm, we select the related methods (range rates jump detection, C/No jump detection, the clock offset and the clock drift jump detection) from [1] in the simulation, and the results are shown in Figures 12-15.  
Figure 11: Position deviations of the two algorithms (dynamic whole-time duration position spoofing scenario).  
Figure 12: Curve of the clock offset in different experimental scenarios.  
As shown on Figure 12a,c, there is a slow convergence at the beginning; this is due to the code smoothing process within the receiver. From the simulation results, we can see that when the spoofing signal appears, the clock offset presents an oscillating state, and the amplitude of the oscillation is related to the motion state. For example, Figure 12a,d shows the cases where the receiver is in a moving state and the clock offset oscillation range is larger than that of Figure 12b,c. In the Beidou Open Laboratory test, the large oscillation only occurs in the process of signal switching. When the signal is locked in the spoofing signal, the clock offset oscillation is not so obvious, and the spoofing signal has completely taken over the receiver at this time. In addition, it can be seen from the four subfigures in Figure 12 that the clock offset is not the same magnitude, which limits the application of the method based on the jump detection of the clock offset, as the detection threshold needs to be set in advance. This method cannot be applied to the scenario in which the signal is spoofing from the beginning. From the simulation results in Figure 13, we can see that the clock drift shows similar characteristics as the clock offset. The range and magnitude of the oscillation will limit the application of this method. Moreover, as can be seen from Figures 12c and 13c, there is no obvious change in the clock offset and the clock drift, which poses a challenge for the signal detection based on the method in [1].  
Figure 14: Curve of the carrier noise power ratio (C/No) in different experimental scenarios.  
Figure 13: Curve of the clock drift in different experimental scenarios.  
From the simulation result in Figure 14a,b, we can see that the C/No has a relatively significant change when the spoofing signal is acquired. At this time, we can use the method of C/No jump detection. For the static and dynamic position spoofing scenario, the spoofing signal is switched by a 0.4-dB and a 0.8-dB power advantage, respectively. Therefore, we cannot observe any obvious changes. The method of C/No jump detection is invalid for these two kinds of spoofing scenarios. From the simulation result in Figure 15, we can see that none of the changes of range rates for these four kinds of spoofing scenarios is obvious. Therefore, the method of range rate jump detection is invalid.  
We summarize the detection ability of different methods in Table 2. From Table 2, we can see that range rates jump detection is invalid for all scenarios in this paper (in fact, it is only effective for the simplest spoofing attacks). The other three methods (C/No jump detection, clock offset jump detection, clock drift jump detection) would be effective at detecting only some of the spoofing attacks. Our algorithm, proposed in this paper, shows effective detection performance for all the above scenarios.