**A Method of On-Site Describing the Positional Relation between Two Horizontal Parallel Surfaces and Two Vertical Parallel Surfaces**

## **Zechen Lu 1, Bao Zhang 2, Zhenjun Li <sup>1</sup> and Chunyu Zhao 1,\***


Received: 19 February 2020; Accepted: 13 March 2020; Published: 21 March 2020

**Abstract:** The position error of two parallel surfaces is generally constrained by parallelism. However, as a range of change, it cannot represent the positional relation between two parallel surfaces. Large-scale equipment such as machine tools are complex and difficult to move. It is also an engineering problem to perform field measurements on it. To this end, a method of describing the positional relation between two horizontal parallel surfaces and two vertical parallel surfaces on-site is proposed in this paper, which is a novel kind of position error, enriching the form of parallel surface position error, and solves the inconvenience problem of large equipment position error measurement. The measurement mechanisms are designed, and the measurement principle is given. Firstly, the combined projection waveform of the measured surface can be obtained by the geometric relationship between the measurement mechanism and the measured surface. Secondly, an algorithm is studied to process the obtained waveform, and the combined projection curve of the measured surface is acquired. Then, under the condition of considering the shape contours of the two surfaces, an algorithm is developed to acquire the calculated shape contour of the measured surface. According to the difference between the calculated surface shape contour and the known shape contour of the measured surface, the positional relation of the two surfaces can be determined. Meanwhile, the mathematical models of algorithms are established, and the measurement experiments are carried out, and the algorithms are verified by the mutual measurement method of the two surfaces. The results show that this method can accurately obtain the positional relation of two horizontal parallel surfaces and two vertical parallel surfaces.

**Keywords:** measurement mechanism; machine tool; surface shape contour; on-site measurement; positional relation

## **1. Introduction**

The CNC machine tool is an important piece of equipment in the traditional manufacturing industry. Two positioning surfaces of the machine tool serve as the datum surface for the mounting rails, and their position error plays a vital role in the accuracy of the machine tool. In the modern manufacturing industry, the position error of two parallel surfaces is generally constrained by parallelism, and parallelism is orientation error, which is the total allowable variation of the measured element in the direction relative to the datum. Therefore, the orientation error has the function of controlling the direction, that is, controlling the direction of the measured elements relative to the datum elements. However, the calculation method of parallelism is very mature. Firstly, we need to establish a datum direction on the datum plane. The method is to fit a straight line (as shown in

Figure 1a) or a surface (as shown in Figure 1b) as a datum direction. The obtained parallelism is a number. The key to parallelism evaluation is to determine the datum direction.

**Figure 1.** Evaluation method of parallelism: (**a**). Line-to-line (**b**). Surface to surface.

With the development of the manufacturing industry, the requirements for machine tools are increasing. In order to improve the performance of the machine tool, we study the impact of the positioning accuracy of the machine tool on the accuracy of the machined parts and maintain the accuracy of the machine tool itself. The more we know about position errors, the better for us. Therefore, this paper proposes a method of describing the positional relation between two parallel surfaces on-site, which is a novel kind of position error. It has no datum direction, enriching the form of parallel surface position error. The significance of obtaining the positional relation curve of the two positioning surfaces on the machine tool is that, on one hand, the positional relation curve can guide the subsequent modification, grinding, bed fitting and quantitative analysis of the machined parts. On the other hand, the positional relation curve can also be used to evaluate the torsional state of the surface.

In the development of shape error detection methods, there are several novel methods are used to obtain straightness [1–4], flatness [5–10], roundness [11,12]. However, because the method of evaluating the parallelism in position error is relatively simple, there is relatively little research on this aspect. Hsieh et al. [13] proposed a method for measuring the parallelism of static and dynamic linear guideways. Hwang et al. [14] proposed a three-probe system, which can be used to acquire the parallelism and straightness of a pair of guideways simultaneously. The parallelism measurements are based on an expanded reversal method and the straightness measurements are based on a sequential two-point method. Bhattacharya et al. [15] described an interferometric method for measuring the parallelism of an end face of a transparent material. Lee et al. [16] developed a double ball-bar method to measure parallelism errors of the spindle axis of machine tools. Maurizio et al. [17] discussed two methods for measuring the parallelism error of gauge blocks. It can be known from searching literatures that in the study of shape and position errors, there is very little description of the positional relation between two parallel surfaces. Moreover, the above methods need to be carried out using specific equipment and in a specific environment, and the layout of the measurement mechanism is very complex and needs enough space, but the operating space of machine tools is often limited. Especially for two vertical surfaces, it is more difficult to perform field measurement. However, Jywe et al. [18] performed an online measurement of the machine tool's two-axis straightness error. Hsien et al. [19] designed an online measurement system for measuring the linearity and parallelism of linear guides. Unfortunately, these two measurement systems cannot measure the positional relation of two parallel surfaces.

The parallelism measurement in industry commonly uses specific tools, such as micrometer, deflection instrument, coordinate measuring machines etc. In fact, micrometer has great randomness, which is greatly influenced by the operator's proficiency and experience. In the detection process, the operator can only judge the quality by observing the change range of the micrometer, and the detection data cannot be directly saved to the computer. The coordinate measuring machine can record the test data with high precision, but it can't measure the machine tool and large equipment on site. Therefore, from the above introduction, for machine tools with limited operating space, developing a simple

