Journal of Computer and Communications
Vol.06 No.09(2018), Article ID:87326,13 pages

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

Abul Kalam Azad, Jugal K. Das, Imdadul Islam

Department of Computer Science and Engineering, Jahangirnagar University, Dhaka, Bangladesh

Copyright © 2018 by authors and Scientific Research Publishing Inc.

This work is licensed under the Creative Commons Attribution International License (CC BY 4.0).

Received: August 7, 2018; Accepted: September 14, 2018; Published: September 17, 2018


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).


Rayleigh Fading, MSE, Confusion Matrix, FC, NP

1. 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 (Eb/N0) 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. Eb/N0 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.

2. 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.

2.1. Basic Theory

The received signal of a SU can be expressed by two hypothesis model as [7] [8] ,

y ( n ) = { v ( n ) H 0 s ( n ) + v ( n ) H 1 (1)

where, n = 0 , 1 , 2 , , N 1 are the sampling instants, v(n) is awgn at receiving end and s(n) is the transmitted signal by a PU. Here the received signal vector y follows Gaussian pdf like, N ( 0 , σ 2 I ) under H0 and N ( μ , σ 2 I ) under H1.

Applying Neyman-Pearson (NP) detection rule,

N ( μ , σ 2 I ) N ( 0 , σ 2 I ) > γ

1 ( 2 π σ 2 ) N / 2 e 1 2 σ 2 n = 0 N 1 { y ( n ) A } 2 1 ( 2 π σ 2 ) N / 2 e 1 2 σ 2 n = 0 N 1 y 2 ( n ) > γ

Solving we get the test statistics,

1 N n = 0 N 1 y ( n ) = T ( y ) = σ 2 N A ln ( γ ) + A 2 = g (2)

It can be shown that the test statistics T(y) follows,

T ( y ) = { N ( 0 , σ 2 / N ) H 0 N ( A , σ 2 / N ) H 1 (3)

The pdf of T,

f T ( t ) = 1 exp { t 2 / ( 2 σ 2 / N ) } = 1 exp { N t 2 / 2 σ 2 } (4)

The probability of false alarm (under Hypothesis H0)

P F A = P ( T > g ) = 1 P ( T g ) = 1 F T (g)

where FT(g) is the cdf of T. Now the cdf of T can be expressd as,

F T ( g ) = g 1 exp { N t 2 / 2 σ 2 } d t = 1 Q ( g σ 2 / N ) ;

where Q ( x ) 1 x e t 2 / 2 d t

Therefore the probability of false alarm,

P F A = Q ( g σ 2 / N ) (5)

The probability of detection (under Hypothesis H1),

P D = P ( T > g ) = 1 P ( T g ) = 1 g 1 exp { N ( t A ) 2 / 2 σ 2 } d t = 1 Q ( A g σ 2 / N ) = Q ( g A σ 2 / N ) (6)

Combining Equation (5) and Equation (6),

P D = Q ( Q 1 ( P F A ) N A 2 σ 2 ) (7)

In fusion center (FC) three different types of decision is taken for proper detection as explained in [9] [10] . If the FC takes the decision using AND logic then,

P D _ F C = P D N and P F A _ F C = P F A N (8)

for OR logic case,

P D _ F C = 1 ( 1 P D ) N and P F A _ F C = 1 ( 1 P F A ) N (9)

and for majority decision case,

P D _ F C = j = N 2 N ( N j ) P D j ( 1 P D ) N j and P F A _ F C = j = N 2 N ( N j ) P F A j ( 1 P F A ) N j (10)

Recent papers deal with primary or secondary user emulation attack based on Equation (8) to Equation (10) to eliminate the malicious user at FC.

2.2. Simulation of Signal Detection under Awgn

Let the nth sample of received signal is x(n) and the mean of such N samples,

T = 1 N n = 0 N 1 x ( n ) 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:


1) Generate N Gaussian random variable with mean μ = 0 and variance σ2 using, x = s q r t ( v a r ) r a n d n ( N , 1 ) .

2) Compute, T = 1 N n = 0 N 1 x ( n ) .

3) Repeat step 1 and 2 to generate, T = [ T ( 1 ) T ( 2 ) T ( 3 ) T ( M ) ] .

