Research Article: Fast Two-Step Energy Detection For Spectrum Sensing
Research Article: Fast Two-Step Energy Detection For Spectrum Sensing
Research Article: Fast Two-Step Energy Detection For Spectrum Sensing
Research Article
Fast Two-Step Energy Detection for Spectrum Sensing
Copyright © 2015 Meiling Lai et al. This is an open access article distributed under the Creative Commons Attribution License,
which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
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.
2. Conventional Energy Detection respectively. According to (3), we can rewrite the probabilities
as
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 as √2𝑛
(6)
{𝑛 (𝑘) 𝐻0 𝜆 − 𝑛 (1 + 𝛾)
𝑦 (𝑘) = { (1) 𝑃𝑑 = 𝑄 ( ),
𝑠 + 𝑛 (𝑘) 𝐻1 ,
{ (𝑘) √2𝑛 (1 + 2𝛾)
where 𝑦(𝑘) represents the received signal at SU’s receiver; ∞ 2
𝑠(𝑘) and 𝑛(𝑘) denote the PU signal and the additive noise, where 𝑄(𝑥) = ∫𝑥 (1/√2𝜋)𝑒−𝑡 /2 𝑑𝑡 is the 𝑄-function.
respectively; 𝐻1 and 𝐻0 stand for the hypotheses of PU’s As for the detection time, since the time required for cal-
presence and absence, respectively. In this case, the test culation is negligible, it is mainly determined by the sampling
statistic of CED is given by number:
𝑛
𝑛
2 𝑇𝑑 = , (7)
𝑉 = ∑ 𝑦(𝑘) , (2) 𝑓𝑆
𝑘=1
where 𝑓𝑆 is the sampling frequency. In the rest of this
where 𝑉 denotes the received energy and 𝑛 means the sam- paper, we will discuss the sampling number 𝑛 instead of the
pling number. detection time 𝑇𝑑 for simplicity.
Assume the noise is AWGN with zero mean and unit var-
iance and PU transmits constant-power signal. Since 𝑛 is 3. Fast Two-Step Energy Detection
usually very large, 𝑉 approximately follows Gaussian distri-
butions [15]: 3.1. Algorithm Description. FED is proposed based on CED.
Assume 2𝑁 samples are collected to calculate energy in CED
{𝑁 (𝑛, 2𝑛) 𝐻0 (𝑛 = 2𝑁). We equally divide the samples into two parts, as
𝑉∼{ (3) illustrated in Figure 1(b). By comparing its observed energy
𝑁 (𝑛 (1 + 𝛾) , 2𝑛 (1 + 2𝛾)) 𝐻1 ,
{ with the preset thresholds, FED adaptively chooses 𝑁-point
or 2𝑁-point sampling.
where 𝛾 is the received SNR measured by SU.
The algorithm of FED is detailed as follows: two thresh-
In CED, SU can make decisions on whether PU is present
olds 𝜆 1 and 𝜆 2 (𝜆 1 > 𝜆 2 ) are preset initially. At the first
or not (𝐻1 or 𝐻0 ) as follows:
step, 𝑁 samples are gathered to measure the received energy
if 𝑉 ≥ 𝜆 𝐻1 𝑉1 . If 𝑉1 is high enough and greater than 𝜆 1 , hypothesis
(4) 𝐻1 will be accepted directly. Otherwise, the second step will
if 𝑉 < 𝜆 𝐻0 , be performed:
3.2. Detection Accuracy Analysis. Let 𝑃𝑓1 and 𝑃𝑓2 denote the maximizing 𝑃𝑑 for a given 𝑃𝑓 . The optimization problem can
false alarm probabilities at the first and the second steps of be described as
FED and 𝑃𝑑1 and 𝑃𝑑2 represent the corresponding detection
probabilities at two steps, respectively. Then we have 𝜆 1 − 𝑁 (1 + 𝛾)
Max: 𝑄 ( )
√2𝑁 (1 + 2𝛾)
𝜆1 − 𝑁
𝑃𝑓1 = 𝑃 (𝑉1 ≥ 𝜆 1 | 𝐻0 ) = 𝑄 ( ),
√2𝑁 𝜆 1 − 𝑁 (1 + 𝛾)
+ (1 − 𝑄 ( )) (13)
𝑉 + 𝑉2 𝜆 −𝑁 √2𝑁 (1 + 2𝛾)
𝑃𝑓2 = 𝑃( 1 ≥ 𝜆 2 | 𝐻0 ) = 𝑄 ( 2 ),
2 √𝑁
𝜆 2 − 𝑁 (1 + 𝛾)
𝜆 1 − 𝑁 (1 + 𝛾) ⋅ 𝑄( )
𝑃𝑑1 = 𝑃 (𝑉1 ≥ 𝜆 1 | 𝐻1 ) = 𝑄 ( ), √𝑁 (1 + 2𝛾)
√2𝑁 (1 + 2𝛾)
𝜆1 − 𝑁 𝜆 −𝑁
Subject to: 𝑄 ( ) + (1 − 𝑄 ( 1 ))
𝑉1 + 𝑉2 𝜆 − 𝑁 (1 + 𝛾) √2𝑁 √2𝑁
𝑃𝑑2 = 𝑃 ( ≥ 𝜆 2 | 𝐻1 ) = 𝑄 ( 2 ). (14)
2 √𝑁 (1 + 2𝛾) 𝜆 −𝑁
⋅ 𝑄( 2 ) = 𝛽,
(10) √𝑁
𝑓 (𝜆 1 , 𝜆 2 , 𝑐) = 𝑃𝑑 (𝜆 1 , 𝜆 2 ) + 𝑐 ⋅ 𝑔 (𝜆 1 , 𝜆 2 ) , (16)
Substituting (10) into (11), we get where 𝑐 is a constant. Rewriting 𝑃𝑑 (𝜆 1 , 𝜆 2 ) and 𝑔(𝜆 1 , 𝜆 2 ) with
the error function erf(𝑥) = 1 − 2𝑄(√2𝑥), we can get
𝜆1 − 𝑁 𝜆 −𝑁 𝜆 −𝑁 𝑓 (𝜆 1 , 𝜆 2 , 𝑐)
𝑃𝑓 = 𝑄 ( ) + (1 − 𝑄 ( 1 )) ⋅ 𝑄 ( 2 ),
√2𝑁 √2𝑁 √𝑁
3 1 𝜆 − 𝑁 (1 + 𝛾)
𝜆 1 − 𝑁 (1 + 𝛾) = − erf ( 1 )
𝑃𝑑 = 𝑄 ( ) 4 4 2√𝑁 (1 + 2𝛾)
√2𝑁 (1 + 2𝛾)
1 𝜆 − 𝑁 (1 + 𝛾)
𝜆 1 − 𝑁 (1 + 𝛾) − erf ( 2 )
+ (1 − 𝑄 ( )) 4 √2𝑁 (1 + 2𝛾)
√2𝑁 (1 + 2𝛾)
1 𝜆 − 𝑁 (1 + 𝛾) 𝜆 − 𝑁 (1 + 𝛾)
𝜆 2 − 𝑁 (1 + 𝛾) − erf ( 1 ) erf ( 2 )
⋅ 𝑄( ). 4 2√𝑁 (1 + 2𝛾) √2𝑁 (1 + 2𝛾)
√𝑁 (1 + 2𝛾)
1 𝜆 −𝑁 1 𝜆 −𝑁
(12) + 𝑐 ( erf ( 1 ) + erf ( 2 )
4 2√𝑁 4 √2𝑁
1 𝜆 −𝑁 𝜆 −𝑁 3
3.3. Optimization of Double Thresholds. As shown in (12), + erf ( 1 ) erf ( 2 ) − + 𝛽) .
detection accuracy is closely related to 𝜆 1 and 𝜆 2 . In this 4 2√𝑁 √2𝑁 4
subsection, we deduce the optimal double thresholds via (17)
4 Journal of Electrical and Computer Engineering
Pf
0.05
and combining (18) and (19) to eliminate 𝑐, we can get the 0.04
relationship between 𝜆 1 and 𝜆 2 : 0.03
0.02
1 + erf ((𝜆 1 − 𝑁 (1 + 𝛾)) /2√𝑁 (1 + 2𝛾))
0.01
1 + erf ((𝜆 1 − 𝑁) /2√𝑁) 0
110 115 120 125 130 135
2 2 2
(−2𝛾𝜆1 +2𝑁𝛾𝜆 1 +𝑁 𝛾 )/4𝑁(1+2𝛾)
⋅𝑒 𝜆2
(20) 𝛽 = 0.1
1 + erf ((𝜆 2 − 𝑁 (1 + 𝛾)) /√2𝑁 (1 + 2𝛾)) 𝛽 = 0.05
= 𝛽 = 0.01
1 + erf ((𝜆 2 − 𝑁) /√2𝑁)
Figure 2: Final false alarm probability versus 𝜆 2 under different 𝛽.
(−2𝛾𝜆2 2 +2𝑁𝛾𝜆 2 +𝑁2 𝛾2 )/2𝑁(1+2𝛾)
⋅𝑒 .
N = 100, 𝛾 = 5 dB, P0 = 0.5
Moreover, based on (14), another equation can be 0.95
obtained as 0.9
𝛽 − 𝑄 ((𝜆 2 − 𝑁) /√𝑁) 0.85
𝜆 1 = 𝑁 + √2𝑁𝑄−1 ( ). (21)
1 − 𝑄 ((𝜆 2 − 𝑁) /√𝑁) 0.8
0.4 500
200 300
190
number
180 250
170
160 200
150 150
−12 −10 −8 −6 −4 −2 0 2
𝛾 100
−12 −10 −8 −6 −4 −2 0 2
𝛾
𝛽 = 0.1, CED 𝛽 = 0.1, FED
𝛽 = 0.05, CED 𝛽 = 0.05, FED N = 300, CED N = 300, FED
𝛽 = 0.01, CED 𝛽 = 0.01, FED N = 200, CED N = 200, FED
N = 100, CED N = 100, FED
Figure 4: Performance of CED and FED versus 𝛾 under different 𝛽.
Figure 5: Comparison of average sampling number under different
𝑁.
𝜆 2 (115.0, 118.3, 124.6), which is derived from (20) and (21),
is marked on the 𝑥-axis. Since final detection probability
achieves maximum values with the optimal 𝜆 2 as expected, N = 100, 𝛽 = 0.05
1
the effectiveness of (20) and (21) is certainly verified.
In order to evaluate the performances of CED and 0.8
FED, Figure 4 plots their detection probabilities and average 0.6
Pd
number of FED is between 150 and 200. Since its sampling 160
number is reduced, FED requires less sampling time and 140
completes the detection faster. 120
In Figure 5, the average sampling number of CED and 100
FED is detailedly compared under different 𝑁 to highlight −12 −10 −8 −6 −4 −2 0 2
the superiority of the latter. It can be seen from this figure 𝛾
that, no matter how 𝑁 changes, the sample number of CED
P0 = 0.1, CED P0 = 0.1, FED
is always 2𝑁 and that of FED varies from 1.5𝑁 to 2𝑁, which
P0 = 0.5, CED P0 = 0.5, FED
agrees well with (24). Specifically, in the scenarios with high P0 = 0.9, CED P0 = 0.9, FED
SNR (SU is close to the PU transmitter), 0.5𝑁 samples are
reduced and as much as 25% of detection time can be saved. Figure 6: Performance of CED and FED versus 𝛾 under different 𝑃0 .
To demonstrate the effect of 𝑃0 on detection performance,
Figure 6 plots detection probabilities as well as average
sampling numbers of CED and FED versus SNR under
different prior probabilities 𝑃0 = 0.1, 0.5, 0.9. According to 5. Conclusions
the top subfigure of Figure 6, detection probabilities of these
two algorithms are little affected by 𝑃0 , while in the bottom A FED scheme for spectrum sensing is proposed via improv-
subfigure of Figure 6, we can see that the sample number of ing the sampling process of CED. Detection accuracy of
CED is always 2𝑁 and that of FED increases as 𝑃0 increases. this new scheme is analyzed. Moreover, we deal with the
The reason is that higher 𝑃0 means larger possibility of PU’s optimization problem and provide a method to deduce its
absence, and FED prefers taking 2𝑁-point sampling when optimal double thresholds. The average sampling number of
PU is absent. FED is also discussed. We prove that, compared with CED,
6 Journal of Electrical and Computer Engineering
the proposed FED certainly uses fewer samples and 25% of of the IEEE 12th International Conference on Computer and
samples can be reduced at most with high SNRs. Information Technology (CIT ’12), pp. 824–827, Chengdu, China,
October 2012.
[12] Q. Su, T. Song, J. Hu, and L. Shen, “Adaptive double-threshold
Conflict of Interests energy detection algorithm for cognitive radio,” Journal of
The authors declare that there is no conflict of interests Southeast University, vol. 27, no. 4, pp. 351–356, 2011.
regarding the publication of this paper. [13] Y.-C. Liang, Y. Zeng, E. C. Y. Peh, and A. T. Hoang, “Sensing-
throughput tradeoff for cognitive radio networks,” IEEE Trans-
actions on Wireless Communications, vol. 7, no. 4, pp. 1326–1337,
Acknowledgments 2008.
[14] S. Peng, X. Yang, S. Shu, P. Zhu, and X. Cao, “Adaptive sequential
This research is supported by the National Natural Sci- cooperative energy detection scheme for primary user detection
ence Foundation of China (Grant nos. 61102089, 61201264, in cognitive radio,” IEICE Transactions on Communications, vol.
61302095, and 61362018) and Huaqiao University (Grant nos. 94, no. 10, pp. 2896–2899, 2011.
12BS219 and 13BS101). [15] J. Ma, G. Zhao, and Y. Li, “Soft combination and detection
for cooperative spectrum sensing in cognitive radio networks,”
References IEEE Transactions on Wireless Communications, vol. 7, no. 11, pp.
4502–4507, 2008.
[1] S. Haykin, “Cognitive radio: brain-empowered wireless com- [16] S.-L. Peng, X. Yang, S. Shu, and X. Cao, “Exploitation of
munications,” IEEE Journal on Selected Areas in Communica- temporal persistence for accuracy improvement in primary user
tions, vol. 23, no. 2, pp. 201–220, 2005. detection,” IET Communications, vol. 4, no. 15, pp. 1855–1864,
[2] C.-S. Sum, G. P. Villardi, M. A. Rahman et al., “Cognitive 2010.
communication in TV white spaces: an overview of regulations, [17] J.-Y. Wu, C.-H. Wang, and T.-Y. Wang, “Performance analysis
standards, and technology,” IEEE Communications Magazine, of energy detection based spectrum sensing with unknown
vol. 51, no. 7, pp. 138–145, 2013. primary signal arrival time,” IEEE Transactions on Communi-
[3] Y. Zeng, Y.-C. Liang, A. T. Hoang, and R. Zhang, “A review on cations, vol. 59, no. 7, pp. 1779–1784, 2011.
spectrumsensing for cognitive radio: challenges and solutions,”
Eurasip Journal on Advances in Signal Processing, vol. 2010,
Article ID 381465, 15 pages, 2010.
[4] I. F. Akyildiz, W.-Y. Lee, M. C. Vuran, and S. Mohanty, “NeXt
generation/dynamic spectrum access/cognitive radio wireless
networks: a survey,” Computer Networks, vol. 50, no. 13, pp.
2127–2159, 2006.
[5] N. Sai Shankar, C. Cordeiro, and K. Challapali, “Spectrum agile
radios: utilization and sensing architectures,” in Proceedings
of the 1st IEEE International Symposium on New Frontiers in
Dynamic Spectrum Access Networks (DySPAN ’05), pp. 160–169,
November 2005.
[6] F. F. Digham, M.-S. Alouini, and M. K. Simon, “On the energy
detection of unknown signals over fading channels,” IEEE
Transactions on Communications, vol. 55, no. 1, pp. 21–24, 2007.
[7] S. Maleki, A. Pandharipande, and G. Leus, “Two-stage spectrum
sensing for cognitive radios,” in Proceedings of the IEEE Inter-
national Conference on Acoustics, Speech, and Signal Processing
(ICASSP ’10), pp. 2946–2949, Dallas, Tex, USA, March 2010.
[8] Z. Khalaf, A. Nafkha, J. Palicot, and M. Ghozzi, “Hybrid
spectrum sensing architecture for cognitive radio equipment,”
in PRoceedings of the 6th Advanced International Conference
on Telecommunications (AICT ’10), pp. 46–51, Istanbul, Turkey,
August 2010.
[9] Y. Zhang, L. Zhang, and C. Tang, “Joint detection of cyclo-
stationary and energy in cognitive radio,” in Proceedings of
the IEEE International Conference on Intelligent Systems and
Knowledge Engineering (ISKE ’10), pp. 182–186, Hangzhou,
China, November 2010.
[10] J.-B. Wu, T. Luo, and G. Yue, “An energy detection algorithm
based on double-threshold in cognitive radio systems,” in
Proceedings of the 1st International Conference on Information
Science and Engineering (ICISE ’09), pp. 493–496, IEEE, Nan-
jing, China, December 2009.
[11] J.-Q. Xie and J. Chen, “An adaptive double-threshold spectrum
sensing algorithm under noise uncertainty,” in Proceedings
International Journal of
Rotating
Machinery
International Journal of
The Scientific
Engineering Distributed
Journal of
Journal of
Journal of
Control Science
and Engineering
Advances in
Civil Engineering
Hindawi Publishing Corporation Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014
Journal of
Journal of Electrical and Computer
Robotics
Hindawi Publishing Corporation
Engineering
Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014
VLSI Design
Advances in
OptoElectronics
International Journal of
International Journal of
Modelling &
Simulation
Aerospace
Hindawi Publishing Corporation Volume 2014
Navigation and
Observation
Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014
in Engineering
Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014
Engineering
Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014
Hindawi Publishing Corporation
http://www.hindawi.com
http://www.hindawi.com Volume 2014
International Journal of
International Journal of Antennas and Active and Passive Advances in
Chemical Engineering Propagation Electronic Components Shock and Vibration Acoustics and Vibration
Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation Hindawi Publishing Corporation
http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014 http://www.hindawi.com Volume 2014