Detection System for U-Shaped Bellows Convolution Pitches Based on a Laser Line Scanner

An expansion joint is mainly composed of bellows and other components; it is attached on a container shell or pipe to compensate for the additional stress caused by temperature differences and mechanical vibrations. In China, the expansion joint fatigue tests are often used to assess the quality of products. After fatigue tests, convolution pitch will be changed. The amount of change is an important index that can be used to evaluate bellows expansion joints. However, the convolution pitch detection is mainly done manually and randomly by inspection agencies before shipping to the end users. This common practice is not efficient and is often subjective. This paper introduced a novel method for automatically detecting the change of the convolution pitch based on a laser line scanner and data processing technology. The laser line scanner is combined with a precision motorized stage to obtain the point cloud data of the bellows. After denoising and fitting, a peak-finding algorithm is applied to search for the crest of a convolution. The method to find the convolution pitch and the decision that needs to be made to ensure product eligibility are described in detail. A DN500 expansion joint is used as a sample to illustrate the efficiency of the system. The application of the technique intuitively allows a higher precision and relative efficiency in quality inspection of bellows expansion joints. It has also been implemented in the Special Equipment Safety Supervision and Inspection Institute of Jiangsu province with great success.


Introduction
An expansion joint is a connector that can expand under different forms of loading while remaining structurally sound [1][2][3]. It is composed of bellows and other components and can compensate for thermal and mechanical deformations, absorb mechanical vibrations, reduce stress, and increase the average service lives of pipes and tubes. Expansion joints have been widely used in multiple fields, such as petrochemical, steel, aerospace, and nuclear power. The convolution pitch of a bellows expansion joint is an important parameter in quality inspection; it is a key consideration when making the decision of whether bellows expansion joints meet quality requirements. After thousands of tensile and compression fatigue tests, the method of detecting the convolution pitch deformation is usually done manually. It is typically found with a caliper that measures the distance from crest to crest. Then, the collected data is processed to determine the quality of the bellows expansion joint. This type of inspection is overly dependent on manual work, which leads to low efficiency and accuracy. Brazhkin and Mirotvorskii [4] introduced a method for detecting a curved surface using the tangent point of a curve. They used the Coordinate Measuring Machine (CMM) to collect data and extract features Sensors 2020, 20, 1057 2 of 15 from the surface. However, the long measuring cycle and the extremely expensive testing equipment needed for the CMM prevent the quality determination for large-diameter bellows. At the same time, the strict requirements of the detecting environment suggest that this method is not suitable for on-line measurement of bellows expansion joints.
In order to solve all of the mentioned problems, a system using a laser line scanner (LLS) and a non-destructive measurement method to estimate the quality of expansion joints has recently been built. The system has solved several problems in traditional quality detection methods. Moreover, quality inspection of bellows for special circumstances and requirements (such as bellows expansion joints with nuclear security levels) can significantly advance non-destructive testing techniques. When a laser is projected onto the surface of a bellows, the raw point cloud data is collected automatically via a laser scanner. After noise reduction and curve fitting, the convolution pitch data are found via a peak-searching algorithm.
The remainder of the paper is organized as follows. The mechanical structure of the laser scanning detection system (LSMS) and the detection procedure are presented in Section 2. In Section 3, the failure judgment algorithm of the test piece is introduced in detail. Section 4 presents the detail of the convolution pitch search method, including point cloud noise reduction, coordinate transformation, curve fitting, and convolution pitch calculation, etc. The application and error analysis are proposed in Section 5. Lastly, the conclusions of our work are given in Section 6.

Design Requirements
According to the standard requirements (obtained from Jiangsu Province Special Equipment Safety Supervision and Inspection Institute) for bellows expansion joints, the developed detecting device needs to use a laser scanner to automatically measure the convolution pitch of the bellows. The data is collected from at least four angles before and after the fatigue test to determine whether the expansion joint is qualified for service or not. Therefore, the bellows expansion joints need to be rotated 360 degrees around the central axis during data collection. The required accuracy of the convolution pitch detection is less than 0.1 mm.
Because the measurement range of the laser scanner is limited, the distance between the scanner and the expansion joint specimen is required to be adjustable. The scanner can move along the radial direction of the expansion joint, and can be adjusted to the proper distance according to the diameter of the bellows.
It is necessary to connect two bellows expansion joints in series for the purpose of fatigue testing. Different specifications of bellows have different lengths. Therefore, the scanner needs to be adjustable in the axial direction of the expansion joint.

