 Research
 Open Access
 Published:
An analysis of energy detector based on improved approximations of the chisquare distributions
EURASIP Journal on Wireless Communications and Networking volume 2021, Article number: 44 (2021)
Abstract
Closedform expressions for the detection probability, the false alarm probability and the energy detector constant threshold are derived using approximations of the central chisquare and noncentral chisquare distributions. The approximations used show closer proximity to the original functions when compared to the expressions used in the literature. The novel expressions allow gains up to 6% and 16% in terms of measured false alarm and missdetection probability, respectively, if compared to the Central Limit Theorem approach. The throughput of cognitive network is also enhanced when these novel expressions are implemented, providing gains up to 9%. New equations are also presented that minimize the total error rate to obtain the detection threshold and the optimal number of samples. The analytical results match the results of the simulation for a wide range of SNR values.
1 Introduction and background
The growing demand for wireless communications has impacted the dynamics of spectrum management and the challenge of accommodating more users into a finite number of frequency bands is being investigated since the publication of [1]. Cognitive Radio (CR) emerged as a new paradigm for the intelligent use of the spectrum. A native user of a particular frequency band is known as primary user (PU), while the device that utilize CR is known as secondary user (SU). Under the interweave paradigm, the SU device senses different frequency bands and when verifying the absence of the PU in any of them, it occupies it in an opportunistic way.
1.1 State of the art
The most simple and effective mechanism for spectrum sensing is the energy detector (ED), presented for the first time in [2]. This technique is based on the level of signal energy sensed and their performance is measured in terms of detection and false alarm probabilities. The correct specification of these parameters provides robust protection to PU’s transmission. The PU has the priority in the use of the frequency band; therefore, the SU senses the spectrum periodically and after that it can execute two actions in the second interval: transmission of information or remain in standby. The optimal duration of the sensing interval was studied in [3] where it was theoretically shown that there is an ideal detection sensing interval duration that maximizes the cognitive radio network (CRN) throughput. In that work, the Gaussian approach, or central limit theorem (CLT) approach was used when assuming a large number of samples in the sensing interval [4].
The method presented in [5] also employs energy detection and analyzes the optimal sensing duration but different from [3], it assumes that the PU has a variable occupation for the full duration of the frame. In [6] a cognitive radio analysis is given for the design of codes in the finite blocklength regime and energy detection with the CLT approach is also used. In [7] the compromise between sensing and energy efficiency of the CRN is analyzed through the introduction of two models: channel handoff and stopandwait. The hidden terminal problem is investigated in [8] in a joint analysis of energy detection and Hidden Markov model.
Cooperation between SUs is addressed in [9] where a threshold optimization is developed estimating the energy of the primary signals based on a finite number of samples. The cooperation is also studied in [10], where the energy detector is used together with signal correlation analysis to improve the performance of the entire network. Cooperation is also verified in [11], this work takes into account the impact of multiple SUs and PUs accessing the network, which reduces the network throughput, in addition the compromise problem between sensing and throughput is redefined using the PU interference probability.
The performance of the energy detector is also investigated in [12], where an adaptive detection threshold is proposed to improve the sensing performance. The energy detector also serves as basis for the work of [13], which uses the approximations found in [3] and an approach based on state transitions to generate new expressions for the detection and false alarm probabilities, allowing simultaneous analysis of the problem between sensing and flow for high activity PU.
The Gaussian approach to the energy detector is also studied in more recent works. The authors of [14] present an adaptive interval sensing algorithm where a discrete gain is obtained. In [15] a cooperative analysis is presented considering some models of fading channels. In [16] an energy detector with two dynamic thresholds is used to optimize signal detection. The energy detection threshold is also studied in the work of [17] which proposes an algorithm to select the optimum threshold providing improved throughput. Finally, in [18] a reinforcement learningbased multislot doublethreshold spectrum sensing with Bayesian fusion is proposed to sense big spectrum data, which can find required idle channels faster while guaranteeing spectrum sensing performance. The authors of [19] developed a multihypothesis test perspective for illegitimate access and rogue power emission in cognitive radio scenarios. This work provides a comprehensive mathematical analysis concerning energy detection based on central and noncentral chisquare distributions.
1.2 System model
In the proposed system model we assume a pair of PU transceiver and a pair of SU transceiver, and the PU receiver is within the range of the SU transmitter. We also are assuming single band detection.
As mentioned before the PU has higher priority and SU transmissions could not impact the PU link. To achieve this restriction the SU senses spectrum periodically, this cycle is known as SU frame and it is divided into two intervals which are repeated after a time T. In the first interval of the frame, SU performs sensing and based on the result, it can execute two actions: transmitting information or remaining in standby. The sensing time is denoted as \(\tau _S\).
The probability associated with the activity of PU (traffic density) is denoted as \(P({\mathbf{H}}_{0})\) where no transmissions are made or \(P({\mathbf{H}}_{1})\) if the PU is definitely using the channel. We also assume that the PU activity remains constant throughout the sensing period. Figure 1 shows the proposed system model and the SU frame with the sensing interval.
1.3 Energy detector
Spectral sensing can be implemented by several methods found in the literature, such as energy detection, matched filter and cyclostationary feature detection. The energy detector, first introduced in [2], is the simplest and most effective technique, and the output is proportional to the energy of the received signal.
The energy detector implemented in the SU is detailed in Fig. 2, where samples of the received signal passes through a squared lift device followed by an integrator, the output is compared with a threshold value. The result can be presented as a binary hypothesis, the occupation or the vacancy of the spectrum [3]:
where n(t) represents the noise at the detector input, sampled at time t, h is the channel gain, x(t) is the PU’s signal and y(t) is the signal received at the SU. Under the hypothesis \({\mathbf{H}}_{0}\) only the noise is present in the SU receiver, while in the hypothesis \({\mathbf{H}}_{1}\) the PU signal is present on the SU side. The energy detector collects a total number of N samples to perform the hypothesis test.
Noise samples n(t) are assumed to be AWGN with zero mean and variance \(\sigma _{n}^2\) [3]. The SNR between PU and SU, measured at the SU’s receiver, is given by \(\gamma = \frac{h^2 \sigma _{x}^2}{\sigma _{n}^2}\), where \(\sigma _{x}^2\) is the variance of x(t). The received signal y(t) passes through the energy detector and the detector output is used to determine the test statistic, \(\Lambda\). The detection probability \(P_{d}\) and the false alarm probability \(P_{\mathrm{f}}\) are defined according to the test statistic as [4]:
where \(\lambda _{\mathrm{th}}\) is the detection threshold value. The test statistic \(\Lambda\) follows different probability density functions when analyzed under hypotheses \({\mathbf{H}}_{0}\) e \({\mathbf{H}}_{1}\), being denoted as \(f_{\Lambda {\mathbf{H}}_{0}}(\lambda )\) and \(f_{\Lambda {\mathbf{H}}_{1}}(\lambda )\), respectively. Thus, \(P_{\mathrm{f}}\) is the probability that the energy detector identify the existence of signal, which actually, is not present at the receiver input. Besides, \(P_{\mathrm{d}}\) is the probability that the energy detector assigns the presence of a signal and the signal actually exists. Another parameter that is also defined in [2] is the missdetection probability \(P_{\mathrm{md}}= 1P_{\mathrm{d}}\) which is the probability that the energy detector does not identify the presence of a signal; however, it is present at the receiver input. This study did not take into account the fading, thus \(h=1\).
Regarding hypothesis \({\mathbf{H}}_{0}\), the test statistic, \(\Lambda\), is the result of a sum of 2N squares of independent Gaussian random variables. The output of the energy detector therefore follows a central chisquare distribution (\(\chi ^2\)), with \(\nu\) degrees of freedom, whose probability density function (PDF) is [20]:
where \(\Gamma (a) = \int ^\infty _0 b^{a1}{\mathrm{e}}^{b}db\) is the gamma function. The false alarm probability is defined through (2), i.e. it is the complementary cumulative distribution function (CDF) of the central chisquare distribution, as:
where \(F_{\Lambda {\mathbf{H}}_{0}}(\lambda )\) is the CDF of a random variable with central chisquare distribution [20]:
The function \(\gamma _L(a,b)=\int _0^b c^{a1}{\mathrm{e}}^{c} dc\) is the lower incomplete gamma function. The central chisquare distribution tends toward the normal distribution when \(\nu \rightarrow \infty\). In this case the CLT approach is used [20] to give:
where
denotes the CDF of the normal distribution. According to [4], \(\lambda = \frac{\lambda _{\mathrm{th}}}{\sigma _n^2}\) and \(\nu = 2N\), so (4) can be rewritten [3], just replacing the variables:
The function \(Q(a) = 1\Phi (a)\) is known as the GaussianQ function and represents the tail of the standard normal distribution. The superscript (CLT) in (6) and (8) identify the use of the CLT approach. As indicated in Sect. 1, Eq. (8) is widely used in the energy detector, as can be seen in [3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]. However, as presented in [21], the CLT approach is not very accurate unless N is very large.
For the hypothesis \({\mathbf{H}}_{1}\), \(\Lambda\) is a sum of 2N squares of random variables with Gaussian distribution and nonzero mean that follows a noncentral chisquare probability distribution (\(\chi _{\nu }^{'2}\)), with \(\nu\) degrees of freedom and noncentrality parameter \(\phi\) [21]:
where \(I_a(b) = (b/2)^a\sum ^{\infty }_{c=0}\frac{(b^2/4)^c}{c!\Gamma (a+c+1)}\) is the Besel function of first type [22]. The detection probability is defined using (2), that is, the complementary CDF of the noncentral chisquare distribution which can be and written as:
where
The expression \(Q_M(a,b)\) is the MarcumQ function [22]. Again, the works [3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18] applied the approximation of the CLT in (11) [21], obtaining:
According to [4], \(\lambda = \frac{\lambda _{\mathrm{th}}}{\sigma _n^2}\), \(\nu = 2N\) and \(\varphi =2N\gamma\), the detection probability is rewritten [3], just replacing the variables:
Similar to (8), the detection probability given by (13) is valid for very large N, otherwise the approximate values start to deviate from those obtained by the original equations.
1.4 Throughput analysis
The network throughput is defined as the ratio between the total transmitted data and the total consumed time. If the channel is sensed busy, the SU will not transmit data and the throughput will be zero. If the channel is sensed idle and the real state of the channel is also unoccupied, the throughput will be equal to [17]:
where \(\alpha = \frac{T  \tau _S}{T}\) and \(\gamma _{S}\) is the the SNR between the SU transmitter and the SU receiver. If the channel is sensed as idle but its real state is busy, then the throughput will be reduced because there will be interference in the channel, as follows:
The total average throughput for the cognitive network is:
where \(P({\mathbf{H}}_{0})\) and \(P({\mathbf{H}}_{1})\) are the probabilities of PU activity (traffic density) defined in Sect. 1.2.
1.5 Motivation and objectives
Thus far, works [3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18] use the energy detector with the CLT approach. Low signaltonoise ratio (SNR) scenarios require the energy detector to analyze a large number of samples to perform well. When the number of samples is very large, the probability distribution of the sum of these random variables with finite mean and variance is close to the normal distribution. However, in some cases, this approach does not prove to be the most appropriate, especially for scenarios where the number of samples is restricted (SNR design next to 0 dB). As shown in [6], when finite blocklength communications are analyzed, the number of samples is very small. Moreover, analysis of sensor networks shown in [23, 24] also used a small amount of samples.
This study is motivated by the fact that the previous work on the subject focused on the design of the energy detector using a large number of samples. As far as we know, the literature is scarce in addressing the design of the energy detector for a small number of samples. As the output of the energy detector has characteristics of the central chisquare and noncentral chisquare distributions, some expressions of classical approximations found in the literature are used to formulate new expressions for the energy detector. It was possible to find expressions that are more appropriate for scenarios that demand a moderate amount of samples, these expressions have a better fit than CLT approach expressions. It is also assumed that the PU signal samples are Gaussian.
The contributions of this work are described below:

Derivations of approximated expressions for the detection probability and the false alarm probability for the energy detector.

Derivation of new expressions to evaluate the constant threshold based on the approximations.
Simulations performed show the use of new expressions presented achieve gains nearly \(6\%\) in terms of measured false alarm probability and nearly \(16\%\) in terms of missdetection probability. Simulations also show gains up to \(9\%\) in terms of throughput when novel expression is used in comparison with CLT approach. The rest of this work is divided as follows. Section 2 introduces the proposed improvements. Section 3 presents the results of the simulations. Finally, in Sect. 4, some conclusions are discussed.
2 Proposed improvements
2.1 Methods/experimental
The research content of this article is divided into two parts, the first being a theoretical analysis of approximations of probability distributions, in the second part through the expressions computational simulations were performed with the MATLAB®2018 software from the company Mathworks®.
2.2 Novel energy detector metrics
The classical literature presents some approximate equations for solving (5) such as Fisher’s approximation [25]:
In this case, the false alarm probability can be determined with a new expression. For this procedure we just replace the variables \(\lambda = \frac{\lambda _{\mathrm{th}}}{\sigma _n^2}\) and \(\nu = 2N\) in (17):
where the index F indicates the Fisher approximation. Another approach to (5) was introduced by Wilson–Hilferty [26]:
Again replacing the aforementioned variables \(\lambda\) and \(\nu\) we get this expression:
where the index WH indicates the Wilson–Hilferty approach to differentiate the expression. Approximations for the CDF of the noncentral chisquare distribution are also found in the literature, such as the AbdelAty approach [27]:
where \(f=\frac{(\nu +\varphi )^2}{\nu +2\varphi }\). Knowing that \(\varphi =2N\gamma\), the detection probability can be rewritten with the substitution of the variables in (21), generating:
where the index AA indicates AbdelAty’s approach.
It is also possible to use the Sankaran approach [28] for the CDF of the noncentral chisquare distribution:
where \(\psi = 1  \frac{2}{3}\frac{(\nu +\varphi )(\nu +3\varphi )}{(\nu +2\varphi )^2}\), \(p = \frac{\nu +2\varphi }{(\nu +\varphi )^2}\) and \(m = (\psi 1)(13\psi )\). In this case the detection probability can be rewritten using (24) and the variables aforementioned, where the index S indicates the use of the Shankaran approach, generating expression:
2.3 Constant threshold design
The performance of the energy detector is highly impacted by the correct choice of parameters that generate the equations presented in Sect. 2.2. One procedure to establish an excellent sensing performance is the specification of constant parameters in practical energy detection design. The design parameters are the constant values \({\hat{P}}_{\mathrm{f}}\) and \({\hat{P}}_{\mathrm{d}}\) or \({\hat{P}}_{\mathrm{md}}\), where \({\hat{P}}_{\mathrm{md}} = 1  {\hat{P}}_{\mathrm{d}}\), defined for a certain project SNR, \({\hat{\gamma }}\). The definition of established parameters generates a constant threshold \(\hat{\lambda _{\mathrm{th}}}\) [12, 17].
According to [3, 17], the threshold can be selected with constant detection rate (CDR) or constant false alarm rate (CFAR) based on the CLT approach. The CFAR threshold requires a constant false alarm probability [17]:
In CDR approach the missdetection probability is constant [17]:
The optimum number of samples \(N^*\) for some specific parameters can be defined combining the CLT expressions (25) and (26) [4]:
the novel equations presented in Sect. 2.2, such as (18) can be arranged with constant false alarm probability, inverting (18) in respect to \(\hat{P_{\mathrm{f}}}\), in this expression:
Also setting a constant false alarm probability in (20) and inverting this expression we obtain:
Equation (22) can be also arranged with respect to the constant missdetection probability, fixing \(P_{\mathrm{md}}\) in (22), resulting in:
Finally, it is possible to define the fixed threshold project based on (24), with a fixed missdetection probability as in the expression (31):
The expressions (28) and (29) are alternative representations to the CFARCLT approach (25). Expressions (30) and (31) are an alternative form to the CDR based on CLT approach (26). The novel expressions presented in this work achieve more accurate results as will be explored in Sect. 3. In addition to the constant threshold design, the equations can be adjusted to define the number of samples N for convenient detection.
Another important analysis resulting from the energy detector parameters is the total error probability \(P_e = P_{\mathrm{f}} + P_{\mathrm{md}}\), which indicates the expectation of inaccuracy of the energy detector. If the total error probability is evaluated based on \(\lambda _{\mathrm{th}}\), it has a global minimum, which indicates that there is only one value of \(\lambda _{\mathrm{th}}\) minimizing \(P_e\), that is, there is an optimal threshold \(\lambda _{\mathrm{th}}^*\), such that \(\lambda _{\mathrm{th}}^* = \arg \min _{\lambda _{\mathrm{th}}}(P_e)\), this is [29],
To achieve this result, we chose a novel expression of false alarm probability (18) and a novel expression of detection probability (22) (both presented in Sect. 2.2) by the facility of algebraic manipulation.
To solve (32), we analyze each part of equation separately. Using the error function relation \(Q(x)=\frac{1}{2}\frac{1}{2}{\text {erf}}\left( \frac{x}{\sqrt{2}}\right)\), the first part of Eq. (32) is the derivative of Eq. (18), rewritten as:
To solve the derivative we use the identity:
the partial derivative of \(P_{\mathrm{f}}^{F}\) in relation to \(\lambda _{\mathrm{th}}\) is given by the expression:
Equation (22) can be in terms of \(P_{\mathrm{md}}\) and the error function as:
The partial derivative of \(P_{\mathrm{md}}^{\mathrm{AA}}\) in relation to \(\lambda _{\mathrm{th}}\) can be achieved using the identity:
Finally, the partial derivative of \(P_{\mathrm{md}}^{\mathrm{AA}}\) in relation to \(\lambda _{\mathrm{th}}\) is given by the original equation:
In this way, either the optimal detection threshold or the optimum number of samples can be found numerically through the resolutions of Eqs. (35) and (38).
3 Results and discussion
The analytical results presented in the previous section are discussed together with results obtained from computer simulations.
Figure 3 shows different measures of \(P_{\mathrm{d}}\) as a function of \(P_{\mathrm{f}}\), or \(P_{\mathrm{d}} = f(P_{\mathrm{f}})\), through receiver operating characteristic curves (ROC) which allow to evaluate the performance of the energy detector based on the theoretical and approximate expressions of the probabilities presented in Sect. 2.2. The following parameters were used: \(N=\{10,20,50,90\}\), \(\sigma _n = \sqrt{1/2}\) and \(\gamma = 5\,{\hbox {dB}}\). For each value of N, Fig. 3 provides four ROC curves: \(P_{\mathrm{d}} = f(P_{\mathrm{f}})\) generated by original Eqs. (4) and (10), \(P_{\mathrm{d}}^{\mathrm{CLT}} = f(P_{\mathrm{f}}^{\mathrm{CLT}})\) generated by the CLT approach using (8) and (13), \(P_{\mathrm{d}}^{\mathrm{AA}} = f(P_{\mathrm{f}}^{F})\) obtained by combining the novel expressions (18) and (22) and finally \(P_{\mathrm{d}}^{S} = f(P_{\mathrm{f}}^{\mathrm{WH}})\) also obtained by combining the novel expressions (20) and (24).
As there were two expressions of \(P_{\mathrm{d}}\) and two of \(P_{\mathrm{f}}\) in Sect. 2.2, four new ROC curves could be generated only with the alternative approaches; however, it was decided to choose the presentation of only two new ROC curves for a more concise graphical analysis. In this sense, the chosen pairs were \(P_{\mathrm{d}}^{\mathrm{AA}} = f(P_{\mathrm{f}}^{F})\) and \(P_{\mathrm{d}}^{S} = f(P_{\mathrm{f}}^{\mathrm{WH}})\). The closer to the upper left corner the ROC curve is, the better its performance as it provides a higher \(P_{\mathrm{d}}\) with a lower \(P_{\mathrm{f}}\). The increase of N is a way to improve the performance of the ROC curve, graphically we can see that all curves tend to match when we increase the value of N. Through the analysis of Fig. 3 it is possible to verify that the curve generated through the CLT approach, besides having a significant distance in relation to the original curves, also has a lower performance compared to the curves generated by the proposed approximations. It is possible to observe, therefore, that the alternative approaches to the CLT approach are more accurate in relation to the original curve.
Figure 4 presents the measured false alarm probability and detection probability as functions of \({\hat{\gamma }}\) obtained through simulations. The energy detection employs the fixed threshold schemes presented in Sect. 2.3. In all simulations, the optimum number of samples \({\hat{N}}\) is calculated according to (27) for each value of \({\hat{\gamma }}\). For the analysis of the fixed threshold design we choose two scenarios. In the first scenario PU is not present and only noise is considered at the SU radio input, the fixed threshold schemes used in this case are based on constant false alarm rate (CFAR), given by the expressions (25), (28) and (29).
In the second scenario PU is present, the fixed threshold schemes used in this instance are based on constant detection rate (CDR), given by the expressions (26), (30) and (31). The aim of each scenario is to measure \(P_{\mathrm{f}}\) for the first scenario or \(P_{\mathrm{md}}\) for the second scenario. In the first scenario, the design signaltonoise ratio value (\({\hat{\gamma }}\)) is used only as a parameter for the energy detector design as it is necessary to estimate the number of samples. Figure 4 shows the measured false alarm probability \(P_{\mathrm{f}}\) or missdetection probability \(P_{\mathrm{md}}\) as a function of several values of \({\hat{\gamma }}\). It was performed a total of \(N_a = 20{,}000\) rounds of simulation and was considered \(\sigma _n = \sqrt{1/2}\). For the different values of \({\hat{\gamma }}\) analyzed, fixed project values \(\hat{P_{\mathrm{f}}}=0.1\) and \(\hat{P_{\mathrm{d}}}=0.9\) were kept. It is possible to verify that the results for low values of \({\hat{\gamma }}\) (\(N>> 1\)) are very similar in all six simulations. In the region \(\,20\,{\hbox {dB}}\) \(<{\hat{\gamma }}<8\,{\hbox {dB}}\), the values of \(P_{\mathrm{f}}\) measured in the SU are really close to the project values \(\hat{P_{\mathrm{f}}}\).
Also in Fig. 4, for \({\hat{\gamma }}>8\,{\hbox {dB}}\) it is possible to observe a difference between measured values of \(P_{\mathrm{f}}\) and \(P_{\mathrm{md}}\) for all approaches employed. However, there is a greater gap between the measured values of \(P_{\mathrm{f}}\) using the CLT approach compared to the project value \(\hat{P_{\mathrm{f}}}\) and also with the values measured by the other approaches. A major difference can be observed between the measured values \(P_{\mathrm{md}}\) using the CLT approach and the project value \(\hat{P_{\mathrm{md}}}\). The overall performance of the energy detector with the fixed thresholds presented in (28) and (29) shows closer proximity to \(\hat{P_{\mathrm{f}}}\) in comparison with the CLT approach (25). For \({\hat{\gamma }} = 0\,{\hbox {dB}}\) the project with \(\lambda _{\mathrm{th}}^{\mathrm{CFARCLT}}\) shows a difference about \(6\%\) compared to the project \(\lambda _{\mathrm{th}}^{\mathrm{CFARWH}}\).
The performance of the energy detector in the second scenario with the constant thresholds presented in (30) and (31) also shows closer proximity to \(\hat{P_{\mathrm{md}}}\). For \({\hat{\gamma }} = 0\,{\hbox {dB}}\) the project with \(\lambda _{\mathrm{th}}^{\mathrm{CDRCLT}}\) shows a difference about \(16\%\) compared to the project \(\lambda _{\mathrm{th}}^{\mathrm{CDRAA}}\). These differences occur because for the same number of samples defined in the project, the false alarm probabilities and missdetection probabilities have different values as can be seen in Fig. 3.
Some constant threshold expressions presented in this work are more complex than those based on the CLT approach, but we can see that they bring benefits in terms of energy detector performance. In order to analyze the computational complexity when using these expressions, the empirical complexity measuring method of [30] was used, which measures the computer workload in terms of time spent. In Fig. 5, each bar represents the measured computational complexity relative to the CLTbased expressions. In Fig. 5a, comparisons are based on the CFAR expressions: (25), (28) and (29). In Figure 5b, comparisons are made with the CDR expressions: (26), (30) and (31). From Fig. 5a it can be seen that the expression based on the Wilson–Hilferty approach is approximately 50% more costly when compared to the CLT approach. On the other hand, when the Fisher’s approximation is used, there is a gain of approximately 6% in terms of computational effort. Figure 5b shows that both approaches used (AbdelAty and Sankaran) demand a greater computational effort when compared to the CLT approach. The expression based on the AbdelAty approach is approximately 94% more costly than the CLTbased expression while the CDRbased Sankaran expression is 345% more costly than the CLTbased expression. Although this difference appears to be very large, it should be noted the gain, in terms of performance of the energy detector, which the use of these expressions provides. It is important to emphasize that the computational cost is not demanded continuously when the SU performs sensing. In practical implementation based on constant detection threshold the SU makes use of these expressions only in the definition of the project for a given set of parameters. Thus, for a given environment, the SU calculates the constant detection threshold once and then configures its internal circuits for boundlessness sensing intervals.
Figure 6 shows the total error probability \(P_e=P_{\mathrm{f}}+P_{\mathrm{md}}\) simulated, using two approaches: original equations and approximations presented in Sect. 2.3 depending on (a) the detection threshold, and (b) the number of samples. To generate the present result, different design values were used \({\hat{P}}_{\mathrm{f}}\), \({\hat{P}}_{d}\), \(\sigma _n = 1\) and \(SNR = 0\,{\hbox {dB}}\). First, it is possible to verify the minimum local of both curves that show the optimal values of \(\lambda _{\mathrm{th}}\) and N as discussed in Sect. 2.3 for various design values. The lower the total error probability, the higher the values of \(\lambda _{\mathrm{th}}\) and N, as expected. It can also be observed that the approximations proposed in this work are properly adjusted to the curves of the original equations. The differences in terms of the number of samples N and the optimal detection threshold level were less than \(1\%\), when compared with the original functions and the proposed total error probability model, thereby showing the accuracy of the results obtained.
Figure 7 shows the measured false alarm probability and detection probability as functions of \({\hat{\gamma }}\). In this scenario we verified the proposed constant threshold design for a wide range of SNR; however, the same number of samples \(N=50\) is kept for each SNR value evaluated. The design parameters were set to \(\hat{P_{\mathrm{d}}}=0.9\) and \(\hat{P_{\mathrm{f}}}=0.1\), which represents \({\hat{\gamma }}\approx 4\,{\hbox {dB}}\), with the limited number of samples. The curves generated by the simulation were obtained first by finding the constant threshold values for each of the approaches presented, expressions (2531). For all CFAR approaches, the \(P_{\mathrm{f}}\) value is constant and equal to \(\hat{P_{\mathrm{f}}}\), the same occurs for all the CDR approaches, the \(P_{\mathrm{d}}\) value is also constant and equal to \(\hat{P_{\mathrm{d}}}\). In addition, for each CDR threshold value, the false alarm probabilities are calculated, therefore expression (8) is calculated with respect to (26), (18) is calculated using (30) and (20) is calculated with (31). For each CFAR threshold value, the detection probabilities are calculated; hence, expression (13) is calculated using (25), (22) is calculated with (28) and (24) is calculated with respect to (29).
It can be observed in Fig. 7 that evaluating several SNR values and keeping the same number of samples, the new expressions generate a high value of measured \(P_{\mathrm{d}}\) and a low value of measured \(P_{\mathrm{f}}\) compared to the thresholds based on the CLT approach. For \(\gamma =10\,{\hbox {dB}}\), \(P_{\mathrm{f}}^{F}(\lambda ^{\mathrm{CDRAA}})=0.72\), while \(P_{\mathrm{f}}^{\mathrm{CLT}}(\lambda ^{\mathrm{CDRCLT}})=0.76\), which provides a gain up to \(5\%\). As can be seen, in Fig. 7, for a very low SNR the false alarm probability is high and the detection probability is low due to the reduced number of samples. When increasing the SNR, the probabilities tend to improve until the measured values are close to those defined in project \(\hat{P_{\mathrm{d}}} = 0.9\) and \(\hat{P_{\mathrm{f}}} = 0.1\), in the region close to \(\gamma \approx 4\) dB. By further increasing the SNR, the measured detection probability reaches the maximum value.
The simulation results presented in Fig. 8 show the throughput of the secondary network, described in Sect. 1.2, as a function of \(\gamma\) for a constant number of samples. We used the same parameters as in [17], where \(T = 100\,{\hbox {ms}}\), \(\tau _S = 2.5\,{\hbox {ms}}\), \(\gamma _S=20\,{\hbox {dB}}\), \(\hat{P_{\mathrm{f}}}=0.1\), \(\hat{P_{\mathrm{d}}}=0.9\) and PU’s activity is set as \(P(H_0)=0.8\) and \(P(H_1)=0.2\). For this simulation we used a constant number of samples \(N=50\) and we verified the novel constant threshold design as described in Sect. 2.3. It is possible to observe a gain in terms of throughput when the novel constant threshold is employed in comparison with the constant threshold based on CLT approach. For \({\hat{\gamma }} = 9\,{\hbox {dB}}\) the throughput of SU network is \(R = 5.4853\) bits/sec/Hz when we use \({\hat{\lambda }}^{\mathrm{CFARF}}\), the throughput with \({\hat{\lambda }}^{\mathrm{CFARCLT}}\) based on CLT approach is \(R = 5.4798\) bits/sec/Hz , which represents a gain up to \(0.6\%\). The throughput gain is greater when the comparison is made between \({\hat{\lambda }}^{S}\) or \({\hat{\lambda }}^{\mathrm{AA}}\) and \({\hat{\lambda }}^{\mathrm{CDR}}\). For \({\hat{\gamma }} = 9\,{\hbox {dB}}\), a gain up to \(12\%\) is observed when the constant threshold \({\hat{\lambda }}^{\mathrm{CDRS}}\) is used in comparison with \({\hat{\lambda }}^{\mathrm{CDRCLT}}\). Also a gain up to \(7\%\) is presented when the constant threshold \({\hat{\lambda }}^{\mathrm{CDRAA}}\) is employed in comparison with \({\hat{\lambda }}^{\mathrm{CDRCLT}}\), for \({\hat{\gamma }} = 7\,{\hbox {dB}}\). These results show that in an unfavorable situation where the measured SNR is different from the project SNR \({\hat{\gamma }}\), there is a moderate gain in terms of throughput for the cognitive radio network when we use the new approaches presented in this work. Some numerical values are compared in Table 1.
4 Conclusions
Exploring the approximations of the accumulated density functions of the central chisquare and noncentral chisquare distributions, we arrive at new approximations of false alarm probability, detection probability and constant threshold for the energy detector. New expressions were also presented to find the minimum total error rate. The proposed approximations are closer to the original equations if compared to the approximation of the central limit theorem (CLT) already used in the literature. Unlike the CLT approach, which can be used for a large number of N, the presented approaches can also be used for a moderate number of samples. We show that the design with the new constant threshold expressions is more accurate in terms of measured false alarm and detection probabilities for different SNR values. The throughput of the cognitive network is enhanced when these novel expressions are implemented. The design based on the novel constant thresholds expressions supports greater noise variations, thus presenting greater stability in the detection of measured energy. The mathematical expressions obtained in this work can be applied in other fields of science besides spectrum sensing based on energy detection in cognitive radio.
The equations presented cause a relatively impact on computational cost when energy detection is calculated; however, as the threshold is not calculated repeatedly the SU device does not experience others effects. As the equations presented are simple to implement, they can be used in all cognitive radio devices that already use the energy detector with an algorithm based on the CLT approach. The constant design threshold equations presented can be used as an alternative to the CLT approach for cases that require large amounts of samples (\({\hat{\gamma }}<< 0\,{\hbox {dB}}\)) and especially for cases that require a quantity moderate samples (\({\hat{\gamma }}\approx 0\,{\hbox {dB}}\)) as a network of sensors and communications in a finite length block regime. With the calculation of the minimization of the total error rate, very accurate results were obtained in the search for the detection threshold and the number of samples. Possibilities for future work are: the use of the approach presented in this work for environments with low SNR and the development of expressions for channels with fading based on the approaches used in this work. The continuous study of efficient techniques for the use of the spectrum opens space for new practical models of cognitive radio to be implemented in new generations of wireless communication systems.
Data availability
Data sharing not applicable to this article as no datasets were generated or analyzed during the current study.
Abbreviations
 CR:

Cognitive radio
 CLT:

Central limit theorem
 CFAR:

Constant false alarm rate
 CDR:

Constant detection rate
 ROC:

Receiver operating characteristic
 SNR:

Signaltonoise ratio
 CDF:

Cumulative distribution function
 PDF:

Probability density function
 AWGN:

Additive white Gaussian noise
 PU:

Primary user
 SU:

Secondary user
References
J. Mitola, G.Q. Maguire, Cognitive radio: making software radios more personal. IEEE Pers. Commun. 6(4), 13–18 (1999)
H. Urkowitz, Energy detection of unknown deterministic signals. Proc. IEEE 55(4), 523–531 (1967)
Y.C. Liang et al., Sensingthroughput tradeoff for cognitive radio networks. IEEE Trans. Wirel. Commun. 7(4), 1326–1337 (2008)
S. Atapattu, C. Tellambura, H. Jiang, Energy Detection for Spectrum Sensing in Cognitive Radio (Springer, New York, 2014)
L. Tang et al., Effect of primary user traffic on sensingthroughput tradeoff for cognitive radios. IEEE Trans. Wirel. Commun. 10(4), 1063–1068 (2011)
G. Ozcan, M.C. Gursoy, Throughput of cognitive radio systems with finite blocklength codes. IEEE J. Sel. Areas Commun. 31(11), 2541–2554 (2013)
J. Zhang et al., Sensingenergy efficiency tradeoff for cognitive radio networks. IET Commun. 8(18), 3414–3423 (2014)
Q. Ren, Energy detection performance analysis for UWB radar sensor networks. EURASIP J. Wirel. Commun. Netw. 1, 1–16 (2010)
A. Singh, M.R. Bhatnagar, R.K. Mallik, Threshold optimization of a finite samplebased cognitive radio network using energy detector. EURASIP J. Wirel. Commun. Netw. 1, 165–186 (2013)
M. Tavana et al., Cooperative sensing with joint energy and correlation detection in cognitive radio networks. IEEE Commun. Lett. 21(1), 132–135 (2016)
S. Zhang et al., Impact of access contention on cooperative sensing optimization in cognitive radio networks. IET Commun. 11(1), 94–103 (2017)
N. Wang et al., Energy detectionbased spectrum sensing with constraint region in cognitive LTE systems. Trans. Emerg. Telecommun. Technol. 28(11), e3171 (2017)
H. Cao, S. Yang, Sensingthroughput tradeoff in cognitive radio network based on high activity of primary user. Int. Conf. Comput. Intell. Inf. Syst. 21(1), 121–125 (2017)
M.S. Alkady et al., An adaptive sensing time based on SNR for spectrum utilization enhancement in cognitive radio. Wirel. Pers. Commun. 106(2), 307–319 (2019)
K.K. Godugu et al., Performance of energyefficient cooperative cognitive radio system over erroneous Nakagamim and Weibull fading channels. Wirel. Netw. 26, 2623–2638 (2019)
R. Wan et al., Dynamic dual threshold cooperative spectrum sensing for cognitive radio under noise power uncertainty. Humancentric Comput. Inf. Sci. 9(1), 1–21 (2019)
A. Kumar et al., Analysis of optimal threshold selection for spectrum sensing in a cognitive radio network: an energy detection approach. Wirel. Netw. 25(7), 3917–3931 (2019)
X. Liu et al., Reinforcement learningbased multislot doublethreshold spectrum sensing with Bayesian fusion for industrial big spectrum data. IEEE Trans. Ind. Inform. (2020). https://doi.org/10.1109/TII.2020.2987421
L. Zhang et al., Spectrum sensing under spectrum misuse behaviors: a multihypothesis test perspective. IEEE Trans. Inf. Forensics Secur. 13(4), 993–1007 (2017)
N.L. Johnson, S. Kotz, N. Balakrishnan, Continuous Univariate Distributions, vol. 1 (Wiley, New York, 1995)
N.L. Johnson, S. Kotz, N. Balakrishnan, Continuous Univariate Distributions, vol. 2 (Wiley, New York, 1995)
M. Abramowitz, I.A. Stegun, Handbook of Mathematical Functions: With Formulas, Graphs, and Mathematical Tables (Dover, Mineola, 1970)
S. Maleki, A. Pandharipande, G. Leus, Energyefficient distributed spectrum sensing for cognitive sensor networks. IEEE Sens. J. 11(3), 565–573 (2010)
A. Ebrahimzadeh et al., Sensor selection and optimal energy detection threshold for efficient cooperative spectrum sensing. IEEE Trans. Veh. Technol. 64(4), 1565–1577 (2014)
R.A. Fisher, On the interpretation of χ^{2} from contingency tables and calculation of P. J. R. Stat. Soc. Ser. A 85, 87–94 (1922)
E.B. Wilson, M.M. Hilferty, The distribution of chisquare. Proc. Natl. Acad. Sci. 17, 684–688 (1931)
S. AbdelAty, Approximate formulae for the percentage points and the probability integral of the noncentral χ^{2} distribution. Biometrika 41, 538–540 (1954)
M. Sankaran, Approximations to the noncentral chisquared distribution. Biometrika 50(1–2), 199–204 (1963)
S. Atapattu et al., Unified analysis of lowSNR energy detection and threshold selection. IEEE Trans. Veh. Technol. 64(11), 5006–5019 (2015)
S.F. Goldsmith, A.S. Aiken, D.S. Wilkerson, Measuring empirical computational complexity, in Proceedings of the the 6th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on The Foundations of Software Engineering, pp. 395–404 (2007)
Acknowledgements
The authors thank the editor and the anonymous reviewers for their valuable time and for providing many constructive comments and suggestions, which helped us improve the manuscript. Authors also thank the support of CAPESBrazilian Federal Agency and Federal University of Parana.
Funding
Federal University of Parana Foundation, notice No. 04/2020.
Author information
Authors and Affiliations
Contributions
Authors’ contributions FGME and EMGF developed and produced the research and simulations. FGME designed the main idea and drafted the first manuscript of this work. EMGF gave essential suggestions, reviewed and modified the manuscript. All authors reviewed and edited the manuscript. All authors read and approved the final manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare that they have no competing interests.
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Elias, F.G.M., Fernández, E.M.G. An analysis of energy detector based on improved approximations of the chisquare distributions. J Wireless Com Network 2021, 44 (2021). https://doi.org/10.1186/s13638021019155
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s13638021019155
Keywords
 Cognitive radio
 Spectrum sensing
 Energy detector