1 Introduction

The key concern of next generation communication systems (NGCS) is to fulfill the demand of spectrum for various services such as high-speed internet, internet-of-things (IoT) [1], and user-centric mobile applications [2]. The radio frequency spectrum is a scarce resource which is already allocated to different services for example, the voice-telephony, military services, satellite and radar services etc. [3]. Therefore, this spectrum scarcity restricts the introduction of new services/devices which require the spectrum. However, a report of the Federal Communication Commission (FCC) reveals the fact that most of the allocated spectrum remains underutilized/unutilized at specific time and space [4]. This finding has motivated the concept of spectrum reuse by allowing the unlicensed/cognitive users (CUs) to utilize the licensed/allocated spectrum of the primary users (PUs) when the spectrum is temporally unexploited/underutilized. In this context, the dynamic spectrum allocation (DSA) [5, 6] allows the CUs to utilize the spectrum in such a way that the licensed user/PUs communication remains impervious [7,8,9]. The cognitive radio (CR) is a framework which supports the DSA mechanism by exploiting the cognitive cycle that comprises four elements [10] namely, (1) spectrum sensing, (2) spectrum analysis and decision, (3) spectrum sharing/accessing, and (4) spectrum mobility. Initially, the CU senses its radio environment to perceive the state of channel being either active or idle by employing the spectrum sensing techniques [11]. Further, the idle sensed channels are analyzed, and the suitable idle channel is selected for essential application. Moreover, the selected channel is accessed for communication via the preferred spectrum accessing technique i.e. interweave, underlay, overlay and hybrid [12, 13]. The emergence of PU during the CU communication is a prospective event and at this instant, the CU need to stop or switch the communication on another idle channel. The process of switching the communication on another idle channel is known as spectrum mobility or handoff [14].

The spectrum sensing (SS) is a prime step of cognitive cycle which exploits the following major techniques to detect the channel states, namely, (1) energy detection spectrum sensing (EDSS) [15,16,17,18], (2) matched filter (MF) detection [19, 20], (3) cyclostationary feature detection (CFD) [21], (4) covariance absolute value detection(CAV) [22], and (5) eigen-values based detection (EVD) [23, 24]. Further, these techniques are classified as blind (EDSS, CAV, EVD) and non-blind (CFD, MF) spectrum sensing. The non-blind spectrum sensing techniques entail the information about the PUs signal (such as the modulation type, carrier frequency, frame structure, pulse shaping etc.) at the CU terminal which is in general, difficult to yield however, in the blind spectrum sensing, there is no such prerequisite. Moreover, the comparison of different sensing approaches has been presented in [25, 26] and it is observed that the EDSS has significantly less computation and implementation complexity, therefore it is widely used spectrum sensing technique. In EDSS, the energy/test statistics (T) of the received signal is compared with the predefined threshold value (λ) and when the energy of received signal is greater than or equal/less than the threshold value, the sensing result is in favor of channel being active/idle, respectively. The sensing decision in the EDSS relies on the threshold value, therefore, the computation and selection of threshold is a very prominent aspect. In addition, the key sensing performance metrics are the false-alarm probability and detection probability. The false-alarm probability (\( P_{f} \)) is the probability of CR user decision in favor of channel being busy while in actual it is idle however, the detection probability (\( P_{d} \)) is the probability of CR user decision in favor of channel being busy when the PU signal is actually there. The low numerical value of \( P_{f} \left( {approx. \, \le \,0.1} \right) \) is required for maximum utilization of channel, while the high numerical value of \( P_{d} \left( {approx. \, \ge \,0.9} \right) \) is required to provide protection to PU. For example, in IEEE 802.22 (WRAN) standard, for TV signal detection, it is required to achieve 90% probability of detection and 10% probability of false-alarm at SNR level as low as − 20 dB with maximum sensing time of 25 ms required in order to achieve the sensing requirement [27]. It has been reported in earlier literature that the selection of threshold greatly affects the false-alarm and detection probability [28, 29].

