You are on page 1of 41

Spectrum sensing for Cognitive Radios

Vinod Sharma
Department of Electrical Communication Engineering
Indian Institute of Science
Bangalore, India
February 25, 2012
Outline
Introduction.
One shot detection.
Sequential detection.
Cooperative distributed detection.
DualCUSUM.
DualSPRT.
Conclusions.
Introduction
Detection of spectral hole in TV spectrum
Timing of TV broadcast in dierent frequency bands known
before hand.
Thus detecting hole in time not an issue.
Detection in space: Want to know in space where spectrum
is available even when TV station is broadcasting.
Issues involved
TV broadcast
Primary
Secondary
Secondary
transmitter
receiver
receiver
o Primary receiver should not get interference from secondary
transmitter when primary is also transmitting.
o Secondary receiver should not get interference from Primary
transmitter when secondary is transmitting.
o Secondary transmitter needs to know when it can transmit (it
should sense primary signal).
But primary signal at secondary receiver and secondary signal
at primary receivers are deciding factors.
o Secondary needs to detect primary signal at very low SNR
(upto -20 dB).
Detection in time
Sharing of spectrum by IEEE 802.11 and bluetooth in
unlicensed spectrum.
Secondaries using cellular spectrum.
t
lost opportunity
Primary
ON
OFF
to primary
Interference
detected change
Issues
Primary may have bursty trac.
Primary ON, OFF times may be in msec.
Thus secondary needs to detect onset of primary and
switching OFF in real time.
For low interference to primary and high spectral eciency for
secondary, detection delay for ON and OFF should be very
small.
Other general issues in spectrum sensing
Time varying channel gains cause variable received power.
Hidden terminal problem (Cognitive radio may be hidden from
primary transmitter).
Primary Signal and/or secondary receiver noise unknown.
Dierent primary users may use dierent modulation schemes,
transmit powers.
Receiver noise can vary in time due to other uncontrolled
electromagnetic disturbances in neighborhood.
Thus spectrum sensing algorithms should be fast, robust and
detect signal at very low SNR.
Other general issues in spectrum sensing
Signal detection by multiple cognitive users sensing signals at
various places and collaborating with each other is necessary.
Secondary
Primary
Secondary
Secondary
Secondary
fusion node
1
Primary 2
Sensing Techniques
Energy Detection
Matched Filtering
Provides optimal detection performance.
But requires prior knowledge of primary signal : even
information about pilots or preamble can be exploited.
Cyclo-stationary feature detection
The autocorrelation is periodic. This enables detection under
very low SNR.
Robust in low SNR and robust to interference.
Requires partial knowledge of primary signal and has high
computational cost.
Energy Detection is widely used: simple, optimal under no
knowledge of primary signal.
Statistical Inference Problems
1
Detection / Estimation.
Detection Problems:
1
Centralized / Decentralized.
2
One shot vs sequential.
3
Bayesian vs NonBayesian.
4
Detection of change.
Centralized Detection/One shot
Observations: X
1
, ..., X
n
.
Observations came from distribution P
0
, P
1
.
Hypothesis: H
1
: Primary present.
H
0
: Primary not present.
Performance Criterion: Problem of correct detection:
P[Decision H
i
| Observations from H
i
].
Problem of False Detection:
P[Decision H
i
| Observations from H
j
], j = i .
boundary
detection
NP Formulation
Maximize P[H
1
|H
1
]
subject to P
FA

= P[H
1
|H
0
]
Optimal Test: LRT:
Decide H
1
if
R
n

=
P[X
1
, ..., X
n
|H
1
]
P[X
1
, ..., X
n
|H
0
]
>
Otherwise H
0
.
is decided by constraint P
FA
= .
NP Formulation
Ex. Detecting spectral hole in space
Energy detector:
Observations : X
1
, ..., X
N
.
Under H
0
: X
i
= N
i
N(0, 1).
H
1
: X
i
= hS
i
+ N
i
N(h, 1).
E = Energy over N samples, collected by the energy detector
=

N
i =1
X
2
i
E f
0
= central chi-square of order N : H
0
f
i
= Noncentral chi-square of order N and parameter
Nh
2
: H
1
For NP test, compare
f
1
(E)
f
0
(E)
with .
Bayesian Formulation
Let p be a apriori probability of H
0
.
Compute aposteriori probability of H
0
:
= P(H
0
|X
1
, ..., X
n
)
=
p(X
1
, ..., X
n
|H
0
)p
p(X
1
, ..., X
n
)
Similarly for H
1
.
Decide H
0
if P(H
0
|X
1
, ..., X
n
) > P(H
1
|X
1
, ..., X
n
)
H
1
otherwise.
This minimizes Aposteriori probability of error.
Centralized sequential Detection (SPRT)
Used when taking each observation has a cost
X
1
, X
2
, ..., observations from P
0
or P
1
.
Stop sampling at N where
N = inf {n 1 :
R
n
=
P
1
(X
1
, ..., X
n
)
P
0
(X
1
, ..., X
n
)
A or B}
where A > 1 > B > 0 and A, B are chosen s.t.
P
0
[R
N
A] = and P
1
[R
N
B] =
Decide H
1
if R
N
A otherwise H
0
.
This test minimizes the number of observations needed under
H
0
and H
1
while satisfying constraints on the above two types
of error.
Centralized Sequential Detection
Extensions available to
Multiple hypothesis.
Composite hypothesis.
Nonparametric / Semiparametric
Centralized sequential Detection of change
Observations:
X
1
, X
2
, ..., X

