# An Improved Clustering Cooperative Spectrum Sensing Algorithm Based on Modified Double-Threshold Energy Detection and Its Optimization in Cognitive Wireless Sensor Networks

Authors: Shubin Wang; Huiqin Liu; Kun Liu
Journal: International Journal of Distributed Sensor Networks
 (2015)

---

## Abstract

Cooperative spectrum sensing (CSS) is a very important technique in cognitive wireless sensor networks, but the channel and multipath affect the sensing performance. For improving the sensing performance, this paper incorporates a modified double-threshold energy detection (MDTED) and the location and channel information to improve the clustering cooperative spectrum sensing (CCSS) algorithm. Within each cluster, the cognitive node with the best channel quality to the fusion center (FC) is chosen as the cluster head (CH), and each node uses the MDTED. The detective information is sent to CH, and CH makes the decision of the cluster. The decision information is sent to FC by each CH, and FC uses the “or” rule to fuse all clusters’ decision information and makes a final decision. Since MDTED needs to transfer large traffic and occupy channel widely, this paper further optimizes the improved algorithm. Ensuring the detection performance, the cognitive nodes participating in the sensing are properly reduced. Simulation results show that the detecting accuracy of the improved algorithm is higher than conventional CSS, and the improved algorithm can also significantly improve collaborative sensing ability. For the optimization of cognitive nodes’ number, the detection probability of the network can be obviously increased.


---

## Body

## 1. Introduction

Hybrid wireless sensor networks consist of wireless networks and wireless sensor networks (WSN), which is important to overcome the limitations of conventional sensor network where transmission range and data rate are quite limited. Wireless sensor network without support from the fixed infrastructure is known as ad hoc sensor networks. Due to the lack of infrastructure, the data is forwarded to the destination via a multihop fashion [1, 2]. In other scenarios, a set of base stations are connected by wired links and placed within the ad hoc sensor networks to form a wired infrastructure, aiming at enhancing the whole network performance. This resulting network is referred to as a hybrid wireless sensor network [3]. In this paper, we study a special hybrid wireless sensor network, cognitive wireless sensor network (CWSN).WSN usually uses the unlicensed frequency band for transmissions; however, with the large scale deployment of network nodes and the increasing demand of the networks, the unlicensed band cannot meet the requirement at present. The problem can be overcome by incorporating cognitive radio (CR) into WSN [4, 5]. CR [6, 7] is an intelligent technology that can adjust, in real time, the transmission parameters based on spectrum hole. In CR systems, the cognitive node (CN) (also called second user, SU) senses spectrum holes that are not used by the authorization user (AU) and uses a part of or the whole spectrum holes as their communication channel. The nodes of CWSN equipped with CR devices are called the cognitive nodes (CNs) [8].Spectrum sensing is the key technique of CWSN, currently, and the main spectrum sensing methods include matched filter, energy detection and cyclic spectrum detection, and covariance-based detection [9, 10]. The energy detection method includes the single-threshold and double-threshold energy detection, and they are, respectively, abbreviated as STED and DTED [10]. Although STED is simple, the detection performance of STED is poor in low signal to noise ratio (SNR). The DTED can greatly improve the detection probability compared with STED; however, DTED needs to transmit large amount of information and occupies wider control channel than STED.Spectrum sensing technologies include single node sensing and cooperative spectrum sensing (CSS), and the latter is widely adopted at present. For further increasing the detection performance, CSS uses double-threshold values in energy detection [11]. For overcoming the influence of fading channel, CSS usually incorporates a clustering algorithm to improve detection performance [12–14]. Currently, clustering cooperative spectrum sensing (CCSS) algorithm mainly uses STED [12, 13]. In literature [14], the DTED is used, but the DTED does not make any decision for the energy values among two threshold values. In literature [15], a modified DTED (MDTED) sends these energy values to the fusion center (FC).For the above questions, this paper incorporates the MDTED and location and channel information of CWSN to improve CCSS and optimizes the improved algorithm to overcome the increase of transmitting information and the wide use of control channel for the DTED.


