Geometric Modelling for 3D Point Clouds of Elbow Joints in Piping Systems

Pipe elbow joints exist in almost every piping system supporting many important applications such as clean water supply. However, spatial information of the elbow joints is rarely extracted and analyzed from observations such as point cloud data obtained from laser scanning due to lack of a complete geometric model that can be applied to different types of joints. In this paper, we proposed a novel geometric model and several model adaptions for typical elbow joints including the 90° and 45° types, which facilitates the use of 3D point clouds of the elbow joints collected from laser scanning. The model comprises translational, rotational, and dimensional parameters, which can be used not only for monitoring the joints’ geometry but also other applications such as point cloud registrations. Both simulated and real datasets were used to verify the model, and two applications derived from the proposed model (point cloud registration and mounting bracket detection) were shown. The results of the geometric fitting of the simulated datasets suggest that the model can accurately recover the geometry of the joint with very low translational (0.3 mm) and rotational (0.064°) errors when ±0.02 m random errors were introduced to coordinates of a simulated 90° joint (with diameter equal to 0.2 m). The fitting of the real datasets suggests that the accuracy of the diameter estimate reaches 97.2%. The joint-based registration accuracy reaches sub-decimeter and sub-degree levels for the translational and rotational parameters, respectively.


Introduction
Pipe elbow joints are essential components in almost all piping systems to support clean water supply, sewage dischargement, petrochemical processes, etc. They are used to connect pipes with different lengths and orientations to form pipe networks. Although geometric modelling of pipe cylindrical bodies was a popular research topic in recent decades (e.g., [1][2][3]), the modelling of elbow joints remains in its infant stage. Pipe system designers often need to know the exact positions and volumes of the joints as they need match the installed joints as closely as possible with specifications and to rate the pipes connected to the joints appropriately [4]. In the field of fluid mechanics, the characteristics of fluid flow (e.g., fluid velocities and pressures) through the elbow joints are of interest for many individuals [5][6][7][8]. Therefore, the geometry of the elbow joints via accurate three-dimensional (3D) modelling is essential for many related designs and studies.
More specifically, the importance of geometric modelling of the elbow joints is that the computation of the Reynolds number (RN) at the joints is required to investigate the flow behaviors [9]. A low RN indicates that the flow is primarily laminar, while a high RN often delineates the presence of turbulence resulting from changes in fluid velocities and directions. The RN depends on the joint diameter which can be affected by the flow pressure [10] and the temperature fluctuation [11]. Therefore, the geometry of the joints should be monitored with various sensors in a way that accurate computation of the RN can be guaranteed.
Vester et al. [12] measured the flow characteristics to calculate the RN at the exit of several 90 • elbow joints of a piping system. They enhanced their measurement method by adding hot wire prob anemometry to capture the complex flow condition at the exit of the joints. Zhang et al. [13] studied the structural vibration and fluid turbulence induced at a 90 • elbow joint. Their experiment focused on the impact of guide vanes installed at different positions at the joint, so the geometry of the vanes and joints was accurately known as the preset conditions. Ono et al. [14] investigated the influence of the curvature of the elbow joints on the RN. They concluded that the flow at the joints could be complex as secondary flow can be generated under the interaction between the elbow curvature and separation flow.
Geometric modelling with parametric equation(s) for 3D pipe components is useful in many other aspects. Zhao et al. [15] proposed a geometric modelling method for underground ferromagnetic pipelines. The elbow joints are modelled in terms of block elements which are generated from breaking down the pipe/joint into many small 3D circular/sectoral units. For each unit, four corners of the sectoral units are expressed in polar coordinate systems defined at the centroid of the pipes/joints. This method focused on characterizing the locations where the magnetic anomalies are present, so their models cannot be readily used for other datasets collected with other sensors such as laser scanners. Moritani et al. [16] modelled pipes with the conventional cylinder modelling approach but analyzed the cylindrical parameters with a proposed 3D hash table in order to match the central axes of the conjugate pipes for point cloud registration. This approach achieved high registration accuracy but did not consider the use of elbow joints. Rabanni et al. [17] developed an integrated feature detection and point cloud registration approach to handle pipe-rich scenes such as industrial sites. They applied more than five types of geometric models to process point clouds of factories which possess complicated piping systems. Nevertheless, their method did not focus on any elbow joints of the systems. These abovementioned research items revealed that the geometric modelling of elbow joints in piping systems has not been fully investigated, but their modelling can provide additional geometric information in addition to the vertical/horizontal pipes.
The geometric modelling of objects with a defined structure results in many other applications. For example, Chan et al. [18] developed a geometric model for polygonal lamp pole bodies which can be used for point cloud registration. They developed the models to fit the point clouds of lamp poles to estimate accurate parameters. The parameters were then used to generate two sets of correspondents for registration. Voinea et al. [19] proposed a geometric model of the human spine for medical purposes. Accurate geometric models can be used to estimate the volume of an object without complete measurement of the object surface. For example, Chan et al. [20] proposed a set of geometric models for bird eggs. The models were incorporated into a least-squares algorithm which can estimate the volume of eggs based on a point cloud (incomplete) of half of the egg surface obtained from a single scan. Based on the above discussion, it is known that the geometric model of elbow joints not only supports investigation of fluid flow but can also help facilitate other applications such as point cloud registrations and volume estimations.
In this paper, we developed a novel geometric model along with several adaptions for different types of elbow joints of piping systems. This was motivated by the abundance of the elbow joint measurements and high potential of being able to use the 3D joint measurement accurately and efficiently. The paper is organized as follows: Section 2 focuses on the elbow joint model, its adaptation and the paired least-squares fitting method; Section 3 presents the simulated and real datasets along with the experiment; Sections 4 and 5 deliver the result analysis and conclusion, respectively.

