Hybrid Spectrum Sensing Using MD and ED for Cognitive Radio Networks

: Day by day, the demand for wireless systems is increasing while the available spectrum resources are not sufﬁcient. To fulﬁl the demand for wireless systems, the spectrum hole (spectrum vacant) should be found and utilised very effectively. Cognitive radio (CR) is a device which intelligently senses the spectrum through various spectrum-sensing detectors. Based on the complexity and licensed user’s information present with CR, the appropriate detector should be utilised for spectrum sensing. In this paper, a hybrid detector (HD) is proposed to determine the spectrum hole from the available spectrum resources. HD is designed based on an energy detector (ED) and matched detector (MD). Unlike a single detector such as ED or MD, HD can sense the signal more precisely. Here, HD can work on both conditions whether the primary user (PU) information is available or not. HD is analysed under heterogeneous environments with and without cooperative spectrum sensing (CSS). For CSS, four users were used to implement OR, AND, and majority schemes under low SNR walls. To design the HD, speciﬁcations were chosen based on the IEEE Wireless Regional Area Network (WRAN) 802.22 standard for accessing TV spectrum holes. For the HD model, we achieved the best results through OR rule. Under the low SNR circumstances at − 20 dB SNR, the probability of detection (P D ) is maximised to 1 and the probability of a false alarm (P FA ) is reduced to 0 through the CSS environment.


Introduction
Increased demand for wireless users and wireless systems has led to the very effective utilisation of the available spectrum. In an earlier study [1], a report said that licensed users do not use their spectrum resources all the time. There are spectrum holes available on licensed users' spectra which can be accessed by dynamic spectrum access (DSA) technology [2]. To serve the DSA, cognitive radio (CR) was introduced in earlier reports by Mitola [3,4]. CR is a smart radio which intelligently operates in different environments to sense the signal of the licensed user (primary user (PU)). CR understands the environment and changes its parameters including the operating frequency, signal-to-noise ratio (SNR), modulation techniques and power output, as per the region where it operates [5]. CR has major tasks to do like spectrum sensing, spectrum management, spectrum sharing, and spectrum security. The first main task of CR is to sense the channel and determine whether the channel is busy or idle. If the channel is found to be idle, CR users or secondary users (SUs) utilise the channel for unlicensed/secondary user transmission. However, if a channel is found to be busy, then the CR waits for a time interval to obtain the channel free from the PU's transmission.
The two main goals of spectrum sensing are: CR users should not interfere with the PU's signal while utilising the PU's spectrum, and should maintain the signal level below

Background
In [21], MD was studied for the identification of a PU's signal and the power level of a PU's signal was recognised. Simulation and theoretical results were studied at −10 dB and −15 dB SNR levels for a sample size of 100. Multiple hypotheses were used to test the different power levels of the PU's signal for known signals and unknown signals. An analysis of cooperative spectrum sensing was performed for cognitive radio networks (CRNs) in [22]. MD was studied in multiple path routing algorithms to efficiently utilise the spectrum and bandwidth. With the help of a network simulator, results were proposed and discussed. A comparative study of energy detection spectrum sensing techniques is done for CR networks under different channel environments like AWGN, Rayleigh fading channel in [23], and SNR has chosen at −1 dB, 4 dB, 7 dB, and 9 dB to simulate the ROC parameters. Spectrum sensing based on cooperation among SUs is used to improve the detection of the PU's signal [24]. In a cooperative environment, a number of CR users/ SUs made grouping based on their observations [25]. In CSS, using a centralised approach, SUs sense the channel and send their observations to the fusion centre [26]. While in CSS, using a distributed approach, the SUs' decision does not depend on the fusion centre but each SU individually make their own decision [27]. To increase the probability of detection with a relevant probability of false alarm, the SUs' data are weighted where an algorithm can find errors of SU without the relevance of a malicious effect on it [28].
In [29], all transmitter-based spectrum sensing techniques are analysed such as energy detector, matched detector, and Cyclostationary feature detection. A further decision was taken jointly through the fusion centre and the SNR was chosen at −15 dB for the lower region for improving spectrum sensing for CRNs. In [30,31], the improved ED was shown with a dynamic threshold for increasing the probability of detection at −20 dB SNR. In [32], IEEE 802.22 WRAN standard parameters were analysed and implemented for cognitive radio networks. Non-cooperative spectrum sensing (NSS) and cooperative spectrum sensing (CSS) techniques were developed and compared for CRN under SISO and MIMO channel environments for Rayleigh fading channels using the ED algorithm [33]. Table 1 shows a comparison of the different existing spectrum sensing techniques. The results are compared at worst SNR such as −10 dB, −20 dB along with different sample values with or without CSS environments. The values of the performance parameters P D and P FA are shown in Table 1. In this paper, we focused on the worst SNRs and tried to obtain a better performance in terms of the main sensing parameters, namely aiming for a P D close to 1 and P FA close to 0. Further details about the methodology and the present work are discussed in the following sections.