Mechanical Structure
A 3-D model that lists the detecting device components is shown in Figure 1. The specific mechanical structure of the detecting device includes a radial movement mechanism, an axial movement mechanism, and a rotating movement mechanism. The radial movement mechanism includes a set of ball screws, two sets of rolling linear guides, and a moving platform. The moving platform, which is driven by the ball screws, moved back and forth along the radial direction of expansion joints. The radial movement system mainly guarantees a fixed distance between the laser scanner and the expansion joint. The axial movement mechanism includes a two-way ball screw, two sets of rolling linear guides, two sliders, and two laser scanners (fixed to the slider). The axial movement device drives the laser scanner to move to the appropriate height along the axial direction of the expansion joint. The rotating mechanism includes a motor and a rotating platform which can rotate around its own central axis. The laser scanner can be easily damaged. To avoid damage, a proximity sensor is placed on the laser scanner and a set of limit devices is mounted on the guiding mechanism. In order to save space and for the convenience of the fatigue test, the device adopts a vertical layout. In order to achieve online detection, convolution pitch detection and the fatigue test are performed on the same device. This paper does not cover fatigue testing, so the fatigue testing system is not introduced.

Detection Principle
Non-contact methods include optical, electromagnetic, and acoustic measuring devices [5]. Optical measuring devices involve binocular vision, holographic interferometry, and laser triangulation. The laser triangulation method is widely applied for accurate measurement because of its high measurement accuracy, small size device, and fast measurement speed [6][7][8]. So, the laser scanning detection was applied to our system to obtain the outer contour data of the expansion joints of bellows.
As shown in Figure 1, a laser transmitter and laser receiver are mounted onto a laser scanner (model: Gocator 2350) produced by LMI. When a laser beam hits an object, the laser transmitter emits a laser pulse; then, part of the laser energy is returned. The laser energy is then received by the laser receiver. If the returning energy exceeds the preset triggering threshold, the laser scanner calculates its distance from the object. Based on this distance information, the location coordinates of the contours of the object can be calculated.
As shown in Figure 2, the resolution in the Z-axis direction of the scanner is between 0.019 and 0.060 mm, while in the X-axis direction, it is between 0.150 and 0.300 mm. The total number of single points that the scanner can collect in a single scan is 1280. The field-of-view (FOV) in the X direction is 158 to 365 mm and the measurement range is 400 mm. The clearance distance is 300 mm. In order to achieve online detection, convolution pitch detection and the fatigue test are performed on the same device. This paper does not cover fatigue testing, so the fatigue testing system is not introduced.

Detection Principle
Non-contact methods include optical, electromagnetic, and acoustic measuring devices [5]. Optical measuring devices involve binocular vision, holographic interferometry, and laser triangulation. The laser triangulation method is widely applied for accurate measurement because of its high measurement accuracy, small size device, and fast measurement speed [6][7][8]. So, the laser scanning detection was applied to our system to obtain the outer contour data of the expansion joints of bellows.
As shown in Figure 1, a laser transmitter and laser receiver are mounted onto a laser scanner (model: Gocator 2350) produced by LMI. When a laser beam hits an object, the laser transmitter emits a laser pulse; then, part of the laser energy is returned. The laser energy is then received by the laser receiver. If the returning energy exceeds the preset triggering threshold, the laser scanner calculates its distance from the object. Based on this distance information, the location coordinates of the contours of the object can be calculated.
As shown in Figure 2, the resolution in the Z-axis direction of the scanner is between 0.019 and 0.060 mm, while in the X-axis direction, it is between 0.150 and 0.300 mm. The total number of single points that the scanner can collect in a single scan is 1280. The field-of-view (FOV) in the X direction is 158 to 365 mm and the measurement range is 400 mm. The clearance distance is 300 mm.

Detection Procedure
First, the outer contour of the bellows expansion joint is automatically scanned before and after the fatigue test. The point cloud data are then transferred to a computer terminal via Ethernet cable. Second, noise reduction is performed on the collected data to eliminate the influence of various noises

Detection Procedure
First, the outer contour of the bellows expansion joint is automatically scanned before and after the fatigue test. The point cloud data are then transferred to a computer terminal via Ethernet cable. Second, noise reduction is performed on the collected data to eliminate the influence of various noises on the measurement accuracy. The third step is to perform curve fitting on the processed point cloud data to facilitate the search for the peak points. The data of the convolution pitch of the bellows expansion joint is subsequently obtained via a peak-searching algorithm. By comparing the values of the pitch before and after the test, the convolution pitch changes can be seen more intuitively. Then, the condition and performance of the bellows expansion joints can be inferred via the data. Furthermore, the surface of the outer contour is reconstructed by processing the data. Figure 3 is the flowchart of the detection procedure.

