# On Optimal Cooperative Sensing with Energy Detection in Cognitive Radio
## 3 Cooperative Sensing with Optimal Thresholds  
### 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 \(\epsilon\) for two cooperative sensing nodes [19], the \(P_{i}^{f}\) at individual sensing node is simply given by \(\sqrt{P^{f}}\) from (6), and then \(\epsilon\) is accordingly given by \(\sqrt{4\tau B}\mathcal{Q}^{-1}\left(\sqrt{P^{f}}\right)+2\tau 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.  
**Example 2**.: _In 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 always 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._  
Figure 3: 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.  
Figure 2: Receiver operating characteristic (ROC) curves of cooperative sensing with two sensing nodes; node 1 with \(-15\) dB average signal-to-noise ratio (SNR) and node 2 with \(-12\) dB SNR.