# A Cognitive Radio Spectrum Sensing Method for an OFDM Signal Based on Deep Learning and Cycle Spectrum

Authors: Guangliang Pan; Jun Li; Fei Lin
Journal: International Journal of Digital Multimedia Broadcasting
 (2020)

---

## Abstract

In a cognitive radio network (CRN), spectrum sensing is an important prerequisite for improving the utilization of spectrum resources. In this paper, we propose a novel spectrum sensing method based on deep learning and cycle spectrum, which applies the advantage of the convolutional neural network (CNN) in an image to the spectrum sensing of an orthogonal frequency division multiplex (OFDM) signal. Firstly, we analyze the cyclic autocorrelation of an OFDM signal and the cyclic spectrum obtained by the time domain smoothing fast Fourier transformation (FFT) accumulation algorithm (FAM), and the cyclic spectrum is normalized to gray scale processing to form a cyclic autocorrelation gray scale image. Then, we learn the deep features of layer-by-layer extraction by the improved CNN classic LeNet-5 model. Finally, we input the test set to verify the trained CNN model. Simulation experiments show that this method can complete the spectrum sensing task by taking advantage of the cycle spectrum, which has better spectrum sensing performance for OFDM signals under a low signal-noise ratio (SNR) than traditional methods.


---

## Body

## 1. Introduction

The emergence of the fifth-generation mobile communication network (5G) [1] has greatly promoted the development of broadband wireless communication [2], and orthogonal frequency division multiplex (OFDM) is one of the popular physical transmission technologies for wireless communication [3, 4]. Many of its characteristics meet the requirements of cognitive radio (CR) [5–7]. Therefore, OFDM is the preferred technology for CR communication. As the core technology of the cognitive radio network (CRN), spectrum sensing can improve spectrum utilization and alleviate spectrum resources [8–10]. Traditional spectrum sensing is mainly done by mathematical methods of signal processing, including energy detection [11], matched filter detection [12], and cyclostationary feature detection [13]. [14] proposed a spectrum sensing method based on correlation detection, the correlation of cyclic prefix (CP) was used in OFDM, and the sampled data was subjected to correlation operation. In [15], the signal and noise were estimated simultaneously by the time domain correlation function, and the estimated threshold was continuously adjusted by the estimated value to complete the spectrum sensing of an OFDM signal. In [16], the received autocorrelation function was estimated at each OFDM symbol of its symbol period, and then, the multivariate statistical theory was used to calculate the judgment amount and the decision threshold. Finally, the judgment amount and the decision threshold were compared to obtain the judgment result. In the face of complex wireless network communication environments, these methods cannot meet the needs of spectrum sensing. In [17], focusing on classifying different OFDM signals, authors proposed a two-step detection and identification method. However, this method is not combined with the deep learning model, and the spectrum sensing performance is general.The contributions of this paper are summarized as follows:(i)
We analyze the cyclic autocorrelation of an OFDM signal, using the time domain smoothing fast Fourier transformation (FFT) accumulation algorithm (FAM) to achieve cyclic spectrum and transforming the spectrum sensing problem into an image processing and recognition problem
(ii)
We convert the cyclic spectrum into a gray scale image, transforming the spectral perception problem into an image processing problem
(iii)
We adopt an improved CNN based on LeNet-5 to generate a spectrum sensing model to complete spectrum sensingThe remainder of the paper is organized as follows. Section2 introduces the related work. Section 3 analyzes the cyclic autocorrelation of an OFDM signal, and cyclic spectrum is obtained by the FAM algorithm, which is converted to a gray scale image. Section 4 presents the OFDM spectrum sensing model designs based on the improved CNN classical structure LeNet-5. Section 5 carries out simulation experiments and performance evaluation on the proposed new method. In the end, we conclude this article in Section 6.


## 2. Related Work

The existing spectrum sensing methods mainly use the neural network as a classifier, and the data set is a complex feature statistic, and the sensing effect is not ideal [18–21]. [22] proposed multigene genetic programming- (MGGP-) based feature engineering was conducted to transform the cumulants of the received signals into highly discriminative features, and then, authors use a logistic regression classifier to achieve classification of overlapping signal modulation. [23] presented a study about the possibility of implementing approximations to the Neyman-Pearson (NP) detector with C-Support Vector Machines (C-SVM) and 2C-SVM. It was based on obtaining the functions that these learning machines approximate to after training to minimize the empirical risk, and on the possible implementation of the NP detector with these approximated functions. In [24], authors tested the application of deep neural networks to the automatic modulation classification in AWGN and flat-fading channel. Three training inputs were used: (1) in-phase and quadrature (I-Q) constellation points, (2) the centroids of constellation points employing the fuzzy C-means algorithm to I-Q diagrams, and (3) the high-order cumulants of received samples. The unsupervised learning from these data sets was done using the sparse autoencoders, and a supervised Soft-max classifier was employed for the classification. The above intelligent algorithms are limited to long training time and only propose applications in signal recognition and classification, which are not applicable in spectrum sensing.


