Efﬁcient Approximations for Optimization of N-Out-of-K Rule for Heterogeneous Cognitive Radio Networks

: Spectrum sensing (SS) has attracted much attention due to its important role in the improvement of spectrum efﬁciency. However, the limited sensing time leads to an insufﬁcient sampling point due to the tradeoff between sensing time and communication time. Although the sensing performance of cooperative spectrum sensing (CSS) is greatly improved by mutual cooperation between cognitive nodes, it is at the expense of computational complexity. In this paper, efﬁcient approximations of the N-out-of-K rule-based CSS scheme under heterogeneous cognitive radio networks are provided to obtain the closed-form expression of the sensing threshold at the fusion center (FC), where the false alarm probability and its corresponding detection probability are approximated by the Poisson distribution. The computational complexity required to obtain the optimal sensing threshold at the FC has greatly decreased and theoretical derivations state that the approximation error is negligible. The simulations validate the effectiveness of the proposed scheme.


Introduction
With the deep integration of the emerging information technology and wireless communication represented by mobile internet, the internet of things, and cloud computing, radio technology is widely used under the broadband, ubiquitous, and mobile application scenarios, which leads to the explosive growth of spectrum demand, resulting in an extreme shortage of spectrum resources [1]. How to improve the spectrum utilization has become a hot issue and has attracted much attention as a consequence.
Cognitive radio (CR), despite being universal, is one of the enabling technologies for the current internet of things (IoT) [2][3][4] because it is devoted to searching idle spectrum of the registered user and providing opportunistic access at any time if the radio spectrum of the registered user is unoccupied [5,6]. As a result, CR has made great contributions to improving spectrum utilization and has developed into an emerging technology. Heterogeneous cognitive radio network (HCRN) [7] denotes a type of network that runs on different protocols to support different functions or applications, due to the differences such as network device, the system, etc. As a result, HCRN is widely discussed for CR because of its universality. The most important procedure behind CR is to periodically detect the observed spectrum and determine the spectrum usage status, named spectrum sensing (SS) [8,9]. In SS, the registered user is defined as the primary user (PU) and the user waiting for opportunistic access is denoted as the secondary user (SU) [10]. In a SS cycle, if the spectrum of PU is idle, SU will quickly access this band. Once the PU is back, SU will immediately release the corresponding spectrum resources.
Generally, the performance of SS is evaluated by two metrics, detection probability and false alarm probability [11]. A higher detection probability corresponds to a stronger capacity of protecting PU from SU while a lower false alarm probability corresponds to a higher system throughput of SU. The CR system with a lower false alarm probability tends 1.
We provide an effective approximation of the N-out-of-K rule for heterogeneous cognitive radio networks and give the closed-form solution of the detection probability and its corresponding false alarm probability. On this basis, the closed-form expression of the optimal sensing threshold for the N-out-of-K rule-based CSS scheme is obtained under the HCRN situation.

2.
Theoretical analysis is conducted on the approximation error and it is demonstrated that the approximation error is within the tolerance of the system.

3.
We conduct simulation experiments in the Rayleigh fading channel to validate our conclusions proposed in this paper. The rest of this paper is organized as follows. Section 2 reviews the related work of SS. The main contribution of this paper is shown in Section 3, which contains the whole theoretical derivations. Simulation experiments and result analysis are accomplished in Section 4. Finally, Section 5 concludes this paper.

Related Work
In this section, the motivation of this paper is concluded and then the system model is provided thereafter.

Motivation
In the literature, most of the CSS schemes are based on the assumption that the local sensing results are independent and identically distributed. However, the assumption is unrealistic in practical applications. As a result, the independent and non-identically distributed CSS, namely, HCRN, is discussed in this paper. For the state-of-the-art research on the HCRN, the N-out-of-K rule is widely considered due to its superb performance, compared with the AND rule and the OR rule. However, the closed-form expression for the optimal sensing threshold of the N-out-of-K rule-based HRCN, namely the optimal K, is difficult to obtain at present, according to the discussion in [24].
The sensing threshold at the FC directly determines the sensing performance of the N-out-of-K rule-based HRCN. How to obtain a closed-form expression for the optimal sensing threshold of the N-out-of-K rule-based HRCN seems significant for the further development of the HCRN and serves as the motivation for this paper.

