# Power Control and Channel Allocation Algorithm for Energy Harvesting D2D Communications
## 1 Introduction  
Device-to-device (D2D) communication is one of the key technologies in the next generation mobile communication network [1]. It can reduce the power consumption of users' equipment and end-to-end transmission delay by allowing two users in close proximity to communicate directly without traversing the base station (BS) or other core networks. D2D communication allows more users to connect to the network by reusing spectrum of the cellular network, which can improve the spectrum utilization rate and system capacity [2]. However, there is inter-layer interference between D2D users and cellular users when D2D users reuse the channel of cellular users. In addition, there will be intra-layer interference between D2D users if one cellular user's channel is reused by multiple D2D users. Therefore, interference management is an important issue in the heterogeneous network where cellular users and D2D users coexist. In [3], the authors consider the scenario of multiple D2D users reusing the same channel, model the D2D users' power allocation problem as a Nash bargaining solution and Nash competition game respectively, and obtain the optimal transmission power to maximize the utility of D2D users. In [4], the authors aim at maximizing the energy efficiency of D2D users, derive the expression of optimal power by using the property of fractional programming, and complete the channel allocation by using the Hungarian algorithm. A Stackelberg game is used in [5] to maximize the utility function of cellular users andD2D users by optimizing the D2D users' transmission power and the BS's interference price. In [6], a sub-carrier allocation algorithm is proposed and a geometric water-filling method is used to allocate the optimal transmission power to D2D users. The above papers implicitly assume that the energy of the D2D transmitter is infinite, which does not always conform with reality because the energy of the D2D device is finite or a device needs to be charged. One solution to solve the energy supply of equipment is to adopt-energy harvesting technology in a D2D communication network, where D2D equipment can harvest energy from the surrounding environment. In [7], the authors assume that energy arrives at the beginning of a time slot and is stored for later use, and use a Pareto-optimal boundary to allocate power for D2D users under the constraint of the harvested energy on transmission power. In [8], the harvested energy of D2D transmitters is considered to be independent of each other with uniform distribution, and the authors use a Lagrange multiplier method and binary search method to obtain the optimal transmission power. In [9], the arrival of energy is also modeled as a Poisson process, and the energy harvesting time slot allocation, power and resource block allocation are jointly optimized to maximize the average energy efficiency of D2D users. However, due to the uncertainty of the environment, it is difficult to predict the energy that will arrive. Some scholars have studied the resource allocation when D2D users harvest energy by wireless power transfer, the energy that broadcast by power station is controllable. In [10], D2D links harvest energy from the wireless power transmitter located at the BS, D2D users communicate when the energy is above a lower threshold, and an iterative joint resource block and power resource allocation algorithm is proposed to maximize the sum throughput of D2D users. However, the authors in [10] assume that the channel of a cellular user is only reused by one D2D user; when multiple D2D users reuse a same channel to transmit information, the spectrum utilization can be improved through appropriate interference management. In [11], D2D transmitters adopt time-switching mode for energy harvesting and data transmission, the expression for coverage probability of D2D link and cellular uplink are derived, and the optimal energy harvesting time is optimized by maximizing the average coverage probability of the D2D link.