and easy-to-operate measuring instrument will be an effective method to on-site obtain the positional relation of two positioning surfaces.

In this paper, a method of describing the positional relation of the two horizontal parallel surfaces and two vertical parallel surfaces on-site is proposed. This method can separate the shape contours of the two surfaces and obtain the real positional relation curve of the two surfaces. At the same time, the laser displacement sensor, which can record the detection data to the computer, is selected as the detection element, a continuous measuring mechanism suitable for manual operation is developed, and the corresponding algorithms are studied. Finally, the calculation results are drawn into a curve, which makes the description of the positional relation more intuitive. This method can also be used to measure two working surfaces and two guideways of large equipment.

The rest of this paper is organized as follows. In Section 2 the principle of the measurement mechanism is depicted. In Section 3, the method for describing the positional relation between two surfaces is introduced. In Section 4, mathematical models of the algorithms are established. In Section 5, the measurement experiment is carried out and the results are analyzed. Finally, a conclusion is given in Section 6.

## **2. Principle of the Measurement Mechanism**

## *2.1. Measuring Mechanism for Measuring Two Horizontal Parallel Surfaces*

Figure 2 shows the measurement mechanism for measuring the positional relation between two horizontal parallel surfaces. The laser displacement sensor (triangulation) ILD-2300 is selected as the detection element and the technical parameters of the sensor are shown in Table 1.

**Figure 2.** Measurement mechanism for measuring two horizontal parallel surfaces.



The measurement mechanism consists of slider, guideway, spring limit block, laser receiving plate, counterweight block, spring, contact line *A* and *B*, and detection line *C*. The length of contact line *A*, *B* and detection line *C* are 50 mm, and the distance between contact line *A* and detection line *C* is 60 mm. The contact line *A*, *B* and detection line *C* are ground after processing, and the processing accuracy grade is IT3.The measurement mechanism is in equilibrium with the counterweight, and contact lines *A* and *B* are fixed contact lines. Detection line *C* is connected with the measurement mechanism through micro-guideway and springs, the slider block is fixed on the measurement mechanism, the laser receiving plate is integrated with the micro-guideway and detection line *C*. In the process of measurement, the measurement mechanism is manually driven to move in a fixed direction, under the function of the spring, the detection line *C* fluctuates up and down with the change of shape contour the measured surface, the fluctuation is transmitted to the laser receiving plate through the micro-guideway. At this time, the laser displacement sensor detects the fluctuation and the computer records the measurements.

It is known that the surface contour consists of roughness contour, waviness contour and surface shape contour. The surface shape contour is macroscopic. In this paper, the three-dimensional shape of the measured surface is projected on a plane perpendicular to it, and the macroscopic contour curve obtained is the surface shape contour, as shown in Figure 3. Therefore, the motion trajectories of the contact lines *A*, *B,* and detection lines *C* are surface shape contour.

**Figure 3.** Detection path.

As shown in Figure 4a, according to Table 1, the initial measuring range is 50 mm. When the detection line *C* and the contact line *A* are collinear, the detection data should be a fixed value, defining it as the initial value *X*0. When considering the shape contours of the two surfaces, the position of the detection line *C* may change, as shown in Figure 4b. The difference between the measurements and the initial value is the displacement of the detection line *C* relative to the contact line *A*.

**Figure 4.** The positional relation between contact line *A* and detection line *C*: (**a**). Contact line *A* and detection line *C* are collinear; (**b**). Contact line *A* and detection line *C* are not collinear.

The advantage of this mechanism is that it easy to operate, and suitable for field measurement. It can continuously obtain the stored data which change with the shape contour of the measured surface, instead of some discrete points on the same straight line along the measuring direction. Meanwhile, it can separate the shape contours of the two surfaces, which cannot be achieved by ordinary testing equipment.

## *2.2. Measuring Mechanism for Measuring Two Vertical Parallel Surfaces*

Figure 5 shows the measuring mechanism for measuring the positional relation of two vertical parallel surfaces. Contact lines *A* and *B* are fixed, and the detection line *C* is movable. The length of contact lines *A* and *B* are 70 mm, and detection line *C* is 50 mm. The contact line *A*, *B,* and detection line *C* are ground after processing, and the processing accuracy grade is IT3.

**Figure 5.** Measuring mechanism for measuring two vertical parallel surfaces.

During the detection process, the fixed contact lines *A* and *B* move in one surface, the variable contact line *C* moves in another detection surface, and the contact lines *A*, *B* and the detection line *C* form a caliper. Under the clamping action of the caliper, the spring generates tension and compression with the shape contour of the measured surface. At the same time, the fluctuate is transmitted to the laser receiving plate along the guide rail, and the laser displacement sensor detects the weak change of the laser receiving plate and records the change through the computer.

As shown in Figure 6a, according to Table 1, start measuring range is 50 mm. When the surface where the contact line *A* and the detection line *C* are located are absolutely parallel and the surfaces are absolutely smooth, the detection data is a fixed value and is defined as the initial value *X*1. When the shape contours of the two surfaces are considered, the position of the detection line *C* may change, as shown in Figure 6b. At this time, fluctuating measurements will be generated, and the difference between the measurements and the initial value is the displacement of the detection line *C* relative to the contact line *A*.

