Machine Learning-Based Node Selection for Cooperative Non-Orthogonal Multi-Access System Under Physical Layer Security

Cooperative non-orthogonal multi access communication is a promising paradigm for the future wireless networks because of its advantages in terms of energy efficiency, wider coverage, and interference mitigating. In this paper, we study the secrecy performance of a downlink cooperative non-orthogonal multi access (NOMA) communication system under the presence of an eavesdropper node. Smart node selection based on feed forward neural networks (FFNN) is proposed in order to improve the physical layer security (PLS) of a cooperative NOMA network. The selected cooperative relay node is employed to enhance the channel capacity of the legal users, where the selected cooperative jammer is employed to degrade the capacity of the wiretapped channel. Simulations of the secrecy performance metric namely the secrecy capacity (CS ) are presented and compared with the conventional technique based on fuzzy logic node selection technique. Based on our simulations and discussions the proposed technique outperforms the existing technique in terms of the secrecy performance.


INTRODUCTION
The increasing growth of wireless communication systems has led to eavesdropping attacks.In order to overcome this issue, the enhancement of security in wireless networks becomes an essential factor.

MOTIVATION AND RELATED LITERATURE
The concept of physical layer security (PLS) has been proposed to complement the traditional security solutions such as the cryptographic techniques [1], by exploiting the physical layer properties of the wireless communication network.The baseline of Shannon's cipher system [2] and the developments of Aaron Wyner's Wiretap channel [3] introduce the interests of using the physical wireless characterization to enhance the security of data transmission [4].
Cooperative relay communication is a promising concept for wireless networks due to the advantages of energy efficiency, increasing the coverage and mitigating the interference [5].The authors of [6] suggest the use of jamming signals generated from the destination node to attack an un-trusted relay that is assumed to be the eavesdropper node.The secrecy performance of this strategy is analyzed in terms of the secrecy outage probability (SOP) metric.The authors of [7] illustrate the benefits and uses of the untrusted relay node in cooperative networks.Moreover, several strategies have been considered in the literature in order to improve the PLS such as cooperative jamming [8]- [9], cognitive radio [10], and energy harvesting [11].time slot, subcarrier, or spreading code.The NOMA principle is a general framework, and several recently proposed 5G multiple access schemes can be viewed as special cases.In [13], the authors consider the use of a relay node with two protocols (amplify-and-forward, and decode-and-forward) in a cooperative NOMA system.The authors of [14] investigate the optimal designs of a NOMA system in terms of the transmission rates, power allocation for each user, and the decoding factor.In [15], NOMA system is considered in large scale communication system.In this strategy, the PLS is implemented by using artificial noise generated from each user node.
Smart node selection is an essential and useful strategy in cooperative NOMA communication networks in terms of enhancing the secrecy performance, saving power and expanding the coverage area.In [16], the authors consider the combination of cooperative relay and jammer selection based on the buffer-aided cooperative node selection scheme.The secrecy performance of this strategy is analyzed in terms of SOP metric.Recently, the integration of cooperative node selection with the artificial intelligence based on fuzzy logic controller strategy has been proposed to enhance the accuracy of the cooperative node selection strategy.
Motivated by this integration, the authors of [17] propose a relay selection algorithm for a cooperative wireless sensor networks using fuzzy logic in order to enhance the lifetime and throughput of the network.In [18], the authors propose a relay selection scheme for multi-user cooperative network, where the cooperative relay node is selected based on fuzzy logic employed at the base station node.The authors consider four criteria (SNR, social norm, distance and relays protocol) in the relay selection process based on the channel state information (CSI) available at the base station.Authors of [19] use a relay selection strategy based on fuzzy logic with optimal power allocation and adaptive data rate.The authors considered two cases based on the geographical location of the nodes, where in the first case the distance between the source, relay and the destination are unknown.However, in the second case each node is assumed to know the geographical location of the other nodes.
Machine learning is a widely growing field in recent modern technologies.This technology has been integrated with various fields such as, security [20], signal and image processing [21], and wireless communication networks [22].In security, machine learning techniques such as neural networks have been investigated and illustrated in considerable researches.In [23], the authors use the artificial neural networks (ANNs) technique as a relay selection method in a detect-and-forward multi-relaying network.The aim of using this method is to enhance the physical layer security of the network.Thus, the transmission between a source and a destination is secure in the presence of an eavesdropper node.Authors of [24] exploit two machine learning based physical layer security techniques namely, Naïve Bayes (NB) and support vector machine (SVM).The authors investigate the benefits of machine learning approach in order to improve the physical layer security in the presence of MIMO-Multi-antenna eavesdropper nodes.In wireless communication networks, machine learning approach has been used in several researches such as channel estimation [25], power allocation [26], and best antenna selection [27].
Based on [17], the network lifetime and end-to-end throughput is enhanced by using node selection based on artificial intelligence strategies.To the best of the authors' knowledge, applying the smart node selection based on neural network methods in cooperative NOMA system under the physical layer security has not been adequately investigated in the literature.In this paper, the smart node selection based on feed forward neural networks integrated with the null-steering jamming strategy in a cooperative NOMA network is analysed to select the best cooperative relay or jammer nodes in the presence of an eavesdropper node.

