Multiband Spectrum Sensing Based on the Sample Entropy

Cognitive radios represent a real alternative to the scarcity of the radio spectrum. One of the primary tasks of these radios is the detection of possible gaps in a given bandwidth used by licensed users (called also primary users). This task, called spectrum sensing, requires high precision in determining these gaps, maximizing the probability of detection. The design of spectrum sensing algorithms also requires innovative hardware and software solutions for real-time implementations. In this work, a technique to determine possible primary users’ transmissions in a wide frequency interval (multiband spectrum sensing) from the perspective of cognitive radios is presented. The proposal is implemented in a real wireless communications environment using low-cost hardware considering the sample entropy as a decision rule. To validate its feasibility for real-time implementation, a simulated scenario was first tested. Simulation and real-time implementations results were compared with the Higuchi fractal dimension as a decision rule. The encouraging results show that sample entropy correctly detects noise or a possible primary user transmission, with a probability of success around 0.99, and the number of samples with errors at the start and end of frequency edges of transmissions is, on average, only 12 samples.


Introduction
The concept of cognitive radio (CR) was introduced by Mitola and Maguire some years ago. It is described as the ability of one communications device to modify its parameters (such as modulation, carrier, bandwidth, etc.) to continue transmitting and/or receiving information [1]. Based on the fact that national regulatory administrations of the radio space attribute exclusive use licenses to transmit on fixed frequencies, two main protagonists are introduced by this concept: (i) the primary user (PU), also known as a licensed user, who is the user authorized to use a fixed frequency; (ii) the non-licensed user, also called secondary user (SU). The latter is the user that transmits or receives, dynamically taking advantage of the spectral gaps, which are the instants of time where the PU is not transmitting (or receiving), generating a hole in the spectrum [2].
Specifically, the operation of a CR is to select the best available channel, coordinate its access and, at the right time, leave the channel when it detects PU activity to avoid interference. This operation results in four functions or stages: spectrum sensing (SS), decision, sharing, and mobility [3]. SS is the ability to detect PU transmission in the spectral band that a SU is using or intends to use in a timely manner. The decision concerns the SU's ability to select the best available spectrum band. Sharing refers to coordinated access to the channel selected by the SU, and spectrum mobility is the ability of a CR to vacate the used channel and to move to another possible available spectral gap when a PU is detected [2,3]. SampEn represents the negative natural logarithm of the conditional probability that two similar sequences for m points remain similar at the next point, where proper matches are not included in the probability calculation. Therefore, a lower value of SampEn indicates more self-similarity of the studied sequence, while a higher value of SampEn indicates a greater complexity of the sequence.
The calculation of SampEn requires the a priori determination of two unknown parameters: m and r (the length K of the data, as mentioned before, depends on the dynamic size window that corresponds to a section of the power spectrum density (PSD) of each connected device). Suggested values of r are in the interval of [0.1, 0.2] times the standard deviation of the processed signal X. The choice of a correct r is not an easy task. Indeed, in [15], it was studied how to fit to the data the best r value for the specific case of the ApEn (a similar entropy of the SampEn) evaluating all the values of r varying from 0 to 1 looking for the maximum of the ApEn (considered as the correct interpretation of the complexity of a signal). It was concluded that the maximum of ApEn does not always occur within the prescribed interval of r values. Hence, computing all possible r values is impractical due to the computational burden this represents. For this, practical recommendations with good results, given for other applications, are in the interval [0.1, 0.2]. Based in this fact (and leaving the search for the optimal value of r for our analyzed data as an open research topic), in our simulations, we set 0.1 r  . The value of m can be calculated by estimating the false nearest neighbor [16]. In this MBSS technique, the m found across false nearest neighbors for our signals was most of the time equal to 2. Therefore, it was set at 2 m  for all simulations and experimental tests. SampEn is, theoretically speaking, a fraction on the interval 0 SampEn  . However, the following two formulas can be used to find the lower and upper limits of SampEn for fixed values of m and K.
The lower limit can be estimated as and the upper one as

1.
Build a vector V P with m consecutive data points taken from X; i.e., where P varies in the interval (1 ≤ P ≤ K − m), and m is the length of sequences to be compared, also called the embedding dimension.

