{'fraction_non_alphanumeric': 0.036679668788065424, 'fraction_numerical': 0.014884007390679532, 'mean_word_length': 4.77837089758798, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
On Optimal Cooperative Sensing with Energy Detection in Cognitive Radio

In this paper, we propose an optimal cooperative sensing technique for cognitive radio to maximize sensing performance based on energy detection. In most spectrum sensing research, many cooperation methods have been proposed to overcome the sensitivity of energy detection so that both primary and secondary users are better off in terms of spectral efficiency. However, without assigning a proper sensing threshold to each sensing node, cooperation may not be effective unless the received average primary user signal-to-noise ratio (SNR) is identical. We show that equal threshold energy detection severely degrades sensing performance when cooperative sensing nodes experience diverse average SNRs, and it is not unusual for even single-node sensing to be better than cooperative sensing. To this end, based on the Neyman–Pearson criterion we formulate an optimization problem to maximize sensing performance by using optimized thresholds. Since this is a non-convex optimization problem, we provide a condition that convexifies the problem and thus serves as a sufficient optimality condition. We find that, perhaps surprisingly, in all practical cases one may consider this condition satisfied, and thus optimal sensing performance can be obtained. Through extensive simulations, we demonstrate that the proposed technique achieves a globally optimal solution, i.e., it maximizes the probability of detection under practical operating parameters such as the target probability of false alarm, different SNRs, and the number of cooperative sensing nodes.


Introduction
We are entering the era of a fourth industrial revolution where both hyper-connectivity and digital automation enable a large number of different types of economic entities to share information quickly for optimal decision-making based on industrial IoT sensor networks. This wave has driven 5G New Radio (NR) development to provide greater capacity and higher reliability for tactile internet, artificial intelligence (AI), and smart factory applications, etc. Since intelligent and efficient ways of utilizing scarce spectrum are required to meet the huge demand for increasing capacity, new, emerging technologies for dynamic spectrum management have been developed to improve spectral efficiency.
Cognitive radio (CR) is a promising form of technology for combating spectrum scarcity in next-generation wireless networks. A group of secondary users (SUs) can exploit the unused spectrum bands of a primary user (PU) in an opportunistic manner as long as no harmful interference is guaranteed [1]. Recent worldwide migration from analog to digital television broadcasting has expedited sharing of underutilized spectrum bands called TV white space (TVWS) [2]. For example, standards such as IEEE 802. 22 and IEEE 802.11af opportunistically utilize TVWS, and regulatory bodies such as the FCC and OFCOM have updated rules for TVWS and other unlicensed bands [3]. TVWS-based CR was also introduced to enable smart grid communications in rural areas because of the good propagation properties of TVWS [4]. LTE-CR was proposed as a cellular application to extend the LTE time-division duplex (TDD) to support TVWS [5]. In addition to TVWS, 3GPP has developed LTE in an unlicensed spectrum so that LTE can harmoniously coexist with other wireless systems in a 5-GHz spectrum [6].
To support CR, one of the key roles of SUs is to sense the PU with high detection probability and evacuate the PU's band immediately. There are several detection techniques, such as energy detection, matched filter detection, cyclostationary detection, and compressive sensing, [7]. Among these techniques, energy detection of [8] has been widely adopted in practice because it has low complexity and does not require prior knowledge of the PU [9]. However, since sensing performance of energy detection can deteriorate when the signal-to-noise ratio (SNR) is low [10], many cooperative sensing techniques have been proposed to overcome performance degradation [11][12][13][14][15][16][17][18][19][20][21][22][23][24].
Specifically, to maximize sensing performance, a series of cooperation algorithms have been investigated in terms of sensing duration, the number of cooperative sensing nodes, and thresholds of energy detection [11][12][13][14][15][16][17][18]. In [11], sensing-throughput tradeoff depending on sensing duration was investigated. The author of [12] jointly optimized sensing time and reporting time to maximize throughput based on maximal ratio combination (MRC)-based soft decision. The fundamental performance limits of the cooperative sensing using energy detection were analyzed by considering the unlimited number of sensing nodes, and it has been shown that the OR rule achieves zero false alarm probability for any given target detection probability irrespective of the received PU SNR [13]. In [14], the authors proposed optimal counting rules of hard decision under the Neyman-Pearson criterion and Bayesian criterion, respectively. In [15], both sensing duration and fusion rule were jointly optimized to maximize the throughput of SUs under the constraint of the probability of detection. In [16,17], an optimal k was investigated for the so called k-out-of-N rule, and then the same threshold for all sensing nodes is optimized by a given k. The authors of [18] proposed an on/off reporting mechanism to achieve robust cooperative sensing over an imperfect reporting channel as well as graceful degradation against sensor failures.
However, the existing work [11][12][13][14][15][16][17][18] assumed that the average SNR is identical for all cooperative sensing nodes, and so is the sensing threshold. This assumption may not be realistic in practical systems. In addition to multipath fading and shadowing effects, there are several practical factors for heterogeneous cooperative sensing, such as geographically different positions (indoor or outdoor), inherent RF front-end sensitivity, obstacles, temperature variations, and so on. Thus, cooperative sensing performance highly depends on the heterogeneity of the received PU SNRs at individual SUs. Although previous work, such as [19], considered heterogeneous average SNRs for cooperative sensing nodes, all sensing nodes still used the same sensing threshold.
In addition, the authors in [20][21][22][23][24] considered optimizing thresholds of cooperative sensing nodes based on different average SNRs. In [20], an iterative threshold selection algorithm was proposed to determine whether a specific sensing node can participate in cooperation or not, based on its contribution to detection performance. The work of [21] proposed a weighted decision rule by jointly optimizing the test threshold of likelihood-ratio and the local threshold of SUs. Although heuristic methods of optimizing two thresholds at a time did not guarantee the achievement of global optimal solutions, the proposed algorithm provided the highest throughput results over the non-jointly optimized schemes [21]. In [22,23], a heuristic algorithm was proposed to achieve suboptimal thresholds at cooperative sensing nodes by minimizing false alarm probability subject to target missed detection probability. Different fusion rules with iterative algorithms were proposed to decrease the total error detection probability for both single channel and multichannel cooperative sensing [24].
However, even though the existing literature [20][21][22][23][24] has investigated distinct thresholds for cooperative sensing nodes according to their own average SNRs, they are suboptimal and theoretically achieving the optimal detection performance still remains unsolved. Moreover, previous heuristic approaches would suffer from high computational complexity as the number of cooperative sensing nodes increases [20][21][22][23][24]. In this regard, we are motivated to theoretically develop a globally optimal solution for energy detection under a heterogeneous PU SNR environment.
We summarize our key contributions as follows. Based on the Neyman-Pearson criterion we formulate an optimization problem to maximize the sensing performance when a hard decision is used under different average SNRs. It is found that this is a non-convex optimization problem, and thus we provide a condition that convexifies the original problem. We then verify that all practically meaningful parameters satisfy the convexifying condition. Thus, our solution guarantees the maximized detection performance of cooperative sensing. Considering that using a single common threshold severely degrades the sensing performance when cooperative sensing nodes experience different average SNRs, our solution is promising. Our extensive simulations show that a globally optimized solution achieves an improvement of several orders of magnitude improvement under practical operating parameters such as the target probability of false alarm, different average SNRs, and the number of cooperative sensing nodes.
The rest of this paper is organized as follows. In Section 2, the CR system model and problem formulation are introduced. Cooperative sensing with optimal thresholds is presented with a sufficient optimality condition in Section 3. We present numerical results under practical operating parameters in Section 4. Finally, we draw our conclusions in Section 5.

System Model
In this section, we provide a scenario of cooperative sensing operation in the CR system. Using energy detection and its sensing performance metrics, we formulate an optimization problem. Figure 1 illustrates a scenario for CR system with cooperative sensing in wireless networks. A SU can temporally and spatially utilize the licensed or unlicensed spectrum band of the PU. To avoid possible interference to the PU, the CR system requires SUs to simultaneously perform in-band sensing, which means SUs periodically sense the operating spectrum band to verify whether the PU appears or not. In addition to in-band sensing, out-of-band sensing implies that SUs sense the non-operating bands and maintain a list of available bands. Even though our work is applicable to both in-band and out-of-band sensing purposes, hereafter we consider in-band sensing. When SUs finish sensing, they send their own sensing results to a fusion center so that it combines all local results and makes a final decision about the presence of PUs. We assume that SUs honestly report their local decisions to the fusion center via common control channels [11][12][13][14][15][16][17], e.g., an individual reporting channel is reliable and error-free for simplicity [19][20][21][22][23][24].

Energy Detection and Sensing Performance Metrics
Let τ be a continuous value denoting sensing duration. Under the absence of PU (hypothesis H 0 ), the received signal at a sensing node is given by where n(t) is the noise power at time t. Under the presence of PU (hypothesis H 1 ), we have where s(t) is the received PU signal and h(t) is the channel gain at time t. We assume that n(t) is white Gaussian noise with two-sided power spectral density N 0 (AS I), and sensing duration τ is short so that the channel can be assumed to be static (AS II). According to [8], the test statistic using energy detection is given by Let γ be the received SNR given by γ = P N 0 B , where P denotes the received power of PU at a sensing node, and B is the channel bandwidth. Under the assumptions of AS I and AS II, the received energy of PU signal is simply Pτ. When PU is absent, T has the central chi-square distribution with the degrees of freedom equal to 2τB. When PU is present, T has the non-central chi-square distribution with 2τB degrees of freedom and non-centrality parameter δ = Pτ N 0 equal to γτB. Based on the central limit theorem (CLT), when 2τB is more than 250, T under two conditions can be considered as Gaussian random variables [8].
where N m, σ 2 represents the normal distribution with the mean m and the variance σ 2 . From now on, we assume that 2τB is large enough so that the CLT condition is met, and thus T is a Gaussian random variable. Suppose that we have N cooperative sensing nodes using energy detection. Let i be the detection threshold and P d i be the probability of detection, i.e., P d i = P (Y ≥ i |H 1 ) at a sensing node i ∈ {1, · · · , N} [11,13]. Then, we have where Let P f i denote the probability of false alarm, i.e., P [11,13], and we have We notice that there is no PU signal present under H 0 , and then P f i is independent of γ i . However, when h(t) is varying due to shadowing/fading, P d i gives the detection probability conditioned on the instantaneous SNR γ i . In this case, the average detection probability can be derived by averaging (2) over fading statistics.P where f γ (γ i ) is the probability distribution function (PDF) of SNR under fading/shadowing and its mean value isγ i [25]. In addition to the aforementioned probabilities, the probability of miss detection is P m i = 1 − P d i , and the probability of correct rejection is P c i = 1 − P f i at a sensing node i ∈ {1, · · · , N}. During cooperative sensing, a PU is assumed to be either present or absent. Although multiple PUs can arrive or depart randomly, this assumption is still reasonable based on the long time average scenario of observed PU behavior. One may refer to [26,27] to optimize both the sensing time and sensing period (duty cycle) so that instantaneous sensing performance improves under random arrivals of multiple PUs in cooperative sensing.

Problem Formulation of Cooperative Sensing
We investigate optimal sensing thresholds for sensing nodes using hard decision. Even though use of the soft decision achieves better performance than the hard decision, the burden of reporting overhead hinders the use of soft decision [28]. One may want to directly consider the k-out-of-N rule, but finding an globally optimal solution for the k-out-of-N rule is not very tractable unless the same average SNR value is assumed for cooperative sensing scenarios [16]. Moreover, [21][22][23] pointed out the very high computational complexity and impracticality of finding suboptimal k. Thus, we first focus on AND and OR rules in this paper. The fusion center using the AND rule decides that PU is present when all cooperative sensing nodes report PU presence to the fusion center [9]. Then, the final detection and the final false alarm probabilities at the fusion center are simply given by Based on the Neyman-Pearson criterion, our aim is to maximize the final detection probability P d subject to the target final false alarm probability P f , which is formulated as follows: The fusion center using the OR rule decides that the PU is present when any cooperative sensing nodes report PU presence to the fusion center [9]. Then, the final detection and the final false alarm probabilities at the fusion center are simply Then, we can also use the OR rule to maximize the final detection probability P d subject to the target final false alarm probability P f as follows: Considering the symmetric mathematical structure of P m i and P c i , an alternative optimization problem is formulated as follows: where P c is according given by 1 − P f . If the globally optimal solution can be derived from the AND rule of (6), our optimization approach is also applicable to the OR rule because of its symmetric mathematical structure. AND and OR rules are two opposite extremes. For comparison, the existing literature [7,11,13,28] have shown that dominant performance regions of both rules highly depend on system parameters such as τ,γ, B, and P f for different purposes. Herein we mainly focus on the existence of globally optimized sensing thresholds. Therefore, in the rest of paper, our problem formulation of cooperative sensing mainly exploits the mathematical structure of the AND rule so that we can provide a globally optimal solution to maximize the detection performance of cooperative sensing under different average SNRs.

Limitation of Equal Threshold-A Motivating Example with Two Sensing Nodes
To better understand the effect of sensing thresholds, in this section we first verify the detection performance with both equal and optimal thresholds when only two cooperative sensing nodes experience different average SNRs. Example 1. Since the same average SNR for all sensing nodes in [11,[13][14][15][16][17] may not be realistic in practice because of spatial diversity, herein we use different average SNRs in cooperative sensing [19][20][21][22][23][24]. As a motivating example, Figure 2 shows the receiver operating characteristic (ROC) curves under four different scenarios: the sensing performance of a single node sensing with the worst and the best average SNRs (CASE I and CASE II) as well as that of both equal and optimal thresholds under different average SNRs (CASE III and CASE IV). To obtain the equal threshold for two cooperative sensing nodes [19], the P f i at individual sensing node is simply given by P f from (6), and then is accordingly given by √ 4τBQ −1 P f + 2τB from (4). Interestingly, compared to a single node sensing with a higher SNR (−12 dB), the sensing performance of cooperative sensing with equal threshold is even worse, and thus cooperation is not beneficial at all. To overcome the degradation of the detection performance, we assign the optimal threshold to each sensing node based on an exhaustive search for illustrative purposes. By doing so, optimal thresholds can improve the sensing performance. Since an exhaustive search is not suitable for a large number of sensing nodes, in Section 3.2, we further develop a convex optimization algorithm to achieve optimal thresholds. When many sensing nodes cooperate, we are also interested in knowing how much cooperative gain is expected by using globally optimized sensing thresholds.   Figure 3, we verify how the difference of average SNRs affects the detection performance of cooperative sensing. In this example with two sensing nodes, we vary the average SNR of one sensing node and fix that of the other sensing node. For the equal threshold case, we notice that the effective range of the average SNR is very limited. However, using optimal thresholds alway outperforms other cases regardless of the average SNR difference. To this end, along with the previous work [19][20][21][22][23][24], we are motivated to find out the globally optimal solution rather than suboptimal solutions. We will see that cooperative sensing dramatically (by several orders of magnitudes) improves sensing performance under practical operating parameters such as the target probability of false alarm, different average SNRs, and the number of cooperative sensing nodes.  . The detection performance for a single and two cooperative sensing cases when the average SNR of the sensing node 1 varies from −20 dB to −10 dB and that of the sensing node 2 is fixed at −15 dB. We notice that the effective range of the average SNR is very limited for the equal threshold case.

Cooperative Sensing with Optimal Thresholds
In solving (6), the individual sensing threshold for sensing node i is by (4). Then, we can use P f i as optimization variables instead of i , and rewrite the optimization problem (6) by using (2) for analytical tractability: With one further step, we define the normalized threshold from H 0 of (1). Then, it can be easily drawn from (4) such that x i = Q −1 P f i . After taking the logarithm of (7), the problem is equivalent to the following optimization problem: where y i is introduced as an auxiliary variable. The convex problem has three requirements: the objective function must be concave for the maximization problem; the equality constraint functions must be affine; and the inequality constraint convex functions must be non-positive [29]. Note that although the objective function of (8) is concave, (8) still remains a non-convex optimization problem. This is because when we make the inequality constraint functions convex, it becomes non-negative which cannot satisfy a standard form of convex optimization. Thus, the problem cannot be posed as convex optimization [29]. Hence, we now try to find the condition that can convexify the problem as presented in the following proposition.

Proposition 1.
Suppose that observations of cooperative sensing nodes follow the normal distribution as in (1) with different SNR γ i . Then, based on the Neyman-Pearson criterion, (8) can be convexified if where a function R(t) is defined as R(t) Proof. See Appendix A.

Remark 1.
Note that Proposition 1 serves as a sufficient optimality condition. As long as the sufficient optimality condition is satisfied, the problem can be convexified so that a globally optimal solution can be obtained.
We notice that the sufficient optimality condition may not always hold for ∀x i ∈ R. However, by considering all the practically meaningful scenarios, we rigorously verify that as long as P f i is on [ε, 1 − ε] where ε is infinitesimally small and sensing observations follow the normal distribution, the sufficient optimality condition holds so that a globally optimal solution is guaranteed in cooperative sensing, as described in Examples 3 and 4.

Example 3.
To investigate the practicality of Remark 1, in Figure 4 we plot both the left-hand side (LHS) and the right-hand side (RHS) of (9) with τ = 1 ms and B = 6 MHz for various PU SNR γ i . As can be seen, LHS is greater than RHS, and thus (9) holds for ∀x i ∈ [−10, 10]. Recall that x i is a normalized version of i that determines the false alarm probability, i.e., P f i = Q (x i ) and x i has a region of interest depending on P f i . Ideally, P f i should be any value on [0, 1]. We notice that when (9) holds, the corresponding P f i covers almost all values on (0, 1). In this example, P f i is in the interval [ε, 1 − ε] where ε 7.620 × 10 −24 , and thus it is obvious that a set of x i satisfying (9) is a super set of the practical region of interest. In Figure 5, we also show that (LHS-RHS) is positive in (9). Note that although the gap between LHS and RHS depends on the range of SNR, the inequality condition itself still holds as long as P f i is on [ε, 1 − ε] regardless of SNR. For example, even for the worst case of zero SNR, the condition (9) holds because LHS becomes equal to RHS.    4. One may want to verify practicality of Remark 1 with other values of τ and B. Thus we also consider the worst case condition such that 2τB is small and just satisfies the minimum CLT condition of (1), e.g., 2τB 250. We confirm that when x i ≥ −5, (9) also holds and the corresponding P f i spans in the interval (0, 1 − ε ] where ε 2.867 × 10 −7 . Thus, although the problem is a non-convex optimization, it can be convexified with Proposition 1 in practice, and a globally optimal solution can be derived as in the following subsection.

Convex Optimization
Under the region of satisfying (9), now we can obtain the globally optimal solution by applying the standard convex optimization procedure. Let v = (v 1 , · · · , v N ), and the Lagrangian function of (A1) is where λ is the Lagrange multiplier. The KKT condition for this problem consists of four parts, which are a primal feasible, dual feasible, complementary slackness, and zero gradient: Since there is one Lagrange multiplier λ and also v i can be expressed by a function of λ according to (10), one can obtain the optimal (v * , λ * ) by adjusting λ based on some iterative methods such as bisection method and Newton's method. The details of the convex optimization algorithm are shown in Algorithm 1 based on the bisection method.
Input: Given N, τ, B, P f , and γ i for all i.

5:
Given λ, solve (10) to compute v i for all i. 6: If ∑ N i=1 v i − log P f > 0, then set λ min = λ, else set λ max = λ. 7: end while Output: Calculate P f i (and also ε i ), and obtain the maximum P d in (6) and (7).

Numerical Results
In this section we present the numerical results with optimal cooperative sensing. For numerical results, the sensing duration τ is set at 1 msec and the channel bandwidth B is set at 6 MHz, both of which satisfy the test statistic of the sensing node in (1). The extensive numerical results are mainly based on the AND rule to verify the effect of optimal thresholds on both miss detection and false alarm performances so that no harmful interference as well as high spectral efficiency are guaranteed for PU and SUs, respectively. As aforementioned in Section 2.3, one may easily verify that our approach can be extended to the OR rule in a similar manner because of its symmetric mathematical structure as with the AND rule. Liu et al. [24] proposed a local optimal solution using iterative-threshold method, which is effective when SNRs are different. When average received SNRs are same for all cooperative sensing nodes, their sensing thresholds should be same [24]. However, when SNRs are same, the method in [24] cannot achieve the performance of the uniform threshold method because of its inherent limitation of iteration procedure. By contrast, our proposed algorithm can achieve a globally optimal solution whether SNRs are same or not. For the identical SNR case, we also verify that the uniform threshold method exactly matches our globally optimal solution.
In Figure 6, ROC curves are presented for both a single node sensing and cooperative sensing with seven nodes, i.e., N = 7. Each cooperative sensing node experiences its own average received SNRγ i , which is randomly selected in the interval [−10, −16] dB. We also set theγ i of a single node sensing to be either −10 or −16 dB to represent the best and the worst case scenarios, respectively. As can be seen, although cooperative sensing with equal threshold (--) is obviously better than that of a single node sensing withγ i = −16 dB (--), it is interesting to observe that cooperative sensing (--) can be worse than single node sensing withγ i = −10 dB (-•-). Namely, cooperation does not necessarily guarantee better sensing performance unless the detection thresholds are properly set. However, cooperative sensing with optimal thresholds (--) significantly improves the sensing performance. Specifically, when compared to cooperative sensing with equal thresholds, under the target P f is 0.01, and P m is reduced from 30% to 2% (and thus the corresponding P d is improved from 70% to 98%). The target probability of false alarm The probability of miss detection A single node sensing with the lowest γ i =-16dB A single node sensing with the highest γ i =-10dB Cooperative sensing with equal thresholds, N=7 Cooperative sensing with optimal thresholds, N=7 Figure 6. Receiver operating characteristic (ROC) curves for a single node sensing and cooperative sensing; different SNRs are considered in cooperation with both an equal threshold and optimal thresholds.
Next, to investigate the impact of N on optimal cooperative sensing performance, we compare the miss detection probabilities P m of the equal threshold method and the proposed optimal threshold in Figure 7. As can be seen, the more sensing nodes participate in cooperation, the lower the achieved P m is, in both cases. However, the slope of optimal threshold is much steeper than that of equal threshold. Furthermore, the miss detection probability is reduced by more than 100 times when N is 30 or more. Since the improvement is roughly proportional to N, we conclude that using optimized thresholds is essential for a large scale cooperative sensing, e.g., without optimal thresholds, many cooperative sensing nodes possibly lead to stagnant sensing performance.  In Figure 8, we investigate the impact of the mean of different average SNRs E[γ i ] on P m . When it is relatively low (below −17 dB), we do not observe a noticeable difference in P m between equal and optimal thresholds. However, as it grows, optimal thresholds can achieve much lower P m than that of equal thresholds. For example, a miss detection probability as low as 10 −5 times can be achieved when E[γ i ] is −10 dB.

Conclusions
In this paper we proposed an optimal cooperative sensing solution using energy detection when sensing nodes experience different PU SNRs. Specifically, the fusion center and its cooperative sensing nodes used the hard decision under the Neyman-Pearson criterion. Despite the non-convexity of the problem, we provided a sufficient optimality condition that interestingly holds in the practical region of interest, and thus a globally optimal solution was obtained. Furthermore, utilizing optimal thresholds provides a gain of several orders of magnitude of cooperation in terms of miss detection probability compared with the conventional equal threshold under various scenarios of the target probability of false alarm, the number of cooperative sensing nodes, and the different average SNRs. Some practical extensions of the proposed scheme may include topics such as imperfect reporting channels, reduced reporting overheads, and energy-efficient sensing techniques in more general hard and soft decisions.
With notations of x i and y i , we obtain which completes the proof.