**Figure 6.** The positional relation between contact line *A* and detection line *C*: (**a**) The distance between the contact line *A* and the detection line *C* is unchanged (**b**) Contact line *A* and detection line *C* are located in two surfaces with shape contours.

### **3. The Method for Describing the Positional Relation of Two Parallel Surfaces**

## *3.1. The Description Method of Positional Relation between Two Horizontal Parallel Surfaces*

On the basis of the measurement mechanism in Section 2.1, when *A*, *B,* and *C* are in an absolute smooth surface, the spring is in the initial compression state, this moment, the data recorded by laser displacement sensor is *X*0, and *X*<sup>0</sup> is defined as the initial value.

Figure 7 shows the measurement model of two horizontal parallel surfaces. With *PA* as the datum surface, *PB* as the measured surface. *L*s is defined as the starting position, *L*e is defined as the terminal position. By coinciding contact line *A* with *L*s, the measurement mechanism is driven to move in the direction indicated in Figure 7, and the measurement mechanism is clinging to the auxiliary surface to ensure that there will be no sliding during the measurement process. When contact line *A* reaches to *L*e, the measurement is completed, and the data obtained in this process represent effective measurements.

Figure 8a shows the geometric model of *PA* and *PB* cross section direction. The shape contour of *PB* is determined by the shape contour of *PA*, the relative height difference of *PA* surface shape contour relative to *PB* surface shape contour and the positional relation of the two surfaces. According to the mathematical relationship between the effective measurements and *X*0, the extraction algorithm for combined projection waveform is developed and the combined projection waveform can be obtained. Next, since the measurements of the laser displacement sensor change with time, a time-space conversion algorithm is developed. This algorithm is used to map the time series waveform to the coordinate position of *PB* surface, which is called the spatial sequence waveform. Then the trend curve of this waveform is found by the method of neural network fitting (a fitting method in the toolbox of MATLAB), which is named as the combined projection curve. This curve is the height difference of *PB* surface shape contour relative to *PA* surface shape contour. Due to the shape contour of each surface have been measured before, so they are known quantities. According to the combined projection curve of the *PB* and the surface shape contour of *PA*, the separation algorithm for the combined projection curve is studied. The shape contour of *PB* surface can be obtained by this algorithm, which is called the calculated surface shape contour. When the two surfaces *PA* and *PB* are coplanar, as shown in

Figure 8b, the positional relation between the two surfaces is zero, and the calculated surface shape contour is the same as the known shape contour of *PB* surface. If the two results are different, it proves there exists positional relation between two surfaces. Therefore, a description algorithm for positional relation curve between two surfaces is studied. According to the difference between the calculated surface shape contour and the known shape contour of the measured surface, the positional relation between two surfaces can be determined.

**Figure 7.** Detection model of two horizontal parallel surfaces.

**Figure 8.** Geometric model of *PA* and *PB* cross section direction: (**a**) Positional relation exists between *PA* and *PB* surfaces. (**b**)Positional relation does not exists between *PA* and *PB* surfaces.

## *3.2. The Description Method of Positional Relation between Two Vertical Parallel Surfaces*

Figure 9 shows the detection model of two vertical parallel surfaces. The detection process and algorithm flow are the same as the detection of two horizontal parallel surfaces

**Figure 9.** Detection model of two vertical parallel surfaces.

Figure 10 shows the geometric model of *PC* and *PD* cross section direction. When *PD* is the measured surface with *PC* as the datum surface. If there is no positional relation between the *PC* and *PD* surfaces, as shown in Figure 10a. The existed geometric relationship is the surface shape contour and relative displacement of the two surfaces. Since both are known. Therefore, the calculated surface shape contour is the same as the known surface shape contour. If there is an unknown positional relation between the *PC* and *PD* surfaces, the relative distance between the shape contours of the two surfaces will change, as shown in Figure 10b. At this time, the shape contour of *PD* surface cannot be obtained only from the known shape contour of *PC* surface and relative displacements. Therefore, the calculated shape contour of *PD* surface is different from the known shape contour of *PD* surface. Their shape difference is the positional relation curve.

**Figure 10.** Geometric model of *PC* and *PD* cross section direction: (**a**) Positional relation does not exists between *PC* and *PD* surfaces. (**b**)Positional relation exists between *PC* and *PD* surfaces.

Due to the existing methods can only perform the parallelism evaluation, but the spatial position curve of the two parallel surfaces cannot be depicted. Therefore, it is difficult to carry out a comparative test to verify the test results in this paper.

By definition, parallelism is different to the positional relation of this article. Parallelism requires a datum direction as a datum, which is an orientation error. The positional relation has no datum direction. In this paper, the method of mutual detection by the two surfaces is used to verify the correctness of this detection method. The significance of mutual detection is that, ideally, the positional relation curve obtained by *PA*, *PB* mutual detection must be the same shape and opposite direction. The positional relation curve obtained by *PC, PD* mutual detection must be the same shape. When different measuring mechanisms are used to measure two horizontal parallel surfaces and two vertical parallel surfaces, the same positional relation description method is used to obtain the positional relation curves. However, the datum surface and the measured surface have changed, that is, the movement trajectories of the detection lines *A*, *B*, and the contact line *C* have changed. Under this condition, if the results of the mutual detection are all consistent with the objective law, the correctness of the description method of the positional relation can also be proved.