Detection Procedure
First, the outer contour of the bellows expansion joint is automatically scanned before and after the fatigue test. The point cloud data are then transferred to a computer terminal via Ethernet cable. Second, noise reduction is performed on the collected data to eliminate the influence of various noises on the measurement accuracy. The third step is to perform curve fitting on the processed point cloud data to facilitate the search for the peak points. The data of the convolution pitch of the bellows expansion joint is subsequently obtained via a peak-searching algorithm. By comparing the values of the pitch before and after the test, the convolution pitch changes can be seen more intuitively. Then, the condition and performance of the bellows expansion joints can be inferred via the data. Furthermore, the surface of the outer contour is reconstructed by processing the data. Figure 3 is the flowchart of the detection procedure.

Failure Judgment
As shown in Figure 4, according to the performance standards of bellows expansion joints [9], the main parameters of bellows expansion joints contain the convolution depth h , convolution pitch q , radius c r of the curvature of the crests, and radius r r of the curvature of the troughs [10]. For common bellows, the purpose of the fatigue test is to detect the non-uniformity of the plastic deformation of all of the convolutions after 3000 to 5000 fatigue tests under a certain load. At a certain percentage, the bellows is considered to have failed. The percentage of inhomogeneity that typically requires maximum plastic deformation of the convolution pitch is less than or equal to 15% of the original average convolution pitch. Before the fatigue test, every time that the expansion joints rotate to a certain angle, it triggers the laser scanning of the bellows to obtain the originally measured data, as shown in Table 1. It is assumed here that the bellows has n + 1 convolutions and that data are collected from m positions. m is also the number of scanning instances. As shown in Figure 1, m = 4; we define the position of the first scanning angle as 1 0 o θ = , and then rotate the bellows expansion joint to the second position for the next scanning, where 2 90 o θ = , and so on. Depending on the value of m, the angle of each turn of the bellows expansion joint is also different. Generally, the measurement is performed according to the principle of uniform distribution, that is, the angle of rotation of the bellows expansion joint is the same for each measurement. The total number of convolution pitches is m × n. The calculation of the related parameters is conducted via Equations (1)-(4) [9].

Failure Judgment
As shown in Figure 4, according to the performance standards of bellows expansion joints [9], the main parameters of bellows expansion joints contain the convolution depth h, convolution pitch q, radius r c of the curvature of the crests, and radius r r of the curvature of the troughs [10]. For common bellows, the purpose of the fatigue test is to detect the non-uniformity of the plastic deformation of all of the convolutions after 3000 to 5000 fatigue tests under a certain load. At a certain percentage, the bellows is considered to have failed. The percentage of inhomogeneity that typically requires maximum plastic deformation of the convolution pitch is less than or equal to 15% of the original average convolution pitch. Before the fatigue test, every time that the expansion joints rotate to a certain angle, it triggers the laser scanning of the bellows to obtain the originally measured data, as shown in Table 1. It is assumed here that the bellows has n + 1 convolutions and that data are collected from m positions. m is also the number of scanning instances. As shown in Figure 1, m = 4; we define the position of the first scanning angle as θ 1 = 0 • , and then rotate the bellows expansion joint to the second position for the next scanning, where θ 2 = 90 • , and so on. Depending on the value of m, the angle of each turn of the bellows expansion joint is also different. Generally, the measurement is performed according to the principle of uniform distribution, that is, the angle of rotation of the bellows expansion joint is the same for each measurement. The total number of convolution pitches is m × n. The calculation of the related parameters is conducted via Equations (1)-(4) [9].
Sensors 2020, 20, x FOR PEER REVIEW 5 of 16 First, the initial value of the average convolution pitch before the fatigue test is determined by where i is the convolution pitch number, j is the position number, 1 n + is the total convolution number, m is the position number along the circumference, and sji q is the original value of the convolution pitch, which is equal to the wave distance between the th i convolution and the ( 1) th i + convolution at the th j position before the fatigue test. First, the initial value of the average convolution pitch before the fatigue test is determined by Sensors 2020, 20, 1057

of 15
where i is the convolution pitch number, j is the position number, n + 1 is the total convolution number, m is the position number along the circumference, and q sji is the original value of the convolution pitch, which is equal to the wave distance between the i th convolution and the (i + 1) th convolution at the j th position before the fatigue test. Table 1. Data of the convolution pitch of the bellows before the fatigue test.