MAIN CONTRIBUTIONS
Unlike the summarized papers above, this paper investigates the secrecy capacity of a cooperative NOMA communication network integrated with a smart node selection strategy based on feed forward neural networks.The main contributions of this paper are summarized as follows.
• We integrate the use of jammer and relay nodes to degrade the capacity of the eavesdropper node and enhance the capacity of the user node respectively.We use the null-steering beamforming technique to direct the shared jamming signal towards the eavesdropper node.• We employ the feed forward neural network (FFNN) strategy in order to select the best cooperative node for the relaying or jamming techniques.This approach is compared with another selection approach based on fuzzy logic strategy.
The rest of this paper is organized as follows.Section 2 demonstrates the system model and the signal transmission.Section 3 presents the node selection strategies.Section 4 explains the secrecy performance analysis of the system model.Section 5 shows the results and discussions of the paper.Finally, section 6 presents the conclusion of this paper.

SYSTEM MODEL
We consider a secure non-orthogonal multi access (NOMA) system, where a base station (B s ) communicates with a strong user (U ser 1 ) (good channel conditions) and a weak user (U ser 2 ) (poor channel conditions) in the presence of a passive eavesdropper node which is able to monitor the main channel, as shown in Figure 1.The cooperative helper nodes (R 1 , R 2 , ..., R N ) are employed to enhance the secrecy performance of the communication scenario.In this system model, the users and the eavesdropper nodes are equipped with a single antenna.However, the helper nodes are equipped with M antennas.Moreover, the transmission time is divided to time frames in which each time frame is divided into two time slots (phases).
In this system model, we assumed that the eavesdropper node is a passive communication node which has no access to the information signal transmitted to the receiver node.Moreover, we assumed that the eavesdropper node has the ability of differentiating and detecting the superimposed data transmitted from the base station to the users [28].This assumption provides the lower bounds for the practical scenario, where the eavesdropper node is given a strong decoding capabilities.

COOPERATIVE HELPER (RELAY AND JAMMER) NODES
Cooperative communication techniques are employed either to strengthening the legal main channel of the user nodes (by using cooperative relay nodes) or to degrade the illegal wiretapped channel of the eavesdropper node (by using cooperative jammer node) [29]- [30].The use of these techniques enhances significantly the secrecy performance of the NOMA system.In this paper, we used both techniques in order to have a secure communication between the base station and the user nodes.Moreover, the eavesdropper's channel state information (CSI) is assumed to be available at the base station and the cooperative helper nodes [32].The cooperative helper node is selected as a cooperative relay node or a cooperative jammer by using a node selection method based on fuzzy logic and feed forward neural networks strategies.
In this paper, the relay is assumed to be a half-duplex two-way with an amplify-and-forward protocol.
The relay is used as transmission node between the base station and the users with no direct channel between base station and users.Thus, the communication happens in two time slots (phases) as illustrated in Figure 1.
Moreover, the cooperative relay node is used in order to enhance and improve the channel capacity of the user nodes.
In this work, the cooperative jammer node uses the CSI information to build a jamming-null-steering beamforming strategy, where the shared jamming signals generated by the users are directed to the eavesdropper node.However, the shared jamming signals are nulled in the directions of the legal user nodes.This strategy ensures that the communication channel between the friendly jammer and the legal user nodes is not available.Thus, the channel capacity of the eavesdropper node is degraded without affecting the legal user nodes.The jamming-null-steering beamforming at the jammer node is expressed as, where, I M is the identity matrix with M * M , W is the projection matrix to the orthogonal subspace of the legal user nodes with , and h R j ,U 1 , h R j ,U 2 and h R j ,E are the channel gains between the friendly jammer node and the legal user nodes (U 1 ,U 2 ) and the eavesdropper node respectively.

