# Real-Time Implementation of Multiband Spectrum Sensing Using SDR Technology
## 1 Introduction  
The concept of cognitive radio (CR) consists of a radio with the ability to take advantage of _'spectral gaps'_ in a timely manner to continue transmitting [1]. CR has been considered as one of the outstanding solutions for spectrum shortages. CR techniques provide the ability to use or share a spectrum in an opportune manner, as well as operate on the best available channel. In this way, CR technology allows secondary users (_SUI_), also called unlicensed users, to determine which parts of the spectrum are available and detect the presence of licensed users or primary users (_PU_). When an _SUI_ operates in an unauthorized band, the CR selects the best available channel, coordinates its access, and, at the right moment, leaves the channel when a _PU_ is detected to avoid interferences [2]. Accordingly, the CR paradigm involves the stages of spectrum sensing, decision, sharing, and mobility [3]. Sensing is the ability to timely detect the start of _PU_ transmission in the spectrum space by the _SUI_. The decision concerns the _SUI_'s ability to select the best available spectrum band. Sharing refers to the coordinated access to the channel selected by the _SUI_, and spectrum mobility is the capacity of a CR to vacate the channel when a _PU_ is detected [3]. The first stage of CR, i.e., spectrum sensing, is essential to determine the presence of a _PU_. Spectrum sensing in a CR is a term that implies obtaining the characteristics of the spectrum through multiple dimensions, such as time, space, frequency, and code. These characteristics include modulation type, waveform, bandwidth, and carrier frequency. The concept of CR can be applied to other technologies such as the Internet of things (IoT). In [4], a survey focused on the classification and merits of spectrum sensing and spectrum sharing techniques was presented for this technology fusion. Future wireless communication services will require high performance, which will need, among otherthings, a larger bandwidth. Nevertheless, in various scenarios, the available spectrum spaces are at noncontiguous frequencies. Due to this, it is necessary to have a broad overview of the \(PU\) activity. One solution is to consider multiband spectrum detection, i.e., perform the detection of available spectral spaces considering a wide bandwidth [5]. The multiband spectrum sensing (MBSS) problem has recently seen contributions representing great promise for implementing efficient CR. Currently, there are, in the literature, many works related to MBSS techniques. For example, in [6], they proposed an adaptive double-threshold spectrum detection method based on the Markov model for environments with a low SNR. This proposal significantly reduces the power/processing consumption for spectrum detection compared to the traditional single-band scheme. In [7], a framework for resource allocation and multiband cooperative spectrum detection was proposed for IoT in cognitive 5G networks. Here, it was emphasized that allocating an optimal number of channels to be sensed using multiband spectrum sensing can significantly decrease energy consumption in comparison with existing spectrum sensing approaches. Another work that stands out with respect to MBSS is [8]. In this article, the midrange method was used to detect the optimal energy level in the diffuse region, which is the area between the low- and high-energy thresholds, for a dual-threshold energy detector (ED). The authors of the current paper presented a previous study introducing a novel MBSS technique based on multiresolution analysis (MRA) [9; 10], combined with machine learning (ML), for edge detection and with the Higuchi fractal dimension (DFH) [11] as a binary decision rule for distinguishing noise and a possible \(PU\) transmission. In this work [12], one of the three ML algorithms, used for the classification of the coefficients, was the K-means algorithm.