# Symbol Error-Rate Analytical Expressions for a Two-User PD-NOMA System with Square QAM
## 5 BER and SER Simulation  
We use the Monte Carlo simulation carried out in MATLAB to validate the theoretical results from the previous section. This is often used to model the probability of different outcomes in a process that cannot easily be predicted due to the intervention of random variables. In communication, the MC simulation is used to estimate the probability of signal decoding under the noise by performing a large number of simulations and averaging the results.  
The SER and BER are obtained from the simulation model and compared with the analytical values calculated by (23, 34) and (24, 35). In Figure 3, the simulation scheme of the two-user downlink PD-NOMA via the AWGN channel is presented. We use a signal construction based on square QAM with Gray coding without any error correction techniques. In the simulation scheme, \(\mathbf{b}_{x},\mathbf{b}_{y}\) are the vectors that contain transmission bits, and \(x,y\) are the modulation symbols of UE\({}_{1}\) and UE\({}_{2}\). In the following simulations, we assume that the complex noise realizations of both users are \(\mathbf{w}_{1},\mathbf{w}_{2}\sim CN(0,\,N_{0})\) and they are controlled by \(E_{s}/N_{0}\) in the range from \(-10\) to \(40\) dB with a \(1\) dB step.  
In general, the number of possible PD-NOMA multiplexing configurations is not limited, so any of them can be chosen for simulation. As an example, we have selected the four most illustrative scenarios of a PD-NOMA layer configuration with typical wireless network modulation orders and power weights considering the most possible exploitation scenarios. They are shown in Table 1 and include various combinations of power weights and QAM orders.  
Figure 4 shows the comparison of the theoretical and simulated SER with \(E_{s}/N_{0}\) for each scenario. The analytical SERs are submitted by solid lines, and the simulated SERs are plotted by markers. It is observed that the analytical SERs of both users match the simulated SERs perfectly for all the multiplexing configurations in the full range of \(E_{s}/N_{0}\). Due to the comparison result, we validated the (23) and (34) expressions, which were obtained in the previous section. We can also conclude that the presented expressions can be perfectly used for the SER calculation in both user QAM signals multiplexed by PD-NOMA.  
The comparison of the theoretical and simulated BERs against \(E_{s}/N_{0}\) is presented in Figure 5. We observe that the analytical BER expressions of both users in the PD-NOMA system match the simulation results in the low BER region, which perfectly validates (24) and (35). In the high BER region, we remark that the accuracy of the analytical result is decreased due to the approximation inexactness. The validation result demonstrates that the presented expressions cannot be applied to obtain accurate BER values in the high BER region due to the used approximation. This issue requires further investigation and will be solved in the following works.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**No.**} & \multicolumn{2}{c}{**First Layer (UE\({}_{1}\))**} & \multicolumn{2}{c}{**Second Layer (UE\({}_{2}\))**} \\ \cline{2-5}  & \(\mathbf{p_{1}}\) & \(\mathbf{Q_{1}}\) & \(\mathbf{p_{2}}\) & \(\mathbf{Q_{2}}\) \\ \hline
1 & 0.85 & 4 & 0.15 & 4 \\
2 & 0.9 & 4 & 0.1 & 16 \\
3 & 0.95 & 16 & 0.05 & 16 \\
4 & 0.95 & 16 & 0.05 & 64 \\ \hline \hline \end{tabular}
\end{table}
Table 1: PD-NOMA configurations.  
Figure 3: Simulation scheme.