Signal Detection of Co-Operative Cognitive Radio Network under Neural Network

In this paper the analytical and simulation results of probability of detection and false alarm of a co-operative cognitive radio network are compared under both awgn and Rayleigh fading environment. After getting the confidence level of above 95% from the simulation, a neural network (NN) is trained with simulation data where the analytical result is given as the target of the NN. Finally the results are verified with the profile of MSE (mean square error) of three data set (train, validation and test), regression on data set, confusion matrices and error histogram. Here we use Backpropagation algorithm and Hopfield model, all the results yield error of less than 4.5%. The concept of paper is applicable at fusion center (FC) to make proper judgment of presence of primary user (PU).


Introduction
Recently huge work is going on cooperative cognitive radio network (CRN) to enhance sensitivity of the receiver under fading channel.In [1] authors proposed a model of a cooperative CR network; where a pair of SU transmitter and SU receiver coexists with a pair of PU transmitter and PU receiver.The variation of "outage probability of primary system" and "long term average throughputs" is shown against transmission rate.The performance of CRN is also measured using neural network and few literature review of corresponding field is also shown in results section.In [2] authors applied ANFIS model in cognitive radio network.Here two membership functions are used for each input and shows the accuracy of predicated data rate graphically.Similar job is done in [3] using three membership function.In [4] ANFIS is used in minimizing the detection delay under denial-of-service (DOS) attacks of WLAN.Authors deal with the network at medium access control (MAC) layer since the upper layers of TCP/IP is almost same for wired and wireless network.In result section the paper shows the variation of average detection delay (ADD) and average false alert rate (FAR) taking "non-parametric sequential change point detection" (NPSCPD) and ANFIS algorithm as the parameters; where ANFIS shows better performance compared to NPSCPD.In [5] spectrum sensing of CRN is done using ANFIS under Rayleigh fading channel considering SNR of PU and gain of interfering channel as the as input parameter.The performance of the network is measured plotting BER vs. the ratio of energy per bit to Noise power (E b /N 0 ) under PSK scheme.ANFIS model includes power control scheme which is compared with the conventional scheme of without power control, where the ANFIS model shows better result in BER vs. E b /N 0 plot.In wireless sensor network the performance is degraded due to poorly deployed environment and human movements.
Three ANFIS models are developed in [6] to observe the case of link failure under above two phenomena.These two parameters are predicted using ANFIS model where authors claim the accuracy of 96%.In this paper the simulated received signal under awgn and Rayleigh fading is applied in a NN for training purpose and the analytical result is taken as the target.The trained NN can help a single secondary user (SU) or a FC in spectrum sensing to avoid false alarm (FA) or misdetection.Finally the data convergence of simulation work under BP and Hopfield model are used to aid an FC to take the correct decision.
The entire paper is organized as, Section 2 provides statistical analysis of co-operative CRN and its simulation, signal detection under Rayleigh fading channel and modeling of neural network to train with simulation data, Section 3 provides results based on analysis of Section 2 and Section 4 concludes entire analysis.

System Model
This section provides both theoretical analysis and simulation algorithm of co-operative CRN in determination of false alarm and detection.Next the way of training of a NN under back propagation and Hopfield model is given explicitly.

Basic Theory
The received signal of a SU can be expressed by two hypothesis model as [7] [8], where, 0,1, 2 It can be shown that the test statistics T(y) follows, The pdf of T, ( ) The probability of false alarm (under Hypothesis H 0 ) where F T (g) is the cdf of T. Now the cdf of T can be expressd as, where ( ) ∫ Therefore the probability of false alarm, The probability of detection (under Hypothesis H 1 ), Combining Equation ( 5) and Equation ( 6), ( ) In fusion center (FC) three different types of decision is taken for proper de-Journal of Computer and Communications and for majority decision case, ( ) Recent papers deal with primary or secondary user emulation attack based on Equation (8) to Equation (10) to eliminate the malicious user at FC.

Simulation of Signal Detection under Awgn
Let the nth sample of received signal is x(n) and the mean of such N samples, ( ) is taken as a random variable under normal distribution, N(μ, σ 2 /N).We have to determine the probability of the random variable T exceeds a threshold value γ.The steps of Monte Carlo simulation are shown below: Algorithm 1) Generate N Gaussian random variable with mean μ = 0 and variance σ 2 using, 2) Compute, ( ) 3) Repeat step 1 and 2 to generate, ( ) ( ) ( ) ( ) Count the number of element of the array T exceeds the threshold γ.If this number is k then the probability ( ) 5) In co-operative spectrum sensing technique, each CR sense the signal and sends its decision in FC (fusion center) to take the final decision based on k-out-of-N voting rule of [11] or the rules of [9] [10].
The theoretical value, ( ) . In a CRN, if the threshold SNR at receiving end is taken as, γ = τ then P(T > τ) = k/M provides the probability of false alarm under Hypothesis H 0 and 1−P(T > τ) under H 1 provides the probability of detection.

Simulation of Signal Detection under Rayleigh Fading Channel
First of all let us simulate the probability density function (pdf) of Rayleigh distributed random variable.Let x is a random variable follows Rayleigh pdf like, ( ) ; where 2 σ is the variance of x. (11)     A The cdf of x will be, ( ) Now solving for the r.v.x, ( ) Here the cdf ( ) x is actually a probability can be treated as a random number over [0 1].
In wireless communication the Rayleigh pdf of instantaneous SNR, γ is ex- pressed as [12] [13], ( ) ; where av γ is the average SNR ( 14) The cdf of γ , ( ) Now solving for the r.v.γ , ) The cdf, ( ) Γ is now a random number in the range of [0 1], to generate the SNR, γ follows Rayleigh pdf.

