# A Deep Learning Approach for MIMO-NOMA Downlink Signal Detection
## 4 Simulation and Analyses  
In this section, we build the NOMA signal detection system based on the deep learning method and present the numerical results for different parameters. First, we investigated the performance of the proposed scheme in comparison with the traditional SIC method in a certain scenario. Then, the influence of diverse types of MIMO-NOMA modulations on the symbol error rate (SER) performance was studied. Next, we simulated the impact of the power allocation factor on the system performance. Then, we explored the situation where the estimated CSI is deviated from the actual one. Additionally, to achieve faster convergence of the MIMO-NOMA-DL algorithm, we conducted simulations with different mini-batch sizes. Finally, useful recommendations to accelerate training are provided. Many software and tools are available for machine learning. Considering their efficiency and usability, two of the most popular tools--Python 3.6 and MATLAB--were used in our numerical analysis. As a powerful open-source machine-learning framework from Google, TensorFlow with GPU acceleration was also employed to implement the proposed deep learning algorithm. For simplicity, we concentrated on a single cluster with two UEs. A \(4\times 4\) MIMO channel with a complex Rayleigh distribution was considered. The total transmitted power for one antenna was set to 1 W. UE1 was allocated 80% of the power, and UE2, 20%. The activation function of the output layer was the sigmoid function (7) and that of the hidden layers was the ReLU function (9). The total number of training samples was 409,600, in the form of the \(n\)-power of 2, so we could use a smaller data set--mini-batch--to accelerate the convergence. For the \(4\times 4\) NOMA-MIMO signal, the number of input layer cells in a slot was 8, and the input data were fed to the DNN as a column vector. All the labels used in the supervised training were one-hot encoded. The key parameters are summarized in Table 1, and the detailed algorithm is depicted in Algorithm 1. ```
1:Initialize the DNN model;
2:Generate and adjust the format of the training data. Assuming that the number of slots is \(N\), the input data are denoted as \(\mathbf{x}=\{\mathbf{x}^{[1]},\mathbf{x}^{[2]},\cdots,\mathbf{x}^{[N]}\}\). Each \(\mathbf{x}^{[i]}\) is a MIMO-NOMA column vector in slot \(i\);
3:Set the key parameters, including mini-batch, learning rate, and output functions of the hidden layer and output layer, and initialize the weight and bias of each DNN layer;
4:Implement the forward DNN process and obtain the results of the output layer's data, denoted as \(\mathbf{\hat{y}}_{i}=\{\mathbf{\hat{y}}_{i}^{[1]},\mathbf{\hat{y}}_{i}^{[2]}, \cdots,\mathbf{\hat{y}}_{i}^{[N]}\}\);
5:Calculate the loss function, that is, the cross-entropy \(Loss(\mathbf{y},\mathbf{\hat{y}})\): \[Loss(\mathbf{y},\mathbf{\hat{y}})=\sum_{i}\mathbf{y}_{i}\log\frac{\mathbf{y}_{ i}}{\mathbf{\hat{y}}_{i}}+H(\mathbf{y})+\lambda\cdot\sum_{i}\|\omega_{i}\|_{2}.\] (33)
6:Calculate the corrective parameter with the Adam optimization algorithm. Update the parameters with the algorithm to search for the optimal solution;
7:Return to Step 4 if the loss function is not small enough, otherwise proceed to the next step. If the loss function does not meet the requirement, the DNN with the updated parameters should be retrained;
8:Test the trained DNN with the test data and plot the SER-SNR curve. ```  
**Algorithm 1** MIMO-NOMA Based on the DL Training Algorithm. To evaluate the performance gap, the proposed MIMO-NOMA-DL signal detection was compared with the traditional MIMO-NOMA-SIC scheme. We assumed that the SIC had perfect knowledge of channel parameters and that the modulation type of both UE superposition coding signals at the transmitter was binary phase shift keying (BPSK). In the traditional MIMO-NOMA-SIC detection scheme, the UE1 signal--which treats the UE2 signal as interference--should be demodulated first. Then, we can demodulate the UE2 signal after the modulated UE1 signal is removed from the received NOMA-MIMO signal.