Spectrum sensing is one of the key tasks in cognitive radio. This paper proposes a fast two-step energy detection (FED) algorithm for spectrum sensing via improving the sampling process of conventional energy detection (CED). The algorithm adaptively selects -point or 2-point sampling by comparing its observed energy with prefixed double thresholds, and thereby is superior in sampling time and detection speed. Moreover, under the constraint of constant false alarm, this paper optimizes the thresholds from maximizing detection probability point of view. Theoretical analyses and simulation results show that, compared with CED, the proposed FED can achieve significant gain in detection speed at the expense of slight accuracy loss. Specifically, within high signal-to-noise ratio regions, as much as 25% of samples can be reduced.

1. Introduction

With the rapid growth of wireless communications, the issue of spectrum resource scarcity has been causing deep concern. Cognitive radio (CR) is considered as an efficient approach to solve this problem via opportunistic spectrum access [1, 2]. In CR systems, the secondary user (SU) is not allowed to access the licensed spectrum that is being occupied by a primary user (PU). Otherwise, if no active PU is found, the vacant spectrum can be utilized [3]. Therefore, the task to detect whether the target PU is present or not, namely, spectrum sensing, is of great significance for CR.

Three classic spectrum sensing technologies are matched filter detection (MFD), cyclostationary feature detection (CFD), and energy detection (ED). MFD is viewed as the most accurate method but requires detailed prior knowledge of PU signal [4]. CFD performs reliably even with very low signal-to-noise ratio (SNR), while its computational complexity is a bottleneck [5]. Compared with them, ED does not require any prior information and consumes little calculation [6] and thereby is widely applied to detect PU.

ED suffers from server performance degradation at low SNR [6]. To improve its performance, [79] present some ED-CFD hybrid schemes that firstly perform ED to search for PU and then reuse the observations to conduct CFD if target PU is not detected by ED. These schemes can achieve better performance under awful noise conditions, while their complexity is high because of CFD. To solve this problem, [1012] consider performing ED twice to avoid CFD. In [10], two thresholds are preset and decisions are made directly in case that the observed energy is either large enough or small enough. Otherwise, the second ED is implemented additionally. This method can improve detection accuracy to some extent but is sensitive to noise uncertainty. An adaptive double-threshold energy detection (AED) method is proposed in [11], which adjusts its thresholds according to SNR to combat noise uncertainty. It should be pointed out that these methods are all committed to improve detection accuracy, while ignoring the importance of detection time. Reference [12] investigates the detection accuracy of AED and analyzes its detection time, indicating that the former is improved at the cost of the latter. Since long detection time impairs system throughput and agility [13], it is necessary to dig into the issue of fast ED.

As is known, the whole detection comprises sampling and calculation processes. Due to the reasons that calculation in ED is rather simple and time required by this process can be neglected, given certain sampling frequency, detection time of ED is mainly determined by its sampling number [14]. In this paper, a fast two-step ED (FED) scheme is proposed via improving the sampling process of conventional energy detection (CED) and reducing its sampling number. This new scheme can achieve great gain in detection speed at the expense of slight accuracy loss. The rest of our paper is organized as follows. CED is briefly introduced in Section 2. In Section 3, FED is discussed and its performance is analyzed. A method to determine the optimal thresholds is also provided. Simulation results are presented in Section 4 and conclusions are drawn in Section 5.

2. Conventional Energy Detection

In CED, whether a target PU is present is determined by comparing the received energy with the preset thresholds, which can be modeled as a binary hypothesis described aswhere represents the received signal at SU’s receiver; and denote the PU signal and the additive noise, respectively; and stand for the hypotheses of PU’s presence and absence, respectively. In this case, the test statistic of CED is given by where denotes the received energy and means the sampling number.

Assume the noise is AWGN with zero mean and unit variance and PU transmits constant-power signal. Since is usually very large, approximately follows Gaussian distributions [15]:where is the received SNR measured by SU.

In CED, SU can make decisions on whether PU is present or not ( or  ) as follows:where is the preset decision threshold.

The detection accuracy of CED is usually evaluated in terms of two metrics, namely, the false alarm probability () and the detection probability ():where and are the conditional probability density functions of under hypotheses and , respectively. According to (3), we can rewrite the probabilities aswhere is the -function.

As for the detection time, since the time required for calculation is negligible, it is mainly determined by the sampling number:where is the sampling frequency. In the rest of this paper, we will discuss the sampling number instead of the detection time for simplicity.

3. Fast Two-Step Energy Detection

3.1. Algorithm Description