## 3. Spectrum Sensing and Cyclic Spectrum

### 3.1. OFDM Cyclic Autocorrelation and FAM Algorithm

Targeting the OFDM signal model, the equivalent baseband signal can be expressed as(1)st=∑i=0N−1diexpj2πiTt,where t∈0,T.After OFDM signals pass through AWGN channel, the complex baseband signal is obtained as(2)rt=st+ht,where ht represents zero mean white noise.The OFDM signal model is obtained as(3)xt=∑k∑l=0G−1ck,lpt−lTc−kTs,where G represents the total length of OFDM signal, Tc represents the chip time, Ts represents the effective period, pt represents the rectangular pulse, ck,l represents the lth sampling point of the kth OFDM symbol inserted into CP.The time domain expression can be followed as(4)ck,l=1N∑n=0N−1ak,nexpj2πl−DnN,where N represents the effective length and D represents the length of inserted l=0,1,⋯,G−1. ak,n represents the modulated data on the nth subcarrier of the kth OFDM signal in the frequency domain, n=0,1,⋯,N−1.In thekth OFDM symbol of the signal, the autocorrelation of the time domain data ck,l with delay sample point nτ0≤nτ≤N can be followed as
(5)Eck,l,ck,l−nτ∗=1N∑n=0N−1Eak,n,ak,n∗expj2πl−DnN−j2πl−nτ−DnN=σa2N∑n=0N−1expj2πnτnN=σa2,nτ=0,N,0,nτ=others.Regardless of other interference factors, the correlation function from equation (3) is
(6)Rxt,τ=Extx∗t−τ=∑kE∑l=0G−1ck,lpt−lTc−kTs∑l=0G−1ck,l−nτ∗p∗t−lTc−kTs−τ,where τ=nτTc.Inserting the CP introduces the correlation characteristic. It can be known from equation (6) that the OFDM signal has two cycle periods: the small period is Tc and the large period is Ts, and the expression can be followed as
(7)Rxt,τ=σa2∑k∑l=0G−1pt−lTc−kTsp∗t−lTc−kTs−τ,τ<Tc,σa2∑k∑l=NG−1pt−lTc−kTsp∗t−lTc−kTs−τN,τN<Tc,0,τ=others,where τN=∣τ∣−NTc.It is proved from the above that the OFDM signal has cyclic characteristics,Rxt,τ has periodicity, and further Rxt,τ pairs do discrete Fourier transform (DFT), the expression can be expressed as
(8)Rxατ=σa2TcsinπαTc−∣τ∣πα,α=mTc,τ≤Tc,m∈Z,σa2TssinπαTcDsinπαTcsinπαTc−τNπα,α=mTs,τN≤Tc,m∈Z,0,τ=others,where α represents the cycle frequency.It can be seen from the above that the OFDM signal has second-order cyclostationary characteristics. The OFDM signal has two cycles ofTc and Ts, and Rxt,τ has periodicity. According to the nature of Fourier transform, the Fourier transform of t will appear discrete spectrum line at α=m/Tc and α=m/Ts.We implement the cyclic spectrum by FAM algorithm. The flow of the implementation steps of algorithm can be shown in Figure1.Figure 1
Process.Through the above cyclic autocorrelation analysis, the FAM algorithm is used to simulate in simulation software, and simulation parameters are shown in Table1.Table 1
Simulation experiment parameters.
Parameters
Data
Number of OFDM in one frame
20
Number of subcarriers (N)
128
Proportion of cyclic prefix
1/4
Symbol rate
12.5 kbps
Carrier frequency
1×106 Hz
Sampling frequency
4×107 Hz
Chip rate
5×105 Hz
Smooth points
20
Cyclic frequency resolution
2×106 HzThe three-dimensional cyclic spectrum of OFDM underH0 (H0: it represents the absence of OFDM signal; that is, the authorized user does not exist.) and H1 (H1: it represents the presence of OFDM signal, that is, the presence of authorized users.) are obtained, as shown in Figures 2 and 3.Figure 2
Cycle spectrumH0.Figure 3
Cycle spectrumH1.


### 3.2. Spectrum Sensing Model

