# A Review of Research on Spectrum Sensing Based on Deep Learning
## 3 Deep-Learning-Based Spectrum-Sensing Methods
### Application of Convolutional Neural Networks to Spectrum Sensing
#### 3.1.2 Spectrum-Sensing Method Based on Convolutional Neural Network  
1. A CNN-based spectrum-sensing method for signal time-frequency domain information  
Figure 10: Convolutional neural network model. Figure 9: Deep-learning-based general model for spectrum sensing [49]. The spectrogram shows how the frequency and energy in the signal relate to each other. Signals with different modulations have different spectrogram distributions with unique properties. This lets the CNN pull out the most important parts of the signal for the classification task. Scholars typically analyze the time domain and frequency domain information of the signal features by using the short-time Fourier transform (STFT) [52] to obtain the spectrogram of the signal. Therefore, the spectrum-sensing problem can be transformed into an image recognition problem by a CNN. The short-time Fourier transform works by multiplying the signal function by each time window function to make a one-bit Fourier transform. The time window function is then moved along the time axis to divide the signal samples into blocks, which are represented by a series of spectral functions. These results are then unfolded to make a two-dimensional spectrogram. The formula for the short-time Fourier transform is shown in Equation (6) below, where \(z(u)\) is the source signal and \(g(u-t)\) is the window function. \[STFT=\int_{-\infty}^{+\infty}[z(u)g(u-t)]e^{-j2\pi/u}du \tag{6}\]  
In this paper, the signal and noise data are generated in MATLAB, baseband samples are processed by discrete Fourier transform, then the amplitude of the samples are de-squared, and finally, spectrograms are generated for 0-255 pixel intensities. Figure 11 shows the the signal's spectrogram at \(-5\) dB and the noise-only spectrogram. [PERSON] et al. [53] first proposed a spectrum-sensing method by applying STFT to a CNN. They obtained the time-frequency matrix of the signal by applying STFT to extract the signal's features. Since the time-frequency resolution depends on the length of the window function, it was found through a large number of simulations that it was best when the sampling length was 128 and the window length was 32. By obtaining the time-frequency matrix of the low-communication signal and then normalizing it to obtain the gray-level time-frequency image, the value of the time-frequency in the state of H0 containing only noise does not have too much difference, while the value in the state of H1, containing the PU signal and noise, is more prominent than the other bands, which enables the CNN to implement the problem of classifying the signal in the two states of H0 and H1. The simulation results show great robustness to the SNR and a large performance improvement for the general CNN method at a low SNR of \(-20\) dB to \(-5\) dB, achieving 98.1% Pd at 0.1 Pf. Unlike the former study of [PERSON] et al., who used the time-frequency matrix of the signal as the CNN input, [PERSON] et al. [54] proposed an efficient CNN-based SS model that directly uses the spectrogram of the received signal as the input to the CNN for feature extraction, and the network is trained using PU signals at different SNRs. In order to obtain the optimal number of convolutional layers and epochs, the experiment is divided  
Figure 11: Spectrograms of noise-containing signals and noise. into two models. The first model has a layer with 32 convolution kernels and 40 epochs, and the accuracy of the model is tested at SNR = \(-5\) dB to \(-20\) dB, and the results show that the model accuracy drops from 65% to 52%. The model proposed in this paper gradually increases the number of layers from the first model and conducts experiments to gradually achieve 98% accuracy and about 1% model loss, and the experimental results show that as the SNR of the PU signal decreases, the accuracy of the model is not affected, and the model can also have 98% accuracy at SNR = \(-20\) dB, which is a large performance improvement compared with the method above. This method has a better detection effect at low SNRs.