Geometric Models
Elbow joints are torus-like structures. The geometry of tori [21] can be used to model the most common types of elbow joints: the 90 • short-radius and long-radius joints [4]. When a joint exists in a 3D space or a Cartesian coordinate system, its center (Xc, Yc, Zc) is a translation from the origin of the model space (the coordinate system with solid line axes in Figure 1) and rotation by the vertical/horizontal angles (Ω/Ψ). As a result, the model of the joints is expressed as follows: and and

Geometric Models
Elbow joints are torus-like structures. The geometry of tori [21] can be used to model the most common types of elbow joints: the 90° short-radius and long-radius joints [4]. When a joint exists in a 3D space or a Cartesian coordinate system, its center (Xc, Yc, Zc) is a translation from the origin of the model space (the coordinate system with solid line axes in Figure 1) and rotation by the vertical/horizontal angles (Ω/Ψ). As a result, the model of the joints is expressed as follows: and arctan2( , ) A is the concentric radius of the joint; D is the outer diameter of the joint; R1, R2, and R3 are the rotation matrices about the X, Y, and Z-axes, respectively.
is only an intermediate parameter which does not need to be solved during the parameter estimation.
is computed for every point lying on the joints for the rotation about the Y axis (to lie on the Y-Z plane) in the model space, so after rotation and the translation of A (downward), the point can be fitted to a circle with a diameter equal to D. A is the concentric radius of the joint; D is the outer diameter of the joint; R 1 , R 2, and R 3 are the rotation matrices about the X, Y, and Z-axes, respectively. Φ is only an intermediate parameter which does not need to be solved during the parameter estimation. Φ is computed for every point lying on the joints for the rotation about the Y axis (to lie on the Y-Z plane) in the model space, so after rotation and the translation of A (downward), the point can be fitted to a circle with a diameter equal to D. According to the common standard of the design of the elbow joint [4], the short-radius (namely, 1D in industry) joint is defined as A = D, while the long-radius (namely, A = 1.5D in industry) joint is defined as A = 1.5 × D. A and D can be solved simultaneously if the type of joint is not known. The simulated point clouds for short-radius and long-radius joints with a outer diameter of 10 cm, are shown in Figure 2a Nevertheless, some joints are extended in length close to their connections. More often, in practice, when the joints are surveyed with 3D sensors such as terrestrial laser scanners, certain portions of the connected pipes are inevitably scanned and they are often indifferentiable from the joints (a pipe bend is formed) as illustrated as a real case and a simulated short-radius joint in Figure  3a,b, respectively. These connected cylindrical portions (pipe sections or the match pipes) must be modelled simultaneously with the bending portion with an adapted model (Figure 3c). Therefore, we use an index, p, namely, the curve index, to allow points lying on the bending portion and the vertical cylindrical portion to rotate about the Y-axis when p = 1. p is expressed as where sgn() and H() are the sign and the Heaviside step functions, respectively. Accordingly, Equation (2) is modified as Nevertheless, some joints are extended in length close to their connections. More often, in practice, when the joints are surveyed with 3D sensors such as terrestrial laser scanners, certain portions of the connected pipes are inevitably scanned and they are often indifferentiable from the joints (a pipe bend is formed) as illustrated as a real case and a simulated short-radius joint in Figure 3a,b, respectively. These connected cylindrical portions (pipe sections or the match pipes) must be modelled simultaneously with the bending portion with an adapted model ( Figure 3c). According to the common standard of the design of the elbow joint [4], the short-radius (namely, 1D in industry) joint is defined as A = D, while the long-radius (namely, A = 1.5D in industry) joint is defined as A = 1.5 × D. A and D can be solved simultaneously if the type of joint is not known. The simulated point clouds for short-radius and long-radius joints with a outer diameter of 10 cm, are shown in Figure 2a Nevertheless, some joints are extended in length close to their connections. More often, in practice, when the joints are surveyed with 3D sensors such as terrestrial laser scanners, certain portions of the connected pipes are inevitably scanned and they are often indifferentiable from the joints (a pipe bend is formed) as illustrated as a real case and a simulated short-radius joint in Figure  3a,b, respectively. These connected cylindrical portions (pipe sections or the match pipes) must be modelled simultaneously with the bending portion with an adapted model (Figure 3c).  Therefore, we use an index, p, namely, the curve index, to allow points lying on the bending portion and the vertical cylindrical portion to rotate about the Y-axis when p = 1. p is expressed as where sgn() and H() are the sign and the Heaviside step functions, respectively. Accordingly, Equation (2) is modified as Therefore, we use an index, p, namely, the curve index, to allow points lying on the bending portion and the vertical cylindrical portion to rotate about the Y-axis when p = 1. p is expressed as where sgn() and H() are the sign and the Heaviside step functions, respectively. Accordingly, Equation (2) is modified as The computation of Φ (Equation (3)) can be modified as θ (0 • < θ ≤ 360 • ) is the angle from the X-axis on the X-Y plane. Equation (7) is able to handle the situation that a point lying on vertical cylindrical portion can be rotated about the Y-axis by π to intersect the Y-Z plane so the joint type degree number, d, should be set to π 2 for a 90 • elbow. In other words, if d is set to π 4 , the model can be used for a 45 • elbow as shown in Figure 4.
Sensors 2020, 20, x FOR PEER REVIEW 5 of 19 The computation of (Equation (3)) can be modified as (0˚< ≤ 360˚) is the angle from the X-axis on the X-Y plane. Equation (7) is able to handle the situation that a point lying on vertical cylindrical portion can be rotated about the Y-axis by π to intersect the Y-Z plane so the joint type degree number, d, should be set to for a 90° elbow. In other words, if d is set to , the model can be used for a 45° elbow as shown in Figure 4.  When d = , the above adaption of the model particularly suits a sharp 90 turn, as shown in Figure 5, which is quite common in piping systems with smaller pipe diameters and fluid pressures. Note that A = 0.5 × D, so we define the nomenclature as A = 0.5D herein for consistency even though this is not commonly referred to as this in the industry. Finally, for modelling a joint with flanges having a larger outer diameter (Df), as shown in Figure  6, Equation (1) can be modified to adapt to this additional diameter: When d = π 2 , the above adaption of the model particularly suits a sharp 90 turn, as shown in Figure 5, which is quite common in piping systems with smaller pipe diameters and fluid pressures. Note that A = 0.5 × D, so we define the nomenclature as A = 0.5D herein for consistency even though this is not commonly referred to as this in the industry.
Sensors 2020, 20, x FOR PEER REVIEW 5 of 19 The computation of (Equation (3)) can be modified as (0˚< ≤ 360˚) is the angle from the X-axis on the X-Y plane. Equation (7) is able to handle the situation that a point lying on vertical cylindrical portion can be rotated about the Y-axis by π to intersect the Y-Z plane so the joint type degree number, d, should be set to for a 90° elbow. In other words, if d is set to , the model can be used for a 45° elbow as shown in Figure 4. When d = , the above adaption of the model particularly suits a sharp 90 turn, as shown in Figure 5, which is quite common in piping systems with smaller pipe diameters and fluid pressures. Note that A = 0.5 × D, so we define the nomenclature as A = 0.5D herein for consistency even though this is not commonly referred to as this in the industry. Finally, for modelling a joint with flanges having a larger outer diameter (Df), as shown in Figure  6, Equation (1) can be modified to adapt to this additional diameter:  Finally, for modelling a joint with flanges having a larger outer diameter (D f ), as shown in Figure 6, Equation (1) can be modified to adapt to this additional diameter: Here, we require an index, q, namely, the flange index, to allow points lying on the flange to be associated with its larger diameter, . q is expressed as q = 1 for a point lying either on the vertical or horizontal flange. The first term is the vertical flange, while the second term is the horizontal flange.

