Two-Stage Detectors with Multiple Energy Detectors and Adaptive Double Threshold in Cognitive Radio Networks

Cognitive radio (CR) is a regulated technique for opportunistic access of idle resources. In CR, spectrum sensing is one of the key functionalities. It is used to sense the unused spectrum in an opportunistic manner. In this paper, we have proposed two-stage detectors for spectrum sensing in cognitive radio networks (CRN). The first stage consists of multiple energy detectors (MED), where each energy detector (ED) is having single antenna with fixed threshold (MED_FT) for making a local binary decision, and if required, the second stage comprised of ED with adaptive double threshold (ED_ADT) is invoked. The detection performance of the proposed scheme is compared with cyclostationary-based sensing method and adaptive spectrum sensing scheme. Numerical results show that the proposed scheme improves detection performance and outperforms the cyclostationary-based sensing method and adaptive spectrum sensing by 12.3% and 14.4% at signal to noise ratio (SNR) setting of as low as −8 dB, respectively. Performance was also measured in terms of sensing time. It is shown that the proposed scheme yields smaller sensing time than cyclostationary detection and adaptive spectrum sensing scheme in the order of 4.3 ms and 0.1 ms at −20 dB SNR, respectively.


Introduction
In CR systems, the unlicensed users can utilize the licensed frequencies while the primary user (PU) is not active. For achieving good spectrum sensing performance, several methods based on single CR user have been proposed [1][2][3]. Basically, there are three spectrum sensing techniques, namely, matched filter detection, energy detection, and cyclostationary feature detection [1,4,5]. In [6], authors have proposed a CR system with two-stage spectrum sensing is which consists of coarse and fine detections in IEEE 802. 22 WRAN systems. Further in [7], authors have proposed a "two-stage" spectrum sensing scheme to improve detection performance. This scheme consists of two detectors, energy detector in the first stage and cyclostationary detector in the second stage that provides better detection, but it is computationally more complex and needs longer sensing time. In [8], authors have proposed the adaptive spectrum sensing scheme. The proposed scheme chooses either the energy detection or the one-order cyclostationary detection based on the estimated SNR. However, to the best of our knowledge, no technique is focused on spectrum sensing failure problem [9]. In the present work, we focused on spectrum sensing failure problem and improved system detection performance.
In this paper, we proposed two-stage detectors, first stage consists of multiple energy detectors with fixed threshold (MED FT) [10], in MED, suppose that one ED fails then the rest of the process will not be affected because of redundancy. The second stage contains energy detector, with adaptive double threshold (ED ADT) scheme, and optimizes the detection performance at a fixed probability of false alarm ( ), that is, 0.1, and overcomes sensing failure problem [9] as well.
In the first stage, MED based on selection combiner scheme using fixed threshold detects the PU signal. If the received signal energy ( ) is greater than a certain threshold 2 International Journal of Distributed Sensor Networks ( ), the channel is declared to be occupied; otherwise, ED ADT is performed in the second stage. If the decision metric ( ) in this stage exceeds a certain threshold ( ), the channel is declared to be occupied; else, it is declared to be empty and available for a secondary user. Adaptive double thresholds are based on upper and lower bounds of the noise uncertainty range [11]. We analyze the performance of such two-stage sensing approach in terms of probabilities of detection and error ( and ) and spectrum sensing time ( ). The numerical results show that proposed scheme provides better detection performance. The thresholds and , maximize the probability of detection under this approach, with the probability of false alarm being constrained, are chosen according to the noise uncertainty at CR user.
The rest of the paper is organized as follows: Section 2 presents system description. Section 3 describes proposed system model. Section 4 presents the numerical results and analysis. Finally, Section 5 concludes the paper.

System Description
CRs utilize unused channel of PU where the spectrum sensing mechanism allows them to determine the presence of a PU. In this method, the locations of the primary receivers are not known to the CRs as there is no signaling between the PUs and the CRs. To detect the PU signal, we have used following hypothesis for received signal [1,12]: In the testing, ( ) shows signal received by each CR user. ( ) is the PU licensed signal and ( ) ∼ (0, 2 ) is additive white Gaussian noise with zero mean and variance 2 . ℎ( ) denotes the Rayleigh fading channel gain of the sensing channel between the PU and the CR user. 0 is the null hypothesis, which indicates the absence of PU and 1 is the alternative hypothesis, which indicates that PU is present.

Energy Detector.
For the detection of unknown deterministic signals corrupted by the additive white Gaussian noise, an ED is derived in [13], which is called conventional energy detector (CED). This is an easily implemented detector for detection of unknown signals in spectrum sensing. It collects the test statistic and compares it to a threshold ( ) to decide whether the PU signal is present or absent. The test statistic is given by [14] where ( ) is the received input signal, is the number of samples, and denotes the energy of received input signal, which is compared with threshold to make the final decision. Threshold value is set to meet the target probability of false alarm according to the noise power. The probability of detection can also be identified. The expression for and can be defined as [15] where 2 and 2 are the noise variance and signal variance, respectively. ( ) denotes Gaussian tail probabilityfunction.