Convolution Pitch No.
Position Then, the tension and compression fatigue experiment is performed on the bellows expansion joint. The convolution pitch is measured again by the laser scanner, as shown in Table 2. The value of the deformation and the maximum deformation of a convolution pitch could be determined by Equations (2) and (3), respectively. The maximum circumferential deformation unevenness coefficient of the i th convolution pitch could be determined by Equation (4).
where W ji is the value of plastic deformation of the convolution pitch between the i th convolution and the (i + 1) th convolution at the j th position after the fatigue test; q eji is the final value of the convolution pitch, which is equal to the wave distance between the i th convolution and the (i + 1) th convolution at the j th position after the fatigue test. W jimax is the maximum value of W 1i , W 2i , . . . , W mi . W jimin is the minimum value of W 1i , W 2i , . . . , W mi . ∆W Ci is the unevenness value of the i th convolution pitch; τ Ci is called the maximum circumferential deformation unevenness coefficient (MCDUC) of the i th convolution pitch. Table 2. Data of the convolution pitch of the bellows after the fatigue test.

Convolution Pitch No.
Position Similarly, the value of the maximum axial deformation of a position could be determined by Equation (5). The maximum axial deformation unevenness coefficient of the j th position can be obtained by Equation (6).
where W jimax is the maximum value of W j1 , W j2 , . . . , W jn . W jimin is the minimum value of W j1 , W j2 , . . . , W jn . ∆W Aj is the axial unevenness value of the j th position; τ Aj is called the maximum axial deformation unevenness coefficient (MADUC) of j th position.
So, the maximum deformation unevenness coefficient τ of a bellows can be obtained by Equation (7). The bellows expansion joints, which fail when τ exceeds 15%, are regarded as substandard products.

Convolution Pitch Searching
An experimental sample containing two bellows expansion joints produced by a pressure vessel manufacturer is shown in Figure 5. The equipment in the photo is an actual experimental device which includes two functions: Convolution pitch detection and fatigue testing. The bellows expansion joint was made of steel B315. The nominal diameter (DN) is 500 mm and the total height of the sample is 1500 mm. Each expansion joint has four convolutions and was placed on the rotating platform. When the expansion joint was rotated to a fixed angle, the laser scanner was triggered (by the rotary encoder) to scan the outer contour and obtain convolution pitch data. Then, tension and compression fatigue tests were conducted 3000 times with an internal pressure of 4.0 MPa and with an axial displacement of ±15 mm. After that, to obtain the convolution pitch deformation, the sample was measured by the scanner again. So, the maximum deformation unevenness coefficient τ of a bellows can be obtained by Equation (7). The bellows expansion joints, which fail when τ exceeds 15%, are regarded as substandard products. 1 2 1 2 max( , ,..., , , ,..., )

Convolution Pitch Searching
An experimental sample containing two bellows expansion joints produced by a pressure vessel manufacturer is shown in Figure 5. The equipment in the photo is an actual experimental device which includes two functions: Convolution pitch detection and fatigue testing. The bellows expansion joint was made of steel B315. The nominal diameter (DN) is 500 mm and the total height of the sample is 1500 mm. Each expansion joint has four convolutions and was placed on the rotating platform. When the expansion joint was rotated to a fixed angle, the laser scanner was triggered (by the rotary encoder) to scan the outer contour and obtain convolution pitch data. Then, tension and compression fatigue tests were conducted 3000 times with an internal pressure of 4.0 MPa and with an axial displacement of ±15 mm. After that, to obtain the convolution pitch deformation, the sample was measured by the scanner again.

Denoising
Placing the part on the rotating platform, rotating the platform to a specific angle, and then performing a scan to get 2D point cloud data, the 2D point cloud information of the measurand was obtained. The 2D information of the scanned point cloud data of the 0° position is shown in Figure 6.

