  In this letter, the joint power control of D2D users and the passive
beamforming of reconfigurable intelligent surfaces (RIS) for a RIS-aided
device-to-device (D2D) communication network is investigated to maximize energy
efficiency. This non-convex optimization problem is divided into two
subproblems, which are passive beamforming and power control. The two
subproblems are optimized alternately. We first decouple the passive
beamforming at RIS based on the Lagrangian dual transform. This problem is
solved by using fractional programming. Then we optimize the power control by
using the Dinkelbach method. By iteratively solving the two subproblems, we
obtain a suboptimal solution for the joint optimization problem. Numerical
results have verified the effectiveness of the proposed algorithm, which can
significantly improve the energy efficiency of the D2D network.
