# Adaptive Double-Threshold Cooperative Spectrum Sensing Algorithm Based on History Energy Detection

Authors: Shanshan Yu; Ju Liu; Jing Wang; Inam Ullah
Journal: Wireless Communications and Mobile Computing
 (2020)

---

## Abstract

Spectrum sensing is one of the key technologies in the field of cognitive radio, which has been widely studied. Among all the sensing methods, energy detection is the most popular because of its simplicity and no requirement of any prior knowledge of the signal. In the case of low signal-to-noise ratio (SNR), the traditional double-threshold energy detection method employs fixed thresholds and there is no detection result when the energy is between high and low thresholds, which leads to poor detection performance such as lower detection probability and longer spectrum sensing time. To address these problems, we proposed an adaptive double-threshold cooperative spectrum sensing algorithm based on history energy detection. In each sensing period, we calculate the weighting coefficient of thresholds according to the SNR of all cognitive nodes; thus, the upper and lower thresholds can be adjusted adaptively. Furthermore, in a single cognitive node, once the current energy is within the high and low thresholds, we utilize the average energy of history sensing times to rejudge. To ensure the real-time performance, if the average history energy is still between two thresholds, the single-threshold method will be used for the end decision. Finally, the fusion center aggregates the detection results of each node and obtains the final cooperative conclusion through “or” criteria. Theoretical analysis and simulation results show that the algorithm proposed in this paper improved detection performance significantly compared with the other four different double-threshold algorithms.


---

## Body

## 1. Introduction

With the popularization of mobile Internet and the Internet of things, the demand for spectrum resources increases dramatically. The spectrum fragmentation and existing fixed allocation strategies result in low utilization of available spectrum resources [1]. Therefore, a new communication paradigm is required to exploit the available wireless spectrum opportunistically. The cognitive radio technology is an effective solution to improve the utilization of spectrum resources, and the spectrum sensing is the core technology of cognitive radio [2]. In the cognitive radio network, the second user (SU) actively detects whether a primary user (PU) exists in the licensed spectrum; if a PU does not exist in a specific frequency band, then the SU can utilize these spectrum holes. As long as a PU appears, the SU should free up the spectrum immediately to reduce the interference to the PU. Therefore, the spectrum sensing algorithm should be reliable and fast [3]. Among the common spectrum sensing techniques, energy detection is widely used due to its flexibility and low complexity. It is a blind detection method that belongs to noncoherent detection of signals with the advantage that the detection process does not acquire the prior information of the signal, and there is no limitation on the signal type [4]. Nevertheless, its performance is easily affected by the uncertainty of the noise power. In the case of relatively low SNR, when the difference between noise and signal energy is not distinct, single-threshold detection methods are easy to cause SUs to perceive the existence of a PU incorrectly, which will reduce the detection probability of the entire system. There are some methods [5, 6] that optimized the single threshold and history-based method as [7] named three-event ED (3EED), which decides in one sensing event, considering also the event immediately before and the one immediately after it, which all lead to improving the energy detection performance-based single threshold. Furthermore, to overcome the weakness of single-threshold detection, a lot of double-threshold detection schemes [8–19] are proposed to improve the performance of the system to a certain extent. Nowadays, many new methods are continuously proposed for energy detection in spectrum sensing. For example, in [20, 21], a triple-threshold energy detection method is proposed to improve the spectrum sensing efficiency as well as addressing the small-scale primary users which are unreliable in cognitive radio systems. Under the framework of random matrix theory, Zhao et al. [22] firstly proposed two enhanced detection algorithms based on the maximum eigenvalue and energy of the signal to achieve performance improvement. In [23], a dynamic matching-based spectrum detection scheme is proposed, which can detect sensing data, reduce the impact of malicious data, and make final sensing results more accurate with dynamic threshold setting and data matching, especially in the mobile scenario. Utilizing kennel function-based support vector machine (SVM), a spectrum mapping scheme is proposed in [24] and a boundary CR user searching algorithm is adopted to improve the performance of this scheme. The machine learning methods are all utilized in [25, 26] to improve the spectrum sensing performance. Article [27] is aimed at improving CR spectrum sensing by utilizing techniques such as real-valued FFT, Sparse Fast Fourier Transform, and collaborative spectrum sensing. Similar works can be found in the domain of nonorthogonal multiple access for cooperative and noncooperative wireless networks [28–32].


### 1.1. Related Works