## **4. Mathematical Model of the Algorithm**

#### *4.1. Mathematical Model for Describing Positional Relation between Two Horizontal Parallel Surfaces*

#### 4.1.1. Extraction Algorithm for Combined Projection Waveform

When measuring *PB* with *PA* as the datum, the measurements is *X*s1. When the shape contour of *PB* surface is higher than *PA*, the guideway moves upwards, *X*s1 < *X*0. When the shape contour of *PB* surface is lower than *PA*, the guideway moves downward, *X*s1 > *X*0, then the combined projection waveform can be defined as

$$C\_1 = X\_{s1} - X\_0 \tag{1}$$

When measuring *PA* with *PB* as the datum, the measurements is *X*s2, and the moving direction of guideway is opposite to that of measuring *PB* with *PA* as datum. When the shape contour of *PB* surface is higher than *PA*, the guideway moves downward, *X*s2 > *X*0. When the shape contour of *PB* surface is lower than *PA*, the guideway moves upwards, *X*s2 < *X*0. Then, the combined projection waveform can be defined as

$$\mathbf{C}\_2 = X\_{s2} - X\_0 \tag{2}$$

### 4.1.2. Time-Space Conversion Algorithm

Because the combined projection waveform is time series, it is necessary to converse the measurement waveform of time series into the measurement waveform of spatial sequence. It is known that the sampling frequency of the sensor is as high as 20 kHz, which means that only 0.00005 s is needed to obtain measurement data, indicating that the sampling density is extremely high. At such a high sampling density, the measurements at different times are the same, which means that duplicate measurements are obtained at some detection position, as shown in Figure 11.

**Figure 11.** Structure of measurements.

Further, due to the high resolution of the sensor, the two adjacent measurements may be at the same position even if the data are not identical. In fact, each detection position only corresponds to one real measurements. Duplicate measurements will interfere with the shape recognition of waveforms. Therefore, the purpose of the time-space conversion algorithm is to extract the measurements at

different positions that can recognize the shape of the measurements. These extracted measurements are defined as characteristic measurements.

It is known that sampling frequency and the total number of measurement data, the measurement time *t* can be expressed as

$$t = \frac{N\_{L\_{\text{Pl}}}}{f} \tag{3}$$

where *f* is the sampling frequency, *NL*<sup>p</sup> is the total number of sampling data corresponding to the moving distance *L*p.

Since the speed of the detection mechanism is randomly changed, it is assumed that the average speed of the mechanism travel is 100 mm/s. Taking the sampling interval of the characteristic measurements is 1 mm. At this moment, the time between the two characteristic measurements is 0.01 s. When the velocity between the two characteristic measurements is 50 mm/s and the passing time is 0.01 s, the sampling distance between the two characteristic measurements is 0.5 mm, which is 0.5 mm different from the sampling interval under the average speed, which is insignificant for the overall curve shape of long surface. By extracting the trend curve through the neural network, the effect of the above errors can be eliminated, and only the shape of the whole curve of the waveform can be retained. Therefore, the influence of the driving speed on the detection position can be neglected. Therefore, the average velocity can be selected as the calculation parameter. The average speed of the measurement mechanism is

$$v = \frac{L\_{\text{P}}}{t} \tag{4}$$

where *L*p represents the moving distance of the measurement mechanism.

Let *M* represent the data set of the combined projection waveform. Then, the variables *a*, *j*, *i*, *s* are created, the initial value of *a* is 1, *j* = 1, 2, 3, ... , *NL*<sup>p</sup> , *i* = *a*, ... , *NL*<sup>p</sup> .

Then, Equation (5) is defined as the objective function.

$$\left|\mathcal{M}(i) - s\right| < d\tag{5}$$

where *d* is a given value; *d* is selected according to the actual time series waveform.

If *d* is too large, the sampling interval of the spatial sequence waveform will be too large, resulting in distortion of the curve shape. If the *d* is too small, the redundant data cannot be filtered out. *M*(*i*) represents the *i*-th data in the set *M*. The initial value of *s* is *M*(1).

When *j* = 1, Equation (5) is executed to perform data search, when the searched data meets the objective function condition, *a* = *a* + 1, when the condition of the objective function is not met, the data is stored, at this time, the redundant data is filtered out, and the equation can be expressed as follows

$$\begin{cases} F(j) = a \\ K(j) = M(a) \end{cases} \tag{6}$$

where *F*(*j*) represents the position of *K*(*j*) in *M*; *K*(*j*) represents the set of characteristic measurements. Then, perform new calculations on *s*, and the equation can be expressed as

$$s = M(a) \tag{7}$$

After Equation (7) is completed, *j* = *j* + 1, next, repeat Equations (5)–(7). When *a* = *NL*<sup>p</sup> , the loop is completed. The flow chart of the algorithm is shown in Figure 12.

**Figure 12.** Flow chart of the algorithm.

At this time, the number of data in the sets *F* and *K* is *N*c. It is known that the sampling interval of the measured surface is two characteristic measurements with a certain value difference, so the measurement time between the two characteristic measurements can be expressed as

$$t\_{\mathbf{c}}(\mu) = \frac{F(\mu)t}{N\_{\mathbb{L}\_{\mathbb{P}}}} \tag{8}$$

where *F*(*u*) represents the *u*-th data in set *F*, *u* = 1, 2, 3, ... , *Nc*;