System Model
We consider a centralized CSS scenario, where there are K local detectors and an FC. The local detector makes a binary decision on the local SS result, based on ED, and the local sensing results are sent to the FC for the final decision on whether the observed spectrum is idle (Figure 1).
3. We conduct simulation experiments in the Rayleigh fading channel to validate ou conclusions proposed in this paper.
The rest of this paper is organized as follows. Section 2 reviews the related work o SS. The main contribution of this paper is shown in Section 3, which contains the whole theoretical derivations. Simulation experiments and result analysis are accomplished in Section 4. Finally, Section 5 concludes this paper.

Related Work
In this section, the motivation of this paper is concluded and then the system mode is provided thereafter.

Motivation
In the literature, most of the CSS schemes are based on the assumption that the loca sensing results are independent and identically distributed. However, the assumption is unrealistic in practical applications. As a result, the independent and non-identically dis tributed CSS, namely, HCRN, is discussed in this paper. For the state-of-the-art research on the HCRN, the N-out-of-K rule is widely considered due to its superb performance compared with the AND rule and the OR rule. However, the closed-form expression fo the optimal sensing threshold of the N-out-of-K rule-based HRCN, namely the optimal K is difficult to obtain at present, according to the discussion in [24].
The sensing threshold at the FC directly determines the sensing performance of the N-out-of-K rule-based HRCN. How to obtain a closed-form expression for the optima sensing threshold of the N-out-of-K rule-based HRCN seems significant for the furthe development of the HCRN and serves as the motivation for this paper.

System Model
We consider a centralized CSS scenario, where there are K local detectors and an FC The local detector makes a binary decision on the local SS result, based on ED, and the local sensing results are sent to the FC for the final decision on whether the observed spec trum is idle ( Figure 1).  For the ith local detector, the false alarm probability and detection probability are respectively denoted as P f −i and P d−i . We assume the channel between SU and FC is independent and identically distributed, and so stationary random process with error probability P e , the false alarm probability P FC f −i and detection probability P FC d−i of the ith local detector [30] at the FC can be formulated as it is shown in Equations (1) and (2): We assume the judgment result of the ith local detector D i can be written as it is shown in Equation (3), where H 0 denotes the observed spectrum band is idle while H 1 denotes the observed spectrum band is busy. Then, the final false alarm probability and detection probability at the FC with N-outof-K rule [31] can be denoted as it is shown in Equations (4) and (5): This paper mainly considers the case where the local sensing results in Equations (4) and (5) are independent and non-identically distributed Bernoulli random variables, then the mass function probability at the FC on D i [30] can be described as it is shown in Equations (6) and (7): Finally, the false alarm probability and its corresponding detection probability [32] can be reformulated as it is shown in Equations (8)-(10):

Proposed Strategy
In this section, the main work and contribution of this paper are provided, where the false alarm probability and the detection probability are approximate to a Poisson distribution. The approximation error is discussed and demonstrated therein.

Main Contribution
According to Equations (6)-(10), the closed-form solutions of the optimal sensing threshold at the FC for the N-out-of-K based CSS under the HCRN situations cannot be obtained in the case where local sensing results are independent and non-identically distributed. As a result, reasonable approximations for the false alarm probability and detection probability in Equations (8) and (9) are needed to obtain the optimal solution on the sensing threshold at the FC.
In this paper, the detection probability and its corresponding false alarm probability in Equation (8) and (9) are respectively approximate to two Poisson distributions [33] as it is shown in Equations (11)- (14): where k 0 denotes the sensing threshold of the N-out-of-K rule at the FC. λ F and λ D are the corresponding parameters of the two Poisson distributions. The approximation error will be discussed in the next section. Then, the sensing threshold k 0 can be obtained by minimizing the error probability (the sum of false alarm probability and missed detection probability). The optimal sensing threshold k 0 can be obtained by the convex optimization and k 0 can be written as it is shown in Equation (15): where · denotes the rounding up function.

