## 7 Evaluation of the Model and Clustering of RF Signals
### Searching for Similar RF Signals in Spectrograms  
An example spectrogram, labeled in rfspec-db [22] as 000310 with signal numbers overlaid, is shown in Figure 8. Signals 0, 1, and 10 are modulated with LSB modulation, signals 2 and 5 are CW (continuous wave) carriers, signals 3, 4, 6, and 8 are FM signals, and signals 7 and 9 are AM signals. For example, to find a signal similar to signal 4 (FM signal with low SNR), we can locate the fourth row of the distance matrix, which contains the distance vector between the features of signal 4 and the other signals. Figure 8: Spectrogram 000310 (fft_size 1024, samp_rate 2.5 \(\times\) 10\({}^{6}\), and length = 0.5 s) with detected signals from the rfspec-db database [22]. The distance vector for signal 4 is presented in Equation (5). From this vector, we can infer that the closest signal to signal 4 is signal 8 (distance of 0.84), followed by signal 6 (distance of 5.71). Signal 3 is also quite similar (distance of 10.47) compared to the subsequent signals, with the next closest signal having a distance of 31.93. All of the mentioned similar signals have the same FM modulation, while signal 3 differs from the rest in terms of its SNR indicator, exhibiting a significantly higher spectral power density in the spectrogram. Therefore, a thresholding method can be applied to extract similar signals. In order to classify signals with the same modulation and similar SNR, a threshold distance of \(\lambda=6\) is sufficient in this case. However, to classify signals with different SNR, an optimal threshold distance value of \(\lambda=11\) seems appropriate. \[A_{m,A}=\left(44.84\right.\] 45.30 \[\left.31.93 \right.\] 10.47 \[\left.0.00 \right.\] 42.51 \[\left.0.84 \right.\] 41.34 \[\left.5.71 \right.\] 42.37 \[\left.44.35\right) \tag{5}\]  
The inverted hard thresholding method (Equation (6)) for small argument values involves substituting one value (typically a logical '0') for the condition greater than or equal to being met, and another value (typically, a logical '1') for the condition not being met. \[a_{m}(x)= \begin{cases}0&\text{if }|x|\geq\lambda\\ 1&\text{if }|x|<\lambda\end{cases}  \tag{6}\]  
Therefore, after applying inverted thresholding with \(\lambda=6\) and \(\lambda=11\) to the distance vector from Equation (5), it will appear as shown in Equations (7) and (8), where '1' indicates that the signal is similar (True) and '0' indicates that the signal is dissimilar (False). \[S_{m,A}(\lambda=6)= \begin{pmatrix}0&0&0&0&1&0&1&0&1&0&0\end{pmatrix}  \tag{7}\]  
\[S_{m,A}(\lambda=11)= \begin{pmatrix}0&0&0&1&1&0&1&0&1&0&0\end{pmatrix}  \tag{8}\]  
With the similarity vectors, it is possible to plot a similarity matrix, which is shown in Table 1 for signal 4 and \(\lambda=6\) and \(\lambda=11\). Analyzing the table for two \(\lambda\) values yields interesting conclusions. The analyzed signal 4 is modulated with WBFM. For \(\lambda=6\), only signals 6 and 8 are considered similar, with respective PSNR values of 1 dB and 2 dB, while signal 4 has a PSNR of 4 dB. There is another WBFM radio station in the spectrogram transmitting the same modulating signal but with a higher PSNR of 10 dB. To include it in the common set for WBFM, the \(\lambda\) value needs to be increased to \(11\). For \(\lambda=6\) radio stations with a power difference of 3 dB are included in the set, while for \(\lambda=11\), the power difference is 6 dB. This indicates that the trained network distinguishes not only modulations but also signal power in the spectrogram, which can be a valuable solution for recognizing signals scattered across the ultra-wideband spectrum from specific FHSS radio stations. By having the similarity matrix, we can visualize the similarities between signals on the background of the wideband radio spectrogram (Figure 8), as shown in Figure 9a,b for