The CR user discovers and utilizes opportunistically the available spectrum opportunities to access dynamically the idle licensed spectrum. According to the available spectrum opportunities of CR users, the CR spectrum perception can be defined as a binary hypothesis model as follows:(9)yt=nt,H0,gst+nt,H1.The binary hypothesis model has false alarm errorsPf and missed detection errors Pm, which are represented by false alarm probability and missed detection probability as follows:
(10)Pf=PrY>λ∣H0,Pm=PrY<λ∣H1,where Y represents the decision statistic and λ represents the threshold. According to the NP criterion, in order to improve the spectrum sensing performance of CR users, it is necessary to reduce Pm as much as possible under certain Pf constraints.The three-dimensional cyclic spectrum is normalized and gradated, and a two-dimensional cyclic autocorrelation gray map containing Gaussian white noise underH0 and H1 are obtained, as shown in Figures 4 and 5.Figure 4
Gray scale imageH0.Figure 5
Gray scale imageH1.The gray value is used to represent the size of the autocorrelation value (the gray value is positively correlated with the autocorrelation value). According to the distribution of two-dimensional gray map underH0 and H1, it has four peaks under H1, which can map the spectrum perception to image processing [25].


## 3.1. OFDM Cyclic Autocorrelation and FAM Algorithm

Targeting the OFDM signal model, the equivalent baseband signal can be expressed as(1)st=∑i=0N−1diexpj2πiTt,where t∈0,T.After OFDM signals pass through AWGN channel, the complex baseband signal is obtained as(2)rt=st+ht,where ht represents zero mean white noise.The OFDM signal model is obtained as(3)xt=∑k∑l=0G−1ck,lpt−lTc−kTs,where G represents the total length of OFDM signal, Tc represents the chip time, Ts represents the effective period, pt represents the rectangular pulse, ck,l represents the lth sampling point of the kth OFDM symbol inserted into CP.The time domain expression can be followed as(4)ck,l=1N∑n=0N−1ak,nexpj2πl−DnN,where N represents the effective length and D represents the length of inserted l=0,1,⋯,G−1. ak,n represents the modulated data on the nth subcarrier of the kth OFDM signal in the frequency domain, n=0,1,⋯,N−1.In thekth OFDM symbol of the signal, the autocorrelation of the time domain data ck,l with delay sample point nτ0≤nτ≤N can be followed as
(5)Eck,l,ck,l−nτ∗=1N∑n=0N−1Eak,n,ak,n∗expj2πl−DnN−j2πl−nτ−DnN=σa2N∑n=0N−1expj2πnτnN=σa2,nτ=0,N,0,nτ=others.Regardless of other interference factors, the correlation function from equation (3) is
(6)Rxt,τ=Extx∗t−τ=∑kE∑l=0G−1ck,lpt−lTc−kTs∑l=0G−1ck,l−nτ∗p∗t−lTc−kTs−τ,where τ=nτTc.Inserting the CP introduces the correlation characteristic. It can be known from equation (6) that the OFDM signal has two cycle periods: the small period is Tc and the large period is Ts, and the expression can be followed as
(7)Rxt,τ=σa2∑k∑l=0G−1pt−lTc−kTsp∗t−lTc−kTs−τ,τ<Tc,σa2∑k∑l=NG−1pt−lTc−kTsp∗t−lTc−kTs−τN,τN<Tc,0,τ=others,where τN=∣τ∣−NTc.It is proved from the above that the OFDM signal has cyclic characteristics,Rxt,τ has periodicity, and further Rxt,τ pairs do discrete Fourier transform (DFT), the expression can be expressed as
(8)Rxατ=σa2TcsinπαTc−∣τ∣πα,α=mTc,τ≤Tc,m∈Z,σa2TssinπαTcDsinπαTcsinπαTc−τNπα,α=mTs,τN≤Tc,m∈Z,0,τ=others,where α represents the cycle frequency.It can be seen from the above that the OFDM signal has second-order cyclostationary characteristics. The OFDM signal has two cycles ofTc and Ts, and Rxt,τ has periodicity. According to the nature of Fourier transform, the Fourier transform of t will appear discrete spectrum line at α=m/Tc and α=m/Ts.We implement the cyclic spectrum by FAM algorithm. The flow of the implementation steps of algorithm can be shown in Figure1.Figure 1
Process.Through the above cyclic autocorrelation analysis, the FAM algorithm is used to simulate in simulation software, and simulation parameters are shown in Table1.Table 1
Simulation experiment parameters.
Parameters
Data
Number of OFDM in one frame
20
Number of subcarriers (N)
128
Proportion of cyclic prefix
1/4
Symbol rate
12.5 kbps
Carrier frequency
1×106 Hz
Sampling frequency
4×107 Hz
Chip rate
5×105 Hz
Smooth points
20
Cyclic frequency resolution
2×106 HzThe three-dimensional cyclic spectrum of OFDM underH0 (H0: it represents the absence of OFDM signal; that is, the authorized user does not exist.) and H1 (H1: it represents the presence of OFDM signal, that is, the presence of authorized users.) are obtained, as shown in Figures 2 and 3.Figure 2
Cycle spectrumH0.Figure 3
Cycle spectrumH1.