In this paper, we focus on the double-threshold energy detection methods. The traditional double-threshold spectrum sensing method compares the energy value with two fixed decision thresholds. If the energy is greater than the higher threshold, it indicates that the PU exists. If it is less than the lower threshold, it is determined that the PU does not exist. And if it is within the high and low thresholds, the decision is not made temporarily. A weighted-cooperative double-threshold spectrum sensing scheme and two adaptive double-threshold energy methods are proposed in [10–12], respectively, to improve the performance of energy detection. However, the double-threshold methods mentioned above are all no-decision when the energy is between the high and low thresholds. To address this problem, a memory-based energy detection method is presented in [13] by using memory sticks to improve the performance with the cost of delay in secondary devices’ communication. Moreover, in [14–16], the correlation coefficient of received signals, the two-state Markov chain model, and the historical sensing data are employed, respectively, to determine a result in case the energy lies between the two thresholds. In [17], when the energy is between two thresholds, the result of the previous sensing time is used as the result of this time, and if there is also no result in the previous time, then wait for the result of the next sensing time to update the current time until generating a result. Considering the cooperation of multiple SUs, in [18], the fusion center receives relevant information of all nodes and makes a global decision based on “OR” rules. Cooperative spectrum sensing along with a double-threshold detection method is also proposed in [19], which utilized the history test statistic to compare with the high and low thresholds. If the test statistic is still within two thresholds, then increase the number of history energy to compare again until a result can be generated. It deserves to be mentioned that not all history-based methods can cope with this problem.To sum up, the threshold value of many double-threshold detection algorithms is fixed and inflexible, and there is usually no decision when the detected energy is between the upper and lower thresholds. Moreover, methods based on historical energy information often have higher complexity and poor real-time performance. According to the above shortcomings, we propose an adaptive double-threshold cooperative spectrum sensing algorithm based on history energy detection.


### 1.2. Main Contributions

The main contributions of this paper are as follows:(1)
We proposed an adaptive double-threshold cooperative spectrum sensing algorithm based on history energy detection, which excellent performance is verified by simulation especially in the case of low SNR(2)
Based on the traditional double-threshold detection, plus in the weighted coefficient obtaining from SNR values of SUs, the two decision thresholds are adjusted adaptively to improve the performance of energy detection(3)
To ensure the real-time performance, utilizing the average energy of history sensing times to complete subsequent judgment when the detected energy is between the high and the low threshold, and if the average history energy is still between two thresholds, the single-threshold method will be utilized as the end decision to guarantee that there will be at most only two rounds of detection, thereby enhancing the low complexity(4)
We derivated the exact closed-form expressions of the detection probability, the false alarm probability, and the missed detection probability base on the proposed scheme, respectivelyThe remainder of the paper is organized as follows. In Section2, we briefly review the principle of energy detection and describe the traditional double-threshold method in the AWGN model. Moreover, the cooperative spectrum sensing method applied in this paper is introduced. In Section 3, we propose a novel adaptive double-threshold cooperative spectrum sensing algorithm based on history energy detection and present the scheme in detail. In Section 4, we derive the exact closed-form expressions of the detection probability, the false alarm probability, and the missed detection probability in our proposed scheme. In Section 5, the performances of the proposed method are shown with the simulation and analysis. Finally, the conclusion of this paper is given in Section 6.


## 1.1. Related Works

In this paper, we focus on the double-threshold energy detection methods. The traditional double-threshold spectrum sensing method compares the energy value with two fixed decision thresholds. If the energy is greater than the higher threshold, it indicates that the PU exists. If it is less than the lower threshold, it is determined that the PU does not exist. And if it is within the high and low thresholds, the decision is not made temporarily. A weighted-cooperative double-threshold spectrum sensing scheme and two adaptive double-threshold energy methods are proposed in [10–12], respectively, to improve the performance of energy detection. However, the double-threshold methods mentioned above are all no-decision when the energy is between the high and low thresholds. To address this problem, a memory-based energy detection method is presented in [13] by using memory sticks to improve the performance with the cost of delay in secondary devices’ communication. Moreover, in [14–16], the correlation coefficient of received signals, the two-state Markov chain model, and the historical sensing data are employed, respectively, to determine a result in case the energy lies between the two thresholds. In [17], when the energy is between two thresholds, the result of the previous sensing time is used as the result of this time, and if there is also no result in the previous time, then wait for the result of the next sensing time to update the current time until generating a result. Considering the cooperation of multiple SUs, in [18], the fusion center receives relevant information of all nodes and makes a global decision based on “OR” rules. Cooperative spectrum sensing along with a double-threshold detection method is also proposed in [19], which utilized the history test statistic to compare with the high and low thresholds. If the test statistic is still within two thresholds, then increase the number of history energy to compare again until a result can be generated. It deserves to be mentioned that not all history-based methods can cope with this problem.To sum up, the threshold value of many double-threshold detection algorithms is fixed and inflexible, and there is usually no decision when the detected energy is between the upper and lower thresholds. Moreover, methods based on historical energy information often have higher complexity and poor real-time performance. According to the above shortcomings, we propose an adaptive double-threshold cooperative spectrum sensing algorithm based on history energy detection.


## 1.2. Main Contributions

