On the Signal-to-Noise Ratio Wall of Energy Detection in Spectrum Sensing

In this paper, a comprehensive analysis of the signal-to-noise ratio wall (SNRw) of cognitive radio (CR)-based non-cooperative spectrum sensing (nCSS) and cooperative spectrum sensing (CSS) using energy detection (ED) is presented. The analysis considers a novel realistic noise uncertainty (NU) model in which it is assumed that the estimated noise variance used to determine the decision threshold is unbiased and follows a truncated-Gaussian random distribution with configurable limits. Expressions are derived for the individual detection performances at CRs and global detection performances at the fusion center in terms of probability of false alarm and probability of detection and the SNRw of ED in nCSS and CSS in hard-decision fusion under the <inline-formula> <tex-math notation="LaTeX">$k $ </tex-math></inline-formula>-out-of- <inline-formula> <tex-math notation="LaTeX">$M $ </tex-math></inline-formula> rule, and soft-decision fusion, considering the proposed NU model, respectively. Empirical SNRw algorithms are also proposed, allowing for the SNRw computation of any detector, including the ED, in nCSS and CSS. All theoretical findings are verified through computer simulations or empirical results.


I. INTRODUCTION
The current high demand for new telecommunications systems and services has become the main driver for the development of new technologies, as can be noticed, for example, from the recent advances involving the Internet of things (IoT) and the fifth generation (5G) of communication networks, as well as the discussions already started on the sixth generation (6G) of these networks. However, the scarcity of radio-frequency (RF) spectrum is an important bottleneck to this development. Such scarcity is owed to the fact that, in the current fixed bandwidth allocation policy, the frequency usage right is given only to the contracting user, also called licensed, incumbent or primary user (PU).
It is believed that the fixed spectrum allocation policy will not be adequate for the expansion of wireless communications systems and services. A new and more appropriate The associate editor coordinating the review of this manuscript and approving it for publication was Hassan Tariq Chattha . dynamic spectrum access (DSA) policy is needed, aiming at exploiting the fact that the RF spectrum is actually underutilized, given that much of the time and in certain regions there are allocated frequency bands that are unoccupied [1], [2].
In DSA, it is possible that an unlicensed secondary user (SU) uses a frequency band already licensed to the primary network. The SU transmissions can be carried out both simultaneously with PU transmissions, as long as no harmful interference is caused to the primary network, or in a nonoverlapping manner, taking advantage of transmission opportunities in licensed bands that are momentarily unoccupied.
The concept of cognitive radio (CR) arose in this context [3]. A CR is an intelligent transceiver that possesses several sophisticated cognition-related attributes, allowing it to adapt to the environment and to the network in which it is inserted. The spectrum sensing [3], [4] is one of these attributes, through which an SU transceiver device can identify vacant frequency bands, allowing a shared spectrum use between the primary and the secondary networks. VOLUME 10, 2022 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ Thus, spectrum sensing can be considered one of the main enablers of DSA. Spectrum sensing is a binary hypothesis test in which H 0 and H 1 denote the hypotheses of absence and presence of the PU signal in the sensed band, respectively. It can be cooperative or non-cooperative. In non-cooperative spectrum sensing (nCSS), each SU must sense a PU band, decide on its occupation state, and access the band if it is declared vacant. In cooperative spectrum sensing (CSS), a group of SUs collaborate in the decision about the occupation state of the sensed band, which increases the reliability of detecting PU signals. The advantage of the CSS over the nCSS comes from the spatial diversity of SUs in different geographical locations, which allows the spectrum sensing process to alleviate problems like multipath fading, shadowing and hidden terminals.
Besides nCSS, this paper deals with CSS, in which the sensing information is forwarded to a fusion center (FC), where the global decision upon the state of the sensed channel is made. The type of information sent to the FC defines two fusion schemes: the soft decision (SD) fusion and the hard decision (HD) fusion. In SD fusion, the signal samples collected by the SUs, or a quantity derived from these samples are sent to the FC. In HD fusion, also known as decision fusion, the local SUs' decisions on the sensed channel state are sent to the FC for combination and subsequent global decision.
When HD fusion is applied, the FC makes the global decision via the k-out-of-M rule, where k is the number of received decisions favoring the hypothesis H 1 , and M is the total number of received decisions, which is equal to the number of SUs in cooperation. Thus, the global decision is made in favor of H 1 if at least k out of the M decisions favor H 1 ; the global decision favors H 0 otherwise. When k = 1, k = M , and k = M /2 + 1 , the k-out-of-M rule specializes to the OR, AND, and majority (MAJ) voting rule, respectively, where x denotes the greatest integer less than or equal to x.
The local decisions in the case of HD fusion and the global decision in the case of SD fusion are made by comparing a test statistic, which is formed from the received samples, with a decision threshold. The way in which a test statistic is formed is defined by the detection technique adopted. Among several detection techniques explored in the literature [5]- [14], the energy detection (ED) is one the most known and widely used, but its performance is quite sensitive to inaccuracies on the knowledge of the noise variance information, which is usually referred to as noise uncertainty (NU). Because of NU, a limit on the detection capability called signal-to-noise ratio wall (SNRw) arises. The SNRw is defined the signal-tonoise ratio (SNR) below which it is not possible to accurately detect a signal, no matter the sensing time spent. The SNRw in ED-based nCSS and CSS is analyzed at length in this paper.

