# GNSS Spoofing Detection Based on Wavelets and Machine Learning
## 1 Introduction  
Global Navigation Satellite Systems (GNSSs) are commonly used today for positioning, timing, and navigation services. Given their widespread use, these systems are highly susceptible to various threats, with spoofing attacks being the most frequent type. A spoofing attack is based on the transmission of fake signals in order to deceive the receiver and take over its navigation system. Since the power of the received satellite signal is very weak, due to the influence of radio frequency interference, it can lead to the reduced accuracy of positioning and timing or even to a complete lack of a navigation solution. The weak power of the received signal is the reason why the receiver takes the signals with higher power and calculates its position based on them. Such attacks are relatively easy to carry out due to the availability of low-cost equipment. A single software-defined radio (SDR), such as HackRFOne, is sufficient to perform simple spoofing attacks, posing a significant threat. The devices that are most vulnerable to spoofing attacks are smartphones which are mostly used for navigation services nowadays. Increased attention has been paid to these attacks in the open literature since the authors in [1] developed a portable GPS spoofer. Using GNSS receivers that are resistant to spoofing attacks is key to secure positioning, navigation, timing, and synchronization. Therefore, effective spoofing attack detection and signal-type classification become extremely important. Although various detection methods have been proposed, it is still an important topic of research. Some of the methods for detecting these attacks that are still in their infancy in the field of GNSS and have not been sufficiently investigated are radio frequency fingerprinting (RFF) methods. The main motivation of this paper was to investigate the RFF discrete wavelet transform (DWT) in combination with machine learning classifiers for effective spoofing detection and signal-type classification. The discrete wavelet transform is used for spoofing detection because it has the ability to localize information in the time-frequency domain, which is particularly useful for detecting anomalies such as fake signals or abnormal patterns. Spoofing attacks often change the structure of the signal only in certain time segments and the discrete wavelet transform enables their detection because it segments the signal into time-frequency components. Approximation and detail DWT coefficients contain compact information about the energy and frequency components of the signal, and it is easy to calculate statistical, spectral, and texture features which are used as input data in classifiers. Another advantage of this approach is using Daubechies db4 and db8 wavelets that have very good localization in time and frequency, which provides resistance to noise. Compared to other types of wavelets (e.g., Haar, Symlet), Daubechies wavelets retain more energy of the signal in the approximation coefficients, resulting in more accurate statistical and texture features. This increases the discriminative power of the features used for classification. The DWT has a lower computational complexity compared to e.g., the Wigner-Wille transform, which allows a faster implementation in real-time GNSS receivers. This paper aimed to compare different machine learning classifiers using different types of input classification data and to predict the type of signal with high accuracy. Furthermore, using the pre-extracted features for the input data reduces the computational complexity of the proposed approach. This paper proposes an integrated approach based on the combination of discrete wavelet transform (Daubechies db4 and db8 wavelets) and machine learning models for intermediate spoofing attack detection and signal-type classification. The approach is applied to both GPS and Galileo systems. The performance of each machine learning model based on different types of input classification data and computational complexity is compared.