## 1 Introduction  
The diffraction grating is a kind of dispersive element with periodic spatial structure [1], which is widely used in military, astronomy, nuclear energy, aerospace, and civil fields due to its advantages of high precision [2; 3; 4; 5; 6]. In recent years, with the development of grating fabrication technology, diffraction grating has gradually overtaken the dispersive prism in the field of spectroscopy and become the core dispersive element of spectroscopic instruments. The main manufacturing methods of diffraction gratings are mechanical ruling and holographic etching [7; 8]. For some special gratings, such as infrared laser gratings with low groove density and all mid-step gratings, the mechanical ruling method must be used because of the deep groove lines and the strict requirements on the groove shape [9; 10]. Due to the processing characteristics of the mechanical ruling, the undesirability of the mechanical instrumentation makes a periodic error in the actual position of the ruling grating, which leads to a change in the distribution of spectral lines in the diffraction spectrum, i.e., ghost lines [11]. At the same time, due to grating defects, there will be stray light that does not satisfy the grating equation, satisfies the grating equation but is not using diffraction levels, and it is the most important component of stray light in spectroscopic instruments. Therefore, making high-performance gratings is one of the cores of developing high-precision spectroscopic instruments [12]. The systematic error of the grating ruling machine affects almost all grating performance indexes except diffraction efficiency (diffraction efficiency is mainly determined by grating groove type, depending on grating design parameters and ruling process, etc. ), such as diffraction wavefront quality, resolution capability, guard line, ghost line, stray light, etc. Therefore, domestic and foreign grating ruling machine researchers have put a lot of research efforts into how to reduce the systematic error of grating ruling machines. [PERSON] et al. made mechanical corrections to the ruling carriage system of the MIT-A machine [13; 14]; [PERSON] et al. quantitatively analyzed the influence of ruling error on diffraction spectrum, diffraction order, wavefront error, ghost line intensity, stray light intensity, etc., proposed a method to analyze ruling error from the perspective of diffraction efficiency [15]; [PERSON] et al. analyzed the influence of equidistant line bending and line position error of mechanically ruling grating on the spectral properties of plane grating. Accordingly, the grating ruling machine ruling system was modified [16]; to reduce groove error, [PERSON] et al. proposed a new ruling-tool carriage system based on aerostatic guideways and proposed a completely closed-loop servo-control system with a new optical measurement system [17]. The accuracy and stability of the laser interferometer measurement system have a great influence on the grating alignment error, so researchers have done a lot of related research work. [PERSON] et al. adopted the V-type laser interferometer to measure the relative axial displacement of the screw shaft and added the axial displacement compensation in the control algorithm [18]; [PERSON] et al. calculated the average linear curvature error of the grating using a symmetrical order diffracted wavefront and used interference control to adjust the real-time displacement of the platform [19]; [PERSON] et al. investigated the effect of incident light angles on mosaic grating errors in the optical path for grating replication and mosaic [20]; [PERSON] et al. proposed a new method for separation detection and correction of mosaic errors in mosaic gratings based on two detection lights with the same diffraction order but different incident angles [21]; [PERSON] et al. established the mathematical model of diffraction wavefront and mosaic error of grating.