 1. Pn is the total transmitted power for beam n. The total transmission power of a BS is equally partitioned among N beams, i.e. Pn = PARS , where PMBS is the total BS transmission power. At each MBS, a precoding scheme is applied to support MU-MIMO. We denote the pre- coding matrix as W, which consists of N vectors, i.e. (2.2) where Wn E CNx1 is the beamforming vector of the n-th beam. The received signals at u(n, k) and DU p can be, respectively, expressed as (2.3) (2.4) 2 5G Wireless Networks with Underlaid D2D Communications where Sp is the transmitted signal of DU p. We also have = PD is the transmission power of DUs. hu(n,k) and hp are the channel gains for downlink CU u(n, k) and for DU p, respectively. hp,u(n,k) is the channel gain between DU p and CU u(n, k), and similarly hp',p is the channel gain between the transmitter of DU p' and the receiver of DU p. We assume the channel information is perfectly now at the BS. nu(n,k) and np are i.i.d. additive white Gaussian noise at CU u(n, k) and DU p, respectively. NOMA with SIC and Problem Formation 2.3.1 NOMA with SIC NOMA is a technique that enables multiple users to share the same spectrum resource simultaneously by employing interference cancellation at the receiver. Within a NOMA group, CU with a weaker channel is normally allocated a higher downlink transmission power SO that the strongest received signal within that NOMA group corresponds to the CU with the weakest channel gain in that group. The key idea of SIC is that the received SS is decoded in the ascending order of the respective channel gains or in the descending order of the received signal strength, for all the signals that constitute the SS. The receiver decodes the strongest user signal by treating weaker signals in the SS as interference. The decoded signal can be either the desired signal or can be subtracted from the SS. The decod- ing process will continue until the receiver successfully decodes its own signal [158]. Channel gains for CUs in the same NOMA group in beam n can be sorted 