The measurement waveform of spatial sequence corresponding to the coordinate position on the measured surface can be obtained according to Equation (9), so the time-space conversion of the data can be realized and Equation (9) can be expressed as follows

$$\begin{array}{ccccc}\text{wt}\_{\mathbb{C}}(1) & \to & K(1) \\ \text{wt}\_{\mathbb{C}}(2) & \to & K(2) \\ & \cdot & \cdot \\ \cdot & \cdot & \cdot \\ \cdot & \cdot & \cdot \\ \text{wt}\_{\mathbb{C}}(N\_{\mathbb{C}}) & \to & K(N\_{\mathbb{C}}) \end{array} \tag{9}$$

where *t*c(1, ... , *N*c) is derived from Equation (8); *K*(1, ... , *N*c) is derived from Equation (6).

At this time, the spatial sequence waveform corresponding to the combined projection waveform *C*<sup>1</sup> can be represented by *R*1, and the spatial sequence waveform corresponding to the combined projection waveform *C*<sup>2</sup> can be represented by *R*2. After that, the trend curves Δ<sup>1</sup> and Δ<sup>2</sup> of *R*<sup>1</sup> and *R*<sup>2</sup> are extracted respectively, and Δ<sup>1</sup> is defined as the combined projection curve of *R*1, Δ<sup>2</sup> is defined as the combined projection curve of *R*2.

#### 4.1.3. Separation Algorithm for Combined Projection Curve

The separation algorithm model of the combined projection curve is shown in Figure 13.

**Figure 13.** Separation algorithm model of the combined projection curve.

With *PA* as the datum surface and *PB* as the measured surface, the calculated shape contour can be defined as

$$S\_{\rm PB} = Z\_{\rm PA} \pm |\Delta\_1| \tag{10}$$

where *Z*PA is the shape contour of *PA* surface, when Δ<sup>1</sup> < 0, uses '+', when Δ<sup>1</sup> > 0, uses '−'.

With *PB* as the datum surface and *PA* as the measured surface, the calculated shape contour can be defined as

$$S\_{\rm PA} = Z\_{\rm PB} \pm |\Delta\_2|\tag{11}$$

where *Z*PB is the shape contour of *PB* surface, when Δ<sup>2</sup> < 0, uses '+', when Δ<sup>2</sup> > 0, uses '−'.

## 4.1.4. Description Algorithm for Positional Relation

When *PB* is the measured surface, *PA* as the datum, the positional relation curve of *PB* relative to *PA* can be expressed as

$$G\_{\rm B} = S\_{\rm PB} - Z\_{\rm PB} \tag{12}$$

where *Z*PB is the shape contour of *PB* surface.

When *PA* is the measured surface, *PB* as the datum, the positional relation curve of *PA* relative to *PB* can be expressed as

$$G\_{\rm A} = S\_{\rm PA} - Z\_{\rm PA} \tag{13}$$

where *Z*PA is the shape contour of *PA* surface.

## *4.2. Mathematical Model for Describing Positional Relation between Two Vertical Parallel Surfaces*

## 4.2.1. Extraction Algorithm for Combined Projection Waveform

Three kinds of situations may occur during the measurement of two vertical parallel surfaces. As the detection model shown in Figure 14, when *PD* is measured surface with the *PC* as the datum surface, the measurements is *X*s3. When the contact line *A* is at *P*<sup>0</sup> and the detection line *C* is at *P*1, the distance between the surface where the contact line *A* is located and the surface where the detection line *C* is located is the same as the distance between the two surfaces which are absolutely parallel, and both are *L*. At this time, the measurement is fixed, defined as *X*1. Ideally, in the case where there is no positional relation between the two surfaces, the detection line *C* should be located at *P*2, and the contact line *A* should be located at *P*0. Since two absolutely parallel surfaces do not exist, the actual detection line *C* should be located at *P*3.

**Figure 14.** Separation algorithm model of the combined projection curve: (**a**) Model 1; (**b**) Model 2; (**c**) Model 3.

In the detection model shown in Figure 14a,b, the spring is in compression state, at this time, *X*s3 < *X*1. In the detection model shown in Figure 14c, the spring is in the stretching state, at this time, *X*s3 > *X*1. Then, the combined projection waveform can be defined as

$$C\_3 = X\_{\&} - X\_1 \tag{14}$$

When measuring *PC* with *PD* as datum, the measurement is *X*s4, when the spring is in compression state, *X*s4 < *X*1, and when the spring is in stretching state, *X*s4 > *X*1. Then, the combined projection waveform can be defined as

$$C\_4 = X\_{\mathfrak{s}4} - X\_1 \tag{15}$$

At this time, the spatial sequence waveform corresponding to the combined projection waveform *C*<sup>3</sup> can be represented by *R*3, and the spatial sequence waveform corresponding to the combined projection waveform *C*<sup>4</sup> can be represented by *R*4. After that, the trend curves Δ<sup>3</sup> and Δ<sup>4</sup> of *R*<sup>3</sup> and *R*<sup>4</sup> are extracted respectively, and Δ<sup>3</sup> is defined as the combined projection curve of *R*3, while Δ<sup>4</sup> is defined as the combined projection curve of *R*4.

#### 4.2.2. Separation Algorithm for Combined Projection Curve