. .
iid with dist P
0
, X
+1
, ..., X
n
. .
iid with dist P
1
Problem:
Detect if there is a change.
Estimate time of change.
Sequential Detection of change
Pages CUSUM test
N = inf {n : max
1kn
n

i =k
log
P
1
(X
i
)
P
0
(X
i
)
C

}
where C

is s.t. E
0
[N] = .
This rule minimizes the worst case expected delay:
Sup
1
ess sup E

[(T + 1)
+
|X
1
, ..., X
1
]
over the set of all rules T with E
0
[N] .
Above test is equivalent to (for iid observations) the recursive
formula :
inf
_
n : W
n
C

where W
n+1
=
_
W
n
+ log
P
1
(X
n
)
P
0
(X
n
)
_
+
_
Comment: Shiryayev addressed the Bayesian version of this
problem
Distributed (Cooperative) Sequential Detection
X
1n
X
1 M
Y
1n
Y
Fusion
center
Mn
Mn
M sensor nodes make observations X
in
.
Y
in
are transmitted based on X
i 1
, ..., X
in
Fusion center makes decision based on
Y
in
, i = 1, ..., M, n = 1, 2, ....
Distributed (Cooperative) Sequential Detection
For distributed algorithm various options available :-
Y
in
= g(X
in
, X
in1
, ..., X
i 1
)
Each sensor i makes a decision and sends to fusion node.
Sensor i can decide via
Past N observations
CUSUM
Shiryayev algorithm
Fusion node uses Y
in
, from all sensors and makes decision
based on one of above procedures
Dual CUSUM
CUSUM at sensor i:
W
i (n+1)
= (W
in
+ Z
in
)
+
(uses all past information)
Z
in
= log
_
P
1
(X
in
)
P
0
(X
in
)
_
Y
in
= b if W
in
>
i
(saves energy).
No transmission otherwise
Fusion node
Observation at fusion node :
X
n
=
M

i =1
Y
in
+ N
n
(Physical layer fusion)
CUSUM
W
n+1
= (W
n
+ Z
n
)
+
where Z
n
= log
_
f
I
(X
n
)
f
0
(X
n
)
_
Detection of change:
Declare change if W
n
>
Parameters
i
, b, , I selected to optimize performance.
Distributed (Cooperative) Sequential Detection
6 4 2
0
15
Shiryaev Centralized
LeenaRajesh
DualCUSUM
Figure: E[( T)
+
] vs. ln(P
FA
)
Analysis of EDD
Performance analysis of Dual CUSUM complicated.
Obtained approximate analysis.
L I EZ
k
P
FA
P
FA
E
DD
E
DD
Anal Sim Anal Sim
Gauss 2 1 15 18 0.005 -0.3 0.98e-4 1.09e-4 58.69 59.96
5 2 15 18 0.005 -0.3 1.224e-4 1.1e-4 42.48 41
10 2 15 18 0.005 -0.3 2.43e-4 2.28e-4 29.72 32
Laplace 2 1 16 16 0.005 -0.3 1.59e-4 1.6e-4 60.52 61
6 2 16 16 0.005 -0.3 2.57e-4 2.06e-4 41.81 40
12 3 16 16 0.005 -0.3 6.65e-5 5.5e-5 29.48 33.6
Lognormal 2 1 20 20 0.005 -0.3 8.98e-4 8.8e-4 75.9 78.5
5 2 25 20 0.005 -0.3 1.47e-4 1.76e-4 74.06 71.7
10 2 25 20 0.005 -0.3 2.97e-4 3.5-4 60.6 59.1
Pareto K = 50 2 1 20 25 0.005 -0.3 1.28e-4 0.99e-4 79.24 83.52
Pareto K = 10 2 1 10 12 0.005 -1 5.12e-4 6.77e-4 16.71 17.48
Pareto K = 2.1 2 1 30 35 0.0005 -2 4.2e-3 4.65e-3 37.74 37.1
Table: Comparison of P
FA
for various distributions at the fusion node. For E
DD
we
have used b = 1.
Comparison (for Energy Detector (chi-square)) with other
algorithms
Each secondary node computes the received energy of the last
N samples.
For comparison, simple energy detectors compare the energy
received with a threshold and decide between H
0
and H
1
. At
fusion center simple fusion rules are used.
EDD P
FA
= 0.1 P
FA
= 0.027 P
FA
= 0.01
OR 5.27 13.90 25.85
AND 4.55 9.32 15.31
MAJORITY 2.30 5.06 8.29
MAJORITY+CL 2.34 5.16 8.54
DualCUSUM 1.78 2.60 3.25
Energy Saving Comparison
A condence level based algorithm where each secondary
nodes transmit its decision only if the condence of its
decision is high enough
Energy ecient techniques for cooperative spectrum sensing
in cognitive radios, C.Lee and W.Wolf, IEEE CCNC, Jan 2008.
ETR-denotes the average number of transmissions by a
secondary node, till the fusion center declares a change.
ETR P
FA
= 0.1 P
FA
= 0.027 P
FA
= 0.01
Majority+CL 18.83 24.17 28.38
Linear Cooperation 18.75 21.62 23.48
DualCUSUM 2.38 2.15 1.98
Comments
DualCUSUM needs channel gains and noise statistics in each
secondary node.
SNR Wall: Using one shot algorithm when noise power is
uncertain, below a certain SNR, it is not possible to detect
Primary.
We modify DualCUSUM to use under uncertainty. This does
not have an SNR wall.
Modications of DualCUSUM for Parameter Uncertainty
X
kl
f
0
before change.
f

