# Exploring Multi-Channel GPS Receivers for Detecting Spoofing Attacks on UAVs Using Machine Learning
## 3 Methodology
### Dataset Selection
#### 3.1.3 Attack Simulation  
To advance the procedures of constructing the GPS spoofing dataset, it is crucial to perform real spoofing attacks on the autonomous vehicle. However, conducting such attacks outdoors is illegal and risky. On the other hand, performing indoor attacks may lead to biased results. Therefore, the authors utilized MATLAB to mimic the signature of the previously described spoofing forms on the features of the received GPS signals. The impact of spoofing attacks on signal integrity is described as follows. In simplistic attacks, a spoofer transmits high-power signals, leading to an increased carrier-to-noise ratio (C/N\({}_{0}\)), as well as introducing unmatched Carrier Phase (Carrie_phase_cycles) and Doppler shift (Carrier_Doppler_hz) values. As a result, the pseudorange measurement (Pseudorang_m) deviates significantly from the previous authentic signals since the spoofer disregards the target's motion. In intermediate attacks, the spoofer estimates the target's position and velocity, then transmits spoofed signals with adjusted power levels to make the (C/N\({}_{0}\)) values resemble those of authentic signals. The spoofer also aligns the code phase and Doppler shift values to maintain a pseudorange measurement showing no anomalies. Consequently, traditional detection techniques relying on signal processing become ineffective. In sophisticated attacks, the spoofer broadcasts multiple jamming and spoofing signals from different angles. The authors simulated distortions in the correlation peaks of multiple channels simultaneously, and introduced a quadrature accumulation shift in the correlator (PQP).  
\begin{table}
\begin{tabular}{p{56.9 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline \hline
**Feature Name** & **Signification** & **Correlation Level** & **Description** \\ \hline C/N\({}_{0}\) & Carrier-to-noise ratio & Pre-correlation & Ratio of the signal power to the noise in dB. \\ \hline TCD & Tracking Carrier Doppler & & Doppler shift estimated at the tracking loops in Hz. \\ PQP & Prompt Quadrature & & Quadrature component of the prompt correlator (PC). \\ PIP & Prompt In-Phase Correlator & During correlation & In-phase component of the prompt correlator (PC). \\ PC & Prompt Correlator & & Correlation measurement between the received satellite signal and the replica signal locally generated. \\ EC & Early Correlator & & 1/2 chip spacing before the prompt correlator. \\ LC & Late Correlator & & 1/2 chip spacing after the prompt correlator. \\ \hline Carrier\_phase\_cycles & Carrier Phase Cycles & & Beat frequency difference between the received carrier and the replica signal locally generated. \\ TOW\_at\_current & Time of the Week in seconds & & The number of seconds elapsed given by the satellite atomic clock since the start of each week. \\ RX\_time & Receiver Time & Post-correlation & The receiver time given in seconds. \\ Pseudorange\_m & Pseudorange in meters & & The distance measured between the receiver and the satellite in meters. \\ Carrier\_Doppler\_hz & Carrier Doppler in Hz & & Frequency drift between the sent frequency and received frequency due to Doppler effect. \\ PRN & Pseudorandom Noise & & A unique identifier of each satellite. \\ \hline \hline \end{tabular}
\end{table}
Table 2: Features extracted from each channel of the GPS receiver.