## 3.2. Spectrum Sensing Model

The CR user discovers and utilizes opportunistically the available spectrum opportunities to access dynamically the idle licensed spectrum. According to the available spectrum opportunities of CR users, the CR spectrum perception can be defined as a binary hypothesis model as follows:(9)yt=nt,H0,gst+nt,H1.The binary hypothesis model has false alarm errorsPf and missed detection errors Pm, which are represented by false alarm probability and missed detection probability as follows:
(10)Pf=PrY>λ∣H0,Pm=PrY<λ∣H1,where Y represents the decision statistic and λ represents the threshold. According to the NP criterion, in order to improve the spectrum sensing performance of CR users, it is necessary to reduce Pm as much as possible under certain Pf constraints.The three-dimensional cyclic spectrum is normalized and gradated, and a two-dimensional cyclic autocorrelation gray map containing Gaussian white noise underH0 and H1 are obtained, as shown in Figures 4 and 5.Figure 4
Gray scale imageH0.Figure 5
Gray scale imageH1.The gray value is used to represent the size of the autocorrelation value (the gray value is positively correlated with the autocorrelation value). According to the distribution of two-dimensional gray map underH0 and H1, it has four peaks under H1, which can map the spectrum perception to image processing [25].


## 4. Method

### 4.1. CNN Design

The spectrum sensing of OFDM signal is completed by the deep learning framework, and the implementation framework is shown in Figure6, which is divided into a model training process and a model testing process.Figure 6
The framework of spectrum sensing.CNN is a model of deep learning. It has the characteristics of local connection and parameter sharing. It has strong advantages in image processing. LeNet-5 model is a classic model of CNN. We change the input of the LeNet-5 model to gray scale image of36∗36 and change the size of the convolution kernel and sampling window. Spectrum sensing depends on the spectrum occupancy of authorized users, changes the output to 2 neurons, and converts to binary classification; label 0 represents H0, and label 1 represents H1. An improved LeNet-5 model for spectrum sensing is shown in Figure 7.Figure 7
Improved structural model of CNN.


### 4.2. Train and Test

The CNN based on the improved LeNet-5 model is trained by the error back propagation (BP) algorithm. The training process of BP algorithm is divided into forward calculation of data, back propagation of error, and update of weight.δk represents the partial derivative of input layer error for this layer, which is called sensitivity [26].For forward calculation of data, the hidden layer output values are defined as(11)ahH=WhH×Xi,bhH=fahH,where WhH represents the weight of layer H, Xi represents the current node input, and f· represents the current layer activation function.The output layer output values are defined as(12)ak=∑Whk×bhH.In Tensorflow, the one-hot method is usually used for error back propagation and weight update. The cross entropy function is defined as(13)lossc=−ylogfx.The output layer feeds back to the reverse derivation of the fully connected layer. According to the one-hot method, only one value is 1 and the rest is 0. The cross entropy can be followed as(14)lossfx,y=−∑ylogfx=−0×logfx1+⋯+1×logfxn=−logfxn.Loss value is as follows:(15)loss=−y−logfx.Lety=1 get
(16)loss=−1−logfx.The output layer uses Soft-max, and the formula for the full connection layer weight update is as follows:(17)δlossδW=−1m×1−fxf′x+λW.The pooled layer feeds back to the reverse derivation of the convolutional layer, and its convolutional layer sensitivity can be followed as(18)δjl=poolδjl+1∗h′ajl,where ∗ represents the dot multiplication. The convolutional layer feeds back to the reverse derivation of pooling layer, assuming that l is a pooling layer, l+1 is a convolutional layer, and the convolutional layer has m features, and the sum of pooling layer sensitivity can be followed as
(19)δjl=∑jmδjl+1⊙Kij,where ⊙ represents a convolution operation. The sensitivity is obtained by the above calculation, and then, weights and offsets in the CNN can be followed as
(20)δlossδWij=Xiδji+1,δlossδbij=Σδji+1.After BP algorithm trains CNN, it is verified by the test set.We takeN pairs of test sets x1,y1,x2,y2,⋯,xi,yi, and the difference between the predicted value and the true value can be followed as
(21)Ω=YW,bxi−yi,where YW,bxi represents the output value of last layer of CNN model, W represents the weight, b represents the offset.Then, the accuracy of this test set is obtained as(22)Accuracy=nN,where n represents the number of tests meeting the Ω<Ωth condition.It can be seen from equation (22) that the higher accuracy, the better performance of spectrum sensing.


