Automatic Compensation of Sine Deviation for Grating Fringe Photoelectric Signal