System Model of Matched Detector (MD) and Cooperative Spectrum Sensing (CSS)
The matched detector (MD) is mainly used in communication as a spectrum sensing technique which is used to maximise the signal-to-noise ratio. MD is a type of linear detector and information about the PU's signal is needed for its sensing. The signal detected by CR users is convolved with the matched filter response signal, while a reference signal is generated from a time-shifted and mirrored version of a reference signal [8,21]. Figure 1 represents a block diagram of a matched detector spectrum sensing technique. An input signal detected by CR users is added with Gaussian noise and passed through a bandpass filter, where BPF selects the desired range of a signal from the receiving inputs and rejects the unwanted signal (band not interested) from the incoming signal. Now, the matched filter operation is to be applied to receive the signal from BPF and a reference signal which is delayed by time. There is a threshold to be set based on channel information, a matched filter output is compared, and the detector output is obtained with the PU's presence or absence based on threshold values.

Spectrum Sensing Using the Matched Detector for Rayleigh Fading Channel
Matched detector spectrum sensing is used for cognitive radio networks for the Rayleigh fading channel. Here, the channel coefficient h is known to MD. MD corresponds to both hypotheses when ỹ = * | | || || is given in Equation (1) as where noise ñ ~CN(0, ), complex Gaussian with mean zero and variance , now comparing ỹ with a suitable threshold , yield the detector. In Equation (2) can be selected as = |h| |x| .

Spectrum Sensing Using Cooperative Spectrum Sensing (CSS)
In non-cooperative spectrum sensing, only a single CR user detects the PU signal which is affected by many problems in the detection of a PU signal such as a hidden PU transmitter, range issues, fading effects, and SNRs. For the same reasons, the performance of the detection of PU signals is degraded. To overcome these problems affecting single CR users, in cooperative spectrum sensing (CSS), more than one number of CR users must be used to sense the PU signal. In this paper, we focused on four (M) CR users to create a CSS environment. Figure 2a,b show the CSS scenario for a centralised and distributed approach, respectively [16].

Spectrum Sensing Using the Matched Detector for Rayleigh Fading Channel
Matched detector spectrum sensing is used for cognitive radio networks for the Rayleigh fading channel. Here, the channel coefficient h is known to MD. MD corresponds to both hypotheses when where noise ∼ n~CN(0, σ 2 ), complex Gaussian with mean zero and variance σ 2 , now comparing ∼ y with a suitable threshold γ, yield the detector. In Equation (2) γ can be selected as γ = 1 2 |h|||x||.
Probability of false alarm P FA = Pr Probability of detection P D = Pr Equations (3) and (4) represent P D and P FA for the SISO Rayleigh fading channel for single CR users [37][38][39], respectively.