after change.
CUSUM declares change at
= inf {k : max
1tk
k

i =t
log
f

(X
k
)
f
0
(X
k
)
> }
If is not known ( parametric uncertainty after change) then
GLR declares change at
= inf {k : max
1tk
(sup

i =t
log
f

(X
k
)
f
0
(X
k
)
) > }
MGLR-CUSUM
If noise variance
2

_
1

2
n
,
2
n
_
S
l
N(0, p
l
)
Then
1
N
N

i =1
X
2
il
N(
2
,
2
4
N
) before change
N(P
2
l
+
2
, 2(P
l
+
2
)
2
/N] after change
Thus if
2
has uncertainty, the distribution before and after
change have unknown parameter).
This requires modication to GLR (we call it MGLR)
This algorithm works better than Lai, Fan, Poor (Globecom
2008).
We use this algorithm at local nodes and CUSUM at fusion
node (assuming noise variance at fusion node is known).
MGLR-CUSUM
Ex. Detecting a sequence of ON OFF ON changes in
a Primary via MGLR-CUSUM. SNR is below the SNR wall.
Comparison with Edge-detection algorithm in (Parsha, Gohari,
Sahai, IEEE DySPAN, Oct 2008)
EDD P
FA
= 0.12 P
FA
= 0.05 P
FA
= 0.03
-10dB -4dB -10dB -4dB -10dB -4dB
Edge-Detection 61.5 16.0 76.0 21.5 83.0 24
MGLR-CUSUM 27.0 3.3 40.0 4.6 51.0 5.1
Table: MGLR-CUSUM vs. Edge-Detection
MGLR-CUSUM
Figure: Detecting Sequence of ON-OFF
DualSPRT Algorithm
Decentralized sequential hypothesis testing
1
Node, l , runs SPRT algorithm,
W
k,l
= W
k1,l
+ log [f
1,l
(X
k,l
) /f
0,l
(X
k,l
)] , W
0,l
= 0.
f
1,l
density of X
k,l
under H
1
. f
0,l
density of X
k,l
under H
0
.
2
Node l transmits Y
k,l
= b
1
1
{W
k,l

1
}
+ b
0
1
{W
k,l

0
}
3
Fusion node receives
Y
k
=

L
l =1
Y
k,l
+ Z
k
, Z
k
noise.
4
Fusion center runs SPRT:
F
k
= F
k1
+ log [g
1
(Y
k
) /g
0
(Y
k
)] , F
0
= 0.
g
0
density of Z
k
+
0
and g
1
density of Z
k
+
1
.
0
,
1
constants.
5
FC decision at N = inf{k : F
k

1
or F
k

0
}.

0
< 0 <
1
. Decision H
1
if F
N

1
, otherwise H
0
.
Modication to DualSPRT: SPRT-CSPRT Algorithm
SPRT-CSPRT:Fusion center runs two algorithms,
F
1
k
= (F
1
k1
+ log [g
1
(Y
k
) /g
0
(Y
k
)])
+
F
0
k
= (F
0
k1
+ log [g
1
(Y
k
) /g
0
(Y
k
)])

F
1
0
= 0, F
0
0
= 0, (x)
+
= max(0, x), (x)