The threshold is mainly selected with constant false-alarm rate (CFAR) or constant detection rate (CDR) in EDSS. The details of CFAR and CDR approaches are provided in Sect. 2. In [30], the authors have exploited CFAR and CDR approaches individually for the selection of threshold. Further, individual consideration of CFAR/CDR agrees to meet the target value of false-alarm/detection probability, however at the same time restricts to meet the detection/false-alarm probability. Also, it has been observed that CFAR approach has enhanced the throughput in comparison to the CDR approach [31], however CFAR is unable to provide sufficient protection to the PU as compared to that of the CDR approach. In this context, to improve the overall throughput at low SNR, Verma and Sahu [32] have exploited the combination of CFAR and CDR approaches to select the threshold. In [32] the authors have although enhanced the throughput, however both the desired values of \( P_{f} \) and \( P_{d} \) have not been achieved simultaneously at low SNR, which is one of the challenging issues. Moreover, the authors also have not considered the concept of optimality conditions for threshold value at low SNR which is essential to achieve desired \( P_{f } \) and \( P_{d} \). Therefore, in this paper, considering all the above aspects, we have selected the optimal threshold in EDSS which jointly achieve the targeted \( P_{f } \) and \( P_{d} \) at low and high SNR. Further, the throughput is computed subjected to the optimality limits for the considered CU network. The potential contributions of this paper are summarized as follows.

  • Distinct thresholds are computed for CFAR, CDR and MEP approaches for a chosen number of samples (N) and received primary SNR at CU (\( SNR_{p } \) or \( \gamma_{p} \)).

  • Since most of the authors have worked on the selection of threshold either by fixing the value of \( P_{f} \) or \( P_{d} \) individually but not simultaneously which degraded the sensing results at low \( SNR_{p} \). Therefore, to improve sensing performance, we have selected the threshold by utilizing both \( P_{f} \) and \( P_{d} \) simultaneously.

  • Thereafter, the condition for a single optimal threshold is analyzed to achieve the desired values of \( P_{f} \) and \( P_{d} \) simultaneously at all \( SNR_{p} \). However at low SNR region, we have observed that the threshold with CFAR approach is greater than the CDR approach \( (\lambda_{f} \) > \( \lambda_{m} ) \), therefore the optimality condition for the selection of threshold has not been satisfied as discussed in detail in Sect. 4.1. Further, we found the optimal number of samples such that the same optimality condition is satisfied even at low SNR.

  • The closed-form expressions of different spectrum sensing performance metrics such as the probability of detection, the probability of false-alarm, and the probability of error have been computed for the proposed approach and compared with the state-of-art work. Thereafter, throughput for the proposed approach has been computed and compared with reported literature.

This paper is structured as follows. The related work is presented in Sect. 2. A system model of the proposed framework is described in Sect. 3. Section 4 comprises a performance analysis of the proposed system model. The MATLAB simulation results with their analysis are presented in Sect. 5. Finally, Sect. 6 concludes the work with future recommendations.

2 Related work

The function of CU in spectrum sensing is to detect the spectrum opportunities. One of the techniques for detecting the unused licensed bands is the energy detection spectrum sensing (EDSS) for which, the selection of threshold defines sensing detector performance. In general, the fixed threshold (FT) and the dynamic threshold (DT) methods are employed for the selection of threshold in EDSS technique. In the fixed threshold, the threshold remains constant even with the change in SNR, however in order to incorporate channel variations, the dynamic threshold method has been proposed which varies its threshold with the channel conditions in order to minimize the probability of error in sensing results. It has been illustrated by various researchers [29, 33, 47] that the threshold selection with DT method provides better spectrum sensing result as compare to that of the FT method.

In fixed threshold method, the threshold is mainly selected with constant false-alarm rate (CFAR) approach however, in dynamic threshold, it is selected by using either constant detection rate (CDR) approach or by minimizing error probability (MEP) approach. Moreover, in CFAR approach, the targeted value of false-alarm probability (\( P_{f\_fixed} \)) is fixed and the value of threshold (\( \lambda_{CFAR} \)) is computed to maximize the probability of detection (\( P_{d} \)), while in CDR approach the targeted value of detection probability (\( P_{d\_fixed} \)) is fixed and the threshold value (\( \lambda_{CDR} \)) is computed to minimize the probability of false-alarm (\( P_{f} \)) [30]. However, in MEP approach, the threshold is computed by differentiating the sensing error probability with respect to threshold [28]. Various researchers have used these different approaches to select the threshold in spectrum sensing technique for cognitive radio communication system which are detailed further in this section and in Table 1.

Table 1 Summary and comparison of literature employing different threshold selection methods

2.1 CFAR and CDR approach

As discussed above, the CFAR approach computes the value of threshold to maximize the detection probability. In this context, Gandhi and Kassam [34] have presented that the CFAR approach is used to identify the status of target frequency band when it shows the unknown/dynamic distributions and it has been observed that its performance is highly degraded in the presence of abrupt variation in noise and interfered signal. Thereafter, Kortun et al. [35] have also illustrated that the threshold selection using CFAR approach does not perform well in the presence of noise uncertainty, hence the eigen-values based detector is employed to decide the threshold in order to enhance the sensing performance. Moreover, the throughput has been maximized by keeping fixed sensing time in the presence of noise uncertainty. Further, Lehtomaki et al. [36] have achieved a significant improvement in the sensing performance by employing forward-detection methods with CFAR when multiple PUs are presented in the chosen environment. In addition, Mahdi et al. [37] have decided the threshold using CFAR and empirical mode decomposition (EMD) techniques to maximize the detection probability and have identified multiple channels in the given spectrum band. Recently, the authors in [38] employed CFAR and improved the throughput as compared to conventional ED by employing simultaneous sensing and transmission using a single antenna at CR terminal.

