1. Introduction
The expansion of wireless communication systems in all sectors of modern society over the past decade has prompted an increased demand in spectrum resources. In this context, the traditional static allocation of the radio frequencies leads to inefficient use of the spectrum [
1,
2], and cognitive radio (CR) systems have emerged as a meaningful alternative for improving the efficiency of spectrum usage through dynamic spectrum access (DSA) [
3]. DSA allows the access of secondary users (SU) to licensed frequency bands when these are not actively used by licensed primary users (PU), and relies on spectrum sensing, which is performed by the SU to detect the presence of active PU.
Among the methods used for spectrum sensing, energy detection (ED) [
4,
5,
6,
7,
8] is the most commonly used one, due to its simplicity as well as its almost universal applicability. Alternative spectrum sensing approaches use eigenvalue-based algorithms [
9], covariance-based detection methods [
10,
11], cyclostationary feature detection [
12,
13], or compressive sensing [
14,
15]. A thorough and very recent survey on most known spectrum sensing methods can be found in [
16].
An important drawback of the ED method is implied by its sensitivity to noise uncertainty [
17], which has led to improved ED algorithms that outperform the classical energy detection (CED) method [
4]. These include the modified ED method for spectrum sensing in [
18], which uses the average value of the ED test statistic over multiple sensing events, as well as the three-event ED (3EED) algorithm in [
19], which decides that a PU is active if the ED test statistic exceeds the sensing threshold in three consecutive sensing events that include the current sensing event along with the sensing events immediately before and after it. To improve the performance of ED in the presence of Laplacian noise, [
20] proposes a spectrum sensing algorithm in which the square of the received signal amplitude in the ED test statistic is replaced by an exponent that ranges between 0 and 2. Furthermore, adaptive ED approaches have been established for dynamic scenarios, which adjust the duration of the sensing window based on the PU on/off activity [
21] or change the sensing threshold in response to changes in the noise characteristics [
22,
23].
In this paper, we present a new adaptive ED algorithm for spectrum sensing, which is based on the 3EED algorithm [
19], but in which the sensing threshold is adapted similar to [
22], to optimize the decision error probability (DEP), which is a weighted sum of the probabilities of missed detection and false alarm [
22,
23]. We note that obtaining an accurate analytical expression for the optimal threshold is elusive as the expressions involved in finding the sensing threshold do not have closed-form expressions and require approximations. In order to underline the novelty of the current work, we will enumerate its contributions as compared to the previous similar and related works. In [
22], the authors proposed a threshold adaptation method by minimizing the DEP under the Gaussian approximation, but for the simple CED algorithm. Hence, an exact expression of the threshold could be obtained directly as a solution of the optimization equation, using the properties of the
Q-function. However, for more efficient algorithms than CED, regularly having more complex expressions for DEP, the optimization equation is not analytically solvable. Therefore, in this paper, we aim at extending the method from [
22] to a more complex and efficient ED algorithm, such as 3EED [
19]. Under the Gaussian approximation, the DEP for any ED algorithm can be written as an expression based on several
Q-function terms. First, we have to prove that DEP is a convex function in the threshold value and then, we propose the use of a numerical method, such as Newton’s method, to iteratively determine the root of the analytically unsolvable optimization equation. However, the main drawback of iterative methods is the increased operating time, which is a critical issue for the spectrum sensing algorithms. In order to overcome this problem, we propose in this paper a transformation of the optimization function, such that the Newton’s method for the transformed function converges faster. By analyzing the monotonicity of the optimization function, we determine a transform that linearizes the function around the root. Thus, we manage to reduce the number of iterations to the minimum possible, i.e., one iteration. As a prior validation step for the current research, in [
24], we tested only empirically the performance of the adaptive threshold 3EED algorithm, where we derived the threshold value by using a brute-force search. Finally, in the current paper, we derive an analytical approximate expression of the adaptive threshold for 3EED by using a fast convergence numerical method. Moreover, we consider that this method can be generalized for most if not all ED-based spectrum sensing algorithms.
The rest of the paper is structured as follows: in
Section 2, we briefly present the CED and 3EED algorithms for spectrum sensing, followed by a discussion on optimizing the sensing threshold in
Section 3. The proposed 3EED algorithm with an adaptive threshold is formally stated in
Section 4. In
Section 5, we illustrate the performance of the proposed algorithm with numerical results obtained from simulation and compare it to that of the adaptive CED in [
22], and we conclude the paper with final remarks in
Section 6.
2. Spectrum Sensing by Three-Event Energy Detection (3EED)
Let
be the signal at the SU receiver, which consists of an active PU signal with average power
corrupted by additive white Gaussian noise (AWGN) variable with variance
when the channel is busy, or just of the AWGN when the channel is idle (PU is not active). We denote by
the value of the received signal energy estimated during the
i-th sensing slot that consists of
N samples,
the ED sensing threshold, and
the binary decision variable {0,1} for the
i-th spectrum sensing slot. With these notations, in CED correct detection of the PU signal (active/inactive) implies setting
, that is, the channel is “busy”, if
when
is implied by an active PU signal corrupted by noise, and
, that is, the channel is “idle”, if
when
corresponds to a noise only term. We note that, when the number of samples
N is sufficiently large, the tail region of the probability density function of the received signal energy
for values above the sensing threshold is approximated by a normal distribution [
25] such that the standard
Q-function [
26] can be used to approximate the probabilities of detection and false alarm for CED as [
18]
and
As the name suggests, the 3EED algorithm [
19] relies on ED in up to three consecutive sensing slots to decide if the signal
at the SU receiver is implied by an active PU signal or not. Specifically, similar to CED, if the energy in the current spectrum sensing slot
i exceeds the sensing threshold,
, then the 3EED algorithm decides that a PU is active and sets
. However, if
, the algorithm checks the energy level estimated in the previous slot,
, to decide that a PU signal is active and set
if
, or to move on to the next time slot
to estimate
and make the final decision that PU signal is active setting
if
, or inactive setting
if
. Thus, if the PU signal is identified as active in
any of the three consecutive sensing slots,
i,
, and
, the algorithm returns
corresponding to a “busy” channel, while if the PU signal is determined to be inactive in
all three consecutive time slots the algorithm returns
corresponding to an “idle” channel. The formal statement of the 3EED algorithm is given in Algorithm 1.
Algorithm 1 The 3EED Algorithm for Spectrum Sensing |
Input: sensing threshold |
Output: output result |
- 1:
for each spectrum sensing slot i do - 2:
Estimate received signal energy and save its value - 3:
if then - 4:
Set ⟶ PU active/Channel “busy” - 5:
else - 6:
Read (saved in slot i-1) - 7:
if then - 8:
Set ⟶ PU active/Channel “busy” - 9:
else - 10:
Estimate - 11:
if then - 12:
Set ⟶ PU active/Channel “busy” - 13:
else - 14:
Set ⟶ PU not active/Channel “idle” - 15:
return
|
The probabilities of false alarm and detection for the 3EED algorithm for spectrum sensing are expressed in terms of the probabilities of false alarm and detection for the CED algorithm,
and
, respectively as [
19]:
and
where
T represents the total duration of the transmission cycle that consists of
B consecutive slots during which the channel is busy followed by a number of
slots in which the channel is idle. We note that the ratio
represents the spectrum utilization ratio of the PU (that is the fraction of time the channel is actively used by the PU).
The decision threshold
is determined based on a desired performance level that is specified in terms of a target probability of false alarm value,
, as it is usually the case with constant false alarm rate (CFAR) detectors [
19],
We note that the threshold must be adapted when changes in the noise variance occur, in order to keep the probability of false alarm at the desired value. We also note that, by considering only the probability of false alarm in setting the sensing threshold, the SU is favored, since by setting the value of low the SU has more chances of utilizing the spectrum. However, in the case of a mis-detection, when the PU is active but the channel is incorrectly detected as “idle”, the SU transmission will interfere with the active PU signal and will negatively affect the PU performance. Thus, in order for spectrum sensing to be beneficial to both PU and SU, threshold setting should consider both the probability of false alarm and the probability of mis-detection.
3. Optimizing the 3EED Sensing Threshold to Minimize the Decision Error Probability
To optimize the decision threshold of the 3EED algorithm for spectrum sensing we use the DEP as the performance metric, which is formally defined as [
22]:
Analyzing expression (
6) we note that the DEP is a function of the sensing threshold
, the PU spectrum utilization ratio
, the average power of the PU signal
, and the noise variance
. Furthermore, both terms in the DEP expression (
6) are related to decision errors in the spectrum sensing process:
The first term in (
6) is implied by the probability of false alarm and corresponds to the case when a given sensing slot is found busy without an active PU transmission in this slot. False alarms occur only when the channel is idle and the term is weighted by the
factor corresponding to the fraction of time when the PU is not active.
The second term in (
6) corresponds to the probability of mis-detection and is associated with the case when a given sensing slot is found idle while an active PU transmission is actually in progress in this slot. Mis-detections occur when the channel is busy and the term is weighted by the
factor corresponding to the fraction of time when the PU is active.
Thus, the DEP provides a trade-off between the false alarm and mis-detection performance, and allows optimization of the decision threshold for the 3EED algorithm by setting it to minimize the DEP (
6), that is
Introducing (
3) and (
4) in (
6), we rewrite the expression of DEP as
For the sake of simplicity, let us introduce two variables denoted as
and
, which are the arguments of the
Q-function in (
1) and (
2), respectively, and expressed as
and
Using the expressions (
9) and (
10), we can rewrite the DEP function from (
8) as following:
We note that finding an accurate closed-form expression for
is elusive as the expression of the DEP metric to be optimized has already been approximated when expressions of
and
in terms of the
Q-functions have been used to obtain (
11), and resorting to further approximations of the
Q-function in terms of simpler elementary functions will affect the accuracy of the optimal threshold value obtained. Thus, we focus on numerical optimization of the DEP metric (
11), which takes advantage of its convexity properties.
Specifically, we notice that the DEP function has four variables, i.e.,
,
,
, and
. However, the optimization aims only at the threshold variable,
. Therefore, the other three variables are assumed to be constant for this optimization. In order to perform the threshold optimization, the DEP function from (
6) and (
11) has to be a convex function in
. Therefore, we provide the next theorem.
Theorem 1. The DEP function given by (11) is a convex function in λ. Proof. Let us introduce the following notations for the functional terms from (
11):
Analyzing the second derivative of both functions from (
12) with respect to
a and
b, respectively, one can notice that both have a unique and identical inflection point (i.e., the solution of
and
). The value of this common inflection point is the solution of the following transcendental equation for
or
:
An approximate value for the solution of the Equation (
13) can be obtained using numerical methods or graphically, i.e.,
. Considering this approximate value of
and using the relations in (
9) and (
10), we can determine the values of the inflection point values of
and
for the functions
and
, respectively, from (
12):
In order to evaluate the convexity of the functions from (
12), we have to estimate the values in the inflection points, given by (
14), of the first derivative of these functions with respect to
, respectively, denoted as
and
. Analyzing these first derivative functions, we noticed that
and
. Therefore, it results that
is convex in
for
and
is convex in
for
.
Also, we note that the DEP expression from (
11), with the notations from (
12), is a linear combination of the two convex functions
and
for the intersection set
:
We also know that the spectrum utilization ratio of the PU is a positive number, i.e.,
and therefore, both coefficients of the linear expression from (
15) are positive numbers.
Finally, Theorem
from page 52 in [
27] states that a linear combination of two convex functions on a set, with non-negative coefficients, is also a convex function. Hence, we can conclude that the DEP expression from (
11) is a convex function in
on the set
. □
Now, because the DEP function is convex as stated by Theorem 1, we can determine the optimum threshold from (
7) by solving the following equation to find the critical points of the DEP (
6):
Next, using the DEP expression from (
11) we obtain
where
and
were previously introduced in (
9) and (
10).
Using the expression of the first derivative of the
Q-function
the threshold optimization Equation (
16) becomes
where
is the signal-to-noise ratio (SNR) and
We note that Equation (
19) is transcendental, which makes it difficult to find a closed-form solution for the optimal threshold
, and the alternative is to obtain a numerical solution for it as discussed in the following section.
4. Numerical Approach to Finding the Optimal 3EED Sensing Threshold
The numerical approach used to find
, the optimal threshold for the 3EED spectrum sensing, is based on the application of Newton’s iterative method [
28] for Equation (
19) rewritten as
As the rate of convergence for Newton’s method is quadratic, with proper initialization, a solution to (
21) that approximates well the optimal sensing threshold
can be found in only a few iterations of the type [
28]
Furthermore, the proposed approach uses the
Q-function approximation [
29]
to rewrite the
and
terms in (
21).
We have to note that the initialization of Newton’s iterative method, used to solve the optimization equation from (
21), and its convergence are strongly related to the convexity of the DEP function. According to the DEP function’s convexity demonstrated in Theorem 1, we know that the best initialization values of
should be the values of the inflection points, i.e., either
or
given in (
14). However, for the analytical derivation of the optimum value of
, the use of
or
in the expressions of the optimization function from (
21) and its derivative function would have complex expressions. Instead, we prefer to use the values of
for which the argument variables
a and
b in the optimization Equation (
21) take null values, i.e.,
or
. Hence, all terms multiplied by
a or
b will be eliminated from the final expressions. The
values that are the solutions for the equations
and
, denoted as
and
, respectively, result from (
9) and (
10) as
and
It is important to note that the difference between the values of
and
and the values of
and
is almost neglectable. Using the expressions from (
14), (
24) and (
25), it can be easily demonstrated that the relative difference between these values is given by:
Considering that
and
N takes values of the order of tens of thousands samples, then it results in a value for the relative difference in (
26) that is less than
.
Hence, considering all the above, we will use the values of and as initial values for Newton’s method.
Since (
23) is valid only for positive arguments of the
Q-function and the arguments
and
in (
21) can take both positive and negative values, as can be observed from (
9) and (
10), the approximation is applied in conjunction with the symmetry property of the
Q-function,
. Specifically, the following three distinct cases will be analyzed separately to provide a numerical solution for Equation (
21):
,
, and
.
We have to note that the domain of values is separated into these three sub-domains (, , and ), where the value of delimits cases and and delimits cases and . Therefore, will be used as the initial value for the iterative method in case and will be used as the initial value for the iterative method in case . Instead, for case , we can use either or as the initial value, because the minimum DEP can be reached from either side of the interval with a similar accuracy.
4.1. Case
Using the symmetry property of the
Q-function, Equation (
21) can be rewritten as:
which, upon using the approximation (
23) becomes:
Denoting the function in the left-hand side of (
28) by
, and initializing Newton’s iteration with the value
from (
24) we obtain
The derivative
is given by the expression (
30), which, together with (
29), can be used to start Newton’s iterations (
22) to obtain a numerical solution for the optimal sensing threshold
.
4.2. Case
Following a similar approach as in the previous case but in which the symmetry property of the
Q-function is used only for the
term, Equation (
21) is rewritten in this case as:
for which approximation (
23) implies that
Denoting the function in the left-hand side of (
32) by
, and initializing Newton’s iteration with the value
from (
25) we obtain
The derivative
is given by expression (
34), which, together with (
33), can now be used to start Newton’s iterations (
22) to obtain a numerical solution for the optimal sensing threshold
.
In case
, we have used
as the initial value, but we can obtain similar expressions for
and
with
as the initial value, as in (
33) and (
34), respectively, with similar performance results for Newton’s method.
4.3. Case
In this case, the approximation from (
23) can be used directly in (
21) to rewrite it as expression (
35). Denoting the function in the left-hand side of (
35) by
and initializing it in this case with the same value
in (
25) we obtain the expressions for
and
as shown in (
36) and (
37), respectively, which can be used to start Newton’s iterations (
22) to obtain a numerical solution for the optimal sensing threshold
.
4.4. One-Step Numerical Solution and the 3EED Algorithm with Adaptive Threshold
The rate of convergence for Newton’s iterations and the number of steps
n needed to find a numerical solution
to the optimal sensing threshold for each of the three cases outlined in the previous sections depend on the monotonicity of the corresponding
function,
as well as on the initialization
In order to improve convergence and minimize the overhead associated with finding the optimal sensing threshold, we propose to use the alternative function
having the derivative expressed as
which yields a good approximation for the optimal sensing threshold in only one iteration
This approach was prompted by empirical observations that are discussed in
Section 5.1 and takes advantage of the monotonicity of
, which, along with proper choice of the initial value
, amount essentially to a linearization of the function that yields the optimal threshold around its root.
Noting that the functions
,
, that approximate
in (
21) are all monotonically decreasing, and that they overlap at the edges of the definition intervals for
a and
b, that is
the proposed approach identifies first which approximation case
j is applicable (
), and determines the one-step numerical solution for the optimal sensing threshold
using (
42). Once the sensing threshold is found, the 3EED Algorithm 1 is applied with the value
to make a decision on the PU activity and channel availability. The approach is formally stated as Algorithm 2.
Algorithm 2 The 3EED algorithm with adaptive threshold |
Input: N, , , |
Output: output result |
- 1:
Use ( 24) and ( 25) to obtain and . - 2:
Use ( 32) and ( 33) to obtain and - 3:
if and then - 4:
in ( 42) and - 5:
else if and then - 6:
in ( 42) and - 7:
else if and then - 8:
in ( 42) and - 9:
Apply Algorithm 1 with sensing threshold - 10:
return output by Algorithm 1
|
6. Conclusions
A new ED algorithm for spectrum sensing in CR systems is presented in the paper. The proposed algorithm employs an adaptive sensing threshold that is optimized to minimize the DEP and has minimal overhead, since the value of the optimal threshold is found through a one-step iterative method.
Numerical results obtained from simulations are presented to illustrate the performance of the proposed algorithm and to compare it to the adaptive CED algorithm. The results show that the proposed algorithm outperforms the CED algorithm for spectrum sensing, resulting in lower values for the DEP for all values of the spectral utilization ratio that are of practical interest for CR systems providing SU access to licensed spectrum.
We intend to implement and validate the proposed algorithm using SDR platforms from the USRP family. In this context, we will also focus on the optimization of the expressions used in the algorithm to estimate the decision threshold for minimizing the computational complexity and the sensing time.