## 2. Clustering Cooperative Spectrum Sensing Algorithm and Modified Double-Threshold Energy Detection

### 2.1. Clustering Cooperative Spectrum Sensing Algorithm

All cognitive nodes of the whole CWSN are divided into several clusters. For selecting cluster head (CH) in each cluster [12], the distances are calculated from all the cognitive nodes in each cluster to FC, and the node with the shortest distance to FC is selected as CH. The CH sends the cooperative sensing result of a cluster to FC. The clustering method not only ensures the accuracy of information transmission but also is able to save transmission channel bandwidth.


### 2.2. Modified Double-Threshold Energy Detection

As the MDTED [15] is shown in Figure 1, there are two thresholds, λ
L and λ
H, and E
k denotes the signal energy received by the kth node. The kth node will make the H
0 decision that AU does not exist when E
k is less than λ
L, and the result is reported to FC. If E
k is greater than λ
H, the kth node determines that AU is present. Correspondingly, the kth node makes the H
1 decision and reports the result to FC. The kth node cannot make a local decision when E
k is between λ
L and λ
H, but it sends E
k to FC, so FC will collect two possible information-local decision results and the signal energy value.Figure 1
Modified double-threshold energy detection.LetL
k denote the local decision that the kth node sends to FC. Let R
k indicate that FC obtains information, so(1)
L
k
=
0
0
≤
E
k
≤
λ
L
1
E
k
>
λ
H
,
R
k
=
E
k
λ
L
<
E
k
≤
λ
H
L
k
others.Assume that FC receivesM local decision results and some energy values, and FC puts these energy values to conduct energy fusion and obtains a superior judgment W as follows:(2)
W
=
0
0
≤
∑
k
=
1
N
-
M
E
k
≤
λ
1
∑
k
=
1
N
-
M
E
k
>
λ
,where λ is the threshold value, which is calculated by FC depending on a false alarm probability of network P
F. P
F can be written as follows:(3)
P
F
=
P
E
k
>
λ
∣
H
0
=
Γ
u
,
λ
/
2
Γ
u
,where Γ
(
a
,
b
) and Γ
(
a
) are, respectively, the complete and incomplete gamma function and u denotes the time-bandwidth product.The energy value∑
k
=
1
N
-
k
E
k approximates the following distribution:(4)
∑
k
=
1
N
-
k
E
k
~
χ
2
N
-
M
u
2
H
0
χ
2
N
-
M
u
2
2
γ
0
H
1
,where γ
0
=
∑
k
=
1
N
-
M
γ
k represents the sum of SNR for N
-
K cognitive nodes.FC uses “or” fusion rule to get the final judgment as follows:(5)
F
=
1
W
+
∑
k
=
1
M
L
k
>
1
0
others.


## 2.1. Clustering Cooperative Spectrum Sensing Algorithm

All cognitive nodes of the whole CWSN are divided into several clusters. For selecting cluster head (CH) in each cluster [12], the distances are calculated from all the cognitive nodes in each cluster to FC, and the node with the shortest distance to FC is selected as CH. The CH sends the cooperative sensing result of a cluster to FC. The clustering method not only ensures the accuracy of information transmission but also is able to save transmission channel bandwidth.


## 2.2. Modified Double-Threshold Energy Detection

