# Coaxiality of Stepped Shaft Measurement Using the Structured Light Vision

Authors: Chunfeng Li; Xiping Xu; Huiqi Sun; Jianwei Miao; Zhen Ren
Journal: Mathematical Problems in Engineering
 (2021)

---

## Abstract

A method is proposed to measure the coaxiality of stepped shafts based on line structured light vision. In order to solve the repeated positioning error of the measured shaft, the light plane equation solution method is proposed using movement distance and initial light plane equation. In the coaxiality measurement model, the equation of the reference axis is obtained by the overall least square method through the center point coordinates of each intercept line on the reference axis. The coaxiality error of each shaft segment relative to the reference axis is solved based on the principle of minimum containment. In the experiment, the coaxiality measurement method is evaluated, and the factors that affect the measurement accuracy are analyzed.


---

## Body

## 1. Introduction

The stepped shafts are widely used in the mechanical power system, transmission system, and output system. The processing quality of the stepped shafts directly determines the working performance of the mechanical structures. Coaxiality is an important geometric parameter of the stepped shaft, which reflects the rotation characteristics of the stepped shaft. Low-precision coaxiality will increase the vibration of parts and cause accelerated wear of the mechanical structure. Therefore, the coaxiality measurement technology is very important to ensuIn recent years; researchers have done a lot of work on the measurement of coaxiality and cylindricity. Sun et al. [1] proposed a cylindrical profile measurement model with five systematic errors. Compared with the traditional method with two systematic errors, this method can improve the coaxiality measurement accuracy of the low-pressure turbine shaft by 2.9 μm. Tan et al. [2, 3] proposed a fast method for evaluating the coaxiality of stepped shafts based on maximum material requirements. The test results prove that this method has certain advantages over other existing methods in measurement of speed and accuracy. Arthur Graziano et al. [4] proposed a measurement method that uses an inductive displacement sensor to measure the coaxial line of an oil pipeline. The above coaxiality measurement methods are all based on contact measurement. With the continuous improvement of modern industry’s requirements for intelligent manufacturing, the original contact measurement methods can no longer meet the noncontact and real-time requirements.Due to the development of vision measurement technology [5, 6], many noncontact measurement methods have been applied to the measurement of stepped shafts, and these technologies can be divided into active measurement and passive measurement. Passive measurement technology uses one or more cameras to measure the geometric parameters of the stepped shaft [7–9]. Wang et al. [10] obtained the position of the measurement reference line and the center line through a single-mode optical fiber laser diode and used a CMOS to obtain the coaxiality of large and medium shafting. Liu et al. [11] used the light curtain sensor to measure the coaxiality of the EMU axles, and the measurement error caused by the nonparallel connection between the two centers of the axles was studied in paper. In the experiment, the error of the vision algorithm was compared with the result obtained by the three-coordinate instrument. The accuracy of this method had been proven to meet existing industrial applications. But this method is an active vision measurement method, which is not suitable for complex measurement environments. Tong obtained the coaxiality of large forged step shafts by an area CCD camera [12]. When the measured shaft diameter ranged from 400 to 550 mm, the relative measuring error of the coaxiality was 0.3% by the algorithm in the experiment. Since the passive vision measurement methods are susceptible to noise and the measurement systems are complicated, they are not suitable for the stepped shaft machining site.In the line structured light vision measurement technology, energy is emitted to the surface of the measured object by the laser, and the surface morphology of the measured object is obtained by collecting reflected energy. Because this technology has the characteristics of low hardware cost and strong robustness, it is widely used in the geometric parameters of shaft parts [13–15]. In this paper, a line structured light vision measurement system consisting of a camera and a line structured light is proposed to measure the coaxiality of the stepped shaft.In the coaxiality measurement, the laser is translated along a straight line multiple times, the intersection lines formed by the light planes and the measured stepped shaft are obtained by the camera, and the center of each intersection line is calculated by ellipse fitting. The reference axis equation is obtained by the global least square method. The distance from the center of each section to the reference axis is calculated, and the maximum distance corresponding to each shaft segment is regarded as the coaxiality of the shaft segment through the principle of least tolerance. Since it is necessary to obtain the light plane equation after each movement in the coaxiality measurement, the paper put forward using the translation distance of the line laser to calculate the light plane equation after translation, which can solve the clamping error caused by the original optical plane equation calibration method.The paper consists of the following parts: Section2 proposes the calculation of the world coordinates of the stepped shaft surface contour points; Section 3 establishes the translational light plane calibration algorithm; Section 4 outlines the stepped shaft coaxiality measurement model; Section 5 reports the experimental results used to test the measuring; Section 6 provides the study’s conclusions.