Linearized Adjustment Model
The observations ( ⃑ = ( ) ) obtained by simulation or laser scanning were fitted to the proposed model (Equation (1) or (8)) to estimate the parameters. Since the observations and parameters are not separable in the equation, the Gauss-Helmert adjustment model [22] was employed. The linearized adjustment model is given by where δˆ is the correction vector for the parameter vector ⃑ = ; or ⃑= ; A is the design matrix of partial derivatives of the proposed model with respect to the parameters; B is the design matrix of partial derivatives of the proposed model with respect to observations, is the residual vector; and w is the misclosure vector.

Initial Value Estimation
An accurate set of initial values of the model parameters is often needed to guarantee the convergence and the accuracy of the least-squares solution. A straightforward approach based on cylinder fittings is proposed to estimate the initial values of the parameters. Since the joint was detected by first segmenting the connected pipe based on the Principal Component Analysis (PCA) method [23], the approximate position of the joint-pipe connection is known. Then, we extracted a thin slice of points (about 1 cm thick) near connections to input to the cylinder fitting [24] as shown in Figure 7. An inner center ( ) was readily computed by estimating the intersection between two central axes of the best fit cylinders. After that, the joint was translated to the inner center, and the golden section search algorithm [25] applied to estimate initial values of Ω and Ψ by Here, we require an index, q, namely, the flange index, to allow points lying on the flange to be associated with its larger diameter, D f . q is expressed as q = 1 for a point lying either on the vertical or horizontal flange. The first term is the vertical flange, while the second term is the horizontal flange.

