In this letter, we investigate a reconfigurable intelligent surfaces (RIS)-aided device to (D2D) communication system over Rician fading channels with imperfect hardware including both impairment at the transceivers and phase noise RISs. This letter has optimized shift by genetic algorithm (GA) method maximize achievable rate for continuous shifts (CPSs) discrete (DPSs). We also consider two sp...