# Detection of Induced GNSS Spoofing Using S-Curve-Bias
## 3 Detection of Induced Spoofing
### The Proposed Method
\begin{cases}0,&0<\Delta_{r}t\leq 0.5\\ \frac{B\left(\Delta_{r}t-0.5\right)}{2A-B-1},&0.5<\Delta_{r}t\leq\frac{A}{2B} \\ \frac{4B\left(2-\Delta_{r}t\right)-3A}{2\left(B-\Delta\right)},&\frac{A}{2B}< \Delta_{r}t\leq 1.5-\frac{A}{4B}\\ \frac{2B\left(2-\Delta_{r}t\right)}{A+B},&1.5-\frac{A}{4B}<\Delta_{r}t\leq 2.5+\frac{A}{4B}\\ \frac{8B\left(2-\Delta_{r}t\right)+3A}{2\left(4B-\Delta\right)},&2.5+\frac{A}{4 B}<\Delta_{r}t\leq 3.5\\ 2-\Delta_{r}t,&\Delta_{r}t>3.5.\end{cases}  \tag{15}\]On the other hand, when there is no induced spoofing, the theoretical formula of SCB can be obtained by solving the following equation:  
\[\left|A\left(1-\left|\varepsilon\left(t\right)-0.5\right|\right)\right|=\left|A \left(1-\left|\varepsilon\left(t\right)+0.5\right|\right)\right|. \tag{16}\]  
Resulting in the SCB being:  
\[\varepsilon\left(t\right)=0. \tag{17}\]  
In order to gain an understanding about the theoretical SCB, Figure 2 shows the theoretical SCB with and without induced spoofing. As Equation (17) stated, SCB is always 0 when there is no spoofing. However, when there is an induced spoofing signal, SCB is changing over time which results in the gradual adjustment process. Specially, in Figure 2, SCB is reduced from 110 s to about 140 s. After that, SCB was increased from about 140 s. More importantly, the slope was almost unchanged from 110 s to about 140 s and from about 140 s to about 200 s. Thus there was slope mutation at about 140 s. Based on the above observation, the first-order derivative or the second-order derivative of SCB could be used to detect induced spoofing. In this paper, a detection metric based on the derivative of SCB is proposed. In GNSS receivers, the first-order derivative of SCB can be computed using the finite differences method as:  
\[\delta_{t}=\frac{\varepsilon\left(t+\Delta t\right)-\varepsilon\left(t\right) }{\Delta t}, \tag{18}\]  
where \(\varepsilon\left(t\right)\) is the SCB value at time \(t\), \(\Delta t\) is the time difference between two adjacent timings. For a given threshold \(\gamma\), if \(\left|\delta_{t}\right|>\gamma\), it means that the first-order derivative exceeds the given threshold. Then the proposed algorithm declared an induced spoofing. Therefore, the proposed algorithm detected induced spoofing by utilizing the dynamic nature of gradual adjustment process. In experiments, SCB was calculated based on the method in reference [37]. In the code tracking loop of the software receiver, we can get the correlation values of the early code and the late code. After that, the S-type correlation curve can be obtained. Then SCB can be calculated based on the definition. More details can be found in the reference [37]. It is well known that there will be changes in the SCB when there is multipath. However, it is very unlikely that the changing process of multipath SCB is generally similar to that of induced spoofing  
Figure 2: Theoretical S-curve-bias (SCB) curve with and without induced spoofing. due to the inherent randomness of multipath [40; 41]. From this point of view, the proposed algorithm is not sensitive to multipath signals.