The separation algorithm model of the combined projection curve is shown in Figure 14. With *PC* as the datum surface, *PD* as the measured surface, the calculated shape contour can be defined as

$$S\_{\rm PD} = -\Delta\_3 - Z\_{\rm PC} \tag{16}$$

where *Z*PC is the shape contour of *PC* surface.

With *PD* as the datum surface, *PC* as the measured surface, the calculated shape contour can be defined as

$$S\_{\rm PC} = -\Delta\_4 - Z\_{\rm PD} \tag{17}$$

where *Z*PD is the shape contour of *PD* surface.

4.2.3. Description Algorithm for Positional Relation

When *PC* is the measured surface, *PD* as the datum, the positional relation curve of *PD* relative to *PC* can be expressed as

$$\mathbf{G\_D} = \mathbf{S\_{PD}} - \mathbf{Z\_{PD}} \tag{18}$$

When *PC* is the measured surface, *PD* as the datum, the positional relation curve of *PD* relative to *PC* can be expressed as

$$G\_{\overline{C}} = S\_{\overline{PC}} - Z\_{\overline{PC}} \tag{19}$$

#### **5. Experimental Validation**

## *5.1. Measuremen Texperiment of Two Horizontal Parallel Surfaces*

#### 5.1.1. Experimental Step

In order to verify the correctness of this measurement method, the measurement experiment was carried out. Before measuring, a marble flat ruler with class 000 precision as shown in Figure 2 was selected as the datum surface, the size of the marble flat ruler selected in this paper is 500 × 100 × 50 mm, and its flatness is 1.5μm. Therefore, it can be regarded as an approximately absolute horizontal plane. Then, the measurement mechanism was placed on the surface of marble ruler to calibrate the initial value *X*0. It is assumed that contact line *A* and detection line *C* are on the same horizontal surface. Place the detection mechanism at different positions on the marble flat ruler and find the average of the five measurements, then the initial value *X*<sup>0</sup> can be obtained, and *X*<sup>0</sup> is 32.92014 mm.

Taking *PA* and *PB* surfaces with a length of 500 mm and a width of 50 mm, the distance between the two surfaces is 60 mm. Calibrating the starting and ending positions, ensure that the spring is in compression. Firstly, the *PB* surface was detected by using *PA* surface as the datum surface, as shown in Figure 15a, and then the *PA* surface was detected by using *PB* surface as the datum surface, as shown in Figure 15b. The measurement method is described in Section 3.1. Each surface was measured four times. During the measurement process, the measurement mechanism moves along the auxiliary surface toward the arrow direction. Under the constraint of an auxiliary surface, the detection mechanism will not slide.

**Figure 15.** Measurement system of two horizontal parallel surfaces. (**a**) *PB* is the measured surface. (**b**) *PA* is the measured surface.

#### 5.1.2. Results and Analysis

The measurements of laser displacement sensor are shown in Figures 16 and 17. When the contact line *A* is located at the starting position, computer begins to record the data. After the contact line *A* reached the end position, where it necessary to save the data, the measurement mechanism is in a static state, and the measurements of this process represent a straight line approaching the level. It is known that the measurements between starting position and end position is defined as valid measurements. Therefore, the suspended time series waveforms need to be separated and the effective measurements were obtained.

**Figure 16.** The measurements when *PB* is the measured surface (**a**) measurements 1 (**b**) measurements 2 (**c**) measurements 3 (**d**) measurements 4.

**Figure 17.** The measurements when *PA* is the measured surface (**a**) measurements 1 (**b**) measurements 2 (**c**) measurements 3 (**d**) measurements 4.

When the effective measurements and *X*<sup>0</sup> were obtained, the combined projection waveforms were calculated according to Equations (1) and (2). Figure 18 shows the combined projection waveforms. It can be seen that the waveforms change with sampling time, and the measurement time is different, which has greater randomness.

**Figure 18.** Combined projection waveforms. (**a**) *PB* is the measured surface (**b**) *PA* is the measured surface.

The measurements in Figure 18 are sequenced according to the measurement time from short to long. Then, FFT is carried out to obtain the amplitude frequency characteristics, as shown in Figure 19. It can be seen from the analysis of the amplitude of the low-frequency band that the amplitudes of the spectrum graphs corresponding to different waveforms are basically identical. Further, the peak mainly occurs near 0 Hz and there is no frequency doubling relationship in the amplitude frequency characteristics. This is because the measurements changes with the shape of the measured plane and is not affected by other factors. When 2–28 Hz is amplified, it is found that the amplitude does not increase or decrease monotonously with the increase of measurement time. It shows that the measurement time has no effect on the amplitude frequency characteristics of the measurements. It can also be understood that when four waveforms are converted into spatial sequences, the overall shape of the waveforms does not change significantly.

**Figure 19.** Amplitude frequency characteristics of measurements. (**a**) *PB* is the measured plane (**b**) *PA* is the measured plane.

Extracting the amplitude corresponding to the 2 Hz, 4 Hz, 6 Hz, 8 Hz, as shown in Figure 20, it can be seen that the amplitude corresponding to the same frequency has little difference with varying measurement time, indicating that different driving speed has little impact on the attribute of measurements. Therefore, the average velocity can be used as the calculation parameter.

**Figure 20.** Amplitude corresponding to frequency 2 Hz, 4 Hz, 6 Hz, 8 Hz. (**a**) *PB* is the measured plane (**b**) *PA* is the measured plane.

