# GNSS Spoofing Detection Based on Wavelets and Machine Learning
## 4 Results and Discussion
### Computational Complexity  
Table 4 shows the computational complexity for the code parts for the SVM model classification algorithm based on various classification inputs: images, features extracted from images, and spectral and statistical features. From the table, it can be seen that the algorithm based on images as the input data differs from the other two in two steps, which are the generation of bag of features in which the image processing models are used, and the step in which the features are extracted from each generated image using the Speeded-Up Robust Feature (SURF) method. In algorithms where the input data were image characteristics and spectral and statistical features, the input data to the model were a series, and therefore, the computational complexity for these algorithms was lower \begin{table}
\begin{tabular}{l l l l l l l} \hline
**Dataset and** & **ML** & **Mean** & **F1** & **Recall** & **Precision** & **Elapsed** \\
**Coefficient Type** & **Method** & **Acc. (\%)** & **Score** & & & **Time (s)** \\ \hline db4 & & & & & & & \\ \hline \multirow{4}{*}{(clean + os10) approx.} & SVM & 99.87 & 0.9987 & 0.9989 & 0.9985 & 4.5 \\  & KNN & 99.88 & 0.9989 & 0.9978 & 1 & 1.9 \\  & RF-100 & 99.94 & 0.9994 & 0.9989 & 1 & 5.04 \\  & RF-200 & 99.94 & 0.9994 & 0.9989 & 1 & 8.72 \\ \hline \multirow{4}{*}{(clean + os12) approx.} & SVM & 99.33 & 0.9933 & 0.9941 & 0.9926 & 4.4 \\  & KNN & 98.83 & 0.9885 & 0.9786 & 0.9985 & 2 \\  & RF-100 & 99.88 & 0.9989 & 0.9993 & 0.9985 & 5.2 \\  & RF-200 & 99.83 & 0.9983 & 0.9989 & 0.9978 & 8.9 \\ \hline db8 & & & & & & \\ \hline \multirow{4}{*}{(clean + os10) approx.} & SVM & 93.59 & 0.9362 & 0.9321 & 0.9404 & 599.51 \\  & KNN & 87.09 & 0.8686 & 0.8394 & 0.9 & 562.73 \\  & RF-100 & 86.74 & 0.8671 & 0.8693 & 0.8648 & 568.87 \\  & RF-200 & 87.54 & 0.8753 & 0.8761 & 0.8744 & 586.87 \\ \hline \multirow{4}{*}{(clean + os12) approx.} & SVM & 75.30 & 0.7508 & 0.7573 & 0.7444 & 564.41 \\  & KNN & 75.48 & 0.7554 & 0.7537 & 0.757 & 597.62 \\  & RF-100 & 75.11 & 0.7521 & 0.7491 & 0.7552 & 272.4 \\  & RF-200 & 75.19 & 0.7483 & 0.7591 & 0.7378 & 583.12 \\ \hline \multirow{4}{*}{(clean + os10) approx.} & SVM & 11.81 & 0.9175 & 0.9244 & 0.9107 & 5.2 \\  & KNN & 5.20 & 19521 & 0.9509 & 0.9533 & 1.78 \\  & RF-100 & 6.26 & 1.9626 & 1.9616 & 0.9637 & 7.1 \\  & RF-200 & 5.83 & 0.9584 & 0.9571 & 0.9596 & 0.49 \\ \hline \multirow{4}{*}{(clean + os12) approx.} & SVM & 5.22 & 0.7466 & 0.764 & 0.73 & 1.62 \\  & KNN & 6.5 & 1.7620 & 0.7217 & 0.7526 & 9.4 \\  & RF-100 & 6.59 & 1.7636 & 0.7711 & 0.7563 & 7.69 \\  & RF-200 & 75.85 & 1.7591 & 0.7572 & 0.7611 & 2.46 \\ \hline \multirow{4}{*}{(clean + os10) approx.} & SVM & 93.46 & 0.934 & 0.9433 & 0.9248 & 10.85 \\  & KNN & 95.02 & 0.9504 & 0.9467 & 0.9541 & 3.07 \\ \cline{1-1}  & RF-100 & 96.11 & 0.9614 & 0.9554 & 0.9674 & 17.76 \\ \cline{1-1}  & RF-200 & 96.28 & 0.9629 & 0.9589 & 0.9967 & 11.94 \\ \hline \multirow{4}{*}{(clean + os12) approx.} & SVM & 74.54 & 0.7431 & 0.7497 & 0.7367 & 5.12 \\ \cline{1-1}  & KNN & 76.85 & 0.7666 & 0.773 & 0.7604 & 8.09 \\ \cline{1-1}  & RF-100 & 76.67 & 0.7671 & 0.7657 & 0.7685 & 15.25 \\ \cline{1-1}  & RF-200 & 77.26 & 0.7722 & 0.7736 & 0.7707 & 12.51 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: _Cont._compared to that of algorithms using images as inputs. As for other machine learning models, KNN and RF, they differed from the SVM in the step of training and testing the model. The calculation of computational complexity in parts for the proposed DWT algorithm is shown below:  
1. Loading IQ data from.bin file: \(O(S)\), where \(S\) is the total number of samples per iteration; \(S=D\cdot P\), where \(D\) is the number of samples in the observed particle of the signal, and \(P\) is the number of particles into which the signal is divided per iteration. 2. Conversion of a 1D complex signal to a square matrix (combination \(I+j*Q\)) to a 2D matrix of dimensions nxn: \(O(n^{2})\). 3. Single-use 2D DWT: \(O(n^{2})\). 4.