1 Introduction

Spline shaft is an important part of a machine to transmit power or bear torque. Its section contour is like a gear. It suffers from great loads and alternating stress during the runtime. The tooth root of the spline shaft has a risk of fracture due to fatigue stress [1,2,3,4]. Thus, it is essential to conduct a surface hardening process such as rolling after machining. In order to control the quality of product, a rolling performance evaluation becomes essential. The commonly used evaluation parameters of surface integrity involve the surface roughness, the surface residual stress and the micro-hardness. However, measurement of surface roughness or through-thickness residual stresses in difficult locations or complex geometries is not easy. Many measurement techniques are destructive, such as the centre-hole drilling method, the ring core method and the block removal method. There are non-destructive techniques (e.g., X-ray and neutron diffraction, optical, magnetic or ultrasonic methods) [5], but they often require the off-machine measuring. Note that for the rolling process, it is an efficient alternative to conventional cutting processes to manufacture spline shaft as it possesses several advantages i.e. shorter process times, no material loss and no chip disposal, high surface quality [6]. The residual stress is only induced by the residual strain and the residual strain appears as the dimensional change in the macroscopic view. Therefore, it is probably feasible to use the dimensional change of tooth root as an alternative evaluation parameter.

The dimensional change of the tooth root is about 20 μm after rolling. Thus, the measurement precision of the conventional mechanical measuring instrument is not enough and it is time-consuming due to the complexity of the spline shaft. In order to solve such problems, it is necessary to develop a new measuring system with high efficiency and high precision. The laser triangulation displacement sensor (LDS) is a common-used tool in high precision and short-distance measuring, which can measure the displacement change of an object without any contact. It is mainly used in automatically measuring the geometrical parameter such as thickness, distance, diameter, etc [7,8,9,10]. Over a period of time there were several novel measuring systems by combining it with other devices, such as identification of location error of rotary axes for five-axes machine tools [11], on machine measurement of RFQS [12], automated inner dimensional measurement system for long-stepped pipes [13] and piston secondary motion measurement [14]. For spline shaft measuring system, a rotary encoder is needed to record the rotation angle. Together with the radius recorded by the laser displacement sensor, the section contour of the spline shaft is obtained by plotting each point of the measuring section in a polar coordinate system.

The section contour of the spline shaft is like a gear, but the method used in gear measurement cannot be directly applied to our system, because most of them require the workpiece to be measured off-machine [15]. Besides, for gear measurement, researchers usually care more about the tooth thickness, tooth pitch [16], tooth flank [17] and cutting error [18]. While in the spline shaft measuring, the position of the tooth roots and their dimensional change should be focused, which are different from the previous gear measurement.

In this paper, a newly developed on-machine non-contact measurement prototype based on laser displacement sensor and rotary encoder is proposed. Firstly, by using this prototype, the section contour of spline shaft is quickly measured. Then, through multipoint curvature method (MCM), the roots of spline shaft can be recognized automatically. At last, the dimensional change can be calculated by fitting the radius of the tooth root circle before and after rolling. The offset error and its calibration method were also discussed in this paper. Measurement test results show that the system has advantages of simple structure, high measurement precision, high measurement efficiency and automatic control ability.

2 Principle of the Measurement

The rolling process is shown schematically in Figure 1. As can be seen in the upper part of Figure 1, when rolling begins, the material deforms at first elastically and then plastically, at last reaches the maximal deformation ΔRmax in state A. After rolling, a certain degree of elasticity recovery occurs, thus, the final dimensional change ΔR in state B is less than its maximal value. The stress and strain analysis of the rolling process is shown in the lower part of Figure 1. The stress and strain, denoted as σ and ε respectively, are determined from the load P and deflection δ using the original specimen cross-sectional area A0 and length L0 in tensile test as

$$\sigma \, = \,\frac{P}{{A_{0} }},\quad \varepsilon \, = \,\frac{\delta }{{L_{0} }},$$
(1)

when the stress σ is plotted against the strain ε, an engineering stress-strain curve of the material such as that shown in Figure 1 is obtained.

Figure 1
figure 1

Schematic diagram of the rolling process

