Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

An Adaptive Threshold Based Energy Detector for

Spectrum Sensing in Cognitive Radios at Low SNR



Prashob R Nair, A. P. Vinod
School of Computer Engineering,
Nanyang Technological University,
Singapore
Email: pras0022@e.ntu.edu.sg
Anoop Kumar Krishna
EADS Innovation Works,
EADS Singapore Pte Ltd.,
Singapore

Abstract- The performance of a cognitive radio system depends
on how well it can maximize the usage of a free frequency band
without causing any interference to the primary user. Thus the
abilities to detect a primary user as well as to avoid any false
alarm are of paramount importance for such a system. For
energy detector based spectrum sensing in cognitive radios, these
abilities are influenced by the threshold set to distinguish signal
from noise. Conventional energy detectors are based on a fixed
threshold. This may not be optimum in low SNR conditions
where the performance of fixed threshold based detector can
vary from the targeted performance metrics substantially. In this
paper, we propose a method to change the threshold based on the
number of samples, to optimize the detection parameters,
namely probability of detection and probability of false alarm.
We also introduce a control parameter which is used to vary the
set threshold and thereby obtain a response more suited to the
operational requirements than that obtained by a fixed threshold
based energy detector. Simulation results are presented to show a
different perspective of the importance of the sensing time to the
performance metrics of the energy detector.

Keywords - Adaptive threshold, cognitive radio, sensing time.

I. INTRODUCTION

Cognitive radio systems are increasingly receiving lot of
attention in recent times due to the immense possibilities it
offers in utilizing the scarce electromagnetic spectrum
resource we have at our disposal. This was partly fueled by a
document released by Federal Communication Commission
(FCC) which showed that up to 70% of spectrum allocated to
users are not utilized [1]. This study prompted the thinking on
how best to optimize the usage of the available spectrum so
that more users can be accommodated in the same band
without causing any harm to the licensed user.

An important requirement in a cognitive radio system is its
ability to sense the spectrum to locate the vacant spectrum
bands (holes). The standard techniques to sense the spectrum
have been broadly classified into three categories: energy
detector, cyclostationary feature based detector and matched
filtering based detector [2]. There is vast amount of literature
available on the advantages and disadvantages of each method
[3]. Among these three methods, the energy detector is
commonly used due to its simplicity and low computational
complexity.
The performance metrics of a cognitive radio system is
defined by its ability to detect a primary user correctly. This is
called the probability of detection (P
d
) of the cognitive radio
system. The higher the probability of detection, the better is
the chance that the presence of the primary will be correctly
identified by the cognitive radio. This would allow the
cognitive radio to stop transmission so that it does not cause
any interference to the primary user. Another important metric
that defines the performance of a cognitive radio is its ability
to minimize the false alarms raised. This is given by the
probability of false alarm (P
fa
) of the system. A low P
fa
will
ensure that the throughput of the cognitive radio system is not
effected by false alarms raised about the presence of primary
user. Thus, P
d
and P
fa
determine the performance parameters
of the cognitive radio. In practical scenarios, the operational
requirement could be to cause no interference to the primary
user (PU) (requires a high P
d
throughout) or maximize the
throughput of the cognitive radio (requires a low P
fa

throughout). Both the requirements involve a tradeoff in the
threshold. Thus if P
d
is increased then invariably it leads to an
increase in P
fa
. On the other hand, if P
fa
is set low then it leads
to a low P
d
as well. These tradeoff have been known and
discussed in [5, 8, 9].

The metric P
d


of an energy detector depend on parameters
like the number of samples (N), the Signal to Noise ratio
(SNR), the noise variance (
n
) and the threshold selected for
making the decision of presence or absence of signal ().
,
On
the other hand, P
fa
does not need the information on of the
system. The equations which deal with these parameters will
be presented in the sections to follow.

The available literature on setting a threshold suggest fixing
a target P
fa
, which is called the Constant False Alarm Rate
(CFAR) principle

or by setting a target P
d
, which is called a
Constant Detection Rate (CDR) principle [6]

and then
calculating the threshold required to achieve the same. Since
setting the threshold based on P
d
requires information about
the of the channel, conventional practice is to set the
threshold based on a target P
fa
[3]. Once the threshold is set, it
is no longer changed even though the channel conditions
might have changed and more information about the channel
might be known. A fixed threshold which is neither CFAR
based nor CDR based can also be set, for instance as in [6].
But the fundamental tradeoff between a high P
d
and low P
fa

