This paper proposes a method for suppressing harmonics in a distributed power system through gridconnected power generation of power electronic devices. A method for suppressing harmonics using a distributed active filter system(DAFS)is proposed. The configuration and connection are optimized through multiple active power filters(APF) into the multi-harmonic source grid, so that the harmonic distortion rate of the entire line is the lowest. In order to ensure stable long-term operation of the shunt active filter, droop control is introduced to improve, so as to achieve load power sharing and suppression of circulating current, and maintain line voltage distortion rate at a low level. The final simulation results illustrate the validity and validity of the theory.