1. Introduction
Spectrum scarcity has been an issue in past years, due to the increasing demand for wireless communications services. Several instances have demonstrated that a solution is highly necessary in order to provide spectrum spaces for future technologies. In this regard, among engineering and regulatory proposed solutions, cognitive radio (CR) has been an outstanding option. CR is based on software-defined radio (SDR) and dynamic spectrum access (DSA) technologies, both allowing to improve drastically the spectrum occupancy [
1,
2]. Users that consider the utilization of CR are known as secondary users (SU). They do not have assigned a spectrum space; however they have the capacity to use available spectrum spaces adapting to the environment, which provides an affordable communication service. This process should be done without provoking an interference to the licensed users, called also primary users (PU) [
3].
In order to accomplish its promises, CR has to perform mainly four tasks such as
spectrum sensing, spectrum sharing, spectrum decision, and spectrum mobility [
4]. The primary task is spectrum sensing (SS), this activity is fundamental to detect PU presence and to determine if a spectrum space is occupied or empty. SS has been a widely studied topic, present in the literature with many different techniques, being most of them based on single band SS [
5]. However, future communications services require high data rates, which can be reached only by considering non-contiguous spectrum bands. The last means that single band SS algorithms should be improved to include multiple bands, this paradigm is called multiband spectrum sensing (MSS).
According to the literature, a branch of MSS techniques corresponds to wide-band spectrum sensing (WBSS) [
6]. At the same time, WBSS is divided into sub-categories, for example: wavelet-based spectrum sensing, compressive sensing, and angle-based spectrum sensing among others. Several important contributions related to MSS are mentioned in [
7,
8,
9]. All these methods and techniques are considered in order to improve the performance of SS and CR.
Authors of this paper presented a previous work describing how to detect efficiently PU presence by considering new alternative methods [
10], based on hybrid linear and non-linear techniques. In this contribution, a couple of MSS algorithms based on multiresolution analysis (MRA) and the Higuchi fractal dimension (HFD) were proposed and discussed. However, there are several basic issues which still represent a challenge, for example, the threshold setting for distinguishing PU presence or absence [
11] and the new paradigm to convert CR in an really smart entity [
12]. In [
10], the detection threshold of PUs was manually placed, derived from the results obtained with simulated signals. Nevertheless, considering the high variability of the spectrum occupancy, this option was not optimal. Therefore, in this paper, a new proposal is analyzed, reconsidering the way in which the CR should act to automatically place the optimal threshold while dynamically adapting it to follow this spectrum occupancy. To do so three different machine learning (ML) algorithms are proposed, implemented and compared, showing that they are useful and efficient techniques to detect occupied or empty bandwidth spaces in a multiband spectrum sensing scenario.
Previous works have included ML techniques in their CR proposals. In [
13], it is mentioned an overview of the ML techniques that have been used for different CR tasks. SS and MAC protocols have used reinforcement learning (RL) because is the optimal solution for Markov decision process and game theory-based learning. For signal classification and feature detection non-parametric learning, Dirichlet Process mixture model has been used, given that does not require prior knowledge about the number of mixture components. Artificial neural networks (NN) do not require prior knowledge of the distribution of the observed process. For the case of support vector machines (SVM) algorithm, which has better performance for small training examples compared to artificial NN, it requires prior knowledge of the distribution of the observed process and requires data labeling. For power allocation and rate adaptation, it is considered the theory-based learning strategy. Finally, for the reconfiguration of system parameters, the threshold learning is used, which is suitable for controlling specific parameters under uncertainty conditions with the restriction of training data.
Interesting works for CR and ML techniques are available in the literature. For example, in [
14] a cooperative spectrum sensing (CSS) scheme based on ML techniques applied to an energy vector is proposed, where each component is an energy level estimated at each CR device. Results show how CSS techniques, considering ML, are capable of implicitly learning from the surrounding environment. In [
15], an ML-based multiband spectrum sensing policy has been proposed using the greedy method to track the occupancy statistics of PUs and to estimate the detection performance of the SUs. The policy considering the greedy method can select those sub-bands which provide spectrum opportunities with high throughput for the secondary network. In [
16], a technique for sensing the primary radio signal in a cognitive environment using a learning algorithm based on artificial NN is analyzed. In [
17], a channel state predictor is implemented for multi-SU in a CR using NN. The Dirichlet process has been used as a framework for non-parametric Bayesian learning in CRs in [
18].
A contribution related to SS and ML appears in [
19], where a scheme based on the algorithm
K-nearest neighbors is proposed. The method includes the training and classification phase, and each user takes a decision that is processed in a fusion center. The results show advantages in the detection of PU compared to traditional methods. In [
20] the spectrum occupancy is analyzed by several supervised and unsupervised ML techniques, concluding that SVM is the best classification technique. Also, the SVM technique has shown good results in the allocation of resources such as power and channel, in cognitive radio networks [
21].
This work is organized as follows: in
Section 2, the theoretical bases of the implemented ML techniques are briefly presented. After, in
Section 3, a summary of the methodology of our previous work is described. Besides, in this same section, the new methodology considering the ML techniques is explained.
Section 4 shows the simulation environment and results. Finally,
Section 5 mentions the conclusion and a brief discussion.
3. ML-Based Methodology
First, it is presented a short summary of the technique developed by the authors in [
10]. Basically, this original methodology considers the multiresolution analysis (a wavelet-based dyadic filter bank) and the Higuchi fractal dimension to detect transmissions of PUs. The flowchart of the implemented methodology of this previous work is described in
Figure 2 where
represents the power spectral density in a wide frequency range or the received multiband spectrum by a SU.
This original methodology is described by the following steps:
Step 1. | The received multiband spectrum by a SU, , is decomposed via the MRA at defined level 3 with a Haar wavelet, giving the respective approximation and details coefficients. |
Step 2. | From the obtained approximation coefficients at level 4, the spectrum is reconstructed eliminating in this way the broadband noise and only keeping the tendency (or smooth shape ) of the multiband spectrum . |
Step 3. | The frequency edges locator is constructed by detecting the values changes of the same approximation coefficients passing through the threshold of 0.7, i.e., the approximation coefficients going from down to up of the 0.7 or vice versa. These changes will be the frequency edges necessary to construct the dynamic windows for further analysis. |
Step 4. | The same approximation coefficients obtained in Step 1 are normalized e interpolated (to have the same samples that the dynamic windows). With these normalized and interpolated approximation coefficients (NAC), each conformed window is then processed to detect noise or a possible PU transmission. If the NAC are, on average, under a defined threshold of 0.7 then the values of the analyzed windows is probably a PU transmission. If NAC is greater than 0.7 is practically sure that the transmission corresponds to noise. |
Step 5. | If NAC is greater than 0.7 then the Higuchi fractal dimension is applied directly on the analyzed section of the multiband spectrum . In the other case, the HFD is applied to the reconstructed signal from Step 2 (i.e., ). |
Step 6. | For each window, if the calculated HFD is lower than 1.85 (decision threshold) a PU transmission is detected. In another case, no PU is detected (only noise). |
The inclusion of ML techniques in the original methodology described above has the main goal to improve the detection process of PUs. Basically, the two first steps and the last one of the previous work remain the same, however, in this new approach the NAC are processed by ML techniques improving the detection process before applying the HFD, modifying the original methodology in Steps 3 and 4 (marked by a dashed red line). The threshold of 0.7 is modified with these ML techniques and instead of being fixed to a constant value, is adapted dynamically enhancing the frequency edges.
Figure 3 shows the introduction of this new block, and the red dashed line points out the place for ML techniques. All techniques, described in
Section 2, are implemented in this block. As a result, the frequency edges are improved and a Test window (TW) is used to determine the presence or absence of PUs instead of NAC directly (Step 5 also marked by a dashed red line).
Next, the implementation of each ML techniques is described starting with the training process for detection of PUs, and describing later how each technique is introduced in the original methodology.
3.1. Neural Network with Manual Threshold Setting
In this work, an NN is used as a classifier. This classifier uses the normalized approximation coefficients to determine the presence of PU. To make a better detection, the approximation coefficients for the signals with PU transmissions are rescaled in the interval of [0, 1], where 0 represents the coefficient with more power and 1 represents the coefficient with less power.
Figure 4 shows the implemented scheme for this ML technique.
First, the NN is trained based on a single frame from the whole wideband spectrum, i.e.,
and its MRA. The considered frame for training is chosen randomly but
must contain one or more PU transmission.
Figure 5a shows an example of the signal used for the NN training, while
Figure 5b represents the normalized and rescaled approximation coefficients, obtained from the MRA that will be used to train the NN. This step provides to the NN, information about frequency band appearance with and without PUs activities. To separate both classes (PUs or SUs), it is necessary to set an initial threshold before NN training. A
manual threshold was initially proposed, but this means that the threshold setting will depend on the criteria of an external user, making the process extremely unpredictable. However, for a signal with a large difference among coefficients (low noise), the threshold setting is not a big deal.
In
Figure 6, the user set the threshold at 0.6, and the NN was trained. In this figure, according to this
manual threshold, the approximation coefficients were classified and represented with 1 for noise and 0 for PUs, identifying correctly the PUs presence. Thus, the trend of coefficients is clear and helps, besides to separate both classes, to determine the frequency edges of a PU transmission. This occurs when a change is present from a coefficient associated to noise and the immediately next is a coefficient associated to a PU (or vice versa), as can be shown by the green circles in
Figure 6. These values (green circles) will permit to construct the dynamic windows (marked as W1,…,W5 in this case) that will be further processed individually to determine if the signal segment corresponds or not to a PU.
With the NN trained, now it is possible to apply this NN to other frames and obtain the frequency edges from the normalized and rescaled approximation coefficients. These frequency edges permit to build the dynamic windows. According to
Figure 3, prior to decide if applying the HFD to
or
, it is necessary to do the classification of the coefficients, establishing the “test signal” as the complete output resulting by the trained NN and the “test window” as the specific segments of the test signal associated to dynamic-sized windows. Steps 3 to 5 of the original methodology have been modified as:
Step 3. | A training frame is selected: the approximation coefficients are normalized and rescaled. These coefficients are used to train the NN with an initial threshold set by the user. After NN training, the normalized and rescaled approximation coefficients from another random analysis frames are obtained and evaluated by the trained NN, resulting in the test which contains the classification of coefficients (0 for a possible PU transmission and 1 for noise). |
Step 4. | The frequency edges and dynamic windows are determined from the output of the NN. The edges are the result of the change from one state to another (from one to zero and vice versa). |
Step 5. | If the test in each dynamic window (spectrum signal segment) corresponds to 1, it is practically sure that the transmission corresponds to noise, that means the HFD will be applied to . On the contrary case, the analyzed windows are highly probably a PU transmission and the HFD will be applied to . |
The result of this whole process is shown in
Figure 7. First, in
Figure 7a a real random multiband signal is presented, this signal is just an example to demonstrate the functionality of the methodology.
Figure 7b shows the classification of the approximation coefficients using the NN. Here, it is possible to appreciate the difference between coefficients associated with PU and noise. Finally, in
Figure 7c the result of the determination of the availability of a bandwidth space is indicated. In this figure, it is clear how the trained NN classifies the spectrum signal is occupied or empty.
3.2. Neural Network with an EM Threshold Setting
The NN training threshold that was used in
Section 3.1 depends on the criteria of the user. To improve it, an Expectation Maximization (EM) algorithm is included to select automatically and optimally the threshold.
Figure 8 shows the new block diagram including EM.
Figure 9 shows the normalized and rescaled approximation coefficients of a generated random multiband spectrum used to train the NN. When applying EM to these coefficients, two specific limits are obtained. The threshold is then selected randomly between these limits (a detailed explanation of this decision is explained in
Section 4.1).
In
Figure 10 the application of the EM algorithm is exemplified. Here, the first two classes are randomly chosen with Gaussian distribution (marked in green), the normalized and rescaled approximation coefficients are plotted on the X axis (marked with yellow bullets). The result of applying EM to these coefficients are the two Gaussians in blue, where it is clearly seen that they correspond to two groups that can be separated. The limits
and
are set at
and
when
since the probability of occurrence is
for each class and where (0.211, 0.1143) and (0.872, 0.0446) are the mean and standard deviation (STD) of Gaussians 1 and 2, respectively. Finally, the threshold is chosen randomly between
and
. The uncertainty between what the optimal value would be is clarified in
Section 4. When
means that the SNR is close to 0 dB. In this case,
and
are adjusted with
until
where the probability of occurrence for each
would be
.
In the case of the analyzed example (
Figure 9), the threshold is set to 0.654 (
Figure 10). Applying this threshold to a training signal allows the classification of coefficients and the determination of frequency edges that facilitate the building of the respective dynamic windows as it is shown in
Figure 11. This improvement only modifies Step 3:
Step 3. | A training frame is selected: the approximation coefficients are normalized and rescaled. These coefficients are used to train the NN where coefficients will be classified and two limits ( and ) estimated by the EM algorithm. Then, a random value between and is selected as threshold. |
| After NN training, the normalized and rescaled approximation coefficients from another random analysis frames are obtained and evaluated by the trained NN, resulting in the test which contains the classification of coefficients (0 for a PU transmission and 1 for noise). |
The result of applying this technique is shown in
Figure 12. Here, a multiband random signal is used to determine its states of occupancy based on the mentioned trained NN clearly detecting the presence of PUs.
3.3. Methodology Using a K-Means Classifier
Another unsupervised method used in this work as a classifier of the approximation coefficients from a random multiband spectrum is the
K-means technique. In order to determine the multiband availability of the spectrum signal, the approximation coefficients, normalized and rescaled, are first classified with
K-means. The flowchart of this process is shown in
Figure 13.
In this technique, the objective is to classify the approximation coefficients into 2 groups, one inferring the PU transmission and one corresponding to the noise, when the multiband spectrum contains PUs transmissions. On the other hand, they must be classified in a single group when the same radio-electric space contains only noise. However, one of the disadvantages found in
K-means is that it is necessary to indicate the number of clusters that are expected, which introduces a difficulty since the frames that are evaluated by the algorithm are random. Then, to indicate how many clusters the
K-means algorithm needs, it is necessary a prior analysis of the behavior of
. As it is shown in
Figure 13, the possible presence of a PU in the signal
is first evaluated setting a simple energy detector at −90 dBm. If there is no detection, the number of clusters is set to 1. On the other hand, if some transmission exceeds the threshold, we have three possible cases which are solved with a small analysis of bandwidth:
- Case 1:
impulsive noise in the signal. Owing to the small bandwidth of this anomaly, i.e., less than 7 samples * 0.1 [MHz], the number of clusters chosen is still 1.
- Case 2:
possible PU transmissions in the signal. With the understanding that a transmission has at least 7 samples * 0.1 [MHz] then the number of clusters will be 2.
- Case 3:
impulsive noise and possible PU transmissions coexisting in the frame. In this case, when locating that there is a possible transmission with at least 7 samples * 0.1 [MHz], that means the chosen number of clusters will be 2.
The methodology is modified in Steps 3 and 4, regarding the proposed steps in
Section 3.1 as follows:
Step 3. | A priori analysis directly on the approximation coefficients to select the number of clusters is done: If the reconstructed signal () does not exceed −90 dBm, the cluster number will be 1 (only noise). Else, the bandwidth of the signals that exceeded this threshold is studied (3 cases mentioned before). To confirm that it is not impulsive noise (2 clusters). |
| Then, the normalized and rescaled approximation coefficients from another random analysis frames are obtained and evaluated by the K-means algorithm, resulting in the test which contains the classification of coefficients (0 for a PU transmission and 1 for noise). |
Step 4. | The frequency edges and dynamic windows are determined from the output of the classifier. The edges are the result of the change from one state to another (from one to zero and vice versa). |
The result of applying
K-means to coefficients is shown in
Figure 14. In
Figure 14a we can observe how dynamic windows and the frequency edges are chosen. In
Figure 14a, the clustering is given in two groups where the presence of PUs exists. In
Figure 14b, it is shown the power of coefficients in Y-axis, where 1 corresponds to low power (bullets in red color) and 0 to a higher power (bullets in color blue).
K-means classifies correctly the given the approximation coefficients, normalized and rescaled, of a random multiband spectrum.
The result of applying
K-means to the multiband spectrum monitoring technique using the technique as a classifier is shown in
Figure 15, where
Figure 15a corresponds to a randomly generated multiband spectrum, while
Figure 15b shows the occupation along the frequency, result of applying the complete methodology.
5. Conclusions
In this work, the frequency edges detection phase, mentioned in the methodology proposed in [
10], was improved based on ML techniques. First, a NN with a manual threshold in the training phase was implemented, allowing a more accurate classification of the approximation coefficients. Similarly, applying EM to NN contributes to increase the effectiveness of the training phase. Besides this technique avoids the intervention of another user to set a manual threshold of the NN training. That is, we passed from a supervised technique to a fully automated algorithm.
From the results of the phase of detection of frequency edges and PS to detect a PU presence correctly, we can conclude that K-means is the best ML technique analyzed in this work. It is also important to remark that an improvement in the detection, with signals in a noisy environment, is observed. Additionally, this method does not require a great computational complexity, comparing with an NN that requires a more advanced hardware power.
Throughout the different simulations, it has been perceived that the precision does not depend only on the used ML technique nor on the chosen method of spectrum sensing, it also depends on the number of samples of the signal to be evaluated. Indeed, given that processed elements are not directly the samples of the spectrum signal
but its approximation coefficients (obtained from the multiresolution analysis), that means the number of points of the signal
is reduced by
where
is the level of decomposition in the MRA. Hence, it is noteworthy that the proposed methodologies were tested on signals recovered from the work environment that only has 461 samples, which means that only 57 approximation coefficients will be obtained. Even though this number of samples is quite small for a multiband environment, the results of the methodology implemented in this work are quite good. As part of future work, the complete methodology considering the ML techniques are thought to be implemented in a software defined radio platform. Also, to get an accuracy description of proposed algorithms where parameters as evacuation time can be measured, a cooperative cognitive radio network is going to be developed [
27].