The main contributions of this paper are as follows:(1)
We proposed an adaptive double-threshold cooperative spectrum sensing algorithm based on history energy detection, which excellent performance is verified by simulation especially in the case of low SNR(2)
Based on the traditional double-threshold detection, plus in the weighted coefficient obtaining from SNR values of SUs, the two decision thresholds are adjusted adaptively to improve the performance of energy detection(3)
To ensure the real-time performance, utilizing the average energy of history sensing times to complete subsequent judgment when the detected energy is between the high and the low threshold, and if the average history energy is still between two thresholds, the single-threshold method will be utilized as the end decision to guarantee that there will be at most only two rounds of detection, thereby enhancing the low complexity(4)
We derivated the exact closed-form expressions of the detection probability, the false alarm probability, and the missed detection probability base on the proposed scheme, respectivelyThe remainder of the paper is organized as follows. In Section2, we briefly review the principle of energy detection and describe the traditional double-threshold method in the AWGN model. Moreover, the cooperative spectrum sensing method applied in this paper is introduced. In Section 3, we propose a novel adaptive double-threshold cooperative spectrum sensing algorithm based on history energy detection and present the scheme in detail. In Section 4, we derive the exact closed-form expressions of the detection probability, the false alarm probability, and the missed detection probability in our proposed scheme. In Section 5, the performances of the proposed method are shown with the simulation and analysis. Finally, the conclusion of this paper is given in Section 6.


## 2. System Model

### 2.1. Principle of Energy Detection

The principle of energy detection technology is to determine whether a signal exists based on the power of the received signal. The specific method is to sum the energy of the signal after a series of changes in a certain range to obtain the power of the signal and then compare the obtained power value with the decision threshold to determine whether there is a user.At present, although energy detection through the frequency domain will add additional calculation time due to FFT, nowadays FFT is widely used, its overhead on the detection time can be ignored, and it does not need to provide corresponding detection channels for each high-performance filter, so the implementation is more flexible, and it is more widely used in energy detection algorithms. The schematic diagram of energy detection based on the frequency domain is shown in Figure1.Figure 1
System model.The radio frequency signal enters the receiving end of the energy detection, and after filtering, A/D conversion, and FFT conversion, the square sum is determined as the decision statistics and then sent to the threshold mechanism for judgment.The energy detection algorithm establishes a model based on the statistical value of the signal energy received by the cognitive user, which can be represented by(1)Yn=ωn,sn+ωn,H0,H1,where sn is the PU signal, ωn is the channel noise, Yn is the signal received by the cognitive node, H0 indicates that the channel is idle, and H1 indicates that the channel is occupied by the PU. Then, the energy statistics value E can be expressed as
(2)E=1N∑i=1nYn2,where N presents the number of detection sampling points.


### 2.2. Traditional Double-Threshold Energy Detection Method

The basic idea of the double-threshold energy detection method is to make a decision by comparing the statistical energy value of the sampled signal with the decision threshold value, assumingλH and λL as the high and low decision thresholds, respectively. The decision rules are as follows:
(3)H0,H1,Nodecison,E≤λL,E≥λH,else.Assuming that the channel environment is AWGN, when the number of sampling points is large, the energy statistics can approximately obey the Gaussian distribution [33] shown in
(4)H0:E~NNσω2,2Nσω4,H1:E~NNσs2+σω2,2Nσs2+σω22,where σω2 is the noise variance and σs2 is the average power of the main user signal, and the corresponding detection probability Pd, the false alarm probability Pf, and the missed detection probability Pm can be obtained from equation (4), respectively:
(5)Pd=PE>λHH1=QλH−Nσs2+σω22Nσs2+σω2,(6)Pf=PE>λHH0=QλH−Nσω22Nσω2,(7)Pm=PE<λLH1=1−QλL−Nσs2+σω22Nσs2+σω2.In formulas (5), (6), and (7), Q is the standard Gauss complementary cumulative distribution function. The detection probability Pd is the probability of correct decision when a PU exists, i.e., the state H1. And the false alarm probability Pf is the probability of determining PU existence when the channel is idle actually, i.e., the state H0 when the channel is idle, while the missed probability Pm is the probability of wrong decision when a PU exists, i.e., the state H1.In the case of low SNR, when the false alarm probabilityPf and the missed detection probability Pm are determined, from (6) and (7), the double threshold can be expressed in the following form:
(8)λH=2NQ−1Pf+Nσω2,(9)λL=N−2NQ−1Pmσs2+σω2.


### 2.3. Cooperative Spectrum Sensing

In the actual communication environment, factors such as multipath fading and shadowing of buildings are inevitable, which will lead to a high probability of misjudgment of the licensed frequency band in a specific area for a single node. In this case, utilizing cooperative spectrum sensing technology can minimize the effects of multipath and shadow fading, thereby improving the detection performance of the algorithm. The centralized cooperative network coordinates the information of cognitive users through a control center, which is called a fusion center. First, each cognitive user employs the single-node spectrum sensing method to perform local spectrum sensing and then sends the results to the fusion center. Finally, the fusion center analyzes the aggregated information and makes a decision based on certain judgment criteria to complete a spectrum sensing process.Different from the distributed cooperative scheme, which requires users to communicate with each other, the centralized cooperative scheme mainly utilizes the fusion center to make decisions, and each cognitive user is independent of each other. For the entire system, adding a new cognitive user requires only adding one communication link from the user to the fusion center, which is more flexible and simple. Therefore, the centralized cooperative scheme is the most suitable for cooperative spectrum sensing. Furthermore, the quality of its decision result is closely related to the fusion algorithm of the fusion center. But this is not the focus of this study. We employ a simple “or” criterion for multiuser cooperation in the fusion center, that is, the fusion center performs an “or” operation on all the received decision results from SUs. As long as the cognitive result of a cognitive SU is 1, the channel is determined to be occupied. Only when all the sensing results are 0, the fusion center determines the channel is idle and available.


