Quantized Cooperative Spectrum Sensing in Bandwidth-Constrained Cognitive V2X Based on Deep Learning

: The output of the network in a deep learning (DL) based single-user signal detector, which is a normalized 2 × 1 class score vector, needs to be transmitted to the fusion center (FC) by occupying a large amount of the communication channel (CCH) bandwidth in the cooperative spectrum sensing (CSS). Obviously, in cognitive radio for vehicle to everything (CR-V2X), it is particularly important to propose a method that makes full use of the bandwidth-constrained CCH to obtain the optimal detection performance. In this paper, we ﬁrstly propose a novel single-user spectrum sensing method based on modiﬁed-ResNeXt in CR-V2X. The simulation results show that our proposed method performs better than two advanced DL based spectrum sensing methods with shorter inference time. We then introduce a quantization-based cooperative spectrum sensing (QBCSS) algorithm based on DL in CR-V2X, and the impact of the number of reported bits on the sensing results is also discussed. Through the experimental results, we conclude that the QBCSS algorithm reaches the optimal detection performance when the number of bits for quantizing local sensing data is 4. Finally, according to the conclusion, a bandwidth-constrained QBCSS scheme based on DL is proposed to make full use of the CCH with limited capacity to achieve the optimal detection performance.


Introduction
Improving road safety has attracted the attention of academia and industry due to the increasing number of vehicles on the road. One potential solution to prevent traffic accidents is to develop safety applications based on vehicle to everything (V2X). In addition, with the development of the social economy, in-vehicle infotainment continues to increase. A rise in the number of applications and services has posed challenges to the limited spectrum resources that have been allocated to V2X [1].
Cognitive radio (CR) is an efficient technology to alleviate spectrum scarcity. It enables unauthorized/secondary user (SU) to utilize the underused spectrum resources, provided that they do not cause harmful interference to the authorized/primary user (PU). To realize CR technology in V2X, cognitive radio for V2X (CR-V2X) has been proposed [2]. CR-enabled vehicles can opportunistically access additional licensed spectrum, for example, TV whitespace spectrum, according to the quality-of-service requirements of the applications [1]. As a key component of identifying idle licensed spectrum in CR systems, spectrum sensing is vital to CR-V2X.
Spectrum sensing which has been fully studied in conventional CR networks [3] is still in the development stage in CR-V2X. Due to a series of effects brought by the high-speed movement of vehicles, CR-V2X has its unique features compared with the conventional static CR networks, such as the fluctuation of wireless communication channels over time and space, the dynamics of the network topology and diverse environments where the network is located [1,4].
to the FC. Motivated by the conclusion obtained in [16,18], in this paper, we propose a bandwidth-constrained quantization-based cooperative spectrum sensing (QBCSS) scheme based on DL. The major contributions of this paper can be summarized as follows: (1) We propose a novel single-user spectrum sensing based on modified-ResNeXt in CR-V2X, which shows better detection performance than two advanced DL based spectrum sensing methods as mentioned above [14,16] and decent generalization ability for different vehicle velocities. (2) Based on the SoftCombinationNet proposed in [16], we study how many bits should be reported in QBCSS to achieve detection performance close to that of spectrum sensing with raw sensing results. Through simulation results, we conclude that only four bits of QBCSS are needed to achieve the optimal detection performance. (3) According to the conclusion drawn in (2), considering the bandwidth-constrained CCH in CR-V2X, we propose a bandwidth-constrained QBCSS scheme to make full use of the CCH with limited capacity to achieve the best detection performance.
The rest of this paper is organized as follows. In Section 2, we describe the system model. The single-user spectrum sensing scheme based on modified-ResNeXt in CR-V2X and simulation results of the proposed algorithm are provided in Section 3. The proposed QBCSS based on SoftCombinationNet is introduced in Section 4, and we also provide the simulation results in this section. Section 5 concludes the paper.

