## 2 Surface Shape Measurement Principle
### Detection Principle  
#### 2.2.1 Characteristics of the Sensor  
The sensors selected in this paper include six contact grating probe sensors and a non-contact line laser sensor. The contact grating probe sensor is used to ensure the accuracy of the detection surface so as to ensure the accuracy of the spatial relative position of the workpiece. A non-contact line laser sensor is selected to realize non-contact measurement, which can avoid wear on the workpiece surface and can measure multiple points at one time so as to realize in situ detection and high measurement efficiency. All sensors can realize online measurement, which meets the development needs of modern enterprise digital manufacturing. The grating probe measures the surface state and motion of the object through the optical principle. As a periodic and structured light-transmitting medium, the grating decomposes the light into several coherent beams and obtains the surface condition or motion state of the object by changing the phase difference between the coherent beams. In practical measurement applications, precision and accuracy are improved by adding tiny fiber gratings or wavelength-dependent structures. The grating probe has a wide range of application scenarios, often appearing in grating ruler to measure workpiece position and machine tool movement, robot precise positioning, and engineering measurement. In this system, the surface parameters of the workpiece are detected by a line laser sensor. A line laser sensor can be viewed as a system of many point laser displacement sensors. As shown in Figure 2, the measurement principle of the point laser displacement sensor is laser triangulation. We provide a brief introduction below. The laser triangulation method calculates the spatial position, size, and shape of the measured object by measuring  
Figure 1: Schematic diagram of measurement elements for SSE of SW.  
some parameters of the triangle. It uses the triangular relationship formed after the laser beam intersects with the measured object. The principle is that a laser beam is focused into a very small spot, which is irradiated on the surface of the measured object to form a reflected spot, and then the reflected light is received by the receiver and converted into an electrical signal for analysis and processing. By calculating the position of the reflected light spot on the detector, the distance between the center of the light spot to the detector, and the incident angle of the laser, the relevant information of the measured object can be calculated according to the triangulation principle. This method has the advantages of high measurement accuracy, high speed, and wide application range and is widely used in automatic production lines, logistics storage, and other fields. In this paper, the normal incidence laser detection method is used. The distance between the height of the measured object and the reference plane changes the angle between the reflected light and the reference plane, and the angle of the incident light passing through the optical imaging equipment also changes, resulting in the displacement of the formed light spot. The displacement \(s\) is related to the height \(h\) of the measured object relative to the reference plane, so the height \(h\) can be represented by the displacement. In Figure 2, \(\Delta QBH\) and \(\Delta QB_{1}G\) are similar, obtaining  
\[\frac{\overline{BH}}{\overline{B_{1}G}}=\frac{\overline{Q}H}{\overline{QG}} \tag{1}\]  
According to plane geometry,  
\[\left\{ \begin{array}{l}\overline{BH}=h\sin(\theta)\\ \overline{B_{1}G}=s\sin(\varphi)\\ \overline{QH}=l-\overline{AH}\\ \overline{AH}=h\cos(\theta)\\ \overline{QG}=g+\overline{A_{1}G}\\ \overline{A_{1}G}=s\cos(\varphi)\end{array} \right. \tag{2}\]  
Figure 2: Laser triangle detection method.