# Joint Resource Allocation for Multiuser Opportunistic Beamforming Systems with OFDM-NOMA
## 4 Problem Solution
### Power Allocation  
Considering the given user pairing and subcarrier scheduling scenario, the optimization problem (24) degenerates into a power allocation issue, which is given by  
\[\max_{P_{k_{nc}}}D_{1}=\log_{2}\left(1+\frac{P_{1_{nc}}\left|l_{n_ {c},1_{nc}}\right|^{2}}{P_{2_{nc}}\left|l_{n_{c},1_{nc}}\right|^{2}+\sigma^{2} }\right)+\log_{2}\left(1+\frac{P_{2_{nc}}\left|l_{n_{c},2_{nc}}\right|^{2}}{ \sigma^{2}}\right), \tag{25}\] \[\text{s.t.}\quad\mathcal{C}1-\mathcal{C}3.\]  
Substitute \(P_{1_{nc}}\) and \(P_{2_{nc}}\) by \((1-\zeta)P_{\text{total}}\) and \(\zeta P_{\text{total}}\), respectively. \(\zeta\) is power allocation weight, and satisfies \(0\leq\zeta\leq 1\). According to the characteristics of logarithmic function, the power allocation issue (25) can be transformed as  
\[\max_{\zeta}\widetilde{D}_{1}=\left(\frac{P_{\text{total}}\left|l_ {n_{c},1_{nc}}\right|^{2}+\sigma^{2}}{\zeta P_{\text{total}}\left|l_{n_{c},1_{ nc}}\right|^{2}+\sigma^{2}}\right)\times\left(\frac{\zeta P_{\text{total}} \left|l_{n_{c},2_{nc}}\right|^{2}+\sigma^{2}}{\sigma^{2}}\right), \tag{26}\] \[\text{s.t.}\quad\mathcal{C}5:0\leq\zeta\leq\frac{P_{\text{total} }-P_{\Delta}}{2P_{\text{total}}},\] \[\text{s.t.}\quad\mathcal{C}6:\log_{2}\left(\frac{P_{\text{total}} \left|l_{n_{c},1_{nc}}\right|^{2}+\sigma^{2}}{\zeta P_{\text{total}}\left|l_{n_ {c},1_{nc}}\right|^{2}+\sigma^{2}}\right)\geq e_{1_{nc}},\] \[\text{s.t.}\quad\mathcal{C}7:\log_{2}\left(\frac{\zeta P_{\text{ total}}\left|l_{n_{c},2_{nc}}\right|^{2}+\sigma^{2}}{\sigma^{2}}\right)\geq e_{2_{nc}}.\]For mathematical convenience, set \(\frac{P_{\text{total}}}{\sigma^{2}}=\vartheta\). The power allocation issue can be further simplified as  
\[\max_{\xi}\overline{D}_{1} =\left(\frac{\vartheta|I_{n_{c},1_{\text{xc}}}|^{2}+1}{\vartheta|I_ {n_{c},1_{\text{xc}}}|^{2}\zeta+1}\right)\times\Big{(}\vartheta|I_{n_{c},2_{ \text{xc}}}|^{2}\zeta+1\Big{)},\] (27) s.t. \[\mathcal{C}8:0 \leq\zeta\leq\frac{P_{\text{total}}-P_{\Delta}}{2P_{\text{ total}}},\] \[\mathcal{C}9:\zeta \leq\frac{\frac{\vartheta|I_{n_{c},1_{\text{xc}}}|^{2}+1}{\vartheta| I_{n_{c},1_{\text{xc}}}|^{2}}}{\vartheta|I_{n_{c},1_{\text{xc}}}|^{2}}\] \[\mathcal{C}10:\zeta \geq\frac{2^{\text{ac}_{\text{xc}}}-1}{\vartheta|I_{n_{c},2_{ \text{xc}}}|^{2}}.\]  
The derivative of \(\overline{D}_{1}\) to \(\zeta\) is  
\[\frac{d\overline{D}_{1}}{d\zeta} =\frac{\vartheta\Big{(}\vartheta|I_{n_{c},1_{\text{xc}}}|^{2}+1 \Big{)}|I_{n_{c},2_{\text{xc}}}|^{2}}{\vartheta|I_{n_{c},1_{\text{xc}}}|^{2} \zeta+1}-\frac{\vartheta|I_{n_{c},1_{\text{xc}}}|^{2}\Big{(}\vartheta|I_{n_{c},1_{\text{xc}}}|^{2}+1\Big{)}\Big{(}\vartheta|I_{n_{c},2_{\text{xc}}}|^{2} \zeta+1\Big{)}}{\Big{(}\vartheta|I_{n_{c},1_{\text{xc}}}|^{2}\zeta+1\Big{)}^{ 2}} \tag{28}\] \[=\frac{\vartheta\Big{(}\vartheta|I_{n_{c},1_{\text{xc}}}|^{2}+1 \Big{)}\Big{(}|I_{n_{c},2_{\text{xc}}}|^{2}-|I_{n_{c},1_{\text{xc}}}|^{2} \Big{)}}{\Big{(}\vartheta|I_{n_{c},1_{\text{xc}}}|^{2}\zeta+1\Big{)}^{2}}.\]  
It is indicated that \(\overline{D}_{1}\) is monotonous with respect to \(\zeta\), and the monotonicity of is determined by \(\Big{(}|I_{n_{c},2_{\text{xc}}}|^{2}-|I_{n_{c},1_{\text{xc}}}|^{2}\Big{)}\). Thus, the optimal \(\zeta_{opt}\) can be achieved by comparing the values of \(\overline{D}_{1}\) at the endpoints of the feasible interval.  
According to \(\mathcal{C}8\)-\(\mathcal{C}10\), the feasible interval is given by  
\[\mathbb{G} =\Big{[}G_{\zeta,\text{left}},G_{\zeta,\text{right}}\Big{]} \tag{29}\] \[=\left[\max\left\{0,\frac{2^{\xi_{2_{\text{xc}}}}-1}{\vartheta|I _{n_{c},2_{\text{xc}}}|^{2}}\right\},\min\left\{\frac{P_{\text{total}}-P_{ \Delta}}{2P_{\text{total}}},\frac{\vartheta|I_{n_{c},1_{\text{xc}}}|^{2}+1}{ \vartheta|I_{n_{c},1_{\text{xc}}}|^{2}}\right\}\right].\]  
The optimal \(\zeta_{opt}\) is given by  
\[\zeta_{opt}=\operatorname*{arg\,}_{G_{\zeta,\text{left}},G_{\zeta,\text{right}} }\max\overline{D}_{1}. \tag{30}\]  
Therefore, the power allocation result is \(P_{1_{\text{xc}}}=(1-\zeta_{opt})P_{\text{total}}\) and \(P_{2_{\text{xc}}}=\zeta_{opt}P_{\text{total}}\).