System Model
We consider a CR-V2X system consisting of one PU and B cognitive vehicles equipped with CR devices. For the sake of simplicity, we assume that the vehicles are moving with a constant velocity v. To avoid wasting resources, only when the currently available spectrum resources cannot meet the communication requirements of the system, the vehicle will enable the CR device to search for an idle licensed frequency band to transmit data. The PU signal transmitter will transmit the PU signal on the authorized frequency band when it is occupied. The SU performs spectrum sensing based on the sample values on the frequency band of interest. The PU signal detection at the SU can be modeled as the following binary hypothesis testing problem [19] x(t) = n(t), where x(t) is the signal received by the SU, s(t) is the signal transmitted by the PU, n(t) is a zero-mean additive white Gaussian noise (AWGN) with a variance σ 2 n , h(t) is the sensing channel gain between the PU and the SU. The power attenuation g(t) from transmitter to receiver is given by where d(t) is the distance between the PU and SU at time t, then the path-loss is β(d(t)). ϕ and α are the shadowing fading component and multipath fading component. Also, H 0 and H 1 are the two hypotheses denoting the absence and presence of PU in a certain band respectively. Obviously, the problem shown in (1) can be viewed as a classification problem with two categories. One of the categories is D 0 , which means that the sensing result of the SU is that the licensed frequency band to be detected is idle, so the SU can access it. The other category is D 1 , which means that the sensing result of the SU is that the licensed frequency band to be detected is being occupied, so the SU cannot access it. Like the measurement indicators used in [14,16], we also use the probability of detection P d and the probability of false alarm P f to measure the performance of the spectrum sensing algorithm, which are defined as The values obtained by the cognitive vehicle sampling the modulated signal propagated through the fading channel in the CR-V2X scenario can be written as where x i represents the i-th sample value of received time domain complex signal x, N represents the sample length of the received signal. To enhance the generalization ability of the sensing model, energy normalization is performed prior to training or inferring. Then, the sample value after energy normalization can be expressed as where Therefore, the processed dataset y that is to be fed into the deep learning model can be written as where x k denotes the k-th sample of the dataset after energy normalization, K denotes the size of the dataset, b k denotes the label corresponding to the k-th sample of the dataset. The value of b k is either 0 or 1. When the hypothesis is H 0 , b k = 0, and when the hypothesis is H 1 , b k = 1. Furthermore, to facilitate the calculation of cross entropy, we use a one-hot vector to represent the label b k as Finally, the output of the DL model is a 2 × 1 class score vector [20], which can be written as with where θ denotes the parameter of the DL model, and p θ (·) denotes the expression of the entire model. The training process of the model is to find the optimal solution θ* of θ which satisfies [20] where H(θ) = ∏ K k=1 p θ|H 0 x k 1−b k p θ|H 1 x k b k , and we adopt the cross-entropy loss function [17] in this paper, which can be written as The smaller the value of L(θ), the closer the predicted label is to the actual label and the better the performance of the model. In this case, when the p θ x k satisfies the final decision made by the model is D 0 , otherwise the decision is D 1 .

Network Architecture
Inspired by the result of [21] where ResNeXt performs well on the ILSVRC 2016 classification task, we also adopt this kind of architecture in this paper. Compared with ResNet, ResNeXt inherits the idea of ResNet while incorporating the idea of split-transform-Electronics 2021, 10, 1315 5 of 13 merge of Inception network [22], so the classification effect is naturally better than ResNet. When the basic building blocks of ResNet have the same complexity as the basic building blocks of ResNeXt, the accuracy of the network adopting the basic building blocks of ResNeXt is higher [21]. The basic modified-ResNeXt module whose cardinality is 4 is considered in this paper, as shown in Figure 1. Based on the basic building module, the details of the modified-ResNeXt structure constructed in this paper is shown in Table 1, where 'MaxPool1D' denotes the one-dimensional max-pooling layer, 'AvgPool1D' denotes the one-dimensional average pooling, 'Fc' denotes the fully connected layer. The first parameter in the pooling layer represents the pooling size, the second parameter represents the type of pooling, that is, max-pooling or average-pooling, the third parameter represents the step size of pooling, the last two parameters 'S' and 'F' have the same meaning as the convolutional layer. As for the fully connected layer, the first parameter represents the number of nodes and the last parameter represents the activation function.