## 2.1. Principle of Energy Detection

The principle of energy detection technology is to determine whether a signal exists based on the power of the received signal. The specific method is to sum the energy of the signal after a series of changes in a certain range to obtain the power of the signal and then compare the obtained power value with the decision threshold to determine whether there is a user.At present, although energy detection through the frequency domain will add additional calculation time due to FFT, nowadays FFT is widely used, its overhead on the detection time can be ignored, and it does not need to provide corresponding detection channels for each high-performance filter, so the implementation is more flexible, and it is more widely used in energy detection algorithms. The schematic diagram of energy detection based on the frequency domain is shown in Figure1.Figure 1
System model.The radio frequency signal enters the receiving end of the energy detection, and after filtering, A/D conversion, and FFT conversion, the square sum is determined as the decision statistics and then sent to the threshold mechanism for judgment.The energy detection algorithm establishes a model based on the statistical value of the signal energy received by the cognitive user, which can be represented by(1)Yn=ωn,sn+ωn,H0,H1,where sn is the PU signal, ωn is the channel noise, Yn is the signal received by the cognitive node, H0 indicates that the channel is idle, and H1 indicates that the channel is occupied by the PU. Then, the energy statistics value E can be expressed as
(2)E=1N∑i=1nYn2,where N presents the number of detection sampling points.


## 2.2. Traditional Double-Threshold Energy Detection Method

The basic idea of the double-threshold energy detection method is to make a decision by comparing the statistical energy value of the sampled signal with the decision threshold value, assumingλH and λL as the high and low decision thresholds, respectively. The decision rules are as follows:
(3)H0,H1,Nodecison,E≤λL,E≥λH,else.Assuming that the channel environment is AWGN, when the number of sampling points is large, the energy statistics can approximately obey the Gaussian distribution [33] shown in
(4)H0:E~NNσω2,2Nσω4,H1:E~NNσs2+σω2,2Nσs2+σω22,where σω2 is the noise variance and σs2 is the average power of the main user signal, and the corresponding detection probability Pd, the false alarm probability Pf, and the missed detection probability Pm can be obtained from equation (4), respectively:
(5)Pd=PE>λHH1=QλH−Nσs2+σω22Nσs2+σω2,(6)Pf=PE>λHH0=QλH−Nσω22Nσω2,(7)Pm=PE<λLH1=1−QλL−Nσs2+σω22Nσs2+σω2.In formulas (5), (6), and (7), Q is the standard Gauss complementary cumulative distribution function. The detection probability Pd is the probability of correct decision when a PU exists, i.e., the state H1. And the false alarm probability Pf is the probability of determining PU existence when the channel is idle actually, i.e., the state H0 when the channel is idle, while the missed probability Pm is the probability of wrong decision when a PU exists, i.e., the state H1.In the case of low SNR, when the false alarm probabilityPf and the missed detection probability Pm are determined, from (6) and (7), the double threshold can be expressed in the following form:
(8)λH=2NQ−1Pf+Nσω2,(9)λL=N−2NQ−1Pmσs2+σω2.


## 2.3. Cooperative Spectrum Sensing

In the actual communication environment, factors such as multipath fading and shadowing of buildings are inevitable, which will lead to a high probability of misjudgment of the licensed frequency band in a specific area for a single node. In this case, utilizing cooperative spectrum sensing technology can minimize the effects of multipath and shadow fading, thereby improving the detection performance of the algorithm. The centralized cooperative network coordinates the information of cognitive users through a control center, which is called a fusion center. First, each cognitive user employs the single-node spectrum sensing method to perform local spectrum sensing and then sends the results to the fusion center. Finally, the fusion center analyzes the aggregated information and makes a decision based on certain judgment criteria to complete a spectrum sensing process.Different from the distributed cooperative scheme, which requires users to communicate with each other, the centralized cooperative scheme mainly utilizes the fusion center to make decisions, and each cognitive user is independent of each other. For the entire system, adding a new cognitive user requires only adding one communication link from the user to the fusion center, which is more flexible and simple. Therefore, the centralized cooperative scheme is the most suitable for cooperative spectrum sensing. Furthermore, the quality of its decision result is closely related to the fusion algorithm of the fusion center. But this is not the focus of this study. We employ a simple “or” criterion for multiuser cooperation in the fusion center, that is, the fusion center performs an “or” operation on all the received decision results from SUs. As long as the cognitive result of a cognitive SU is 1, the channel is determined to be occupied. Only when all the sensing results are 0, the fusion center determines the channel is idle and available.


