Spectrum sensing based on adaptive sampling of received signal

Spectrum sensing (SS) has been heatedly discussed due to its capacity to discover the idle registered spectrum bands, which effectively alleviates the shortage of spectrum by spectrum reuse. Energy detector (ED) is widely accepted for SS as its complexity is very low. In this paper, an adaptive sampling scheme is proposed to improve the sensing performance of ED, where the sampling point of the received signal is adaptively adjusted with the environment signal-to-noise ratio (SNR). When SNR decreases, the sensing performance can be maintained and even improved by the rise of the sampling point. When SNR increases, the improved ED is considered for idle spectrum detection. The SNR is evaluated based on the joint of convolutional neural network (CNN) and long short-term memory (LSTM) network. Both theoretical derivations and simulation experiments validate the effectiveness of the proposed scheme.


Introduction
With the rapid development of wireless communication, Internet of Things (IoT) [1], artificial intelligence (AI) [2], etc., wireless terminals increase exponentially and much radio spectrum is urgently needed.IoT is the term used for ubiquitously intelligent interconnected objects which interact with each other through unique addressing schemes based on standard communication protocols [3].It is believed that the IoT paradigm will have a strong impact on everyday life in future [4].IOT needs a lot of spectrum resources; however, the radio spectrum has been fully subdivided according to the situation in different countries [5].There is no idle spectrum to meet the requirement of the emerging wireless communication technology.According to the report of Federal Communications Commission (FCC), the utilization ratio of authorized spectrum is under 30% [6].As a result, improving the utilization of spectrum seems particularly important for the development of wireless communication technology.
Cognitive radio (CR) [7][8][9] aims at opportunistic access to the registered spectrum if the primary user (PU) is out by periodically monitoring the observed spectrum bands.Once PU uses the spectrum again, the secondary user (SU) will exit the channel.CR technology has attracted much attention in recent years due to its time division multiplexing capability of the registered spectrum.The most important technology behind CR is to periodically judge the status of the observed spectrum, named spectrum sensing (SS) [8,10,11].To protect PU and to maintain the throughput of SU are two important aspects for SS, where detection probability and false alarm probability are, respectively, defined.High detection probability means better protection of SU, and lower false alarm probability means greater throughput.
In the literature, various SS schemes have been proposed for the possible performance improvement, mainly including matched filtering detector [12], energy detector (ED) [13], cyclostationary feature detector (CFD) [14], etc.The matched filtering detector works by demodulating the authorization signal or pilot detection.It is an optimal detector if the prior knowledge of PU is known.ED is based on the energy comparison of signal with the preset threshold, which is the optimal blind detector due to its superb performance and low complexity.However, ED suffers from the influence of noise uncertainty, especially under low signal-to-noise ratio (SNR) regimes.CFD determines whether PU exists by the presence or absence of cyclostationary feature.The background noise is a wide stationary stochastic process, and it has no cyclostationary feature.As a result, CFD is applied to SS in the low SNR cases.The disadvantage of CFD consists in the longer observation time and the higher computational complexity.
ED is mainly considered in this paper due to its low complexity.To solve the issue of noise uncertainty, much effort has been made.An adaptive fixed threshold algorithm is proposed in [15], which makes ED robust to channel fading, shadows, and interference [11].Zhang and Bao [16] provides threshold setting method with the estimated noise power.An improved ED model was proposed in [17], where the synergy perception gain was considered.In [12], sliding windows is used to alleviate noise fluctuations.
The sampling points are fixed for the traditional ED scheme and the sensing threshold varies adaptively with the background noise.The disadvantage of this scheme is that when SNR environment becomes worse, the sensing performance will be greatly reduced.Motivated by the mentioned above, ED with adaptive sampling is proposed in this paper, where the sampling point of the observed signal is adaptively adjusted according to the variation of the environmental SNR.When the SNR decreases, the detection performance can be maintained as much as possible by the rise of sampling point within the tolerance of the system.The main contribution and work can be concluded as follows: 1.The theoretical derivation states that the sensing performance can be compensated by increasing sampling points when the SNR decreases.2. The theoretical derivation is provided that how the sensing performance can be maintained and even improved by the rise of sampling points within the tolerance of the system.3. The simulation experiments are made and the conclusions proposed in this paper are validated.
The content of this paper is as follows.In Sect.2, we provide the content of this paper, including the experimental method, personnel composition, etc. Section 3 introduces the system model and gives the mathematical expressions of energy detection.In Sect.4, the proposed SS scheme with adaptive sampling, the SNR estimation scheme and the improved ED scheme are discussed.The simulation experiments are conducted in Sect. 5. Section 6 is the discussion section, which puts forward the shortcomings of this paper.Finally, conclusions are drawn in Sect.7.

