1 Introduction

Intelligent channel sensing forms the crucial technique towards the advancement of cognitive radio technology. Cognitive radios employment on proficient sensing algorithms to find the white spaces in the primary (licensed) user band and utilize them to transmit their own data [1]. This paper focuses on the different detection techniques which can be used to identify the unused spectrum holes. The identification and assignment of the unused spectrum holes to the secondary users are very important factor of the CR scenarios. In order to keep the primary users (PUs) from the undeserved interference the detection technique must work for low SNR in CR scenarios. Therefore, the prime objective is to propose detection algorithms which can perform well at low SNR with avoiding interference to the PUs. Different existing spectrum sensing (SS) algorithms for the detection of spectrum hole have been come up with their own advantages and limitations in context to CR applications. Most of the methods are based on energy detection (ED) methods are described in [2], matched filtering method in [3], feature detection algorithms discussed in [4] and eigenvalue-based detection for spectrum sensing discussed [5]. An evaluation of various spectrum sensing methodologies for Cognitive Radio are demonstrated in [6]. An exceptional range detecting execution can be achieved by feature detection algorithms with exploiting some known characteristics of the primary user (PU) signals. However, it requires long time for detecting. Moreover, Matched Filtering is accepted to perform at its best with high handling pick up at the imperative of knowing the flag properties of primary users (PU) [7]. In a existent circumstances, the PU signal information may not be available and if the information available, matched filtering along with feature detection algorithms would require a explicit performance of the SS unit for each PU signal to be detected in CR scenario. Another important sensing algorithm in CR applications is the energy detector (ED) method, which compares between the two parameters i.e., received signal energy and noise variance. The performance of ED for spectrum sensing for both fading (wireless) and non-fading (wired) channels have been evaluated. Numerous works related to ED spectrum sensing have been included in [8,9,10,11, 20]. It gives a details information of the noise power of the received signal, which is required to design the exact threshold. In this scenario, ED can work randomly for small values of false alarm probability (Pf) and probability of misdetection (Pm) for low SNR environment [12, 13]. Noise uncertainty is one of the basic issues in spectrum sensing which comes for the unpredictability and variation of the noise level. So a hybrid spectrum sensing algorithm have been proposed for the reduction of noise variance which is depends on the combination of both ED method and feature detection techniques [14, 15].

In this paper we study the sensing performance of energy detection algorithm in cognitive radio by considering the relationship between probability of detection vs. probability of false alarm, SNR vs. probability of detection and we observed that the improvement of energy detector performance is based on increasing the values of SNR and by increasing the number of sample points even at lower SNR values. We also reduce the probability of detection error by maximizing the probability of detection and minimizing the probability of false alarm [21].

The rest of the paper is organized as follows: in Sect. 2 different spectrum techniques are given and in Sect. 3 the ED method is discussed in detail. Simulation results of spectrum sensing techniques are discussed in Sect. 4. Probability of detecting the error is discussed in Sect. 5. Finally conclusion is given in Sect. 6.

2 Spectrum sensing techniques

Spectrum sensing is characterized as “the assignment of discovering spectrum holes by detecting the radio range in the nearby neighborhood of the cognitive radio recipient in an unsupervised way” [16, 17]. So the detection of spectrum holes in spectrum sensing (SS) is very essential for CR. Without creating interference to PU’s CR can evaluate the data in regards to its working environment and it perceives the unused spectrum and offers it to Secondary Users (SUs) for transmission. The conceivable issues with SS are multi-path fading, shadowing and receiver uncertainty issues. The classification of SS methods are given as below [18]:

  1. 1.

    Transmitter detection: the transmitter detection methods are again categorized as;

  2. i.

    Energy detection (ED).

  3. ii.

    Matched filter (MF) detection.

  4. iii.

    Cyclostationary detection.

  5. 2.

    Interference based detection.

  6. 3.

    Cooperative detection.