2.
For each P, define where r is the tolerance for accepting matches, and it is usually selected as a factor of the standard deviation of vector X, std(X). Θ( ) is the Heaviside function and 1 is the Chebyshev distance, defined as where C m P represents the proportion of V h , P = h whose distances to V P are less than r.

3.
Now, for each P, define and The SampEn is computed as SampEn represents the negative natural logarithm of the conditional probability that two similar sequences for m points remain similar at the next point, where proper matches are not included in the probability calculation. Therefore, a lower value of SampEn indicates more self-similarity of the studied sequence, while a higher value of SampEn indicates a greater complexity of the sequence.
The calculation of SampEn requires the a priori determination of two unknown parameters: m and r (the length K of the data, as mentioned before, depends on the dynamic size window that corresponds to a section of the power spectrum density (PSD) of each connected device). Suggested values of r are in the interval of [0.1, 0.2] times the standard deviation of the processed signal X. The choice of a correct r is not an easy task. Indeed, in [15], it was studied how to fit to the data the best r value for the specific case of the ApEn (a similar entropy of the SampEn) evaluating all the values of r varying from 0 to 1 looking for the maximum of the ApEn (considered as the correct interpretation of the complexity of a signal). It was concluded that the maximum of ApEn does not always occur within the prescribed interval of r values. Hence, computing all possible r values is impractical due to the computational burden this represents. For this, practical recommendations with good results, given for other applications, are in the interval [0.1, 0.2]. Based in this fact (and leaving the search for the optimal value of r for our analyzed data as an open research topic), in our simulations, we set r = 0.1. The value of m can be calculated by estimating the false nearest neighbor [16]. In this MBSS technique, the m found across false nearest neighbors for our signals was most of the time equal to 2. Therefore, it was set at m = 2 for all simulations and experimental tests. SampEn is, theoretically speaking, a fraction on the interval 0 < SampEn < ∞. However, the following two formulas can be used to find the lower and upper limits of SampEn for fixed values of m and K.
The lower limit can be estimated as and the upper one as

Methodology
The main idea of this work is to show that SampEn is a viable technique to be used as a decision rule to distinguish noise or a possible PU transmission in a real-time MBSS scenario. The original scenario developed by the authors in [7], using software-defined radios (SDR) devices such as SDR-LTR, HackRF One, and LimeSDR mini, configured to work as SU and PU, is the base for this work. A brief description of different modules integrating this base methodology, shown in Figure 1, is given below.

1.
Sliding time window. This block receives the complex signal from each connected device i = 1, . . . , N, refreshed every 100 ms. In this block, it is possible to manipulate the parameters of the sampling rate f Si , center frequency f Ci , and gain of each device i.

2.
Estimation of the power spectral density. In this block, from the signal x Ii (n) + jx Qi (n), the PSD is computed directly in a linear scale for every frame of 100 ms. For this, a Welch estimator [17] is used, resulting in the signal R i (K). The number of samples for each frame, used to estimate PSD, is a value chosen by the user and depends on the type of used device: 512, 1024, 2048, or 4096 for the RTL-SDR devices, and 1024, 2048, 4096, or 8192 for HackRf One and LimeSDR mini devices.

3.
Impulsive noise inhibition. Impulsive noise and high-frequency noise are greatly reduced in this module. Here, the processing is done through the detail coefficients and the approximation coefficients resulting from having applied the MRA to the PSD estimate [18]. This noise reduction proposal is a novel technique introduced by the authors, giving excellent results. The result of this block is the modified PSD R i . 4.
PU detection. This module detects spectral gaps and possible PU transmissions in a wide frequency range. As can be seen in [6], MRA and K-means [19] algorithms are used to detect the start and end edges of a PU transmission, and HFD [20] is used as the decision rule to distinguish what is noise from a possible transmission.
In this work, some basic steps of the original methodology are retaken. The current contribution appears in the PU detection block (colored in orange in Figure 1). Figure 2 shows in detail this modified module, in which the SampEn is included as a decision rule. This module is described in the next points.