Approximation Error Analysis
We respectively define the judgment result of every local detector and the FC as X i , then W can be written as it is shown in Equation (16): where X i is the Bernoulli random variable.
Equations (17)- (20) are defined as follows: where m denotes the nonnegative integer. For every real-valued function f defined on the non-negative integers [34], Equations (21)-(24) is obtained: We define: Then, Equation (21) can be reformulated as it is shown in Equation (25): To make this approximation more apparent, we define Equation (26) as follows: where h is a bounded real-valued function on non-negative integers. The solution of Equation (24) can be given by Equation (27): We denote the solution of Equation (26) for w ≥ 1 by S λ h(w). According to Equations (21) and (27), Equation (28) can be obtained: Theorem 1. If X 1 , · · · , X n are independent and p = max 1≤i≤n p i ≤ λ/2, then for |h| ≤ 1 and n ≥ 2, Equation (29) is obtained: where C a constant [31].
Proof. According to Equation (22), Equations (30) and (31) is obtained: where I and J are two random indices.
Equation (30) can be further denoted as it is shown in Equations (32)- (34): Based on the Lemmas 5.2 and 5.3 in [31], Equation (32) can be written as it is shown in Equation (35): According to Lemma 5.5 in [34], Equations (36) and (37) can be obtained: Then, Equation (38) is obtained Based on Jensen's inequality, Equation (39) and (40) is obtained: Theorem 1 states that the approximation error of W is small enough.

The Threats to Validity
In cognitive radio networks, Equation (41) holds: According to Equation (41), Equation (42) can be obtained: In extreme cases P f = P m = 0.5, the following conclusion can be drawn according to Theorem 1: the approximation error decrease with the rise of N, when the approximation error is below 6 N + 24 √ 2 N . If N > 18, the approximation error is lower than 2, even under the extreme case P f = P m = 0.5. If N > 34, the approximation error is lower than 2, even under the extreme case P f = P m = 0.5.
As a result, the approximation error decreases with the rise of SU. If the number of SU is very small, a possible scheme to reduce the approximation error is to improve the Appl. Sci. 2021, 11, 3083 8 of 13 sampling points, which can make the detection probability at a high level and make the false alarm probability lower.

Complexity Analysis
Note that the closed-form expression of the optimal sensing threshold for the N-outof-K rule-based CSS scheme under the HCRN situations is unavailable according to the discussion in [24]. The optimal sensing threshold at the FC of the classical N-out-of-K rule-based CSS scheme under the HCRN situation is obtained by iteration and comparison.
According to Equations (6) and (7), the required multiplication operation is O(N 6 ) while the required addition operation is O(N 4 ) for the mass function probability at the FC on D i . To obtain the optimal sensing threshold for Equations (8) and (9), N iterations are required. In consequence, the required multiplication operation is O(N 7 ) and the required addition operation is O(N 5 ) for the classical N-out-of-K rule-based CSS scheme.
For the proposed scheme, Equations (8) and (9) are respectively approximated to the Poisson distribution with the parameter λ F and λ D . As a result, the required operation for the proposed scheme is O(N), which is greatly reduced compared with the classical N-out-of-K rule-based CSS scheme.

Simulation and Discussion
In this section, simulations based on the MATLAB platform are used to examine the performance of the proposed sensing strategy for SS. In the simulation, the BPSK modulated signal is considered as the primary signal with the bandwidth 2000 Hz, the background noise is the additive white Gaussian noise (AWGN) [35] and the sampling frequency at the receiver of the local detector is the same as the bandwidth of the primary signal. ED is regarded as the local detector and the Rayleigh fading channel is considered. In the CR network, 15 SUs are considered. We assume that the time for each SU to send its sensing results to FC is much shorter than the sensing duration. Two different types of detectors are designed in the paper to simulate the situation of heterogeneous detectors, where the signal-to-noise ratio (SNR) of one kind of detector is SNR1 and the SNR of the other detectors is SNR2. The number of the first types of detectors is denoted as N 1 .
In addition, the Rayleigh fading is generated based on the built-in function of MATLAB in Monte Carlo simulations, where the sampling frequency and the Doppler shift are fixed. As a result, an ensemble of fading random variables is made with the fixed parameters to get a sense of expected performance in the Monte Carlo experiment of this paper.
It states that the main contribution of this paper consists in the closed-form expression of the optimal sensing threshold at the FC for the N-out-of-K rule-based CSS scheme under the HCRN situations by Poisson distribution. In consequence, the comparisons of the optimal sensing threshold at the FC between the proposed scheme and the classical scheme are mainly considered in the simulations under various scenarios. For the proposed scheme, the optimal sensing threshold is obtained by the closed-form solution provided in this paper while the optimal sensing threshold of the classical scheme is obtained by iteration and comparison. The optimal sensing threshold of the classical scheme is the theoretical value and the optimal sensing threshold of the classical scheme is the evaluated value.