## 3. Proposed Energy Detection Algorithm

The traditional double-threshold detection algorithm can solve the problem that the single-threshold detection algorithm is easily affected by noise and also can reduce the false alarm probability and the missed alarm probability. However, when the energy value is between the high and low thresholds, this sensing time is invalid, and the existence of the PU cannot be determined. Many methods improve the detection accuracy by optimizing the high and low thresholds, such as weighted double-threshold methods and adaptive double-threshold methods, but the case of no decision result during one sensing period still exists. To solve this problem, another type of method performs spectrum sensing multiple times until a decision can be made, which can make every sensing period have a decision. However, these methods increase the length of one spectrum sensing period, which further reduces the opportunity for SU to access idle frequency bands.In this case, we proposed a new spectrum sensing algorithm based on historical energy to solve the problem that there is no detection result when the energy statistic value is in the middle threshold. At the same time, our scheme can reduce detection time relatively and improve detection accuracy effectively by adjusting the double-threshold adaptively.Figure2 is the proposed algorithm detection flowchart of a single node at one sensing period. Considering the energy of the signal will not change too much in a short period, we calculate the average energy value in the recent limited sensing periods as the history energy. So we set a queue with the length of M to save the history energy of past M sensing periods. In one sensing period at the single cognitive node, if the current energy is between the double thresholds, we will calculate the average energy of past M sensing periods from the history queue to substitute the current energy value and start the second round detection. Furthermore, if the average energy is still between two thresholds, we will calculate the single threshold and make the final decision by comparing the average energy with it. Therefore, there would be a decision at every sensing period in our scheme.Algorithm 1: Adaptive double-threshold spectrum sensing algorithm of single node i based on history energy detection.
Input:Pf, Queue, PfOutput:Ri∈H0,H11:procedure SINGLE NODE ENERGY DETECTION2:Flag⟵03:  CalculateEi,λHi,λLi4:Queue (M)⟵Ei5:top:6:ifEi≥λHithen7:Ri⟵H18:else9:ifEi≤λLithen10:Ri⟵H011:else12:ifFlag = 0 then13:      CalculateE¯i14:end if15:ifFlag = 0 then16:Flag⟵1, Ei⟵E¯i17:gototop18:else19:      CalculateλSi20:ifE¯i≥λSithen21:Ri⟵H122:else23:Ri⟵H024:end if25:end if26:end if27:end if28:returnRi29:end procedureFigure 2
Flow chart of energy detection algorithm.The pseudocode for our proposed algorithm has been described in Algorithm1. To eliminate the differences between cognitive SUs, it is assumed that the parameters of each cognitive node are the same within a certain period.
(1)
According to formulas (8) and (9), the high and low threshold of single SU is calculated by the false alarm probability, the missed detection probability, the variance of noise, and the received signal. At this time, the decision threshold of each user is the same. Next, each cognitive SU sends the SNR value of the received signal to the fusion center to calculate the weight factor of each user, as shown in formula (10):
(10)ξi=SNRi1/L∑i=1LSNRi,whereξi is the weight factor of the i-th cognitive user, L is the number of cognitive SUs, and SNRi is the signal-to-noise ratio of each cognitive user’s received signal. Thus, every cognitive SU can adaptively adjust their own decision threshold through the weight factor calculated by formula (10) to improve the credibility, namely,
(11)λLi=λLξi,(12)λHi=λHξi(2)
Each cognitive SU obtains the energy statistical valueE through formula (2) and updates the history energy queue simultaneously. Then, the SU compares the current energy E with its decision threshold. If it is higher than λHi, it is determined that there is a primary user. And if it is lower than λLi, it is determined that the channel is idle. In case it is between λLi and λHi, the average value of the history energy queue is taken as the current energy and start the next round of detection. Meanwhile, the “Flag” is set to 1, it means the first round of detection is over(3)
Next, in the second round, which is identified by the value of “Flag” being equal to 1, if the average history energy is also betweenλLi and λHi, then calculate the single threshold λSi, which is used to compare with the average energy to make the final decision(4)
At last, each cognitive SU sends its own decision result to the fusion center which would use the “or” criterion to make the final decision, that is, as long as one cognitive node detects a signal, it is determined that there is a PU. Therefore, we can get the detection probabilityPd and false alarm probability Pf as follows:
(13)Pd=1−∏i=1L1−Pdi,(14)Pf=1−∏i=1L1−Pfi,wherePdi and Pfi is the detection probability and false alarm probability of the i-th cognitive SU, respectively


## 4. Theory Performance of the Algorithm

