Because of the low sampling rate in Digital substation sampled values messages, the non-integer-period sampling phenomenon is more obvious compared to conventional substation. Spectrum leakage and picket-fence effect are more serious. In this paper, from two aspects of amplitude error and phase error, by precise mathematical derivation, Fourier transform error is analyzed under different sampling points and grid frequency. The method of selecting the optimal initial phase angle is found. The compensation algorithm to reduce this error is given. It can significantly improve the accuracy of analysis.