Moreover, in [39], the authors have employed CDR approach to yield the detection threshold and computed the value of throughput. Further, Koley et al. in [31] have presented that CDR approach is suitable to provide sufficient protection to PU from CU however with reduced throughput in comparison to the CFAR approach. In this context, in order to provide sufficient protection to PU and high throughput to CU, Gaurav and Sahu [32] have employed the combination of CFAR and CDR approaches to decide the threshold. Recently, Zhang et al. [40] have designed a framework for the power control and sensing time optimization in a cognitive small-cell network and employed CDR approach to select the threshold. Moreover, CFAR and CDR approaches have been explored widely by several authors in various literature [30, 32, 34,35,36,37,38, 46].

2.2 MEP and other approaches

In order to minimize the overall sensing error, MEP approach has been employed in various literatures. In [28, 41], the dynamic value of threshold has been achieved by minimizing the error probability with respect to the threshold for Gaussian channel. Further, Choi et al. [42] have decided the transmit power of CU and then accordingly changed its sensing threshold dynamically so that the PU and CU can communicate on the same channel without interfering to each other. However, Joshi et al. [43, 44] have used the gradient descent algorithm to minimize the error function without employing the transmitted power of CU and have found the dynamic value of threshold. Moreover, in [45], the authors have discussed the maximum allowable power that can be transmitted by the CU and have decided the threshold value according to the relative position of CU towards the base station. In addition to this, Yu et al. [46] have observed that there is spectral leakage in vacant frequency band when the PU has used high transmit power and to resolve this problem, the authors considered variable sensing duration, dynamic selection of threshold and utilized multitap-windowed FFT processing technique for the targeted value of false-alarm and detection probability. Further, it is presented that dynamic threshold is a more suitable method instead of increasing the sensing duration to yield the desired value of detection. Moreover, Ling et al. [47] have selected the dynamic threshold according to a linear function of signal-to-interference plus noise ratio (SINR) and maximized the CU throughput. Further, in [48], the sensing performance has been improved with the use of prior available PU spectrum utilization information. Moreover, the authors have assumed that the previous status of the spectrum is known and selected the threshold according to the previous state information. However, Ding et al. [49] have discussed the spectrum prediction techniques based on the models of spectrum usage, sources of spectrum data and the predictability of spectrum evolution for better utilization of spectrum and to make CR more intelligent. However, Kerdabadi et al. [50] have maximized the throughput by jointly optimizing the threshold value, sensing time and user selection for sensing and data transmission. Moreover in [51], adaptive threshold is selected using covariance-based channel selection with intelligent way to minimize the probability of error with required protection to PU.

Further, in order to improve the detection probability and sensing time, Benedetto and Giunta [52] have employed constant energy (CE) technique considering the signals whose energy per data-block remains fixed and the variance of the received signal energy over M block is used to decide the status of channel. Moreover, the weighted-covariance-based detection (WCD) [53] is used to enhance the performance of CAV. However, the demerit with WCD befalls when a large number of low correlated receiving antennas are there and hence results in less primary user detection. Furthermore, to overcome the aforementioned problem of WCD, Chen et al. [54] have used Ljung-Box (LB) test to detect the presence of PU signal in the above-mentioned scenario and provided significantly better performance under noise uncertainty. Recently, Xiong et al. [55] have presented adaptive spectrum sensing strategy (ASSS) which utilized the PU traffic pattern to find the channel to be sensed having more possibility of being idle. Further to improve the energy efficiency in full-duplex cognitive radio (FDCR), Bayat and Aïssa [56] used the concept of contiguous sensing by inserting sleep period between sensing without any significant degradation in throughput parameter.

3 System model