Network Architecture
Inspired by the result of [21] where ResNeXt performs well on the ILSVRC 2016 classification task, we also adopt this kind of architecture in this paper. Compared with ResNet, ResNeXt inherits the idea of ResNet while incorporating the idea of splittransform-merge of Inception network [22], so the classification effect is naturally better than ResNet. When the basic building blocks of ResNet have the same complexity as the basic building blocks of ResNeXt, the accuracy of the network adopting the basic building blocks of ResNeXt is higher [21]. The basic modified-ResNeXt module whose cardinality is 4 is considered in this paper, as shown in Figure 1. Based on the basic building module, the details of the modified-ResNeXt structure constructed in this paper is shown in Table  1, where 'MaxPool1D' denotes the one-dimensional max-pooling layer, 'AvgPool1D' denotes the one-dimensional average pooling, 'Fc' denotes the fully connected layer. The first parameter in the pooling layer represents the pooling size, the second parameter represents the type of pooling, that is, max-pooling or average-pooling, the third parameter represents the step size of pooling, the last two parameters 'S' and 'F' have the same meaning as the convolutional layer. As for the fully connected layer, the first parameter represents the number of nodes and the last parameter represents the activation function. Figure 1. Basic modified-ResNeXt module, where the first parameter denotes the number of convolutional kernels, the second parameter 'Conv1D' denotes the one-dimensional convolutional layer, the third parameter denotes the size of convolutional kernels, the fourth parameter 'S' denotes padding to the same size, the fifth parameter 'F' denotes channel order of the input data immediately follows the batch, the last parameter 'R' denotes Relu activation function. 32, AvgPool1D, 1, S, F Figure 1. Basic modified-ResNeXt module, where the first parameter denotes the number of convolutional kernels, the second parameter 'Conv1D' denotes the one-dimensional convolutional layer, the third parameter denotes the size of convolutional kernels, the fourth parameter 'S' denotes padding to the same size, the fifth parameter 'F' denotes channel order of the input data immediately follows the batch, the last parameter 'R' denotes Relu activation function.

Dataset Generation
For the dataset, we use MATLAB to generate the modulated signal whose modulation mode is BPSK, and the SNR ranges from −20 dB to 20 dB with an interval of 1 dB. The modulated signal is sampled with the length of 1024 after propagating through the V2X channel under urban and highway environments as described in [23,24]. The number of samples for each SNR is 1000, so the final dataset size is 40000 × 2 × 1024, where 2 denotes every point is a complex number, which can be divided into real and imaginary parts. Then the entire dataset is partitioned into three different sets for training, validation, and testing with a commonly used split ratio of 3:1:1. To verify the generalization ability of the model, we also test the detection performance of a well-trained network over signals with different vehicle velocities from the training signals.

