Robust Spectrum Sensing via Double-Sided Neighbor Distance Based on Genetic Algorithm in Cognitive Radio Networks

In cognitive radio networks (CRNs), secondary users (SUs) can access vacant spectrum licensed to a primary user (PU).,erefore, accurate and timely spectrum sensing is vital for efficient utilization of available spectrum. ,e sensing result at each SU is unauthentic due to fading, shadowing, and receiver uncertainty problems. Cooperative spectrum sensing (CSS) provides a solution to these problems. In CSS, false sensing reports at the fusion center (FC) received from malicious users (MUs) drastically degrade the performance of cooperation in PU detection. In this paper, we propose a robust spectrum sensing scheme to minimize the effects of false sensing reports by MUs.,e proposed scheme focuses on double-sided neighbor distance (DSND) based on genetic algorithm (GA) in order to filter out the MU sensing reports in CSS.,e simulation results show that the sensing results are more accurate and reliable for the proposed GAmajority-voting hard decision fusion (GAMV-HDF) and GAweighted soft decision fusion (GAW-SDF) compared to conventional equal gain combination soft decision fusion (EGC-SDF), maximum gain combination soft decision fusion (MGC-SDF), andmajority-voting hard decision fusion (MV-HDF) schemes in the presence of MUs.


Introduction
Rapid developments in wireless communication system demand new wireless services in both used and unused parts of electromagnetic spectrum [1]. e underutilization of the spectrum fallout in spectrum holes representing the frequency band assigned to a legitimate primary user (PU), but it is not utilized by the PU at certain time and specific geographical locations. e motivation to introduce cognitive radio technology is increasing demands for higher data rates under underutilized spectral scarcity issues [2][3][4].
To solve the spectrum scarcity issues, federal communications commission (FCC) permits secondary users (SUs) to dynamically utilize the spectrum in different services or even to lease the spectrum to a third party [5,6]. e cognitive radio network (CRN) consists of an intelligent wireless communication system embedded with key functionalities to provide seamless communications at all times and all geographical places based on the needs with proficient utilization of the spectrum resources [7].
One of major issues in CRN is to properly detect the status of PU channel. Proper detection of the status of PU channel is critical at the SU for minimizing interference to the PU. In CRNs, SUs collect information on the PU existence based on various detection techniques such as feature detector, matched filter detector, and energy detector [3,4]. e energy detector can be the best choice to differentiate the PU signal from the noise, thanks to its simplicity and minimal computation, but it poorly performs in weak signal to noise ratio (SNR) environments.
Cooperative spectrum sensing (CSS) performs well in fading and shadowing environments, where multiple radios provide an independent realization of related random variable in the course of distributed transmission [8][9][10]. e probability that all SUs are in deep fades is incredibly low, which enables CSS to employ fewer sensitive detectors with cheap hardware, hence reducing the overall cost and complexity of the system. e artificial bee colony clustering (ABCC) algorithm in [11] is competent to reduce and stabilize the energy expenditure of the cooperative users. In CSS, SUs make their own local decisions about the PU existence and forward it to the fusion center (FC) for further analysis [12,13]. CSS is exposed to the false sensing reports of malicious users (MUs), therefore identification and exclusion of MU reports in the cooperative scheme is essential for minimizing their adverse effects. An abnormality detection approach of data mining is discussed in [14][15][16]. In [17], MUs with the primary user emulation attack (PUEA) to imitate the PU behavior is discussed. A robust CSS scheme under the attack of MUs sending an all-time busy status of the PU to the FC is discussed in [18]. In [19], the Kullback-Leibler (KL) divergence method is used against MUs with always busy and always free signaling of the PU channel without SNR requirements. SUs in the soft combination schemes report their energy statistics to the FC without local processing at individual SU [20][21][22]. In [23], the agents are allowed to cooperate in completing individual tasks to solve multiagent tasks with improved efficiency and reduced communication cost. A hard decision scheme in [24] maintains low communication overhead compared to other soft combination schemes. e population-based search algorithm with inherited ability of griping several optimization jobs at once is proposed in [25]. e genetic algorithm (GA) is used to determine optimized solutions using biologically stimulated techniques, such as natural selection, genetic inheritance, recombination, and crossover [26,27]. e remarkable generality and versatility of the GA make it useful in a variety of settings in the wireless communication to reduce the error probability of the CSS [28,29].
In this paper, the CSS sensing performance is optimized in the presence of MUs reporting false information to the FC, by reducing miss detection and false alarm probabilities, resulting in overall reduction in error probability. In our previous study [30], SUs perform their local sensing and report soft energies to the FC and also store the information in their local database. After then, the FC determines the KL divergence score against each SU and also acknowledges this same information to the SU. A normally declared user based on the KL divergence score tries to send mean of the previous energy reports to the FC based on its current observation. Similarly, in our proposed GA-based scheme [31], no additional steps are taken for MU identification and FC makes a global decision based on the best selection results given by the GA to optimize detection and false alarm probabilities. Our previous work in [26] is based on the combination of double-sided neighbor distance (DSND) algorithm with GA first identify MUs using DSND and then the GA is used in selection of best spectrum sensing results at the end of the given number of iterations. e best selection results of the GA are followed by the majority-voting hard decision fusion (MV-HDF) to make a global decision. is paper is an extension of the previous work, where MUs and normal SUs report their local sensing results to the FC.
When enough statistics are collected against SUs, abnormalities are first identified by the GA with the DSND algorithm, as in [14,26]; GA then randomly mutates the sensing data of the detected abnormalities along with crossover operation to search more suitable sensing information against the reporting SUs. e GA selection is further used to find best sensing data based on the Hamming distances of all SUs from its neighbors during each history interval, and the minimum Hamming distance report is decided as the best sensing results on behalf of all SUs for majority-voting hard decision fusion (MV-HDF). e best selection results are further used for assigning weights to SU reports in the soft decision fusion (SDF)-based global decision at the FC. Unlike our previous work where the MV-HDF performance was compared with SDF and HDF schemes, in the extended work, the proposed scheme effectiveness has been further confirmed under different number of cooperative SUs and various SNRs. Simulation results at different levels of cooperative SUs and SNR confirmed that, in the presence of MUs, the proposed DSNDbased GA system is able to produce more precise detection outcomes for the SDF and HDF schemes. e proposed GA weighted SDF (GAW-SDF) and GA majority-voting HDF (GAMV-HDF) are able to beat simple equal gain combination soft decision fusion (EGC-SDF), maximum gain combination soft decision fusion (MGC-SDF), and simple majority-voting hard decision fusion (MV-HDF) schemes during PU channel recognition by keeping the probability of error results optimum with high detection and low false alarm results at different levels of SNR and cooperative users. e main contributions of this paper are summarized as follows: (i) A novel weighted soft decision scheme is proposed to combine the sensing results reported from both normal SUs and MUs (ii) e proposed weighted soft decision scheme utilizes both soft and hard combinations to achieve better performance, whereas the previous work is only suitable for hard combination scheme (iii) rough extensive simulations, the effectiveness of the proposed scheme is evaluated in terms of detection, false alarm, and error probabilities in different ranges of SNRs and number of users compared with the existing schemes e rest of the paper is organized as follows. e system model is presented in Section 2. In Section 3, the proposed DSND scheme based on GA to overcome the effects of MUs is illustrated. Numerical results are shown in Section 4. Finally, the paper is concluded in Section 5.