In the state of A, it can be seen that as strain is increased beyond the yield point, the stress deviate from its linear proportionality, and the point of departure is termed as the proportional limit. This nonlinearity is usually associated with stress-induced “plastic” flow in the specimen. Here the material is undergoing a rearrangement of its internal molecular or microscopic structure, as a result, the dimension of the tooth root changes ΔRmax. These micro-structural rearrangements associated with plastic flow are usually reversed when the load is removed. The material experiences a residual strain ε0 after recovery from unloading. The residual strain induced by a given stress can be determined by drawing an unloading line from the highest point reached on the σ − ε curve at that stress back to the strain axis, drawn with a slope equal to that of the initial elastic loading line until the point B, which is caused by the material unloading elastically. Due to the residual strain, the material will not return to its original dimensions and the residual stress σ0 appears [19]. Therefore, the residual stress σ0 can be calculated by:

$$\sigma_{0} \, = \,\sigma_{1} \, - \,E(\varepsilon_{1} \, - \,\varepsilon_{0} ),$$
(2)

where E is the Young’s modulus and equal to the slope of the unloading line, σ1 is the stress at point A, ε1 is the strain at point A.

On the other hand, the dimensional change is the macro reflection of the residual strain ε0 and can be expressed as:

$$\Delta R = \int_{0}^{\text{R}} {\varepsilon_{0} (r)} {\text{d}}r,$$
(3)

where r is the distance from the axis of spline shaft to the calculation point.

It can be seen that both of the dimensional change ΔR and the residual stress σ0 are the function of residual strain ε0. Therefore, there is a corresponding relationship between the dimensional change ΔR and the residual stress σ0. Although it is difficult to establish an equation for them through theoretical analysis, it is available to fit a formula through the measurement experiments.

3 Construction of Measurement Prototype

The measurement prototype, as shown in Figure 2, is composed of the laser displacement sensor, the rotary encoder, the worktable, the spindle, the data acquisition card and the computer. The system mainly contains the following three modules: (1) data acquisition; (2) motion control; (3) data processing.

Figure 2
figure 2

Schematic diagram of the measurement system

The details of each module are described as follows. The data acquisition module consists of the laser displacement sensor (LDS) and the rotary encoder. Laser displacement sensor is mounted on the worktable. Rotary encoder is mounted on spindle to record the angle of rotation. The motion control module consists of the worktable and the spindle, which are controlled by the CNC system of the rolling machine. The data processing module consists of the data acquisition card (DAQ card) and the computer. The DAQ card performs data synchronous acquisition work and sends the data of displacement and angle to the computer. The captured data are calculated in time by the program installed in the computer. Accordingly, the section contour of the spline shaft is displayed on the screen and the radius of the tooth roots can be calculated.

Additionally, the laser triangulation displacement sensor can be divided into four categories: specular reflection type, diffuse reflection type, spectral interference type and confocal reflection type. Ref. [11] gives detail experimental comparison and analysis of the four types. The specular reflection type requires very high measured surface quality. The spectral interference type and confocal reflection type have high measuring precision, but the measuring range is limited. Finally, the micro-epsilon ILD 2220 diffuse reflection type with measuring range of 50 ± 10 mm, resolution of 0.3 μm and measuring rates of 10 kHz is selected for the spline shaft measurement system. Note that the resolution of the laser displacement sensor is 0.3 μm, divided by the dimensional change about 20 μm, thus, the measuring error is estimated 1.5%, which meets the usage requirements. The measurement principle of the diffuse reflection type sensor is shown in Figure 3.

Figure 3
figure 3

Measurement principle of the diffuse reflection type sensors

4 Data Acquisition and Processing

4.1 Acquisition of the Data

Before measuring, calibration of the distance from laser displacement sensor to the workpiece axis is needed. The calibration process is as follows: first, the standard cylindrical test bar is clamped on the spindle. Second, the laser displacement is adjusted to locate in an appropriate distance to the test bar and within the measuring range. It is important to make sure the workpiece axis and the laser line at the same height. Third, by measuring the test bar, the distance Lm from laser displacement sensor to the cylindrical surface of the workpiece is obtained. Then, the distance from laser displacement sensor to the workpiece axis can be calculated by:

