## 3 Beamformer Design
### Multi-Dimensional Search Design with CRI Zero Forcing  
Then, a relay transmit beamformer impacts the second hop link SINRs directly as in (3), while it indirectly affects the SINR of the other relay through \(\mathbf{w}_{R,i}\) as in (6). This implies that the two pairs of receive and transmit beamformers should be designed jointly. The second hop design principle of [29] can be generalized to the beamforming of NOMA networks with a multiple antenna AP, where the beamformed channel gains of NOMA users should be equalized for the maximum NOMA sum rate to be achieved. Here, the transmit beamformer of a relay has an additional requirement of improving the SINR of the other relay. With the above considerations at hand, we may approach the problem with the following steps. Suppose the two receive beamformers \(\mathbf{w}_{R,i},i=1,2\) are defined and we want to optimize the two transmit beamformers \(\mathbf{w}_{T,i},i=1,2\). For \(i=1,2\) and \(j=1,2\), we may define matrices \(\mathbf{\bar{G}}_{i,j}=\mathbf{g}_{ij}\mathbf{g}_{i,j}^{H},\mathbf{\bar{G}}_{ i}=\mathbf{G}_{i}^{H}\mathbf{w}_{R,i}\mathbf{w}_{R,i}^{H}\mathbf{G}_{j}\) and \(\mathbf{W}_{i}=\mathbf{w}_{T,i}\mathbf{w}_{T,i}^{H}\) to form the following two SDR problems with non negative definite matrices \(\mathbf{W}_{i},i=1,2\). The connection between metrics in (3,6) and the formation of SDR problem can be found in references such as [13; 30]. The simplified algorithm in Section 3.2 avoids the SDR formation and the subsequent alternation to narrow down the threshold ranges. \[\min_{\mathbf{w}_{1}\in\mathbb{C}\mathbb{M}\sim M} \mathbf{Tr}[\mathbf{W}_{1}]\] (7) s.t. \[\mathbf{Tr}[\mathbf{\bar{G}}_{1,j}\mathbf{W}_{1}]\geq\gamma_{1}^{* },\;j=1,2,\] \[\mathbf{Tr}[\mathbf{\bar{G}}_{1}\mathbf{W}_{1}]\leq\delta_{1},\] \[\mathbf{rank}\{\mathbf{W}_{1}\}=1.\] \[\min_{\mathbf{W}_{2}\in\mathbb{C}\mathbb{M}\sim M} \mathbf{Tr}[\mathbf{W}_{2}]\] s.t. \[\mathbf{Tr}[\mathbf{\bar{G}}_{2,j}\mathbf{W}_{2}]\geq\gamma_{2}^{* },\;j=1,2,\] \[\mathbf{Tr}[\mathbf{\bar{G}}_{2}\mathbf{W}_{2}]\leq\delta_{2}.\] \[\mathbf{rank}\{\mathbf{W}_{2}\}=1. \tag{8}\]  
Here, \(\gamma_{i}^{*}\) is the threshold applied to all UT channels from the \(R_{i}\) uniformly to control the end throughput \(R_{1}^{i}\) and \(R_{2}^{i}\). The CRI at \(R_{i}\) is controlled by \(\delta_{\bar{i}}\) to affect the SINR \(\gamma_{j}^{R,j},j=1,2\). Overall, two pairs of SDR in (7) and (8) pursue the balance points between the two UT SINRs and the CRI toward the other one in the relay pair. Reducing \(\delta_{i}\) puts a restriction on achieving optimal \(\gamma_{i}^{*}\), while it improves the CRI level at \(R_{\bar{i}}\) and results in enhanced \(\gamma_{j}^{R,\bar{i}}\) for \(j=1,2\). On the other hand, increasing \(\delta_{i}\) works in the opposite directions and that it allows a chance to make a trade-off. Note that the power of \(\|\mathbf{w}_{T,i}\|^{2},i=1,2\) can be compared with the allowed relay power \(P_{r}\) to test if the given set of values \(\gamma_{i}^{*}\) and \(\delta_{i}\) can be further tightened as shown in Algorithm 1. Now, all the above discussions can be integrated into the following twin optimizations as summarized in Algorithm 1, where the two pairs of beamformer vectors for two relays are found in an iterative fashion. At first, the relay receive beamformer vectors \(\mathbf{w}_{R,i},i=1,2\) are set to the directions of the first hop channels \(\mathbf{h}_{i}\), \(i=1,2\), while they are orthogonally projected at the end of the while loop to null out the CRI for the given-pair relay transmit vector \(\mathbf{w}_{T,i},i=1,2\) set. In the while loop of the algorithm, two two-dimensional (2-D) searches are performed concurrently to find the pairs \(\mathbf{w}_{T,i},i=1,2\), where the two 2-D tiles, each formed by \(\delta_{i}\) and \(\gamma_{i}^{*}\), are shrunk down in every iteration until the total throughput of the SR-NOMA is saturated.