 channel vectors for CUs from all beams except from beam n. 2.4.1.2 Second ZF Precoding The first zero forcing (ZF)-based method helps reduce inter-beam interference 0 in (2.5). Since we aim to maximize the total sum rate in the system, the total through- put from DUs contributes to the total throughput as well. Therefore, the second precoding method helps reduce the interference between CUs and DUs, i.e. N Pn|h,Wnl2 in (2.9). Hence we should set hpw = 0, for all n. Or equivalently, Wn null(H), (2.17) where , and null(.) is the null space or kernel of a matrix. 2.4.2 User Grouping and Optimal Power Allocation After the beamforming vector is determined, we need to group NOMA users into each beam and further decide power allocation for CUs within each NOMA group. One way is to do an exhaustive search, but the complexity will grow exponentially with N. Inspired by Ding et al. [45] and Kimy et al. [97], NOMA would prefer to group users with greater channel dif- ferences. On the other hand, precoding matrix W is designed to minimize inter-beam inter- ference or CU to DU interference. When combining NOMA and precoding, NOMA groups users with highly correlated channels SO that using the precoding matrix generated by the 2.4 Precoding and User Grouping Algorithm representative CU in each beam can achieve a small inter-beam or CU-DU interference. Therefore, the criterion for NOMA user grouping is to choose CUs with highly correlated channels but with big channel gain differences in each beam. For simplicity, we set K = 2. In each NOMA pair, we denote the user with a weaker channel gain as the first user while the stronger one as the second user. 2.4.2.1 First ZF Precoding Since the beamforming matrix is designed based on the null space of the second users in all N beams, second users will not receive any inter-beam interference. Thus their SINR is (2.18) The first users, on the other hand, will receive non-zero inter-beam interference as the pre- coded signals from other beams will have components projected into the first