Simulations and Real-Time Controlled Scenario
In this section, simulations and experimental tests are presented. To evaluate this method, two different schemes are proposed: a simulation considering synthetic signals (explained in Section 4.1) and a real-time controlled environment using SDR devices as transmitters and/or receivers (explained in Section 4.2).
Before detailing the implemented scenarios, it is necessary to indicate the inclusion of the noise in both simulation and real-time implementation in order to evaluate the method's performance as a function of SNR.
For this, we added a white noise process with a Gaussian distribution (AWGN) to each received signal in time, modifying its power to get a specific SNR; i.e., the i AWGN added to each     x n jx n  signal has the function of computing (i) the SNR value  PSD perceived by each connected SDR device is evaluated in dBm to obtain the R i−dBm (K) signal. MRA is applied to this signal, resulting in the approximation and detail coefficients at different levels of decomposition.

2.
The analysis of the reconstructed signal of the approximation coefficients allows us to know the number of clusters in which the normalized and rescaled approximation coefficients will be classified by the K-means algorithm to build the test signal.

3.
Processing the changes of state of this signal, it is possible to detect the start and end edges of the transmissions in the analyzed frame. With this information, it is possible to build windows of dynamic size.

4.
Each dynamic window (test window) represents a section of the spectrum that corresponds directly to a section of the test signal; i.e., to a section of the reconstructed signal from the coefficients. Each test window is compared with a threshold equal to 1. If the test window comparison matches the threshold, the SampEn will be directly applied to the original spectrum window. Otherwise, the SampEn will be applied to the reconstructed spectrum window.

5.
If the value of the SampEn is greater than 0.38, it means only noise is present in the analyzed window. If the value of the SampEn is lower, it is highly probable that there is a PU in the analyzed window. Finally, processing each frame of each connected SDR device, the occupation is obtained; i.e., the spectral location of the PU and the possible spectral gaps in which the SU could be placed. In Section 5.1, the choice of the decision threshold is justified.

Simulations and Real-Time Controlled Scenario
In this section, simulations and experimental tests are presented. To evaluate this method, two different schemes are proposed: a simulation considering synthetic signals (explained in Section 4.1) and a real-time controlled environment using SDR devices as transmitters and/or receivers (explained in Section 4.2).
Before detailing the implemented scenarios, it is necessary to indicate the inclusion of the noise in both simulation and real-time implementation in order to evaluate the method's performance as a function of SNR.
For this, we added a white noise process with a Gaussian distribution (AWGN) to each received signal in time, modifying its power to get a specific SNR; i.e., the AWGN i added to each x Ii (n) + jx Qi (n) signal has the function of computing (i) the SNR value that is desired in the controlled scenario and (ii) the obtained power P SU i from each connected SU. This addition is shown in Figure 3.

Simulation
The simulation was carried out considering a PU randomly appearing in a wide band. For this, the scenario was implemented in the MATLAB software with the parameters defined in Table 1. The performance of SampEn was studied by applying it to sequences of points that correspond to transmissions with AWGN-specifically, orthogonal frequency division multiplexing (OFDM) symbols. This simulation is necessary to

Simulation
The simulation was carried out considering a PU randomly appearing in a wide band. For this, the scenario was implemented in the MATLAB software with the parameters defined in Table 1. The performance of SampEn was studied by applying it to sequences of points that correspond to transmissions with AWGN-specifically, orthogonal frequency division multiplexing (OFDM) symbols. This simulation is necessary to corroborate the better performance of entropy than the HFD before delving into its real application. Results of this simulation are presented in Section 5.