Methods
The motivation of this paper is to provide a SS scheme where the trade-off between the sensing complexity and the sensing accuracy by adaptive sampling of received signal.Two theorems are derived by mathematical derivation, where the proposed SS scheme is discussed and demonstrated.To verify the effectiveness of the proposed schemes, simulation experiments based on the MATLAB platform are made.
In the simulation experiment, the experimental results are compared with the traditional ED scheme and the traditional SNR evaluation, and it is concluded that the experimental results are better than the traditional schemes.In the simulations, the method of controlling variables is considered, where when the environment changes, the detection probability remains unchanged by changing N.
It states that the proposed algorithm balances sensing complexity and the sensing accuracy.When the SNR becomes larger, especially above 0 dB, ED is the optimal scheme due to the lowest complexity and the superb performance.When the SNR is at a lower level, the proposed scheme helps to improve the sensing accuracy by the rise of the sensing complexity within the system tolerance.
For the authors of this paper, Youheng Tan, Yuebo Li, Yangying Zhang and I are doctoral students of Beijing University of posts and Telecommunications.Junsheng Mu is the Postdoctor of Beijing University of posts and Telecommunications and Xiaojun Jing is the professor of Beijing University of posts and Telecommunications.

System model
Generally, SS is considered to be a binary hypothesis, where H 1 represents the existence of the PU and H 0 denotes that the PU does not exist [18].In ED, we sample the received signal through the frequency band with carrier frequency f c and bandwidth W , and the sampling frequency is f s .When PU is active, the sampling signal received by the SU can be formulated as [19] When the PU does not exist, the sampling signal received by the SU is where s n denotes the signal of the PU with mean 0 and variance σ 2 s .
x n is additional white Gaussian noise (AWGN) with mean 0 and variance σ 2 x .Let τ is the sensing time slot and N represents the sampling point N = τ f s .Then, the received energy T y at the receiver of the SU [20] is (1) The probability density function (PDF) of T y is a Chi-square distribution with the freedom degree 2N in the complex-valued case [21].Then, the false alarm probability and the corresponding detection probability of ED can be, respectively, denoted as The general procedure of ED is shown in Algorithm 1.To consider both detection probability and false alarm probability, F i is regarded as the optimization objective [22], where 1 − P d−i denotes the missed detection probability of the ith channel.The sensing threshold plays an important role for SS, and it directly influences the performance of SS.Assume that a target false alarm probability P f is required, then (4) can be written as According to [23], the sensing threshold is under the constraint as follows: (4)

SS with adaptive sampling
The main contribution of this paper contains three modules, SNR estimation, SS with adaptive sampling (proposed scheme) and improved ED, where SS with adaptive sampling and improved ED are two optional schemes based on the estimated SNR (Fig. 1).

SS with adaptive sampling
The essence of ED is that ε i varies adaptively with background noise for the fixed N .
According to (4), we can get where ε 1 and ε 2 , respectively, denote the sensing threshold for two different moments, ) can be further described as where K is a constant greater than 1 for the given P f .

be constant by increasing N for fixed false alarm probability.
Proof To keep F i constant for fixed false alarm probability, the following equation can be obtained: where γ 1 and γ 2 are the corresponding SNR.□ (10) (11), (12) can be written as Due to P d is generally higher than 0.5, then

