1 Introduction

Due to improvement in wireless communication technology, the wireless applications, services and equipments are increasing day by day, this necessitated an increased demand of the spectrum [14]. However, accommodating all these increasing wireless communication equipments and the high data rate applications within the limited availability of the spectrum is a challenging task, so this causes the problem of spectrum scarcity [4, 5]. The existing fixed allocation policies of the spectrum further ignite the problem of spectrum scarcity [69]. The analysis and measurements performed by the federal communications commission (FCC) revealed that the allocated spectrum in major portion of the world is underutilized in frequency, time and space domains [8, 10], this fact resulted in the evolution of CR.

Under the concept of CR the unlicensed users are allowed to utilize the unutilized portion of the licensed spectrum while following the constraint to not disturb the QoS of the licensed users [3, 4, 1114]. In the CR system, the unlicensed and licensed users are generally known as secondary user (SU) and primary user (PU), respectively [4, 5, 11]. The only objective of the CR system is to improve the utilization of the underutilized licensed spectrum while promising a sufficient QoS required by the PUs [3, 4]. To furnish this objective, the process of spectrum sensing is of high importance [4, 7, 8, 15]. There are many spectrum sensing techniques such as, energy detection [3, 4, 7, 11, 16], matched filter detection [17], cyclostationary feature detection [13] and others [18]. However, unlike to the feature detection techniques (like, matched filter detection and cyclostationary feature detection etc.) the energy detection is the simplest technique which can work independently without having any prior knowledge of the characteristics of the primary signal [4, 79]. Under the energy detection scheme of spectrum sensing, the performance of CR highly depends on the threshold selected, so, proper selection of it is an important issue [4, 7, 11]. The selection of threshold is mainly made either under the CDR or CFAR principle [11, 1921]. Under the CDR principle, the CR aims to decrease its false alarm probability P fa (or improve its throughput) with a constraint to maintain P d to a target value of \(\overline{{P_{d} }}\). In the same manner, under CFAR principle, the CR operates with an aim to improve QoS of the PU while following the constraints of maintaining its probability of false alarm P fa to a target \(\overline{{P_{fa} }}\). From the perspective of SU, in order to improve its achievable throughput, the CFAR principle is most suited, but, to ensure sufficient protection to the licensed users, the CDR principle is more suitable compared to the CFAR principle [4, 19, 20]. So, depending upon the set preferences of whether to ensure high protection to the licensed users or to improve throughput of the unlicensed users, the threshold is selected accordingly. However, in some of their research work the researchers have considered a static threshold selected independent of the CFAR or CDR principles [21, 22]. In [23], while considering the non-Gaussian noise scenario, the authors worked with an aim to decrease its \(\overline{{P_{fa} }}\) while maintaining P d to a value \(\overline{{P_{d} }}\). In [24, 25], the authors aim to improve the throughput of the CR system while exploiting the licensed spectrum using the spectrum sharing scheme of spectrum access. The sensing-throughput tradeoff problem under a given detection probability constraint of \(\overline{{P_{d} }}\) was formulated, studied and analyzed by Liang et al. in [3, 4]. The authors in [26] further analyzed the problem of sensing-throughput tradeoff under the cooperation of more than one CR user. The Authors in [69, 12] while working under the CDR principle proposed a decoder structure using which the CR system overcomes the tradeoff between the spectrum sensing and the data transmission durations. In [27, 28], the researchers proposed a precaution is better than the cure (PBC) approach which while using the cooperation from neighboring PUs, capable the CR user to overcome the ill effects caused due to the problem of hidden terminal, multipath fading and the shadowing effects of the wireless communication channel. The proposed PBC approach brilliantly improves the CR throughput while promising a target level of protection \(\overline{{P_{d} }}\) to the PU system. Under the cooperation of n – out – of – k CRs, the optimization of threshold to minimize the total error rate (sum of the false alarm and the missed detection probabilities) was performed in [29]. In this work we first analyze that, the CR system blindly using the CDR principle leads to the overprotection of licensed users, mainly in the situation when the SU is located at a large distance from the licensed user where possibilities to get interference are negligible. Such an overprotective nature of CDR principle causes undesirable loss to the achieved throughput of the secondary system even under the most favorable spectrum reuse conditions.

This article exploits the fact that, as the PU is located close to the SU, the chances of interference to it are high, so protection of PU must be the main concern, in such a scenario, the threshold selection based on the CDR principle ensures the sufficient protection required. However, in practice, when the SU is located far away from the PU, then, even for the case of missed detection the SU may operate without causing any harmful interference to the PU, so, this situation can be harnessed to improve the licensed spectrum utilization. In this article, using this fact, we propose opportunistic selection of threshold (with the opportunistic use of CDR and CFAR principles) based on the distance d of licensed user from the sensing node.