The integration of CUs with lesser priority which should transmit their messages in a way that PU of the licensed channel would not be adversely affected is the key concern of CRN. The spectrum sensing is a critical aspect of CR systems that intent to identify the working state of PU before allowing the CU temporarily accesses the channel without causing harmful interference to the PU. In the proposed system model, we are considering single band spectrum sensing with a pair of PU and CU transceiver and assumed that the PU receiver is in the range of CU transmitter as shown in Fig. 1(a). In an anticipated band of interest, the probability of PU activity (idle or busy) is considered and denoted as \( P\left( {H_{0} } \right) \) or \( P\left( {H_{1} } \right) \), respectively. The PU operates between idle and busy states alternately, while the CU executes spectrum sensing to the licensed channel and opportunistically transmits data in a frame-wise manner. Further, we have assumed that the PU stays at the same state (idle or busy) with a high probability and its activity remains constant during the whole sensing frame [15, 59, 60]. Moreover, we have computed the throughput for proposed approach under two cases of PU activity. In case-1, the PU is absent on the channel and no false-alarm is generated by the CU. While in case-2, the PU is present on the channel and it is not detected by the CU. Both these cases of throughput under different PU activities have been presented in Sect. 4.5. However, the periodical spectrum sensing scheme is considered in which the frame comprising sensing and transmission time and repeats itself after T units of time. As shown in Fig. 1(b), we have considered P frames, where each frame comprises two phases i.e. sensing phase (\( T_{s} \)) and transmission phase (\( T - T_{s} \)). The transmitted signals and noise of PU are assumed to be independent and identically distributed (IID) Gaussian random variables. The noise samples are considered as circularly symmetric complex Gaussian (CSCG) and the signal is complex-valued phase shift keying (PSK) signal. The received signal \( X\left( n \right) \) at CU is represented by (1).

$$ X\left( n \right) = \left\{ {\begin{array}{*{20}l} {W\left( n \right)} \hfill & {: H_{0} } \hfill \\ {h.S\left( n \right) + W\left( n \right)} \hfill & {:H_{1} } \hfill \\ \end{array} } \right\} $$
(1)

where W(n), S(n), and h are the additive white Gaussian noise (AWGN), transmitted signal, and channel gain coefficient, respectively. The binary hypothesis \( H_{0} \) and \( H_{1} \) are considered to identify the status of channel i.e. idle and active, respectively. The test statistics \( T\left( x \right) \) for EDSS is given as [13]:

$$ T\left( x \right) = \frac{1}{N}\mathop \sum \limits_{n = 0}^{N - 1} \left| {X\left( n \right)} \right|^{2} $$
(2)

where N is the number of samples of the received signal used for computing the signal energy. The probability density function (PDF) of test statistics \( T\left( x \right) \) under hypothesis \( H_{0} \) and \( H_{1} \) follows a Chi square distribution with 2N degree of freedom for complex valued noise while has N degree of freedom for real valued noise. For a sufficient high number of samples (N > 256), the PDF of \( T\left( x \right) \) under hypothesis \( H_{0} \) and \( H_{1} \) followed the Gaussian distribution [61]. \( H_{0} \) and \( H_{1} \) under the Gaussian approximation is represented as [62]:

$$ H_{0} : N\left( {N\sigma_{n}^{2} , N\sigma_{n}^{4} } \right)\& \; H_{1} : N\left( {N\sigma_{n}^{2} \left( {1 + \gamma_{p} } \right), N\sigma_{n}^{4} \left( {1 + \gamma_{p} } \right)^{2} } \right), $$

where \( \sigma_{n}^{2} \) is the noise variance and \( \gamma_{p} \) is the received primary users SNR. Further, the false-alarm and detection probability is given as [28]:

$$ P_{f } = \frac{1}{2}{\text{E}}rfc\left( {\frac{{\lambda - N\sigma_{n}^{2} }}{{\sqrt {2N\sigma_{n}^{4} } }}} \right) $$
(3)
$$ P_{d } = \frac{1}{2}{\text{E}}rfc\left( {\frac{{\lambda - N\sigma_{n}^{2} \left( {1 + \gamma_{p} } \right)}}{{\sqrt {2N\sigma_{n}^{4} \left( {1 + \gamma_{p} } \right)^{2} } }}} \right) $$
(4)
$$ P_{m} = 1 - P_{d} $$
(5)
$$ P_{e} = P_{f} + P_{m} $$
(6)

where λ, N, and Erfc(.) are threshold value, number of samples and error function, respectively.

Fig. 1
figure 1

The proposed a system model and b frame structure of cognitive user [62]

4 Performance analysis

The performance metrics of spectrum sensing are the probability of false-alarm, probability of detection, and probability of error which have been defined by (3), (4) and (6), respectively. The desired values of these metrics affect the selection of threshold in EDSS which is the function of number of samples as detailed in Sect. 4.3. In addition to this, it is difficult to achieve the desired value of both the metrics i.e. \( P_{f} \) and \( P_{d} \) because there exists a trade-off between these two metrics. Therefore, there is a demand to select the optimum value of the threshold to fulfill the desired values of \( P_{f} \) and \( P_{d} \), simultaneously. Further, we have verified the optimality condition for the threshold at high SNR for fixed N. Moreover, the optimal selection of threshold at low SNR is also evaluated by selecting the optimal number of samples (N*). Furthermore, the throughput of the network for that optimal value is computed. The condition for optimal threshold, the computation of different thresholds with CFAR, CDR and MEP approaches, and optimal threshold selection at low and high SNR also have been illustrated. Further, the critical SNR and throughput analysis for the proposed system is also presented.