## 4.1. CNN Design

The spectrum sensing of OFDM signal is completed by the deep learning framework, and the implementation framework is shown in Figure6, which is divided into a model training process and a model testing process.Figure 6
The framework of spectrum sensing.CNN is a model of deep learning. It has the characteristics of local connection and parameter sharing. It has strong advantages in image processing. LeNet-5 model is a classic model of CNN. We change the input of the LeNet-5 model to gray scale image of36∗36 and change the size of the convolution kernel and sampling window. Spectrum sensing depends on the spectrum occupancy of authorized users, changes the output to 2 neurons, and converts to binary classification; label 0 represents H0, and label 1 represents H1. An improved LeNet-5 model for spectrum sensing is shown in Figure 7.Figure 7
Improved structural model of CNN.


## 4.2. Train and Test

The CNN based on the improved LeNet-5 model is trained by the error back propagation (BP) algorithm. The training process of BP algorithm is divided into forward calculation of data, back propagation of error, and update of weight.δk represents the partial derivative of input layer error for this layer, which is called sensitivity [26].For forward calculation of data, the hidden layer output values are defined as(11)ahH=WhH×Xi,bhH=fahH,where WhH represents the weight of layer H, Xi represents the current node input, and f· represents the current layer activation function.The output layer output values are defined as(12)ak=∑Whk×bhH.In Tensorflow, the one-hot method is usually used for error back propagation and weight update. The cross entropy function is defined as(13)lossc=−ylogfx.The output layer feeds back to the reverse derivation of the fully connected layer. According to the one-hot method, only one value is 1 and the rest is 0. The cross entropy can be followed as(14)lossfx,y=−∑ylogfx=−0×logfx1+⋯+1×logfxn=−logfxn.Loss value is as follows:(15)loss=−y−logfx.Lety=1 get
(16)loss=−1−logfx.The output layer uses Soft-max, and the formula for the full connection layer weight update is as follows:(17)δlossδW=−1m×1−fxf′x+λW.The pooled layer feeds back to the reverse derivation of the convolutional layer, and its convolutional layer sensitivity can be followed as(18)δjl=poolδjl+1∗h′ajl,where ∗ represents the dot multiplication. The convolutional layer feeds back to the reverse derivation of pooling layer, assuming that l is a pooling layer, l+1 is a convolutional layer, and the convolutional layer has m features, and the sum of pooling layer sensitivity can be followed as
(19)δjl=∑jmδjl+1⊙Kij,where ⊙ represents a convolution operation. The sensitivity is obtained by the above calculation, and then, weights and offsets in the CNN can be followed as
(20)δlossδWij=Xiδji+1,δlossδbij=Σδji+1.After BP algorithm trains CNN, it is verified by the test set.We takeN pairs of test sets x1,y1,x2,y2,⋯,xi,yi, and the difference between the predicted value and the true value can be followed as
(21)Ω=YW,bxi−yi,where YW,bxi represents the output value of last layer of CNN model, W represents the weight, b represents the offset.Then, the accuracy of this test set is obtained as(22)Accuracy=nN,where n represents the number of tests meeting the Ω<Ωth condition.It can be seen from equation (22) that the higher accuracy, the better performance of spectrum sensing.


## 5. Experiment and Analysis

This section simulates the performance evaluation of proposed spectrum sensing method to verify its feasibility. The OFDM frame is built in simulation software, and the OFDM signal is generated by the analog transmitter.As shown in Table2, labels 0 and 1 denote the state of channel as idle and busy, respectively. The balance of positive and negative samples is 1 : 1. The channel setting is referenced [27]. After through the Rayleigh fading channel and the Gaussian white noise channel, the data sampled by receiving end is preprocessed according to the second section. We complete the train and test of model in TensorFlow deep learning framework. The performance of spectrum sensing is determined by two aspects. On the one hand, it is evaluated by Pf and Pm mentioned in the second section, and the probability of detection PdPd=1−Pm is derived from Pm. On the other hand, it is evaluated by the training time and test time of CNN, which is the efficiency of perception. The parameter settings of CNN are shown in Table 3.Table 2
Data set.
Type
Label
Effective sample
Train set
0
2000
1
2000
Test set
0
200
1
200Table 3
CNN parameter setting.
Parameter
Value
Training set
4000 (36×36)
Test set
400 (36×36)
Number of network layers (N)
6
Activation function
Sigmoid
Learning efficiency (α)
0.001
Weight fading factor (λ)
0.1
Test error threshold (Ωth)
0.05
Minibatch
20