As the MDTED [15] is shown in Figure 1, there are two thresholds, λ
L and λ
H, and E
k denotes the signal energy received by the kth node. The kth node will make the H
0 decision that AU does not exist when E
k is less than λ
L, and the result is reported to FC. If E
k is greater than λ
H, the kth node determines that AU is present. Correspondingly, the kth node makes the H
1 decision and reports the result to FC. The kth node cannot make a local decision when E
k is between λ
L and λ
H, but it sends E
k to FC, so FC will collect two possible information-local decision results and the signal energy value.Figure 1
Modified double-threshold energy detection.LetL
k denote the local decision that the kth node sends to FC. Let R
k indicate that FC obtains information, so(1)
L
k
=
0
0
≤
E
k
≤
λ
L
1
E
k
>
λ
H
,
R
k
=
E
k
λ
L
<
E
k
≤
λ
H
L
k
others.Assume that FC receivesM local decision results and some energy values, and FC puts these energy values to conduct energy fusion and obtains a superior judgment W as follows:(2)
W
=
0
0
≤
∑
k
=
1
N
-
M
E
k
≤
λ
1
∑
k
=
1
N
-
M
E
k
>
λ
,where λ is the threshold value, which is calculated by FC depending on a false alarm probability of network P
F. P
F can be written as follows:(3)
P
F
=
P
E
k
>
λ
∣
H
0
=
Γ
u
,
λ
/
2
Γ
u
,where Γ
(
a
,
b
) and Γ
(
a
) are, respectively, the complete and incomplete gamma function and u denotes the time-bandwidth product.The energy value∑
k
=
1
N
-
k
E
k approximates the following distribution:(4)
∑
k
=
1
N
-
k
E
k
~
χ
2
N
-
M
u
2
H
0
χ
2
N
-
M
u
2
2
γ
0
H
1
,where γ
0
=
∑
k
=
1
N
-
M
γ
k represents the sum of SNR for N
-
K cognitive nodes.FC uses “or” fusion rule to get the final judgment as follows:(5)
F
=
1
W
+
∑
k
=
1
M
L
k
>
1
0
others.


## 3. An Improved Clustering Cooperative Spectrum Sensing Algorithm