4.1 Optimal threshold condition

From Fig. 2, it is perceived that the false-alarm probability (\( P_{f} \)) and miss-detection probability (\( P_{m} \)) shows a direct and an inverse relation with the threshold (λ). In the CFAR and CDR approach, we have fixed the maximum permissible value of false-alarm and miss-detection probability and computed the corresponding value of the threshold \( \lambda_{f} \) and \( \lambda_{m} \), respectively. In Fig. 2, it is clear that to minimize the false-alarm, the threshold \( \lambda_{f} \) (threshold for CFAR approach) needs to be as high as possible while to minimize the miss-detection, the threshold \( \lambda_{m} \) (threshold for CDR approach) needs to be as low as possible. Therefore, it has been observed from the above discussion that the above two conditions will be satisfied only when \( \lambda_{f} \) ≤ \( \lambda_{m} \) (optimal threshold condition) which satisfy both the false-alarm and miss-detection probabilities, simultaneously [63].

Fig. 2
figure 2

Threshold selection in hypothesis model

4.2 Computation of different threshold

In CFAR approach, the false-alarm probability is fixed (\( P_{f\_fixed} \)) and we have computed the threshold with the help of (3) as follows:

$$ \lambda_{f} = \left\{ {\sqrt {\frac{2}{N}} Erfc^{ - 1} \left( {2P_{f\_fixed} } \right) + 1} \right\}N\sigma_{n}^{2} $$
(7)

In CDR approach, the miss-detection probability is fixed (\( P_{m\_fixed} \)) and the corresponding value of threshold with the help of (4) and (5) has been computed as follows:

$$ \lambda_{m} = \left\{ {\sqrt {\frac{2}{N}} \left( {1 + \gamma_{p} } \right)Erfc^{ - 1} \left( {2\left( {1 - P_{m\_fixed} } \right)} \right) + \left( {1 + \gamma_{p} } \right)} \right\}N\sigma_{n}^{2} $$
(8)

Further, in MEP approach, the error probability is minimized with respect to the threshold and threshold value has been achieved as [63]:

$$ \lambda_{e} = \frac{{N\sigma_{n}^{2} }}{2}\left\{ {1 + \sqrt {1 + \frac{{2\left( {2 + \gamma_{p} } \right)\ln \left( {1 + \gamma_{p} } \right)}}{{N\gamma_{p} }}} } \right\}\left( {\frac{{1 + \gamma_{p} }}{{1 + \frac{{\gamma_{p} }}{2}}}} \right) $$
(9)

4.3 Optimal threshold selection

The optimal threshold value is selected when the optimality condition for the threshold as mentioned in Sect. 4.1 is satisfied. Initially, we have computed different threshold values (\( \lambda_{f} \) and \( \lambda_{m} \)) as already described in Sect. 4.2. There are three possible combinations of \( \lambda_{f} \) and \( \lambda_{m} \) as shown in Fig. 3(a)–(c). It is clear from Fig. 3(a), the threshold value \( \uplambda_{\text{f}} \) < \( \lambda_{m} \) and therefore the optimal threshold condition is satisfied. Hence, any threshold value which is in between \( \uplambda_{\text{f}} \) and \( \uplambda_{\text{m}} \) can be selected as optimal threshold.

Fig. 3
figure 3

The optimal threshold selection a\( \lambda_{f} < \lambda_{m} \), b\( \lambda_{f} = \lambda_{m} \) and c\( \lambda_{f} > \lambda_{m} \)

Moreover, in Fig. 3(b), \( \lambda_{f} = \lambda_{m} \) and here again, the optimal threshold condition is satisfied, and either \( \lambda_{f} \) or \( \lambda_{m} \) is selected as an optimal threshold. Moreover, in Fig. 3(c), \( \lambda_{f} > \lambda_{m} \), therefore the optimal threshold is not possible in this scenario. However, in order to satisfy the optimality condition in this scenario, we have computed the optimal number of samples (\( N^{*} \)) according to (10) and an optimal threshold is selected as is performed in previous two scenarios of Fig. 3(a), (b). Further, the flow chart to select optimal threshold is depicted in Fig. 4.

Fig. 4
figure 4

Flow chart for optimal threshold selection

figure e