Adaptive Double Threshold Scheme for Spectrum Sensing.
In energy detection (ED) based spectrum sensing [16], noise uncertainty increases the difficulty in setting the optimal threshold for a CR and thus degrades its sensing reliability [17]. Also, this may not be optimum in low SNR conditions where the performance of fixed single threshold ( ) based detector can vary from the targeted performance metrics substantially. Figure 1 shows energy distribution graph of primary user signal and noise where intersection area of upper bound threshold ( 1 ) and lower bound threshold ( 2 ) is known as the confused region and in 0 area primary signal is absent whereas in 1 area noise is absent. In confused region detection, between noise and PU signal is difficult using single threshold. In the proposed adaptive double threshold scheme, the upper bound threshold ( 1 ) is selected according to the maximum noise variance, and the lower bound threshold ( 2 ) is selected according to the minimum noise variance. Further, confused region is divided into four equal levels. If detected energy values ( ) fall in confused region, it will generate its respective decimal values and are compared with threshold ( ) to make a local decision at a fixed probability of false alarm ( ), that is, 0.1. If values lie outside the confused region, it will generate 0 or 1 depending upon signal existence. Thus the numerical results show that proposed scheme enhances the detection performance.
The novelty of this paper is that our main focus is to detect PU signal, if signal is not detected in the first stage, only then the second stage detector will come on picture. To detect PU signal, we proposed two detection stages for sensing the PU signal, MED with fixed threshold is performed in first stage, and ED with adaptive double threshold scheme is performed in the second stage. This detection scheme is applicable to mitigate multipath and shadowing effects of the wireless channels, improve bit error rate (BER) performances, reduce computational complexity, give longer sensing time, and overcome sensing failure problem. Figure 1 shows the energy distribution graph of PU signal and noise. The intersection area is known as confused region. In this region, detection between noise and PU signal is difficult using single threshold. To overcome this problem, we designed adaptive double threshold scheme to determine the local decision at the CR user as the following logic function rule (LR): where is the quantization decision and denotes received signal energy by CR user. In Figure 2, two-bit quantization method divides confused region into four equal quantization intervals as ( 2 ---1 ), D is the equal gap between each quantization levels.
In conventional single threshold case, the false alarm probability can be expressed as [15] where ( ) is the Gaussian tail probability -function, and 2 is the noise variance. Given the target false alarm probability , the threshold can be determined as where −1 ( ) denotes the inverse Gaussian tail probabilityfunction. Assume that the noise uncertainty in the wireless environment is described as where > 1 is a parameter that quantifies the size of the uncertainty. In the proposed double threshold decision, the upper threshold 1 is selected according to the maximum noise variance, and the lower threshold 2 is selected according to the minimum noise variance. Therefore, If detected signals fall inside any of the quantized intervals of the confused region, then it will generate its respective decimal values (DV) as In (11), gives two-bits binary values of the respective quantized levels as shown in (7). Then, the decimal values (DV) check the values of and gives its respective decimal values accordingly. Further, these values are compared with threshold ( ) to make local decision at a fixed , that is, 0.1. Outside the confused region, it will generate 0 or 1 depending upon signal existence.  Figure 4 shows the internal architecture of MED with single threshold ( ). Each ED having single antenna provides promising solution to improve bit error rate, reduce multipath and shadowing effects of the wireless channel, make the process fast, and improve system reliability. There is one PU that contains single antenna, numbers of energy detectors are implemented at each CR users; and each ED having single antennas. Hence, there are number of antennas as well. is number of samples transmitted by PU. In Figure 4, square-law combining (SLC) scheme is not considered since it has spectrum sensing overhead and complexity due to channel estimation. Moreover, a combining scheme based on the sum of the decision statistics of all antennas in the CR is not analytically tractable. Therefore, we assume that each CR contains a selection combiner (SC) that outputs the maximum value out of decision statistics calculated for different diversity branches as = max( 1 , 2 , 3 , . . . , ). It is seen from Figure 4 that individual EDs are allocated to individual antennas. Now, we consider that branch of ED which has maximum gain and compare with a fixed threshold to make a final decision to determine whether the PU is present or absent.

The First Stage (Multiple Energy Detectors with Single/Fixed Threshold) (MED FT).
Suppose that ( ) is the received signal at th antenna for th data stream, sensing channel between PU and CR is assumed to be Rayleigh fading channel, is total number of samples to be sensed by CR, and is number of energy detectors. Hence, the overall output of a MED FT based on selection combiner (SC) scheme is as follows:

MED FT
The first stage local decision rule (LF) used by multiple energy detectors with single threshold is given by