Required
To maintain the detection performance, the following conclusion can be drawn according to (17): As a result, the conclusion in Theorem 1 can be drawn.From Theorem 1, when the sensing environment becomes worse, P d can be main- tained by increasing N .Then, the F i of two moments can be, respectively, expressed as As a result, Remark It can be seen from Theorem 1 that based on the constant false alarm criterion (CFAR), P d can be maintained by increasing N when the environment becomes worse.At the same time, due to the increase in N , the P f will be smaller than before in fact.
We assume that Pd signifies the minimum detection probability of the system require- ment, while Pf denotes the corresponding maximum false alarm probability, For the given γ , σ 2 s−i , σ 2 x−i and ε i , according to ( 23) and ( 24), the constraint on N i can be obtained as follows: (18 where T 0 is the maximum sampling interval that the system can tolerate.
, the sensing performance can be maintained and even improved when N min ≤ N 1 ≤ N ≤ N max for the fixed false alarm probability, where N 1 denotes the minimum point that can keep P d constant.
Proof With the fall of the SNR, to keep the P d for the fixed false alarm probability, the minimum sampling point N 1 meets the requirement as follows: where P d−MED corresponds to the detection probability with noise variance σ 2 x2−i and P d−ED corresponds with the detection probability with noise variance σ 2 x1−i .N 0 corre- sponds with the sampling point with noise variance σ 2 x1−i .□(28) states that the detection probability can be constant if However, when (9), then where γ 2 denotes the corresponding SNR when the sampling point Due to then ( 26) According to (30) and (31), we get where P d−RED denotes the detection probability with the sampling point Theorem 2 states that the sensing performance can be maintained and even improved by the adaptive sampling of the observed signal within the tolerance of the CR system.
Based on (28), Since N 1 > N 0 , then P f −MED < P f −ED .Then, In consequence, The same to the theoretical derivations in (33)-(37), the following equation can be obtained Remark From the derivation of Theorem 2, we can know that when the environment SNR decreases, we can maintain the detection performance by increasing the sampling point.If the complexity of the system is not considered, we can increase the sampling (31) (32) (39) F RED < F MED .point to the upper limit of the system, and then the detection performance will be optimized.If the SNR environment drops a lot and the required sampling points are above the upper limit of the system, the proposed scheme will not work anymore.At this moment, IED will be considered and the detail of IED will be discussed later.

SNR evaluation
In the proposed schemes, the accuracy of SNR evaluation directly influences the sensing performance.How to effectively evaluate the environmental SNR seems particularly important.As a result, an SNR estimation model based on convolutional neural network (CNN) and long short-term memory (LSTM) network is employed [24].
The flowchart of the CNN-LSTM network is shown in Fig. 2. From Fig. 2, the CNN-LSTM network is divided into two parts, the CNN module and the LSTM module.The CNN module extracts the features of the segmented signal to form the feature vector.The output feature of the CNN module is input to the LSTM module, and the features of each short sequence are fused in the fully connected layer.After the fully connected layer, the evaluated SNR is obtained.
Figure 3 provides the relative error comparisons of various SNR estimation schemes, including spectrum analysis (SA) estimation [25], maximum likelihood (ML) estimation [26] and the CNN-LSTM scheme considered in this paper.From Fig. 3, the relative error of the CNN-LSTM scheme is the lowest, which states that the CNN-LSTM scheme considered in this paper has a strong ability of SNR estimation.

Improved energy detection (IED)
If the required sampling point for maintaining the sensing performance is beyond the tolerance of the CR system, IED [27] is considered in this paper.
The detailed procedure of IED is shown in Algorithm 2. The observed frequency band is determined to be busy if it satisfies one of the conditions as follows: 1.The energy of the received signal is higher than the threshold.2. The energy of the received signal is lower than the threshold.In the meanwhile, both the average energy and the last energy of the received signal are higher than the threshold.

Simulation result
In this section, corresponding simulations are performed to verify the effectiveness of the proposed scheme.The simulation experiments in this paper are all completed under Gaussian channels, and the initial sampling point is N = 100 , and every experiment iter- ated 5000 times.Figure 4 exhibits the performance comparisons of various schemes, where T-ED denotes the theoretical performance of the proposed scheme and R-ED denotes the real performance of the proposed scheme.The principle of T-ED is the same as that of R-ED.They are both based on energy detection under CFAR conditions.The difference between T-ED and R-ED is the false alarm probability.In the experiment, the false alarm probability of T-ED corresponds with Theorem 1, and its false alarm probability is fixed for each detection probability, while the false alarm probability of R-ED adaptively varies with the sampling point.In Fig. 4, the SNR jumps from − 2 to − 5 dB, and the corresponding sampling point are 200, 500 for T-ED and R-ED.The sampling point is 100 for the classical ED.From Fig. 4, when the SNR varies from − 2 to − 5 dB, the sensing performance of ED greatly decreases due to an increase in noise content, which states that ED suffers from the noise uncertainty.Compared the sensing performance of T-ED with that of ED under SNR = − 5 dB situation, the sensing performance is greatly improved for the proposed T-ED.It indicates that the sensing performance can be improved with the rise of the sampling point, which manifests the rationality of the contribution for this paper.
In addition, the detection probability of R-ED is higher than that of T-ED for the same false alarm probability, which corresponds with the analysis in ( 20)- (23).As a supplement, Fig. 5 provides the throughput comparisons of various schemes.Under the same conditions, the throughput and the false alarm probability are inverse numbers related to each other.From Fig. 5, the performance of this algorithm is better.It is worth noting that the two T-ED lines in Fig. 5 coincide with ED when γ = −2 dB.That is because that algorithm mentioned in this paper is based on the CFAR criterion.To sum up, the simulations in Figs. 4 and 5 validate effectiveness of the proposed Theorem 1.
Figure 6 shows detection probability comparisons under various sampling conditions when the false alarm probability is 0.1, where the background SNR varies from − 2 to − 8 dB.From Fig. 6, the sensing performance can be constant by increasing sampling point infinitely, which is in accordance with the analysis in Fig. 4. If the tolerance of system sampling point is considered ( N 1 ≤ N ≤ N max ), the sensing perfor- mance can be maintained in the case of a small reduction in SNR, which indicates the applicable scope of the proposed scheme.Comparing the sensing performance ( N = N 1 ) with the sensing performance ( N 1 < N ≤ N max ), the detection probability ( N 1 < N ≤ N max ) is higher than that of N = N 1 .This states that the sensing perfor- mance can be improved when the background SNR decreases by adaptive sampling within the tolerance of the CR system.However, the sensing performance will still greatly decrease if a sudden and drastic change happens to the SNR.
Figure 7 shows the variation of the sampling point with SNR, where the sampling point corresponds with the detection probability in Fig. 6.From Fig. 7, the sampling point is identical for the case N = N 1 and the case N increase infinitely when SNR varies from − 2 to − 5 dB.The reason for this phenomenon is that the SNR varies to a small extent and the required sampling point is within the tolerance of the system for constant sensing performance.When the SNR varies from − 5 to − 8 dB, the required sampling point is above the tolerance of the system for constant sensing performance.As a result, the sampling point of the case N = N 1 and the case N = N max is identi- cal when SNR varies from − 5 to − 8 dB, far below the sampling point of the case N increase infinitely.
The performance of ED and IED under different signal-to-noise ratios is compared in Fig. 8.As the analysis shown in Fig. 8, if a sudden and drastic change happens to the SNR, the sensing performance will still greatly decrease for the proposed scheme.
IED is considered in this case.From Fig. 8, the sensing performance is still at a high level even under SNR = −15 dB condition, which indicates that IED is suitable for the sudden and drastic change of the background SNR.As a result, both the proposed scheme and IED can ensure the superb sensing performance no matter how the SNR changes.

Discussions
As can be seen from the simulations result, the optimization design proposed in this paper can improve perceptual performance.However, this method specifies the value range of SNR, and when this range is exceeded, the method will not be used.Compared with other methods, the R-ED algorithm is not applicable in a wide range, but within the agreed range, the accuracy of the method will be greatly improved and the complexity of the system will be reduced.

Fig. 1
Fig. 1 Diagram of the proposed scheme can be further denoted as Let us define Then, According to (16), f (x) = x+1−K √ 2x+1 monotonically increases with x. (14) can be writ- ten as Due to a > b , then we can get

Fig. 3
Fig. 3 Relative error comparisons of various SNR estimation schemes

Fig. 8
Fig. 8 Performance comparisons between ED and IED under different SNRs