Linearized Adjustment Model
The observations ( l = (x y z) T ) obtained by simulation or laser scanning were fitted to the proposed model (Equation (1) or (8)) to estimate the parameters. Since the observations and parameters are not separable in the equation, the Gauss-Helmert adjustment model [22] was employed. The linearized adjustment model is given by whereδ is the correction vector for the parameter vector A is the design matrix of partial derivatives of the proposed model with respect to the parameters; B is the design matrix of partial derivatives of the proposed model with respect to observations,v is the residual vector; and w is the misclosure vector.

Initial Value Estimation
An accurate set of initial values of the model parameters is often needed to guarantee the convergence and the accuracy of the least-squares solution. A straightforward approach based on cylinder fittings is proposed to estimate the initial values of the parameters. Since the joint was detected by first segmenting the connected pipe based on the Principal Component Analysis (PCA) method [23], the approximate position of the joint-pipe connection is known. Then, we extracted a thin slice of points (about 1 cm thick) near connections to input to the cylinder fitting [24] as shown in Figure 7. An inner center ( X c Y c Z c ) was readily computed by estimating the intersection between two central axes of the best fit cylinders. After that, the joint was translated to the inner center, and the golden section search algorithm [25] applied to estimate initial values of Ω and Ψ by setting the rotations about an axis passing through the inner center and the X-Y plane [20]. Finally, the initial of A is the distance between the original and the inner center. The initial values of ( X c Y c Z c ) can be computed by translating the inner center along the axis between the inner center and the origin by A toward the origin. The initial value of D is naturally obtained from the previous cylinder fitting.
Sensors 2020, 20, x FOR PEER REVIEW 7 of 19 setting the rotations about an axis passing through the inner center and the X-Y plane [20]. Finally, the initial of A is the distance between the original and the inner center. The initial values of ( ) can be computed by translating the inner center along the axis between the inner center and the origin by A toward the origin. The initial value of D is naturally obtained from the previous cylinder fitting.

Applications
As dicussed in Section 1, the model can be potentially used to facilate monitoring of the geometry of the elbow joints in piping sytems to help invesitagation of the flow of fuilds. However, our focus in this paper is on the geospatial analysis of the model and its related applications such as point cloud registration and mounting bracket detection.

Point Cloud Registration
After the parameters are estimated by using the model, the translational and rotational parameters can be used to transform the joint to its nominal position in the model space. Therefore, two point clouds of the same joint collected at two different stations can be registered to a common coordinate system. Suppose the estimated parameter vectors of the two point clouds of the same joint, Point Clouds 1 and 2, are ⃑ = and ⃑ = , respectively. Point Cloud 2 (x,y,z) can be registered to the coordinate system of Point Cloud 1 by using the following equation: Overall, the point cloud registration can be performed as long as two point clouds of the same joint obtained from two stations are fitted to the model to estimate the parameters. Point clouds of only one single joint are required for the registration.

Mounting Bracket Detection
A point which completely lies on the model (the modelled surface) of the joints will possess zero residual under the assumption that the parameters are perfectly estimated. In other words, a point which is farther away from the model will tend to have higher residuals. As a result, any pipe accessories (e.g., a mounting bracket as seen in Figure 8) that adhere to the joint surfaces can be

Applications
As dicussed in Section 1, the model can be potentially used to facilate monitoring of the geometry of the elbow joints in piping sytems to help invesitagation of the flow of fuilds. However, our focus in this paper is on the geospatial analysis of the model and its related applications such as point cloud registration and mounting bracket detection.