Implementation of the Controlled Scenario
This section details the implementation of the methodology in a controlled wireless communication environment. For this, the SDR devices described in Table 2 were used. The versatility of software-defined radios foresees its possible application in the improvement of short-wave communications [21][22][23]; for example, to facilitate spectrum examination, interference detection, efficient frequency distribution assignment, the testing of the operation of repeater systems and the measurement of their electrical parameters, the identification of spectrum intruders, and the characterization of noise in different spectral bands. Furthermore, linked to these main characteristics and their relatively low cost, SDR devices have the flexibility given by programming their features with free software, achieving multiple possibilities such as the construction of transmitters, receivers, or multiplexers [24,25]. Based on the advantages offered by the SDR devices mentioned above, it is proposed to use them in the real-time scenario of short-distance wireless communications, as shown in Figure 4. The goal of this scenario, proposed by the authors in [7], is to have a point of comparison between the SampEn and the Higuchi fractal dimension, previously tested for MBSS. The scenario includes three SUs and two PUs, covering a wide band. These users are positioned at the central frequencies indicated in Table 3.
This controlled scenario was implemented so that the comparison between both techniques was as realistic as possible. However, given that we have a real communication environment, there is an important point to consider: it is almost impossible to isolate the external transmissions that can influence the result, including a classical external additive noise affecting communications (this is different from the controlled noise added in the received signals to get a desirable SNR for performance evaluation purposes).
Based on the advantages offered by the SDR devices mentioned above, it is proposed to use them in the real-time scenario of short-distance wireless communications, as shown in Figure 4. The goal of this scenario, proposed by the authors in [7], is to have a point of comparison between the SampEn and the Higuchi fractal dimension, previously tested for MBSS. The scenario includes three SUs and two PUs, covering a wide band. These users are positioned at the central frequencies indicated in Table 3.

HackRF
LimeSDR Phone Figure 4. Controlled short-distance wireless communication environment [7]. This controlled scenario was implemented so that the comparison between both techniques was as realistic as possible. However, given that we have a real communication environment, there is an important point to consider: it is almost impossible to isolate the external transmissions that can influence the result, including a classical external addi-

Results
In this section, results obtained regarding the probability of success and the number of samples in error for bot, simulated and experimental tests are presented. However, to carry out both tests, it is first necessary to set a critical value: the threshold for the sample entropy in the decision rule. In the next paragraphs, this choice is discussed.

Threshold Selection in the Decision Rule
Before establishing the threshold in the decision rule and understanding how the proposed methodology works, we present an example in which the SampEn was basically applied to two different sequences of points: a primary transmission (OFDM symbol) and an AWGN. For this, the SampEn was applied to a frame divided into three sections (windows): two of these sections correspond to AWGN and one to an OFDM transmission. The complete frame, shown in Figure 5a, is integrated by samples (number) 1 to 225 and 500 to 743 corresponding to the AWGN and samples 226 to 499 containing the OFDM transmission. This process was repeated for 1000 frames (or random realizations) with a specific SNR value of 10 dB. The result (average and standard deviation) of applying the SampEn to these frames is shown in Figure 5c. In parallel, the HFD (used as a decision rule in previous works and just for comparison purposes) was applied to these same frames, and its results are shown in Figure 5b. Clearly, SampEn (as HFD also does) differentiates what is noise and what is a transmission. We can observe that the SampEn is close to 0 when the analyzed sequences have great similarity with themselves (in this case, a possible transmission of the PU). On the contrary, the SampEn tends to a value equal to 2 or higher when the discrete series is more complex (in this case, the AWGN).
applying the SampEn to these frames is shown in Figure 5c. In parallel, the HFD (used as a decision rule in previous works and just for comparison purposes) was applied to these same frames, and its results are shown in Figure 5b. Clearly, SampEn (as HFD also does) differentiates what is noise and what is a transmission. We can observe that the SampEn is close to 0 when the analyzed sequences have great similarity with themselves (in this case, a possible transmission of the PU). On the contrary, the SampEn tends to a value equal to 2 or higher when the discrete series is more complex (in this case, the AWGN). Now, knowing that SampEn permits us to classify these two states, a question needs to be answered: what is the optimal threshold to classify both states considering the SNR influence? For this, the blind classification Expectation-Maximization (EM) algorithm was implemented [31]. Based on the kind of processed signals, it is feasible to think that Now, knowing that SampEn permits us to classify these two states, a question needs to be answered: what is the optimal threshold to classify both states considering the SNR influence? For this, the blind classification Expectation-Maximization (EM) algorithm was implemented [31]. Based on the kind of processed signals, it is feasible to think that the point where the two Gaussians intersect is the optimal SampEn threshold. In this way, 2,084,015 values of the SampEn were analyzed by EM with SNR values ranging from −6 to 20 dB. Figure 6 shows the result of applying EM to the values obtained from this process. The values L 1 = µ 1 + nσ 1 and L 2 = µ 2 + nσ 2 with n = 0.5 are used to delimit the region in which a threshold can be chosen. This region is relatively close to the intersection of both Gaussians (L o = 0.38). Besides, these limits (L 1 and L 2 ) are proposed as lower and upper limits, respectively, to compare the result of taking specific values for SampEn.

