Abstract:Aiming at the problem that quadrature error exists in the output signals of grating reading heads, a quadrature error realtime compensation method based on Coordinate Rotation Digital Computer, (CORDIC) algorithm is proposed. Aiming at the problems that there exist large error interval in the sinecosine signal angle solution and low angle solution sensitivity in the sinecosine signal peak interval in the CORDIC algorithm, a vector pattern biiteration method is introduced to suppress the angle solution error caused by the CORDIC algorithm due to too quick iteration convergence speed, and the local table lookup method is used in combination to eliminate the angle solution error in the signal peak interval. The quadrature error compensation process consists of three steps: phase solution, phase compensation and signal reconstruction. Taking the solved angle value as the object, the angle errors are compensated in real time in complete period. The CORDIC rotation mode is used to reconstruct the cosine signals from the compensated angle values so as to realize the realtime compensation of the quadrature errors of Moiré signals. This compensation method was implemented on an FPGA platform, and the phase difference measurement and compensation performance of this method were verified. Test results indicate that with the signal quadrature error of [1°, 10°], the phase measurement error is within ±0.04°; for the signals with different frequencies and phase differences, after compensation the maximum phase error is within ±1°, the mean error is within ±0.1°, and the mean square deviation is within 0.5°, which proves that the proposed method can effectively achieve the realtime compensation of the quadrature errors of Moiré signals.