The conventional CCSS usually uses STED [12, 13] and even adopts DTED [14], but CN does not make any decision for λ
L
<
E
k
<
λ
H. The literature [15] gives a CCS adopted MDTED; however, the CCS is not cluster-based. Although the MDTED does not make any decision for λ
L
<
E
k
<
λ
H, these energy values are sent to FC and used in final decision.Based on the MDTED, this paper combines the location and channel information of CWSN to improve CCSS, and the system model is shown in Figure2. The assumption is made that there are N cognitive nodes in CWSN, and all cognitive nodes (
C
R
i
) are divided into J clusters. There are D nodes in each cluster, and each node adopts the MDTED. The channel between AU and nodes or CH and nodes is Rayleigh fading channel.Figure 2
A model of clustering cooperative spectrum sensing.In order to conveniently describe the algorithm,|
k
1
-
k
2
| is defined as the Euclidean distance between the node k
1 and k
2. The algorithm is as follows.Firstly, the reference node is selected in a cluster. The Euclidean distances between all nodes and FC are calculated, and then these nodes are sought out that the distance is the first2
J minimum. For the 2
J nodes, the distance that each node to the other N
-
1 nodes is calculated, and distance values of each node are summed, among which nodes of the first J minimum value are selected as the reference nodes. The J clusters are initialized as b
j
=
{
a
j
}, and the center of the cluster j is indicated as a
-
j
=
a
j. The node number of each cluster is one, which is expressed as N
u
m
j
=
1.Secondly, the otherN
-
J nodes are polymerized into clusters. According to the formula d
k
j
=
a
k
-
a
-
j  k
=
1,2
,
…
,
N
;
j
=
1,2
,
…
,
J, the distances between the other N
-
J nodes and the reference nodes are calculated, and the minimum distance d
k
j for each node k among the other N
-
J nodes is searched and indicated as j
∗
=
a
r
g
m
i
n
d
k
j, and the node k is polymerized into the cluster j
∗. So b
j
∗
=
b
j
∗
∪
{
a
j
}, and, at the same time, the center of the cluster j
∗ is updated as a
-
j
∗. The node number of cluster j
∗ should be N
u
m
j
∗
=
N
u
m
j
∗
+
1. This step is repeated until all nodes are polymerized into clusters.Finally, cluster heads are selected. The probability density function of Rayleigh distribution is written as follows:(6)
f
d
k
,
j
,
r
=
d
k
,
j
,
r
α
2
exp
⁡
d
k
,
j
,
r
2
α
2
d
k
,
j
,
r
≥
0
,where d
k
,
j
,
r is the distance from the kth node of the cluster j to FC and α
2 is the average power of the signal.The channel fading is calculated between all nodes in each cluster and FC by using formula (6), and a cognitive node is found out that the channel fading is the minimum in each cluster. The node is chosen as CH and is indicated as h
h
e
a
d
j to store the identification of CH and all cluster members b
j.For each node adopting the DTED, two parameters,θ
0
,
k and θ
1
,
k, are introduced, which, respectively, denotes the probability of the kth node that cannot make the local decision for H
0 and H
1, and θ
0
,
k and θ
1
,
k are expressed as follows:(7)
θ
0
,
k
=
P
λ
L
<
E
k
≤
λ
H
∣
H
0
,
(8)
θ
1
,
k
=
P
λ
L
<
E
k
≤
λ
H
∣
H
1
.LetP
d
,
k, P
f
,
k, and P
m
,
k, respectively, denote the detection probability, false alarm probability, and leakage alarm probability for the kth node, and they are expressed as follows:(9)
P
d
,
k
=
P
E
k
>
λ
H
∣
H
1
=
Q
u
2
γ
k
,
λ
H
,
k
,
(10)
P
f
,
k
=
P
E
k
>
λ
H
∣
H
0
=
Γ
u
,
λ
H
,
k
/
2
Γ
u
,
(11)
P
m
,
k
=
P
E
k
<
λ
L
∣
H
1
=
1
-
θ
1
,
k
-
P
d
,
k
,where Q
U
(
x
,
y
) is the generalized Marcum function, γ
k represents SNR, and u represents the time-bandwidth product.LetP
d
,
j, P
f
,
j, and P
m
,
j, respectively, represent the collaborative detection probability, collaborative false alarm probability, and collaborative leakage alarm probability for a cluster, and they are expressed as follows:(12)
P
d
,
j
=
1
-
P
m
,
j
,
(13)
P
f
,
j
=
1
-
∏
k
=
1
D
1
-
θ
0
,
k
-
P
f
,
k
-
∑
M
=
0
D
-
1
D
M
·
∏
k
=
1
M
1
-
θ
0
,
k
-
P
f
,
k
·
∏
k
=
M
+
1
D
θ
0
,
k
1
-
Γ
D
-
M
u
,
λ
/
2
Γ
D
-
M
u
,
(14)
P
m
,
j
=
∑
M
=
0
D
-
1
D
M
∏
k
=
1
M
P
m
,
k
·
∏
k
=
M
+
1
D
γ
θ
1
,
k
1
-
Q
D
-
M
u
2
γ
0
,
λ
+
∏
k
=
1
D
P
m
,
k
.Since the channel between AU and nodes or between CH and nodes is Rayleigh channel, the cooperative detection probability and cooperative false alarm probability of a cluster in CH location can be expressed as follows:(15)
P
d
,
j
=
1
-
∏
k
=
1
D
1
-
P
d
,
k
1
-
P
e
,
k
+
P
d
,
k
P
e
,
k
,
P
f
,
j
=
1
-
∏
k
=
1
D
1
-
P
f
,
k
1
-
P
e
,
k
+
P
f
,
k
P
e
,
k
,where P
e
,
k is the bit error rate (BER) of the kth node when it sends the sensing information to CH.Each CH sends the sensing result of a cluster to FC, and then FC fuses all received perceptive results to get the final judging result of the whole CWSN. The detection probability and false alarm probability of the whole network can be calculated by the following two formulas:(16)
P
d
=
1
-
∏
j
=
1
J
1
-
P
e
,
j
∏
k
=
1
D
1
-
P
d
,
j
,
k
+
P
e
,
j
1
-
∏
k
=
1
D
1
-
P
d
,
j
,
k
,
P
f
=
1
-
∏
j
=
1
J
1
-
P
e
,
j
∏
k
=
1
D
1
-
P
f
,
j
,
k
+
P
e
,
j
1
-
∏
k
=
1
D
1
-
P
f
,
j
,
k
,where P
f
,
j
,
k and P
d
,
j
,
k, respectively, denote the false alarm probability and detection probability of the kth node in the cluster j, and P
e
,
j is BER that CH sends the sensing information to FC.There are several parameters needed to be calculated for Rayleigh channel, which are used to get the detection probability of CCSS. According to (9), the detection probability P
d
,
j
,
k of the kth node in the cluster j can be expressed as follows:(17)
P
d
,
j
,
k
=
Q
u
2
γ
j
,
k
,
λ
H
,where γ
j
,
k is SNR.For Rayleigh channel, the probability density function ofγ
j
,
k can be written as follows:(18)
f
γ
j
,
k
=
1
γ
j
exp
⁡
-
γ
j
,
k
γ
-
j
,where γ
-
j is an average SNR of nodes in a cluster.According to (17) and (18), P
d
,
j
,
k can further be expressed as follows:(19)
P
d
,
j
,
k
=
∫
0
∞
P
d
,
j
,
k
f
γ
j
,
k
d
γ
j
,
k
=
∫
0
∞
Q
u
2
γ
j
,
k
,
λ
H
1
γ
j
exp
⁡
-
γ
j
,
k
γ
-
j
d
γ
j
,
k
.Assuming that CH uses BPSK modulation to send 1 bit judging information to FC, the error rate is expressed as follows:(20)
P
e
,
j
=
Q
2
ρ
j
,
m
a
x
,where ρ
j
,
m
a
x is the largest SNR in the cluster among all nodes.For Rayleigh fading channel, the probability density function ofρ
j
,
m
a
x is expressed as follows:(21)
f
ρ
j
,
m
a
x
=
D
ρ
¯
j
e
-
ρ
j
,
m
a
x
/
ρ
j
1
-
e
-
ρ
j
,
m
a
x
/
ρ
j
D
-
1
,where ρ
¯
j is the average SNR.The error rate of the network is expressed as follows:(22)
P
e
,
j
=
∫
0
∞
P
e
,
j
f
ρ
j
,
max
⁡
d
ρ
j
,
max
⁡
=
∑
m
=
0
D
-
1
C
D
-
1
m
-
1
D
-
m
-
1
·
D
2
D
-
m
1
-
ρ
¯
j
D
-
m
+
ρ
¯
j
.