Simulation Results
Generally, the sensing threshold of the ith SU,λ i , is evaluated under the scenarios as follows. Note that λ i denotes the sensing threshold of the ith local energy detector, which is different from the sensing threshold k 0 at FC.
(1) Scenario I: The SUs make the decisions at the same sensing threshold and the sensing threshold, λ, is determined by minimizing the total error rate at the FC. (2) Scenario II: The sensing threshold of the ith SU,λ i , is calculated by minimizing the total error rate. (3) Scenario III: λ i is determined by minimizing the local false alarm probability while detection probability is above the minimum requirements of the CR system.
(4) Scenario IV: All the SUs make the decision by the fixed threshold. Figure 2 exhibits sensing threshold comparisons with different sensing times at the FC under various scenarios, where the four scenarios correspond with the mentioned above and N 1 = 7. The time-bandwidth product [24] is the product of the duration of a signal and its spectral width. The time-bandwidth product measures how well we use the available bandwidth for a given channel, which is positively correlated with the sensing time in the simulation due to the fixed bandwidth. As a result, the time-bandwidth product is approximately equivalent to the sampling points of the local SS detectors in this paper. The classical scheme in Figure 2 denotes the scheme in Equations (8) and (9).
Appl. Sci. 2021, 11, x FOR PEER REVIEW 10 of Figure 2. The sensing threshold comparisons under various scenarios with the different time-bandwidth products. Scenario I、Scenario II、Scenario III and Scenario IV respectively corresponds with the scenarios mentioned above.
The total error probability is shown in Figure 3 under four scenarios. The red lin denotes the proposed scheme, where both the sensing threshold and the minimum tot error probability are with the proposed scheme. The black line denotes the minimum tot error probability with the classical scheme. The blue line denotes the real minimum tot error probability with the proposed sensing threshold. The main difference between th red line and the green line is that the minimum total error probability of the red line evaluated by the proposed scheme in this paper and the minimum total error probabili of the green line is calculated by the evaluated sensing threshold in this paper. The total error probability is shown in Figure 3 under four scenarios. The red line denotes the proposed scheme, where both the sensing threshold and the minimum total error probability are with the proposed scheme. The black line denotes the minimum total error probability with the classical scheme. The blue line denotes the real minimum total error probability with the proposed sensing threshold. The main difference between the red line and the green line is that the minimum total error probability of the red line is evaluated by the proposed scheme in this paper and the minimum total error probability of the green line is calculated by the evaluated sensing threshold in this paper.   In Figure 5, the error is proved with the variation of 1 N and 2 SNR , where z denotes the error probability difference between the proposed scheme with the classical scheme. Obviously, the error, z, increases with the error increase of the decision threshold, which corresponds to the theoretical analysis in Section 3.    In Figure 5, the error is proved with the variation of 1 N and 2 SNR , where z denotes the error probability difference between the proposed scheme with the classical scheme. Obviously, the error, z, increases with the error increase of the decision threshold, which corresponds to the theoretical analysis in Section 3. In Figure 5, the error is proved with the variation of N 1 and SNR2, where z denotes the error probability difference between the proposed scheme with the classical scheme. Obviously, the error, z, increases with the error increase of the decision threshold, which corresponds to the theoretical analysis in Section 3. Appl. Sci. 2021, 11, x FOR PEER REVIEW 12 of 14