Simulation Results
Performance evaluations for both experimental and simulated tests are based on the probability of success (PS), which is the result of counting the total of correctly located frequency windows with respect to the total number of detected frequency windows.
To determine this parameter (i.e., PS), four possible cases are considered (see Figure 7):

Simulation Results
Performance evaluations for both experimental and simulated tests are based on the probability of success (PS), which is the result of counting the total of correctly located frequency windows with respect to the total number of detected frequency windows.
To determine this parameter (i.e., PS), four possible cases are considered (see Figure 7):  Results of the simulated test using the proposed thresholds, mentioned in Section 5.1, are displayed in Figure 8. Clearly, there is no difference in choosing between the optimal threshold L0 = 0.38 and the upper bound 0.48, with both giving the same results. Threshold values higher than 0.48 have less efficiency in the proposed system. Figure 8 shows both the results obtained by the SampEn and the HFD considering, as mentioned in Section 4.1, only one simulated PU per frame. Both techniques clearly show an excellent performance for SNR values greater than or equal to 0 dB. For lower values of SNR, both techniques show a similar, good performance.  PS is evaluated as PS = TP + TN TP + FP + FN + TN (11) Results of the simulated test using the proposed thresholds, mentioned in Section 5.1, are displayed in Figure 8. Clearly, there is no difference in choosing between the optimal threshold L 0 = 0.38 and the upper bound 0.48, with both giving the same results. Threshold values higher than 0.48 have less efficiency in the proposed system. Figure 8 shows both the results obtained by the SampEn and the HFD considering, as mentioned in Section 4.1, only one simulated PU per frame. Both techniques clearly show an excellent performance for SNR values greater than or equal to 0 dB. For lower values of SNR, both techniques show a similar, good performance. Figure 9 shows the classification of the detected windows according to Figure 7. Figure 9a shows this classification when data are analyzed with the HFD, and Figure 9b shows those with the SampEn. Here, a clear difference is shown between these two decision rules when the SNR tends to negative values. Indeed, as the SNR decreases, the value of the SampEn and the HFD begin to increase due to the complexity of the signal, and the algorithm begins to misclassify the different dynamic size windows.
Another parameter to evaluate the proposed methodology is the samples in error; i.e., the number of samples that exist between the ideal value of the frequency edge of the controlled transmission and the detected point at which the proposed method locates the PU transmission (see Figure 10). This figure also shows the dynamic window concept, which is the number of blocks in which the PSD is sectioned, and the occupation of the PSD, which is the union of the results obtained for each window. Figure 8. Clearly, there is no difference in choosing between the optimal threshold L0 = 0.38 and the upper bound 0.48, with both giving the same results. Threshold values higher than 0.48 have less efficiency in the proposed system. Figure 8 shows both the results obtained by the SampEn and the HFD considering, as mentioned in Section 4.1, only one simulated PU per frame. Both techniques clearly show an excellent performance for SNR values greater than or equal to 0 dB. For lower values of SNR, both techniques show a similar, good performance.  Figure 9 shows the classification of the detected windows according to Figure 7. Figure 9a shows this classification when data are analyzed with the HFD, and Figure 9b shows those with the SampEn. Here, a clear difference is shown between these two decision rules when the SNR tends to negative values. Indeed, as the SNR decreases, the value of the SampEn and the HFD begin to increase due to the complexity of the signal, and the algorithm begins to misclassify the different dynamic size windows. Another parameter to evaluate the proposed methodology is the samples in error; i.e., the number of samples that exist between the ideal value of the frequency edge of the controlled transmission and the detected point at which the proposed method locates the PU transmission (see Figure 10). This figure also shows the dynamic window concept, which is the number of blocks in which the PSD is sectioned, and the occupation of the PSD, which is the union of the results obtained for each window.  Figure 11 shows the samples in error for the simulated tests. Here, the behavior of both the HFD and SampEn, with a threshold L o = 0.38, is practically the same: an excellent detection for SNRs higher than 5 dB (less than 5 samples in error on average) and a very good detection for lower SNRs (on average, only 10 samples in error). In this case, the samples in error, on average, represent 0.67% of the frame evaluated in this section.

