# Simulated Annealing for Resource Allocation in Downlink NOMA Systems in 5G Networks
## 2 NOMA System Model  
In this work, we design the downlink NOMA system as a SISO scenario equipped with BS at the cell's center with a uniform distribution of \(U\) total number of users. The BS servesmultiple users at the same time, code, or frequency with different power levels according to the NOMA-based 5G system. The NOMA power domain multiplexing scheme is the standard NOMA system that offers the fundamental concept of multiplexing two users on the same channel by allocating different power levels. Figure 1 illustrates the concept of the downlink NOMA system with 10 users. The system run with a total bandwidth \(B_{total}\) that is equally allocated among the subchannels where the subchannel bandwidth \(B_{sc}=BW_{total}/N_{sc}\). The BS serves a total \(U\) number of users that receive their signals through a total number of subchannels \(N_{sc}\). In the system, we use \(u\) as index of \(uth\) users where \(u\in\{1,2,\ldots,U\}\) and \(n\) as index of \(nth\) subchannel where \(n\in\{1,2,\ldots,N_{sc}\}\). In this system, we assume that only two users are multiplexed on the same subchannel. The system employs superposition coding for the multiplexed users, where the design considers \(U_{n}\in\{U_{1},U_{2},\ldots,U_{N_{sc}}\}\) is the number of users multiplexed on the same \(nth\) subchannel and \(U_{i,n}\) denotes the \(ith\) user on _the_ subchannel \(n\). The BS transmits a signal carrying a superposition coded symbol on the intended subchannel \(n\) as shown below:  
\[x_{n}=\sum_{i=1}^{U_{n}}\sqrt{p_{i,n}}\tilde{x}_{i} \tag{1}\]  
where \(\tilde{x}_{i}\) is the transmitted symbol of \(ith\) user on the subchannel \(n\) and the power allocated to \(ith\) user is \(p_{i,n}\). The total allocated power to the subchannel \(n\) is \(P_{n}\) where \(\sum_{i=1}^{U_{n}}P_{i,n}=P_{n}\), while if \(ith\) user is not assigned to subchannel \(n\), then the \(p_{i,n}=0\). The received signal at \(mth\) user on subchannel \(n\) is given as follows:  
\[S_{m,n}=g_{m,n}x_{n}+N_{m,n}=\sqrt{P_{m,n}}g_{m,n}x_{m}+\sum_{i=1,i\
eq m}^{U_ {n}}\sqrt{p_{i,n}}\,g_{m,n}\,x_{i}+Z_{m,n} \tag{2}\]  
where \(g_{m,n}\) is the coefficient between the base station and the desired user \(U_{n}\) on subchannel \(n\), where \(g_{m,n}=h_{m,n}/\mathcal{L}(d)\). The \(\mathcal{L}(d)\) is the function of the path loss at a distance (\(d\)) between the BS and \(U_{m,n}\) with Rayleigh fading channel gain as \(h_{m,n}\). The additive Gaussian white noise (AWGN) is denoted as \(Z_{m,n}\) with zero mean and \(\sigma^{2}\) variance, where \(Z_{m,n}\sim\mathcal{C}N\big{(}0,\sigma^{2}\big{)}\). The variance is \(\sigma^{2}=(BW_{total}/N_{sc})N_{\times}\), where \(N_{\times}\) is the power spectral density. Each user receives a mixed signal, where the successful reception of the user's message is guaranteed by separating the received user's messages. Since the BS send  
Figure 1: The basic concept of the NOMA scheme with 10 users. a superimposed message signal on the same subchannel for the multiplexed users, the co-channel interference is an active phenomenon in NOMA. The successive interference cancellation (SIC) is adopted to solve the interference phenomena in NOMA. The received signal-to-interference-plus-noise ratio (SINR) without SIC of the \(mth\) user on subchannel \(n\) is given below:  
\[SINR_{m,n}=\frac{P_{m,n}\ g_{m,n}}{\sigma_{n}^{2}+\sum_{i=1,j\
eq m}^{U_{n}}P_{ i,n}\ g_{m,n}}=\frac{P_{m,n}\ G_{m,n}}{1+\sum_{i=1,j\
eq m}^{U_{n}}P_{i,n}G_{m,n}} \tag{3}\]  
where \(G_{m,n}\) is the channel response normalized by noise (CRNN) of \(mth\) on \(SC_{n}\) that represented as \(G_{m,n}\triangleq\left|g_{m,n}\right|^{2}/\sigma_{n}^{2}\), where \(\sigma_{n}^{2}=\mathrm{E}\left[\left|N_{m,n}\right|^{2}\right]\) the noise power on subchannel \(n\).