## 4. Optimization for the Number of Cognitive Nodes Participating in Cooperative Spectrum Sensing in a Cluster

In Section3, each node adopts DTED; however, DTED needs to transmit large amount of information and occupies wider control channel than STED. For this, this part further optimizes the improved algorithm in Section 3.Based on the central limit theory,D can get larger values (
D
≥
10
) when large numbers of nodes are assigned to a cluster. The signal energy E
k received by the kth node is approximated by a Gaussian distribution [16], and the detection probability of the cluster can be written as follows:(23)
P
d
,
j
=
Q
2
D
σ
4
Q
-
1
P
f
,
j
X
-
P
2
D
σ
4
+
4
σ
2
P
X
,where X is the node numbers involved in spectrum sensing in the cluster and the range of X is (
1,2
…
D
). P
f
,
j represents the false alarm probability of the cluster. Q
(
·
) represents the area below the curve of Gaussian density function. P represents the signal power of AU. σ
2 indicates the received signal variance of all nodes in the cluster.Due toQ
-
1
P
f
,
j
X in (23), Q
(
2
D
σ
4
Q
-
1
P
f
,
j
X
-
P
)
/
2
D
σ
4
+
4
σ
2
P exponentially increases as X increases; however, Q
(
2
D
σ
4
Q
-
1
P
f
,
j
X
-
P
)
/
2
D
σ
4
+
4
σ
2
P
X exponentially decreases as X increases. So there must exist X
0 that lets P
d
,
j be the maximum, and X
0 satisfies 1
<
X
0
<
D.Based on (9), when P
f
,
j is preset in the cluster, the higher threshold value λ
H of DTED can be calculated as the follows:(24)
P
f
,
j
·
Γ
u
=
1
-
Γ
u
,
λ
H
2
,
Γ
u
,
λ
H
2
=
Γ
u
1
-
P
u
,
λ
H
2
,where P
(
N
,
z
)
=
1
/
Γ
N
∫
0
z
t
N
-
1
·
e
-
t
d
t, so(25)
P
f
,
j
=
1
-
P
u
·
λ
H
2
,
λ
H
=
2
×
P
-
1
u
,
1
-
P
f
,
j
.Depending on (8), (9), (11), (12), and (14), the cooperative detection probability of each cluster can be obtained as follows: (26)
P
d
,
j
=
1
-
∑
M
=
0
D
-
1
D
M
∏
k
=
1
M
1
-
θ
1
,
k
-
Q
u
2
γ
k
,
λ
H
∏
k
=
M
+
1
D
θ
1
,
k
1
-
Q
D
-
M
u
2
γ
0
,
2
×
P
-
1
u
,
1
-
P
f
,
j
+
∏
k
=
1
D
1
-
θ
1
,
k
-
Q
u
2
γ
k
,
λ
H
,where θ
1
,
k is a decisive influence to P
d
,
j and γ
k is the kth node’s SNR of the cluster j.Depending on the numerical analysis,P
d
,
j initially increases as D increases; however, D continues to increase; the change of P
d
,
j is hardly increasing. Therefore, it is unnecessary for all nodes in one cluster to participate in the cooperative sensing, and the node number participating in the cooperative sensing in the cluster may be reduced from D to X
0. So X
0 nodes with higher SNR are selected in one cluster to participate in the cooperative detection; not only the number of information transmission and energy consumption and control channel bandwidth can be cut down but also the detection performance of the cluster can be obviously increased.