CHANNEL ASSUMPTIONS
In this model, the communication links between the nodes are assumed to be Rayleigh fading channel with exponential path loss.The coefficient of a channel link between two nodes is expressed by h ab , where a is the node where the transmission starts and, b is the node where the transmission ends.These coefficients are modelled as constant and identically distributed at the transmission phases.Moreover, the channel state information (CSI) of the users and the eavesdropper nodes are assumed to be perfectly available at the base station and the cooperative helper nodes.However, In practice, the user nodes estimate the absolute values of the CSI from the cooperative nodes to the eavesdropper node then feed it back to the base station via the cooperative nodes.Furthermore, the noise is assumed to be a complex additive white Gaussian noise (AWGN) with zero mean and unit variance.

SIGNAL TRANSMISSION MODEL
This section explains the flow of the transmitted superimposed information signal from the base station to the user nodes via the cooperative relay node and under the protection of the cooperative jammer node.
In the first phase, the base station transmits the superimposed information signals to the helper nodes.
The received signal at each helper node is written as, where, P B S is the power of the base station,a u 1 and a u 2 are the power allocation coefficient for user 1 and user 2 respectively, x 1 and x 2 are the information to user 1 and user 2 respectively, h B S,R i is the channel gain between the base station and the helper node, the subscript i stands for the number of the cooperative helper node, B U 1 , B U 1 are the maximum ratio transmission beamforming vector build by the base station for the strong user and the weak user respectively, and n B S,R i is the AWGN noise from the base station to the helper node.At the same phase, user 1 and user 2 generate jamming signals and share these signals.The shared jamming signals are given as, where, P u 1 and P u 2 are the powers of the users respectively, j 1 and j 2 are the artificial jamming signals from user 1 and user 2 respectively, h u 1 ,u 2 and h u 2 ,u 1 are the channel gains between the users, and n to the helper nodes.The received jamming signal at each helper node is given as, where, h u 1 ,R i is the channel gain between the strong user and the helper node and n u 1 ,R i is the AWGN noise from the strong user to the helper node.
At this stage each helper node is aware of the received signals from the legitimate nodes.These signals are summarised as follows.
• The superimposed information signal transmitted by the base station.Equation 2 illustrates the superimposed information signal received at the helper nodes.
• The shared jamming signal transmitted by strong user.Equations 3 and 4 demonstrate the shared jamming signal received at the helper nodes.
In the second phase, the selected cooperative relay node amplifies-and-forwards the superimposed information signal to the user nodes.The amplification factor (A F ) is expressed as [33], where, P R s is the power of the selected cooperative relay node, the subscript s stands for the selected cooperative relay node, and σ denotes the variance of the AWGN noise.
The forwarded signal to the strong user (user 1 ) is expressed as, The forwarded signal to the weak user (user 2 ) is expressed as, At the same phase, the eavesdropper wiretaps the main channel in order to receive the transmitted signal from the cooperative relay to the user nodes.However, the selected cooperative jammer node directs the shared jamming signal towards the eavesdropper node.The received signal at the eavesdropper node under the protection of the selected cooperative jammer node is given as, where, N B E is the jamming-null-steering beamforming vector build by the selected cooperative jammer node, h R j ,E is the channel gain between the selected cooperative jammer node and the eavesdropper node, and the subscript j stands for selected cooperative jammer node.

SMART NODE SELECTION STRATEGIES
In this section, we illustrate the cooperative node selection based on fuzzy logic (FL) and feed forward neural network (FFNN) strategies.