### 5.1. Analysis of the CNN Model

Since the structure of CNN model will affect training and test results, the detection rate of spectrum sensing will change.By modifying the size of convolution kernel, we design five different CNN structures, the input data set remains unchanged. The different layer structure can be shown in Table4. The CNN models of five different structures are trained under the same training set and test set as in Table 3. Under the same training times, the accuracy and total loss (cross entropy loss and regularization loss) of the training process of five different structures CNN model are statistically analyzed. The performance curve can be shown in Figures 8 and 9.Table 4
Design CNN with 5 different network structures.
C1
S2
C3
S4
C5
Num
Con-kernel
Output
S-window
Output
Con-kernel
Output
S-window
Output
Con-kernel
Output
1
3×3×6
34×34×6
2×2
17×17×6
3×3×16
15×15×16
2×2
8×8×16
8×8×120
1×1×120
2
4×4×6
33×33×6
2×2
17×17×6
4×4×16
14×14×16
2×2
7×7×16
7×7×120
1×1×120
3
5×5×6
32×32×6
2×2
16×16×6
5×5×16
12×12×16
2×2
6×6×16
6×6×120
1×1×120
4
6×6×6
31×31×6
2×2
16×16×6
6×6×16
11×11×16
2×2
6×6×16
6×6×120
1×1×120
5
7×7×6
30×30×6
2×2
15×15×6
7×7×16
9×9×16
2×2
5×5×16
5×5×120
1×1×120Figure 8
Fitting process for accuracy.Figure 9
Fitting process for loss.It can be seen from Figure8 that under the maximum pooling aggregation mode, as the number of training increases, the robustness of five different CNN structures are continuously enhanced, when the number of training is 10001 (more the optimization effect of high training times will be better, but this paper only takes 10001 times and has no effect on the research problem). No. 3 and no. 4 are the best relative to other three structures, and the actual training accuracy is 0.96. Meanwhile, the total loss corresponding to No. 3 and no. 4 is the lowest as seen in Figure 9.


### 5.2. Performance Comparison Analysis of Algorithms

