# Spoofing Detection Algorithm Based on Pseudorange Differences
## 3 Simulation Tests
### The Texas Spoofing Test Battery  
Finally, we adopt the only public spoofing test datasets, the Texas spoofing test battery (TEXBAT), to verify the detection performance of the algorithm. This involves eight separate spoofing scenarios and two clean scenarios. In this paper, we mainly focus on the positioning terminal. Therefore, for the spoofing experiments, we adopt the static position spoofing scenario and the dynamic position spoofing scenario. As a reference, we also adopt the two clean scenarios, which are the clean static scenario and the clean dynamic scenario. The remaining five datasets are the static or dynamic time spoofing scenarios and the signal switch scenario. Time spoofing scenarios focus mainly on the timing terminal.  
In the clean static scenario, the receiver is placed on the roof of the Aerospace Engineering Building at the University of Texas to receive and record the real signal. In the clean dynamic scenario, the receiver platform is dynamic rather than static. The clean dynamic dataset was originally recorded by an antenna on a traveling vehicle. The static position spoofing scenario is based on the clean static scenario. The static signal is real in the first segment (around 170 s). Then, the receiver captures the spoofing signal with the power advantage of 0.4 dB higher than the real one. The spoofing signal slowly drives the receiver off the real position, and the ultimate bias is an offset of 600 m in the Z direction. In the dynamic position spoofing scenario, which is based on the clean dynamic scenario, the receiver is in a dynamic state. The signal is real at first. The spoofing signal slowly drives the receiver off the real position with a 0.8-dB power advantage in about 100 s. The ultimate bias is also an offset of 600 m in the Z direction.  
Figure 5: Three-dimensional results of the two algorithms (Experiment No. 2).  
Figure 6: Position deviations of the two algorithms (Experiment No. 2).  
For the TEXBAT datasets, we replay them with National Instruments (NI) equipment (NI equipment model numbers: NI PXIe-5450: 400 MS/s In-phase/Quadrature (I/Q) Signal Generator, NI PXIe-5611: I/Q Vector Modulator, NI PXI-5652: Radio Frequency (RF) Signal Generator) at Shanghai Advanced Research Institute, Chinese Academy of Sciences. The traditional least squares method and the spoofing detection algorithm proposed in this paper are used in the experiments.  
Figures 7-10 show the position deviations of the two algorithms in the clean static scenario, the clean dynamic scenario, the static position spoofing scenario and the dynamic position spoofing scenario, respectively.  
As can be seen from Figure 7, the real signal is received in the clean static scenario, and the position deviations are always small. The false alarm rate when the signal is real is 1.12%. The false alarms mainly occur at the beginning, due to the code smoothing process embedded in the receiver. In Figure 8, the real signal is received in the clean dynamic scenario. Though the position deviations in Figure 8 are larger than those in Figure 7, no big jump occurs in the whole duration. The false alarm rate when the signal is real is 0%. In Figures 9 and 10, we can also observe that there exist obvious jumps in the position deviations of the two algorithms when the signal is switched from real to spoofing and that these jumps remain in the following duration. In the static position spoofing scenario, the false alarm rate when the signal is real is 0%, and the missed detection rate when the signal is spoofing is 1.55%. In the dynamic position spoofing scenario, the false alarm rate when the signal is real is 8%, and the missed detection rate when the signal is spoofing is 2.57%.