## 2. World Coordinate Calculation of Contour Points on Stepped Shaft Surface

### 2.1. Solving the Camera Coordinates of Points on the Stepped Shaft Surface

The camera coordinate solution model for data points on the surface of the stepped shaft is shown in Figure1. The Pi is any point on the measured shaft. The intersection P′ of the ray OCPi and the imaging plane is the projection point of Pi on the imaging plane. Through geometric relationship analysis, the camera coordinates of Pi can be determined by the equations of the light plane π and OCPi. Let the plane equation of the light plane π be(1)A1XC+A2YC+A3ZC+A4=0.Figure 1
Camera coordinate solution model for points on stepped shaft surface.Equation (1) can be obtained by the optical plane calibration method [15].The camera coordinates ofP′can be obtained by the pixel coordinates of P′ and the camera internal parameters. The pixel coordinates of P′can be obtained by Steger algorithm [16], and the camera internal parameters can be obtained by camera calibration [17]. The equation of OCP′ in the camera coordinate system can be expressed as(2)XCxu=YCyu=ZC.The camera coordinates ofPi can be calculated by equations (1) and (2), and xu and yu are the image coordinates of point Pi.


### 2.2. Solving World Coordinates of Points on Stepped Shaft Surface

According to the stepped shaft measurement model, the intersecting line between the light plane and the measured shaft is a spatial elliptical arc. In order to simplify the calculation process, the paper establishes the world coordinate systemOW-XWYWZW which is as shown in Figure 2. In the world coordinate system, the normal vector of the light plane is as OWZW and the origin of world coordinate system (OW) is the origin of the camera coordinate system (OC). Because all points of intersection OP have the same ZW, the process of solving the ellipse’s center has changed from a space ellipse fitting problem to a plane ellipse fitting problem.Figure 2
The world coordinate system (OW-XWYWZW) establishment.The direction vector of theOWZW is the normal direction of the light plane (A1, A2, and A3), and the direction cosine of the OWZW in the camera coordinate system can be obtained by using the normal vector of the light plane. The direction cosine of the OWZW is shown as(3)e31=A1A12+A22+A32,e32=A2A12+A22+A32,e33=A3A12+A22+A32.According to the positional relationship between the world coordinate system and the camera coordinate system, the plane equation of the coordinate planeOWXWYW in the camera coordinate system can be written as(4)A1XC+A2YC+A3ZC=0.Set the camera coordinate of a pointK on the OWXWYW plane as (1, 1, x). Substituting the camera coordinate of the K into equation (5), the Z-axis coordinate of the K can be solved:(5)ZC=−A1XC+A2YCA3.where the direction vector of OCK is 1,1,−A1XC+A2YC/A3, which is taken as the direction vector of OWXW in the camera coordinate system. The direction cosine of OWXW is(6)e11=12+k2,e32=12+k2,e33=k2+k2,where k is −A1XC+A2YC/A3.The direction vector ofOWYW which can be obtained through the direction vector of OWXW and OWZW is shown as(7)J=I×K=ijkA1A2A311k=A2k−A3i+A3−A1kj+A1k−A3k,where I is the direction vector of OWXW and K is the direction vector of OWZW. Set ey1 as A2k − A3, ey2 as A3 − A1k, and ey3 as A1k − A3, The direction cosine of OWYW is(8)e21=ey1ey12+ey22+ey32,e22=ey2ey12+ey22+ey32,e23=ey3ey12+ey22+ey32.Based on the direction cosine of the three-coordinate axes and the camera coordinates of the origin in the world coordinate system, the transformation relationship between the camera coordinates and the world coordinates is(9)XWXWZW=e11e12e13e21e22e23e31e32e33XCYCZC.


