Aiming at the resonance phenomenon of grid-connected inverter with LCL, an inertial feedback control strategy based on capacitor voltage is proposed to suppress the resonance peak. However, in the case of weak grid, the stability of grid-connected inverter deteriorates sharply due to the interaction between the grid impedance and the output impedance of grid-connected inverter. Therefore, a phase angle compensation method with filter is proposed to improve the output impedance phase angle of the inverter to meet the stability margin, thus improve the stability of grid connected inverter in weak grid. The simulation model of grid connected inverter system is built on MATLAB/Simulink platform and the proposed method is verified by simulation. The results show that the proposed method can not improve the stability of grid connected inverter, but also improve the quality of grid connected current and reduce the total harmonic distortion rate (THD).