FUZZY LOGIC SELECTION
We mapped the maximum normalized SN R U into low, medium and high as shown in Figure 3  Power amplification factor is a direct aspect to enhance the capacity of the main communication channels between the selected cooperative relay node and the legal user nodes.Equation ( 5) is used in order to calculate the power amplification factor.We mapped the normalized power amplification factor into low, medium, high and very high as shown in Figure 3 (b).
• Distance between the cooperative helper and legal user nodes (D U ) The helper location has significant impact on average achievable rate at the receiver nodes.The distances between the helper nodes and the legal user nodes are calculated as, where, X U 1 , X U 2 and X R i are the coordinates of the horizontal axis for user 1 , user 2 and the cooperative helper node i , and Y U 1 , Y U 2 and Y R i are the coordinates of the vertical axis for user 1 , user 2 and the cooperative helper node i .In this work, we choose the minimum distance between the cooperative helper and legal nodes.The minimum distance is given as, We mapped the normalized minimum distance (D U ) into long, medium and short as shown in Figure 3 (c).
• Signal to noise ratio (for the eavesdropper SN R E ) The SNR values for the eavesdropper node is expressed as, where, m ∈ (U 1 ,U 2 ).We mapped the normalized SN R E into low, medium and high as shown in Figure 4 (a).
• Distance between the cooperative helper and the eavesdropper (D E ) The distances between the helper nodes and the eavesdropper node are calculated as, We mapped the normalized distance (D E ) into long, medium and short as shown in Figure 4 (b).
• The cooperative helper node is selected as the best relay (R S ) In this work, the priority is given to the relay selection.In other words, the output for the degree of relay node relevance is fed as an input for the jammer node selection.Hence, if the cooperative helper node is selected as a relay then the degree of jammer relevance for that node is very bad.We mapped the relay node selection into true and false as shown in Figure 4 (c).
This step is summarized as follows.
• The required parameters are gathered based on the available channel state information (CSI) at the base station node.
• Each parameter is mapped in a fuzzy set. the fuzzy sets are as follows.

. Process of Fuzzification
In this step, we use the fuzzy inference system (FIS) to obtain the fuzzy sets Z r and Z j that maps the degree of relevance for relay and jammer respectively.However, these fuzzy sets are a description of The relevance fuzzy sets are given as.
Z r ∈ { Very bad, Bad, Medium, Good, Very good } Z j ∈ { Very bad, Bad, Medium, Good, Very good} (16) where, very bad, bad, medium, good, and very good are the degree of relevance for each cooperative node.In other word, if the degree of relaying relevance for any cooperative node is very good, then the probability of selecting this node as a relay is high.Figure 5 shows the membership function for the relay and jammer nodes relevance fuzzy sets respectively.In this work, we use AND logic in determining the fuzzy rules and in order to map the input fuzzy sets (SN R U , P AF , D U , SN R E , D U , R S ) into the relevance fuzzy sets (Z r , Z j ).Table 1 summarizes the fuzzy rules for the cooperative relay selection scheme.In this paper, we have 36 fuzzy rules for the cooperative relay selection scheme and 18 fuzzy rules for the cooperative jammer selection scheme.Note that the priority is for the cooperative relay selection scheme, so the cooperative relay node is selected first, then the cooperative jammer node is selected.Table 2 summarizes the fuzzy rules for the cooperative jammer selection scheme.This section illustrates the process of obtaining the output (degree of (relay or jammer) relevance).In order to obtain the outputs of the fuzzy logic system we used the process of crisp output center of sum defuzzification method denoted as z cr i sp .Firstly, the fuzzy logic controller calculates the geometric centre of area defined as CO A for all the membership function of the relay and jammer degree of relevance [34].The geometric centre of area is given as, Finally, the controller calculates weighted average for the geometric centre of area for all the membership function of the relay and jammer degree of relevance.The weighted average for the geometric centre of area is given as, where, A is the area under the scaled membership functions for the relay (A z r i ) and jammer (A z j i ) degree of relevance and within the range of the output variable.