$$L_{0} \, = \,R_{0} \, + \,L_{m} ,$$
(4)

where R0 is the radius of the test bar.

During the measuring process, the spline shaft rotates at a constant speed. At the same time, the laser displacement sensor transmits pulses by 10000/s. In each pulse, the distance Lt from laser displacement sensor to the surface of the workpiece is measured and a certain rotation angle θt is recorded by rotary encoder simultaneously. The data of rotation angle θt and the distance Lt are stored to the computer as a vector (θt, Lt). Then, the calculation software transfer (θt, Lt) to (θt, Rt) by equation:

$$R_{t} \, = \,L_{0} \, - \,L_{t} ,$$
(5)

where Rt is the distance from the surface of the workpiece to its axis, L0 is the distance from laser displacement sensor to the workpiece axis calibrated before.

In polar coordinate system, each vector (θt, Rt) represents a point. Using tens of thousands of the points, the cross profile of the workpiece can be plotted precisely. When measuring the spline shaft, the cross profile is like a gear. Figure 4 shows the schematic and photograph of the experimental setup.

Figure 4
figure 4

Schematics and photograph of the experimental setup

4.2 Recognition of the Tooth Roots

In the computer image processing, the feature points play a very important role in characteristic recognition. Feature points, such as angular point, tangency point and inflection point, are the basic units to characterize a specific shape. They can be applied to senior visual processing such as pattern recognition, shape matching and dimension measurement, etc. For the spline shaft measuring, the feature points are the tooth roots and tooth crests.

At present, the commonly used feature point recognition algorithm includes: slope method, extremum method, chord to point distance accumulation method and curvature method [20]. However, they are too sensitive to the signal noise and have poor performance for an on machine measuring system, which has slight vibration during measurement (see Figure 5). Finally, a multipoint curvature method with robust recognition performance is developed.

Figure 5
figure 5

Measurement signal with noise due to vibration

Curvature is the rate of change (at a point) of the angle between a curve and a tangent to the curve. The greater the curvature, the sharper the line bend. Based on the phenomenon that curvature on feature point changes dramatically, the feature point can be recognized when given a threshold. In the curvature method, continuous three points and their coordinate values are used to calculate the curvature of each point on a line. But, its curvature calculation range is too narrow to avoid the effect of vibration. This problem can be handled by the multipoint curvature method, which expands its curvature calculation range thus showing robust recognition performance. In fact, the value calculated by multipoint curvature method is not the true curvature of a point, but an approximate value.

The curvature equation can be given as follows:

$$K_{i} \, = \,\frac{{\left| {y^{\prime\prime}_{i} } \right|}}{{(1\, + \,{y^{\prime}_{i}}^{2} )^{3/2} }}.$$
(6)

For discrete data sets: \(P\, = \,\left\{ {P_{i} (x_{i} ,y_{i} )|0\, \le \,i\, \le \,n} \right\}\), the difference calculation is used as a substitute for the differential calculation. Let the curvature calculation range be 2n + 1, then

