# Real-Time Implementation of Multiband Spectrum Sensing Using SDR Technology
## 4 Real-Time Experiments and Results
### Results  
This section presents the results obtained for the MBSS technique. The two parameters evaluated in this implementation were, firstly, the probability of success (_PS_) which was the result of counting the total of correctly located frequency windows with respect to the total number of frequency windows. To determine this value, four possible cases were considered (Figure 19):  
1. The window that corresponds to a _PU_ transmission which \(SU\) classifies as _PU_ transmission is considered a true positive (_TP_) value. 2. The frequency window that corresponds to a _PU_ transmission which \(SU\) classifies as noise is considered a false negative (_FN_) value. 3. The window that corresponds to noise which \(SU\) classifies as a _PU_ transmission is considered a false positive (_FP_) value. 4. The frequency window that corresponds to noise which \(SU\) classifies as noise is considered a true negative (_TN_) value. As a function of these values, the _PS_ is given by \[PS=\frac{TP+TN}{TP+FP+FN+TN}.\] (5)  
Figure 18: Block _Adding a complex Gaussian noise._  
The second parameter is the number of samples in error, which is the number of samples between the edge of the _PU_ transmission and the edge detected by the MBSS technique. Each SDR device used in this implementation had its own _PS_ graph for each SNR value, as shown in Figure 20. The RTL-SDRs presented a better result to detect the frequency windows, which can be a _PU_ transmission or noise, compared to the HackRF One. The _PS_ for the RTL-SDRs was greater than 0.98 for values of SNR \(\geq\) 0 dB and the _PS_ for the HackRF One was greater than 0.94 for values of SNR \(>\) 0 dB. These values are very similar to those obtained in the simulated work [12] (i.e., _PS_ greater than 0.98 for values of SNR \(>\) 0 dB). Furthermore, the implementation of an energy detector (ED) [44] was carried out with an RTL-SDR (denoted \(SU_{4}\)) at \(f_{\text{C4}}=846.2\) MHz with a bandwidth of 2.4 MHz, which means that \(SU_{4}\) was perceived in the same radiofrequency space as \(SU_{2}\). For this technique, the threshold of \(SU_{4}\) was placed at \(-80\) dBm, which is the same value that was chosen for the cluster selection stage in the algorithm to classify the approximation coefficients in [12] through the K-means technique. Figure 21 shows the result of applying this conventional ED. In this case, the average estimated _PS_ was 0.64 for values of SNR \(\geq\) 5 dB. This poor result is not surprising, due to the nature of the proposed methodology. Indeed, even if the considered band is a single one, the _PS_ is calculated as an average of detected occupation windows inside the band (i.e., an MBSS is created for each considered SDR, thereby randomly varying the transmission location) to further decide if each detected window is free or not, via the HFD. In the case of the ED, many more windows are detected in error, inducing a lower _PS_ estimate. This is due to the misclassification of the PSD signal by the ED in a short frequency range. This phenomenon greatly reduces the _PS_ even though it correctly loc  
Figure 19: Classification of windows detected by the MBSS technique. Figure 20: Probability of success of each \(SU\) in the controlled implementation. We also estimated the samples in error, defined as the samples that detected the start or end edge of a _PU_ transmission. Figure 22 shows that, for values of SNR \(\geq 0\) dB, the samples in error were stable for each _SU_; however, the RTL-SDRs presented a better result for detecting _PU_ with greater precision, with between three and five samples on average for samples in error, whereas the HackRF One had between eight and nine samples, which is a good performance. The samples in error presented in [12] were between two and three samples on average. The number of samples in error for _SU\({}_{4}\)_ (conventional ED) was 36 on average (see Figure 23).