System Model
To improve the sensing performance, we consider a CRN scenario in which all SUs are searching for a common PU in their coverage area and report the channel status to the FC as shown in Figure 1. Based on the spectrum sensing results received from normal SUs and MUs, the FC makes a more precise and authentic global decision on the PU channel availability. e received signal energy is used to decide H 0 and H 1 hypothesis in a particular spectrum as where H 0 is the hypothesis that the PU spectrum is free and H 1 represents that the PU channel is occupied, x j is the j th SU observed signal in the k th sensing slot, w j (k) is the additive white Gaussian noise (AWGN) experienced by j th SU, h j is the channel gain between the PU and the j th SU, and s(k) is the PU transmitted signal in the k th sensing slot. It assumed that an energy detector is used by all SUs due to its simplicity and no requirements of any prior information of PU power. e energy received at the k th SU in the i th sensing interval is where S is the number of samples in the i th interval. According to the central limit theorem (CLT), sufficient number of samples provides the energy distribution to be Gaussian distribution under both the H 0 and H 1 hypotheses, given by [26] where υ j is the SNR. Similarly, (μ 0 , σ 2 0 ) and (μ 1 , σ 2 1 ) denote the means and variance values of the received energy when either H 0 or H 1 hypothesis is true.

Proposed Methodology
In this section, we discuss the proposed methodology in detail. e FC applies the DSND technique as part of the GA for identifying abnormalities, and then with aid of crossover and mutation, sensing observations with high fitness are selected for the reporting SUs. e selected fitness is also used to assign weights to the received soft energy statistics of individual SUs. In the soft combination, reliability of the user report is guaranteed by determining weights against each SU information. All MUs receive lower weights than normal SUs' energy information in the SDF scheme. In the proposed DSND algorithm, history log is developed against the reporting SUs at the FC to filter out any abnormal SU from the global decision by computing the distance of each SU with its neighbors. e fitness function is based on the absolute sum of the Hamming distances of the individuals with the sensing reports provided by all other SUs. At the end of selected iterations, sensing observation with the minimum differences amongst neighbors is considered as the true sensing facts. In the next measurement, MV-HDF and weighted SDF schemes are employed to announce the global decision on the existence of PU. e impact of including MUs in the resultant CSS has a minor effect on the final decision at the FC.