MACHINE LEARNING-BASED FEED FORWARD NEURAL NETWORK SELECTION
In this paper, a machine learning FFNN-based algorithm is proposed in order to select the best cooperative relay and jammer nodes respectively.In this section, the main steps for the proposed strategy are explained in detail.

Input Data Generation
For training the FFNN model, cooperative relay and jammer data are generated containing L samples.
The generated data is extracted from the known CSI at the base-station node.The generated relay data denoted as GD R consists of three parameters, namely SN R U , P AF , and D U .Similarly, the generated jammer where, SN R U ,PAF, D U , SN R E , R S and D E are the estimated information of the network users gathered by the base-station at the end of each frame.We normalized the generated data to the interval [0,1].

Output Labelling
In the data generated, the degree of relay node relevance and the degree of jammer relevance are chosen as the performance indicators for relay and jammer respectively.Each training data sample is associated with a performance indicator corresponding to the current sample.Table 3 illustrates the labelling of cooperative nodes relevance.Based on Table 3, the training data samples are labelled according to the performance of each relay and jammer nodes respectively.

Data Set Training
After generating the input samples and output labels, the input-output pairs are concatenated to create two full data sets for relay and jammer respectively.

D r el a y t r ai
where, t L is the Lth class label.where, x is the argument of the function.Choosing an activation function is a vital step when building a neural network model and ensures a good performance model .In this experiment, the ReLU function is applied to all hidden layers where it enables the model to learn more complex structures and generalize to variety of data.Our experiment is a multi-class classification case.Thus, an activation function is used at the output layer expressed by, where, C is the number of classes, i , j ∈ 1, 2, ...,C , and x i , x j are scores of the ith class and jth class, respectively.The network model consists of four layers namely, input, two hidden and output layers.The input layer takes input parameters (GD R , GD J ) for relay or jammer nodes receptively.Figure 6 shows the feed forward neural networks design model.The final output of the network is the class with the maximum probability value.

FFNN training
In this section, the process of setting the training parameters of our FFNN model is described.In total, two data sets were generated using two groups of data samples, 60000 samples of relay data (GD R ) and 60000 samples of jammer data (GD J ).Two models were trained using the two data sets of relay and jammer respectively.The training data sets were split into the training set and the testing set.The training set was used to train the model parameters and the testing set was used to evaluate the trained model.In this FFNN model, cross entropy is applied as the loss function for our FFNN model.Therefore, the loss function for each ith sample of input GD R of relay data and each jth sample of input GD J of jammer data is formulated as, where, o GD i R ,W , b is the output that is predicted by the model for the best cooperative relay node.
The target of the training process is to find the suitable parameters W and b that minimize the average loss "cost function" of entry training data sets, the cost function is defined as, where the set Θ = {W , b} contains every training parameter of the FFNN model.Every parameter is generally adjusted iteratively using the gradient descent methods.At each iteration, every parameter is adjusted simultaneously as, where ∇ Θ represents as the gradient operator with respect to Θ, η is the learning rate, and m is the iteration number (250 iterations).Backpropagation is used to update the weights W and biases b of the neural network using the local error of the network.During training the network, when a prediction is made for the input values, the actual output values are compared to the predicted values and an error is calculated.
The calculated error is then used to update the weights W and biases b of the network starting at the layers connected directly to the output nodes and then proceeding further backward toward the binput layer.In other words, the backpropagation is used to calculate the gradients efficiently which is then used to train the network, by adjusting the weights W and biases b throughout the network to get the desired output.
In this experiment , Adam optimization algorithm was applied to the FFNN model because it is a first-order gradient-based optimization algorithm, thus reducing computational complexity [17].In addition, the dropout technique is applied in this FFNN model in order to reduce the overfit in training and improve generalization of the model (0.5 dropout was chosen), for which the proposed FFNN model performs well.
Finally, after training and testing the two models of relay and jammer respectively , the FFNN models are frozen and can be used to select the best cooperative helper node as a relay or jammer.