From the comprehensive learning of the spectrum sensing techniques and taking into account of some parameters, it can be obviously observed that energy detection has low cost, short time, no prior knowledge and less complexity. Due to the criteria based on threshold selection and stability of noise, its performance and accuracy is low compared to matched filter techniques. However the Cyclostationary analysis has somewhat better performance and higher accuracy than energy detection techniques but it requires high cost, larger time and fractional prior knowledge that reduced its complexity rather than matched filter. Therefore, each technique has some merits and demerits. Hence, it is required to search an optimum technique which might have good efficiency and less complexity and is able to adapt its function to suit prevailing conditions. The ED method is discussed in the nest section in detail.

3 Energy detector (ED)

ED is one of the most simplicity technique in spectrum sensing and its low signal processing demands are the positive aspects. The received signal \(r_{o} \left( n \right)\) at CR receiver is given by:

$$r_{o} \left( n \right) = \left\{ {\begin{array}{ll} {w_{i} \left( n \right) {\text{H}}_{0} } \\ {x_{i} \left( n \right) + w_{i} \left( n \right) {\text{H}}_{1} } \\ \end{array} } \right.$$
(1)

where \(x_{i} \left( n \right)\) is the PU signal and \(w_{i} \left( n \right)\) is the Additive White Gaussian Noise (AWGN). The main goal of the spectrum sensing is to choose about the accessibility of a frequency band for communication avoiding any interference. The problem of detection can be formulated as a binary hypothetical testing between the mutually exclusive hypotheses \(H_{0 }\) and \(H_{1}\).

  • \({\text{H}}_{0}\) (Absence of primary signal).

  • \({\text{H}}_{1}\) (Presence of primary signal).

The cognitive radio can access to communicate at the point when the recognized signal is considered as noisy signal. There are two different wrong decisions:

A. Probability of miss detection (\(P_{m}\)): At high threshold value, the presence of PU signal can not be identified by the detection device although the PU signal is present. This is known as miss detection and the probability associated to it is denoted as (\(P_{m}\)) [19]. Due to this miss detection the SU tries to utilize that channel of the PU which leads to interference. The likelihood of misdetection is characterized as:

$$P_{m} = P\left( {H_{0} |H_{1} } \right) = 1 - P_{d}$$
(2)

B. Probability of false alarm (\(P_{f}\)): at very low threshold value, the presence of PU signal is detected by the detection device in the absence of PU signal. This known as false alarm and the probability associated to is denoted as (\(P_{f}\)) [20]. In view of this wrong choice the SU not ready to utilize the channel which leads to the under utilization of spectrum. The likelihood of false alarm is characterized as:

$$P_{f} = P\left( {H_{1} |H_{0} } \right)$$
(3)

or an optimum detector, it is required to reduce both \(P_{m}\) and \(P_{f}\). Let \(D\) be the decision test statistic defined by ED to distinguish between the two mutually exclusive hypothesis \(H_{0 }\) and \(H_{1}\). It can be formulated as:

$$D\left( r \right) = \frac{1}{{N_{s} }}\sum\limits_{n = 1}^{{N_{s} }} {\left| {r_{o} \left( n \right)} \right|^{2} }$$
(4)

where \(N_{s} = \tau f_{s}\) represents the number of samples which is exists in the received signal. τ and \(f_{s}\) is denoted as existing sensing time and sampling frequency respectively. The block diagram of the spectrum sensing by using ED method is depicted in Fig. 1.

Fig. 1
figure 1

Energy detector (ED) block diagram

The detector compute the test measurement and looks at it against a pre-characterized threshold \(T_{th}\), if \(D > T_{th}\) it decides for \(H_{1}\), otherwise \(H_{0}\). Generally, the probability of detection and probability of false alarm is dependent on the value of \(T_{th}\) which is defined as follows:

$$P_{d} = P\left( {D > T_{th} |H_{1} } \right); \, P_{f} = P\left( {D > T_{th} |H_{0} } \right)$$
(5)

\(P_{f}\) and \(P_{d}\) are the two important quantities for cognitive radio network. For maximize the spectrum exploitation and to minimize the interference \(P_{f}\) and \(P_{d}\) must be chosen low and high respectively. Practically we can compute the decision threshold with the help of target false alarm probabilities. In ED technique, the relationship between \(P_{d}\) and threshold is expressed by:

$$P_{d} \left( {\emptyset ,\tau } \right) = Q\left( {\left( {\frac{\varphi }{{\sigma_{\omega }^{2} }} - \gamma - 1} \right)\sqrt {\frac{{\tau f_{s} }}{2\gamma + 1}} } \right)$$
(6)
$$\Rightarrow Q^{ - 1} \left( {P_{d} } \right) = \left( {\left( {\frac{\varphi }{{\sigma_{\omega }^{2} }} - \gamma - 1} \right)\sqrt {\frac{{\tau f_{s} }}{2\gamma + 1}} } \right)$$
(7)

where, \(\gamma\) is SNR i.e., \(\gamma = \frac{{\sigma_{x}^{2} }}{{\sigma_{\omega }^{2} }}\), \(\emptyset\) is the detection threshold and \(\sigma_{x}^{2}\), \(\sigma_{\omega }^{2}\) are the variances of the primary signal \(x_{i} \left( n \right)\) and noise \(w_{i} \left( n \right)\) respectively. The Q function, \(Q\left( . \right)\) is defined as:

$$Q\left( m \right) = \frac{1}{{\sqrt {2\pi } }}\mathop \int \limits_{m}^{\infty } exp\left( { - \left. {\frac{{p^{2} }}{2}} \right)dp} \right..$$
(8)

The relationship between probability of false alarm and threshold is given by:

$$P_{f} = Q\left( {\left( {\frac{\varphi }{{\sigma_{\omega }^{2} }} - 1} \right)\sqrt {\tau f_{s} } } \right)$$
(9)
$$\Rightarrow Q^{ - 1} \left( {P_{f} } \right) = \left( {\left( {\frac{\varphi }{{\sigma_{\omega }^{2} }} - 1} \right)\sqrt {\tau f_{s} } } \right)$$
(10)

The relative equation between \(\left\{ {P_{d} ,P_{f} } \right\}\) are given below:

$$Q^{ - 1} \left( {P_{d} } \right) = \left( {\left( {\frac{\varphi }{{\sigma_{\omega }^{2} }} - 1} \right)\sqrt {\frac{{\tau f_{s} }}{2\gamma + 1}} } \right) - \gamma \sqrt {\frac{{\tau f_{s} }}{2\gamma + 1}}$$
(11)
$$\Rightarrow \left( {\sqrt {2\gamma + 1} } \right)Q^{ - 1} \left( {P_{d} } \right) = \left( {\left( {\frac{\varphi }{{\sigma_{\omega }^{2} }} - 1} \right)\sqrt {\tau f_{s} } } \right) - \gamma \sqrt {\tau f_{s} }$$
(12)

By substituting (10) into (12), we have:

$$\left( {\sqrt {2\gamma + 1} } \right)Q^{ - 1} \left( {P_{d} } \right) = Q^{ - 1} \left( {P_{f} } \right) - \gamma \sqrt {\tau f_{s} }$$
(13)
$$\Rightarrow P_{f} = Q\left( {\left( {\sqrt {2\gamma + 1} } \right)Q^{ - 1} \left( {P_{d} } \right) + \gamma \sqrt {\tau f_{s} } } \right)$$
(14)

4 Simulation results

In this section the performance of the energy detection methods on the non-fading channel have been evaluated. From this simulation we computed the followings:

  1. i.

    Receiver operating characteristics (ROC) i.e., Pd and Pf is related by the curve

  2. ii.

    The probability of detection depends on the values of SNR, with fixed Pd = 0.01

Monte Carlo simulation method with 10,000 trials for each SNR is used to estimate the values of \(P_{f}\) and \(P_{d}\). The theoretical and practical ROC curve of energy detector is shown in Fig. 2 for sample point N = 1000 and SNR = − 10 dB.

Fig. 2
figure 2

ROC curve of energy detector for SNR = − 10 dB

The plot of \(P_{f}\) versus \(P_{d}\) for different values of SNR is illustrated in Fig. 3.

Fig. 3
figure 3

Relation between \(P_{f}\) and \(P_{d}\) for different SNR

It is observed from the Fig. 3 that the detection performance improves with an increase in SNR as well as probability of false alarm and is quantified in Table 1 which is shown below.

Table 1 Improvement in Pd with increase in SNR

From the above table it is observed that for \(\left\{ {\left( { - 13) - \left( { - 15} \right.} \right.} \right.)\} = 2dB\) increase in SNR the probability of detection is increase up to 0.27 times for Pf = 0.1.

Figure 4 shows that the analysis of probability detection under various numerical values of SNR (i.e from − 30 to 5 dB) at Pf = 0.01, 0.09, 0.2 respectively.

Fig. 4
figure 4

Plot of \(P_{d}\) versus SNR

From the above figure we have observed that the performance of detection is varied and it is based on increasing the SNR and the detection probability becomes 1 when SNR = − 5 dB.

5 Calculation of probability of detecting error

Consider the probability of primary user occurrence be given as \(P\). Thus the probability of non-occurrence is given by \(\left( {1 - P} \right)\). Then the error detection probability is given by:

$$P_{d} \left( e \right) = \left( {1 - P} \right)P_{f} + P\left( {1 - P_{d} } \right)$$
(15)

From the above equation it can be seen that maximizing \(P_{d}\) and minimizing \(P_{f}\) will reduce \(P_{d} \left( e \right)\). The probability of error effects on different parameters.

  • When the threshold \(\frac{\varphi }{{\sigma_{\omega }^{2} }} < \left( {\gamma + 1} \right)\) the value of \(P_{d} \left( e \right) \cong \left( {1 - P} \right)\) which is shown in Fig. 5. When \({\text{P}}_{\text{f}}\) is less the second term in above equation dominates and thus higher values of \(P_{d} \left( e \right)\) is obtained for higher values of \(P\). When \(P_{f}\) is high, then the first term in above equation dominates, so for decreasing \(P\) we get higher values of \(P_{d} \left( e \right)\)

  • When \(\frac{\varphi }{{\sigma_{\omega }^{2} }} > \left( {\gamma + 1} \right)\) then \(P_{d} \left( e \right) \cong P\) which is shown in Fig. 6. Thus increasing \(P\) increases \(P_{d} \left( e \right)\). Again, when \(P_{f}\) is high, then \(P_{d} \left( e \right) = \left( {1 - P} \right)P_{f} + P\) and thus increasing \(P\) increases \(P_{d} \left( e \right).\) In this case, even if we increase \(P_{f}\), we still get lower value of \(P_{d} \left( e \right)\) for lower \(P\) unlike that is obtained in Fig. 5.

Fig. 5
figure 5

Probability of detecting error versus probability of false alarm when \(\frac{\varphi }{{\sigma_{\omega }^{2} }} < \left( {\gamma + 1} \right)\)

Fig. 6
figure 6

Probability of detecting error versus probability of false alarm when \(\frac{\varphi }{{\sigma_{\omega }^{2} }} > \left( {\gamma + 1} \right)\)

6 Conclusions

In this paper, we have examined spectrum sensing techniques based on energy detector in cognitive radio networks scenarios. In addition to that, the relationship between the probability detection and the probability of false alarm probability utilizing the binary hypothesis testing process for spectrum sensing of the primary user using energy detection technique is determined. The probability of error in detecting the primary users is calculated and the effect of different sensing parameters on the eminence of sensing are observed.