Denoising
Placing the part on the rotating platform, rotating the platform to a specific angle, and then performing a scan to get 2D point cloud data, the 2D point cloud information of the measurand was obtained. The 2D information of the scanned point cloud data of the 0 • position is shown in Figure 6. The original point data could be read from the LLS using the abovementioned system. The point cloud of each scanning line includes 1280 points. Due to the surface roughness, surface contamination, and material reflection, noise is inevitably produced during detection [11]. Although the output point cloud was preprocessed by the scanning device itself, the noise points contained in each scan line are limited. It can be seen that there was still noise existing in the raw result. Therefore, an effective denoising method is essential for achieving high measurement accuracy. The original point data could be read from the LLS using the abovementioned system. The point cloud of each scanning line includes 1280 points. Due to the surface roughness, surface contamination, and material reflection, noise is inevitably produced during detection [11]. Although the output point cloud was preprocessed by the scanning device itself, the noise points contained in each scan line are limited. It can be seen that there was still noise existing in the raw result. Therefore, an effective denoising method is essential for achieving high measurement accuracy.
The noise points in the original point cloud can be divided into two categories, over-range noise points and outlier noise points, which require different methods for noise reduction. A pass-through filter was used to filter the points that exceeded the measuring range of the sensor affected by the environmental light [12]. Namely, for optical measurement, a pass-through filter served as an efficient method for removing the noise data that were out of range.
The statistical filter could effectively remove the outlier noise points of the 3D point cloud, which were mainly caused by the system noise or surface roughness [12]. However, this filtering method is not suitable for the 2D point cloud. The Savitzky-Golay (S-G) algorithm is one of the effective methods for noise reduction of electronic signals or vibration signals [13,14]. It is a novel method for random noise reduction, in which the S-G filter adopts piecewise weighted polynomials via least-squares estimation. Therefore, effective smoothing is achieved in extracting the original signal from the environmental noise while retaining the shape as closely as possible to the original one. In fact, the 2D point cloud data obtained from each line scanning can be regarded as electronic signals or vibration signals, the X coordinate corresponds to the time axis, the Z coordinate corresponds to the amplitude, the shape of the expansion joint is regarded as the original signal, and the outlier noise points are regarded as noise signals. Then, S-G filters can be used to eliminate the outlier noise points. A large number of subsequent tests have proven that this method has achieved appropriate results in noise reduction.
The S-G filter can be understood as a weighted moving average filter with weight coefficients given as a polynomial of a certain degree. This method requires two key parameters: The window size and the polynomial degree. It is important to choose the window length and the polynomial degrees appropriately to achieve a good compromise between random noise reduction and effective signal preservation [13]. In general, the polynomial degree varies from two to six. When the signal-to-noise ratio (SNR) is high, a low-degree polynomial can be selected; otherwise, a high degree polynomial can be selected. The window length could be adjusted by keeping the polynomial degree as a constant until obtaining an optimal result. Generally, the SNR is usually lower in the part of the contour point cloud data. Therefore, it is assumed in this paper that the polynomial degree is 2, 3, or 4, and the window length is obtained through experiments.
From the discussions of above, the denoising performance of the proposed method was evaluated on the point cloud data of bellows of different diameters. In order to find the appropriate number of window points and polynomial degrees, the window lengths were selected to be 10 points, 20 points, 30 points, 40 points, and 50 points, and the polynomial degrees were 2, 3, or 4, respectively. A large number of denoising tests were performed on the raw point cloud data of bellows of different specifications. Finally, it was found that when the number of window points is 40, a good noise reduction result can be obtained, and the polynomial degree has no obvious effect on denoising. To achieve a comparable compromise between the denoising effect and calculation time, the final selection of window number is 40, and the polynomial degree is 3. Figure 7 show the results of the standard S-G filtering with different numbers of window points, and the polynomial degree is 3. For easy comparison, the Z coordinates of the point cloud data were translated for different window lengths in Figure 7. Figure 8 is a display of two kinds of point graphs of a convolution in the same coordinate system: One is the raw dot graph and the other is a dot graph obtained after filtering using the S-G algorithm. The polynomial degree of the S-G algorithm is cubic and the window width is 40. It can be seen that the proposed method has less signal distortion after denoising and has visibly better smoothing performance. After denoising, the new point of the Z coordinate was obtained by fitting the curve while keeping the X coordinate unchanged, and the point cloud after noise reduction was obtained. coordinate system: One is the raw dot graph and the other is a dot graph obtained after filtering using the S-G algorithm. The polynomial degree of the S-G algorithm is cubic and the window width is 40. It can be seen that the proposed method has less signal distortion after denoising and has visibly better smoothing performance. After denoising, the new point of the Z coordinate was obtained by fitting the curve while keeping the X coordinate unchanged, and the point cloud after noise reduction was obtained.

Coordinate Transformation
The installation errors are inevitable in an LSMS, which will affect subsequent convolution pitch detection. The installation errors are mainly generated during mounting of the bellows and the LLS. According to the principle of relative motion, both installation errors can be normalized to the LLS installation errors. The installation errors mainly refer to the fact that the zc-axis of the laser scanner and the x-axis of the bellows is not perpendicular, which will cause the most serious deviations in subsequent convolution pitch calculations. The installation errors are presented in Figure 9. Owing to the fact that the zc-axis of the laser scanner is not perpendicular to the x-axis of the bellows, shown in Figure 9a, the point cloud data obtained by scanning will be deflected, shown in Figure 9b. In order to reduce the deflection error, coordinate transformation should be performed, and the least squares method can be adopted.
Since the bellows has two cylindrical AB and CD segments at both ends, as shown in Figure 9a, the point cloud data obtained from these two segments can be fitted to a straight line using the least coordinate system: One is the raw dot graph and the other is a dot graph obtained after filtering using the S-G algorithm. The polynomial degree of the S-G algorithm is cubic and the window width is 40. It can be seen that the proposed method has less signal distortion after denoising and has visibly better smoothing performance. After denoising, the new point of the Z coordinate was obtained by fitting the curve while keeping the X coordinate unchanged, and the point cloud after noise reduction was obtained.