Point Cloud Registration
After the parameters are estimated by using the model, the translational and rotational parameters can be used to transform the joint to its nominal position in the model space. Therefore, two point clouds of the same joint collected at two different stations can be registered to a common coordinate system. Suppose the estimated parameter vectors of the two point clouds of the same joint, Point Clouds 1 and 2, are Point Cloud 2 (x,y,z) can be registered to the coordinate system of Point Cloud 1 by using the following equation: Overall, the point cloud registration can be performed as long as two point clouds of the same joint obtained from two stations are fitted to the model to estimate the parameters. Point clouds of only one single joint are required for the registration.

Mounting Bracket Detection
A point which completely lies on the model (the modelled surface) of the joints will possess zero residual under the assumption that the parameters are perfectly estimated. In other words, a point which is farther away from the model will tend to have higher residuals. As a result, any pipe accessories (e.g., a mounting bracket as seen in Figure 8) that adhere to the joint surfaces can be detected by observing the magnitudes of the residuals. A simple way to implement a mounting bracket detection algorithm is by setting a threshold for the residual magnitude. After the points with larger residuals are detected, they need to be grouped together and filtered. Similar to the point cloud processing framework proposed by Wang et al. [26], we employed Density-Based Spatial Clustering of Applications with Noise (DBSCAN) to group the points with higher residuals and then selected the largest segment and the Random Sample Consensus (RANSAC) cylinder fitting to refine the point clouds to segment out the mounting bracket. detected by observing the magnitudes of the residuals. A simple way to implement a mounting bracket detection algorithm is by setting a threshold for the residual magnitude. After the points with larger residuals are detected, they need to be grouped together and filtered. Similar to the point cloud processing framework proposed by Wang et al. [26], we employed Density-Based Spatial Clustering of Applications with Noise (DBSCAN) to group the points with higher residuals and then selected the largest segment and the Random Sample Consensus (RANSAC) cylinder fitting to refine the point clouds to segment out the mounting bracket.

Simulated Datasets
Eight elbow joints were simulated as 3D point clouds, and their details are listed in Table 1. Each joint is a full joint with 360° coverage and has the same number of points (47160) and an outer diameter (D) of 0.1 m. Some of the joints were re-simulated with a higher diameter (D = 0.2 m) and with different coverages (from 10° to 360°) to support further analysis.

Real Datasets
Ten point clouds of elbow joints were collected with two laser scanners, and the details are shown in Table 2. All the joints were extracted from the entire point clouds based on the PCA method [23] and some manual editing. Joints A-F (Figure 8a-e) were captured by a Trimble SX 10 scanner (a product of the Trimble Inc., Sunnyvale, CA, USA) on the Guangzhou campus of the Sun Yat-sen University, China, in July 2019, while Joints G-J (Figure 9f-h) were captured by a Faro Focus 3D scanner (a product of the Faro Technologies Inc., Lake Mary, FL, USA) at the ICT building of the University

Simulated Datasets
Eight elbow joints were simulated as 3D point clouds, and their details are listed in Table 1. Each joint is a full joint with 360 • coverage and has the same number of points (47160) and an outer diameter (D) of 0.1 m. Some of the joints were re-simulated with a higher diameter (D = 0.2 m) and with different coverages (from 10 • to 360 • ) to support further analysis.