Training of Neural Network
Let us now train a neural network with simulated false alarm, detection and SNR; where the theoretical false alarm and detection is taken as the target value.In this section first we use backpropagation algorithm then Hopfield algorithm.In back propagation algorithm (BP) the signal flows in forward direction i.e. from input to output through hidden layers.The output and the desired signal are compared and error is detected.The weighting vector at the input terminals of output nodes is changed using steepest descent algorithm to reduce the amount of error.The weight vector of hidden layers is updated using same algorithm from the expression of error at those layers.The process is continued till the input of first hidden layer i.e. error reduction operation (or update of weight) flows in backward direction.The above procedure is iterated till error at output falls below the threshold.
For simplicity of understanding let us consider an ANN of three layers.The steps of BP are given bases on [14] [15].
1) Apply the vector at pth instant as the input sequence; 2) The output of the jth node of hidden layer, where ( ) h f x is the activation function of hidden layer; 3) The final output of kth node, 4) Calculate error at output and hidden layer as, ( ) The weight is updated on output and hidden layer as, ( ) ( ) when error becomes less than a threshold for the training vector then algorithm stops.The algorithm next selects another input vector and its desired vector.
In this paper we also use Hopfield model to merge simulation and theoretical results.In Hopfield model the processing unit has two outputs: inverting and non-inverting.Each output is connected back to the all inputs except itself.If w ij is the weight between ith input and jth output then the output at ith output before the non-linear function f(.) is: where O j is the output of jth neuron after the nonlinear function f(.), x i is the external input at node i, and Φ i is the threshold of ith neuron.The Hopfield algorithm flows the steps like [15] [16]: 1) Initialize weights w ij = +1 or −1.
2) The input x i and output O i are initialized as:  ; the threshold, Φ i = 0 and k = 0.

4) Evaluate
( ) ( ) The next section provides results based on both algorithms of this section.

Results
The simulation results of Rayleigh fading taking the random variable as voltage or current are given in Figure 1(a) where the upper curve reveals the theoretical pdf and the lower one is that of simulation.The similar results are shown in  The simulation and analytical results of P D and P FA are compared in Figure 2 under awgn; where the results are found vary closed.The simulation results of P D and P FA under Rayleigh fading case are shown in Figure 3. Comparing Figure 2 and Figure 3 we found that Rayleigh fading environment needs more SNR to attain P D of above 80% or P F of below 8% compared to awgn.For each point of Figure 2 and Figure 3 we consider average of 1000 random numbers and found the confidence level of above 95%.Next we made simulation of co-operative CRN with CR = 4 under a fusion center and found the results of Figure 4 where the performance of co-operative CRN is found better than the case of spectrum sensing of single SU.
Here the entre input data (simulation data) is divided into three parts: 70% data for training purpose, 15% for validation (to minimize overfitting) and 15% for test (to verify that the accuracy).The profile of above three data sets is shown in Figure 5 including the point of best matched; where the mean square error is plotted against the number of epochs/iterations.After 18 iterations, the MSE tends to increase hence iteration is sopped and provides the minimum MSE of 10 −3 .The corresponding gradient and validation check a shown in Figure 6 where the "gradient" falls and "validation fail" rises after 18 iterations.
The output of the trained neural network and the target is compared by confusion matrix; where the rows and columns are the output and target respectively.mismatch is found shown in Figure 7, which is less than 4.5% as mentioned in abstract of the paper.The regression on three sets of data and also overall data is shown in Figure 8; where the scattered data is found very much correlated with output vs. target line.The overall correlation coefficient is found 98.83 hence error is less than 1.5%.In error histogram x-axis is the error, which is actually the difference between targets and outputs and y-axis is frequency of data (three types of data: training, validation and test).The most of the data lies between error of −0.03749 to 0.01823 and maximum data stays on error, e = 0.00034 as shown in Figure 9.
Very little test data are found on outside, need to be checked for validation.
Finally we apply Hopfield model to observe the convergence of theoretical and simulation work as shown in Figure 10.Here the convergence is found little inferior, compared to back-propagation model but process time is found almost half.Such model is applicable when FC experiences huge traffic flow.

Conclusion
In this paper we use NN to observe the convergence of analytical and simulation

tection as explained in [ 9 ]
[10].If the FC takes the decision using AND logic then, the activation function of output;

Figure 1 (
Figure 1(b) taking the random variable as SNR.

Figure 1 .
Figure 1.Comparison of pdf of theoretical and simulation.(a) Signal as current/voltage; (b) Random variable as SNR.

Figure 2 .
Figure 2. Comparison of simulation and analytical results for awgn.

Figure 3 .
Figure 3. Simulation results for Rayleigh fading case.
Simulation of PD under Rayleigh Simulation of PF under Rayleigh Journal of Computer and CommunicationsThe error of three types of data (training, validation and test) is shown by first three matrices and the fourth one shows the overall results where only 4.1%

Figure 5 .
Figure 5. Profile of MSE of 4 sets of data.
Simulation PFA Non-co-operative Simulation PFA Co-operative Simulation PD Non-co-operative Simulation PD Co-
results of co-operative CRN under both awgn and Rayleigh fading channel.A fusion center (FC) can use such model to get the feedback from a set of SUs to avoid false alarm and misdetection more confidently.Because of nonlinear relation between SNR and probability of detection or false alarm, we can train convolutional NN under the concept of deep learning in future for comparison with the present work.Still we have the scope of inclusion of PUEA (Primary User Emulation Attack) to observe the degradation of performance as shown in the paper.