A. RELATED RESEARCH
The existence of an SNRw imposed by NU for every moment-based detector, also known as generalized energy detector (GED), including the ED, in low SNR regimes is demonstrated in [15]. In [16] the signal detection problem in low SNR environments, under NU, is considered for deriving the SNRw of ED, additionally proving the existence of an SNRw for other detection algorithms due to NU. The SNRw for GED is derived in [17] under NU in the context of CR-based nCSS. The authors of [17] show that, under uniformly distributed NU, the SNRw of GED is independent of the moment of the detector and, therefore, is identical to the SNRw of ED. Besides, they numerically calculate the SNRw of GED under lognormally distributed NU. Derivations of the SNRw for the GED can also be found in [18], where it is considered a CSS under additive white Gaussian noise (AWGN) channels and uniformly distributed NU in SD and HD fusion. The AND, OR, and MAJ decision fusion rules for particular numbers of SUs were considered, subsequently being generalized to any value of k and M in the k-out-of-M rule. Results also show that the SNRw is independent of the moment of the detector in CSS with SD and HD, as it is for nCSS in [17]. The SNRw of GED under NU, considering diversity in fading and AWGN channels is addressed in [19]. The SNRw for the GED in AWGN channels is derived, and the independence of the moment of the detector is also demonstrated, possibly causing a reduction in the SNRw as the moment increases, depending on the diversity technique adopted. A generalized SNRw for the ED in CSS under NU is derived in [20], where SUs possibly experience different nominal noise powers, received PU signal powers and NU levels. Results show that the traditional expressions for the SNRw of ED in nCSS and CSS with homogeneous SUs are particular cases of the generalized SNRw of ED with heterogeneous SUs.
In addition to the above-mentioned, the literature also presents several other related research works considering different circumstances, scenarios, models and distributions of the NU, proposing strategies to increase the detector robustness against NU and decrease the limitations imposed by the SNRw on ED in nCSS and CSS, as can be verified for instance in [20]- [27]. The work in [24], for example, proposes two NU models based on discrete and continuous NU distributions and shows that one can improve the performances of ED without increasing the sensing time by assuming a priori knowledge on the noise distribution and selecting a proper decision threshold. On the other side, [25] studies the effects of noise power estimation on the performances of ED in CR applications and quantifies the SNR penalty suffered by non-ideal ED. Considering that closed-form analysis for lognormally distributed NU is usually complex, [28] derives a closed-form Gaussian distributed NU model for the inverse noise standard deviation that has good agreement with the more common lognormal distribution for low to moderate NU levels. Results show that, by adopting the proposed method, one can avoid the effect of SNRw on ED and provide acceptable detection performances at very low SNR when NU is present.