In this section, we derive the probability of detection, false alarm, and missed detection in the proposed algorithm, respectively.According to the flow description in Section3, there are three situations to determine the existence of the primary user:
(1)
The current energy value is greater thanλHi in the first round of detection procedure(2)
When the current energy in the first round is betweenλLi and λHi, the average history energy calculated in the second round exceeds the upper threshold(3)
When the current energy of the first round and the average history energy of the second round are both withinλLi and λHi, the average history energy is greater than the calculated single threshold λSiHence, the detection alarm probability of single node is given by(15)Pdi=PEi≥λHiH1+PλLi<Ei<λHiH1∗PE¯i≥λHiH1+PλLi<E¯i<λHiH1∗PE¯i≥λSiH1,where λSi is the single threshold, which can be expressed as
(16)λSi=2NQ−1Pf+Nσω2.Then, every part of formula (15) is derivated as follows.From (6), we can get
(17)PEi≥λHiH1=QλHi−Nσsi2+σωi22Nσsi2+σωi2,(18)PEi≥λLiH1=QλLi−Nσsi2+σωi22Nσsi2+σωi2,(19)PλLi<Ei<λHiH1=1−PEi≥λHiH1−PEi<λLiH1=1−PEi≥λHiH1−1−PEi≥λLiH1=QλLi−Nσsi2+σωi22Nσsi2+σωi2−QλHi−Nσsi2+σωi22Nσsi2+σωi2.Similar to (4), according to the properties of the Gaussian distribution, once the number of sampling points is sufficient, the mean value of the past M sensing history energy also obeys the Gaussian distribution, which is expressed exactly as follows:
(20)H0:E¯~NNM∑j=0M−1σωj2,2NM∑j=0M−1σωj22,H1:E¯~NNM∑j=0M−1σsj2+σωj2,2NM∑j=0M−1σsj2+σωj22.Then, we can get the remaining part of (15):
(21)PE¯i≥λHiH1=QλHi−N/M∑j=0M−1σsij2+σωij22N/M∑j=0M−1σsij2+σωij2,(22)PE¯i≥λLiH1=QλLi−N/M∑j=0M−1σsij2+σωij22N/M∑j=0M−1σsij2+σωij2,(23)PλLi<E¯i<λHiH1=1−PE¯i≥λHiH1−PE¯i<λLiH1=1−PE¯i≥λHiH1−1−PE¯i≥λLiH1=QλLi−N/M∑j=0M−1σsij2+σωij22N/M∑j=0M−1σsij2+σωij2−QλHi−N/M∑j=0M−1σsij2+σωij22N/M∑j=0M−1σsij2+σωij2,(24)PE¯i≥λSiH1=QλSi−N/M∑j=0M−1σsij2+σωij22N/M∑j=0M−1σsij2+σωij2.Substituting equations (16), (18), (20), (22), and (23) into equation (14), the detailed expression for the detection probability is shown in
(25)Pdi=QλHi−Nσsi2+σωi22Nσsi2+σωi2+QλLi−Nσsi2+σωi22Nσsi2+σωi2−QλHi−Nσsi2+σωi22Nσsi2+σωi2∗QλHi−N/M∑j=0M−1σsij2+σωij22N/M∑j=0M−1σsij2+σωij2+QλLi−N/M∑j=0M−1σsij2+σωij22N/M∑j=0M−1σsij2+σωij2−QλHi−N/M∑j=0M−1σsij2+σωij22N/M∑j=0M−1σsij2+σωij2∗QλSi−N/M∑j=0M−1σsij2+σωij22N/M∑j=0M−1σsij2+σωij2.In a similar way, the false alarm probability of the proposed algorithm is as follows:(26)Pfi=PEi≥λHiH0+PλLi<Ei<λHiH0PE¯i≥λHiH0+PλLi<E¯i<λHiH0∗PE¯i≥λSiH0.Then, every part of formula (26) is derivated as follows.From (6), we can get
(27)PEi≥λHiH0=QλHi−Nσωi22Nσωi2,(28)PEi≥λLiH0=QλLi−Nσωi22Nσωi2,(29)PλLi<Ei<λHiH0=1−PEi≥λHiH0−PEi<λLiH0=1−PEi≥λHiH0−1−PEi≥λLiH0=QλLi−Nσωi22Nσωi2−QλHi−Nσωi22Nσωi2,(30)PE¯i≥λHiH0=QλHi−N/M∑j=0M−1σωij22N/M∑j=0M−1σωij2,(31)PE¯i≥λLiH0=QλLi−N/M∑j=0M−1σωij22N/M∑j=0M−1σωij,(32)PλLi<E¯i<λHiH0=1−PE¯i≥λHiH0−PE¯i<λLiH0=1−PE¯i≥λHiH0−1−PE¯i≥λLiH0=QλLi−N/M∑j=0M−1σωij22N/M∑j=0M−1σωij2−QλHi−N/M∑j=0M−1σωij22N/M∑j=0M−1σωij2,(33)PE¯i≥λSiH0=QλSi−N/M∑j=0M−1σωij22N/M∑j=0M−1σωij2.Substituting equations (26), (28), (29), (31), and (32) into equation (26), the detailed expression for the detection probability is obtained in
(34)Pfi=QλHi−Nσωi22Nσωi2+QλLi−Nσωi22Nσωi2−QλHi−Nσωi22Nσωi2∗QλHi−N/M∑j=0M−1σωij22N/M∑j=0M−1σωij2+QλLi−N/M∑j=0M−1σωij22N/M∑j=0M−1σωij2−QλHi−N/M∑j=0M−1σωij22N/M∑j=0M−1σωij2∗QλSi−N/M∑j=0M−1σωij22N/M∑j=0M−1σωij2.Meanwhile, the missed detection probability can be calculated from the detection probability as(35)Pmi=PEi<λLiH1+PλLi<Ei<λHiH1∗PE¯i<λLiH1+PλLi<E¯i<λHiH1∗PE¯i<λSiH1=1−PEi≥λLiH1+PλLi<Ei<λHiH1∗1−PE¯i≥λLiH1+PλLi<E¯i<λHiH1∗1−PE¯i≥λSiH1.Substituting equations (18), (19), (22), (23), and (24) into equation (26), the detailed expression for the missed detection probability is obtained in
(36)Pmi=1−QλLi−Nσωs2+σωi22Nσωi2+QλLi−Nσωs2+σωi22Nσωs2+σωi2−QλHi−Nσωs2+σωi22Nσωs2+σωi2∗1−QλLi−N/M∑j=0M−1σsij2+σωij22N/M∑j=0M−1σsij2+σωij2+QλLi−N/M∑j=0M−1σsij2+σωij22N/M∑j=0M−1σsij2+σωij2−QλHi−N/M∑j=0M−1σsij2+σωij22N/M∑j=0M−1σsij2+σωij2∗1−QλSi−N/M∑j=0M−1σωij22N/M∑j=0M−1σωij2.