[22] uses logistic regression to distinguish signals, and [23] uses SVM to achieve radar signal recognition. Our method is compared with these two machine learning algorithms. The signal is set to Gaussian white noise signal and OFDM signal. Under different sample sizes (90% of the data is used for training, and 10% of the data is used for testing), we adopt the same data set, and the Performance of three algorithms are shown in Table 5.Table 5
Comparison of three algorithms.
CNN
Logistic regression
SVM
Data set
Pd
Pf
Tr-time (s)
T-time (s)
Pd
Pf
Tr-time (s)
T-time (s)
Pd
Pf
Tr-time (s)
T-time (s)
1000
0.9478
0.0821
5.3831
0.3841
0.6387
0.1728
178.43
17.8
0.8221
0.0982
361.42
29.2
2000
0.9492
0.0722
8.6242
0.6235
0.6525
0.1572
243.32
23.2
0.8292
0.0923
543.31
43.5
3000
0.9539
0.0632
10.4253
0.8212
0.6693
0.1384
301.21
29.3
0.8504
0.0951
742.83
59.8
4000
0.9578
0.0615
12.1235
0.9343
0.6852
0.1253
362.43
37.2
0.8525
0.0942
978.56
78.4
5000
0.9632
0.0523
13.2121
1.0215
0.6971
0.1132
415.37
48.5
0.8532
0.0965
1021.35
87.5
6000
0.9689
0.0494
14.5236
1.1245
0.7135
0.1012
523.41
56.1
0.8551
0.0937
1156.53
96.4It can be seen from Table5 that the CNN spectrum sensing method has obvious advantages in terms of various performances compared with others. The CNN is better than other two algorithms in image classification processing. The machine learning algorithm is good, and the OFDM cyclic spectrum feature is more suitable for CNN. For the test time of 100 samples is 0.3841, the test time of a single sample is within the range allowed by spectrum sensing. Our method can meet the needs of spectrum sensing.The training set and test set of OFDM signals are obtained through different SNR channels in the simulation platform. The logistic regression, SVM, and deep learning OFDM (DP-OFDM) spectrum sensing model are used for training and testing, and the error thresholdΩth is adjusted to obtain the detection probability. As described in [28], a cyclic feature detection method based on compressed sensing, such as [11] proposed the energy detection method, and [15] proposed the autocorrelation detection method. Under the condition of false alarm probability Pf=0.05, the corresponding decision thresholds are set for each of the above methods, and the above methods are simulated in the simulation platform, respectively. The performance comparison of the detection probability can be shown in Figure 10.Figure 10
Probability of detection versus SNR for various detection algorithmsPf=0.05.It can be seen from Figure10 that under the condition of Pf, we propose DP-OFDM spectrum sensing method is superior to the logistic regression and SVM algorithms. The same training set and test set are used in different SNR environments, which are less affected by noise. Below −10 dB, the detection probability of CNN is better than traditional spectrum sensing algorithms, which indicates that our method has better spectrum sensing performance under low SNR. Under the condition of high SNR, the traditional spectrum sensing algorithms have obvious performance advantages, indicating that the traditional spectrum sensing algorithms still have strong advantages under high SNR. Compressed sensing-based loop feature detection is comparable to the algorithm detection performance of this paper, but the algorithm of this paper is more advantageous. The detection rate of the traditional spectrum sensing algorithm is greatly affected by SNR, especially when SNR is below −6 dB.As can be seen from Section2, performance indicator for improving spectrum sensing is Pf. Under SNR is −12 dB, the receiver operating characteristic (ROC) curve of Pd changing with Pf is plotted by different detection algorithms, which can be shown in Figure 11.Figure 11
ROC curves of different spectral sensing methodsPd with PfSNR=−12dB.It can be seen from Figure11 that the detection probability of energy detection algorithm is the lowest. The detection probability of DP-OFDM detection method is significantly higher than traditional spectrum sensing algorithms and has a stronger advantage than the two machine learning algorithms of logistic regression and SVM. The extracted autocorrelation feature of OFDM cycle can reflect the characteristics of spectrum, which is more suitable as the input of CNN model. It also shows that CNN has more powerful learning ability than other machine learning algorithms, and spectrum sensing effect is better.


## 5.1. Analysis of the CNN Model

Since the structure of CNN model will affect training and test results, the detection rate of spectrum sensing will change.By modifying the size of convolution kernel, we design five different CNN structures, the input data set remains unchanged. The different layer structure can be shown in Table4. The CNN models of five different structures are trained under the same training set and test set as in Table 3. Under the same training times, the accuracy and total loss (cross entropy loss and regularization loss) of the training process of five different structures CNN model are statistically analyzed. The performance curve can be shown in Figures 8 and 9.Table 4
Design CNN with 5 different network structures.
C1
S2
C3
S4
C5
Num
Con-kernel
Output
S-window
Output
Con-kernel
Output
S-window
Output
Con-kernel
Output
1
3×3×6
34×34×6
2×2
17×17×6
3×3×16
15×15×16
2×2
8×8×16
8×8×120
1×1×120
2
4×4×6
33×33×6
2×2
17×17×6
4×4×16
14×14×16
2×2
7×7×16
7×7×120
1×1×120
3
5×5×6
32×32×6
2×2
16×16×6
5×5×16
12×12×16
2×2
6×6×16
6×6×120
1×1×120
4
6×6×6
31×31×6
2×2
16×16×6
6×6×16
11×11×16
2×2
6×6×16
6×6×120
1×1×120
5
7×7×6
30×30×6
2×2
15×15×6
7×7×16
9×9×16
2×2
5×5×16
5×5×120
1×1×120Figure 8
Fitting process for accuracy.Figure 9
Fitting process for loss.It can be seen from Figure8 that under the maximum pooling aggregation mode, as the number of training increases, the robustness of five different CNN structures are continuously enhanced, when the number of training is 10001 (more the optimization effect of high training times will be better, but this paper only takes 10001 times and has no effect on the research problem). No. 3 and no. 4 are the best relative to other three structures, and the actual training accuracy is 0.96. Meanwhile, the total loss corresponding to No. 3 and no. 4 is the lowest as seen in Figure 9.


## 5.2. Performance Comparison Analysis of Algorithms

