This paper investigates consumed power minimization and robust beamforming designs in the base station (BTS) in Device to Device (D2D) communications underlying the 5G cellular network. It is supposed that BTS is not aware of the channel state information (CSI), and only an approximation of their covariance is available. Therefore, based on the estimation error of CSI covariance matrices two optimization models are presented to minimize the power consumption and robust beamforming designs. The first model assumes that the upper bound of the estimation errors is limited to their Frobenius norms. So, the main objective of the first model is to calculate the beamforming at the BTS in such a way that the power consumption of the base station is minimized under the constraint that the SINR (signal-to-interference plus noise ratio) of all cellular users is guaranteed to be above a specified predetermined threshold. The second model considers the statistical distribution of the estimation error is known, and a probabilistic model is considered for the uncertainty of CSI covariance matrices. In this sense, the power consumption of the BTS is minimized in such a way that the non-outage probabilities of users are guaranteed to be above a certain predefined threshold. Although these optimization problems are non-convex, it is shown that they can be reformulated to a convex form using a semi-definite relaxation technique to obtain their lower bounds. The simulation results verify that the proposed methods perform much better than the Hybrid MRT-ZF, ZFBF and MRT beamforming methods.