Simulation Results
In this section, extensive simulation results are provided to demonstrate the performance of the proposed model. Also, the impact of vehicle velocity is investigated. Considering the constant false alarm rate detector, we use the customized two-stage training strategy proposed in [16]. Figure 2 compares the detection performance of the proposed model with three other models, namely ResNet [14], DetectNet [16], and conventional energy detection. Considering that under high SNR (here refers to greater than −4 dB), the detection probability of various algorithms has reached the maximum value of 1, so only the part in the range of −20 dB to −4 dB is shown in Figure 2. It can be observed that the detection performance of any spectrum sensing algorithm based on DL is much better than that of conventional energy detection, especially in low SNR, the detection performance gap between them is more obvious. The value of P d in our proposed model reaches 97% at −13 dB with lower P f , which is 5% higher than that of ResNet and 9% higher than that of DetectNet under urban environment. In addition to detection performance, we also compare the inference time of our proposed model with ResNet and DetectNet, as shown in Figure 3. It can be seen that, no matter what kind of V2X communication environment, the model proposed in this paper with the shortest inference time outperforms two other DL models, which is vital for the latency-sensitive V2X. Furthermore, the number of parameters, model size and floating point of operations (FLOPs) of various DL models are compared in Table 2. It is not difficult to find that the parameter quantity of the model proposed in this paper is about one order of magnitude smaller than that of ResNet and three orders of magnitude smaller than that of DetectNet. Besides, the capacity of storage space required by our proposed model is about one-thousandth of that required by DetectNet, and is less than one-fifth of that required by ResNet. Moreover, the FLOPs required by our proposed model are about one order of magnitude smaller than that of ResNet and two orders smaller than that of DetectNet. Therefore, the proposed algorithm can not only guarantee detection performance but also effectively shorten sensing time, saving a certain capacity of storage space and computing resources in CR-V2X.    Figure 4 illustrates the generalization ability of our proposed model. In particular, we test the detection performance of a well-trained network over signals with different vehicle velocities under urban and highway environments. As can be observed, the modified-ResNeXt provides decent generalization under these two environments. Furthermore, as the vehicle speed increases, the detection performance of modified-ResNeXt under urban environment gradually decreases. This is because the higher the vehicle speed, the faster the channel conditions fluctuate, and the more severe the signal fading.   Figure 4 illustrates the generalization ability of our proposed model. In particular, we test the detection performance of a well-trained network over signals with different vehicle velocities under urban and highway environments. As can be observed, the modified-ResNeXt provides decent generalization under these two environments. Furthermore, as the vehicle speed increases, the detection performance of modified-ResNeXt under urban environment gradually decreases. This is because the higher the vehicle speed, the faster the channel conditions fluctuate, and the more severe the signal fading.  Figure 4 illustrates the generalization ability of our proposed model. In particular, we test the detection performance of a well-trained network over signals with different vehicle velocities under urban and highway environments. As can be observed, the modified-ResNeXt provides decent generalization under these two environments. Furthermore, as the vehicle speed increases, the detection performance of modified-ResNeXt under urban environment gradually decreases. This is because the higher the vehicle speed, the faster the channel conditions fluctuate, and the more severe the signal fading. However, under the highway environment, the vehicle speed is already high enough, so the overall detection performance of the system has stabilized as the vehicle speed increases.

Impact of Vehicle Velocity
However, under the highway environment, the vehicle speed is already high enough, so the overall detection performance of the system has stabilized as the vehicle speed increases.

Quantification Process
In the CR-V2X system, the sensing result obtained by cognitive vehicles in CSS is transmitted to the FC through the vehicle CCH. Take the V2X as an example, when the CCH is 10 MHz, the modulation is QPSK and the coding rate is 0.57, the number of Resource Block (RB) is 50 in one subframe interval [25]. In this paper, we assume that the total number of RBs that can be used to transmit sensing result of cognitive vehicles participating in CSS is , and the number of information bit of each RB used to transmit sensing result of cognitive vehicles is one to reduce the overhead caused by CSS. Therefore, for each cognitive vehicle participating in CSS, they transmit sensing result at the same subframe time, and the FC receives the sensing information from neighboring vehicles at the same time. For the sake of simplicity, the number of RBs is replaced by the number of information bits in the following, and the RBs in vehicle CCH are evenly allocated to each cognitive vehicle participating in CSS. Then, the total number of information bits allocated to quantify local sensing result satisfies ≤ ⁄ .
Then, the local sensing result ( ′ ) obtained by the -th cognitive vehicle participating in CSS can be coded as uploading to the FC through the CCH according to the following quantizer