Coordinate Transformation
The installation errors are inevitable in an LSMS, which will affect subsequent convolution pitch detection. The installation errors are mainly generated during mounting of the bellows and the LLS. According to the principle of relative motion, both installation errors can be normalized to the LLS installation errors. The installation errors mainly refer to the fact that the zc-axis of the laser scanner and the x-axis of the bellows is not perpendicular, which will cause the most serious deviations in subsequent convolution pitch calculations. The installation errors are presented in Figure 9. Owing to the fact that the zc-axis of the laser scanner is not perpendicular to the x-axis of the bellows, shown in Figure 9a, the point cloud data obtained by scanning will be deflected, shown in Figure 9b. In order to reduce the deflection error, coordinate transformation should be performed, and the least squares method can be adopted.
Since the bellows has two cylindrical AB and CD segments at both ends, as shown in Figure 9a, the point cloud data obtained from these two segments can be fitted to a straight line using the least

Coordinate Transformation
The installation errors are inevitable in an LSMS, which will affect subsequent convolution pitch detection. The installation errors are mainly generated during mounting of the bellows and the LLS. According to the principle of relative motion, both installation errors can be normalized to the LLS installation errors. The installation errors mainly refer to the fact that the z c -axis of the laser scanner and the x-axis of the bellows is not perpendicular, which will cause the most serious deviations in subsequent convolution pitch calculations. The installation errors are presented in Figure 9. Owing to the fact that the z c -axis of the laser scanner is not perpendicular to the x-axis of the bellows, shown in Figure 9a, the point cloud data obtained by scanning will be deflected, shown in Figure 9b. In order to reduce the deflection error, coordinate transformation should be performed, and the least squares method can be adopted.  In order to get the convolution pitch value, the point cloud data need to be coordinatetransformed. The coordinate transformation consists of two basic transformations. The first step is a translation, that is, translating the fitted line along the Z-axis and passing the coordinate origin. The second step is the rotation, that is, rotating the line clockwise to coincide with the X-axis. The new point cloud coordinates after transformation can be obtained by Equation (9). Figure 10 is the result of coordinate transformation using the above method of Figure 6. Since the bellows has two cylindrical AB and CD segments at both ends, as shown in Figure 9a, the point cloud data obtained from these two segments can be fitted to a straight line using the least Sensors 2020, 20, 1057 9 of 15 squares method. The fitted straight line equation can be expressed as Equation (8), where a is the intercept and b is the slope. z c = a + bx c (8) In order to get the convolution pitch value, the point cloud data need to be coordinate-transformed. The coordinate transformation consists of two basic transformations. The first step is a translation, that is, translating the fitted line along the Z-axis and passing the coordinate origin. The second step is the rotation, that is, rotating the line clockwise to coincide with the X-axis. The new point cloud coordinates after transformation can be obtained by Equation (9). Figure 10 is the result of coordinate transformation using the above method of Figure 6.
is a translation matrix, and a is the intercept;  In order to get the convolution pitch value, the point cloud data need to be coordinatetransformed. The coordinate transformation consists of two basic transformations. The first step is a translation, that is, translating the fitted line along the Z-axis and passing the coordinate origin. The second step is the rotation, that is, rotating the line clockwise to coincide with the X-axis. The new point cloud coordinates after transformation can be obtained by Equation (9). Figure 10 is the result of coordinate transformation using the above method of Figure 6.
where 1 0 0 is a translation matrix, and a is the intercept; cos( ) sin( ) 0 is a rotation matrix, and β is the tilt angle of the fitted straight line.

Cubic B-Spline Curve Fitting
After noise reduction and coordinate transformation, in order to find the peak point of convolution, the curve fitting is usually adopted as an effective method. The bellows profile is a freeform curve, and the B-spline is the most effective mathematical representation of the free-form curve. It is widely used in many fields such as computational geometry, image processing, machining, and measuring [15][16][17]. The cubic B-spline curve fitting generates smooth curves with confined errors and acceptable computation times. The experimental results encourage us to generalize this model to the bellows' profile fitting.
A general p th degree planar B-spline curve ( ) f t with n + 1 control point can be defined as