B. CONTRIBUTIONS AND STRUCTURE OF THE ARTICLE
This paper addresses the SNRw of ED in nCSS and CSS due to NU. Compared to the traditional assumptions in the literature, it adopts a different perspective on the source of NU at the receivers and, according to this new assumption, it derives the SNRw for the ED in nCSS and CSS with SD and HD for the k-out-of-M rule, also considering a new NU model in terms of NU range and distribution.
According to the literature, most of the research works on NU modeling and SNRw derivation assume a priori knowledge on the nominal noise variance σ 2 v at the receivers and, therefore, the decision threshold is set according to this variance. NU takes place by considering that the actual noise variance isσ 2 v , which deviates from the nominal value mainly due to unwanted received signals treated as noise. In this case, the means and variances of the ED test statistic change according to changes inσ 2 v , but the threshold does not change, since it is based on σ 2 v . In this scenario, the effect of this NU cannot be mitigated, thus NU mitigation cannot be modeled.
In this paper it is assumed a more practical appealing scenario in which the received signal is affected by a possibly variable thermal noise plus interference having unknown variance σ 2 v . The decision threshold is set based on an estimateσ 2 v of the unknown variance. In this case, the means and variances of the ED test statistic do not change, and the threshold changes according to the inherent inaccuracy ofσ 2 v . In this scenario, the effect of the NU can be mitigated by improving the estimation accuracy. Additionally, the variance of noise, interference or both is tracked by the estimation process in practice. Thus, NU mitigation can be modeled.
Besides, most of the research works consider that the noise powerσ 2 v at receivers vary in the range of [0, ∞] or [σ 2 v , ∞], following a uniform or lognormal distribution, where σ 2 v is the nominal noise power at the receiver. In contrast, this paper adopts an unbiased NU model in which the estimated noise power at receivers vary in the range [14], with 0 ≤ ρ < 1, where ρ is an NU factor, following a truncated Gaussian distribution.
This article also proposes two algorithms for empirically finding the SNRw of ED or other detectors in nCSS and CSS.
Several mathematical derivations made throughout this paper follow the study in [18], where the authors derive the SNRw for the GED in CSS with HD and SD according to the aforementioned traditional assumptions with the noise uncertainty varying in the range [(1/ρ)σ 2 v , ρσ 2 v ], for ρ > 1, following a uniform distribution in decibels (dB). In [18] the SNRw for GED in SD and HD is derived for particular expressions for the fusion rules AND, OR, and MAJ, and for specific values of M , subsequently being generalized for any M and k in the k-out-of-M fusion rule. This paper considers the conventional ED, and derives the SNRw in nCSS and CSS with SD for any M and with HD via the more general expressions for the probabilities of false alarm and detection at the FC for any k and M in the k-out-of-M fusion rule.
Additionally, it also proposes two algorthms for empirically finding the SNRw of ED or other detectors in nCSS and CSS.
In summary, the main contributions of this article are 1) the adoption of a novel approach on the NU source at receivers; 2) the use of the NU range proposed in [14]; 3) the assumption of a truncated Gaussian distribution for mimicking the estimated noise power at receivers; 4) the derivation of novel expressions for the SNRw of ED in nCSS and CSS in SD and HD k-out-of-M rule according to the novel NU model; 5) the proposal of two algorithms for empirically finding the SNRw of ED or other detectors in nCSS and CSS. Subsequent sections organize the remaining parts of the article as follows. The system model, the NU model, and the performance metrics of ED in nCSS and CSS are presented in Section II. Section III is devoted to the SNRw of ED in nCSS and CSS with SD and HD fusion. Section IV presents the proposed empirical SNRw algorithms. Section V provides discussions on numerical results and, finally, Section VI concludes the article.

II. MODELS AND PERFORMANCE METRICS A. SIGNAL MODEL
Assuming a primary network with a single PU transmitter and a secondary network with M SUs, in a given sensing round, the nth sample, n = 1, 2, . . . , N , received by the ith SU, i = 1, 2, . . . , M , is given by where s(n) and v i (n) are zero-mean, Gaussian-distributed complex-valued random variables with variances σ 2 s and , representing the PU signal and the AWGN, respectively, at the input of the SUs.
The performance of the spectrum sensing is commonly measured by means of the probability of false alarm, P fa , and the probability of detection, P d . The former is the probability of declaring the presence of the PU signal when it is absent, and the latter is the probability of declaring the presence of the PU signal when it is indeed present in the sensed band.

B. LOCAL PERFORMANCE METRICS
In the case of local decisions made in the SUs, the ED test statistic computed in the ith SU can be written as [18], [23] where N is the number of received signal samples and | · | represents the absolute value of the argument. For sufficiently large N , T i follows a Gaussian distribution with mean and variance respectively given by under H 0 , and by under H 1 . Then, and where The Gaussian approximation used in the derivation of the performance metrics is adequate to the present context, since the SNRw is defined in the asymptotic regime of N → ∞.