Spectrum Sensing Using Cooperative Spectrum Sensing (CSS)
In non-cooperative spectrum sensing, only a single CR user detects the PU signal which is affected by many problems in the detection of a PU signal such as a hidden PU transmitter, range issues, fading effects, and SNRs. For the same reasons, the performance of the detection of PU signals is degraded. To overcome these problems affecting single CR users, in cooperative spectrum sensing (CSS), more than one number of CR users must be used to sense the PU signal. In this paper, we focused on four (M) CR users to create a CSS environment. Figure 2a,b show the CSS scenario for a centralised and distributed approach, respectively [16]. Figure 2a shows CR 1-CR 4, all four CR users reporting their information to the main centre CR 0 which acts as fusion centre (FC). The decision is taken by FC. Figure 2b shows a distributed approach, where each CR 1-CR 4 can directly talk to each other and make decisions on their own. There is no FC in the distributed approach. To design the CSS environment, there are three algorithms used, namely OR, AND, and Majority rule. The AND rule says that when all CR users declare that PU is present, then only the algorithm declares that the PU is present. While the OR rule says when one of CR users declares that PU is present, then the algorithm also declares that PU is present. The Majority rule (M/2 out of M) says that when 50 % or more CR users are reporting that the PU is present, then the algorithm declares that the PU is present or else that the PU is absent in all other cases.  Figure 2a shows CR 1-CR 4, all four CR users reporting their information to the main centre CR 0 which acts as fusion centre (FC). The decision is taken by FC. Figure 2b shows a distributed approach, where each CR 1-CR 4 can directly talk to each other and make decisions on their own. There is no FC in the distributed approach. To design the CSS environment, there are three algorithms used, namely OR, AND, and Majority rule. The AND rule says that when all CR users declare that PU is present, then only the algorithm declares that the PU is present. While the OR rule says when one of CR users declares that PU is present, then the algorithm also declares that PU is present. The Majority rule (M/2 out of M) says that when 50 % or more CR users are reporting that the PU is present, then the algorithm declares that the PU is present or else that the PU is absent in all other cases.
For CSS, mathematical expressions are shown in Equations (5) and (6) for OR rule; Equations (7) and (8) for AND rule; and Equations (9) and (10) for the majority rule ((M/2) out of M). Here M is a number of secondary (CR) users used for the CSS system, ED is implemented in [29], while the MD system model is designed for the Rayleigh fading channel here. Equations (5)-(10) are used for developing CSS environments for ED when there is no PU information available to CR users. MD uses the correlation from the For CSS, mathematical expressions are shown in Equations (5) and (6) for OR rule; Equations (7) and (8) for AND rule; and Equations (9) and (10) for the majority rule ((M/2) out of M). Here M is a number of secondary (CR) users used for the CSS system, ED is implemented in [29], while the MD system model is designed for the Rayleigh fading channel here. Equations (5)-(10) are used for developing CSS environments for ED when there is no PU information available to CR users. MD uses the correlation from the known signal shape to estimate unknown signals. The implementation of MD is quite complex as it requires information on the PU's signal. While the energy detector (ED) measures a particular energy level for a specified time period, it does not require any prior information on the PU's signal. This is why ED is quite easy to design and implement.
The main drawback to ED is its inability to distinguish between noise and the PU's signal when it operates in a low SNR region, while MD gives better results under low SNR regions. By considering the complexity of MD and the easy implementation of ED, a hybrid detector is proposed. Based on the user's demand, HD provides the results. To improve the performance of the detector, these steps of MD from Section 3.1 and ED from [29] are used to design a hybrid detector (HD) in the next section. Figure 3 presents a proposed hybrid detector (HD) for CRN spectrum sensing. CR analyses the spectrum of licensed users (or PU): if the PU information is available, then select MD; otherwise, select the ED algorithm. Further Rayleigh fading channel is used to implement both detectors. Both the MD and ED detectors are analysed under noncooperative spectrum sensing (non-CSS) and cooperative spectrum sensing (CSS). Since it is also based on the demand of the user, a hybrid model can choose either MD or ED as per the complexity of the algorithm. Under CSS, there are again fusion centres for selecting OR, AND, or Majority as per the probability of the required detection criteria.

Proposed Hybrid Model
information on the PU's signal. This is why ED is quite easy to design and implement.
The main drawback to ED is its inability to distinguish between noise and the PU's signal when it operates in a low SNR region, while MD gives better results under low SNR regions. By considering the complexity of MD and the easy implementation of ED, a hybrid detector is proposed. Based on the user's demand, HD provides the results. To improve the performance of the detector, these steps of MD from Section 3.1 and ED from [29] are used to design a hybrid detector (HD) in the next section.  In this paper, we considered below the assumptions and key parameters for developing the HD of the proposed system model: In this paper, we considered below the assumptions and key parameters for developing the HD of the proposed system model:

•
Monte Carlo simulations are used to iterate the maximum possible outcomes of the proposed HD to sense the channel; • There are two algorithms implemented under HD, namely the matched detector (MD) and energy detector (ED). Based on the user's demand, one can select MD or ED as in function of whether the PU's information is available, how much complexity is required, and the worst SNR region operation; • The Rayleigh channel model was developed for HD, where h is the unknown channel coefficient for MD. To determine h, normalisation is applied; • The threshold γ γ = qfunc x inv (P FA )/ √ N + 1 is a function of the probability of a false alarm, calculated from N degrees of freedom in the inverse chi-square distribution, where N = τ (available sensing time) x f s (sampling frequency);

•
Under non-CSS and CSS environments, HD is analysed. CSS is implemented for the number of cooperative users (4) using OR, AND, and Majority rule algorithms. The simulation and theoretical results are compared for all scenarios. CSS overcomes the problem of single CR user inability in the detection of a hidden PU signal; • The targeted parameters at −20 dB (worst SNR range) which are used for operating digital TV, a probability of detection of 0.9, and a probability of false alarm of 0.1 [14], are the focus herein. IEEE 802.22 WRAN developed these parameters to access the TV broadcast channels without interfering with licensed (primary) users.

Results and Discussion
Using hybrid detector (HD), spectrum sensing is performed for cognitive radio networks (CRNs). Sections 5.1 and 5.2 show the HD analysis for non-cooperative and cooperative sensing, respectively.

Performance Analysis of HD for Non-CSS
The hybrid detector is designed with a non-cooperative spectrum sensing the Rayleigh fading channel environment, as shown in this section. There are two possibilities: either CR may have the PU's information available for the operating region or it may not. Based on the previous history of the PU's signal available with CR, HD can select MD in this scenario to better find the spectrum hole. If the PU's information is not available with CR, HD can select ED. Below, there are two case studies shown using value of Z, based on the PU's signal information is available or not. Here, the random variable Z decides on the probability of the occurring selection of ED or MD for the HD model. Z totally depends on the user's choice. Z can be chosen between 0 and 1 by the user. In this work, we considered the case 1: Z starts at 0.7-1 (ED), while in case 2, Z starts between 0 and below 0.7 (MD). This means that, by setting the value of Z, one can decide the selection from ED and MD for the HD model. Case 1: Random variable Z = 0.7 and above (PU information not available), select hybrid = ED.
Case 2: Random variable Z = below 0.7 (PU information available), select hybrid =MD Figures 4 and 5 represent the hybrid detector performance for case 1 and case 2, respectively, under non-cooperative spectrum sensing. For case study Z (random variable), probability is chosen between 0 and 1. When CR has the PU's information, HD selects MD; otherwise, HD selects ED. HD is analysed under the worst SNR, −20 dB, the practical and theoretical results of which are shown in the ROC curve in Figures 4 and 5. When HD selects ED for case 1, P D is 0.5 and P FA is 0.1 under non-cooperative spectrum sensing at −20 dB SNR. However, when HD selects MD for case 2, P D is 0.6 and P FA is 0.1 under the same non-cooperative spectrum sensing at −20 dB SNR. Table 2 shows a summary of the Section 5.1 results for both case 1 and case 2 scenarios under non-CSS. This shows that the performance of HD is better under case 2 by the improvement in P D 0.6 from 0.5.

Performance Analysis of HD for CSS
The hybrid detector is designed with a cooperative spectrum sensing the Rayleigh fading channel environment in this section. The OR, AND, and Majority algorithms are used to design the CSS environment using 4 CR users. Similarly, case 1 and case 2 of previous Section 5.1 are discussed for the CSS environment.
Case 1: Random variable Z = 0.7 and above (PU information not available), select hybrid = ED. Figures 6-8 represent the hybrid detector performance for case 1 with OR, AND, and Majority rule decision under cooperative spectrum sensing with four CR users. Case 1 reflects the case in which variable Z is above 0.7 (i.e., 0.7-1), and thus HD selects ED. HD is theoretically and practically analysed under the worst SNR range from −20 dB to −5 dB for heterogeneous networks.