[22] uses logistic regression to distinguish signals, and [23] uses SVM to achieve radar signal recognition. Our method is compared with these two machine learning algorithms. The signal is set to Gaussian white noise signal and OFDM signal. Under different sample sizes (90% of the data is used for training, and 10% of the data is used for testing), we adopt the same data set, and the Performance of three algorithms are shown in Table 5.Table 5
Comparison of three algorithms.
CNN
Logistic regression
SVM
Data set
Pd
Pf
Tr-time (s)
T-time (s)
Pd
Pf
Tr-time (s)
T-time (s)
Pd
Pf
Tr-time (s)
T-time (s)
1000
0.9478
0.0821
5.3831
0.3841
0.6387
0.1728
178.43
17.8
0.8221
0.0982
361.42
29.2
2000
0.9492
0.0722
8.6242
0.6235
0.6525
0.1572
243.32
23.2
0.8292
0.0923
543.31
43.5
3000
0.9539
0.0632
10.4253
0.8212
0.6693
0.1384
301.21
29.3
0.8504
0.0951
742.83
59.8
4000
0.9578
0.0615
12.1235
0.9343
0.6852
0.1253
362.43
37.2
0.8525
0.0942
978.56
78.4
5000
0.9632
0.0523
13.2121
1.0215
0.6971
0.1132
415.37
48.5
0.8532
0.0965
1021.35
87.5
6000
0.9689
0.0494
14.5236
1.1245
0.7135
0.1012
523.41
56.1
0.8551
0.0937
1156.53
96.4It can be seen from Table5 that the CNN spectrum sensing method has obvious advantages in terms of various performances compared with others. The CNN is better than other two algorithms in image classification processing. The machine learning algorithm is good, and the OFDM cyclic spectrum feature is more suitable for CNN. For the test time of 100 samples is 0.3841, the test time of a single sample is within the range allowed by spectrum sensing. Our method can meet the needs of spectrum sensing.The training set and test set of OFDM signals are obtained through different SNR channels in the simulation platform. The logistic regression, SVM, and deep learning OFDM (DP-OFDM) spectrum sensing model are used for training and testing, and the error thresholdΩth is adjusted to obtain the detection probability. As described in [28], a cyclic feature detection method based on compressed sensing, such as [11] proposed the energy detection method, and [15] proposed the autocorrelation detection method. Under the condition of false alarm probability Pf=0.05, the corresponding decision thresholds are set for each of the above methods, and the above methods are simulated in the simulation platform, respectively. The performance comparison of the detection probability can be shown in Figure 10.Figure 10
Probability of detection versus SNR for various detection algorithmsPf=0.05.It can be seen from Figure10 that under the condition of Pf, we propose DP-OFDM spectrum sensing method is superior to the logistic regression and SVM algorithms. The same training set and test set are used in different SNR environments, which are less affected by noise. Below −10 dB, the detection probability of CNN is better than traditional spectrum sensing algorithms, which indicates that our method has better spectrum sensing performance under low SNR. Under the condition of high SNR, the traditional spectrum sensing algorithms have obvious performance advantages, indicating that the traditional spectrum sensing algorithms still have strong advantages under high SNR. Compressed sensing-based loop feature detection is comparable to the algorithm detection performance of this paper, but the algorithm of this paper is more advantageous. The detection rate of the traditional spectrum sensing algorithm is greatly affected by SNR, especially when SNR is below −6 dB.As can be seen from Section2, performance indicator for improving spectrum sensing is Pf. Under SNR is −12 dB, the receiver operating characteristic (ROC) curve of Pd changing with Pf is plotted by different detection algorithms, which can be shown in Figure 11.Figure 11
ROC curves of different spectral sensing methodsPd with PfSNR=−12dB.It can be seen from Figure11 that the detection probability of energy detection algorithm is the lowest. The detection probability of DP-OFDM detection method is significantly higher than traditional spectrum sensing algorithms and has a stronger advantage than the two machine learning algorithms of logistic regression and SVM. The extracted autocorrelation feature of OFDM cycle can reflect the characteristics of spectrum, which is more suitable as the input of CNN model. It also shows that CNN has more powerful learning ability than other machine learning algorithms, and spectrum sensing effect is better.


## 6. Conclusion

How to effectively improve the spectrum sensing performance in complex and variable wireless environments is a challenge. In this paper, we propose a cognitive radio spectrum sensing method for OFDM signal based on deep learning and cycle spectrum. The OFDM signal cyclic spectrum feature is used as the data set of the improved CNN model, which converts the spectrum sensing problem into an image processing problem, and can better exert the powerful learning ability of CNN. Simulation results show that this method is not only better than other machine learning methods but also has higher detection probability than traditional spectrum sensing methods under low SNR. This method also has certain disadvantages, such as a single feature input. In short, this method has certain reference value for the application of more advanced deep learning models in the field of spectrum sensing.



---

*Source: 5069021-2020-03-06.xml*