Co Variance
Co Variance
Co Variance
r
X
i
v
:
0
8
0
8
.
2
5
6
2
v
1
[
c
s
.
I
T
]
1
9
A
u
g
2
0
0
8
Spectrum Sensing Algorithms for Cognitive Radio Based on Statistical
Covariances
Yonghong Zeng, Senior Member, IEEE and Ying-Chang Liang, Senior Member, IEEE
Abstract
Spectrum sensing, i.e., detecting the presence of primary
users in a licensed spectrum, is a fundamental problem
in cognitive radio. Since the statistical covariances of re-
ceived signal and noise are usually dierent, they can be
used to dierentiate the case where the primary users
signal is present from the case where there is only noise.
In this paper, spectrum sensing algorithms are proposed
based on the sample covariance matrix calculated from
a limited number of received signal samples. Two test
statistics are then extracted from the sample covariance
matrix. A decision on the signal presence is made by com-
paring the two test statistics. Theoretical analysis for the
proposed algorithms is given. Detection probability and
associated threshold are found based on statistical theory.
The methods do not need any information of the signal,
the channel and noise power a priori. Also, no synchro-
nization is needed. Simulations based on narrowband sig-
nals, captured digital television (DTV) signals and multi-
ple antenna signals are presented to verify the methods.
1 Introduction
Conventional xed spectrum allocation policy leads to low
spectrum usage in many of the frequency bands. Cogni-
tive radio, rst proposed in [1], is a promising technology
to exploit the under-utilized spectrum in an opportunistic
manner [2, 3, 4, 5]. One application of cognitive radio is
spectral reuse, which allows secondary networks/users to
use the spectrum allocated/licensed to the primary users
when they are not active [6]. To do so, the secondary
users are required to frequently perform spectrum sens-
ing, i.e., detecting the presence of the primary users. If
the primary users are detected to be inactive, the sec-
ondary users can use the spectrum for communications.
On the other hand, whenever the primary users become
active, the secondary users have to detect the presence
of those users in high probability, and vacate the chan-
nel within certain amount of time. One communication
system using the spectrum reuse concept is IEEE 802.22
wireless regional area networks (WRAN) [7], which oper-
and
E(
c
(t)
c
(t + )) = 0 for any = 0. Assume that we are
interested in the frequency band with central frequency
f
c
and bandwidth W. We sample the received signal at
a sampling rate f
s
, where f
s
W. Let T
s
= 1/f
s
be
the sampling period. For notation simplicity, we dene
x(n) x
c
(nT
s
), s(n) s
c
(nT
s
) and (n)
c
(nT
s
).
There are two hypothesizes: H
0
, the signal does not exist;
and H
1
, the signal exists. The received signal samples un-
der the two hypothesizes are given respectively as follows
[11, 16, 12, 15]:
H
0
: x(n) = (n), (1)
H
1
: x(n) = s(n) +(n), (2)
where s(n) is the transmitted signal samples passed
through a wireless channel consisting of path loss, mul-
tipath fading and time dispersion eects, and (n) is
the white noise which is independent and identically dis-
tributed (iid), and with mean zero and variance
2
. Note
that s(n) can be the superposition of the received signals
from multiple primary users. No synchronization is needed
here.
Two probabilities are of interest for spectrum sensing:
probability of detection, P
d
, which denes, at the hypoth-
esis H
1
, the probability of the sensing algorithm having
detected the presence of the primary signal; and proba-
bility of false alarm, P
fa
, which denes, at the hypothesis
H
0
, the probability of the sensing algorithm claiming the
presence of the primary signal.
2.1 Covariance Absolute Value (CAV)
Detection
Let us consider L consecutive samples and dene the fol-
lowing vectors:
x(n) =
_
x(n) x(n 1) x(n L + 1)
T
,(3)
s(n) =
_
s(n) s(n 1) s(n L + 1)
T
,(4)
(n) =
_
(n) (n 1) (n L + 1)
T
.(5)
The parameter L is called smoothing factor in the follow-
ing. Considering the statistical covariance matrices of the
signal and noise dened as
R
x
= E[x(n)x
T
(n)], (6)
R
s
= E[s(n)s
T
(n)], (7)
2
we can verify that
R
x
= R
s
+
2
I
L
. (8)
If the signal s(n) is not present, R
s
= 0. Hence the o-
diagonal elements of R
x
are all zeros. If there is signal
and the signal samples are correlated, R
s
is not a diagonal
matrix. Hence, some of the o-diagonal elements of R
x
should be non-zeros. Denote r
nm
as the element of matrix
R
x
at the nth row and mth column, and let
T
1
=
1
L
L
n=1
L
m=1
|r
nm
|, (9)
T
2
=
1
L
L
n=1
|r
nn
|. (10)
Then, if there is no signal, T
1
/T
2
= 1. If the signal is
present, T
1
/T
2
> 1. Hence, the ratio T
1
/T
2
can be used
to detect the presence of the signal.
In practice, the statistical covariance matrix can only
be calculated using a limited number of signal samples.
Dene the sample auto-correlations of the received signal
as
(l) =
1
N
s
Ns1
m=0
x(m)x(ml), l = 0, 1, , L 1, (11)
where N
s
is the number of available samples. The statis-
tical covariance matrix R
x
can be approximated by the
sample covariance matrix dened as
R
x
(N
s
) =
_
_
(0) (1) (L 1)
(1) (0) (L 2)
.
.
.
.
.
.
.
.
.
.
.
.
(L 1) (L 2) (0)
_
_
. (12)
Note that the sample covariance matrix is symmetric and
Toeplitz. Based on the sample covariance matrix, we pro-
pose the following signal detection method.
Algorithm 1 The covariance absolute value (CAV) de-
tection algorithm
Step 1. Sample the received signal as described above.
Step 2. Choose a smoothing factor L and a threshold
1
, where
1
should be chosen to meet the requirement for
the probability of false alarm. This will be discussed in the
next section.
Step 3. Compute the auto-correlations of the received
signal (l), l = 0, 1, , L 1, and form the sample co-
variance matrix.
Step 4. Compute
T
1
(N
s
) =
1
L
L
n=1
L
m=1
|r
nm
(N
s
)|, (13)
T
2
(N
s
) =
1
L
L
n=1
|r
nn
(N
s
)|, (14)
where r
nm
(N
s
) are the elements of the sample covariance
matrix
R
x
(N
s
).
Step 5. Determine the presence of the signal based
on T
1
(N
s
), T
2
(N
s
) and the threshold
1
, i.e., if
T
1
(N
s
)/T
2
(N
s
) >
1
, signal exists; otherwise, signal
does not exist.
Remark. The statistics in the algorithm can be cal-
culated directly from the auto-correlations (l). How-
ever, for better understanding and easing the mathemati-
cal derivation for the pre-whitening later in Appendix A,
here we choose to use the covariance matrix expression.
2.2 Theoretical Analysis for CAV Algo-
rithm
The proposed method only uses the received signal sam-
ples. It does not need any information of the signal, the
channel and noise power as a priori. Also, no synchroniza-
tion is needed.
The validity of the proposed CAV algorithm relies on
the assumption that the signal samples are correlated, that
is, R
s
is not a diagonal matrix (some of the o-diagonal
elements of R
s
should be non-zeros). Obviously, if the
signal samples s(n) are iid, then R
s
=
2
s
I
L
. In this case,
the assumption is invalid and the algorithm cannot detect
the presence of the signal.
However, usually the signal samples should be corre-
lated due to the following reasons.
(1) The signal is oversampled. Let T
0
be the Nyquist
sampling period of the signal s
c
(t) and s
c
(nT
0
) be the
sampled signal based on the Nyquist sampling rate. Based
on the sampling theorem, the signal s
c
(t) can be expressed
as
s
c
(t) =
n=
s
c
(nT
0
)g(t nT
0
), (15)
where g(t) is an interpolation function. Hence, the sig-
nal samples s(n) = s
c
(nT
s
) are only related to s
c
(nT
0
).
If the sampling rate at the receiver f
s
> 1/T
0
, that is,
T
s
< T
0
, then s(n) = s
c
(nT
s
) must be correlated. An
example of this is the narrowband signal such as the wire-
less microphone signal. In a 6 MHz bandwidth TV band, a
wireless microphone signal only occupies about 200 KHz.
When we sample the received signal with sampling rate
not lower than 6 MHz, the wireless microphone signal is
actually over-sampled and therefore highly correlated.
(2) The propagation channel has time dispersion, thus
the actually signal component at the receiver is given by
s
c
(t) =
_
h()s
0
(t )d, (16)
where s
0
(t) is the original transmitted signal and h(t) is
the response of the time dispersive channel. Since the
3
sampling period T
s
is usually very small, the integration
(16) can be approximated as
s
c
(t) T
s
k=
h(kT
s
)s
0
(t kT
s
). (17)
Hence,
s
c
(nT
s
) T
s
K1
k=K0
h(kT
s
)s
0
((n k)T
s
), (18)
where [K
0
T
s
, K
1
T
s
] is the support of the channel response
h(t), that is, h(t) = 0 for t [K
0
T
s
, K
1
T
s
]. For time dis-
persive channel, K
1
> K
0
, thus the signal samples s(nT
s
)
are correlated even if the original signal samples s
0
(nT
s
)
could be iid.
(3) The original signal is correlated. In this case, even if
the channel is a at fading channel and no oversampling,
the received signal samples are correlated.
Another assumption for the algorithm is that the noise
samples are iid. This is usually true if no ltering is used.
However, if a narrowband lter is used at the receiver,
sometimes the noise samples will be correlated. To deal
with this case, we need to pre-whiten the noise samples or
pre-transform the covariance matrix. A method is given
in Appendix A to solve this problem.
The computational complexity of the algorithm is as
follows. Computing the auto-correlations of the received
signal requires about LN
s
multiplications and additions.
Computing T
1
(N
s
) and T
2
(N
s
) requires about L
2
addi-
tions. Therefore, the total number of multiplications and
additions is about LN
s
+L
2
.
2.3 Generalized Covariance Based Algo-
rithms
Based on the same principle as CAV, generalized covari-
ance based methods can be designed to detect the signal.
Let
1
and
2
be two non-negative functions with multiple
variables. Assume that
1
(a) > 0, for a = 0;
1
(0) = 0;
2
(b) > 0, for b = 0;
2
(0) = 0.
Then, the following method can be used for signal detec-
tion.
Algorithm 2 Generalized Covariance based Detection
Step 1. Sample the received signal as described above.
Step 2. Choose a smoothing factor L and a threshold
2
, where
2
should be chosen to meet the requirement for
the probability of false alarm.
Step 3. Compute the sample covariance matrix
R
x
(N
s
).
Step 4. Compute
T
4
(N
s
) =
2
(r
nn
(N
s
), n = 1, , L) , (19)
T
3
(N
s
) = T
4
(N
s
) +
1
(r
nm
(N
s
), n = m) . (20)
Step 5. Determine the presence of the signal based
on T
3
(N
s
), T
4
(N
s
) and the threshold
2
. That is, if
T
3
(N
s
)/T
4
(N
s
) >
2
, signal exists; otherwise, signal does
not exist.
Obviously the CAV algorithm is a special case of the
generalized method when
1
and
2
are absolute sum-
mation functions. As another example, we can choose
1
(a) = a
T
a and
2
(b) = b
T
b. For this choice,
T
3
(N
s
) =
1
L
L
n=1
L
m=1
|r
nm
(N
s
)|
2
, (21)
T
4
(N
s
) =
1
L
L
n=1
|r
nn
(N
s
)|
2
. (22)
2.4 Spectrum sensing Using Multiple An-
tennas
Multiple antenna systems have been widely used to in-
crease the channel capacity or improve the transmission
reliability in wireless communications. In the following,
we assume that there are M > 1 antennas at the receiver,
and exploit the received signals from these antennas for
spectrum sensing. In this case, the received signal at an-
tenna i is given by
H
0
: x
i
(n) =
i
(n), (23)
H
1
: x
i
(n) = s
i
(n) +
i
(n). (24)
In hypothesis H
1
, s
i
(n) is the signal component received
by antenna i. Since all s
i
(n) are generated from the same
source signal, thus s
i
(n) are correlated for i. It is assumed
that
i
(n)s are iid for n and i.
Let us combine all the signals from the M antennas and
dene the following vectors:
x(n) =
x
1
(n) x
M
(n) x
1
(n 1) x
M
(n 1)
x
1
(n L + 1) x
M
(n L + 1)
T
, (25)
s(n) =
s
1
(n) s
M
(n) s
1
(n 1) s
M
(n 1)
s
1
(n L + 1) s
M
(n L + 1)
T
, (26)
(n) =
1
(n)
M
(n)
1
(n 1)
M
(n 1)
1
(n L + 1)
M
(n L + 1)
T
. (27)
Note that equations (3) to (5) are a special case (M = 1)
of the above equations. Dening the statistical covariance
matrices using the same way as those in (6) and (7), we
obtain
R
x
= R
s
+
2
I
ML
. (28)
Except the dierent matrix dimensions, the equation
above is the same as equation (8). Hence, the CAV algo-
rithm and generalized covariance based method described
above can be directly used for multiple antenna case.
Let s
0
(n) be the source signal. The received signal at
antenna i is
s
i
(n) =
Ni
k=0
h
i
(k)s
0
(n k) +
i
(n), i = 1, 2, , M, (29)
4
where h
i
(k) is the channel responses from the source user
to antenna i at the receiver. Dene
h(n) = [h
1
(n), h
2
(n), , h
M
(n)]
T
, (30)
H =
_
_
h(0) h(N) 0
.
.
.
.
.
.
0 h(0) h(N)
_
_, (31)
where N = max
i
(N
i
) and h
i
(n) is zero-padded if N
i
< N.
Note that the dimension of H is ML(N +L). We have
R
s
= HR
s0
H
T
, (32)
where R
s0
= E(s
0
s
T
0
) is the statistical covariance matrix
of the source signal, where
s
0
=
_
s
0
(n) s
0
(n 1) s
0
(n N L + 1)
T
.
(33)
Note that the received signals at dierent antennas are
correlated. Hence, using multiple antennas increase the
correlations among the signal samples at the receiver and
make the algorithms valid at all cases. In fact, at the
worst case when all the channels are at-fading, that is,
N
1
= N
2
= = N
M
= 0, and the source signal sample
s
0
(n) is iid, we have R
s
=
2
s
HH
T
, where H is a ML L
matrix dened above. Obviously, R
s
is not a diagonal
matrix and the algorithms can work.
3 Performance Analysis and
Threshold Determination
For a good detection algorithm, P
d
should be high and
P
fa
should be low. The choice of the threshold is a
compromise between the P
d
and P
fa
. Since we have no
information on the signal (actually we even do not know
if there is signal or not), it is dicult to set the threshold
based on the P
d
. Hence, usually we choose the threshold
based on the P
fa
. The steps are as follows. First we set
a value for P
fa
. Then we nd a threshold to meet the
required P
fa
. To nd the threshold based on the required
P
fa
, we can use either theoretical derivation or computer
simulation. If simulation is used to nd the threshold, we
can generate white Gaussian noises as the input (no sig-
nal) and adjust the threshold to meet the P
fa
requirement.
Note that the threshold here is related to the number of
samples used for computing the sample auto-correlations
and the smoothing factor L, but not related to the noise
power. If theoretical derivation is used, we need to nd the
statistical distribution of T
1
(N
s
)/T
2
(N
s
), which is gener-
ally a dicult task. In this section, using central limit
theorem, we will nd the approximations for the distribu-
tion of this random variable and provide the theoretical
estimations for the two probabilities, P
d
, P
fa
, as well as
the threshold associated with these probabilities.
3.1 Statistics Computation
Based on the symmetric property of the covariance matrix,
we can rewrite T
1
(N
s
) and T
2
(N
s
) in (13) and (14) as
T
1
(N
s
) = (0) +
2
L
L1
l=1
(L l)|(l)|, (34)
T
2
(N
s
) = (0). (35)
Dene
X
l
=
_
x(N
s
1 l) x(l)
T
, (36)
S
l
=
_
s(N
s
1 l) s(l)
T
, (37)
l
=
_
(N
s
1 l) (l)
T
. (38)
Let the normalized correlation among the signal samples
be
l
= E[s(n)s(n l)]/
2
s
, (39)
where
2
s
is the signal power,
2
s
= E[s
2
(n)]. |
l
| denes
the correlation strength among the signal samples, here
0 |
l
| 1. Based on the notations, we have
(l) =
1
N
s
X
T
0
X
l
=
1
N
s
_
S
T
0
+
T
0
_
(S
l
+
l
)
=
1
N
s
_
S
T
0
S
l
+S
T
0
l
+
T
0
S
l
+
T
0
l
_
. (40)
Obviously,
E((0)) =
2
s
+
2
, (41)
E((l)) =
l
2
s
, l = 1, 2, , L 1. (42)
Now we need to nd the variance of (l). Since
2
(l) =
1
N
2
s
_
S
T
0
S
l
+S
T
0
l
+
T
0
S
l
+
T
0
l
_
2
=
1
N
2
s
_
_
S
T
0
S
l
_
2
+
_
S
T
0
l
_
2
+
_
T
0
S
l
_
2
+
_
T
0
l
_
2
+2
_
S
T
0
S
l
_ _
S
T
0
l
_
+ 2
_
S
T
0
S
l
_ _
T
0
S
l
_
+2
_
S
T
0
S
l
_ _
T
0
l
_
+ 2
_
S
T
0
l
_ _
T
0
S
l
_
+2
_
S
T
0
l
_ _
T
0
l
_
+ 2
_
T
0
S
l
_ _
T
0
l
_
, (43)
it can be veried that
E
_
(S
T
0
l
)
2
_
= E
_
(
T
0
S
l
)
2
_
= N
s
2
s
, (44)
E
_
(
T
0
0
)
2
_
= (N
2
s
+ 2N
s
)
4
, (45)
E
_
(
T
0
l
)
2
_
= N
s
, l = 1, , L 1, (46)
E
_
(S
T
0
S
l
)(S
T
0
l
)
_
= E
_
(S
T
0
S
l
)(
T
0
S
l
)
_
= E
_
(S
T
0
l
)(
T
0
l
)
_
= E
_
(
T
0
S
l
)(
T
0
l
)
_
= 0, (47)
E
_
(S
T
0
S
0
)(
T
0
0
)
_
= N
2
s
2
s
, (48)
E
_
(S
T
0
S
l
)(
T
0
l
)
_
= 0, l = 1, 2, , L 1, (49)
E
_
(S
T
0
l
)(
T
0
S
l
)
_
=
2l
(N
s
l)
2
s
, (50)
E
_
S
T
0
S
l
_
=
l
2
s
. (51)
5
Based on these results, we can easily obtain the following
two lemmas.
Lemma 1 When there is no signal, we have
E((0)) =
2
, Var((0)) =
2
N
s
, (52)
E((l)) = 0, Var((l)) =
1
N
s
, l = 1, , L 1. (53)
Lemma 2 When there is signal, we have
E((0)) =
2
s
+
2
, (54)
Var((0)) = Var
_
1
N
s
S
T
0
S
0
_
+
2
2
N
s
_
2
2
s
+
2
_
,(55)
E((l)) =
l
2
s
, (56)
Var((l)) = Var
_
1
N
s
S
T
0
S
l
_
+
N
s
_
+ 2
2
s
+
2(N
s
l)
2l
N
s
2
s
_
(57)
l = 1, , L 1
Note that Var
_
1
Ns
S
T
0
S
l
_
, l = 0, 1, , L1, depends on
signal properties.
For simplicity, we denote E((l)) by
l
and Var((l)) by
l
. Note that usually N
s
is very large. Based on central
limit theorem, (l) can be approximated by the Gaussian
distribution.
Lemma 3 When the signal is not present, we have
E(|(l)|) =
_
2
N
s
, l = 1, 2, , L 1. (58)
When the signal is present, we have
E(|(l)|) =
_
2
l
_
2 e
2
l
2
l
_
+|
l
|
_
1
_
2
_
+
|
l
|/
l
e
u
2
2
du
_
(59)
l = 1, 2, , L 1.
For large N
s
and low SNR,
E(|(l)|)
_
2
N
s
(
2
s
+
2
)
_
2 e
2
l
2
_
+|
l
|
_
1
_
2
_
+
l
e
u
2
2
du
_
, (60)
l = 1, 2, , L 1,
where
l
=
|
l
|SNR
N
s
1 + SNR
, SNR =
2
s
. (61)
Proof. Based on the central limit theorem, we have
E(|(l)|) =
1
2
l
_
+
|u|e
(u
l
)
2
2
l du
=
1
2
_
+
|
_
l
u +
l
|e
u
2
2
du
=
1
2
_
l
/
(
_
l
u
l
)e
u
2
2
du
+
1
2
_
+
l
/
l
(
_
l
u +
l
)e
u
2
2
du
=
_
2
l
_
+
0
ue
u
2
2
du +
_
2
l
_
0
l
/
l
ue
u
2
2
du
+
2
l
2
_
0
l
/
l
e
u
2
2
du
=
_
2
l
_
2 e
2
l
2
l
_
+
2
l
2
_
0
l
/
l
e
u
2
2
du
=
_
2
l
_
2 e
2
l
2
l
_
+|
l
|
_
1
_
2
_
+
|
l
|/
l
e
u
2
2
du
_
. (62)
For large N
s
and low SNR,
l
(
2
s
+
2
)
2
N
s
,
|
l
|
l
l
.
So, we obtain (60).
When there is no signal,
l
= 0 and
l
=
1
Ns
. Hence,
we obtain equation (58).
2
Theorem 1 When there is no signal, we have
E(T
1
(N
s
)) =
_
1 + (L 1)
_
2
N
s
_
, (63)
E(T
2
(N
s
)) =
2
, (64)
Var(T
2
(N
s
)) =
2
N
s
. (65)
When there is signal, and for large N
s
, we have
E(T
1
(N
s
))
2
s
+
2
+
2
2
s
L
L1
l=1
(L l)|
l
|
_
1
_
2
_
+
l
e
u
2
2
du
_
+
2(
2
s
+
2
)
L
L1
l=1
(L l)
_
2
N
s
_
2 e
2
l
2
_
, (66)
E(T
2
(N
s
)) =
2
s
+
2
, (67)
Var(T
2
(N
s
)) = Var
_
1
N
s
S
T
0
S
0
_
+
2
2
N
s
_
2
2
s
+
2
_
. (68)
For large N
s
, T
1
(N
s
) and T
2
(N
s
) approach to Gaussian
distributions.
6
Proof. Equations (63) to 68) are direct results from
Lemma 1 to 3. Noting that (l) is a summation of N
s
random variables, when N
s
is large, based on the central
limit theorem it can be approximated by Gaussian distri-
butions. From the denition of T
1
(N
s
) and T
2
(N
s
), we
know that they also approach to Gaussian distributions.
2
3.2 Detection Probability and the Associ-
ated Threshold
From the theorem above, we have
lim
Ns
E(T
1
(N
s
)) =
2
s
+
2
+
2
2
s
L
L1
l=1
(L l)|
l
|. (69)
For simplicity, we denote
L
2
L
L1
l=1
(L l)|
l
|, (70)
which is the overall correlation strength among the con-
secutive L samples. When there is no signal, we have
T
1
(N
s
)/T
2
(N
s
) E(T
1
(N
s
))/E(T
2
(N
s
))
= 1 + (L 1)
_
2
N
s
. (71)
Note that this ratio approaches to 1 as N
s
approaches to
innite. Also note that the ratio is not related to the noise
power (variance). On the other hand, when there is signal
(signal plus noise case), we have
T
1
(N
s
)/T
2
(N
s
) E(T
1
(N
s
))/E(T
2
(N
s
))
1 +
2
s
2
s
+
2
L
(72)
= 1 +
SNR
SNR + 1
L
. (73)
Here the ratio approaches to a number larger than 1 as
N
s
approaches to innite. The number is determined by
the correlation strength among the signal samples and the
SNR. Hence, for any xed SNR, if there are suciently
large number of samples, we can always dierentiate if
there is signal or not based on the ratio.
However, in practice we have only limited number of
samples. So, we need to evaluate the performance at xed
N
s
. First we analyze the P
fa
at hypothesis H
0
. The
probability of false alarm for the CAV algorithm is
P
fa
= P (T
1
(N
s
) >
1
T
2
(N
s
))
= P
_
T
2
(N
s
) <
1
1
T
1
(N
s
)
_
P
_
T
2
(N
s
) <
1
1
_
1 + (L 1)
_
2
N
s
_
= P
_
_
T
2
(N
s
)
2
_
2
Ns
<
1
1
_
1 + (L 1)
_
2
Ns
_
1
_
2/N
s
_
_
1 Q
_
_
1
1
_
1 + (L 1)
_
2
Ns
_
1
_
2/N
s
_
_
where
Q(t) =
1
2
_
+
t
e
u
2
/2
du. (74)
For a given P
fa
, the associated threshold should be chosen
such that
1
1
_
1 + (L 1)
_
2
Ns
_
1
_
2/N
s
= Q
1
(P
fa
). (75)
That is,
1
=
1 + (L 1)
_
2
Ns
1 Q
1
(P
fa
)
_
2
Ns
. (76)
Note that here the threshold is not related to noise
power and SNR. After the threshold is set, we now cal-
culate the probability of detection at various SNR. For
the given threshold
1
, when signal presents,
P
d
= P (T
1
(N
s
) >
1
T
2
(N
s
))
= P
_
T
2
(N
s
) <
1
1
T
1
(N
s
)
_
P
_
T
2
(N
s
) <
1
1
E(T
1
(N
s
))
_
= P
_
T
2
(N
s
)
2
s
2
_
Var(T
2
(N
s
))
<
1
1
E(T
1
(N
s
))
2
s
2
_
Var(T
2
(N
s
))
_
= 1 Q
_
1
1
E(T
1
(N
s
))
2
s
2
_
Var(T
2
(N
s
))
_
. (77)
For very large N
s
and low SNR,
Var(T
2
(N
s
))
2
2
N
s
_
2
2
s
+
2
_
2(
2
s
+
2
)
2
N
s
,
E(T
1
(N
s
))
2
s
+
2
+
2
s
L
.
Hence, we have a further approximation
P
d
1 Q
_
_
1
1
+
L
2
s
1(
2
s
+
2
)
1
_
2/N
s
_
_
= 1 Q
_
1
1
+
LSNR
1(SNR+1)
1
_
2/N
s
_
. (78)
7
Obviously, the P
d
increases with the number of samples,
N
s
, the SNR and the correlation strength among the signal
samples. Note that
1
is also related to N
s
as shown above,
and lim
Ns
1
= 1. Hence, for xed SNR, P
d
approaches
to 1 when N
s
approaches to innite.
For a target pair of P
d
and P
fa
, based on (78) and (76),
we can nd the required number of samples as
N
c
2
_
Q
1
(P
fa
) Q
1
(P
d
) + (L 1)/
_
2
(
L
SNR)
2
. (79)
For xed P
d
and P
fa
, N
c
is only related to the smoothing
factor L and the overall correlation strength
L
. Hence,
the best smoothing factor is
L
best
= min
L
{N
c
}, (80)
which is related to the correlation strength among the sig-
nal samples.
3.3 Comparison with Energy Detection
Energy detection is the basic sensing method, which
was rst proposed in [14] and further studied by others
[10, 11, 12, 15]. It does not need any information of the
signal to be detected and is robust to unknown dispersive
channel. Energy detection compares the average power
of the received signal with the noise power to make a de-
cision. To guarantee a reliable detection, the threshold
must be set according to the noise power and the number
of samples [11, 10, 12]. On the other hand, the proposed
methods do not rely on the noise power to set the thresh-
old (see equation (76)), while keeping other advantages of
the energy detection.
Accurate knowledge on the noise power is then the key
of the energy detection. Unfortunately, in practice, the
noise uncertainty always presents. Due to the noise un-
certainty [10, 11, 12], the estimated (or assumed) noise
power may be dierent from the real noise power. Let the
estimated noise power be
2
=
2
L
> 1 +
L 1
(Q
1
(P
fa
) Q
1
(P
d
))
. (83)
For example, if P
d
= 0.9 and P
fa
= 0.1, we need
L
> 1 +
L1
4.54
. In conclusion, if the signal samples are
highly correlated such that (83) holds, the CAV is bet-
ter than the ideal energy detection; otherwise, the ideal
energy detection is better.
In terms of the computational complexity, the energy
detection needs about N
s
multiplications and additions.
Hence, the computational complexity of the proposed
methods is about L times that of the energy detection.
4 Simulations and Discussions
In this section, we will give some simulation results for
three situations: narrowband signals, captured DTV sig-
nals [21] and multiple antenna received signals.
First, we simulate the probabilities of false alarm (P
fa
)
because P
fa
is not related to signal (at H
0
, there is no
signal at all). We set the target P
fa
= 0.1, and choose
L = 10 and N
s
= 50000. We then obtain the thresholds
based on the P
fa
, L and N
s
. The threshold for energy de-
tection is given in [11]. Table 1 gives the simulation results
for various cases, where and in the following EG-x dB
means the energy detection with x-dB noise uncertainty.
The P
fa
for the proposed method and energy detection
without noise uncertainty meet the target, but the P
fa
for the energy detection with noise uncertainty (even as
low as 0.5 dB) far exceeds the limit. This means that the
energy detection is very unreliable in practical situations
with noise uncertainty.
Secondly, we x the thresholds based on P
fa
and sim-
ulate the probability of detection (P
d
) for various cases.
We consider two signal types as follows.
(1) Narrowband signals. FM modulated wireless mi-
crophone signal is used here (soft speaker) [22]. The cen-
tral frequency is f
c
= 100 MHz. The sampling rate at the
receiver is 6 MHz (the same as the TV bandwidth in USA).
Figure 1 gives the simulation results (the correspond-
ing P
fa
is shown in Table 1). Note that CAV-theo
means the theoretical results given in Section III.B. Due
to some approximations, the theoretical results does not
exactly match the simulated results. The CAV is better
than ideal energy detection (without noise uncertainty),
which veries our assertion in Section III. C. The reason
8
method EG-2 dB EG-1.5 dB EG-1 dB EG-0.5 dB EG-0dB CAV
P
fa
0.497 0.496 0.490 0.470 0.102 0.099
Table 1: Probabilities of false alarm
22 20 18 16 14 12 10 8 6 4 2 0
0.5
0.6
0.7
0.8
0.9
1
SNR (dB)
P
r
o
b
a
b
i
l
i
t
y
o
f
d
e
t
e
c
t
i
o
n
EG2dB
EG1.5dB
EG1dB
EG0.5dB
EG0dB
CAV
CAVtheo
Figure 1: Probability of detection for wireless microphone
signal: N
s
= 50000
is that, as we point out in Section II.B, the source signal is
narrowband, and therefore their samples are highly corre-
lated. As shown in the gure, if there is noise uncertainty,
the P
d
of the energy detection is much worse than that of
the proposed method. Figure 2 gives the Receiver Operat-
ing Characteristics (ROC) curve (P
d
versus P
fa
) at xed
SNR = 20dB. The performances of the methods at dif-
ferent sample sizes (sensing times) are given in Figure 3.
It is clear that CAV is always better than the ideal energy
detection.
To test the impact of the smoothing factor, we x
SNR=-20dB, P
fa
= 0.01, and N
s
= 50000, and vary the
smoothing factor L from 4 to 14. Figure 4 shows the re-
sults for the P
d
. We see that the P
d
is not very sensitive
to the smoothing factor for L 8. Noting that smaller L
means lower complexity, in practice, we can choose a rel-
atively small L. However, it is very dicult to choose the
best L because it is related to signal property (unknown).
Note that energy detection is not aected by L.
(2) Captured DTV signals. The real DTV signals
(eld measurements) are collected at Washington D.C.,
USA. The data rate of the vestigial sideband (VSB) DTV
signal is 10.762M samples/sec. The recorded DTV signals
were sampled at 21.524476M samples/sec and down con-
verted to a low central IF frequency of 5.381119 MHz (one
fourth the sampling rate). The analog-to-digital conver-
sion of the RF signal used a 10-bit or a 12-bit A/D. Each
sample was encoded into a 2-byte word (signed int16 with
a twos complement format). The multipath channel and
SNR of the received signal are unknown. In order to use
the signals for simulating the algorithms at very low SNR,
0.01 0.05 0.1 0.15 0.2 0.25 0.3
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Probability of false alarm
P
r
o
b
a
b
i
l
i
t
y
o
f
d
e
t
e
c
t
i
o
n
EG0dB
CAV
CAVtheo
Figure 2: P
d
versus P
fa
for wireless microphone signal:
N
s
= 50000, SNR = 20dB
3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8
x 10
4
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Sample size
P
r
o
b
a
b
i
l
i
t
y
o
f
d
e
t
e
c
t
i
o
n
EG0dB
CAV
CAVtheo
Figure 3: P
d
versus sample size (N
s
) for wireless micro-
phone signal: P
fa
= 0.01, SNR = 20dB
9
4 5 6 7 8 9 10 11 12 13 14
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
Smoothing factor
P
r
o
b
a
b
i
l
i
t
y
o
f
d
e
t
e
c
t
i
o
n
EG0dB
CAV
CAVtheo
Figure 4: P
d
versus smoothing factor for wireless micro-
phone signal: P
fa
= 0.01, N
s
= 50000, SNR = 20dB
22 20 18 16 14 12 10 8 6 4 2 0
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
SNR (dB)
P
r
o
b
a
b
i
l
i
t
y
o
f
d
e
t
e
c
t
i
o
n
EG2dB
EG1.5dB
EG1dB
EG0.5dB
EG0dB
CAV
CAVtheo
Figure 5: Probability of detection for DTV signal WAS-
051/35/01: N
s
= 50000
we need to add white noises to obtain various SNR levels
[23].
Figure 5 gives the simulation results based on the DTV
signal le WAS-051/35/01 (receiving antenna is outside
and 20.29 miles from the DTV station; antenna height is
30 feet) [21]. The corresponding P
fa
is shown in Table
1. If noise variance is exactly known (B = 0), energy
detection is better than the proposed method. However,
as discussed in [10, 11, 12], noise uncertainty is always
present. Even if noise uncertainty is only 0.5dB, the P
d
of
energy detection is much worse than that of the proposed
method.
In summary, all the simulations above show that the
proposed method works well without using information of
the signal, the channel and noise power. The energy detec-
tion are not reliable (low probability of detection and high
probability of false alarm) when there is noise uncertainty.
Thirdly, we simulate the proposed algorithms with mul-
22 20 18 16 14 12 10 8 6 4 2 0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
SNR (dB)
P
r
o
b
a
b
i
l
i
t
y
o
f
d
e
t
e
c
t
i
o
n
M=4, LRT
M=4
M=2
M=1
Figure 6: Probability of detection using multiple antennas:
P
fa
= 0.1, N
s
= 25000, one source signal
tiple antennas/receivers. We consider a system with 4
receiving antennas. Assume that the antennas are well
separated (separation larger than half wavelength) such
that their channels are independent. This assumption is
only for simplicity. In fact, the proposed algorithms per-
form better if the channels are correlated. Assume that
each multipath channel h
i
(k) has 5 taps (N
i
= 4) and all
the channel taps are independent with equal power. The
channel taps are generated as Gaussian random numbers
and dierent for dierent Monte Carlo realizations. The
source signal s
0
(n) are iid and BPSK modulated. The re-
ceived signal at antenna i is dened in (29). The smooth-
ing factor is L = 8 and the number of samples at each
antenna is N
s
= 25000. We x the P
fa
= 0.1 at all cases.
Figure 6 gives the P
d
for three cases. From the gure we
see that, when only one antennas signal is used (M = 1),
the method still works. This veries our assertion in Sec-
tion II. B that the method is valid even if the inputs are
iid but the channel is dispersive. When 2 (M = 2) or
4 (M = 4) antennas signals are combined based on the
method in Section II.D, the P
d
is much better. The more
the antennas we use, the better the P
d
is. The optimal
LRT [13] detection for M = 4 is also included as an upper
bound for any detection methods.
To check the performance of the methods for time vari-
ant channels, we give a simulation result here. The time
variant channel is generated based on the simplied Jakes
model. Let f
d
be the normalized maximum Doppler fre-
quency (DF). The time variant channel for simulation is
dened as
h
i
(n, k) = exp
_
j2n
6 k
5
f
d
_
h
i
(k), k = 1, , 5, (84)
where h
i
(k) is the time invariant channel dened above.
For dierent Doppler frequency from 0 to 10
2
, simulation
result is shown in Figure 7 for M = 2. For fast time
variant channels, the performance of proposed methods
10
22 20 18 16 14 12 10 8 6 4 2 0
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
SNR (dB)
P
r
o
b
a
b
i
l
i
t
y
o
f
d
e
t
e
c
t
i
o
n
DF 0
DF 10
4
DF 10
3
DF 10
2
Figure 7: Probability of detection for time variant chan-
nels: M = 2, P
fa
= 0.1, N
s
= 25000
22 20 18 16 14 12 10 8 6 4 2 0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
SNR (dB)
P
r
o
b
a
b
i
l
i
t
y
o
f
d
e
t
e
c
t
i
o
n
M=4
M=2
M=1
Figure 8: Probability of detection using multiple antennas:
P
fa
= 0.1, N
s
= 25000, three source signals
will degrade.
We also simulate the situation when there are multiple
source signals. Figure 8 gives the results for the case of
three source signals. Compared to Figure 6, here the re-
sults do not change much. Hence, the proposed method is
valid when there are multiple source signals.
5 Conclusions
In this paper, sensing algorithms based on the sample co-
variance matrix of the received signal have been proposed.
Statistical theories have been used to set the thresholds
and obtain the probabilities of detection. The methods
can be used for various signal detection applications with-
out knowledge of the signal, the channel and noise power.
Simulations based on the narrowband signals, captured
DTV signals and multiple antenna signals have been car-
ried out to evaluate the performance of the proposed meth-
ods. It is shown that the proposed methods are in general
better than the energy detector when noise uncertainty is
present. Furthermore, when the received signals are highly
correlated, the proposed method is better than the energy
detector even the noise power is perfectly known.
Appendix A
At the receiving end, sometimes the received signal is l-
tered by a narrowband lter. Therefore, the noise embed-
ded in the received signal is also ltered. Let (n) be the
noise samples before the lter, which are assumed to be
iid. Let f(k), k = 0, 1, , K, be the lter. After ltering,
the noise samples turns to
(n) =
K
k=0
f(k)(n k), n = 0, 1, . (85)
Consider L consecutive outputs and dene
(n) = [ (n), , (n L + 1)]
T
. (86)
The statistical covariance matrix of the ltered noise be-
comes
= E( (n) (n)
T
) =
2
FF
T
, (87)
where F is a L (L +K) matrix dened as
F =
_
_
f(0) f(K 1) f(K) 0
.
.
.
.
.
.
0 f(0) f(1) f(K)
_
_. (88)
Let G = FF
T
. If analog lter or both analog and digital
lters are used, the matrix G should be dened based on
those lter properties. Note that G is a positive denite
symmetric matrix. It can be decomposed to
G = Q
2
, (89)
where Q is also a positive denite symmetric matrix.
Hence, we can transform the statistical covariance matrix
into
Q
1
Q
1
=
2
I
L
. (90)
Note that Qis only related to the lter. This means that
we can always transform the statistical covariance matrix
R
x
in (6) (by using a matrix obtained from the lter) such
that equation (8) holds when the noise has passed through
a narrowband lter. Furthermore, since Q is not related
to signal and noise, we can pre-compute its inverse Q
1
and store it for later usage.
References
[1] J. Mitola and G. Q. Maguire, Cognitive radios: mak-
ing software radios more personal, IEEE Personal
Communications, vol. 6, no. 4, pp. 1318, 1999.
11
[2] S. Haykin, Cognitive radio: brain-empowered wire-
less communications, IEEE Trans. Communica-
tions, vol. 23, no. 2, pp. 201220, 2005.
[3] D. Cabric, S. M. Mishra, D. Willkomm, R. Brodersen,
and A. Wolisz, A cognitive radio approach for usage
of virtual unlicensed spectrum, in 14th IST Mobile
and Wireless Communications Summit, June 2005.
[4] S. M. Mishra, A. Sahai, and R. W. Brodensen, Co-
operative sensing among cognitive radios, in IEEE
International Conference on Communications (ICC),
(Istanbul, Turkey), June 2006.
[5] Y.-C. Liang, Y. H. Zeng, E. Peh, and A. T. Hoang,
Sensing-throughput tradeo for cognitive radio net-
works, IEEE Trans on Wireless Communications,
vol. 7, no. 4, pp. 13261337, 2008.
[6] FCC, Facilitating opportunities for exible, ecient,
and reliable spectrum use employing cognitive radio
technologies, notice of proposed rule making and or-
der, in FCC 03-322, Dec. 2003.
[7] 802.22 Working Group, IEEE P802.22/D0.1 Draft
Standard for Wireless Regional Area Networks.
http://grouper.ieee.org/groups/802/22/, May 2006.
[8] H.-P. Tan, W. K. G. Seah, and L. Doyle, Ex-
ploring cognitive techniques for bandwidth manage-
ment in integrated underwater acoustic systems,
in MTS/IEEE Kobe Techno-Ocean (OCEAN 2008),
april 2008.
[9] J. F. Hauris, Genetic algorithm optimization in a
cognitive radio for autonomous vehicle communica-
tions, in IEEE Intern. Symp. Computional Intel-
ligence in Robotics and Automation, (Jacksonville,
USA), June 2007.
[10] A. Sonnenschein and P. M. Fishman, Radiometric
detection of spread-spectrumsignals in noise of uncer-
tainty power, IEEE Trans. on Aerospace and Elec-
tronic Systems, vol. 28, no. 3, pp. 654660, 1992.
[11] A. Sahai and D. Cabric, Spectrum sensing: fun-
damental limits and practical challenges, in Proc.
IEEE International Symposium on New Frontiers
in Dynamic Spectrum Access Networks (DySPAN),
(Baltimore, MD), Nov. 2005.
[12] R. Tandra and A. Sahai, Fundamental limits on de-
tection in low SNR under noise uncertainty, in Wire-
lessCom 2005, (Maui, HI), June 2005.
[13] S. M. Kay, Fundamentals of Statistical Signal Pro-
cessing: Detection Theory, vol. 2. Prentice Hall, 1998.
[14] H. Urkowitz, Energy detection of unkown determin-
istic signals, Proceedings of the IEEE, vol. 55, no. 4,
pp. 523531, 1967.
[15] D. Cabric, A. Tkachenko, and R. W. Brodersen,
Spectrum sensing measurements of pilot, energy,
and collaborative detection, in Military Comm.
Conf. (MILCOM), pp. 17, Oct. 2006.
[16] H.-S. Chen, W. Gao, and D. G. Daut, Signature
based spectrum sensing algorithms for IEEE 802.22
WRAN, in IEEE Intern. Conf. Comm. (ICC), June
2007.
[17] W. A. Gardner, Exploitation of spectral redundancy
in cyclostationary signals, IEEE Signal Processing
Magazine, vol. 8, pp. 1436, 1991.
[18] W. A. Gardner, W. A. Brown, III, and C.-K. Chen,
Spectral correlation of modulated signals: part ii-
digital modulation, IEEE Trans. Communications,
vol. 35, no. 6, pp. 595601, 1987.
[19] N. Han, S. H. Shon, J. O. Joo, and J. M. Kim, Spec-
tral correlation based signal detection method for
spectrum sensing in IEEE 802.22 WRAN systems,
in Intern. Conf. Advanced Communication Technol-
ogy, (Korea), Feb. 2006.
[20] S. Shellhammer and R. Tandra, Performance of the
Power Detector with Noise Uncertainty. doc. IEEE
802.22-06/0134r0, July 2006.
[21] V. Tawil, 51 captured DTV signal.
http://grouper.ieee.org/groups/802/22/, May
2006.
[22] C. Clanton, M. Kenkel, and Y. Tang, Wireless mi-
crophone signal simulation method, in IEEE 802.22-
07/0124r0, March 2007.
[23] S. Shellhammer, G. Chouinard, M. Muterspaugh,
and M. Ghosh, Spectrum sensing simulation model.
http://grouper.ieee.org/groups/802/22/, July 2006.
12