C. GLOBAL PERFORMANCE METRICS
When SD fusion is adopted in CSS, each SU sends the collected samples or, equivalently, the test statistic defined in (2) to the FC. In this case, the global test statistic for the ED is computed according to Since T i defined in (2) approaches a Gaussian distribution for sufficiently large N , it follows that T defined in (7) also approaches a Gaussian distribution, but now with mean and variance respectively given by under H 0 , and by under H 1 . Then, the global probabilities of false alarm and detection, respectively denoted by Q fa and Q d , are and is a global decision threshold predefined at the FC, and λ > 0 is a constant specified according to the target global performance metrics.

D. NOISE UNCERTAINTY MODEL
Recalling that the ith local decision threshold is is clear the need of knowing the noise variance information to establish the desired performance metrics. However, in practice, this variance is known within some degree of uncertainty due to uncalibrated receiver front-ends, estimation errors, and noise-like unwanted in-band received signals.
The majority of works on SNR wall consider the noise uncertainty model approach in which the noise variance σ 2 v i is known a priori in the system design phase, and that the decision threshold is set according to it. Due to interference or thermal noise fluctuation, the actual noise variance corrupting the received signal changes to an unknown valueσ 2 v i , meaning that the use of a non-updated threshold will potentially lead to a performance degradation. A widely accepted NU model based on this approach assumes that the noise varianceσ 2 where ρ i ≥ 1 defines the noise uncertainty at the ith SU, which means that this model represents a biased noise uncertainty.
Herein we consider a more realistic NU model approach in which the possibly variable thermal noise plus interference variance σ 2 v i is unknown. Hence, the decision threshold is set based on an estimateσ 2 v i of this variance, potentially yielding a performance degradation. In this NU model where 0 ≤ ρ i < 1 is the new NU factor. To model the random fluctuations of the estimator, we consider that , which means thatσ 2 v i has a truncated Gaussian probability density function (PDF). Notice that this model yields where φ(µ i , σ 2 i ; x i ) is the Gaussian function in the variable are the values of the corresponding Gaussian cumulative distribution function (CDF) at x i = a i and It is worth highlighting that the NU limits given in (13) can be converted into those given in (12). One just have Thus, the worst-case limits of the NU model proposed herein can be specialized to those given in (13).

III. SNR WALLS OF ED IN NON-COOPERATIVE AND COOPERATIVE SPECTRUM SENSING
The SNRw is the upper limit below or equal to which it is impossible to make the probability of false alarm and the probability of detection to reach the ideal values of 0 and 1, respectively [18]. In a relaxed definition, the SNRw is the upper limit below or equal to which it is impossible to control these probabilities to attain any desired values within their useful limits [16], which are respectively [0, 0.5) and (0.5, 1]. Such control is performed through the number of samples, N , meaning that, if SNR ≤ SNRw, the increase in N will not improve performance. In the limit of N → ∞, the variances of the ED test statistic under H 0 and H 1 tend to zero, as can be concluded from (3), (4), (8) and (9), making it possible to distinguish between noise only (H 0 ) and signal plus noise (H 1 ), no matter the SNR. However, this can be accomplished only if the noise variance is perfectly known, i.e., if there is no noise uncertainty (ρ i = 0 for all i). In other terms, in the absence of noise uncertainty, the spectrum sensing can reach the ideal performance metrics when N → ∞, that is, and lim N →∞ When NU exists, it is impossible to satisfy both equalities in (15) or (16) under SNR levels equal to or below SNRw, since at least one of the targets in these expressions will fail [18].
To derive the SNRw of ED in nCSS, and in CSS with SD fusion and with HD fusion under the k-out-of-M rule, which is made in the next three subsections, it is worth keeping in mind the targets written in (15) and (16), and that [18]