Quantification Process
In the CR-V2X system, the sensing result obtained by cognitive vehicles in CSS is transmitted to the FC through the vehicle CCH. Take the V2X as an example, when the CCH is 10 MHz, the modulation is QPSK and the coding rate is 0.57, the number of Resource Block (RB) is 50 in one subframe interval [25]. In this paper, we assume that the total number of RBs that can be used to transmit sensing result of cognitive vehicles participating in CSS is L, and the number of information bit of each RB used to transmit sensing result of cognitive vehicles is one to reduce the overhead caused by CSS. Therefore, for each cognitive vehicle participating in CSS, they transmit sensing result at the same subframe time, and the FC receives the sensing information from neighboring vehicles at the same time. For the sake of simplicity, the number of RBs is replaced by the number of information bits in the following, and the RBs in vehicle CCH are evenly allocated to each cognitive vehicle participating in CSS. Then, the total number of information bits M allocated to quantify local sensing result satisfies Therefore, the local sensing result p θ x k obtained by the single-user neural network has a total of 2 M values after quantization, and the number of quantization intervals thus obtained is 2 M . The quantization threshold vector t is given by Then, the local sensing result p θ x k obtained by the j-th cognitive vehicle participating in CSS can be coded as D j uploading to the FC through the CCH according to the following quantizer After the FC receives the data from the cognitive vehicle participating in CSS, it adopts the random function to decode the data into p θ x k as the following dequantizer Finally, p θ x k is sent to SoftCombinationNet for training. Figure 5 depicts the detection performance of QBCSS with different bits of quantized information. For illustration purpose, the Logical-OR (LO) rule is used in the conventional cooperative detection scheme, since it in general yields the highest P d . Comparing the performance of 'SoftCombinationNet' (SCN) and LO, we find that these two curves are very close at high SNR. Also, it is obvious that the detection performance of single-node spectrum sensing is much worse than that of CSS. This is because CSS effectively utilizes the spatial diversity of distributed sensing nodes. Furthermore, the more quantized information bits obtained by the single-user, the better the QBCSS performs. Due to the excessive randomness of ONBSCN, the quantization scheme with one-bit of information is not considered in practical applications. However, when the number of quantized information bits of the local spectrum sensing result is 4, the detection performance of the QBCSS is very close to that of SCN which is of no quantization. Taking the limited resources of the vehicle CCH into account, more quantized information bits are meaningless, and the saved CCH capacity can be used for the transmission of other vehicle information. Therefore, it can be concluded that when the number of quantized information bits of the local spectrum sensing result is 4, the detection performance of QBCSS is optimal. Electronics 2021, 10, x FOR PEER REVIEW 10 of 13 (a) (b) Figure 5. Detection performance of QBCSS over different quantized information bits. (a) Five-node QBCSS; (b) eight-node QBCSS. Where "ONBSCN" represents one-bit quantization, "TWBSCN" represents two-bit quantization, "THBSCN" represents three-bit quantization and "FOBSCN" represents four-bit quantization.

Bandwidth-Constrained Quantized Collaboration Scheme Based on Deep Learning
The bandwidth-constrained quantized collaboration scheme based on DL in this paper requires pre-stored data in the database, which are the combinations of the number of the cognitive vehicle that actually participate in CSS and their quantized information bits of the local spectrum sensing results. Given the upper limit of the bandwidth of the vehicle CCH, for the sake of simplicity, we assume that the total number of bits of information used by the vehicles to transmit the sensing result is , the number of the cognitive vehicle that can participate in CSS is , the number of the cognitive vehicle that actually participates in CSS is and the number of quantized information bits of the local spectrum sensing results allocated to each cognitive vehicle participating in CSS is . Then, for a given pair of { , }, combined with the discussion in Section 4.1.2, the optimal combination scheme can be seen as the answer to the optimization The optimal solution to (17) can be easily obtained by a discrete search along with both and . Consequently, the algorithm for finding { * , * } is given as Algorithm 1. Where "ONBSCN" represents one-bit quantization, "TWBSCN" represents two-bit quantization, "THBSCN" represents three-bit quantization and "FOBSCN" represents four-bit quantization.

