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

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

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

Department of Computer Science and Engineering, Jahangirnagar University, Dhaka, Bangladesh    Received: August 7, 2018; Accepted: September 14, 2018; Published: September 17, 2018

ABSTRACT

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

Keywords:

Rayleigh Fading, MSE, Confusion Matrix, FC, NP 1. Introduction

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   ,

$y\left(n\right)=\left\{\begin{array}{l}v\left(n\right)\text{ }\text{ }\text{ }\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }{H}_{0}\\ s\left(n\right)+v\left(n\right)\text{ }{H}_{1}\end{array}$ (1)

where, $n=0,1,2,\cdots ,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\left(0,{\sigma }^{2}I\right)$ under H0 and $N\left(\mu ,{\sigma }^{2}I\right)$ under H1.

Applying Neyman-Pearson (NP) detection rule,

$\frac{N\left(\mu ,{\sigma }^{2}I\right)}{N\left(0,{\sigma }^{2}I\right)}>\gamma$

$⇒\frac{\frac{1}{{\left(2\text{π}{\sigma }^{2}\right)}^{N/2}}{\text{e}}^{-\frac{1}{2{\sigma }^{2}}\underset{n=0}{\overset{N-1}{\sum }}{\left\{y\left(n\right)-A\right\}}^{2}}}{\frac{1}{{\left(2\text{π}{\sigma }^{2}\right)}^{N/2}}{\text{e}}^{-\frac{1}{2{\sigma }^{2}}\underset{n=0}{\overset{N-1}{\sum }}{y}^{2}\left(n\right)}}>\gamma$

Solving we get the test statistics,

$\frac{1}{N}\underset{n=0}{\overset{N-1}{\sum }}y\left(n\right)=T\left(y\right)=\frac{{\sigma }^{2}}{NA}\mathrm{ln}\left(\gamma \right)+\frac{A}{2}=g$ (2)

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

$T\left(y\right)=\left\{\begin{array}{l}N\left(0,{\sigma }^{2}/N\right)\text{ }\text{\hspace{0.17em}}{H}_{0}\\ N\left(A,{\sigma }^{2}/N\right)\text{ }\text{ }\text{ }{H}_{1}\end{array}$ (3)

The pdf of T,

${f}_{T}\left(t\right)=\frac{1}{\sqrt{\text{2π}}}\mathrm{exp}\left\{-{t}^{2}/\left(2{\sigma }^{2}/N\right)\right\}=\frac{1}{\sqrt{\text{2π}}}\mathrm{exp}\left\{-N{t}^{2}/2{\sigma }^{2}\right\}$ (4)

The probability of false alarm (under Hypothesis H0)

${P}_{FA}=P\left(T>g\right)=1-P\left(T\le g\right)=1-{F}_{T}\left(g\right)$

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

${F}_{T}\left(g\right)=\underset{-\infty }{\overset{g}{\int }}\frac{1}{\sqrt{\text{2π}}}\mathrm{exp}\left\{-N{t}^{2}/2{\sigma }^{2}\right\}\text{d}t=1-Q\left(\frac{g}{\sqrt{{\sigma }^{2}/N}}\right)$ ;

where $Q\left(x\right)\frac{1}{\sqrt{\text{2π}}}\underset{x}{\overset{\infty }{\int }}{\text{e}}^{-{t}^{2}/2}\text{d}t$

Therefore the probability of false alarm,

${P}_{FA}=Q\left(\frac{g}{\sqrt{{\sigma }^{2}/N}}\right)$ (5)

The probability of detection (under Hypothesis H1),

$\begin{array}{c}{P}_{D}=P\left(T>g\right)=1-P\left(T\le g\right)=1-\underset{-\infty }{\overset{g}{\int }}\frac{1}{\sqrt{\text{2π}}}\mathrm{exp}\left\{-N{\left(t-A\right)}^{2}/2{\sigma }^{2}\right\}\text{d}t\\ =1-Q\left(\frac{A-g}{\sqrt{{\sigma }^{2}/N}}\right)=Q\left(\frac{g-A}{\sqrt{{\sigma }^{2}/N}}\right)\end{array}$ (6)

Combining Equation (5) and Equation (6),

${P}_{D}=Q\left({Q}^{-1}\left({P}_{FA}\right)-\sqrt{\frac{N{A}^{2}}{{\sigma }^{2}}}\right)$ (7)

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

${P}_{D_FC}={P}_{D}^{N}$ and ${P}_{FA_FC}={P}_{FA}^{N}$ (8)

for OR logic case,

${P}_{D_FC}=1-{\left(1-{P}_{D}\right)}^{N}$ and ${P}_{FA_FC}=1-{\left(1-{P}_{FA}\right)}^{N}$ (9)

and for majority decision case,

${P}_{D_FC}=\underset{j=⌈\frac{N}{2}⌉}{\overset{N}{\sum }}\left(\begin{array}{l}N\\ j\end{array}\right){P}_{D}^{j}{\left(1-{P}_{D}\right)}^{N-j}$ and ${P}_{FA_FC}=\underset{j=⌈\frac{N}{2}⌉}{\overset{N}{\sum }}\left(\begin{array}{l}N\\ j\end{array}\right){P}_{FA}^{j}{\left(1-{P}_{FA}\right)}^{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=\frac{1}{N}\underset{n=0}{\overset{N-1}{\sum }}x\left(n\right)$ 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, $x=sqrt\left(var\right)\ast randn\left(N,\text{1}\right)$ .

2) Compute, $T=\frac{1}{N}\underset{n=0}{\overset{N-1}{\sum }}x\left(n\right).$

3) Repeat step 1 and 2 to generate, $T=\left[\begin{array}{lllll}T\left(1\right)\hfill & T\left(2\right)\hfill & T\left(3\right)\hfill & \cdots \hfill & T\left(M\right)\hfill \end{array}\right].$