In Algorithm-1, \( {\text{N}}^{ *} \) is the optimal number of samples required to achieve the desired \( P_{f} \) and \( P_{d} \), \( \lambda_{f}^{ *} \), \( \lambda_{m}^{*} \) and \( \uplambda_{\text{e}}^{*} \) are the threshold values with CFAR, CDR and MEP approaches when N is replace by \( N^{*} \) in Eqs. (7), (8), and (9), respectively.

$$ N^{*} = \frac{1}{{\gamma_{p}^{2} }}\left\{ {Q^{ - 1} \left( {P_{f\_fixed} } \right) - Q^{ - 1} \left( {P_{d\_fixed} } \right)\sqrt {2\gamma_{p} + 1} } \right\}^{2} $$
(10)

where \( Q^{ - 1} \left( . \right) \) is the inverse complementary distribution function of the standard Gaussian distribution.

4.4 The condition for critical SNR (\( \gamma_{c} \))

Critical SNR is defined as the SNR below which \( \lambda_{f} \) > \( \lambda_{m} \) and optimality threshold condition will not be satisfied. For the fixed value of N, we have computed the minimum \( SNR_{p} \) (\( \gamma_{p} \)) at which the optimality condition is satisfying and is computed by equating Eqs. (7) and (8) as follows:

$$ \gamma_{c} = \frac{{\sqrt {\frac{2}{N}} \left\{ {Erfc^{ - 1} \left( {2P_{f\_fixed} } \right) - Erfc^{ - 1} \left( {2P_{d\_fixed} } \right)} \right\}}}{{1 + \sqrt {\frac{2 }{N}} Erfc^{ - 1} \left( {2P_{d\_fixed} } \right)}} $$
(11)

4.5 Throughput computation

The throughput has been categorized into two cases as follows. In case-1, the PU is absent in the channel and no false-alarm is generated while in case-2, the PU is present in the channel and it is not detected by the CU. The throughput of first and second cases are denoted by \( R_{0} \left( {T_{s} } \right) \) and \( R_{1} \left( {T_{s} } \right) \), correspondingly. In a chosen frequency band, we have considered that \( P\left( {H_{1} } \right) \) and \( P\left( {H_{0} } \right) \) are the probability of channel being active and idle, respectively and average throughput, \( {\text{R}}\left( {T_{s} } \right) \) for CU has been computed as follows [62].

$$ R_{0} \left( {T_{s} } \right) = \left( {\frac{{T - T_{s} }}{T}} \right)\left( {1 - P_{f} } \right)log_{2} \left( {1 + \gamma_{s} } \right) $$
(12)
$$ R_{1} \left( {T_{s} } \right) = \left( {\frac{{T - T_{s} }}{T}} \right)\left( {1 - P_{d} } \right)log_{2} \left( {1 + \frac{{\gamma_{s} }}{{1 + \gamma_{p} }}} \right) $$
(13)

where \( \gamma_{s} \) is the SNR for secondary link. The total average throughput for CU is as:

$$ {\text{R}}\left( {T_{s} } \right) = P\left( {H_{1} } \right)R_{1} \left( {T_{s} } \right) + P\left( {H_{0} } \right)R_{0} \left( {T_{s} } \right) $$
(14)

5 Results and discussion

In this section, we have presented the numerically simulated results for sensing performance parameters i.e. the probability of detection, the probability of false-alarm and probability of error. Further, the numerically simulated results for the threshold values and throughput for CFAR, CDR, MEP approach have been presented and compared with the proposed optimal threshold selection approach.

The simulation environment is yielded using the MATLAB 2010 [64]. Moreover, the values of simulation parameters are selected based on IEEE 802.22 wireless regional area network (WRAN) standard and are presented in Table 2. The minimum number of samples assumed is more than 256, therefore maximum value of \( SNR_{p} \) considered is − 8 dB [61]. The sensing time \( (T_{s} ) \) and each frame duration (T) is considered as 2.5 ms and 100 ms, respectively.

Table 2 The simulation parameters for the proposed CRN

The variations in threshold value for the CFAR (\( \lambda_{f} ) \), CDR (\( \lambda_{d} ) \), and MEP (\( \lambda_{e} ) \) approaches with received primary SNR (\( SNR_{p} \) or \( \gamma_{p} \)) are presented in Fig. 5. The threshold is constant with \( SNR_{p} \) in CFAR approach however its value increases with increase in SNRp in CDR and MEP approaches. We have defined the critical SNR (\( SNR_{c} \)) as that \( SNR_{p} \) value below which \( \lambda_{f} \) > \( \lambda_{m} . \) Further, it is depicted from the Fig. 5 that at higher value of SNR (\( SNR_{p} \) ≥ \( SNR_{c} \)), the optimal threshold condition (\( \lambda_{f} < \lambda_{m} \)) is verified, moreover the threshold value with MEP approach is in between \( \lambda_{f} \) and \( \lambda_{m} \). However, at low SNR (\( SNR_{p} \) < \( SNR_{c} \)), the optimal threshold condition is not satisfied as is illustrated in Fig. 5 since in this region (\( \lambda_{f} > \lambda_{m} \)). Further, the variations in sensing performance parameters (\( P_{f } \), \( P_{d} \), \( P_{e} \)) with \( SNR_{p} \) for CFAR, CDR and MEP approaches are presented in Fig. 6.