SECRECY PERFORMANCE ANALYSIS
In this section, we illustrate the secrecy performance metric in terms of the secrecy capacity for the system model shown in Figure 1 assisted with the fuzzy logic and the feed forward neural network strategies.
The secrecy capacity metric is defined as the maximum capacity rate difference between the channel capacity of the legitimate users and the channel capacity of the eavesdropper node.The channel capacity of the strong user (user 1 ) is given as, where, ξ u 1 is the signal to noise ratio (SNR) at the strong user expressed in equation (9).The strong user is able to decode the weak user's information signal and suppressed it by using the successive interference cancellation (SIC) strategy.The channel capacity of the weak user (user 2 ) is given as, where, ξ u 2 is the signal to interference plus noise ratio (SINR) at the weak user expressed in equation (10).The weak user is not able to decode the strong user's information signal, so the strong user's information signal is an interference to the weak user.The channel capacity of the eavesdropper node is given as, where, ξ E is the signal to jamming plus noise ratio (SJNR) at the eavesdropper node expressed in equation (14).We assume that the eavesdropper node is able to distinguish the superimposed mixture signal by using the parallel interference cancellation (PIC) strategy.The secrecy capacity for each user is formulated as, In order to evaluate the accuracy of the proposed cooperative node selection strategy, the error analysis is carried on by comparing the secrecy capacity achieved based on the fuzzy logic and the FFNN strategies with maximum secrecy capacity of the system model.
In this paper, the maximum secrecy capacity is achieved when the eavesdropper node does not exist.
The maximum secrecy capacity at each user is respectively formulated as, In this section, the accuracy percentage (A p ), and the root mean square error (R M Se) equations for both users are respectively given as, where, K is the maximum repetition based on the maximum transmit power.

RESULTS AND DISCUSSION
In this section, the numerical results are obtained and discussed to evaluate the secrecy performance of the proposed cooperative NOMA assisted with null-steering beamforming jamming and node selection based on FFNN technique.The simulation setup parameters of the proposed technique are summarized in Table 4. Figure 7 shows the geographical locations of the cooperative NOMA system for all the nodes.These locations are used in order to simulate the experiments (1 and 2).
Table 4 and Figure 7 illustrate that five cooperative helper nodes are used in order to complete the relaying and jamming processes.However, the data relaying process is done by a single cooperative relay node selected by using a smart node selection strategy discussed in section 4. Similarly, jamming the eavesdropper node is done by a selected cooperative jammer node.
The distances between the base station and the cooperative helper nodes are assumed to be non-equidistant to the distances between the relay nodes and the legal users.The eavesdropper is positioned at a fixed coordinates (1500, -200) about 1513.28 meters away from the base station.

EXPERIMENT 1 (PROPOSED SMART NODE SELECTION BASED ON FFNN STRATEGY)
In this experiment, we propose a machine learning based on FFNN strategy to select the best cooperative (relay, jammer) node.This strategy is proposed in order to enhance the physical layer security of the cooperative NOMA system shown in Figure 1.
Table 5 illustrates the cooperative relay selection based on FFNN strategy.The relay selection criteria are extracted based on the known CSI at the base-station.In this paper, the priority is given to the relay selection.Hence, the first cooperative node is not selected as the best jammer node.However, we observe that the fifth node provides the best jammer relevance compared to the other cooperative nodes.Thus, it is selected as by the base-station the best cooperative jammer node.