Local Spectrum Decisions.
e proposed sensing model is shown in Figure 2. In this model, cooperative SUs sense the PU channel and compare the received signal energy with a threshold to send a binary report to FC as where E j (i) is the expected energy of the j th SU in the i th sensing interval and λ j is the set threshold point against the j th SU. As cooperative SUs in given CSS environment sense the PU channel at different locations, they experience different fading and shadowing effects. erefore, the threshold setup at each user is not the same. If received energy of the j th SU is higher than threshold, a binary decision "1" is forwarded to the FC indicating an occupied channel. Similarly, if the energy is less than the threshold, a binary decision "0" is reported to depict the channel as free. e FC collects the local spectrum decisions Z j (i) from all P SUs for the N history intervals and forms a history reporting matrix against all SUs as where Y is the N × P population matrix which consists of the accumulated spectrum sensing notifications at the FC for the P SUs in N total reports. e information is collected for both the SUs and MUs. e CSS can make the system secure against falsification effects of various different MUs' policies such as always yes malicious user (AYMU), always no malicious user (ANMU), opposite malicious user (OMU), and random opposite malicious user (ROMU) by employing the following methodology. As the AYMU policy always reports nonavailability of the PU channel, therefore, the presence of AYMU in CSS leads to an increase in misdetection probability of the system that results in low detection probability at the FC. Similarly, the ANMU policy reports an always free state of the PU channel and results in increasing false alarm probability of the system. e reports of AOMU and ROMU policies negate actual condition of the PU activity by reporting high energy states when the channel is free and low energy states when the PU is occupying the channel, hence leading to an increase in both false alarm and misdetection probabilities.

Double-Sided Neighbor Distance (DSND) for Catching Malicious Users.
e DSND algorithm is employed to determine outliers by their sensing reports, which is away from the other SUs in the history table. Based on the received sensing notifications of all SUs in the N intervals, FC is able to recognize any outlier MU with the DSND algorithm.
e FC first receives local spectrum observations from individual SUs. When FC collects N sensing reports from all P SUs as in (5), J 1 andJ 2 indices are selected such that J 1 < J 2 . Similarly, the selections of J 1 and J 2 indices must satisfy M < J 1 ≪ P and M ≪ J 2 < P, where J 1 and J 2 are the gauges for MUs detection, when the total number of MUs consideration is M in the P cooperative SUs. As the DSND algorithm compares history reports of the SUs, therefore, the inter-SU distance smaller than J 1 or larger than J 2 declares the SU as MU. An SU cannot be considered as malicious with the detection of both J 1 and J 2 gauges. As the DSND algorithm is applied to the sensing history of the SUs, therefore, the more information the system collects about the reporting SUs, the more precisely this algorithm works to identify abnormality. e distance in the sensing reports of the j th SU with all other SUs is determined in (6). is measurement is the dissimilarity in the reported bits of the j th SU with all other SUs: where b ij is the total absolute distance measurement of the j th SU sensing with all P users in the i th sensing period.
e matrix B is the sensing difference collections against each cooperative SUs in all sensing iterations. Matrix B is sorted and the result is used to set limits for the detection of abnormalities as In (8), μ and σ 2 are the mean and the variance measurements of B matrix, respectively, C is a constant with value 10/N for N total reports representing history of the sensing information on behalf of all cooperative SUs. e upper and lower limits are defined as  where L u is selected as the upper and L l as lower limit. After the selection of J st 1 and J st 2 entries based on B sorted results, if J st 1 entry of the SU is greater than L u , the SU is declared as MU in J 1 sense and if J st 2 entry of the user is less than L l , the SU is declared as MU in J 2 sense.
e intuition of the DSND is that if SU history is too farther from other SUs or too close to other SU's histories, its behavior is probably abnormal, hence representing an MU. Due to the double detection thresholds, the DSND is not only able to detect the attackers with their reports largely varying from the MUs, i.e., AYMU, ANMU, and OMU users, but it can also identify the attackers with their reports supported by the honest SUs and performing malicious act occasionally such as ROMUs.

