Spectrum Sensing for Cognitive Radio Using Genetic Algorithm

— Cognitive Radio has been skillful technology to improve the spectrum sensing as it enables Cognitive Radio to find Primary User (PU) and let secondary User (SU) to utilize the spectrum holes. However detection of PU leads to longer sensing time and interference. Spectrum sensing is done in specific “time frame” and it is further divided into Sensing time and transmission time. Higher the sensing time better will be detection and lesser will be the probability of false alarm. So optimization technique is highly required to address the issue of trade-off between sensing time and throughput. This paper proposed an application of Genetic Algorithm technique for spectrum sensing in cognitive radio. Here results shows that ROC curve of GA is better than PSO in terms of normalized throughput and sensing time. The parameters that are evaluated are throughput, probability of false alarm, sensing time, cost and iteration.


Introduction
There is large spectrum scarcity as it is not used efficiently.The demand for bandwidth is increasing day by day which result in spectrum insufficiency.Now a day it is common problem to find a suitable spectrum band so that they can transmit their data on it.Spectral inefficiency justifies the need for developing device to manage the spectrum in time and space domain.So Cognitive Radio (CR) is a technique to use the spectrum efficiently.The idea of CR was first introduced by Joseph Mittola in 1991.In CR we have two types of spectrum users: primary User (PU) and secondary User (SU) [1].PU is licensed user who pays a large amount and owns a spectrum and SU is unlicensed user.When Spectrum is idle; SU can transmit its data on it.But first priority is always given to PU.So the function of CR is to intelligently detect the spectrum holes [2].CR technology is a paradigm of wireless communication in which spectrum can be managed properly.There is a concept of Dynamic Spectrum Access used in CR environment which reflects the identification of spectrum holes and utilize them for transmission.Spectrum sensing is the main component of CR although other factors are also important like sensing awareness and cognitive capabilities.[3][4] There are many evolutionary techniques like PSO (particle swarm optimization), ACO (ant-colony optimization).One of them is Genetic algorithm which is usually used for computing optimization problems.The concept of GA was introduced by JH Holland in 1960.GA can be related to many optimization problems like nondeterministic, machine learning and finite automata [6].GA is a heuristic search and optimization technique that imitate the cycle of natural evolution.It is based on natural selection which defines that "select the best, discard the rest".It encourages the evolution of species through natural selection.[7] Optimization is a technique of finding global minima or maxima of an objective function or problem statement and avoiding a local minima or maxima [8] [9].For computational problems like PSO and GA, an optimal solution is required but at the end of the cycle, individual particle is lost into local maxima or minima and may lead to computational problem.There are a lot of meta-heuristic techniques to find an optimal solution like greedy approach, tabu search, GA etc [10].The main objective of meta-heuristic technique is to prevent search space from getting stuck into local maxima or minima [11].Optimization refers to finding the 'best' solution and then it varies from problem to problem, but in statistical problem it refers to maximization and minimization objective function by taking different input parameter [12].

Genetic algorithm
Nature has always been a great source of inspiration to all mankind.In GA there is large search space which is very populated and has so many possible solutions to the given problem [13].These solutions undergo many processes to produce new offspring with the help of chromosome and this process is repeated over again and again until 'fit' particle is found.Genetic Algorithm is based on three techniques: selection, crossover and mutation.In selection method, the chromosomes are selected to give a better solution or fittest particle as compared to current population.Then crossover is done between two fittest particles to create the offspring and required information is exchanged between two particles.After crossover, mutation is done to replace the parental population with new offspring and continues the iteration.

1.2
Basic structure of GA PSO is a population based optimization technique which is inspired by social behavior of flock of birds or school of fish.In PSO, there are swarm particles which reside at a position in search space.Initially it has some position and velocity in search space which is represented by a vector.It is different from GA in a manner that it does not need any kind of filtering operation such as crossover and mutation.In PSO each particle is assigned with a random position and velocity in whole search space.As it is evolutionary algorithm, so the velocity and position of each particle is updated in every iteration.When the iterations are over, then the fitness function is used to measure the quality of the particle.
Each particle in PSO has its local best position and global best position.Global best is the position which position of particle which is closer towards the objective function or optimal function.All particles try to move towards closer to the optimal solution.It is updated every time when some other particles become more near to the optimal value.After one point of time, all particles will converge at an optimal solution.
Where Vel i,d (t+1) and PS i,d (t+1) is the velocity and position of the 'i' particle, at dimension 'd' and iteration 't+1'.!(t) is the used to track the history of velocity, rand k and rand q are the random factors .Pbest i,d is the personal best position and gbest d is the global best position of the swarm at dimension 'd'.
Genetic algorithm technique has been proposed to solve problems in many areas.However, this paper lays emphasis on improvement of spectrum sensing with the help of genetic algorithm as it provides best spectrum holes.Research is done on different parameters like sensing time, throughput and probability of false alarm.At time frame structure is fixed, there is need to optimize sensing time to obtain the trade-off between transmission time and sensing time duration.So GA proves to be giving high throughput and less sensing time.
This paper is organized as follows.Section 2 provides the literature Review.System Model is presented in Section 3. Section 4 discusses the simulation and result and in Section 5 draws the conclusion.