4) Count the number of element of the array T exceeds the threshold γ. If this number is k then the probability P ( T > γ ) = k / M .

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, P ( T > γ ) = Q ( γ σ 2 / N ) = 0.5 e r f c ( γ 2 σ 2 / N ) . 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 H0 and 1−P(T > τ) under H1 provides the probability of detection.

2.3. 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,

f X ( x ) = x σ 2 e x 2 / 2 σ 2 ; where σ 2 is the variance of x. (11)

The cdf of x will be,

F X ( x ) = 1 2 σ 2 0 x 2 e y / 2 σ 2 d y = 1 e x 2 / 2 σ 2 (12)

Now solving for the r.v. x,

e x 2 / 2 σ 2 = 1 F X ( x ) x = σ ( 2 ln { 1 F X ( x ) } ) (13)

Here the cdf F X ( 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 expressed as [12] [13] ,

f Γ ( γ ) = 1 γ a v e γ γ a v ; where γ a v is the average SNR (14)

The cdf of γ ,

F Γ ( γ ) = 1 e γ γ a v (15)

Now solving for the r.v. γ ,

1 e γ γ a v = F Γ ( γ ) γ = γ a v ln ( 1 F Γ ( γ ) ) (16)

The cdf, F Γ ( γ ) is now a random number in the range of [0 1], to generate the SNR, γ follows Rayleigh pdf.

2.4. 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 X p = [ x p 1 x p 2 x p 3 x p N ] at pth instant as the input sequence;

2) The output of the jth node of hidden layer,

i p j = f h ( j = 1 L w j i h x p i + θ j h ) ;

where f h ( x ) is the activation function of hidden layer;

3) The final output of kth node,

o p k = f o ( j = 1 L w k j o i p j + θ k o ) ;

where f o ( x ) is the activation function of output;

4) Calculate error at output and hidden layer as,

δ p k o = ( y p k o p k ) f k o ( j = 1 L w k j o i p j + θ k o ) and δ p j h = f k h ( j = 1 L w j i h x p i + θ j h ) k δ p k o w k j o ;

5) The weight is updated on output and hidden layer as,

w k j o ( t + 1 ) = w k j o ( t ) + η δ p k o i p j and w j i h ( t + 1 ) = w j i h ( t ) + η δ p j h x i ;

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 wij is the weight between ith input and jth output then the output at ith output before the non-linear function f(.) is:

S i = j n w i j O j + x i Φ i ; for i = 1 , 2 , 3 , , n ;

where Oj is the output of jth neuron after the nonlinear function f(.), xi 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 wij = +1 or −1.

2) The input xi and output Oi are initialized as: xi = Oi(k) = +1 or −1; i = 1 , 2 , 3 , , n ; the threshold, Φi = 0 and k = 0.

3) Evaluate S i = j n w i j O j + x i Φ i and O i ( k ) = f ( j n w i j O j + x i Φ i ) ; where k = 1.

4) Evaluate O i ( k + 1 ) = f ( j n w i j O i ( k ) ) ; 0 j N 1.

5) Repeat step 4 until output remains unchanged.

The next section provides results based on both algorithms of this section.

3. 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 Figure 1(b) taking the random variable as SNR.


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

The simulation and analytical results of PD and PFA are compared in Figure 2 under awgn; where the results are found vary closed. The simulation results of PD and PFA 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 PD of above 80% or PF 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%.

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

Figure 3. Simulation results for Rayleigh fading case.

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. The 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% 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%.

Figure 4. Comparison of simulation of co-operative and non-cooperative CRN (CR = 4).

Figure 5. Profile of MSE of 4 sets of data.

Figure 6. Variation of “gradient” and “validation fail” against iteration.

Figure 7. Confusion matrices of data.

Figure 8. Regression on data sets.

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.

4. Conclusion

In this paper we use NN to observe the convergence of analytical and simulation 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.

Figure 9. Error histogram of the neural network.

Figure 10. Comparison of PD and PFA with Hopfield memory under awgn.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

Cite this paper