A. SNRw OF ED IN nCSS
When NU exists, the estimated noise powerσ 2 v i must be used instead of σ 2 v i . Then, the local decision threshold at the ith SU becomesτ i = λσ 2 v i . Thus, the local performance metrics conditioned on a given value ofσ 2 v i become and For randomσ 2 v i modeled according to (14), the local performance metrics averaged over the possible values ofσ 2 where have been applied the definitionτ i = λσ 2 v i and the notational simplificationσ 2 v i = x i . Applying (17) in (20), it follows that the inequality where Likewise, applying (17) in (21), the inequality where Hence, to satisfyP fa i = 0 andP d i = 1, it follows that and must be met, respectively, where γ i = σ 2 s /σ 2 v i is the SNR at the ith SU, meaning that which leads to Therefore, the SNRw at the ith SU is finally given by Remarkably, by following the steps up to this point, it can be easily verified that γ w i = 2ρ i would result if the noise uncertainty were applied to the noise added to the received PU signal instead of applying it to an estimate of the noise variance. This means that the use of the estimated noise variance approach adopted in this paper is more conservative than the use of the conventional unknown noise corrupting the received signal, since 2ρ

VOLUME 10, 2022
This conservative SNRw also holds for the remainder of the situations analyzed herein. The number N i of samples required to achieve target local performance metrics under noise uncertainty can be determined from (18) and (19). This is accomplished by considering worst-case uncertainties that are respectivelŷ Plugging these uncertainties into (18) and (19), it can be shown that From this equation, it can be noticed that N i → ∞ when γ i → 2ρ i (1 − ρ i ) −1 , a result that is consistent with the SNRw given in (28). Thus, (29).

B. SNRw OF ED IN CSS WITH HD FUSION
Taking into account the average local performance metrics given in (20) and (21), the corresponding global metrics for the ED in CSS with HD fusion under the k-out-of-M rule can be written based on [29], yieldinḡ where d = (d 1 , . . . , d M ) is the binary M -tuple whose entries are the decisions made by the SUs (d i = 1 or d i = 0 denoting the decision made by the ith SU in favor of H 1 or H 0 , respectively) and w H (·) denotes the Hamming weight. After a combinatorial analysis applied to (30) and (31) Hence, to satisfyQ fa = 0 in (30), notice with the help of (24) that the inequality , and, . . . , and  (32), that is, Similarly, to satisfyQ d = 1 in (31), notice with the help of (25) that the inequality , and, . . . , and , and, . . . , and must hold. Since at least one group having the k conditions in at least one of the M k lines of (34) must be satisfied to satisfȳ Q d = 1 in (31), expression (34) can be written as Assuming descending ordered NU factors (the equality of NU factors will be considered later), i.e., ρ j > ρ j+1 for j = 1, 2, . . . , M − 1, and taking into account (33) and (35), it follows that Noticing that the minimum in each line of (36) depends on the value of γ i if k = 1, generally one should consider that In summary, when the k-out-of-M rule is applied, the FC achieves the target global performances defined in (16) if and only if at least one group having M − k + 1 conditions in at least one of the M M −k+1 lines of (32) are satisfied, and at least one group having k conditions in at least one of the M k lines of (34) are satisfied. However, from another viewpoint, notice that satisfying these two sets of conditions is equivalent to satisfying at least one group having k conditions in at least one of the M k lines of (37). Thus, the equality in each condition of (37) gives the corresponding SNRw in each SU, that is, If all SUs operate under the same SNR, that is, γ i = γ for all i, it can be concluded from (36) that the conditions become for k = 1. The conditions in (39) can be simplified to γ > (ρ 1 + ρ M )(1 − ρ 1 ) −1 to take into account only the smallest SNR. Consequently, the SNRw for k = 1 is For 1 < k < M , also from (36) can be found the conditions which can be simplified to γ > to consider the smallest SNR. Consequently, the SNRw for and for k ≥ M − k + 1 it is For k = M , it can be concluded from (36) that γ > (ρ M + ρ 1 )(1 − ρ M ) −1 , which leads to the SNRw It is worth highlighting that when the MAJ rule is applied, i.e., when k = M /2 + 1 , it follows that M − k + 1 = k − 1 = M /2 if M is even, and M − k + 1 = M /2 + 1 if M is odd. Therefore, the conditions in (41) can be simplified to and for M odd it is Notice also that if all SUs operate under the same NU factor, i.e., if ρ i = ρ for all i, all the SNRw values become Notice that (47) yields the SNRw for one SU in nCSS, as given in (28), and one can also find it here by using M = 1 in the k-out-of-M rule.