Cubic B-Spline Curve Fitting
After noise reduction and coordinate transformation, in order to find the peak point of convolution, the curve fitting is usually adopted as an effective method. The bellows profile is a free-form curve, and the B-spline is the most effective mathematical representation of the free-form curve. It is widely used in many fields such as computational geometry, image processing, machining, and measuring [15][16][17]. The cubic B-spline curve fitting generates smooth curves with confined errors and acceptable computation times. The experimental results encourage us to generalize this model to the bellows' profile fitting.
A general p th degree planar B-spline curve f (t) with n + 1 control point c i = (x i , z i ) ∈ R 2 can be defined as where B i,p (t) is the i th Bernstein function normalized with the p th degree defined on the knot vector U = t 0 , t 1 , . . . , t m+p , t m+p+1 , (m + p) ≤ n. In this paper, we investigate the cubic B-spline curve, i.e., p = 3; hence, B i,3 (t) is the i th cubic Bernstein basis function. Given knots t 0 < t 1 <, . . . , < t m+3 < t m+4 , the cubic Bernstein basis functions are defined as f or p = 1, 2, 3, i = 0, 12, 3, . . . , m + 3 − p B i,p (t) = It was found that B i,p (t) is only associated with the knots U = t i , t i+1 , . . . , t i+p+1 . According to the above definition, the curve in [t i , t i+1 ], i = 3, . . . , m is as follows: According to the recurrence formulas (11) and (12), the Bernstein basis function can be represented as follows: Thus, according to the above definition, the Formula (13) can be rewritten as: Furthermore, the first and second derivatives of

Convolution Pitch Calculation
As shown in Figure 11, the convolution pitch q is equal to the absolute value of the X-coordinates subtracted from two adjacent convolutions peak points. As long as the X-coordinates of the convolutions peak points can be explored, the convolution pitch q can be obtained. There are many peak-searching algorithms with different application fields [18][19][20][21]; e.g., the direct peak-searching method, the Gauss product peak-searching method, and the second-order derivative-searching method. The peak point of the bellows expansion joint fitting curve met the condition that the first derivative was 0 and that the second derivative was negative, that is, f i (t) = 0 and f i (t) < 0. Therefore, the second-order derivative searching method is adopted in this paper.

Application
The LSMS mentioned above was evaluated on various bellows with a range of nominal diameter (DN) from 500 to 1500 mm. For comparison with manual measurements, a bellows with a nominal diameter of 500 mm was implemented in our experiments. Figure 12 shows the detection operation and the display interface of the convolution pitch values using the LSMS before the fatigue test. The curve in Figure 12b is a raw dot plot, and the convolution pitch values are obtained after noise reduction, curve fitting, and the derivative-searching algorithm. At the same time, in order to compare with manual measurement, we also use a caliper to measure the convolution pitch at the corresponding position before and after the fatigue test of the same bellows expansion joint. The data of the convolution pitch in Tables 3 and 4 were obtained before and after the fatigue test by the LSMS and the caliper, respectively.   As shown in Figure 11, after two adjacent convolution fitting curves were obtained, the two peak points can be found by using the above derivative-searching algorithm. Then, the convolution pitch q is

Application
The LSMS mentioned above was evaluated on various bellows with a range of nominal diameter (DN) from 500 to 1500 mm. For comparison with manual measurements, a bellows with a nominal diameter of 500 mm was implemented in our experiments. Figure 12 shows the detection operation and the display interface of the convolution pitch values using the LSMS before the fatigue test. The curve in Figure 12b is a raw dot plot, and the convolution pitch values are obtained after noise reduction, curve fitting, and the derivative-searching algorithm. At the same time, in order to compare with manual measurement, we also use a caliper to measure the convolution pitch at the corresponding position before and after the fatigue test of the same bellows expansion joint. The data of the convolution pitch in Tables 3 and 4 were obtained before and after the fatigue test by the LSMS and the caliper, respectively.

