The invention relates to a 
phase angle margin compensation-based 
system impedance 
active control method of a grid-connected 
inverter. Because the changing impedance exists in a 
power grid, a dynamic interaction influence exists between the grid-connected 
inverter and the 
power grid and thus the grid-connected current waveform quality is influenced, so that the weakening of the impedance interaction influence is crucial to improvement of the grid-connected current quality. According to the invention, the impedance 
active control method is characterized in that real-time 
grid impedance information is obtained in real time and thus a 
phase angle margin at an 
inverter output impedance amplitude-
frequency curve intersection point frequency is solved; a 
voltage feedforward control method is employed and a 
phase angle margin of the inverter impedance at the impedance intersection point frequency is compensated in real time; operation is carried out on a 
voltage feedforward link output and a current ring PI result so as to obtain an SPWM 
control signal. According to the invention, because the active 
impedance control method with the phase angle margin compensation function is used, the 
harmonic resonance generated by the dynamic interaction influence between the inverter and the 
power grid near the impedance intersection point frequency can be effectively suppressed, so that the rid-connected current waveform quality of the inverter is improved and the grid-connected stability is enhanced.