Analysis and Discussion
As shown in Figure 2, the sensing threshold of the FC increases with the rise of the sensing point, which is the same as the classical scheme. Additionally, the sensing threshold of the proposed scheme is always higher than that of the classical scheme. The reason for this phenomenon is that when Poisson approximation is applied to the results of different independent Bernoulli variables, a high-order small quantity is always produced. The possible reason is that the rounding operation is needed for the evaluated decision threshold since the decision threshold is always an integer, which increases the decision threshold at the FC.
Note that the sensing threshold of the proposed scheme is closer to that of the classical scheme compared with the AND rule and the OR rule. This is because that when the probability of the Poisson approximation is less than 0.5, the λ produced by Poisson approximation will be very small, and the corresponding high-order small quantity will be even smaller. Therefore, the decision threshold obtained by this method will be much better than the threshold error produced by other methods.
As shown in Figure 3, the minimum error probability of the proposed scheme is basically identical to the classical scheme. This is because the threshold obtained by the proposed method is basically the same as that obtained by the classical scheme, and the error occurs only at a few jump points. As a result, if the proposed method is different from the classical scheme, the error probability at the bifurcation point will be greater than that calculated by the classical scheme. In addition, the trend of the three lines in Scenario I, II, III always increases gradually from left to right. This is because the performance of the CSS increases as the optimal N value decreases. However, the minimum total error probability under scenario IV decreases at first and then increases.
As shown in Figure 4, when x is small or large, the maximum deviation increases, because when 1 N is larger or smaller, the 1 2 N N is farther away from 1, thus increasing the deviation. In comparison, when 1 N is too large, the deviation is larger. This is because , and the geometric mean is used in Poisson approximation, which leads to

Analysis and Discussion
As shown in Figure 2, the sensing threshold of the FC increases with the rise of the sensing point, which is the same as the classical scheme. Additionally, the sensing threshold of the proposed scheme is always higher than that of the classical scheme. The reason for this phenomenon is that when Poisson approximation is applied to the results of different independent Bernoulli variables, a high-order small quantity is always produced. The possible reason is that the rounding operation is needed for the evaluated decision threshold since the decision threshold is always an integer, which increases the decision threshold at the FC.
Note that the sensing threshold of the proposed scheme is closer to that of the classical scheme compared with the AND rule and the OR rule. This is because that when the probability of the Poisson approximation is less than 0.5, the λ produced by Poisson approximation will be very small, and the corresponding high-order small quantity will be even smaller. Therefore, the decision threshold obtained by this method will be much better than the threshold error produced by other methods.
As shown in Figure 3, the minimum error probability of the proposed scheme is basically identical to the classical scheme. This is because the threshold obtained by the proposed method is basically the same as that obtained by the classical scheme, and the error occurs only at a few jump points. As a result, if the proposed method is different from the classical scheme, the error probability at the bifurcation point will be greater than that calculated by the classical scheme. In addition, the trend of the three lines in Scenario I, II, III always increases gradually from left to right. This is because the performance of the CSS increases as the optimal N value decreases. However, the minimum total error probability under scenario IV decreases at first and then increases.
As shown in Figure 4, when x is small or large, the maximum deviation increases, because when N 1 is larger or smaller, the N 1 N 2 is farther away from 1, thus increasing the deviation. In comparison, when N 1 is too large, the deviation is larger. This is because SNR2 > SNR1, and the geometric mean is used in Poisson approximation, which leads to a greater error caused by a larger N 1 when N 1 N 2 also deviates from 1. Similarly, when SNR2 increases, the maximum deviation will increase due to the rise of the average value. Consequently, if it is possible to screen the population within the detectors, one should try to ensure that the N 1 N 2 is close to 1, and at the same time, try to select an SNR with a small deviation to form the detector group.

Conclusions
The N-out-of-K rule-based CSS scheme is approximate to the Poisson distribution for the closed-form expression of the optimal sensing threshold at the FC under the heterogeneous cognitive radio networks in this paper, where the closed-form solutions of the false alarm probability and the detection probability are provided. The theoretical derivation is made for the approximation error, which states that the approximation error is within the tolerance of the system. The computational complexity to obtain the optimal sensing threshold at the FC has decreased from O(N 7 ) to O(N) by the efficient approximation of the N-out-of-K rule-based CSS scheme under the heterogeneous cognitive radio networks. The simulation experiments under the Rayleigh fading channel validate the conclusions drawn in this paper.