To claim this opportunistic use, under the given conditions,Footnote 1 we first formulate the critical distance d c of the sensing node from the primary transmitter where probability of detection P d under the CDR and the CFAR principle equals. Then, based on d c , the selection of threshold is made using the CDR and the CFAR principles, opportunistically. When the distance of sensing node from the PU is less than or equal to the critical distance (d ≤ d c ), then, to take advantages of the high SNR value and simultaneously ensure a sufficient protection required by the PUs, the threshold is selected based on the CDR principle, otherwise, the CFAR principle is exploited (explained in Sect. 4). Under the proposed approach, the CR system harnesses the advantages of both, the CFAR and the CDR principles to opportunistically improve its achievable throughput.

The article is organized as follows: Sect. 2 presents an overview of the energy detection scheme. Section 3 studies the cognitive system when the CDR principle is used blindly. Section 4 formulates the critical distance d c using which the selection of threshold is proposed. Section 5 presents the simulation results, and the conclusions are drawn in Sect. 6.

2 Energy Detection Scheme of Spectrum Sensing

In the CR system operating under the energy detection scheme of spectrum sensing, the busy and idle status of the concerned band are represented by the hypothesis H 1 and H 0, respectively, as follows [3, 4, 79]:

$$H_{1} : y\left( n \right) = s\left( n \right) + u\left( n \right)$$
(1)
$$H_{0} : y\left( n \right) = u\left( n \right)$$
(2)

where, u(n) and s(n) denote the noise and the primary signals, respectively. The signals s(n) and u(n) are considered to be independent and identically distributed random variables each with a mean value of zero and having variances of σ 2 p and σ 2 u , respectively. y(n) denotes the total signal received by the node involved in sensing.

The test statistic under the scheme of energy detection is given by [3, 4, 79]:

$$\zeta\left( y \right) = \frac{1}{N}\mathop \sum \limits_{n = 1}^{N} \left| {y\left( n \right)} \right|^{2}$$
(3)

where, N represents the total number of samples and is denoted by N = τf s , τ represents the duration for which sensing was performed (Fig. 1) and f s the bandwidth of the concerned band. Under a given threshold λ, the probabilities of detection P d and false alarm P fa are formulated as [3, 4]:

$$P_{d} = Pr\left( {\zeta\left( y \right) > \lambda |H_{1} } \right) = \int_{\lambda }^{\infty } {p_{1} \left( x \right)dx}$$
(4)
$$P_{fa} = Pr\left( {\zeta\left( y \right) > \lambda |H_{0} } \right) = \int_{\lambda }^{\infty } {p_{0} \left( x \right)dx}$$
(5)

where, p 1(x) and p 0(x) are the probability density function (PDF) corresponding to the hypothesis H 1 and H 0, respectively.

Fig. 1
figure 1

The frame structure for spectrum access. SS and DT denote the sensing and data transmission durations, respectively

In a circularly symmetric complex Gaussian (CSCG) noise and phase shift keying primary signal scenario, the expressions of P d and P fa are given by [3, 4, 7, 8, 12]:

$$P_{d} = Q\left( {\left( {\frac{\lambda }{{\sigma_{u}^{2} }} - SNR_{p} - 1} \right)\sqrt {\frac{N}{{2SNR_{p} + 1}}} } \right)$$
(6)
$$P_{fa} = Q \left( {\left( {\frac{\lambda }{{\sigma_{u}^{2} }} - 1} \right)\sqrt N } \right)$$
(7)

where, Q(·) denotes the Q function represented as [4]:

$$Q\left( x \right) = \frac{1}{{\sqrt {2\pi } }}\mathop \int \limits_{x}^{\infty } { \exp }\left( { - \frac{{t^{2} }}{2}} \right)dt$$
(8)

and SNR P , the SNR of primary signal received at the sensing node and is presented as:

$$SNR_{p} = \frac{{P_{p} }}{noise\,power} = \frac{{\sigma_{p}^{2} }}{{\sigma_{u}^{2} }}$$
(9)

P p (=σ 2 p ) represents the power of primary received signal. A low P fa results in the efficient utilization of the licensed spectrum while a high P d promises the better protection of PU. So, for an efficient CR system, the values of P fa and P d should be low and high, respectively [4, 6, 7, 9, 12]. It can be noticed from Eqs. (6) and (7) that, under the given values of σ 2 u , SNR p and N, the P d and P fa have a tradeoff with threshold λ. So, selection of λ plays a crucial role in evaluating the performance of CR system [4, 1921].