## 2.1. Solving the Camera Coordinates of Points on the Stepped Shaft Surface

The camera coordinate solution model for data points on the surface of the stepped shaft is shown in Figure1. The Pi is any point on the measured shaft. The intersection P′ of the ray OCPi and the imaging plane is the projection point of Pi on the imaging plane. Through geometric relationship analysis, the camera coordinates of Pi can be determined by the equations of the light plane π and OCPi. Let the plane equation of the light plane π be(1)A1XC+A2YC+A3ZC+A4=0.Figure 1
Camera coordinate solution model for points on stepped shaft surface.Equation (1) can be obtained by the optical plane calibration method [15].The camera coordinates ofP′can be obtained by the pixel coordinates of P′ and the camera internal parameters. The pixel coordinates of P′can be obtained by Steger algorithm [16], and the camera internal parameters can be obtained by camera calibration [17]. The equation of OCP′ in the camera coordinate system can be expressed as(2)XCxu=YCyu=ZC.The camera coordinates ofPi can be calculated by equations (1) and (2), and xu and yu are the image coordinates of point Pi.


## 2.2. Solving World Coordinates of Points on Stepped Shaft Surface

According to the stepped shaft measurement model, the intersecting line between the light plane and the measured shaft is a spatial elliptical arc. In order to simplify the calculation process, the paper establishes the world coordinate systemOW-XWYWZW which is as shown in Figure 2. In the world coordinate system, the normal vector of the light plane is as OWZW and the origin of world coordinate system (OW) is the origin of the camera coordinate system (OC). Because all points of intersection OP have the same ZW, the process of solving the ellipse’s center has changed from a space ellipse fitting problem to a plane ellipse fitting problem.Figure 2
The world coordinate system (OW-XWYWZW) establishment.The direction vector of theOWZW is the normal direction of the light plane (A1, A2, and A3), and the direction cosine of the OWZW in the camera coordinate system can be obtained by using the normal vector of the light plane. The direction cosine of the OWZW is shown as(3)e31=A1A12+A22+A32,e32=A2A12+A22+A32,e33=A3A12+A22+A32.According to the positional relationship between the world coordinate system and the camera coordinate system, the plane equation of the coordinate planeOWXWYW in the camera coordinate system can be written as(4)A1XC+A2YC+A3ZC=0.Set the camera coordinate of a pointK on the OWXWYW plane as (1, 1, x). Substituting the camera coordinate of the K into equation (5), the Z-axis coordinate of the K can be solved:(5)ZC=−A1XC+A2YCA3.where the direction vector of OCK is 1,1,−A1XC+A2YC/A3, which is taken as the direction vector of OWXW in the camera coordinate system. The direction cosine of OWXW is(6)e11=12+k2,e32=12+k2,e33=k2+k2,where k is −A1XC+A2YC/A3.The direction vector ofOWYW which can be obtained through the direction vector of OWXW and OWZW is shown as(7)J=I×K=ijkA1A2A311k=A2k−A3i+A3−A1kj+A1k−A3k,where I is the direction vector of OWXW and K is the direction vector of OWZW. Set ey1 as A2k − A3, ey2 as A3 − A1k, and ey3 as A1k − A3, The direction cosine of OWYW is(8)e21=ey1ey12+ey22+ey32,e22=ey2ey12+ey22+ey32,e23=ey3ey12+ey22+ey32.Based on the direction cosine of the three-coordinate axes and the camera coordinates of the origin in the world coordinate system, the transformation relationship between the camera coordinates and the world coordinates is(9)XWXWZW=e11e12e13e21e22e23e31e32e33XCYCZC.


## 3. Calibration Algorithm of the Translated Light Planes Equations