Fig. 5
figure 5

The variation of threshold value with \( {\text{SNR}}_{\text{p}} \) for CFAR, CDR and MEP approaches at N = 15,000

Fig. 6
figure 6

Sensing performance parameters (\( {\text{P}}_{\text{f }} \), \( {\text{P}}_{\text{d }} {\text{P}}_{\text{e }} \)) variation with \( {\text{SNR}}_{\text{p}} \) for CFAR, CDR and MEP approaches at N = 15,000

In CFAR approach, the \( P_{f } \) value is constant (0.1) at every value of \( SNR_{p} \), while the value of \( P_{d } \) is less (< 0.9) for \( SNR_{p} \le SNR_{c} \) and increases until \( SNR_{p} \) becomes equal to \( SNR_{c} \). In CDR approach, the \( P_{d } \) value is constant (0.9) for all values of \( SNR_{p} \), while the value of \( P_{f } \) is high (> 0.1) for \( SNR_{p} \le SNR_{c} \). Also, it is clear from Fig. 6 that the probability of error (\( P_{e} \)) is approximately same in CFAR and CDR approaches. Moreover, with MEP approach there has been an improvement in terms of probability of error (\( P_{e } \)) with respect to CFAR and CDR approach for all \( SNR_{p} \). However, in MEP approach, we have not achieved the desired value of \( P_{f} \) and \( P_{d} \) simultaneously for \( SNR_{p} \le SNR_{c} \). It is illustrated from the Fig. 6 that the error probability (\( P_{e} \)) decreases with \( SNR_{p} \) for all approaches and threshold selection with MEP approach provides least sensing error \( (P_{e} ) \).

Therefore, any approach among CFAR, CDR and MEP does not satisfy the sensing requirements of CR (\( P_{f} \) < 0.1 and \( P_{d} \) > 0.9), simultaneously at \( SNR_{p} \le SNR_{c} \). Further the variation in the achievable throughputs of CU with \( SNR_{p} \), for CFAR, CDR and MEP approaches with fixed number of samples (N = 15,000) are presented in Fig. 7. It is clear from Fig. 7 that in CFAR approach, the throughput value decreases with \( SNR_{p} \) from 5.812 to 4.674 bps/Hz and afterwards become constant. While in CDR and MEP approach, the throughput increases from 0.7684 bps/Hz and 3.414 bps/Hz to 5.319 bps/Hz and 5.194 bps/Hz, respectively and thereafter remains constant. It is observed that when the \( SNR_{p} \le SNR_{c} \), throughput is more for CFAR approach, however its value is high with CDR approach for \( SNR_{p} > SNR_{c} \). Further, to achieve the optimal threshold condition at \( SNR_{p} < SNR_{c} \), we have proposed an approach in Sect. 4 to outcome the optimal number of samples (N*) to get desired value of \( P_{f } \) and \( P_{d } \), simultaneously. In this context, the performance of sensing parameters (\( P_{f} \), \( P_{m} \)) with SNRp for the proposed approach is compared with [32] and presented in Fig. 8. In the proposed approach, we have achieved both targeted values of \( P_{f} \) = 0.1 and \( P_{d} \) = 0.9, simultaneously when \( SNR_{p} \le SNR_{c} \). While in [32], authors have fixed one of the sensing parameter (either \( P_{f} \) or \( P_{d} \)) and have tried to improve the other (\( P_{d} \) or \( P_{f} \)), as is illustrated in Fig. 8.

Fig. 7
figure 7

Throughput variation of CU with \( {\text{SNR}}_{\text{p}} \) for CFAR, CDR and MEP approaches at N = 15,000

Fig. 8
figure 8

Sensing performance parameters (\( {\text{P}}_{\text{f }} \), \( {\text{P}}_{\text{d }} \)) variation with \( {\text{SNR}}_{\text{p}} \)

However, the required sensing performance improvement was not achieved in [32] when \( SNR_{p} \le SNR_{c} \). Moreover, the comparison of throughput variation with \( SNR_{p} \) for a fixed number of samples (FNS) and an optimal number of samples (ONS) using CFAR, CDR and MEP approaches are presented in Fig. 9.

