## 7 Simulation-Based Example and Feature Down Selection  
An in-house-based simulator was built based on Matlab 2020b version and Python 3.7.5. The Matlab modules were used to generate I/Q samples based on a GNSS and a spoofer model, each having five types of transmitter features: PA non-linearities, DAC non-linearities, I/Q imbalance, phase noises, and BPF. The parameters of genuine GNSS transmitters are typically not available in open access, as they are protected via IPR. In the absence of such GNSS exact parameters for these HW features, we adopted various models from the literature. For example, the PA non-linearities were modelled according to [59], and the phase noise existing in the clock unit and up-conversion unit was modelled according to [90]. Details on the parameters used in our simulator are given in Table 2. In order to mimic the characteristics of a sophisticated spoofer, the phase noise of the local oscillator in the spoofer was modelled according to [52], a high-end software-defined radio designed for GNSS signal transmitting and receiving. A simplified model was used for classifying one genuine GNSS transmitter versus one spoofer transmitting GNSS-like signals. As the main goal was to study the feasibility of RFF in the context of GNSS, an ideal, almost noise-free case was considered with a carrier-to-noise ratio (CNR) \(C/N_{0}=100\) dBHz. While the noise-free approach is not realistic in real-life scenarios, the purpose here was to show if there is any potential of RFF with pre-correlation GNSS data and to identify which HW features are likely to best differentiate between different transmitters. A two-millisecond observation window of Galileo E1 band signals was used in the examples shown in this section. In order to deal better with smaller \(C/N_{0}\) levels that the ideal case considered here, one could consider the increase in the observation window. However, the simulation times and the complexity of RFF processing would also increase. Under a different randomness seed, we generated 2000 matrices (or images) of genuine GNSS signals and spoofer signals, respectively (thus a total of 4000 inputs to the ML algorithm). Furthermore, the 4000 data inputs were randomly split into 80% of training data and 20% of test data. Such matrices (or images) were the outputs of three considered feature-extraction transforms, namely applied kurtosis, TKEO and spectrogram, applied on the 2 ms observation interval of the raw signal sampled at a very high sampling rate of 491 MHz. Such a high sampling rate was needed in our model because we adopted a quasi-RF model, in order to model the clocks' non-idealities. The feature-extraction transforms were selected based on the discussions in Section 5, in order to enhance the capability of differentiating genuine GNSS signals from spoofer signals. An SVM classifier, from the scikit-learn library, together with a radial-basis-function kernel was implemented in Python to perform the classification. The grid search method was used to provide the optimized classification results and 100-fold cross-validation on the training dataset were employed to guarantee the convergence of the results. The results of the classification are presented via the confusion-matrix metric. Figure 19 illustrates the definition of the confusion matrix used in our work. In our simulator, each feature can be active or inactive, making the simulator flexible to be able to down select or identify the'strongest' features, as well as their overall impact when they act jointly (as in a realistic transmission scenario). Figure 20 shows the confusion-matrix results, first when all features are combined, and then feature-by-feature, in order to be able to identify which features have a strong impact on RFF and which a have weak or no impact. One very interesting result based on Figure 20 is that, even at a 100 dB-Hzcarrier-to-noise ratio, both the phase-noise and DAC-non-linearity features fail to provide differences between the two classes (spoofer present versus genuine Galileo signal present).