Then the waveforms in Figure 18 are processed by the time-space conversion algorithm. The converted spatial sequence waveforms are shown in Figure 21. Because the positional relation curve is macro geometric, therefore, the trend curves of the waveforms in Figure 21 are extracted, which are called the combined projection curves, as shown in Figure 22. It can be seen from Figures 21 and 22, when the measurement mechanism detects the identical surface, *A*, *B,* and *C* always pass the shape contours of the identical surfaces. Although the characteristic measurements at the same position are not exactly the same, but the overall shape of the waveform trend curve is constant, the combined projection curves on the identical measured surfaces are close to coincidence. This shows that the detection mechanism has good repeatability and stability, and the time–space conversion algorithm successfully converts the waveforms of time–deviation into the position–deviation.

**Figure 21.** Combined projection waveforms of spatial sequence (**a**) *PB* is the measured surface. (**b**) *PA* is the measured surface.

**Figure 22.** Combined projection curves. (**a**) *PB* is the measured surface. (**b**) *PA* is the measured surface.

Figure 23 shows the average of combined projection curve of the *PA* and *PB* surfaces. Here, the data structure is the same as that of the known surface shape contours in Figure 24, and each datum corresponds to the identical detection position. As can be seen from Figure 23 the combined projection curves obtained by mutual measurement of the two surfaces are symmetrically distributed with 0 as the center, which accords with the mathematical relationship of the data corresponding to the same position in the two surfaces in Figure 13.

**Figure 23.** The average of the combined projection curves of the *PA* and *PB* surfaces.

**Figure 24.** Known surface shape contours.

Based on the above analysis, substituting the data in Figures 23 and 24 into Equations (10) and (11), the calculated surface shape contours are obtained, as shown in Figure 25. It can be seen from Figure 25 that the calculated surface shape contours are different from the known surface shape contours, which indicates that there exists a positional relation between two surfaces *PA* and *PB*.

**Figure 25.** Comparison between the calculated surface shape contour and known surface shape contour: (**a**) *PB* is the measured surface. (**b**) *PA* is the measured surface.

Finally, the data in Figure 25 were substituted into Equations (12) and (13) to obtain the difference curve between the calculated surface shape contour and the known surface shape contour, as shown in Figure 26. The curve describes the positional relation of the two surfaces. It can be seen from Figure 26. The positional relation curve obtained by mutual check has the same shape and symmetric distribution, which is consistent with the principle of a positional relation between two horizontal parallel planes. The maximum error is 4.07 μm, which has little effect on the overall shape of the curve. The correctness of this detection method can be proved.

**Figure 26.** Two positional relation curves.

## *5.2. Measuremen Texperiment of Two Vertical Parallel Surfaces*

## 5.2.1. Experimental Step

In order to verify the correctness of the algorithm for describing the positional relation between two vertical parallel surfaces, a measurement experiment was performed using a homemade measuring instrument, and the measurement site is shown in Figure 27. Before measurement, choosing a class 000 marble ruler with length of 100 mm, width of 60 mm, and height of 50 mm. As its parallelism is 1μm, the surfaces on both sides of the marble ruler can be approximately regarded as absolutely smooth parallel surfaces. Firstly, place the contact lines *A*, *B,* and the detection line *C* on both sides of the marble ruler, and tightly clamp the marble ruler. Then, the initial value *X*<sup>1</sup> can be obtained and *X*<sup>1</sup> is 24.1379 mm.

**Figure 27.** Measurement system of two vertical parallel surfaces.

The method for detecting the positional relation between two vertical parallel surfaces is the same as the method for detecting the positional relationship between two horizontal surfaces. Firstly, use the *PC* as the datum surface to detect the *PD* surface, and then use the *PD* surface as the datum surface to detect the *PC* surface. Repeat the measurement four times for each surface.

#### 5.2.2. Results and Analysis

The original measurement data recorded by the computer is shown in Figures 28 and 29. When the contact line *A* is located at the starting position, computer begins to record the data. After the contact line *A* reached the end position, where it is also necessary to save the data, the measurement mechanism is in a static state, and the measurement of this process is a straight line approaching the level. It is known that the measurement between starting position and end position is defined as a valid measurement. Therefore, the suspended time series waveforms need to be separated and the effective measurements were obtained.

**Figure 28.** The measurements when *PD* is the measured surface (**a**) measurements 1 (**b**) measurements 2 (**c**) measurements 3 (**d**) measurements 4.

**Figure 29.** The measurements when *PC* is the measured surface (**a**) measurements 1 (**b**) measurements 2 (**c**) measurements 3 (**d**) measurements 4.

Extract the effective measurements, according to Equations (14) and (15), and the combined projection waveform will be obtained, as shown in Figure 30.

**Figure 30.** Combined projection waveforms: (**a**) *PD* is the measured surface (**b**) *PC* is the measured surface.

It can be seen from the Figures 19 and 20 that the measurement time has no effect on the overall shape of the waveforms. Then, use the space-time conversion algorithm to obtain the spatial sequence waveform, as shown in Figure 31. The trend curve of the waveform in Figure 31 is extracted to obtain a combined projection curve, as shown in Figure 32. The projection curves obtained from multiple measurement are close to coincidence, which shows that the detection mechanism also has high repeatability and stability when applied to the detection of vertical surface, which proves the rationality of the design of the detection mechanism in the vertical direction.