EXPERIMENT 2 (SMART NODE SELECTION BASED ON FUZZY LOGIC SCHEME)
In this experiment, we use a smart node selection based on the fuzzy logic strategy to select the best cooperative (relay, jammer) node.Table 7 illustrates the cooperative relay selection based on fuzzy logic strategy.The relay selection criteria are the same as the criteria used in Table 5.Based on Table 7, we observe that the first and second cooperative nodes give the best relay relevance (good) in comparison with the other cooperative nodes.However, fuzzy logic controller selects the second node as the best cooperative relay node.This is due to the distance significance compared to the first node.
Table 8 illustrates the cooperative jammer selection based on the fuzzy logic strategy.Based on Table 8, we observe that the fuzzy logic controller selects the same cooperative jammer node selected by the proposed FFNN strategy.
The outputs of these experiments are summarized as follows.
• The proposed FFNN strategy selects the first cooperative helper node as the relay node.
• The fuzzy logic scheme selects the second cooperative helper node as the relay node.
• Fifth cooperative helper node is selected as the jammer node by both approaches.
Figure 8 depicts the secrecy performance in terms of secrecy capacity within a range of total transmission power from 0 dBm to 30 dBm.The secrecy performance of the cooperative NOMA system is analysed for the proposed FFNN based node selection strategy and the fuzzy logic based node selection scheme.
Based on Figure 8, we observe that the secrecy capacity for each legal user is affected by several factors namely, the total transmission power, decoding abilities i.e., SIC, and strategy used for the cooperative node selection.Firstly, the secrecy capacity performance for each legal user is enhanced as the total transmission power and the shared-jamming power increased.
Based on Figure 8, we observe that the secrecy capacity of the strong user (ζ u 1 ) is better than the secrecy performance of the weak user (ζ u 2 ).The reason behind this is the successive interference cancellation technique used by the strong user.This technique enables the strong user to decode the information signal aimed to be sent to the weak user node.Thus, the strong user is not affected by the signal interference.

Figure 2 Figure 2 .
Figure 2 demonstrates the general flowchart of the fuzzy logic strategy used to select the best cooperative relay and jammer node respectively.Based on Figure 2, three main steps are required to select the best cooperative relay or jammer nodes based on the fuzzy logic controller strategy.

Figure 3 .
Figure 3. Membership function for cooperative relay input fuzzy sets

Figure 4 .
Figure 4. Membership function for cooperative jammer input fuzzy sets

Figure 5 .
Figure 5. Membership function for degree of cooperative node relevance

3. 2 . 4 .
FFNN structure The labelled training data sets is used to train the FFNN model.The input of the models are absolute values of the generated data (GD R ,GD J ) and the output is the performance of the relay or jammer.The output of the model indicates the degree of relevance for relay and jammer respectively.Here, the basics of the neural network is described briefly.The structure of the FFNN model consists of multiple hidden layers, each hidden layer contains multiple neutral nodes.After each layer a nonlinear function (activation function) is implemented.Due to their efficiency in generalizing the trained model ,the nonlinear activation functions are the most used activation functions, the most common choices of these functions is the rectified linear unit (ReLU ) function expressed by, f ReLU (x) = max (0, x) (23) Preprints (www.preprints.org)| NOT PEER-REVIEWED | Posted: 2 December 2019 doi:10.20944/preprints201912.0003.v1

Figure 6 .
Figure 6.FFNN design model Based on Figure 6, the first and the second hidden layers consist of 128, 256 neurons, respectively.The output layer consists of five neurons corresponding to the classes of the cooperative (relay or jammer) relevance.Softmax function is applied to this layer which gives us the probability distribution over all classes.

Figure 7 .
Figure 7. Locations of the nodes for the experiments

Figure 8 .
Figure 8. Secrecy capacity of the cooperative NOMA system assisted with smart node selection scheme

Figure 9 .
Figure 9.The cooperative node selection accuracy based on fuzzy logic and FFNNBased on Figure9, we observe that the accuracy of using the proposed strategy (FFNN based node selection) in order to approach the maximum secrecy capacity (without eavesdropping) is higher than accuracy of the fuzzy logic based scheme.In other words, the physical layer security of the cooperative NOMA system model shown in Figure1using the proposed strategy is high in comparison with the fuzzy logic scheme.

Table 1 .
Rules for relay selection scheme

Table 2 .
Rules for jammer selection scheme

Table 3 .
Labelling the relevance of the cooperative nodes

Table 4 .
SIMULATION SET UP PARAMETERS

Table 5 .
Cooperative relay selection based on feed forward neural networks

Table 5 ,
we observe that the first cooperative node gives the best relay relevance (very good) in comparison with the other cooperative nodes, hence it is selected by the base-station as the best cooperative relay node.Table6illustrates the cooperative jammer selection based on FFNN strategy.

Table 6 .
Cooperative jammer selection based on feed forward neural networks

Table 7 .
Cooperative relay selection based on fuzzy logic selection scheme

Table 8 .
Cooperative jammer selection based on fuzzy logic selection scheme