cannot be avoided. However, conventional fixed threshold
based energy detector does not perform very well in low SNR
978-1-4244-7006-8/10/$26.00 2010 IEEE
574
environment. There are some techniques presented which
discuss adaptively setting the threshold and multi-level setting
of threshold [7, 8, 11, 12]. In [7], the authors calculate the
threshold adaptively based on the input signals mean and
standard deviation and thus do not depend on the noise
variance and SNR, but the analysis is restricted to positive
(relatively high) SNR channels. A different perspective is
discussed in [8] to vary the threshold adaptively. Here the
author sets the threshold based on physical parameters like the
transmission power of the PU, secondary user (SU), the
distance between the PU and the SU, minimum decodable
signal to interference noise ratio. The threshold is changed
adaptively by changing the transmission power of the SU.
Changing the threshold after each sensing cycle is discussed in
[11, 12]. In [11], the operating environment considered is a
Suzuki channel with relatively high SNR values while the
algorithm to change the threshold in [12] is different from
what we have considered.

In this paper, we present a new perspective to the way setting
a threshold can impact the performance metric of an energy
detector and use it to develop an algorithm to suit a particular
operational need. The paper also discusses how the algorithm
can be modified for different operational requirements. We
introduce a parameter, , which is used to vary the threshold
adaptively as and when required so as to maintain the
performance characteristics within the required range.
Theoretically predicted values of the number of samples
required to maintain the performance metrics have been
validated using simulation results thereby offering new
insights on framing an effective strategy to vary the threshold.

The rest of the paper is organized as follows. In section II,
we analyze the performance metrics of the energy detector.
Section III presents the proposed adaptive threshold setting to
optimize the performance metrics. Section IV presents the
discussion of the results of our proposed approach. Finally we
present our conclusions in section V.


II. ANALYSIS OF ENERGY DETECTOR METRICS

A. Basic Sensing Model






Fig. 1 Conventional energy detector block diagram.