C. SNRw OF ED IN CSS WITH SD FUSION
Taking into account the noise uncertainty, the global decision threshold at the FC becomesτ = λ M M i=1σ 2 v i . Thus, the global probabilities of false alarm and detection at the FC, for a given fixed NU level at the SUs, are, respectively, and For random NU, (48) and (49) must be averaged over the PDFs given in (14). Hence, taking into account (16) and Using (17) in (50), it follows that the inequality where x i = b i = (1+ρ i )σ 2 v i to guaranteeQ d = 1 in the whole NU range. Hence, to satisfyQ fa = 0 andQ d = 1, it follows that VOLUME 10, 2022 which leads to If σ 2 v i = σ 2 v for all i, which means γ i = γ , then the condition in (55) can be simplified to In this case, the SNRw in each SU for the SD fusion is If ρ i = ρ for all i, the SNRw in each SU becomes which is consistent with (28).
To derive the sample size for ED in CSS, one must consider the worst-case of (48) and (49), i.e., the maximum ofQ fa and the minimum ofQ d . To achieve these bounds onQ fa andQ d , one must useσ 2 (48) and (49), respectively. Using (48), it follows that The constant λ is derived from (59) as Similarly, using (49) one obtains Substituting (60) in (61), the sample size needed to achieve a given target performances is It can be seen that N → ∞ as the first term between parenthesis in the denominator of (62) approaches the second term. Thus, the condition to robustly distinguish between H 0 and H 1 is that which is the same condition expressed in (55). If, for all i, σ 2 v i = σ 2 v , which means γ i = γ , and ρ i = ρ, then (62) becomes Comparing this result with (29), it can be concluded that CSS with SD fusion does not lower the SNRw of ED in comparison with nCSS, when ρ i = ρ for all i, but reduces the sample size N in M times for achieving a given target performance [20].

IV. EMPIRICAL SNR WALL
In this paper, specifically in Section V, all theoretical results are verified by computer simulation or empirical results. In the case of the SNRw, a computational difficulty arises to simulate the spectrum sensing to verify (29), (62) or (64), due to the need of setting very large values of N , at least to reach results close to those obtained when N → ∞. As an alternative, an empirical SNRw computation method is proposed here.
A method for a coarse computation of an empirical SNR wall has been addressed in [30] to show the existence of such wall for the maximum-minimum eigenvalue (MME) detector. The method works by reducing the SNR up to the value in which the median of the test statistic under H 1 crosses the median under H 0 , for a large number of samples. The reasoning behind the method is grounded on a theorem from [16], stating that the existence of an SNR wall below which every detector is not capable of meeting useful performance metrics requires the test statistics to have overlapping medians under the two hypotheses. In the case of the ED, the medians are equal to the corresponding means, due to the Gaussian approximation of their distributions for sufficiently large N .
To exemplify the validity of the theorem, assume, without loss of generality, thatσ 2 v i is moved from the threshold to the denominator in the right-hand side of (2), modifying the mean µ 0 in (3) toμ 0 = σ 2 v i /σ 2 v i , and the mean µ 1 in (4) toμ 1 = (σ 2 v i + σ 2 s )/σ 2 v i . Indeed, equating these means in the worst-case NU conditions, i.e.,σ 2 v i into the denominator in the right-hand side of (7), µ 0 in (8) Equating these means, assuming σ 2 v i = σ 2 v and γ i = γ , under the worst-case NU conditionsσ 2 v i , respectively, the same result given in (57) is obtained.
In the empirical SNRw computation method proposed herein, a successive-approximation algorithm is applied to vary the SNR from an initial condition towards the value in which the medians of the test statistic under H 0 and H 1 become equal to each other. This value is the empirical SNRw. The equality is verified on a statistical basis, by checking the p-value obtained from a binary hypothesis test. A test that fits to the present problem is the two-sided Wilcoxon rank sum test [31], which tests the null hypothesis that realizations of the spectrum sensing test statistic under H 0 and H 1 are samples from continuous distributions with equal medians, against the alternative hypothesis that they are not. The equality of the medians is indicated by a binary flag that is toggled when the p-value of the rank sum test becomes larger than the predefined significance level of the test, indicating that there is not enough statistical evidence to reject the null hypothesis of equal medians.
Algorithm 1 synthesizes how this method empirically finds the SNRw in nCSS. Variables µ e 0 i and µ e 1 i denote the empirical medians of the test statistic generated in the 'while' loop under H 0 and H 1 , and γ e w i denotes the empirical SNRw that must be found.
The empirical medians are initialized with arbitrarily different values just enough to force the algorithm enter the 'while' loop, for instance µ e 0 i = 0 and µ e 1 i = 1. The empirical SNRw is also initialized with a value equal to any starting SNR of the received signal, for instance γ e w i = γ i = σ 2 s /σ 2 v i = 1. The constant γ step is the step size that decreases or increases γ e w i in each 'while' loop, according to the principle of the successive approximation algorithm. It is arbitrarily initialized with any practically meaningful value, for instance 10 dB. The flag of the rank sum test, which is used as the iteration stop criterion, is initially set to h = 1.
Each iteration of the 'while' loop computes new empirical medians from U worst-case realizations of the test statistic with N samples under both hypotheses, a new empirical SNRw, γ e w i , and a new noise power, σ 2 v i . The step size γ step is halved in each 'while' loop. The successive approximation runs until µ e 1 i becomes statistically equal to µ e 0 i , which is flagged by h = 0. At this point, the successive-approximation iterations of the algorithms are halted, and γ e w i is output as the estimated empirical SNRw for the ith SU.
Algorithm 2 is similar to Algorithm 1 and synthesizes how the proposed empirical method finds the SNRw of ED or other detectors in CSS. The main difference is that in Algorithm 2 the empirical medians under H 0 and H 1 refer to the test statistic computed at the FC. In the case of ED, this test statistic comes from (7), with the worst-case noise variances embedded in it, instead of placed in the decision for n ← 1, 2, . . . , N do 9: end for 11: end for 26: threshold. Consequently, notice that Algorithm 2 drops the index 'i' of some variables. Notice also that the algorithm returns a single variable γ e w representing the empirical SNRw at each SU when σ 2 v i = σ 2 v for all i. Finally, it must be emphasized that the proposed algorithms can be applied to any other detector, the single modification being the replacement of the ED test statistic by the other test statistic of interest.