Production of New Population.
Referring to the GA population, the N rows are the representations of the chromosomes which consist the reported sensing data from the P SUs denoting the genome values. e fitness function is selected based on the Hamming distances of each SU with its neighbor SUs in (7) as e fitness function is used to check the suitability of sensing observations at each sensing interval. e fitter chromosomes with high regularity in the sensing data are able to pass through inheritance, while the detrimental chromosomes with inconsistent MUs data are postponed due to survival of the fittest theory. e fitter chromosomes with high regularity in the SUs reported data and minimum disturbances from any MU which are allowed to pass to the next generation. e fitness score is utilized in ascending order to sort the population.
Based on (13), the top two chromosomes comprising minimum Hamming distance with the neighbors which are selected as the parent chromosomes for the next population, and crossover procedure is carried out in the rest to find out fresh juvenile. e crossover practice is repeated for the offsprings to take advantage of the best behavior of the individual chromosomes by mixing them in a bid to raise the chances of finding a more suitable candidate. A random locus point is selected and the subsequences, prior to and following the locus in the parent chromosomes, are exchanged to build new children pairs. is operator randomly selects a locus and exchanges the subsequences between two parent chromosomes to build a pair of children. Selection of the crossover point is random in the proposed work.
Mutation alters the selected genome status randomly which shows the modification in sensing data of the designated user in this work. Mutation is applied to the sensing reports of the detected abnormalities. e reports from the detected MUs in (11) are randomly inverted by changing the genome bits.
After the crossover and random mutations of the detected MUs data, a new population Y is formed which leads to the formation of a new neighbor distance matrix B′ as follows: e new fitness function values are determined as Fitness scores in (15) are arranged in ascending order and the one with minimum Hamming distance measurement is elected as the best fitness. In matrix Y, sensing reports with similar index number to the best fitness is selected as the final recommendation of the DSND-based GA scheme. e recommended sensing observations are used in the following section by the MV-HDF scheme to get to the final assessment about the PU activity. e results of the Hamming distance are normalized for assigning weights to each SU decision as e SUs with abnormal behavior obtain lower weights in comparison with MUs from the result in (16).
A detailed flow chart diagram of the proposed CSS with stepwise operation from individual spectrum sensing to the final global decision using MV-HDF, and weighted SDF is illustrated in Figure 3.

