## 4 CNN-Based Signal Classification Model
### CNN Structure Design  
The CNN consists of convolutional, pooling, and fully connected layers. The theoretical basis of the convolutional layer is the concept of receptive fields in biology, which can greatly reduce the parameters required for neural network training. Pooling, also known as down-sampling, is used to reduce the amount of data while retaining useful information. By superimposing the convolutional layer and the pooling layer, it forms one or more fully connected layers to achieve higher-order reasoning capabilities.  
In this paper, a CNN model is designed based on the Alexnet architecture for signal classification and is streamlined to reduce the requirements for device performance. The network structure is in Figure 12:  
It contains four pairs of convolutional layers and pooling layers (C1-P1, C2-P2, C3-P3, and C4-P4), followed by two fully connected layers (FC1 and FC2) and an output layer (FC3). The main purpose of the convolutional layer is the feature abstraction and extraction, while the pooling layer is responsible for feature fusion and dimensionality reduction. The fully connected layer is responsible for logical inference, in which the first one is used to link the output of the convolutional layer, remove the spatial information (number of channels), and turn the three-dimensional matrix into vector. Each convolutional and fully connected layers' output, except the last output layer, are connected to rectified linear unit (ReLU), which helps to alleviate the gradient disappearance or explosion, and speed up the training process.  
After analysis, the color of the time-frequency image is of little significance to signal classification, meanwhile the more important things are signal pattern character and spatial distribution. Therefore, during preprocessing the time-frequency image obtained is directly transformed into a 224 \(\times\) 224 grayscale image, so the input size of the network is 224 \(\times\) 224 pixels. The convolution kernel size of the first convolution layer is 11 \(\times\) 11 \(\times\) 16, stride = 4 and padding = 2. The total parameters number of this layer is (11 \(\times\) 11) \(\times\) 16 = 1936, which represents the weight of the layer. The output size of each convolution kernel in the first layer is (224 \(-\) 11)/2 + 1 = 55, and the output size of the C1 is 55 \(\times\) 55 \(\times\) 16. The second layer is a pooling layer (P1), with a size of 3 \(\times\) 3 and stride = 2. The output size of the kernel is (55 \(-\) 3/2 + 1) = 27, so the output size of this layer is 27 \(\times\) 27 \(\times\) 16. All parameters of the pooling layer are hyper-parameters and do not need to be learned. Similarly, we can calculate the size of each convolution and pooling layer. In the end there are 2 fully connected layers with 864 neurons in each layer, whose parameters are fully connected weight coefficients. We use the dropout layer after the fully connected layer to avoid overfitting.  
Since the existence of signal is independent for each other, this is a multi-label classification problem. So, we replaced the original softmax with Sigmoid function in the last layer (FC3). The output probability of each signal is between [0, 1]. If the output is greater than the probability threshold (usually 0.5), we considered that corresponding signal exists.  
Figure 12: CNN network structure designed in this paper.