Bandwidth-Constrained Quantized Collaboration Scheme Based on Deep Learning
The bandwidth-constrained quantized collaboration scheme based on DL in this paper requires pre-stored data in the database, which are the combinations of the number of the cognitive vehicle that actually participate in CSS and their quantized information bits of the local spectrum sensing results. Given the upper limit of the bandwidth of the vehicle CCH, for the sake of simplicity, we assume that the total number of bits of information used by the vehicles to transmit the sensing result is L, the number of the cognitive vehicle that can participate in CSS is B, the number of the cognitive vehicle that actually participates in CSS is b and the number of quantized information bits of the local spectrum sensing results allocated to each cognitive vehicle participating in CSS is m. Then, for a given pair of {B, L}, combined with the discussion in Section 4.1.2, the optimal combination scheme can be seen as the answer to the optimization where P (B,L) d (b, m) represents the detection probability corresponding to each combination under the aforementioned assumptions.
The optimal solution to (17) can be easily obtained by a discrete search along with both b and m. Consequently, the algorithm for finding {b * , m * } is given as Algorithm 1.

End if End if End for End if End for
Thus, based on the prepared database, the process of the QBCSS in bandwidthconstrained CR-V2Xs based on DL can be described as Algorithm 2. It should be noted that the third step is to select the vehicle closest to the PU based on the location.

Simulation Results
In this section, we assume that L = 10 and B = 10. Then, the candidate optimal combination schemes found through the enumeration method are shown in Table 3. Table 3. Candidate optimal combination scheme. In Figure 6, we compare the detection performance of the combination scheme shown in Table 3. It can be observed that the CSS performs best when the number of vehicles participating in CSS is 5 and the number of quantized information bits of the local spectrum sensing results allocated to each vehicle participating in CSS is 2. At the same time, it can be observed that the higher the utilization rate of the bandwidth-constrained CCH, the better the detection performance of the system. Furthermore, when the total number of bits of information reported by vehicles is the same in the two combination schemes, the more vehicles participating in the CSS, the better the detection performance. This is consistent with our purpose of introducing cooperation.

Conclusions
In this paper, we first propose a DL based single-user spectrum sensing model called modified-ResNeXt in CR-V2Xs. It shows an improvement in detection performance than two other well-performing algorithms, that is ResNet and DetectNet. Specifically, when the SNR equals −13 dB under urban environment, the of the proposed model is 5% higher than that of ResNet and 9% higher than that of DetectNet, but with lower , shorter inference time, smaller model size. Also, the DL based detector provides decent generalization over signals with different vehicle velocities under urban and highway environment. Then, taking the upper limit of the bandwidth of the vehicle CCH into account, we discuss how many bits should be reported in QBCSS based on DL, and conclude that when the number of quantized information bits of the local spectrum sensing result is 4, the detection performance achieves optimal. Based on this conclusion, a bandwidth-constrained quantized collaboration scheme based on DL is proposed to make full use of the CCH with limited capacity to achieve optimal detection performance.

Conclusions
In this paper, we first propose a DL based single-user spectrum sensing model called modified-ResNeXt in CR-V2Xs. It shows an improvement in detection performance than two other well-performing algorithms, that is ResNet and DetectNet. Specifically, when the SNR equals −13 dB under urban environment, the P d of the proposed model is 5% higher than that of ResNet and 9% higher than that of DetectNet, but with lower P f , shorter inference time, smaller model size. Also, the DL based detector provides decent generalization over signals with different vehicle velocities under urban and highway environment. Then, taking the upper limit of the bandwidth of the vehicle CCH into account, we discuss how many bits should be reported in QBCSS based on DL, and conclude that when the number of quantized information bits of the local spectrum sensing result is 4, the detection performance achieves optimal. Based on this conclusion, a bandwidth-constrained quantized collaboration scheme based on DL is proposed to make full use of the CCH with limited capacity to achieve optimal detection performance.