The Second Stage (Energy Detector with Adaptive Double Threshold).
If signal is not detected in stage first, then the second stage detector comes on picture as shown in Figure 5. Figure 5 shows model of ED with adaptive double thresholds (ED ADT). Square-law device detects the signal and shows signal energy ( ). After square-law device, we have two portions named as upper portion and lower portion. In upper portion, if detected energy values ( ) are greater than 1 , it will show 1 (signal presented), if less than 2 , it will show 0 (signal absent). But if detected energy values ( ) fall between 1 and 2 then it will follow lower portion and use quantization method to generate its respective decimal values (DV) as shown in (11). If detected energy values ( ) fall outside or between 1 and 2 , using (4), (7), and (11) it generates value as where and are the output values of upper part, and lower part respectively. After that, values of and are added using adder, Second stage CR-Rx Finally, second stage local decision (LS) is expressed using (14) and (15), which is the final output of ED ADT as follows: Equation (16), comparing the resultant value ( ) to threshold ( ), which is maintaining overall system probability of false alarm ( ) 0.1. If is greater than , signal is present; otherwise, it is absent (see Algorithm 1).

Numerical Results and Analysis
In the present system model, we have assumed total number of samples ( ) as 1000, SNR range varies from −20 dB to 0 dB, = 0.1, number of energy detectors = 2, and QPSK modulation is considered in Rayleigh fading channel. Figure 6 shows the comparative performance of the proposed scheme with other two previous schemes. It is found that our scheme at = 2 yields better results and the detection performance is improved by 12.3% and 14.4% as compared to cyclostationary based sensing method and adaptive spectrum sensing at −8 dB SNR, respectively. Therefore, the proposed method performs well or detects the PU signals under low SNR. In [18], authors presented the practical ranges of low SNR. Figure 7 shows that the proposed scheme with = 2 has minimum error rate as compared to other two previous schemes, that is, 0.1 at −6 dB SNR.
Receiver operating characteristics (ROC) is depicted in Figure 8. ROC curves exhibit the relationship between sensitivity (probability of detection alarm) and specificity (probability of false alarm) [19] of a spectrum sensing method under different SNR values for propose scheme. For = 0.1, = 2, and SNR = −10 dB, probability of detection is in the order of 0.9, which is the spectrum sensing requirement of IEEE 802.22 [20,21].
The spectrum sensing time is the time taken by CR user to detect a licensed PU signal. If the sensing time is increased then PU can make better use of its spectrum and the limit is decided that SU cannot interfere during that much of time. The more the spectrum sensing, the more PUs will be detected and, less will be the interference because PUs can make best use of their priority right. CR users will have more time for data transmission so as to improve their throughput. The sensing time is proportional to the number of samples taken by the signal detector. The more time is devoted to sensing, the less time is available for transmissions and thus reducing the CR user throughput. This is known as the sensing efficiency problem [22] or the sensing-throughput tradeoff [5] in spectrum sensing. Figure 9 shows the graph of spectrum sensing time versus SNR. The proposed scheme requires less sensing time as compared to previously proposed schemes and increases throughput as well. It is observed that there is an inverse relation between spectrum sensing time and SNR. As SNR increases, sensing time decreases. At −20 dB SNR, proposed scheme with = 2 requires approximately 48.9 ms while previous schemes (cyclostationary based sensing method and adaptive spectrum sensing) require around 53.2 ms and 49.0 ms sensing time. It is shown that the proposed scheme requires lesser sensing time as compared to previous schemes, that is, 4.3 ms and 0.1 ms at −20 dB SNR.
where consider is total spectrum sensing time of CR user. and are the first stage and second stage spectrum sensing time of individual CR users, respectively.
In Figure 10, we have plotted the probability of detection ( ) versus threshold value ( ) plots for different SNR values SNR = −4 dB, −6 dB, −8 dB, −10 dB, and −12 dB, it is observed that there is an inverse relation between probability of detection and threshold for a fixed value of SNR. Figure 10 shows that as the value of SNR increases, probability of detection increases up to a level with respect to threshold. For SNR = −4 dB and −6 dB, the probability of detection is approximately 1.0 throughout the range of threshold ( ),    which is maximum as compared to others SNR values. It implies that when = 2, the proposed two-stage detectors can detect PU signal at −10 dB SNR for = 1000 and = 1.8.

Conclusion
In this paper, we have proposed two-stage detectors with multiple energy detectors and adaptive double threshold scheme. This scheme mitigates multipath and shadowing effects, improves BER performances, reduces computational complexity, gives longer sensing time, and overcomes sensing failure problem. Numerical results show that proposed two-stage spectrum sensing scheme outperforms the other two previous schemes by 12.3% and 14.4% at −8 dB SNR. Performance was also measured in terms of sensing time. It is shown that the proposed scheme yields smaller sensing time than cyclostationary detection and adaptive spectrum sensing scheme in the order of 4.3 ms and 0.1 ms at −20 dB SNR, respectively, these increases, throughput as well. Our results indicate that the proposed scheme performs better than previous schemes in terms of spectrum detection and spectrum sensing time.