In order to improve the efficiency of islanding prevention of photovoltaic grid and power quality,Taking into account the problems of both and blind spot of detection, This paper introduces the implementation process of the traditional theSactive frequencySdrift method ofSislandingSprevention, and analyzes its characteristics and the shortcomings of existence, Thus an improved recurrent positive feedback theSactive frequencySdrift method is proposed, Introducing symbolic function tuning for truncates coefficients,Security frequency perturbations reliability under different load directions, So it can efficiently detect islanding,it reduces blind spot of detection and total harmonic,it improve output power quality of PV inverter systems. Its simulation and logic analysis shows that the algorithm can promptly and accurately detect the failure of the power grid.