FED is proposed based on CED. Assume samples are collected to calculate energy in CED (). We equally divide the samples into two parts, as illustrated in Figure 1(b). By comparing its observed energy with the preset thresholds, FED adaptively chooses -point or -point sampling.

The algorithm of FED is detailed as follows: two thresholds and are preset initially. At the first step, samples are gathered to measure the received energy . If is high enough and greater than , hypothesis will be accepted directly. Otherwise, the second step will be performed:At the second step, other samples will be collected to calculate the received energy . If the average value of and is greater than , will be accepted. Otherwise, will be accepted:

3.2. Detection Accuracy Analysis

Let and denote the false alarm probabilities at the first and the second steps of FED and and represent the corresponding detection probabilities at two steps, respectively. Then we haveNote that is the sampling number of each step.

According to the algorithm, final false alarm probability and final detection probability of FED, namely, and , can be formulated as

Substituting (10) into (11), we get

3.3. Optimization of Double Thresholds

As shown in (12), detection accuracy is closely related to and . In this subsection, we deduce the optimal double thresholds via maximizing for a given . The optimization problem can be described aswhere is the predetermined false alarm probability.

This conditional extreme value model can be solved by Lagrange multiplier method. Define the following:Then the Lagrange function iswhere is a constant. Rewriting and with the error function , we can get

Taking the first-order partial derivative of (17) with respect to and , respectively,and combining (18) and (19) to eliminate , we can get the relationship between and :

Moreover, based on (14), another equation can be obtained as

Consequently, given the parameters , , and , the optimal and can be deduced according to (20) and (21). Based on these two thresholds, we can maximize detection probability subject to certain false alarm probability.

3.4. Average Sampling Number Analysis

The proposed FED scheme adaptively chooses -point or -point sampling. Let and represent the prior probabilities of hypotheses and , respectively. Then the average sampling number of FED can be expressed as

Without loss of generality, assume in this paper. Then we haveSince [16], the bounds of average sampling number in FED are given by

Note that CED always performs -point sampling. So FED certainly collects fewer samples and is faster than CED. In addition, as much as 25% of samples and detection time can be reduced at most compared with CED.

4. Simulation Results

In this section, simulation results are provided to verify the FED algorithm and its theoretical conclusions.

Figures 2 and 3 show final false alarm probability and detection probability of FED algorithm versus , respectively. Simulation settings are , , [17], and . For any given , corresponding is obtained according to (21). As shown in Figure 2, final false alarm probability is always equal to . In other words, a pair of thresholds satisfying (21) ensures that the constraint on false alarm probability is met. In Figure 3, the optimal , which is derived from (20) and (21), is marked on the -axis. Since final detection probability achieves maximum values with the optimal as expected, the effectiveness of (20) and (21) is certainly verified.

In order to evaluate the performances of CED and FED, Figure 4 plots their detection probabilities and average sampling numbers versus SNR under different false alarm constraints with and . According to the top subfigure of Figure 4, in spite of the fact that detection probability of FED is slightly lower, two detection probability curves almost coincide, indicating that detection accuracy of CED and FED is approximately the same. As shown in the bottom subfigure of Figure 4, CED consistently takes 200-point sampling, while the sampling number of FED is between 150 and 200. Since its sampling number is reduced, FED requires less sampling time and completes the detection faster.

In Figure 5, the average sampling number of CED and FED is detailedly compared under different to highlight the superiority of the latter. It can be seen from this figure that, no matter how changes, the sample number of CED is always and that of FED varies from to , which agrees well with (24). Specifically, in the scenarios with high SNR (SU is close to the PU transmitter), samples are reduced and as much as 25% of detection time can be saved.

To demonstrate the effect of on detection performance, Figure 6 plots detection probabilities as well as average sampling numbers of CED and FED versus SNR under different prior probabilities . According to the top subfigure of Figure 6, detection probabilities of these two algorithms are little affected by , while in the bottom subfigure of Figure 6, we can see that the sample number of CED is always and that of FED increases as increases. The reason is that higher means larger possibility of PU’s absence, and FED prefers taking -point sampling when PU is absent.

5. Conclusions

A FED scheme for spectrum sensing is proposed via improving the sampling process of CED. Detection accuracy of this new scheme is analyzed. Moreover, we deal with the optimization problem and provide a method to deduce its optimal double thresholds. The average sampling number of FED is also discussed. We prove that, compared with CED, the proposed FED certainly uses fewer samples and 25% of samples can be reduced at most with high SNRs.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.


This research is supported by the National Natural Science Foundation of China (Grant nos. 61102089, 61201264, 61302095, and 61362018) and Huaqiao University (Grant nos. 12BS219 and 13BS101).