5.1, are displayed in
Another parameter to evaluate the proposed methodology is the samples in error; i.e., the number of samples that exist between the ideal value of the frequency edge of the controlled transmission and the detected point at which the proposed method locates the PU transmission (see Figure 10). This figure also shows the dynamic window concept, which is the number of blocks in which the PSD is sectioned, and the occupation of the PSD, which is the union of the results obtained for each window.

Results of the Controlled Scenario
The results, in terms of PS and SNR, of the implementation of the controlled wireless communication environment are presented in Figure 12. Here, the average results of the method's efficiency at detecting the three connected PUs using the HFD and the SampEn are displayed. The behavior presented by both techniques to correctly determine the presence of PUs in the sensed spectral interval is practically the same. Both techniques have an excellent performance for SNR values greater than 0 dB, at around 0.98 for the HFD and 0.99 for the SampEn. For SNR values less than 0 dB, the HFD shows an abrupt decay. On the other hand, SampEn keeps very good results, even in very noisy cases.

Results of the Controlled Scenario
The results, in terms of PS and SNR, of the implementation of the controlled wireless communication environment are presented in Figure 12. Here, the average results of the method's efficiency at detecting the three connected PUs using the HFD and the SampEn are displayed. The behavior presented by both techniques to correctly determine the presence of PUs in the sensed spectral interval is practically the same. Both techniques have an excellent performance for SNR values greater than 0 dB, at around 0.98 for the HFD and 0.99 for the SampEn. For SNR values less than 0 dB, the HFD shows an abrupt decay. On the other hand, SampEn keeps very good results, even in very noisy cases. communication environment are presented in Figure 12. Here, the average results of the method's efficiency at detecting the three connected PUs using the HFD and the SampEn are displayed. The behavior presented by both techniques to correctly determine the presence of PUs in the sensed spectral interval is practically the same. Both techniques have an excellent performance for SNR values greater than 0 dB, at around 0.98 for the HFD and 0.99 for the SampEn. For SNR values less than 0 dB, the HFD shows an abrupt decay. On the other hand, SampEn keeps very good results, even in very noisy cases. In Figure 13, the results (mean and standard deviation) of the samples in error for this real scenario considering three different PUs are also presented. We can observe that, in this case, the HFD slightly outperforms the SampEn. However, the number of samples in error is, in general, relatively small for both techniques showing an excellent performance in terms of accurately locating PUs in the wide spectrum. In this case, the samples in error on average for the SampEn amount to 0.58% for 1 SU and 1.61% for 2 SU and In Figure 13, the results (mean and standard deviation) of the samples in error for this real scenario considering three different PUs are also presented. We can observe that, in this case, the HFD slightly outperforms the SampEn. However, the number of samples in error is, in general, relatively small for both techniques showing an excellent performance in terms of accurately locating PUs in the wide spectrum. In this case, the samples in error on average for the SampEn amount to 0.58% for SU 1 and 1.61% for SU 2 and SU 3 of the evaluated frame. On the other hand, for the HFD, the erroneous samples amount to 0.29% for SU 1 and 0.8% for SU 2 and SU 3 .  Finally, a specific challenging case (i.e., an explicit frame) is shown for both techniques: the HFD and SampEn. In this frame, there is a PU with an OFDM transmission with a bandwidth of 1 MHz (Figure 14a). This analyzed frame has an SNR value of 0 dB, which means that the signal is practically embedded in the noise. As a result of applying the proposed algorithm to this frame, the pccupation is displayed in Figure 14a as a continuous signal containing the changes of state: occupied and not occupied. Figure 14b shows the ordered number of windows in which the spectrum is segmented and their respective values computed with the proposed methodology for both techniques-SampEn and HFD. The number of windows is the same for both techniques because they use the same edge detector to form the different windows of dynamic size. In this example, both methodologies detect the PU; however, other spectrum holes in error are also detected. Hence, we identify an important issue: when the SNR is reduced, an increasing number of dynamic windows will form. This means that the algorithm Finally, a specific challenging case (i.e., an explicit frame) is shown for both techniques: the HFD and SampEn. In this frame, there is a PU with an OFDM transmission with a bandwidth of 1 MHz (Figure 14a). This analyzed frame has an SNR value of 0 dB, which means that the signal is practically embedded in the noise. As a result of applying the proposed algorithm to this frame, the pccupation is displayed in Figure 14a as a continuous signal containing the changes of state: occupied and not occupied. Figure 14b shows the ordered number of windows in which the spectrum is segmented and their respective values computed with the proposed methodology for both techniques-SampEn and HFD. The number of windows is the same for both techniques because they use the same edge detector to form the different windows of dynamic size. In this example, both methodologies detect the PU; however, other spectrum holes in error are also detected. Hence, we identify an important issue: when the SNR is reduced, an increasing number of dynamic windows will form. This means that the algorithm needs to process increasing numbers of windows, making the methodology inefficient from the point of view of computational resources.
with a bandwidth of 1 MHz (Figure 14a). This analyzed frame has an SNR value of 0 dB, which means that the signal is practically embedded in the noise. As a result of applying the proposed algorithm to this frame, the pccupation is displayed in Figure 14a as a continuous signal containing the changes of state: occupied and not occupied. Figure 14b shows the ordered number of windows in which the spectrum is segmented and their respective values computed with the proposed methodology for both techniques-SampEn and HFD. The number of windows is the same for both techniques because they use the same edge detector to form the different windows of dynamic size. In this example, both methodologies detect the PU; however, other spectrum holes in error are also detected. Hence, we identify an important issue: when the SNR is reduced, an increasing number of dynamic windows will form. This means that the algorithm needs to process increasing numbers of windows, making the methodology inefficient from the point of view of computational resources.