Fig.1 shows the basic block diagram of energy detector. The
bandpass filtered (BPF) signal is digitized using the ADC,
squared and averaged to get an estimate of the received signal
energy. As mentioned in Section I, one of the primary tasks of
a cognitive radio is to detect the presence of PU in the
spectrum of interest. Let s[n] represents the PU signal and
w[n] represents the noise introduced by the transmission
channel. Then the signal sensed by the cognitive radio can be

] [ ] [ n w n y = : H0 (1)

OR,
] [ ] [ ] [ n w n s n y + = : H1 (2)


H0 is the hypothesis that the PU is not transmitting and hence
s[n] is 0, while H1 is the hypothesis that the PU is using the
channel for transmission.

Thus the aim of a cognitive radio system is to sense the
spectrum and decide on one of the two hypotheses it estimates
the channel is in. The cognitive radio system makes this
decision based on the threshold () it sets to discriminate
between the presence and absence of signal. It is this threshold
which, therefore, determines the performance metrics, P
d
and
P
fa
of the system.

For the sake of simplicity, we have assumed the primary
signal and the noise to be an independent and identically
distributed (iid) random process with zero mean and of
variances,
s
2
and
n
2
respectively. The SNR () is, therefore
given as =
2
2
n
s

.
The test statistic is given by

) ( y Z =
N
1
*

=
N
n 1
|y[n]|
2
(3)

For large N, the test statistic Z(y) has a normal distribution
with mean
i
and variance
i
under hypothesis H
i
(i = 0,1) [5].
The mean and variance of the test statistic have been shown,
using the results in [9, 10]:

0 =
2
n (4)
0 =
N
n
2

(5)
1 =
2
n *(1+ ) (6)
1 = 0 *
) 1 2 ( +
(7)

The probability of false alarm, P
fa,
of such a system is given by

) 0 | ) ( ( H y Z P Pfa > = (8)

For a sufficiently large number of samples, N, P
fa,
is [9]:

fa P =Q(
0
0


) (9)

Similarly the probability of detection, P
d,
of such a system is
given by

BPF ADC ( )
2

T

Z(y)>
or
Z(y)<
575
) 1 | ) ( ( H y Z P Pd > = (10)
P
d
can be expressed as

d P =Q(
1
1


) (11)

where Q(x) is defined by the complementary distribution
function of the standard Gaussian and is given as

Q(x) =

x
u
du e
2 /
2
2
1

(12)
As seen from (9) and (11), the threshold, , can be set for a
target P
fa
or P
d.
For the sake of notational simplicity we will
denote a threshold derived using (9) as
f
and the one derived
using (11) as
d
. It is clear from (6), (7) and (11) that setting a
threshold based on target P
d
requires information about , i.e.
SNR of the channel.

B. The Problem Statement

An energy detector based on threshold calculated for a
target P
fa
works well in high conditions. But when is less
than -15dB, the performance of the energy detector leaves
much to be desired [4]. On the other hand, if we assume that
of the channel is available, then it can be used to calculate the
threshold for a target probability of detection using (11).



(a)



(b)

Fig. 2.(a) Probability of detection (b) Probability of false alarm of energy
detector for the two thresholds f and d at a SNR of -15dB. Target Pd = 0.9
and Pfa =0.01

The performance of such a detector is steady and meets the
target probability of detection in low scenarios but the
tradeoff is that the corresponding P
fa
also increases beyond the
targeted value. The simulation results to demonstrate this are
shown in Fig. 2. Since the knowledge of is not available, at
least initially when the system powers ON, the conventional
energy detectors calculate their threshold based on target P
fa

[3] by using (9) and then observe the probability of detection
they can manage for the system. This, as explained above, has
the disadvantage that if is less than the expected range, the
performance is severely affected.

From Fig. 2 we can see that as long as the sensing time is
short and consequently the number of samples less than N
c
, a
conventional
f
threshold based detector will give a very poor
probability of detection metric. Thus, in practical scenarios
where increasing the sensing time to get the desired number of
samples, N
c
, is not feasible, we may have to choose some
other option.

In the next section, we explain how a strategy can be
devised to change the threshold from one based on P
fa
to a
threshold based on P
d
to better the performance metric.


III. PROPOSED SYSTEM MODEL

A. System Block Diagram and Analysis










Fig. 3. Block diagram of proposed energy detector using adaptive setting of
threshold.

Fig. 3 shows the block diagram of the proposed energy
detector. One of the key units is the SNR estimator which is
used to give an estimate of the channel condition. This
information coupled with other parameters, as explained later,
would allow the Threshold Setter module to choose the right
threshold so as to optimize the performance metric.

Using (9) and (11) and substituting the mean and variance
values from (4) to (7), it can be easily shown that sensing
time, or in other words, the number of samples, N, is related to
P
fa
, P
d
and , as

[ ]
2
1 1
2
1 2 * ) ( ) (
1
+ =

d fa c P Q P Q N (13)
This derived equation matches with the one in [9]. The
significance of this is that it gives the critical number of
BPF ADC ( )
2

T

Threshold
Setter
SNR
Estimator
576
samples, N
c
, required to achieve the target metrics (P
d
& P
fa
).
In other words, by varying the sensing time of the signal and
choosing an appropriate threshold depending on the sensing
time, we can achieve a result to suit the requirements.
Knowing the critical samples to achieve the target P
d
& P
fa
,
we can use it to decide on how best to switch the threshold
from one value to another. To do this, we introduce a control
parameter, , which can be changed to vary the threshold from

f
to
d
. The threshold

is given as

) ( f d f + = , 1 0 (14)

At a simple level, can take a binary value of 0 or 1, thereby
changing the threshold from
f
to
d
. The results for other
values of have also been simulated. Please note that the
value of chosen here are for illustration purposes only. Any
value of within the range [0,1] can be chosen.

B. The Adaptive Approach

Having established the system model, we now present the
approach that can be taken to improve upon the performance
metrics in low channel conditions. We suggest that the
cognitive radio can set the threshold to
f
on startup and then
immediately do an estimation of the channel . Then using
(13) it can calculate the critical samples it needs to reach the
target performance metrics. If the operational requirement
allows the cognitive radio to sense the channel long enough to
get the required number of samples, i.e. N N
c
then the
threshold can be maintained at
f
. Or if the requirement is
more stringent on maximizing the throughput of the system,
then the threshold can be switched over to
d
by changing to
1. On the other hand, if the practical requirements do not allow
the cognitive radio to sense for long, i.e. N < N
c,
then by
changing suitably, the desired response can be obtained
albeit at the cost of the other performance metric.

IV. DISCUSSION

An analysis of the response given in Fig. 4 brings the
following into light.
1. As the value of reaches changes from 0 to 1, the curve
obtained moves away from the graph obtained for
f
to the one
obtained for
d
.
2. There is always a tradeoff involved in choosing one
metric over the other.
3. The best response of the energy detector is depended on
the channel conditions, the sensing time available on hand and
the operational requirements.
Let us elaborate on the third aspect to see the merits of
having an adjustable parameter to suit the operating
environment. As discussed earlier, a cognitive radio system
can have two broad but conflicting operational requirements.
It could be either to cause least interference to the primary
user (thus necessitating a high P
d
) or to maximize the
throughput of the cognitive radio to utilize the channel to the
maximum extent (thereby requiring a very low P
fa
) but at the
risk of interfering with the primary user. The algorithm given
in Fig. 5 is for an environment where detecting the PU is the

(a)

(b)
Fig.4.(a) Probability of detection (b) Probability of false alarm of energy
detector using adaptive setting of threshold for various values of at SNR of -
15dB and target Pd and Pfa of 0.9 and 0.01 respectively.

more important metric than the throughput of the cognitive
radio system. In such a situation, keeping the probability of
detection high should be of more concern than the false alarm
probability.





















Fig.5. Algorithm to keep the probability of detection of primary user at high
levels by varying .
Estimate SNR
Is N
> N
c

Calculate N
c

> 0, =
f

> 1, =
d

Input Samples
N
Yes
No
577
Thus, if the system finds that it is has to operate with less
number of samples than the critical samples, N
c
, due to time
constraints, then the cognitive radio system can opt for
d
as
the threshold to differentiate the test statistic and thus manage
to keep the detection chances high. The algorithm is suitable
and can be easily modified for a cognitive radio system
requiring high throughput. If the requirement is to have an
average detection probability and average false alarm
probability, then can be set to 0.5 and thus a compromise
can be achieved which would otherwise be not possible in a
conventional fixed threshold based energy detector.

V. CONCLUSION

Setting the threshold level of an energy detector is the key
parameter that determines its performance metrics vis a vis the
ability to detect the primary user correctly and the ability to
discriminate a false alarm. Ideally an energy detector should
have a high probability of detection and a very low probability
of false alarm, but practically there is always a tradeoff
between the two parameters.

In this paper we have shown how the tradeoff can be
managed in the best possible way by using a adaptive
threshold. We present a new perspective to the role of the
sensing time in determining the performance metric in low
SNR channels. We have also shown that the critical number of
samples required should be calculated by the system by
estimating the SNR so as to determine how best to vary the
threshold to get the desired curve for the given operating
environment. Further research can be done to compare the
performance of the CR system with other adaptive techniques
to show the merits of the proposed technique.

REFERENCES

[1] Federal Communications Commission, "Notice of proposed rule making
and order: Facilitating opportunities for flexible, efficient, and reliable
spectrum use employing cognitive radio technologies", ET Docket No
03-108, Feb. 2005-73.
[2] D. Cabric, S. Mishra, and R. Brodersen, "Implementation issues in
spectrum sensing for cognitive radios" in Proc. Asilomar Conf. on
Signals, Systems and Computers, Nov. 2004, vol. 1, Pacific Grove,
California, USA, pp. 772776.
[3] T Yucek and H Arslan, "A Survey of Spectrum Sensing Algorithms for
Cognitive Radio Applications", IEEE Communications Surveys &
Tutorials, vol. 11, No. 1, pp. 116-130, 2009.
[4] A. Sahai, N. Hoven, and R. Tandra, "Some fundamental limits on
cognitive radio", in Proc. Allerton Conf. on Commun., Control, and
Computing, Oct. 2004, Monticello, Illinois.
[5] H. Urkowitz, "Energy detection of unknown deterministic signals",
Proc. IEEE, vol. 55, pp. 523531, Apr. 1967.
[6] Zhuan Ye, G Memik, John Grosspietsch, "Energy Detection using
Estimated Noise Variance for Spectrum Sensing in Cognitive Radio
Networks", in Proc. Wireless Communication and Networking
Conference, April 2008, Las Vegas, NV, pp. 711 - 716..
[7] A Gorcin, Khalid A Q,H Celebi, H Arslan, "An Adaptive Threshold
Method for Spectrum Sensing in Multi Channel Cognitive Radio
Networks", in Proc. IEEE 17th International Conference on
Telecommunications (ICT), April 2010, Doha, Qatar, pp. 425-429.



[8] H H Choi, K Jang, Y Cheong, "Adaptive Sensing Threshold Control
Based on Transmission Power in Cognitive Radio Systems",
Cognitive Radio Oriented Wireless Networks and Communications, May
2008, Singapore, pp. 1 -6.
[9] Y C Liang, Y Zeng, E C Y Peh, A T Hoang, "Sensing Throughput
TradeOff for Cognitive Radio Networks", IEEE Transactions on
Wireless Communications, vol 7, No.4, April 2008, pp. 1326-1337.
[10] A.Sonnenschien and P.M.Fishman, "Radiometric Detection of Spread
Spectrum Signals in Noise of Uncertain Power", IEEE Transactions on
Aerospace and Electronic Systems, volume: 28 , No: 3, July 1992, pp.
654 - 660.
[11] J W Lee, J H Kim, H J Oh and S H Hwang, "Energy Detector using
Adaptive-Fixed Threshold in Cognitive Radio Systems", In Proc. 14th
Asia-Pacific Conference on Communications, Oct. 2008, Tokyo, Japan,
pp. 1-4.
[12] Shi et al, United States Patent Pub. No: US 2010/0081387 A1, Apr. 1,
2010.
578

You might also like