Performance Analysis of HD for CSS
The hybrid detector is designed with a cooperative spectrum sensing the Rayleigh fading channel environment in this section. The OR, AND, and Majority algorithms are used to design the CSS environment using 4 CR users. Similarly, case 1 and case 2 of previous Section 5.1 are discussed for the CSS environment.
Case 1: Random variable Z = 0.7 and above (PU information not available), select hybrid = ED. Figures 6-8 represent the hybrid detector performance for case 1 with OR, AND, and Majority rule decision under cooperative spectrum sensing with four CR users. Case 1 reflects the case in which variable Z is above 0.7 (i.e., 0.7-1), and thus HD selects ED. HD is theoretically and practically analysed under the worst SNR range from −20 dB to −5 dB for heterogeneous networks.     When HD selects ED for case 1, PD is 0.98 and PFA is 0 using OR rule, PD is 0.96 and PFA is 0 using AND rule, and PD is 0.94 and PFA is 0.1 using Majority rule. Cooperative spectrum sensing is simulated under heterogeneous networks from −20 dB to −5 dB SNR for both case 1 and case 2 of the HD model.   When HD selects ED for case 1, PD is 0.98 and PFA is 0 using OR rule, PD is 0.96 and PFA is 0 using AND rule, and PD is 0.94 and PFA is 0.1 using Majority rule. Cooperative spectrum sensing is simulated under heterogeneous networks from −20 dB to −5 dB SNR for both case 1 and case 2 of the HD model.  When HD selects ED for case 1, P D is 0.98 and P FA is 0 using OR rule, P D is 0.96 and P FA is 0 using AND rule, and P D is 0.94 and P FA is 0.1 using Majority rule. Cooperative spectrum sensing is simulated under heterogeneous networks from −20 dB to −5 dB SNR for both case 1 and case 2 of the HD model. Case 2: Random variable Z = below 0.7 (PU information available), select hybrid = MD.
Figures 9-11 represent the hybrid detector performance for case 2 with OR, AND, and Majority rule under cooperative spectrum sensing with four CR users. Case 2 reflects the case in which the variable Z is below 0.7 (i.e., 0-0.69), and thus HD selects MD. HD is also theoretically and practically analysed under the worst SNR range from −20 dB to −5 dB for heterogeneous networks. When HD selects MD for case 2: P D is 1 and P FA is 0 using OR rule, P D is 0.96 and P FA is 0 using AND rule, and P D is 0.88 and P FA is 0 using Majority rule. There are four CR users present in CSS for both case 1 and case 2. Below Table 3, a summary of the results of case 1 and case 2 scenarios is shown in Section 5.2.
J. Sens. Actuator Netw. 2022, 11, x FOR PEER REVIEW 11 of 15 Case 2: Random variable Z = below 0.7 (PU information available), select hybrid = MD. Figures 9-11 represent the hybrid detector performance for case 2 with OR, AND, and Majority rule under cooperative spectrum sensing with four CR users. Case 2 reflects the case in which the variable Z is below 0.7 (i.e., 0-0.69), and thus HD selects MD. HD is also theoretically and practically analysed under the worst SNR range from −20 dB to −5 dB for heterogeneous networks. When HD selects MD for case 2: PD is 1 and PFA is 0 using OR rule, PD is 0.96 and PFA is 0 using AND rule, and PD is 0.88 and PFA is 0 using Majority rule. There are four CR users present in CSS for both case 1 and case 2. Below Table 3, a summary of the results of case 1 and case 2 scenarios is shown in Section 5.2.   Case 2: Random variable Z = below 0.7 (PU information available), select hybrid = MD. Figures 9-11 represent the hybrid detector performance for case 2 with OR, AND, and Majority rule under cooperative spectrum sensing with four CR users. Case 2 reflects the case in which the variable Z is below 0.7 (i.e., 0-0.69), and thus HD selects MD. HD is also theoretically and practically analysed under the worst SNR range from −20 dB to −5 dB for heterogeneous networks. When HD selects MD for case 2: PD is 1 and PFA is 0 using OR rule, PD is 0.96 and PFA is 0 using AND rule, and PD is 0.88 and PFA is 0 using Majority rule. There are four CR users present in CSS for both case 1 and case 2. Below Table 3, a summary of the results of case 1 and case 2 scenarios is shown in Section 5.2.     From the above summary shown in Table 3, OR performs better compared to AND, and Majority rule. The OR algorithm provides the best probability of detection (PD) of 0.98 or 1 along with a probability of false alarm (PFA) of 0. These are the requirements for the IEEE 802.22 WRAN standard to utilise the TV spectrum holes. Table 4 shows a comparison of different hybrid sensing techniques performed previously and the results are compared with our proposed HD model based on the requirement of the IEEE 802.22 WRAN standard. The proposed HD model that performs the best in terms of PD is 0.98 (case 1) or 1 (case 2) and PFA is 0 under the CSS environment compared to other previous work shown in [17][18][19]. The proposed HD model along with four CSS users' results are shown to be better when compared to the results shown in [36] along with 15 CSS users.  From the above summary shown in Table 3, OR performs better compared to AND, and Majority rule. The OR algorithm provides the best probability of detection (P D ) of 0.98 or 1 along with a probability of false alarm (P FA ) of 0. These are the requirements for the IEEE 802.22 WRAN standard to utilise the TV spectrum holes. Table 4 shows a comparison of different hybrid sensing techniques performed previously and the results are compared with our proposed HD model based on the requirement of the IEEE 802.22 WRAN standard. The proposed HD model that performs the best in terms of PD is 0.98 (case 1) or 1 (case 2) and PFA is 0 under the CSS environment compared to other previous work shown in [17][18][19]. The proposed HD model along with four CSS users' results are shown to be better when compared to the results shown in [36] along with 15 CSS users.