Literature review
The author in [1] explains the concept of cognitive radio and spectrum sensing management.Different techniques used in spectrum sensing are discussed.In [2] author describes the primary user emulation attack in cognitive radio (CR).(PER) primary exclusive region is defined as the region in which primary user communicate with primary receiver.Author in [3] explains the concept of spectrum sensing in CR.It is explained that the co-operative sensing should be employed overcome the challenges faced due to fading and shadowing.Author in [5] explains the optimization of throughput under different SNR values further note worthy conditions of maximum probability of false alarm and probability of detection is highlighted.In [6] author explains the spectrum allocation using genetic algorithm and gives an advantage of it over any other soft computing technique.
There is hybridization of PSO-GA based on feature selection.The proposed algorithm is implemented on Indian pine hyper spectral data sets in [7].Network selection and allocation of spectrum is done in [8].The author has formulated a problem to minimize the interference caused due to licensed user.In [9] author describes the different strategies for the hybridization of combinatorial optimization problem of PSO and new technique called adaptive genetic algorithm to overcome the drawback like pre-maturity.This algorithm can change the cross over probability and mutation probability.In [10] author optimize the sensing time in energy based detection method.Optimization of sensing time is done using Human behavior based Particle Swarm Optimization (HBPSO).By doing this, the probability of collision between samples of secondary users is minimized and a high value of system throughput.In [11] hybridization of ACO and PSO is applied for spectrum sensing in cognitive radios.

System Model
The sensed signal M (n) of SU will have two hypotheses: Null hypothesis H 0 and alternate hypothesis H 1 .

M [n] = X[n]…… PU is inactive M [n] = hs[n] + w[n]…. PU is active
Where n = 1, 2, 3……..N N and h are the number of samples and channels gain respectively, 'h' 0 in hypothesis H o and 1 in H 1 .X (n) is the noise which is equally distributed with zero mean and variance E[x (n)] 2 = " w 2 S(n) is PU signal.In energy detection method the input samples M (n) are gathered for power estimation and gives output E P d is the probability of detection which is defined as probability of detecting PU when it is actually present.P f the probability of false alarm.It is defined as probability of detecting PU when it is not present actually.
iJOE -Vol.14, No. 9, 2018 Where Q(.) is the tail function of the standard Gaussian.Number of samples to determine the target probabilities (P f, P d ) Considering the sampling time as S, Sensing time T s From equation 7 it is concluded that larger is the sampling numbers the larger will be the sensing time duration.
To transmit the SU, there are two scenarios when PU is absent and no false alarm is generated at SU, then throughput is given by In second scenario, SU is not able to detect PU, when it is actually present then throughput is given by Where G 0 , G 1 denote the throughput of SU, operating in both absence and presence of PU respectively.

Simulation and result
The implementation of proposed algorithm for spectrum sensing is carried out with the help of MATLAB tool.

Conclusion
Cognitive Radio is a paradigm of wireless industry as it helps in improving spectrum sensing.In this paper two optimization approaches are discussed that is PSO and GA.PSO offers an advantage of early convergence but falls into premature convergence.The property of survival of fitness helps in achieving optimal result in GA.In this paper, different parameters are used to improve the Spectrum Sensing like throughput, probability of false alarm, sensing time, probability of detection, cost and iteration.Since tradeoff is required between sensing time and transmission time so that sensing would be better.High sensing time degrades the performance of SU so a good optimization technique is needed to cope this problem.Here results shows that ROC curve of GA is better than PSO in terms of normalized throughput and sensing time.Different SNR values are taken to calculate the sensing time, probability of false alarm and maximum throughput.In GA, iteration is done until fittest particle is not found.However it can be found in very less iteration.
Fig 2 shows the graph of variation of probability of false alarm with probability of detection.The graph shows that probability of false alarm increases with the probability of detection in genetic algorithm.Fig 3 shows the graph normalized throughput (R n ) versus sending time (T s ) for both PSO and GA.Throughput is a unimodal function.It increases with sensing time, reaches a maximum and then falls.The throughput curve for GA is better than PSO, explaining that GA results in better throughput than PSO.The maximum normalized throughput offered by GA and PSO are 0.831 and 0.723 respectively.Fig 4 shows 3D curve for throughput, sensing time and probability of false alarm for varying SNR.The curve is shifted towards lower side of the graph as the SNR decreases.This shows that the throughput decreases and sensing time increases as SNR decreases.When the SNR is 0.9dB the value of probability of false alarm is 0.531, sensing time is 36 and throughput is 0.810.Fig 5 shows variation of probability of false alarm with sensing time.As the sensing time increases, the probability of false alarm falls.This means that SU has more opportunistic access to the spectrum.This will result in better throughput.Fig 6 shows the curve between cost function and number of iterations.It can be seen from the graph that at third iteration cost function is maximum at 12.So GA has lower complexity.It requires less number of iteration to converge to an optimal point.

Fig. 1 .
Fig. 1.Probability of false alarm Vs probability of detection