= min(0, x).
The fusion center decides about the hypothesis at time where
N = inf{k : F
1
k

1
or F
0
k

0
}
and
0
< 0 <
1
. The Decision: H
1
if F
1
N

1
, otherwise H
0
.
Local node decision can be quantized better.
Comparison
0 0.5 1 1.5 2 2.5 3 3.5 4
x 10
3
3
4
5
6
7
8
9
10
P
FA
E
D
D


DualSPRT
DSPRT
SPRTCSPRT
Meis SPRT
Asymptotic Optimality of DualSPRT is proved.
Meis SPRT: Y. Mei, IEEE Trans. Information Theory,May 2008.
DSPRT: G. Fellouris, G. V. Moustakides, IEEE Trans. Information Theory,Jan
2011.
Unknown Parameters
Problem:
H
0
: =
0
; H
1
:
1
.
Local node runs GLR:
W
n,l
= max
_
n

k=1
log
f

n
(X
k
)
f

0
(X
k
)
,
n

k=1
log
f

n
(X
k
)
f

1
(X
k
)
_
,
N = inf {n : W
n,l
g(cn)} ,
where g() is a time varying threshold and c is the cost
assigned for each observation.
FC runs SPRT.
Decentralized Multi-hypothesis problem
M Hypothesis, H
m
f
m
l
at local node l
Z
i ,j
l
(k) = max
_
k

t=1
log
f
i
l
(X
t,l
)
f
j
l
(X
t,l
)
, 0
_
Decision at local node l :
N
l
= inf{k : Z
i ,j
l
(k) > a for all j = i and some i }
Decision by node l = H
i
At time k N
l
, node l transmits
l
Instead of physical layer fusion, TDMA used.
FC uses the same test.
H
m
: X
k,l
N(m, 1), m=0,. . ., 4, No of local nodes=5
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0
50
100
150
200
250
300
P
FA
E
DD


DualTestD1
MTestD1:TestD1
TestD1:MTestD1
DualMTestD1
Figure: Comparison among dierent Multihypothesis schemes
Summary
Surveyed spectrum sensing problem.
Shown sequential detection algorithms are superior.
Studied Dual CUSUM and DualSPRT.
Compared to existing algorithms.
Generalized to address parametric uncertainties.
References
1 T. Yucek and H. Arslan, A survey of spectrum sensing
algorithms for cognitive radio applications , IEEE
Communications Surveys and Tutorials, vol.11, no.1,
pp.116-130, March 2009.
2 Ian F. Akyildiz, *Brandon F. Lo* and Ravikumar
Balakrishnan, *Cooperative Spectrum Sensing in Cognitive
Radio Networks: A Survey, **Physical Communication
(Elsevier)* Journal, vol. 4, no. 1, pp. 40-62, March 2011.
3 S. Shellhammer, Numerical Spectrum Sensing
Requirements, IEEE Std.8022-06/0088r0, June 2006.
4 H. V. Poor and O. Hadjiliadis, Quickest Detection,
Cambridge University Press, New York, 2009.
References
5 L. Lai,Y. Fan and H. V. Poor, Quickest detection in
Cognitive Radio: A sequential change detection framework,
in Proc of IEEE GLOBECOM, Nov 2008.
6 T. L. Lai, Sequential analysis: Some classical problems and
new challenges (with discussion), Statistica Sinica, vol.11,
pp.303-408, 2001
7 G. Fellouris, G. V. Moustakides, Decentralized sequential
hypothesis testing using asynchronous communication, IEEE
Trans. Information Theory, vol.57, no.1, pp.534-548, Jan
2011.
8 T. Banerjee, V. Sharma, V. Kavitha and A. K. JayaPrakasam,
Generalized analysis of a distributed energy ecient
algorithm for change detection, IEEE Trans. on Wireless
Communications, vol.10, no.1, pp.91-101, Jan 2011.
References
9 Jayaprakasam, A.; Sharma, V.; Murthy, C.R.; Narayanan, P.; ,
Cyclic Prex Based Cooperative Sequential Spectrum
Sensing Algorithms for OFDM, *Communications (ICC),
2010 IEEE International Conference on* , vol., no., pp.1-6,
23-27 May 2010
10 A. K. Jayaprakasam and V. Sharma, Cooperative robust
sequential detection algorithms for spectrum sensing in
cognitive radio, in Proc of ICUMT, Oct 2009.
11 K. S. Jithin and V. Sharma, Novel algorithms for cooperative
distributed sequential spectrum sensing, Proc. of IEEE
Wireless Communications and Networking Conference
(WCNC), April 2011.
12 K. S. Jithin and V. Sharma, Novel Algorithms for Distributed
Sequential Hypothesis Testing, 49th Annual Allerton
Conference on Communication, Control and Computing, Sept.
2011.