Application
The LSMS mentioned above was evaluated on various bellows with a range of nominal diameter (DN) from 500 to 1500 mm. For comparison with manual measurements, a bellows with a nominal diameter of 500 mm was implemented in our experiments. Figure 12 shows the detection operation and the display interface of the convolution pitch values using the LSMS before the fatigue test. The curve in Figure 12b is a raw dot plot, and the convolution pitch values are obtained after noise reduction, curve fitting, and the derivative-searching algorithm. At the same time, in order to compare with manual measurement, we also use a caliper to measure the convolution pitch at the corresponding position before and after the fatigue test of the same bellows expansion joint. The data of the convolution pitch in Tables 3 and 4 were obtained before and after the fatigue test by the LSMS and the caliper, respectively.    According to Equation (2), the dimensional change of the convolution pitch before and after the fatigue test of the expansion joint is shown in Table 5. A negative value indicates that the convolution has undergone compressive plastic deformation at this position, while a positive value implies that the convolution has undergone tensile plastic deformation. According to Equation (1) and the data in Table 3, using the LSMS and calipers to measure the convolution pitch, the calculated q s values were 55.83 and 55.73 mm, respectively. According to Equations (4), (6), and (7) and the data in Table 5, we calculated τ Ci and τ Ai , shown in Tables 6 and 7. It can be seen from Tables 6 and 7 that the maximum deformation unevenness coefficients τ were 8.82% and 10.1%, respectively. Whether it was measured with a caliper or the LSMS, if the maximum deformation unevenness coefficient did not exceed a maximum limit of 15%, then the expansion joint did not fail, meaning that the expansion joint is a qualified product. That is to say, the result is the same whether measured with calipers or the LSMS.

Comparative Analysis
As shown in Table 5, due to the difference in the accuracy between the calipers and the LSMS, the values of W ji at the same position are almost different from each other. The difference of the W ji using the LSMS and calipers to detect can be expressed by Equation (19). (19) where L W ji is equal to the value of W ji , which is obtained after calculations based on the LSMS detection data; similarly, C W ji is equal to the value of W ji , which is obtained after calculations based on caliper detection data.
According to Equation (19) and the data in Table 5, the values of ∆ at any position are shown in Table 8. The maximum, minimum, and average of ∆ are 0.731, 0.013, and 0.37 mm. Compared with the measurement accuracy of calipers, the fluctuation range of ∆ is a bit large. We believe that this is mainly due to the lack of a fixed detection datum when using calipers to detect. There is a large random error in the measurement process, that is, traditional detection methods rely heavily on the operator. In addition, 0.37/q s = 0.37/55.83 = 0.66% << 15%, the probability of misjudgment using manual measurement is not very high. However, compared with automatic measurement using the LSMS, the efficiency and accuracy of manual measurement are relatively low.

Error Analysis
According to the analysis, as long as the same position data detected before and after the fatigue test are compared, the influence of other measurement errors due to mechanical transmission on the test results can be ignored. So, we did repeated positioning error analyses. This system uses a closed-loop drive system. A 5000-plus rotary encoder was installed under the motorized rotating platform so that the maximum angular error of the bellows would not exceed 0.072 • , and the nominal diameter range of the detected bellows was from 500 to 1500 mm. The circumferential error range was from 0.628 to 1.884 mm. That is, the deviation of the position detected before and after the fatigue test did not exceed 1.884 mm. Because the shape of the bellows changed continuously, the change of the convolution pitch was very small in the range of arc length of less than 2 mm. In order to verify the influence of the repeated positioning accuracy of the system on the measurement error, we performed multiple measurements on a bellows expansion joint. Table 9 shows the detection results of a nominal diameter of 500 mm at a position of 270 • . To ensure the data is reliable, it must return to the zero degree position after each scan, that is, after each measurement, the bellows is rotated to the 0 • position and then rotated to the 270 • position for the second measurement. Based on the first measurement result, it can be seen from the data in Table 8 that the maximum repeatability error is 0.006 mm. The measurement accuracy required by this detection system is 0.05 mm, so the repeat positioning accuracy of the wave distance measurement system meets the requirements. This result is consistent with the above analysis.

Conclusions
The primary aim of this paper was to propose a new method for convolution pitch detection of bellows expansion joints. According to the requirements of convolution pitch detection and the external shape characteristics of bellows, a non-contact measuring system based on laser scanning has been developed in the present work. The system was used in the laboratory for more than two years and has been continuously improved. After convolution pitch detection of 34 bellows expansion joints of different specifications, the system tends to be stable and runs well. Compared with traditional manual detection methods, which rely heavily on the operator, several problems have been solved; for example, the detection time is only one third of the manual detection time. At the same time, the proposed method has several other advantages, such as improving the accuracy, realizing online automatic detection, and reducing the labor intensity of detection. However, the convolution pitch cannot be detected dynamically during the fatigue test in the developed LSMS, and there is a certain blind zone in the laser scanning measurement. The binocular vision technology can be employed in the future to eliminate the measurement blind zone and to realize the dynamic detection of bellows expansion joints.