The spectrum leakage effect caused by non-synchronous sampling is the main impact for the measurement precision of the phase difference algorithm, The spectral leakage can be suppressed by the side lobe characteristic of high-order window function, However, the estimation accuracy of the second harmonic amplitude is still difficult to improve significantly, And the reason for the loss of frequency resolution due to high Window function, The sampling window is usually increased, It is not conducive to the frequency fluctuation and the real time requirementSis higher. In this paper, a modified phase difference algorithm with sine window is presented, The relative frequency deviation is estimated by the phase difference between peak spectral lines, and calculate the sum of the long range spectrum leakage of the components other than the measured harmonic components,And subtract it from the measured component, we update relative frequency deviation by the phase difference between peak spectral lines, cyclic iterative estimation. Based on this method, Compared with the existing phase difference algorithm in noise-free and noise environment and frequency fluctuation environment. Experimental results show that this method can be used for the iterative correction of 4 times, can effectively suppress the spectrum leakage effect, reduced estimation error,and improve the measurement precision of power grid electrical parameters, this method can be used for grid measurement requirements.