$$\left\{ \begin{aligned} y^{\prime}_{i} \, = \,\frac{{y_{i + n} \, - \,y_{i - n} }}{{x_{i + n} \, - \,x_{i - n} }}, \hfill \\ y^{\prime\prime}_{i} \, = \,\frac{{y^{\prime}_{i + n} \, - \,y^{\prime}_{i - n} }}{{x_{i + n} \, - \,x_{i - n} }}, \hfill \\ \end{aligned} \right.$$
(7)

where

$$y^{\prime}_{i + n} \, = \,\frac{{y_{i + n} \, - \,y_{i} }}{{x_{i + n} \, - \,x_{i} }}, \, \quad y^{\prime}_{i - n} \, = \,\frac{{y_{i} \, - \,y_{i - n} }}{{x_{i} \, - \,x_{i - n} }},$$
(8)

where (xi, yi) is the coordinate value of a point, (xi–n, yi–n) is n points before it, (xi+n, yi+n) is n points after it. Then, the calculation equation by using multipoint curvature method would be:

$$K_{i} \, = \,\frac{{\frac{{(y_{i + n} \, - \,y_{i} )(x_{i} \, - \,x_{i - n} )\, - \,(y_{i} \, - \,y_{i - n} )(x_{i + n} \, - \,x_{i} )}}{{(x_{x + n} - x_{i} )(x_{i} - x_{i - n} )(x_{i + n} - x_{i - n} )}}}}{{\left[ {1\, + \,\left( {\frac{{y_{i + n} \, - \,y_{i - n} }}{{x_{i + n} \, - \,x_{i - n} }}} \right)^{2} } \right]^{3/2} }}.$$
(9)

The n value has great influence on the curvature Ki. A certain n value should be given to obtain the maximum curvature when calculating. In fact, it can be determined by equation:

$$n\, = \,\left[ {j/ 2i} \right].$$
(10)

where j is the number of all points, i is the number of the root of a spline shaft. In this case, when the point P is located in the bottom of tooth root, its curvature Ki reaches the maximum value, i.e., it is bigger than any other adjacent point such as the green point P’ shown in Figure 6.

Figure 6
figure 6

The maximum curvature point at tooth root

4.3 Calculation of the Dimensional Change

In rolling, the dimensional change is determined by the rolling pressure rather than the cutting depth as in turning or milling. So, it is hard to know the actual dimensional change ΔR (within 20 μm) of each tooth root. To solve this problem, a joint least square fitting method of the tooth root circle and tooth crest circle is used, which is upgraded from normally used least squares method. It is essential to fit the tooth root circle and the tooth crest circle jointly to enhance the fitting precision, otherwise, the center points of them would not be the same. Before fitting, the polar coordinate vector (θt, Rt) is converted to the rectangular coordinate vector (xi, yi) firstly. Then, the equations of tooth root circle and tooth crest circle can be presented as:

$$\left\{ \begin{aligned} (x_{1i} \, - \,a)^{2} \, + \,(y_{1i} \, - \,b)^{2} \, = \,r_{1}^{2} , \hfill \\ (x_{2i} \, - \,a)^{2} \, + \,(y_{2i} \, - \,b)^{2} \, = \,r_{2}^{2} , \hfill \\ \end{aligned} \right.$$
(11)

where (x1i, y1i) are the points of tooth crest in rectangular coordinate system, (x2i, y2i) are the points of tooth root in rectangular coordinate system, parameter (a, b) is the center point of them, parameter r1 is the radius of tooth crest circle, parameter r2 is the radius of tooth root circle.

According to the joint least square fit method, the residual sum of squares would be:

$$\begin{aligned} J(a,b,r_{1} ,r_{2} )\, = \, & \sum\limits_{i = 1}^{n} {[(x_{1i} \, - \,a)^{2} \, + \,(y_{1i} \, - \,b)^{2} \, - \,r_{1}^{2} ]^{2} } \\ & + \,\sum\limits_{i = 1}^{n} {[(x_{2i} \, - \,a)^{2} + (y_{2i} \, - \,b)^{2} \, - \,r_{2}^{2} ]^{2} .} \\ \end{aligned}$$
(12)

Let:

$$\left\{ \begin{aligned} p & \, = \,n_{1} \sum\limits_{i = 1}^{n} {x_{1i}^{2} \, - \,\left(\sum\limits_{i = 1}^{n} {x_{1i} }\right)^{2} \, + \,n_{2} \sum\limits_{i = 1}^{n} {x_{2i}^{2} \, - \,\left(\sum\limits_{i = 1}^{n} {x_{2i} }\right)^{2} ,} } \\ q & \, = \,n_{1} \sum\limits_{i = 1}^{n} {y_{1i}^{2} \, - \,\left(\sum\limits_{i = 1}^{n} {y_{1i}}\right )^{2} \, + \,n_{2} \sum\limits_{i = 1}^{n} {y_{2i}^{2} \, - \,\left(\sum\limits_{i = 1}^{n} {y_{2i} }\right)^{2} ,} } \\ s & \, = \,n_{1} \sum\limits_{i = 1}^{n} {x_{1i}^{3} \, + \,n_{1} \sum\limits_{i = 1}^{n} {x_{1i} y_{1i}^{2} \, - \,\sum\limits_{i = 1}^{n} {(x_{1i}^{2} \, + \,y_{1i}^{2} )\sum\limits_{i = 1}^{n} {x_{1i} } } } } \\ \, & \quad { + }\,n_{2} \sum\limits_{i = 1}^{n} {x_{2i}^{3} \, + \,n_{2} \sum\limits_{i = 1}^{n} {x_{2i} y_{2i}^{2} \, - \,\sum\limits_{i = 1}^{n} {(x_{2i}^{2} \, + \,y_{2i}^{2} )\sum\limits_{i = 1}^{n} {x_{2i} } { ,}} } } \\ t & \, = \,n_{1} \sum\limits_{i = 1}^{n} {y_{1i}^{3} \, + \,n_{1} \sum\limits_{i = 1}^{n} {x_{1i}^{2} y_{1i} \, - \,\sum\limits_{i = 1}^{n} {(x_{1i}^{2} \, + \,y_{1i}^{2} )\sum\limits_{i = 1}^{n} {y_{1i} } } } } \\ \, & \quad { + }\,n_{2} \sum\limits_{i = 1}^{n} {y_{2i}^{3} \, + \,n_{2} \sum\limits_{i = 1}^{n} {x_{2i}^{2} y_{2i} \, - \,\sum\limits_{i = 1}^{n} {(x_{2i}^{2} \, + \,y_{2i}^{2} )\sum\limits_{i = 1}^{n} {y_{2i} } { ,}} } } \\ u & \, = \,n_{1} \sum\limits_{i = 1}^{n} {x_{1i} y_{1i} \, - \,\sum\limits_{i = 1}^{n} {x_{1i} \sum\limits_{i = 1}^{n} {y_{1i} \, + \,n_{2} \sum\limits_{i = 1}^{n} {x_{2i} y_{2i} } } } } \\ \, & \quad - \,\sum\limits_{i = 1}^{n} {x_{2i} \sum\limits_{i = 1}^{n} {y_{2i} } { ,}} \\ \end{aligned} \right.$$
(13)

Then, the parameters can be calculated by:

$$\left\{ \begin{aligned} a & \, = \,\frac{sq\, - \,tu}{{2(pq\, - \,u^{2} )}}, \\ b & \, = \,\frac{tp\, - \,su}{{2(pq\, - \,u^{2} )}}, \\ r_{1} & \, = \,\frac{1}{{n_{1} }}\sum\limits_{i = 1}^{n} {\sqrt {(x_{1i} \, - \,a)^{2} + (y_{1i} \, - \,b)^{2} } } , \\ r_{2} & \, = \,\frac{1}{{n_{2} }}\sum\limits_{i = 1}^{n} {\sqrt {(x_{2i} \, - \,a)^{2} + (y_{2i} \, - \,b)^{2} } ,} \\ \end{aligned} \right.$$
(14)

where n1 is the number of points of tooth crest circle, n2 is the number of points of tooth root circle. According to the fitted parameters before and after processing, the dimensional change ΔR can be calculated by:

$$\Delta R\, = \,r^{\prime}_{2} \, - \,r_{2} ,$$
(15)

where r’2 is the radius of tooth root circle after rolling process.

5 Experimental Results and Discussions

By using the measurement prototype established, a spline shaft with 48 teeth is scanned. The radius of tooth root circle and tooth crest circle are 23.09 mm and 24.87 mm, respectively. The system sampling frequency is 10 kHz. After the workpiece rotated 360°, a total of 14880 data points were collected, which took 1.5 s. To reduce the influence of rotation positioning error, the data were measured when the shaft rotating reaches a constant speed and then one cycle of the data were recorded. Figure 7 shows the fitting figure and photograph of the spline shaft.

Figure 7
figure 7

Fitting figure and photograph of the section

5.1 Calculation Result

Figure 8 shows the calculation result using the measuring data presented above. The first curve is the partial profile of the section contour. The other three curves below are the curvatures calculated with different n values (n = 21, 121, 221, respectively). The curvature of the curve bending along anti-clockwise direction is positive (the case of tooth root), while along clockwise direction is negative (the case of tooth crest). It can be seen from the figure that as the n value increases, the sensibility of the multipoint curvature method to the noise decreases, which means the recognition performance is better. But when the n value is too large, e.g., n = 221, some feature points may be judged as noise and failed to be recognized. So, it is important to determine the n value. Actually, it is influenced by the number of data points and the number of the root of a spline shaft.

Figure 8
figure 8

Influence of n on curvature value K

In this measuring test, j = 14880, i = 48, so n = [j/2i] = 155. Figure 9 shows the calculation result with n = 155. It can be seen from the figure that the feature points separated significantly. All the tooth root points are above the line of Ki = 0, and all the tooth crest points are under the line of Ki = 0. With this result, it is easy to get all the angles of tooth root and tooth crest (take an average of the angle values for the points with curvature values greater than 400). From Figure 9, it can be seen that the multipoint curvature method is robust and significant in tooth feature recognition. Figure 10 shows the influence of n on radius fitting result. It also can be seen that the fitting result becomes inaccurate when n is too small (less than 60) or too large (more than 210), while n = 155 locates in a suitable position.

Figure 9
figure 9

Curvature value of each point when n = 155

Figure 10
figure 10

Influence of n on r1 and r2 fitting result

The angle values of tooth roots calculated by program are shown in Table 1. In the table, i is the index number, θi is the angle values of the ith tooth root, Δθi = θi+1 − θi, the average value is: Δθ = 2π/48 = 0.131 rad. It can be seen that the angle spacing values between two adjacent roots are evenly distributed. The angle spacing accuracy is 0.131 ± 0.001 rad for this measurement test result (including the manufacturing error of workpiece and the error of measurement instrument).

Table 1 Angles of the tooth roots

5.2 Results of Joint Least Squares Fitting

Figure 11 shows the fitting results of the tooth root circle and the tooth crest circle, which are showed with red dashed lines. The feature points are shown with red dots. Here, r1 is the radius of the tooth crest circle and r2 is the radius of the tooth root circle, (a, b) is the center point of the spline shaft.

Figure 11
figure 11

Fitting results of the tooth root and tooth crest circle

To assess the measuring precision, four sections of the spline shaft were measured and each section was measured 6 times. The results are shown in Table 2. It shows that the repositioning accuracy (less than 0.6 μm) is good enough to measure the dimensional change. It’s worth noting that the value of r1 increases linearly and the value of r2 decreases linearly as the offset value c increases, which can be seen in Figure 12. The formulas were obtained by the linear least squares fitting of the experiment data. According to the formulas, when the offset value c = 0, the true value is obtained: r1 = 24.872 mm and r2 = 23.088 mm, respectively.

Table 2 Parameters fitting results for each section
Figure 12
figure 12

Influence of offset value c on r1 and r2 fitting result

The dimensional change of the tooth roots can be achieved by calculating the radius of tooth root circle before and after rolling. The relationship between the dimensional change and the residual stress should be established by rolling experiments in the future. Accordingly, the spline shaft rolling performance can be rapidly evaluated using the dimensional change as an alternative evaluation parameter. It is also worth noting that a hydraulic servo system should be used to generate accurate pressures in the future experiments and the residual stress will be measured using the X-ray diffraction (XRD).

6 Conclusions

  1. (1)

    An on-machine non-contact measurement method for spline shaft rolling performance evaluation is proposed. To verify the validity of this method, a measurement prototype mainly consisted of a laser displacement sensor and rotary encoder was built on a rolling machine. Using the prototype established, a spline shaft is scanned and its section figure is obtained.

  2. (2)

    Through multipoint curvature method (MCM) and joint least square fitting method, the roots of the spline shaft were recognized automatically. The dimensional change can be calculated by fitting the radius of the tooth root circle before and after rolling. The offset error was also analyzed and calibrated in data processing.

  3. (3)

    Measurement test results show that the proposed method is feasible with high measurement precision (radius measuring error less than 0.6 μm), high measurement efficiency (measuring time less than 2 s) and automatic control ability (auto evaluation of rolling performance). Moreover, the method can cover the measurement needs of different spline shafts and has potential to analyze various gears machining process.