Direct communication between user equipment (UE) – termed device-to-device (D2D) communication – is envisioned as an intriguing solution to meet the growing demand for local wireless service in fifth generation (5G) networks. Taking advantage of physical proximity, D2D communication is blazing the trail for a flexible infrastructure and boasts the potential benefits of high spectral efficiency, low power consumption, and reduced end-to-end latency. Meanwhile, the heterogeneous network has been emerging as another promising technology for 5G, where by overlaying macrocells with a large number of small-cell access points (APs), it can provide higher coverage and throughput. The idea of using D2D communication to perform mobile relaying in a heterogeneous network is attractive, since together with the better link quality provided by the heterogeneous network in the first hop, D2D communication is able to provide flexible relay selection and enhanced link quality in the second hop, and an overall throughput improvement is therefore foreseeable. However, a problem of fairness arises as the UE relay (UER) needs to consume power to forward information to other UEs. One way to address this issue is to use energy harvesting (EH) technology, which enables devices to harvest energy from their surrounding environments. By adopting EH techniques at each UE, devices can harvest energy from the surrounding environment and use only the harvested energy for relaying, thus preventing power loss from their own battery. In this chapter, we try to coalesce EH technology, D2D communication, and the heterogeneous network into one called the D2D-communication-provided EH heterogeneous network (D2D-EHHN), and investigate the effect of different network parameters as well as provide design insights.
D2D communication has been proposed as a new way to enhance network performance by allowing UEs to communicate directly with their corresponding destinations instead of using a base station (BS) or AP [1–3]. To realize the potential advantages of D2D communication, efforts also need to be made to address the challenges that abound, including peer discovery, mode selection, and interference management in shared networks. In response, various solutions have been proposed. In particular, for resource management, methods to enhance the network throughput include allocating optimal proportions of time [4, 5] or spectrum  to activate D2D communication, and joint spectrum scheduling and power control .