In order to obtain the surface information of the measured stepped shaft on multiple crosssections, it is necessary to move the laser for several times along a straight line during the coaxiality measurement, because the light plane equation will change after moving the line laser. The traditional light plane methods need to remove the measured shaft from the experimental table and then calibrate the light plane. This process will not only affect the measurement speed, but more importantly, it will produce positioning errors, which have a great impact on the measurement accuracy of coaxiality. To solve this problem, the paper proposes a multiparallel light plane equation solving method.The line laser moves along on the rail, and the light planes at each position are parallel to each other. Therefore, these light planes have the same normal vector. Let this series of light planes equation be(10)A1XC+A2YC+A3ZC+Ci=0.Through the distance formula of space parallel planes, the distance between two adjacent light planes can be expressed as(11)hi=Ci−Ci−1A12+A22+A32.Therefore, the relationship between the equation constant terms of two adjacent light planes is(12)Ci=Ci−1±hiA12+A22+A32.In order to obtain the parameters of the light plane equation after translation, it is necessary to establish the functional relationship which is the distance between adjacent light planes and the moving distance of the laser. The geometric relationship is shown in Figure3; the coordinate axis ox is set to coincide with the moving direction of the line laser; S0 represents the initial position of the lasers, S1, Si−1, Si, respectively, represent the position of the light plane after the first i − 1 and i-th movement; Hi represents the distance between the light plane and the initial light plane after the i-th movement of the light plane; α represents the angle between the moving direction of the laser and the light plane.Figure 3
The geometric relationship of the distance between light planes and the moving distance of the laser.According to the geometric relationship shown in Figure3, the light plane equation for the first translation should be solved. In order to ensure that the normal vectors of the series, light planes are the same, the three coefficients of the light plane equation are fixed, and constant term C1 is calculated in solving the light plane equation. After obtaining the light plane equation for the first movement, the distance h1 between the two light planes can be solved according to equation (12). Let the laser translation distance be d1, and cosine of the angle between the line laser and the light plane is(13)cosα=h1d1.Using the cosine value of the included angleα, the distance Hi from the light plane after the i-th translation to the initial position of the light plane can be obtained:(14)Hi=di⋅cosα.Then, the distance between two adjacent light planes is(15)hi=di−di−1⋅cosα.After thei-th movement of the laser, the corresponding equation of the light plane is(16)A1XC+A2YC+A3ZC+Ci−1±di−di−1A12+A22+A32cosα=0.In order to determine the final light plane equation after each movement, there is a need in comparing the constant term of the light plane equation at the initial position (C0) with the constant term of the light plane after the first movement (C1). Since the laser is moving along the same direction in the coaxiality measurement, the constant term of the light plane equation linearly increases or decreases after each movement. When C0 is greater than C1, equation (17) is shown as(17)A1XC+A2YC+A3ZC+Ci−1−di−di−1A12+A22+A32cosα=0.WhenC1 is greater than C0, equation (17) is shown as(18)A1XC+A2YC+A3ZC+Ci−1+di−di−1A12+A22+A32cosα=0.


## 4. The Coaxiality Measurement Model of Stepped Shaft

The coaxiality measurement model proposed in the paper is shown in Figure4. The line laser is fixed on the linear slide rail, and the multiple truncated intersector curve of light planes and the measured axis are obtained by moving the platform on each shaft segment. In Figure 4, let πi be the light plane corresponding to the i-th section, and Pi be any point on the i-th truncated intersector curve; Oi is the center of the intercept line between the i-th light plane and the measured stepped shaft, that is, the center of the ellipse where the ellipse arc is located. The world coordinates of Oi can be obtained by ellipse fitting through the world coordinates of the data point Pi on the corresponding section.Figure 4
The coaxiality measurement model of stepped shaft.In Figure4, the shaft 1 is the reference shaft section of the stepped shaft, and L is the axis of the reference shaft. The line equation corresponding to L can be obtained by the camera coordinates of Oi corresponding to shaft 1, and the line equation is the premise for obtaining the coaxiality of the stepped shaft. Because there are errors in the process of solving the coordinates of Pi, the coordinates of Oi obtained by ellipse fitting also have errors, which will affect the calculation accuracy of the reference axis L.In order to improve the calculation accuracy of the reference axisL, the paper adopts the overall least square method to obtain the line equation of the reference axis L. The reference axis equation is obtained by the center points of all sections on the axis L, and set the equation of the axis as(19)XC−x0A=YC−y0B=ZC−z0C,Equation (20) could be rewritten as(20)XC=ACZC−z0+x0,YC=BCZC−z0+y0.Seta=A/C,b=x0−A/Cz0,c=B/C,d=y0−B/Cz0; equation (21) can be simplified as(21)XC=aZC+b,YC=cZC+d,Equation (22) is changed into matrix form and shown as(22)ZC100001ZCabcdT=XCYC.SetB=ze100001ze,L=xeye,X=abcdT, and equation (23) is(23)BX=L.The coordinates of all center points on the reference axis are substituted into equation (19), and the initial values of the axis equation parameters are calculated by least square fitting.According to the distance formula from point to space line, the distancedi from each center point Oi to the initial axis L is(24)di=XCi−aZCi−b⋅n1−YCi−cZCi−d⋅n2n1×n2.Whenn1is (1, 0, a), and n2 is (1, 0, c), the discriminant coefficient δ is created. If di is less than δ, the i-th center point is eliminated as the error point. According to the least square fitting, the final reference axis equation is solved by the filtered center point.After obtaining the reference axis equation and after the reference axis equation is solved, the distance from the center points of all section on the stepped shaft to the reference axis is obtained through the point-to-line space distance formula. SetDi be the distance array from all center points on the i-th shaft segment to the reference axis, and dmaxi be the maximum value of the data Di. According to the principle of minimum tolerance, dmaxi is the coaxiality error corresponding to the i-th shaft segment.