V. NUMERICAL RESULTS
This section presents theoretical, empirical and Monte Carlo simulations results for the ED. The empirical and simulation results were obtained via the Matlab software, version R2018a. The theoretical results were computed using the Wolfram Mathematica software, version 12, which has been found to be more adequate than the Matlab to handdle the expressions derived herein. The results are the SNRw and the probabilities of false alarm and detection in nCSS and CSS Algorithm 2 Empirical SNRw of ED in CSS 1: µ e 0 ← 0 and µ e 1 ← 1, γ e w ← 0, γ step dB = 10, h ← 1 2: while h = 1 do 3: if µ e 0 < µ e 1 then 4: γ e w dB ← γ e w dB − γ step dB , γ e w ← 10 γ e w dB /10 , σ 2 v ← σ 2 s /γ e w 5: for u ← 1, 2, . . . , U do 6: for n ← 1, 2, . . . , N do 7: , for all i 9: end for 10: T i|H 0 (u) ← 1 N N n=1 |y i|H 0 (n)| 2 for all i 11: T i|H 1 (u) ← 1 N N n=1 |y i|H 1 (n)| 2 for all i 12: end for 13: end for 28:

30:
if µ e 0 < µ e 1 then 31: γ step dB ← γ step dB /2 32: end if 33: end if 34: h ← binary flag of the rank sum test on T |H 0 and T |H 1 at the significance level α 35: end while 36: return γ e w with SD fusion, and with HD fusion for the k-out-of-M fusion rule, with k = 1, k = M and k = M /2 + 1 .
It was considered a primary network with a single PU transmitter with signal power σ 2 s = 1 and a secondary network of M = 5 SUs in CSS. In the Monte Carlo simulations, the PU transmitter activity followed a Bernoulli distribution with 50% of the spectrum sensing events in the non-active state, for counting false alarms, and 50% in the active state, for counting detections, from a total of 50,000 Monte Carlo events. The number of samples collected by each SU was N = 2000 in each spectrum sensing event. The probabilities of false alarm and detection are showed in terms receiver operating characteristic (ROC) curves, where theses probabilities are traded as the decision threshold is varied. Fig. 1 shows theoretical and simulated ROC curves for nCSS (M = 1), considering the NU factors ρ = 0, 0.06, 0.09, 0.12, 0.15, 0.18, and an average SNR γ = −12 dB. The gaps between the ROCs for ρ = 0 and those for Notice that simulated and theoretical results are in complete agreement, which validates (5) and (6) for ρ = 0 and (20) and (21) for ρ > 0.  (20), (21), (30), and (31) for CSS with HD, and (50) and (51) for CSS with SD, in Graphic (b), under NU, respectively. It can be noticed from Fig. 2(b) that the SD fusion outperforms all HD fusion rules, as expected. Moreover, among the HD fusion rules the MAJ outperforms the OR and the AND rules. Fig. 3 shows theoretical and empirical results for the SNRw of ED in nCSS and CSS. Theoretical curves are from (62) for nCSS and for CSS with M = 5, showing the necessary sample size, N , required to achieve the target probabilities of false alarm and detection of 0.1 and 0.9, respectively. The theoretical results include curves considering NU and NU-free scenarios, i.e., with ρ i > 0 for all i and with ρ i = 0 for all i, respectively. The curves regarding the NU-free scenario confirm that CSS reduces the sample size per SU to achieve the target performance metrics at the FC compared to the sample size required by a single SU in the nCSS. Comparing (64) with (29), notice that CSS requires a sample size per SU M times smaller than nCSS requires for a single SU.
The curves in Fig. 3 that consider the presence of NU show that the SNRw in each SU for unequal σ 2 v i in nCSS, as well as the identical SNRw for all SUs   in nCSS, and 10 log 10 The dots at the bottom of the dashed vertical lines in Fig. 3 are the empirical SNRw obtained from Algorithm 1 in each SU in nCSS, γ e w i , and from Algorithm 2 in CSS, γ e w , using U = 15,000 realizations of the ED test statistic, with N = 15,000 samples under H 0 and H 1 . Theoretical and empirical results show complete agreement, which validates (57) and (62) for σ 2 v i = σ 2 v for all i. The Matlab function ranksum [32] was used to perform the Wilcoxon rank sum test, at the significance level of α = 0.001. This function, besides the p-value associated with the hypothesis test, returns the logical value h = 1 indicating the rejection of the null hypothesis of equal medians, or h = 0 indicating a failure to reject the null hypothesis.
The SNRw of ED with HD fusion under the k-outof-M rule is now analyzed numerically for k = 1, k = M /2 + 1 , and k = M , for M = 5. Expression (38) gives the SNRw in each SU considering the NU factors ρ 1 , ρ 2 , . . . , ρ 5 = 0.02, 0.015, 0.012, 0.01, 0.0075, whose results are given in Table 1. As expected, when SUs have different NU factors, the OR rule results in the largest SNRw in each SU compared to the MAJ and the AND rules, since it always adds ρ 1 , which is the maximum NU factor, in the numerator of (38). On the other hand, the AND rule results in the smallest SNRw in each SU since it always adds ρ M , which is the minimum NU factor, in the numerator of (38). Therefore, one can notice that the SNRw for any 1 < k < M in the k-out-of-M fusion rule is always in-between the maximum and minimum SNRw in each SU, as can be seen in Table 1 for k = M /2 + 1 . However, the AND rule must satisfy all conditions in (37), whereas the OR rule can satisfy only one to achieveQ fa = 0 andQ d = 1 under NU. VOLUME 10, 2022

VI. CONCLUSION
This paper presented an analysis of the signal-to-noise ratio wall of non-cooperative spectrum sensing and cooperative spectrum sensing based on energy detection. The analysis considered a novel realistic noise uncertainty model in which it is assumed that an estimated noise variance is used to determine the decision threshold, instead of assuming that the unknown noise variance is the one that corrupts the received signal. The noise uncertainty is unbiased and follows a truncated-Gaussian random distribution, which is more consistent with actual scenarios. Moreover, the signal-to-noise ratio wall resultant from the application of this model is more conservative than the one based on the unknown noise variance added to the signal. Expressions were derived for the performance and the signal-to-noise ratio wall of non-cooperative and cooperative energy detection in hard-decision fusion and soft-decision fusion, under the proposed noise uncertainty model. Empirical signal-to-noise ratio wall algorithms were also proposed. The algorithms are grounded on finding the equality of the medians of the test statistic under the hypotheses of absence and presence of the primary signal, thus being applicable to any detector. All theoretical findings were verified through computer simulations or empirical results, showing almost perfect agreement in all situations analyzed.