## 5. Simulation Results

In this section, to evaluate the performance of the proposed history-based adaptive double-threshold energy detection algorithm (HBADT-ED), we present numerical results and compare with the traditional double-threshold energy detection algorithm (TDT-ED) in [10], the weighted double-threshold energy detection method (WDT-ED) modified from [11], the adaptive double-threshold energy detection scheme (ADT-ED) in [17], and the three consecutive time double-threshold energy detection method (TCTDT-ED) improved based on [7], respectively. On the basis of the original weighted coefficient of [11], the algorithm WDT-ED added the ratio of the current user SNR value to the average SNR value to increase the accuracy of the thresholds. And the TCTDT-ED scheme utilized the double threshold the same in TDT-ED to replace the single threshold in [7].In the following simulations, we assume that the SNR range of the received signal is from -20 dB to 10 dB in the AWGN channel. The number of samplingN=150, and the variance of noise σω is set to be 1. We also assume that all the SUs use the “or” criterion to make the final decision in the fusion center and the number of SUs L=5. In the proposed algorithm, we set the false alarm probability Pf=0.05 and the missed detection probability Pm=0.01. Moreover, the size of history energy queue M=5 [34]. All the simulation results are obtained by averaging 105 Monte Carlo independent experiments in MATLAB.First, we investigate the impact of different SNR conditions of the received signal on the detection probabilityPd. It can be seen from Figure 3 that the proposed algorithm has the most obvious advantages than other methods. When the SNR grows to -9 dB, the detection probability of the proposed algorithm (HBADT-ED) in this paper is close to 1, while for the three consecutive time double-threshold energy detection method (TCTDT-ED) and the adaptive double-threshold energy detection scheme (ADT-ED), the SNR value is required to reach -7 dB and -5 dB, respectively, and for the traditional double-threshold algorithm (TDT-ED) and weighted double-threshold algorithm (WDT-ED), the SNR value needs to grow to 2 dB to keep the detection probability close to 1.Figure 3
Probability of detectionPd vs. SNR (dB) for L=5, Pf=0.05.Among these methods, our proposed HBADT-ED scheme has the highest value of detection probability and the most slowly rising with increasing SNR value. Even when the SNR is low to -20 dB, the detection probability is very high. Although the double threshold is fixed in the TCTDT method, because the energy both before and after current sensing time is taken into account, it gets the second-best performance. The ADT-ED algorithm uses the average SNR value of all SUs to adjust the decision threshold of every user adaptively; it performs better than the WDT-ED and TDT-ED distinctly. The WDT-ED only improves the detection results according to the weight factors but does not deal with the decision threshold; therefore, as the SNR value increases, the advantage of the WDT-ED over the TDT-ED becomes smaller and smaller.Figure4 is a comparison of the detection probability of each algorithm with the number of cooperative detective SUs changed to 10 under the same false alarm probability compared with Figure 3. Because the signal is affected by multipath effect and shadow fading in the actual transmission scenario, the SNR of each cognitive user must be different. Considering the “or” strategy adopted for the cooperative decision, using more cognitive nodes can effectively overcome the environmental impact and improve the detection performance of the system. As expected, the detection probabilities of all algorithms have been improved, and the overall performance comparison is consistent with Figure 3.Figure 4
Probability of detectionPd vs. SNR (dB) for L=10, Pf=0.05.Figures5 and 6 show the change of detection probabilities of five methods with false alarm probability under SNR=−15dB and SNR=−10dB, respectively. The higher the SNR is, the higher the detection probability is. When the SNR is determined, the detection probability Pd goes up with the increase of false alarm probability. Moreover, under the same false alarm probability, the HBADT-ED algorithm proposed in this paper performs better than the other four methods, which can ensure a higher detection probability under the condition of lower false alarm probability. And the detection probability can approach 1 under a particularly small false alarm probability.Figure 5
Probability of detectionPd vs. probability of false alarm detection Pf for SNR=−15dB.Figure 6
Probability of detectionPd vs. probability of false alarm detection Pf for SNR=−10dB.Figures7 and 8 show the comparison of the number of cooperative nodes required as the detection probability of each algorithm is close to 1 when the SNR is -15 dB and -10 dB, respectively. Comparing Figures 7 and 8, it can be seen that the higher the SNR value, the fewer cognitive nodes required by the same algorithm. The algorithm HBADT-ED proposed in this paper only needs 11 (SNR=−15dB) and 6 (SNR=−10dB) cognitive nodes to make the detection probability close to 1. Moreover, the performance ranking of the five algorithms is consistent with the analysis from Figure 3. As a conclusion, the algorithm with good performance only needs fewer sensing nodes to achieve the expected detection probability, so the complexity of the system can be greatly simplified.Figure 7
Probability of detectionPd vs. the number of nodes (L) for SNR=−15dB.Figure 8
Probability of detectionPd vs. the number of nodes (L) for SNR=−10dB.Furthermore, we observe the effect of the missed detection probability on the performance of the proposed algorithm. Figure9 shows that no matter the value of SNR is, the probability of detection Pd always decreases with the increase of the missed detection probabilityPm. Meanwhile, the decline degree of the detection probability becomes smaller and smaller with the increase of the SNR value gradually. For example, when Pm increases from 0.05 to 0.55, the value of Pd drops by 0.11 as SNR=−20dB, while it decreases by 0.06 as SNR=−10dB. Thus, we can conclude that the lower the value of SNR, the greater the effect on the performance byPm. We also find that at any Pm value, when the value of SNR is greater than -10db, the rise degree of Pd value decreases. This means when the SNR reach to a certain value, the effect on the performance by SNR will be a little decline. The reason is that when the SNR reaches a certain value, the probability of detection of each node will already be very close to 1, so even when the SNR increases continuously, the rise of the probability of detection will slow down.Figure 9
Probability of detectionPd vs. SNR (dB) according to the different values of missed detection probability for L=5, Pf=0.05, and N=150 in the proposed HBADT-ED algorithm.At last, we also examine the impact of different sampling numberN on the performance of the proposed algorithm. From Figure 10, it can be seen that no matter what is the value of SNR with the restraint, when the sampling number N grows up, the probability of detection Pd always increases except when it has already reached 1. Moreover, the improvement extent of the detection probability gets smaller and smaller with the growth of the SNR value. For example, when $ N $ increases from 100 to 500, the value of Pd is up by 0.17 under SNR=−20dB and grows 0.6 under SNR=−10dB. Therefore, it can be summarized that as the SNR is lower, the sampling number N would have a larger impact on the detection performance. Finally, the same reason as in Figure 9, at any fixed value of N, when the value of SNR reaches a certain value, the effect on the performance by SNR will be a little decline.Figure 10
Probability of detectionPd vs. SNR (dB) according to the different number of sampling for L=5, Pf=0.05, and Pm=0.01 in the proposed HBADT-ED algorithm.


## 6. Conclusion

In this paper, based on history energy detection, an adaptive double-threshold energy detection cooperative spectrum sensing algorithm is proposed. The values of the double threshold are optimized adaptively according to the weighting coefficient calculating by the SNR value of SUs. In the single cognitive node sensing process, when the detected energy is between the high and low thresholds, we utilize the average energy of history sensing times to complete subsequent judgment, which ensures that there must be an accurate decision in this situation of each sensing period. At last, the fusion center aggregates the detection results of each SU and obtains the final cooperative conclusion through the “or” criteria. In addition, we derivate the exact closed-form expressions of the detection probability, the false alarm probability, and the missed detection probability base on the proposed scheme, respectively. Compared with the TDT-ED, WDT-ED, ADT-ED, and TCTDT-ED algorithms, the simulation result shows that the performance of the proposed HBADT-ED algorithm is the best especially in the case of low SNR. Moreover, the low complexity of the proposed algorithm ensured real-time performance simultaneously. In the future, we will pay more attention to the research of spectrum sensing methods under Rayleigh or other channel conditions which are closer to the actual situation.



---

*Source: 4794136-2020-06-30.xml*