Global Decision.
Based on the weighed results for the authenticity of each SU sensing information as in (16), the global decision G B (i) at the FC is formulated as where w j is the weight assigned to the j th SU energy in the data fusion and ε is the threshold value for detection of the PU. e SUs with malicious behavior at the FC are charged with lower weights compared with the normal SUs which receive higher weights. All MUs including AYMU, ANMU, OMU, and ROMU are easily identified by the proposed scheme with their behavior. e MUs have higher b ij results because they have less inconsistency with the reported information of other SUs. e MUs receive lower weights Mobile Information Systems because the information provided by MUs deviates more significantly from that of the other SUs. e three most commonly used HDF schemes are MV-HDF, OR-HDF, and AND-HDF schemes. After identifying the abnormal users by the DSND algorithm, GA is used to make the final decision at the FC to further improve its accuracy. e sensing selections of the DSND-based GA technique is utilized by the MV-HDF to get more accurate information of the PU channel with minimum impact of the selfish users in the final combination. e MV-HDF scheme takes unanimous decision of the PU presence if Z out of P cooperative users states the PU detection. Similarly, if the detection reports received from the SUs are less than Z then decision is made in favor of H 0 to state the channel as free of the PU. For the MV-HDF scheme, the voting criteria are selected with Z � P/2 as a special case below: where P is the total number of SU reports reaching the fusion center for PU detection, y j (i) is the local decision of the j th SU in the i th period, and G B (i) is the global decision made by the MV-HDF scheme in the i th period.

Numerical Results and Evaluation
In this section, we present the numerical results of the proposed scheme in comparison with the other existing schemes. CRN setting is made with total P (10 to 20) SUs. All SUs are located randomly to sense the existence of the PU. Out of these P SUs, four of the SUs were assigned the malicious responsibilities of AYMU, ANMU, OMU, and ROMU.   Figure 4(a). e sensing SUs are P � 10 and P � 13. Figure 4(a) shows improved results of the detection probability for a given false alarm probability as the SUs are increased from P � 10 to P � 13. A similar result of the detection probability is obtained for a given false alarm probability for different ratios of SUs, keeping average SNR as −16.5 dB and −12.5 dB in Figure 4(b). e probability of detection results in Figure 4(b) at increased SNR improves with the increasing SNR from −16.5 dB to −12.5 dB. Comparing the results in Figure 4(a) and 4(b), cooperative schemes are able to give effective ROC results in Figure 4(a) under increased SNR compared with increased number of cooperative SUs in Figure 4 e probability of detection against the SNRs is drawn in Figure 5(a) for varying numbers of the cooperating SUs. Figure 5(a) shows that, by increasing the number of SUs from 10 to 13, the detection performance of all cooperative mechanisms is significantly improved. Similarly, in Figure 5(b), the detection performance results are achieved at different number of SUs. e result demonstrates an improvement in the detection results when the number of SUs increases from 10 to 20. Figure 5(b) also shows that the detection performance for a given number of SUs improves rapidly, when the SNR value increases for the number of SUs. Both the results in Figures 5(a) and 5(b) demonstrate that the detection performance of the proposed soft and hard fusion schemes is producing best detection results in comparison with EGC-SDF, MV-HDF, and MGC-SDF schemes. e proposed scheme detection results are followed by the MGC-SDF scheme while the simple MV-HDF scheme gives worst performance. e probability of error P e is plotted against SNR for different number of SUs in Figures 6(a) and 6(b). e results show that by increasing the average SNR and total number of SUs, the error in sensing the PU channel reduces considerably. e results in Figures 6(a) and 6(b) show that the proposed schemes are intelligent in generating less probability of error in comparison with other soft and hard fusion schemes such as MGC-SDF, EGC-SDF, and MV-HDF.
It is clear from the simulations that the DSND-based GA followed by the soft and hard fusion combination schemes make the CSS performance more reliable and accurate in the presence of different variations of MUs, i.e., AYMU, ANMU, ROMU, and OMU. e numerical results of the proposed hard and soft decision schemes such as MV-HDF, MGC-SDF, and EGC-SDF confirm that SUs' cooperation provides high reliability and precision in sensing PU activity. e proposed scheme is able to identify and eliminate MUs in order to make the sensing process reliable.

Conclusions
e false sensing data of MUs reduce effectiveness of CSS. It is therefore essential to evade any confusion in sensing. is paper focuses on improving the existing soft and majorityvoting hard fusion combination schemes using GA in the presence of MUs. GA employed DSND for detecting MUs and used crossover and mutation to get precise and reliable sensing results at the FC. e FC used weighted SDF and MV-HDF schemes to take global decision of PU spectrum occupancy. MUs of different natures are considered, i.e., AYMU, ANMU, ROMU, and OMU, to intensify the harshness of the environment. e numerical results demonstrated that the proposed scheme greatly improves the system performance including sensing accuracy.

Data Availability
e data used to support the finding of this study are included within the article.