The purpose of this paper is to introduce an advanced control of PV inverters when they are being employed as active filters. Simulations have shown that the suggested control works effectively. The findings during simulations prove that by implementing the suggested regulations framework, the overall harmonic distortion (THD) of both voltage and current is brought down to levels that are acceptable by industry standards.