Fig. 9
figure 9

Variation of throughput with \( {\text{SNR}}_{\text{p}} \) for the fixed and optimal number of samples (ONS) for CFAR, CDR and MEP approach

There are four possible cases as: (a) Case-1\( SNR_{p} \) < \( SNR_{c} \) and fixed numbers of samples (FNS) are considered, the throughput in this case is high with CFAR approach. (b) Case-2\( SNR_{p} \) < \( SNR_{c} \) and optimal number of samples (ONS) are considered, the throughput is nearly same for CFAR, CDR, and MEP approaches however less than the achieved throughput of Case 1. (c) Case-3\( SNR_{p} \) ≥ \( SNR_{c} \) and fixed number of samples (FNS) are considered, the throughput is highest and remains almost constant with CDR approach. (d) Case-4\( SNR_{p} \) ≥ \( SNR_{c} \) and optimal number of samples (ONS) are considered, the throughput is highest with MEP approach in comparison to CFAR and CDR, however lesser than the throughput achieved as in Case 3. The advantage of Case-2 (i.e. the use of ONS for \( SNR_{p} \) < \( SNR_{c} \)) is that we have achieved the target value of false and detection probability at the cost of reduced throughput, while the merit of Case-3 (use of FNS for \( SNR_{p} \) ≥ \( SNR_{c} \)) is that we have achieved higher throughput. Therefore, in our proposed approach, we have combined the benefits of ONS for \( SNR_{p} \) < \( SNR_{c} \) and FNS for \( SNR_{p} \) ≥ \( SNR_{c} \) and have improved the throughput performance as shown in Fig. 10. The throughput in proposed approach nearly remains constant with decreasing \( SNR_{p} \) in the region of \( SNR_{p} \le SNR_{c} \) as shown in Fig. 10. Moreover, the throughput for the proposed approach where we have adapted the number of samples according to \( SNR_{p} \) (ONS for \( SNR_{p} \) < \( SNR_{c} \) and FNS for \( SNR_{p} \) ≥ \( SNR_{c} \)), is presented in Fig. 10 and compared with [32].

Fig. 10
figure 10

Throughput variation with \( {\text{SNR}}_{\text{p}} \) for the proposed approach

It is illustrated in Fig. 10 that the proposed approach has provided significantly improved performance in comparison to that of the CDR at \( SNR_{p} \) < \( SNR_{c} \). The proposed approach has shown approximately 24.63% improved throughput when compared with CDR at \( SNR_{p} \) equals to − 18 dB (near to \( SNR_{c} \)). Since the throughput is decreasing with decrease in \( SNR_{p} \) in the CDR approach as is illustrated in Fig. 10, therefore the percentage enhancement in the throughput for the proposed approach is significantly more with respect to CDR approach with reduction in \( SNR_{p} \).However, CFAR throughput has outperformed with the proposed method at the cost of lower protection to PU due to lower detection probability which is earlier shown in Fig. 8. Further, all the above simulation results for different threshold selection approaches are compared in Table 3.

Table 3 The comparison table of the simulation results

6 Conclusion and future scope

In this paper, we have exploited the threshold computation using CFAR, CDR and MEP approaches. We have analyzed the optimality condition for threshold and selected the appropriate threshold which has been achieved with the anticipated values of \( P_{f} \) and \( P_{d} \), simultaneously. Further, the computation of \( SNR_{p} \) as a critical SNR (\( SNR_{c} \)) below which the optimality condition is not satisfied, has been performed. Moreover, we have proposed an approach in order to satisfy the optimality condition even though at low SNR (\( SNR_{p} \) < \( SNR_{c} \)) and have computed the throughput for the proposed approach. It has been perceived that at low SNR, the throughput for proposed approach is higher than CDR and MEP approaches however, less than that of CFAR approach. Moreover, the throughputs achieved using CDR, CFAR and MEP approaches are not satisfying the desired \( P_{f} \) and \( P_{d} \) values when compared with the proposed approach.

Hence, in this proposed approach, we have achieved the maximum throughput while achieving the desired \( P_{f} \) and \( P_{d} \) simultaneously at all \( SNR_{p} \). The proposed approach has shown approximately 24.63% improved throughput when compared with CDR at \( SNR_{p} \) equals to − 18 dB (near to \( SNR_{c} \)). However, in this paper, we have not considered the noise uncertainty of the channel while checking the optimality condition for threshold that is a challenging task which will be reported in the future communication. Moreover, the multiband spectrum sensing in the proposed approach can also be considered when PU changes its state during the sensing period.