Under the CDR principle, from Eqs. (6) and (7), for a given \(\overline{{P_{d} }}\), the values of λ (=λ d ) and \(P_{fa} \,({=}{{P_{fa,CDR}}})\) are given by:

$$\lambda_{d} = \sigma_{u}^{2} \left( {\left( {Q^{ - 1} \left( {\overline{{P_{d} }} } \right) \cdot \sqrt {\frac{{2SNR_{p} + 1}}{N}} } \right) + SNR_{p} + 1} \right)$$
(10)

and

$$P_{fa,CDR} = Q \left( {\left( {\frac{{\lambda_{d} }}{{\sigma_{u}^{2} }} - 1} \right)\sqrt N } \right)$$
(11)

similarly, under the CFAR principle, from Eqs. (6) and (7), for a given \(\overline{{P_{fa} }}\), the values of \(\lambda \,({=}{{\lambda_{fa} }})\)and \(P_{d} \,({=}{{P_{d,CFAR}}})\) are given by:

$$\lambda_{fa} = \sigma_{u}^{2} \left( {\frac{1}{\sqrt N }Q^{ - 1} \left( {\overline{{P_{fa} }} } \right) + 1} \right)$$
(12)

and

$$P_{d,CFAR} = Q\left( {\left( {\frac{{\lambda_{fa} }}{{\sigma_{u}^{2} }} - SNR_{p} - 1} \right)\sqrt {\frac{N}{{2SNR_{p} + 1}}} } \right)$$
(13)

3 The CR System Based on the CDR Principle

The CR user with the use of frame structure of Fig. 1 first performs the sensing on the concerned band for τ units of time and then based on the sensed status (busy/idle), the final decision on data transmission is taken. After detecting the band as idle, it is accessed for the T units of time, but for the reverse case, a fresh search to find a new idle band is initiated. The transmission rates for the CR system are given by [4, 69]:

$$C_{00} = \log_{2} \left( {1 + \frac{{P_{s} }}{{\sigma_{u}^{2} }}} \right) = \log_{2} \left( {1 + SNR_{s} } \right)$$
(14)
$$C_{01} = \log_{2} \left( {1 + \frac{{P_{s} }}{{\sigma_{u}^{2} + P_{P} }}} \right) = \log_{2} \left( {1 + \frac{{SNR_{s} }}{{1 + SNR_{p} }}} \right)$$
(15)

where, C 00 and C 01 denote the transmission rates corresponding to the case of probability of no-false alarm (i.e. 1 − P fa ) and missed detection (i.e. 1 − P d ), respectively. P s and SNR s represent the power and SNR of the secondary signal at its receiving section. Using Eqs. (10), (11), (14) and (15), the throughput of CR under the CDR principle can be expressed as:

$$C = \left( {\frac{T - \tau }{T}} \right)\left\{ {P\left( {H_{0} } \right)\left( {1 - P_{fa,CDR} } \right)C_{00} + P\left( {H_{1} } \right)\left( {1 - \overline{{P_{d} }} } \right)C_{01} } \right\}$$
(16)

where, P(H 0) and P(H 1) denote the probabilities with which the band of interest is actually idle and busy, respectively.

Now, based on some mathematical analysis and simulation results (assumed parameters are given in Sect. 5), we present some of the facts which show inefficiency of the CR system when CDR principle is used blindly.

Fact 1

From Eq. (10), under the given values of N and σ 2 u , when the SNR of PU received at the sensing node (SNR p ) decreases, then, in order to maintain P d to a target \(\overline{{P_{d} }}\), the threshold λ d decreases, and vice versa.

The signal energy from the primary transmitter received by the sensing node located at a distance d apart can be modeled as [30]:

$$P_{p} = P_{t} \cdot K\left[ {\frac{{d_{0} }}{d}} \right]^{r}$$
(17)

where, P t , d 0, d, r and K denote the transmitted signal power of PU, the reference distance, the distance of primary transmitter from the sensing node, the path loss exponent, and a constant depending upon the characteristics of antenna and the free space path loss up to a reference distance of d 0. From Eqs. (9) and (17), the SNR p can be re-written as:

$$SNR_{p} = \frac{1}{{\sigma_{u}^{2} }}P_{t} \cdot K\left[ {\frac{{d_{0} }}{d}} \right]^{r}$$
(18)

using Eq. (18), the Fact 2 can be deduced as:

Fact 2

Under the given values of parameters r, K, σ 2 u and P t , the SNR of primary signal received at the sensing node varies in inverse to its distance d. In other words, farther the sensing node is from the PU, the smaller is the SNR p received and vice versa. The variations of SNR p with the distance d between the PU and the sensing node for various values of transmission power of PU are shown through the graph in Fig. 2.

Fig. 2
figure 2

The variations in SNR p with the distance d of primary transmitter from the sensing node

From Eqs. (10) and (11), the false alarm probability P fa in terms of \(\overline{{P_{d} }}\) can be written as:

$$P_{fa,CDR} = Q\left( {\left( {\sqrt {2 \cdot SNR_{p} + 1} } \right)Q^{ - 1} \left( {\overline{{P_{d} }} } \right) + SNR_{p} \cdot \sqrt N } \right)$$
(19)

using Eq. (19), the Fact 3 can be deduced as follows:

Fact 3

Under the CDR principle, for a given number of samples N, as SNR p decreases, the P fa,CDR increases and vice versa. The variations of P fa with SNR p for various values of target detection probability \(\overline{{P_{d} }}\) are shown through the graph in Fig. 3.

Fig. 3
figure 3

The variation of the probability of false alarm (under CDR principle) with the SNR p values

From Eqs. (18) and (19) as well as from Facts 2 and 3, the variations in probability of false alarm with the distance d can be related through the Fact 4, as follows:

Fact 4

Under the CDR principle, with the increase in distance d of PU from the sensing node, the probability of false alarm increases after a certain distance,Footnote 2 and vice versa. The variations of P fa with the distance d between the primary transmitter and the sensing node for various values of path loss exponent r are depicted through the graph in Fig. 4.

Fig. 4
figure 4

The plot showing the variations in probability of false alarm P fa with the distance d of PU from the sensing node

Since, an increase in the value of P fa reduces the chance to utilize the licensed spectrum, so, with the increase in P fa,CDR the achievable throughput of SU decreases [also evident from Eq. (16)] and vice versa.

The variation of CR throughput with the distance d of primary transmitter from the sensing node is shown through the simulation graph in Fig. 5. Based on the above facts and analysis we argue that, when licensed user is adequately far away from the sensing node where concerned band can be reused with high confidence, the CR system blindly following the CDR principle turns out to be over-protective which causes an undesirable degradation to the achieved throughput of the licensed users.

Fig. 5
figure 5

The plot of achievable throughput of SU vs distance d of PU from the sensing node

4 Proposed Opportunistic Selection of Threshold

This section proposes selection of threshold based on the opportunistic use of CDR and CFAR principles. From Eqs. (10) and (12), for a particular value of λ (i.e. λ d  = λ fa ), the number of samples N can be written as:

$$N = \frac{1}{{SNR_{p}^{2} }}\left( {Q^{ - 1} \left( {\overline{{P_{fa} }} } \right) - Q^{ - 1} \left( {\overline{{P_{d} }} } \right)\sqrt {\left( {2 \cdot SNR_{p} + 1} \right)} } \right)^{2}$$
(20)

from Eq. (20), for low values of SNR p assuming (2·SNR p  + 1) ≈ 1, the value of N reduces to:

$$N = \frac{1}{{SNR_{p}^{2} }}\left( {Q^{ - 1} \left( {\overline{{P_{fa} }} } \right) - Q^{ - 1} \left( {\overline{{P_{d} }} } \right)} \right)^{2}$$
(21)

using Eq. (21), the critical value of SNR p (i.e. SNR c ) where CR throughput for both CDR and CFAR principle equals is given by:

$$SNR_{c} = \left( {\frac{{Q^{ - 1} \left( {\overline{{P_{fa} }} } \right) - Q^{ - 1} \left( {\overline{{P_{d} }} } \right)}}{\sqrt N }} \right)$$
(22)

The formulated critical SNR (i.e. SNR c ) in (22) matches to Eq. (11) of a very basic article in [31], and is also depicted through the simulation graph in Fig. 6. The fading in the primary transmitted signal with respect to distance is shown through the relation in (17).

Fig. 6
figure 6

The Achievable throughput curves under the CDR and CFAR principle. The crossing point of the curve marks the critical SNR (\(i.e. SNR_{c}\)) point

For simplicity and proper evaluation of the proposed approach, the effects of hidden terminal problem are neglected at the sensing node.

From Eqs. (18) and (22), the critical distance d c of primary transmitter from the sensing node where SNR p  = SNR c is given by:

$$d_{c} = d_{0} \left[ {\frac{{\sigma_{u}^{2} \cdot SNR_{c} }}{{P_{t} K}}} \right]^{{ - \frac{1}{r}}}$$
(23)

the computed critical distance d c is also shown with the help of Fig. 7. The point on the x-axis where both the graphs corresponding to CDR and CFAR principles meet, marks d c . Based on the formulated d c , the opportunistic selection of threshold with the help of flowchart in Fig. 8 can be explained as follows: When the distanceFootnote 3 of sensing node from the primary transmitter is less than or equal to the critical distance (d ≤ d c ), then, in order to promise sufficient QoS to the PUs and simultaneously take advantages of the high SNR p regime, the CDR principle is used. While in the low SNR p regime (or d > d c ), to avoid the inefficiency of the CDR principle, the CFAR principle is exploited to maximum utilize the licensed spectrum.

Fig. 7
figure 7

The achievable throughput curves under the CDR and CFAR principles. The crossing point of the curve marks the critical distance (d c ) point

Fig. 8
figure 8

The flowchart showing implementation of the proposed approach

For the IEEE802.22 WRAN system, in low SNR regime, for instance, SNR p  = −20 dB, the required detection probability is P d  = 0.9 (in [4], p. 1329). In the proposed system, for each and every value of P fa , at the critical SNR c point of −20 dB, the achieved detection probability under the CFAR principle is above the target value of 0.9 (depicted in Fig. 9), which is much large compared to WRAN system (in [4], p. 1329). It is also seen from the graph in Fig. 9 that, as the value of target P fa increases, the achieved value of P d increases. This further shows that, as per the operational requirements and the designed regulation policies, the value of \(\overline{{P_{fa} }}\) can be set accordingly to obtain the desired values of P d , this further increases the flexibility of the proposed approach.

Fig. 9
figure 9

Analysis of P d with SNR p under various values of P fa

5 The Simulation Results

The following are the assumed parameters: The band of interest =6 MHz, the probability with which the concerned band is actually idle P(H 0) = 0.7, the sensing duration τ = 14.2 ms, the frame duration T = 100 ms, P t  = 1 W, r = 4, the reference distance d 0 = 10 m, and the gains of the receiving and transmitting antennas are unity. The Graph in Fig. 10 compares the performance of CR system under the proposed approach and to the approach where CDR principle is used blindly. It is shown that, as the distance between the PU and the sensing node increases (mainly, beyond the critical distance), the proposed CR system exploits this fact to improve the throughput of the CR system, while under the blind use of CDR principle the CR system fails to do so and misses the best spectrum utilization opportunities.

Fig. 10
figure 10

Throughput of CR system under the proposed and blind use of CDR principle

The graph in Fig. 11 plots achievable throughput with the distance d under various values of \(\overline{{P_{fa} }}\). The graph shows that: under the given policies, based on the operational requirements of the CR system the values of \(\overline{{P_{fa} }}\) can be set. It is shown that, beyond a critical distance, as the PU moves away from the sensing node, the proposed CR system exploits this fact and improves the achievable throughput. Low values of \(\overline{{P_{fa} }}\) results into decrease of the critical distance and increase in the achievable throughput which again shows that, low value of critical distance produces high opportunities for the spectrum reuse.

Fig. 11
figure 11

Achievable throughput of CR system under the various values of \(\overline{{P_{fa} }}\)

The graph in Fig. 12 plots the CR throughput with the distance d under various values of the path loss exponent r. It is shown that, with the increase in values of r, the path loss of channel between the PU and the sensing node increases which improve the chances for efficient utilization of the licensed spectrum. The proposed approach utilizes this fact to improve the CR throughput, while under the CDR principle the CR misses to do so.

Fig. 12
figure 12

The graph of CR-throughput with the various values of path loss exponent r

6 Conclusion

This article argues against the efficiency of CR system under the blind use of CDR principle, mainly, when the licensed user is located at a large distance from the sensing node where chances of interference are negligible. To overcome the throughput degradation of the SUs, we propose an approach which based on the distance of primary transmitter from the sensing node allows CR system to opportunistically exploit the advantages of the CDR and CFAR principles to improve its achievable throughput. The achieved results show that, the reusability of the spectrum increases when the path loss between the sensing node and the licensed user increases. The CR system under the proposed approach efficiently utilizes this spectrum reuse opportunity to obtain a significant gain in its achievable throughput, while, under the blind use of CDR principle it misses to do so. In future work, to model the effects of noise uncertainties we plan to extend this work to the approach of double threshold.