Azad, A.K., Das, J.K. and Islam, I. (2018) Signal Detection of Co-Operative Cognitive Radio Network under Neural Network. Journal of Computer and Communications, 6, 60-72.


  1. 1. Eun-Yeong, P., Moon-Gun, S., Wonseok, C. and Gi-Hong, I. (2016) Maximization of Long-Term Average Throughput for Cooperative Secondary System with HARQ-Based Primary System in Cognitive Radio Network. IEEE Communications Letters, 20, 356-359.

  2. 2. Shrishail, H. and Sarat, P. (2010) Transmission Rate Prediction for Cognitive Radio Using Adaptive Neural Fuzzy Inference System. 2010 5th International Conference on Industrial and Information Systems, ICIIS 2010, India, 29 July-1 August 2010, 92-97.

  3. 3. Hiremath, S., Sarat, P. and Amit, M. (2012) Extended Date Rate Prediction for Cognitive Radio Using ANFIS with Subtractive Clustering. 5th International Conference on Computer and Devices for Communication (CODEC), Kolkata, India, 17-19 December 2012, 1-4.

  4. 4. Jeich, M., Yow-Cheng, Y. and I-Fan, H. (2010) An ANFIS-IDS against De-Authentication DOS Attacks for a WLAN. ISITA 2010, Taichung, Taiwan, 17-20 October 2010, 548-553.

  5. 5. Nandkishor, J. and Bhavana, J. (2015) Optimized Fuzzy Power Control over Fading Channels in Spectrum Sharing Cognitive Radio Using ANFIS. 2nd International Conference on Signal Processing and Integrated Networks (SPIN), Noida, India, 19-20 February 2015, 329-333.

  6. 6. Cheng, L., Cindy, G., Asiya, K., Aly, S. and Yun, L. (2016) Predicting Types of Failures in Wireless Sensor Networks Using an Adaptive Neuro-Fuzzy Inference System. Ninth IEEE International Workshop on Selected Topics in Mobile and Wireless Computing, New York, 17-19 October 2016, 1-7.

  7. 7. Ping-Rong, L., Yin-Zong, C., Po-Hao, C. and Shiann-Shiun, J. (2018) Cooperative Spectrum Sensing and Optimization on Multi-Antenna Energy Detection in Rayleigh Fading Channel. The 27th Wireless and Optical Communications Conference (WOCC2018), Hualien, Taiwan, 30 April-1 May 2018, 1-5.

  8. 8. Rasheed, T., Adnan, R. and Ahmad, N. (2018) Cooperative Spectrum Sensing Using Fuzzy Logic for Cognitive Radio Network. 2018 Advances in Science and Engineering Technology International Conferences (ASET), Abu Dhabi, UAE, 6 February-5 April 2018, 1-6.

  9. 9. Liang, Y., Zeng, Y., Peh, E. and Hoang, T. (2008) Sensing-Throughput Tradeoff for Cognitive radio Networks. IEEE Transactions on Wireless Communications, 7, 1326-1337.

  10. 10. Subhankar, C., Santi, M. and Tamaghna, A. (2016) Energy Efficiency in Cooperative Cognitive Radio Network in the Presence of Malicious Users. IEEE Systems Journal, PP, 1-10.

  11. 11. Javad, S. and Sajad, M. (2014) On Optimal Spectrum Sensing Strategy for Cognitive Radio System under Primary User Emulation Attach. 2014th International Symposium on Telecommunications (IST’2014), Tehran, Iran, 9-11 September 2014, 1113-1116.

  12. 12. Sarwar, J., Imdadul, I. and Amin, M. (2017) Comparison of CSI and Fixed Gain Relay of Two-Hop Wireless Link under Small-Scale Fading. International Journal of Computer Science and Information Security, 15, 6-10.

  13. 13. Mounia, B., Faissal, B. and Hussain, B. (2018) Secrecy Outage Probability in Cognitive Radio Networks Subject to Rayleigh Fading Channels. 2018 International Conference on Advanced Communication Technologies and Networking (CommNet), Marrakech, Morocco, 17 May 2018, 1-5.

  14. 14. Nelly, W. and Restu, S. (2015) Scattered Object Recognition Using Hu Moment Invariant and Backpropagation Neural Network. 3rd International Conference on Information and Communication Technology (ICoICT), Nusa Dua, Bali, 27-29 May 2015, 578-583.

  15. 15. James, F. and David, M. (2009) Neural Networks Algorithms, Applications and Programming Techniques. Pearson Education, London.

  16. 16. Laurene, F. (2013) Fundamentals of Neural Networks Architectures, Algorithms and Applications. Pearson Education, London.