## 5. Experiments and Result Analysis

Experiments are conducted to assess the utility of the proposed coaxiality measurement algorithm. The four shaft sections of a stepped shaft are used as the measurement object, and shaft section 1 is the reference for coaxiality measurement, as shown in Figure5. In order to verify the accuracy of the measurement algorithm in this paper, a three-coordinate measuring instrument was used to measure the coaxiality of the stepped shaft, and the measurement results are as shown in Table 1.Figure 5
The measured step shaft.Table 1
Coaxiality measurement results of stepped shaft (three coordinates).
Number1#2#3#4#Coaxiality error (mm)00.0210.0130.025The coaxiality measurement of stepped shaft based online structured light vision is shown in Figure6. The stepped shaft was fixed at test-bed. The laser was fixed on the translation sliding table, the probe of the dial indicator is in contact with the translation sliding table, and the translation distance of the laser was obtained by a dial indicator. The main parameters of equipment are shown in Table 2, and the calibration results of the vision measurement system are shown in Table 3.Figure 6
The coaxiality of step shaft measurement site.Table 2
Equipment models and parameters in the vision measurement system.
DeviceDevice modelThe main parametersCameraMER−125−30UMResolution: 1292 × 964 pixelLensComputar M2514−MPFocal length: 25 mmLine laserLH650−80−3Power: 0∼20 mWLight sourceCCS LFL−200Luminous area: 200 × 180 mmCalibration boardNANO CBC25mm−2.0Precision: ±1.0μmTable 3
Calibration results of vision measurement system.
Internal parameter matrixA=6908.140−0.253647.98806908.417504.010001Distortion coefficientk1k2p1p20.10546.9180.00060.0003Light plane equation parameters3.0042XC−0.1546YC+1.717ZC−1000=0In the process of solving the reference axis equation, the laser was moved 10 times, and each moving distance was 0.1 mm. Based on the algorithm at the section 3, the light plane equation after each movement can be calculated by the initial light plane equation and the translation distance. The light plane equations after each movement are shown in Table4. The pixel coordinates of the light stripe center points on each image can be detected by Steger’s algorithm, and the detection results are as shown in Figure 7.Table 4
The light plane space equations (reference axis).
Section numberLight plane equationSection 13.0042XC−0.1546YC+1.717ZC−1000=0Section 23.0042XC−0.1546YC+1.717ZC−999.658=0Section 33.0042XC−0.1546YC+1.717ZC−999.316=0Section 43.0042XC−0.1546YC+1.717ZC−998.974=0Section 53.0042XC−0.1546YC+1.717ZC−998.632=0Section 63.0042XC−0.1546YC+1.717ZC−998.290=0Section 73.0042XC−0.1546YC+1.717ZC−997.948=0Section 83.0042XC−0.1546YC+1.717ZC−997.606=0Section 93.0042XC−0.1546YC+1.717ZC−997.264=0Section 103.0042XC−0.1546YC+1.717ZC−996.922=0Figure 7
The detection results of the light stripe center points.Through the coaxiality measurement model proposed in this paper, the world coordinates of the center point corresponding to each intersecting line can be calculated, and the space linear equation of the reference axis is obtained:(25)x−96.40610.0426+y−3.91390.0007+z−606.79510.0282=1.The five different positions of the light strip images could be captured on each shaft segment from shaft segment 2 to shaft segment 4, and the center points of the light strips on the measured shaft are shown in Figure8. The light plane equation of the initial position on each shaft segment is shown in Table 5.Figure 8
The detection results of the light stripe center points on shaft segments 2 to 4.
(a)(b)(c)Table 5
The calibration results of light plane space equation at initial position.
Shaft segment numberLight plane equationShaft section 23.0042XC−0.1546YC+1.717ZC−934.678=0Shaft section 33.0042XC−0.1546YC+1.717ZC−924.418=0Shaft section 43.0042XC−0.1546YC+1.717ZC−909.028=0According to the coaxiality measurement algorithm proposed in this paper, the distance from the center points of each shaft segment to the reference axis is calculated and the maximum distance is regardedas the coaxiality error of the shaft segment by the principle of minimum tolerance. The coaxiality error of measured shaft is shown in Table 6, A is the coaxiality error by the coordinate measuring machine, and B is the measured value by the method proposed in the paper.Table 6
Coaxiality measurement results of stepped shaft (mm).
NumberABMeasurementsErrorShaft section 20.0210.0340.013Shaft section 30.0130.0280.015Shaft section 40.0250.0390.014Mean error0.014According to the experimental results, the coaxiality error of the stepped shaft is less than 40μm by the algorithm proposed in this paper, and the absolute error is less than 25 μm compared with the measured value of the coordinate measuring machine.In the experiment, the measurement environment is relatively closed, and the external light environment is better. However, in the practical industrial environment, it is necessary to require online measurement and the machining environment is worse than the laboratory environment. To analyze the influence of noise on the algorithm, Gaussian noise is added to the light strip image, the mean value of the noise is 0, and the variance is 0.05. The coaxiality of the step shaft was again measured by the images after adding noise, and the images of each shaft segment is shown in Figure9.Figure 9
The images of each shaft segment after adding noise. (a) Section 1. (b) Section 2. (c) Section 3. (d) Section 4.
(a)(b)(c)(d)Though the same process of the above experiment, the reference axis space equation and the coordinates of the center point on each shaft segment, the coaxiality error of shaft segments were obtained by using the algorithm of the paper. The measurement results are shown in Table7, A is the coaxiality error by the coordinate measuring machine, and B is the measured value by the method proposed in the paper.Table 7
Coaxiality measurement results/mm (after increasing noise).
NumberABMeasurementsErrorShaft section 20.0210.0450.024Shaft section 30.0130.0400.027Shaft section 40.0250.0500.025Mean error0.025Due to increase the noise, the error points in the center point of the light strip will increase. As the noise increases, the error points in the center point of the light bar will increase and the accuracy of ellipse fitting will decrease, which in turn leads to a decrease in the accuracy of coaxiality measurement.


## 6. Conclusion

The coaxiality measurement method is proposed based on the line structured light vision in the paper. The algorithm for calculating the light plane equation after each movement is built by the equation of initial light plane and each line structured light translation distance, which solves the clamping error caused by multiple clamping of the stepped shaft. The world coordinate system is established according to the corresponding light plane at each position, and the center point coordinates of the intercept line can be obtained by fitting a geometric ellipse in the coordinate system. Using the coordinates of the center point on the intercept line on the reference axis, the space equation of the reference axis is generated by the overall least squares fitting, and the coaxiality error of each axis segment relative to the reference axis segment is solved by the principle of least containment. Through experimental verification, the measurement accuracy of the proposed algorithm is 25μm, and the influence of noise on coaxiality is analyzed.



---

*Source: 5575152-2021-03-23.xml*