Conclusions
The performance of the detector is degraded when it operates on low SNR regions. In spectrum sensing for cognitive radio networks, any detector performance is always better for the detection of a PU's signal when there is a good SNR. In this paper, the aim was to attain a SNR of between approximately −20 dB and −5 dB (low region) and simulate the best results. The hybrid detector spectrum sensing model is proposed and analysed under the environment of a Rayleigh fading channel. The different parameters such as probability of detection (P D ), probability of false alarm (P FA ) and SNRs in heterogeneous networks are tested. Simulated results are compared for non-cooperative and cooperative spectrum sensing (CSS) in the HD model. The results show the performance of HD better under the CSS scenario in terms of P D and P FA . It also states that, when using CSS, the performance of the detectors increased with OR logic. The hybrid detector is proposed using both MD and ED algorithms. When there is no information available about the PU's signal, HD goes with the energy detector (ED) spectrum sensing for cognitive radio networks. While on the availability of the PU's information, MD provides the best results for HD. Using HD, user demands such as the selection of detectors, complexity, SNRs, and cooperative spectrum sensing decisions are easily served. We achieved the best results, i.e., a P D of 0.98 for case 1 and a P D of 1 for case 2, while P FA is 0 under −20 dB SNR under the CSS scenario using the HD model to determine the spectrum holes for the IEEE 802.22 WRAN standard using the proposed HD model. In Table 4, a comparison of our proposed HD model is shown with the previous hybrid detectors shown in [17][18][19]. Our HD model proves better in all the previous work performed in this field. Our HD model proved that by using CSS environments with only 4 CR users-not 15 CR users as in [36]-we optimised the P D to 0.98 and 1 and reduced the P FA to 0, which are the best suitable and targeted sensing parameters for TV white space utilisation under the IEEE 802.22 WRAN standard.
In the future, more detectors such as Cyclostationary feature detectors can also be added to the hybrid detector to use when only partial information on the PU's signal is available.