## 5. Simulation

The assumption is made that there are only one AU and one FC in the system model. All nodes are divided intoJ clusters, and each cluster has D nodes. For each node, the noise and signal power are the same. Assume P
f
,
j
=
0.1, the time-bandwidth product u
=
5, λ
L
=
0.8
λ, λ
H
=
2
λ, θ
1
,
k
=
0.01, the simulation results are shown in Figures 3 and 4.Figure 3
The comparison for the collaborative detection probability of two algorithms.Figure 4
The comparison for the collaborative false alarm probability of two algorithms.It is obvious from Figure3 that the collaborative detection probability of the network gradually increases as SNR increases, and the collaborative detection probability of the improved algorithm is higher than traditional CSS in the same SNR.In Figure4, the collaborative false alarm probability of the network gradually decreases as SNR increases, and the collaborative false alarm probability of the improved algorithm is lower than the traditional CSS in the same SNR.For the optimization of the improved algorithm, assumeθ
1
,
k
=
0.01, and the other parameters are the same as the above.It is difficult to fixX
0 in theory, so X
0 can be sought based on the numerical analysis. The node number in one cluster is, respectively, 50, 100, and 150, and the relationship between the detection probability and the node number involved in the cooperative sensing is shown as in Figure 5. From Figure 5, it is certain that there must exist a proper X
0 for different D to let P
d
,
j be the maximum.Figure 5
The relationship between the detection probability and the node number involved in the cooperative sensing.To takeD
=
50, simulation result is shown as in Figure 6. From Figure 6, it is obvious that the detection probability P
d
,
j is the maximum when X
=
8, so X
0
=
8.Figure 6
TakingD
=
50 to seek X
0
=
8.The comparison ofP
d
,
j between D
=
50 and X
0
=
8 is shown as in Figure 7. From Figure 7, the two P
d
,
j are nearly the same when SNR is not less than −15 dB.Figure 7
The comparison ofP
d
,
j between D
=
50 and X
0
=
8.The relationship between the cooperative detection probability and the false alarm probability is shown as in Figure8, in which J
=
2 and X
0
=
8 indicate that all nodes are divided into two clusters, and there are eight nodes to participate in cooperative spectrum sensing in each cluster. From Figure 8, the optimization further increases the detection performance.Figure 8
The relationship betweenP
d and P
f.


## 6. Conclusion

To conclude, this paper incorporates the MDTED and location and channel information of CWSN to improve a CCSS algorithm, which improves the sensing performance of CWSN. Furthermore, this paper also optimizes the improved algorithm by decreasing the node number participating in cooperative sensing in one cluster. The simulation results show that the improved method and its optimization are obviously increasing the detection performance. The further work is to seekX
0 in theory.



---

*Source: 136948-2015-10-12.xml*