**Figure 31.** Combined projection waveforms of spatial sequence: (**a**) *PD* is the measured surface (**b**) *PC* is the measured surface.

**Figure 32.** Combined projection curves (**a**) *PD* is the measured surface (**b**) *PC* is the measured surface.

Figure 33 shows the average of the combined projection curve of *PC* and *PD* surfaces. It can be seen from Figure 33 that the combined projection curves are close to coincide. It is proved that the relative displacement of the two vertical surfaces is only related to the distance of the detection line *C* relative to the datum surface, independent of the direction, and in line with the geometric relationship in the detection model in Figure 14.

**Figure 33.** The average of the combined projection curves of the *PC* and *PD* surfaces.

Based on the above analysis, the data in Figures 24 and 33 are substituted into Formulas (16) and (17) to obtain the calculated surface shape contours, as shown in Figure 34. It can be seen from Figure 34 that the calculated surface shape contour is different from the known surface shape contour, indicating that there exists a positional relation between the two surfaces.

**Figure 34.** Comparison between calculated surface shape contour and known surface shape contour: (**a**) *PD* is the measured surface (**b**) *PC* is the measured surface.

Finally, the data in Figure 34 are substituted into Equations (18) and (19) to obtain the difference curve between the calculated surface shape contour and the known surface shape contour, as shown in Figure 35. The curve describes the spatial relationship between *PC* and *PD* surfaces. As can be seen from Figure 35, the shape of positional relation curves obtained by mutual detection are close to coincidence, which id consistent with the principle of positional relation between two vertical parallel surfaces. The maximum error of the two positional relation curves is 4.56 μm, which has little effect on the overall shape of the curve. The correctness of this detection method can be proved.

**Figure 35.** Two positional relation curves.

## *5.3. Discussion*

In order to verify whether this method is correct and whether the detection instruments are designed reasonably, only short span tests are carried out in this paper. When measuring the two surfaces with large span, as long as the detection mechanisms are in a balanced state, there will be no sliding. Therefore, this method can still be used for measurement of large span surfaces.

Because the contact lines *A*, *B,* and detection line *C* have shape errors, and the combined projection waveform is equal to the measurements minus the initial value, therefore the influence of the shape errors of the contact lines *A*, *B,* and detection line *C* on the measurement results can be eliminated.

During the detection progress, the measurements will be affected by motion error, surface roughness, spring damping and other factors. However, the influence of these factors accounts for a small proportion of the measurements. Since the position relation curve is macro, the trend curve reflects the overall shape of the measurements. The extracted trend curve has a certain inclusiveness to the peak and valley of the waveform. When the trend curve of the waveform is extracted, the error components in the measurements will be largely separated. Therefore, the error has little effect on the shape of trend curve and the error of the final positional relation curve mainly comes from the method of extracting the trend curve.

The article focuses on verifying the correctness of the detection method and whether the detection mechanism can be applied to actual measurement. The next work will focus on the analysis of the uncertainty of detection methods and the detection process.

#### **6. Conclusions**

This paper proposed a method for describing the positional relation of two parallel surfaces on-site. The extraction algorithm for combined projection waveform, time-space conversion algorithm, the separation algorithm for combined projection curve, and the description algorithm for positional relation are successfully developed. It can be seen from the experimental results that the combined projection curves obtained by detecting the same surface are nearly coincident, indicating that the detection mechanism has high repeatability. The extracted trend curve has a certain inclusiveness to the peak and valley of the waveform. Although the measurements affected by motion error, surface roughness, spring damping, and others factor, the error has little effect on the shape of trend curve. The results of the mutual detection of the two examples are in accordance with the objective law. The maximum error of the positional relation curve obtained by the mutual detection of the two horizontal parallel surfaces is 4.07 μm, and the maximum error of the position relation curve obtained by the mutual detection of the two vertical parallel surfaces is 4.56 μm, which has little effect on the curve shape, indicating that this method can accurately obtain the positional relation between two horizontal parallel planes and two vertical parallel planes. The measurement mechanisms are designed reasonably, and the measurement method is correct. It is operable in practical application.

Moreover, it can be completed in two minutes from the acquisition of the detection data to the drawing of the positional relation curve of two surfaces, which means high efficiency. Compared with the existing parallelism evaluation method, the positional relation curve obtained by this method makes the description of the position error of two parallel planes more specific. Compared with the existing measurement instruments, the mechanisms are more suitable for field measurement of large equipment. This research demonstrates innovation, and it is also of great significance to the requirements of modern industries such as field measurement and the digitalization of assembly processes.

**Author Contributions:** Conceptualization, Z.L. (Zechen Lu); Data curation, Z.L. (Zechen Lu); Formal analysis, Z.L. (Zechen Lu); Funding acquisition, C.Z.; Investigation, Z.L. (Zhenjun Li); Methodology, C.Z.; Software, B.Z.; Visualization, B.Z.; Writing—original draft, Z.L. (Zechen Lu); Writing—review & editing, C.Z. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work was funded by the National Natural Science Foundation of China (No. 51775094).

**Conflicts of Interest:** The authors declare no conflicts of interest.

**Data Availability:** The data used to support the findings of this study are included within the article.

## **References**


© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