Conclusions
In this work, a novel MBSS technique based on the sample entropy is presented. For this, a low-cost SDR devices-based system is implemented to measure its performance in a real wireless communications environment at detecting primary users in a wide frequency domain. From the results, some important points could be highlighted:

•
Experimental results for the detection of the primary users are consistent with the results of the simulated calculation, indicating that the proposed MBSS technique is correct and feasible to be considered for a real wireless communication environment. Power levels of the proposal are like those where spectrum sensing can be considered; for example, the case of coexistence between LTE-U and Wi-Fi [32]. • It is difficult to give an interval in which the SampEn is located-this is because, in this investigation, the frames analyzed by the proposed technique are variable, and these can change depending on the SNR or the number of samples that the PSD contains. However, it is possible to observe (see Figure 9) that the SampEn value is between 0 and 9. These limits can be obtained with Equations (9) and (10). Nevertheless, the value obtained for these edges is not exact in a real environment since the number of samples of each analyzed window is variable. On the other hand, for an ideal environment in which the frame analyzed for both noise and a PU transmission is 512 samples, the lower limit is 7.7 × 10 −6 and the upper limit is 11.77. Besides, it is possible to observe from this same figure that the entropy always increases as the SNR decreases.

•
Results of applying L 2 or L o as the threshold for the SampEn are practically the same. Hence, the question arises: what is the maximum value that the SampEn could take while permitting good performance to be obtained in terms of classifying the two possible states? It is possible to consider this topic as a future research perspective. • Both decision rules, HFD and SampEn, are fast and feasible techniques to detect the presence of a PU in the spectrum. From Figure 12, it is possible to see that both techniques have excellent performance in scenarios with SNR values greater than 0 dB; however, for values less than 0 dB, SampEn has better performance. With this analysis, it is possible to affirm that both techniques, which measure the complexity of a signal, are accurate in detecting PUs in a multiband environment. • Finally, with an average of 99% precision at detecting the PU, and with 12 samples (mean) showing errors in locating the start and end edges of a transmission, we can conclude that SampEn is a viable technique for the precision detection of PUs in a wide spectrum. Institutional Review Board Statement: Not applicable.