Real Datasets
Ten point clouds of elbow joints were collected with two laser scanners, and the details are shown in Table 2. All the joints were extracted from the entire point clouds based on the PCA method [23] and some manual editing. Joints A-F (Figure 9a  of Calgary, Canada, in May 2014. The diameters of the joints were obtained by tape measurement for reference ( Figure 10).

Accuracy Analysis
The root mean square error (RMSE) of the translation parameters ( ) and the rotational parameters ( ) estimated from the fittings of the simulated datasets are tabulated in Table 3. The of Calgary, Canada, in May 2014. The diameters of the joints were obtained by tape measurement for reference ( Figure 10).

Accuracy Analysis
The root mean square error (RMSE) of the translation parameters ( ) and the rotational parameters ( ) estimated from the fittings of the simulated datasets are tabulated in Table 3. The

Accuracy Analysis
The root mean square error (RMSE) of the translation parameters (δ T ) and the rotational parameters (δ R ) estimated from the fittings of the simulated datasets are tabulated in Table 3. The RMSE is computed using the estimated and the true (pre-set) parameter values. It can be seen that the fitting of the models can recover the parameters with 100% accuracy when there is no noise added to the point clouds. As higher noise levels (from ±1 mm to ±3 mm) are introduced to the point clouds, the RMSEs increase as expected.δ T stays at a sub-millimeter level except for Joints c and g which are both the 0.5D types. This is because there is an intersection between the bending and the two cylindrical portions of the joint for the 0.5D type. The noise is caused by the points from the three portions mixed at the intersection, and therefore degrades the accuracy. Table 3. RMSE of the translation parameters and the rotational parameters estimated from the fitting of the simulated datasets at noise levels from 0 mm to ±3 mm (D = 0.1 m). Similarly,δ R stays at a sub-degree level except for Joints (c) and (g). Table 4 shows the RMSEs re-estimated by using the same set of simulated joints with doubled A/D (fixed D = 0.2 m) and a raised noise level (from ±3 mm to ±6 mm). It can be seen that the RMSEs of Joints (c) and (g) are significantly reduced at a noise level of ±3 mm. However, the fitting failed to estimate the parameters (the least-squares algorithm did not converge) when the noise levels are further increased as seen in Table 4. From the tables, it is known that larger joints (larger D) tend to possess higher accuracy of the estimated parameters. Another conclusion is that 90 • joints can deliver better fitting results compared to the 45 • joints thanks to the fact that more observations can be obtained in the bending parts for the 90 • joints. Table 4. RMSE of the translation parameters and the rotational parameters estimated from the fitting of the simulated datasets at noise levels from ±3 mm to ±6 mm (D = 0.2 m).

Noise Level (mm)
±3 ±4 ±5 ±6 The RMSE of the dimensional parameters (δ AD ) for the joints (D = 0.2 m) is shown in Table 5. Compared to Table 4, the accuracy of the dimensional parameters is even better than the translational parameters, especially when the ±6 cm noise level is introduced to the point clouds. This indicates that the model can estimate the dimensional parameters more accurately than the translational parameters under higher noise levels. So far, Joints b and f have the lowest errors for the respective 90 • and 45 • joints at the ±6 mm noise level. To investigate the noise level the model can bear, noises from ±20 mm to ±80 mm were introduced to the joints (D = 0.2 m). Surprisingly, as seen in Table 6, the model can still deliver quite accurate translational and rotational parameters with errors of only 1.1 mm and 1.072 • , respectively, even though ±80 mm noise was introduced to a joint with a of diameter of 200 mm   Table 6. RMSE of the dimensional parameters estimated from the fitting of the simulated datasets from ±20 mm to ±80 mm (D = 0.2 m).

Joint Type A /D Ratioδ T (mm)δ R ( • )δ T (mm)δ R ( • )δ T (mm)δ R ( • )δ T (mm)δ R ( • )
In practice, one scan can only capture about half of a joint, so mostly only about half of the full point clouds of a joint can be fitted to the model unless the point clouds are registered before with two or more scans. Therefore, it is important to investigate the impact of the coverage of the point cloud of a joint on the model accuracy. Joint (a) (90 • , 1D, D = 0.1 m) was re-simulated from 10 • to 360 • at an interval of 10 • (simulated joints with 10 • , 90 • , 180 • , and 270 • coverage are shown in Figure 11), and different noise levels were introduced to the simulated point clouds.
from ± 20 mm to ± 80 mm were introduced to the joints (D = 0.2 m). Surprisingly, as seen in Table 6, the model can still deliver quite accurate translational and rotational parameters with errors of only 1.1 mm and 1.072°, respectively, even though ±80 mm noise was introduced to a joint with a of diameter of 200 mm 171 n/a n/a n/a n/a n/a n/a In practice, one scan can only capture about half of a joint, so mostly only about half of the full point clouds of a joint can be fitted to the model unless the point clouds are registered before with two or more scans. Therefore, it is important to investigate the impact of the coverage of the point cloud of a joint on the model accuracy. Joint (a) (90°, 1D, D = 0.1 m) was re-simulated from 10° to 360° at an interval of 10° (simulated joints with 10°, 90°, 180°, and 270° coverage are shown in Figure 11), and different noise levels were introduced to the simulated point clouds. The RMSE of the translational, rotational, and dimensional parameters for Joint (a) from 10° to 360° coverage and from noise level 0 mm to ± 8 mm is shown in Figures 12, 13, and 14, respectively. It can be seen that all three RMSE values decrease to a low level at 180° or higher coverage (less than approximately 0.5 mm, 0.1°, and 1 mm for the translational, rotational, and dimensional parameters, respectively) so that observations obtained from a single scan (about 180° coverage) can be fitted well to the model theoretically. The rotational parameters are relatively more prone to the change of the The RMSE of the translational, rotational, and dimensional parameters for Joint (a) from 10 • to 360 • coverage and from noise level 0 mm to ±8 mm is shown in Figures 12-14, respectively. It can be seen that all three RMSE values decrease to a low level at 180 • or higher coverage (less than approximately 0.5 mm, 0.1 • , and 1 mm for the translational, rotational, and dimensional parameters, respectively) so that observations obtained from a single scan (about 180 • coverage) can be fitted well to the model theoretically. The rotational parameters are relatively more prone to the change of the coverage and random noises. From the figures, it is known that the increments of random noises from 0 to ±8 mm do not lead to large increases in the RMSEs. Results of scanner calibrations published recently [27][28][29][30][31] indicated that the point cloud errors are normally less than 8 mm within a scan range of 10 m. As a result, it is deduced that the proposed model can work well with half of the joint scanned from a single scan. The RMSE of the translational, rotational, and dimensional parameters for Joint (a) from 10° to 360° coverage and from noise level 0 mm to ± 8 mm is shown in Figures 12, 13, and 14, respectively. It can be seen that all three RMSE values decrease to a low level at 180° or higher coverage (less than approximately 0.5 mm, 0.1°, and 1 mm for the translational, rotational, and dimensional parameters, respectively) so that observations obtained from a single scan (about 180° coverage) can be fitted well to the model theoretically. The rotational parameters are relatively more prone to the change of the coverage and random noises. From the figures, it is known that the increments of random noises from 0 to ± 8 mm do not lead to large increases in the RMSEs. Results of scanner calibrations published recently [27][28][29][30][31] indicated that the point cloud errors are normally less than 8 mm within a scan range of 10 m. As a result, it is deduced that the proposed model can work well with half of the joint scanned from a single scan.

Precision Analysis
The mean estimates and the precision of Joints (a) and (d) with different coverages are tabulated in Table 7. The precision increases as the coverage increases. This is as expected because the degree of freedom increases as the coverage increases. At low coverage (90 • ) of the simulated points, the precision of the dimensional parameters is lower than that of the translation parameters, but this situation reverses as the coverage increases. When the coverage is only 90 • (Figure 11b), the precision of D will be quite low as observations are only from one quarter of a circle, so this significantly degrades the dimensional parameters. On the other hand, it can be seen from Table 7 that the precision of the 45 • joint is lower than that of the 90 • joint. This is due to the fact that the bending portion of the 45 • joint is shorter than that of the 90 • joint. The shorter bending portion contributes less geometrical information to the estimation so a lower precision is obtained.

Estimated Parameters and Precision
The mean estimates and the precision of the real dataset are shown in Table 8. The precision is high and has the same order of magnitude as the precision of the simulated datasets (180 • coverage) shown in Table 7. All fitting converged within 10 iterations. The mean estimated joint diameter is 122.55 mm and its accuracy reaches 97.2% when it is compared to manual measurements. This suggests that the proposed model accurately fitted the real data obtained from the scanners.

Point Cloud Registration
Joints E and F are point clouds of the same joints obtained from two stations. After the fitting, their translational and rotational parameters were used for the registration based on Equation (11). Figure 15a shows that Joint F (green) is registered to the coordinate system of Joint E (red), and the simulated best fit joints (model) for Joint E are shown as well. It can be seen that the two point clouds match well with the model. Similarly, Figure 16a shows that Joint H (green) is registered to the coordinate system of Joint G (red).  Joints E and F are point clouds of the same joints obtained from two stations. After the fitting, their translational and rotational parameters were used for the registration based on Equation (11). Figure 15a shows that Joint F (green) is registered to the coordinate system of Joint E (red), and the simulated best fit joints (model) for Joint E are shown as well. It can be seen that the two point clouds match well with the model. Similarly, Figure 16a shows that Joint H (green) is registered to the coordinate system of Joint G (red).  accurate than that of Joints E and F. In fact, Joints G and H are larger joints (the dimension is approximately double that of Joints E and F). From Table 8, it is found that Joint E has only about 40% of the number of observations of Joint F. Therefore, the fitting accuracy of Joint E is limited, and this degrades the registration accuracy. Overall, the results of the two registrations demonstrated that the model can be used to register point clouds with a fairly good accuracy depending on the error of the individual fitting to joints.   Figure 17a shows that the points with higher residuals are highlighted with yellow for Joint B. Those points are then grouped and filtered to extract the mounting bracket (Figure 17b). This example illustrated that the residuals obtained from fitting the observations to the model can be a powerful tool for us to detect any components that attach to the joints but do not belong to them. More residualbased applications can be potentially developed in the future. Similarly, Figure 18a shows that the points with higher residuals are highlighted with yellow for Joint C. It can be seen that there is a thin plastic tube (can be seen more clearly in Figure 9c) attached to the joint surface, and the mounting brackets have larger residuals. After performing the grouping and filtering processes, the mounting bracket (Figure 18b) was successfully detected. The resultant registered point clouds for Registration 1 (Joint E-F registration) and Registration 2 (Joint G-H registration) are shown in Figures 15b and 16b, respectively. Their translational and rotational accuracies were computed based on independent check plane analysis [18] and are tabulated in Table 9. Registration 2 has better accuracy, reaching sub-decimeter and sub-degree levels for the translational and rotational parameters. This implies that the fitting of Joints G and H is more accurate than that of Joints E and F. In fact, Joints G and H are larger joints (the dimension is approximately double that of Joints E and F). From Table 8, it is found that Joint E has only about 40% of the number of observations of Joint F. Therefore, the fitting accuracy of Joint E is limited, and this degrades the registration accuracy. Overall, the results of the two registrations demonstrated that the model can be used to register point clouds with a fairly good accuracy depending on the error of the individual fitting to joints.  Figure 17a shows that the points with higher residuals are highlighted with yellow for Joint B. Those points are then grouped and filtered to extract the mounting bracket (Figure 17b). This example illustrated that the residuals obtained from fitting the observations to the model can be a powerful tool for us to detect any components that attach to the joints but do not belong to them. More residual-based applications can be potentially developed in the future. Similarly, Figure 18a shows that the points with higher residuals are highlighted with yellow for Joint C. It can be seen that there is a thin plastic tube (can be seen more clearly in Figure 9c) attached to the joint surface, and the mounting brackets have larger residuals. After performing the grouping and filtering processes, the mounting bracket (Figure 18b

Conclusions
In this paper, we proposed a novel geometric model and multiple model adaptions for several typical elbow joints commonly used in the piping systems for clean water supply and drainage. The model is in single equation format so that it equates the x, y, and z coordinates of joints obtained from laser scanner to a set of model parameters that describes the positions, orientations, and dimensions of joints in a 3D space, and the parameters can be readily estimated using the least-square technique. The model was verified by both simulated and real datasets, and two applications of the proposed model (point cloud registration and mounting bracket detection) were demonstrated and discussed. The results for the simulated datasets suggest that the model is robust to random noises for which the estimates only suffer from translational and rotational errors as low as 0.3 mm and 0.064°, respectively, even though ± 0.02 m random errors were introduced to coordinates of joints with a 0.2-m diameter. The real dataset results are consistent with the simulation and suggest that the accuracy of the diameter estimate achieved 97.2%. The registration based on two point clouds of a single joint was proven workable, and the accuracy reached sub-decimeter and sub-degree levels for the translational and rotational parameters, respectively. It is known that the model can be used not only for monitoring the joints' geometry but also for other applications such as point cloud registrations.

Conclusions
In this paper, we proposed a novel geometric model and multiple model adaptions for several typical elbow joints commonly used in the piping systems for clean water supply and drainage. The model is in single equation format so that it equates the x, y, and z coordinates of joints obtained from laser scanner to a set of model parameters that describes the positions, orientations, and dimensions of joints in a 3D space, and the parameters can be readily estimated using the least-square technique. The model was verified by both simulated and real datasets, and two applications of the proposed model (point cloud registration and mounting bracket detection) were demonstrated and discussed. The results for the simulated datasets suggest that the model is robust to random noises for which the estimates only suffer from translational and rotational errors as low as 0.3 mm and 0.064°, respectively, even though ± 0.02 m random errors were introduced to coordinates of joints with a 0.2-m diameter. The real dataset results are consistent with the simulation and suggest that the accuracy of the diameter estimate achieved 97.2%. The registration based on two point clouds of a single joint was proven workable, and the accuracy reached sub-decimeter and sub-degree levels for the translational and rotational parameters, respectively. It is known that the model can be used not only for monitoring the joints' geometry but also for other applications such as point cloud registrations.

Conclusions
In this paper, we proposed a novel geometric model and multiple model adaptions for several typical elbow joints commonly used in the piping systems for clean water supply and drainage. The model is in single equation format so that it equates the x, y, and z coordinates of joints obtained from laser scanner to a set of model parameters that describes the positions, orientations, and dimensions of joints in a 3D space, and the parameters can be readily estimated using the least-square technique. The model was verified by both simulated and real datasets, and two applications of the proposed model (point cloud registration and mounting bracket detection) were demonstrated and discussed. The results for the simulated datasets suggest that the model is robust to random noises for which the estimates only suffer from translational and rotational errors as low as 0.3 mm and 0.064 • , respectively, even though ±0.02 m random errors were introduced to coordinates of joints with a 0.2-m diameter. The real dataset results are consistent with the simulation and suggest that the accuracy of the diameter estimate achieved 97.2%. The registration based on two point clouds of a single joint was proven workable, and the accuracy reached sub-decimeter and sub-degree levels for the translational and rotational parameters, respectively. It is known that the model can be used not only for monitoring the joints' geometry but also for other applications such as point cloud registrations.