4) Count the number of element of the array T exceeds the threshold γ. If this number is k then the probability $P\left(T>\gamma \right)=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  or the rules of   .

The theoretical value, $P\left(T>\gamma \right)=Q\left(\frac{\gamma }{\sqrt{{\sigma }^{2}/N}}\right)=0.5erfc\left(\frac{\gamma }{\sqrt{2{\sigma }^{2}/N}}\right)$ . 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}\left(x\right)=\frac{x}{{\sigma }^{2}}{\text{e}}^{-{x}^{2}/2{\sigma }^{2}}$ ; where ${\sigma }^{2}$ is the variance of x. (11)

The cdf of x will be,

$\therefore {F}_{X}\left(x\right)=\frac{1}{2{\sigma }^{2}}\underset{0}{\overset{{x}^{2}}{\int }}{\text{e}}^{-y/2{\sigma }^{2}}\text{d}y=1-{\text{e}}^{-{x}^{2}/2{\sigma }^{2}}$ (12)

Now solving for the r.v. x,

$\begin{array}{l}{\text{e}}^{-{x}^{2}/2{\sigma }^{2}}=1-{F}_{X}\left(x\right)\\ ⇒x=\sigma \sqrt{\left(-2\mathrm{ln}\left\{1-{F}_{X}\left(x\right)\right\}\right)}\end{array}$ (13)

Here the cdf ${F}_{X}\left(x\right)$ is actually a probability can be treated as a random number over [0 1].

In wireless communication the Rayleigh pdf of instantaneous SNR, $\gamma$ is expressed as   ,

${f}_{\Gamma }\left(\gamma \right)=\frac{1}{{\gamma }_{av}}{\text{e}}^{-\frac{\gamma }{{\gamma }_{av}}}$ ; where ${\gamma }_{av}$ is the average SNR (14)

The cdf of $\gamma$ ,

${F}_{\Gamma }\left(\gamma \right)=1-{\text{e}}^{-\frac{\gamma }{{\gamma }_{av}}}$ (15)

Now solving for the r.v. $\gamma$ ,

$\begin{array}{l}1-{\text{e}}^{-\frac{\gamma }{{\gamma }_{av}}}={F}_{\Gamma }\left(\gamma \right)\\ \therefore \gamma =-{\gamma }_{av}\mathrm{ln}\left(1-{F}_{\Gamma }\left(\gamma \right)\right)\end{array}$ (16)

The cdf, ${F}_{\Gamma }\left(\gamma \right)$ is now a random number in the range of [0 1], to generate the SNR, $\gamma$ 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   .

1) Apply the vector ${X}_{p}=\left[{x}_{p1}\text{\hspace{0.17em}}{x}_{p2}\text{\hspace{0.17em}}{x}_{p3}\text{\hspace{0.17em}}\cdots \text{\hspace{0.17em}}{x}_{pN}\right]$ at pth instant as the input sequence;

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

${i}_{pj}={f}^{h}\left(\underset{j=1}{\overset{L}{\sum }}{w}_{ji}^{h}{x}_{pi}+{\theta }_{j}^{h}\right)$ ;

where ${f}^{h}\left(x\right)$ is the activation function of hidden layer;

3) The final output of kth node,

${o}_{pk}={f}^{o}\left(\underset{j=1}{\overset{L}{\sum }}{w}_{kj}^{o}{i}_{pj}+{\theta }_{k}^{o}\right)$ ;

where ${f}^{o}\left(x\right)$ is the activation function of output;

4) Calculate error at output and hidden layer as,

${\delta }_{pk}^{o}=\left({y}_{pk}-{o}_{pk}\right){{f}^{\prime }}_{k}^{o}\left(\underset{j=1}{\overset{L}{\sum }}{w}_{kj}^{o}{i}_{pj}+{\theta }_{k}^{o}\right)$ and ${\delta }_{pj}^{h}={{f}^{\prime }}_{k}^{h}\left(\underset{j=1}{\overset{L}{\sum }}{w}_{ji}^{h}{x}_{pi}+{\theta }_{j}^{h}\right)\underset{k}{\overset{}{\sum }}{\delta }_{pk}^{o}{w}_{kj}^{o};$

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

${w}_{kj}^{o}\left(t+1\right)={w}_{kj}^{o}\left(t\right)+\eta {\delta }_{pk}^{o}{i}_{pj}$ and ${w}_{ji}^{h}\left(t+1\right)={w}_{ji}^{h}\left(t\right)+\eta {\delta }_{pj}^{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}=\underset{j}{\overset{n}{\sum }}{w}_{ij}{O}_{j}+{x}_{i}-{\Phi }_{i}$ ; for $i=1,2,3,\cdots ,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   :

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,\cdots ,n$ ; the threshold, Φi = 0 and k = 0.

3) Evaluate ${S}_{i}=\underset{j}{\overset{n}{\sum }}{w}_{ij}{O}_{j}+{x}_{i}-{\Phi }_{i}$ and ${O}_{i}\left(k\right)=f\left(\underset{j}{\overset{n}{\sum }}{w}_{ij}{O}_{j}+{x}_{i}-{\Phi }_{i}\right)$ ; where k = 1.

4) Evaluate ${O}_{i}\left(k+1\right)=f\left(\underset{j}{\overset{n}{\sum }}{w}_{ij}{O}_{i}\left(k\right)\right)$ ; $0\le j\le 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.

(a)(b)

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. https://doi.org/10.4236/jcc.2018.69006

References

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. https://doi.org/10.1109/LCOMM.2015.2504365

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. https://doi.org/10.1109/ICASET.2018.8376914

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. https://doi.org/10.1109/TWC.2008.060869

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.