In Distributed Power Generation (DPG) system, improving attention and applications are introduced into the energy interface betwixt Renewable Energy (RE) and the grid. Nevertheless, owing to the harmful impact of grid impedance on the control performance and the stability of GCI like power quality, estimation accuracy, frequency, and time period of the injected disturbance into the grid, the usage of GCI sources has come out as a considerable challenge. Hence, by employing the Automatic Parameter Tuning-centric Brownian Mayfly Optimization (MFO) (APT-BMFO), an online Grid Impedance Estimation (GIE) methodology is proposed for GCI. By deploying APT-BMFO, which is also wielded for the Maximum Power Point (MPP) issue by attaining optimal step size rather than a fixed step size, the inverter controller was tuned. The results displayed that the proposed model generated high power nearly 8400 W and by obtaining enhanced stability when weighed against other techniques, the proposed system offers enhanced performance.