Robust localization to align measured points on the manufactured surface with design surface for freeform surface inspection

Robust localization to align measured points on the manufactured surface with design surface for freeform surface inspection

Computer-Aided Design 53 (2014) 90–103 Contents lists available at ScienceDirect Computer-Aided Design journal homepage: www.elsevier.com/locate/cad...

3MB Sizes 0 Downloads 10 Views

Computer-Aided Design 53 (2014) 90–103

Contents lists available at ScienceDirect

Computer-Aided Design journal homepage: www.elsevier.com/locate/cad

Robust localization to align measured points on the manufactured surface with design surface for freeform surface inspection✩ Vahid Mehrad, Deyi Xue ∗ , Peihua Gu Department of Mechanical and Manufacturing Engineering, University of Calgary, Calgary, Alberta, Canada T2N 1N4

highlights • A method is developed for predicting variances of localized measurement points. • Robust rough localization is conducted by matching various geometric properties. • Robust fine localization is conducted by selecting the optimal coordinate system.

article

info

Article history: Received 3 October 2013 Accepted 7 April 2014 Keywords: Freeform surface inspection Measurement Localization Robustness Uncertainty

abstract Inspection of a manufactured freeform surface can be conducted by sampling measurement points on the manufactured surface and comparing the measurement points with the ideal design geometry and its tolerance. Since the measurement coordinate system and design coordinate system are usually different, these measured points should be first aligned with the design surface through localization. In this research, robust localization methods are developed for both rough localization and fine localization processes. For rough localization, some target measurement points are selected and their corresponding points on the design surface are obtained based on similarities in curvatures and distances of these points. Compared with curvatures that are often used in localization, the distances are less sensitive to the errors introduced in manufacturing and measurement processes. In fine localization, uncertainties in the measurement and localization processes are considered to predict the uncertainties of the localized measurement points. The optimal design coordinate system is also selected such that the uncertainties of the localized measurement points can be minimized. Two case studies are provided to demonstrate the effectiveness of the developed methods for freeform surface inspection. © 2014 Elsevier Ltd. All rights reserved.

1. Introduction Freeform surfaces, such as turbine blades, car bodies and boat hulls, have been widely used in different industries including automotive, aerospace, marine, and biomedical engineering. Advanced manufacturing technologies, such as 5-axis CNC machining, are used to manufacture parts with freeform surfaces. Since performance of a part with freeform surfaces is significantly influenced by its correct geometry, inspection is often carried out to compare the geometry of the manufactured freeform surface with the ideal design surface and its tolerance requirement defined in a CAD system. Inspection of a freeform surface is usually conducted by sampling measurement points on the manufactured surface and

✩ This paper has been recommended for acceptance by Hiromasa Suzuki.



Corresponding author. Tel.: +1 403 220 4168; fax: +1 403 282 8406. E-mail address: [email protected] (D. Xue).

http://dx.doi.org/10.1016/j.cad.2014.04.003 0010-4485/© 2014 Elsevier Ltd. All rights reserved.

comparing these measurement points with the design surface. Since the measurement coordinate system is often different from the design coordinate system, the localization process has to be carried out to transform the measured points from the measurement coordinate system to the design coordinate system. Localization is usually conducted in two steps: rough localization and fine localization [1]. Measurement points on a manufactured freeform surface can be acquired by using either contact measurement devices such as coordinate measuring machines (CMMs) or noncontact measurement devices such as three-dimensional (3-D) laser scanners [1]. The number of measured points and the distributions of these measured points influence the accuracy of the localization result [2]. In addition, the accuracy of the measurement device also influences the quality of localization [3]. In the rough localization process, a rough coordinate transformation matrix is obtained to approximately align the measurement points with the design surface. When the measurement coordinate system is quite different from the design coordinate system, the measured points cannot be directly projected onto the

V. Mehrad et al. / Computer-Aided Design 53 (2014) 90–103

design surface to find their corresponding points. In rough localization, the intrinsic geometric properties that are independent of coordinate system, such as curvatures, are often used for identifying the corresponding points. In this research area, Yamany and Farag [4] introduced a method to match surface signatures that distinctly represent the surface curvature information observed from certain points. Ko et al. [5] developed a method to select three measured points and match them to their corresponding points on the design surface based on similarities of Gaussian and mean curvatures. Li and Gu [6] extracted and matched geometrical features on the measured and design surfaces based on similarities of Gaussian curvature and some other evaluation measures. The main problem in rough localization is the sensitivity of curvature to geometrical error. Trying to solve this problem, OuYang et al. [7] developed a robust initial matching scheme by matching the Delaunay pole sphere (DPS) as an orientation independent property rather than matching curvatures. OuYang’s method is robust but demands four computationally expensive processes for initial matching including: triangulation, identification of characteristic points, checking of the DPS radius constraints and checking of the length constraints. In the fine localization process, an accurate coordinate transformation matrix is obtained to optimally match the measurement points with the design surface. Since the transformation result achieved in rough localization is usually used as initial guess for the fine localization, the measurement coordinate system and the design coordinate system are close. In fine localization, the roughly localized measured points can be projected onto the design surface to find their corresponding points. In this research area, Besl and McKay [8] employed the iterative closest point (ICP) method through iteratively minimizing the sum of squared residual errors between the measured points and their closest points on the design surface. This ICP method and its variations have been primarily used in the past for fine localization. Research on fine localization focused on two aspects: (1) development of new fine localization methods to improve localization accuracy, and, (2) estimation of uncertainties of the localization results based on the uncertainties of the measurement points and/or uncertainties introduced in the fine localization process. In the first aspect, Li et al. [9] used least-median-of-square instead of least-squares on residual errors to improve the accuracy in local deformation detection for surface matching. Sharp et al. [10] developed the ICPIF method in which both the differences between the intrinsic geometric properties such as curvature and the residual errors were minimized to find the corresponding points. Orazi and Tani [11] developed a fine localization method based on the extended Gaussian curvature to compare the principal curvatures of the corresponding points. In the second aspect, Che and Ni [12] presented a generic approach to obtain the uncertainty in coordinate transformation from noisy measurements based on constrained optimization uncertainty analysis. Yan and Menq [13] developed a method to approximate the uncertainties of the obtained transformation parameters in the fine localization process based on measurement and manufacturing errors. Poniatowska [14] introduced a method to determine the uncertainty in the coordinate transformation parameters based on geometric deviations of the manufactured surface from the design surface. Mehrad et al. [3] studied the influences of measurement uncertainties and the uncertainties introduced in the localization process on the localized measurement points in freeform surface inspection. The main problem in curvature-based localization methods is the sensitivity of curvatures to the manufacturing errors and/or measurement errors at the measurement locations. In curvaturebased localization methods, the curvatures of the manufactured surface at measurement points are estimated and the design surface is searched to find the possible corresponding points. During

91

this search process, when the acceptable difference between two similar curvatures is set too tight, the true corresponding points could be easily missed. On the other hand when the acceptable difference is assigned with a large value, many possible corresponding points, including wrong corresponding points, can be obtained. This problem is critical when the Gaussian curvature is used for comparison due to its small values especially in the flat regions of the surface. In addition, usually alignment of three pairs of corresponding points is used in the presently developed methods [5,7], leading to the alignment of two planes with the possibility of upside-down positions. In this research, new robust localization methods are developed for both the rough and the fine localization processes. In rough localization, four or more measured points are selected and their corresponding points on the design surface are obtained in two steps: (1) identification of an initial list of possible corresponding points with similar curvatures based on curvature similarity constraints, and (2) elimination of non-feasible corresponding points based on distance constraints among measurement points. The calculated distances among measurement points are less sensitive to geometric errors on the freeform surface compared with the estimated curvatures. In fine localization, the uncertainties of finely localized measurement points are estimated from the uncertainties of roughly localized measurement points and the uncertainties of the six transformation parameters for the fine localization. The optimal design coordinate system is also identified to minimize the uncertainties of the finely localized measurement points. The rest of this paper is organized as follows: in Section 2, the method developed for robust rough localization to match the measured points on the manufactured surface with the design surface is provided. In Section 3, a method to minimize the uncertainties of the finely localized measurement points is described through identification of the optimal design coordinate system. In Section 4, case studies are provided to show the effectiveness of the developed methods. In Section 5, major influencing factors on the computation efficiency of the developed methods are discussed. In Section 6, conclusions are summarized. 2. Robust rough localization to align measured points on the manufactured surface with the design surface Before the rough localization, the measurement coordinate system and the design coordinate system are usually quite different. For each measured point, its corresponding point on the design surface needs to be identified to obtain the transformation parameters for localization. Geometric properties that are independent of the coordinate system, such as curvature, have to be used for identifying the corresponding points. The measures of curvature such as Gaussian and mean curvatures have been often used in the developed rough localization methods. The curvatures of points on the design surface can be accurately calculated based on the given mathematical model of the design surface. The curvatures of manufactured surface at the measurement points, however, can only be approximated using the coordinates of the measured points near this location. The approximated curvature for each measurement point contains the estimation error and is also sensitive to the manufacturing and/or measurement errors near this location. The maximum change in curvature occurs when a measured point moves towards or away from the center of curvature due to manufacturing and/or measurement errors. Fig. 1 shows three measurement points in a 2D case and the influence of the error in the radial direction on the approximated curvature. The curvature, C , is the reciprocal of the radius of curvature, R, and its value can be obtained by the Pythagorean theorem as shown in Eq. (1). The maximum sensitivity of the curvature to the geometric error at a measured point

92

V. Mehrad et al. / Computer-Aided Design 53 (2014) 90–103

three steps: (1) selection of sufficient and proper target measurement points on the manufactured surface, (2) identification of the corresponding points on the design surface by matching curvatures and distances of the target points, and, (3) alignment of the target measurement points to their corresponding points on the design surface. 2.1. Selection of sufficient and proper target measurement points on the manufactured surface Fig. 1. Radius of curvature (R) and curvature (C ) for a measured point in a 2D case.

can be obtained as shown in Eq. (2). C = 1/R =

2h

(1)

( s 2 + h2 )

2 1 − (h/s)2 2 ∂C = 2× ≈ 2. ∂h s (1 + (h/s)2 )2 s

(2)

When s is small, the sensitivity of C to geometric error is high. When s is large, the estimated curvature lacks the local geometric property near the measurement points. Since distances among measurement points are also independent of the selected coordinate system, distances can also be used for rough localization. The distance between two measurement points on the manufactured surface should be the same as the distance between their corresponding points on the design surface. When two measurement points are far from each other, values of the manufacturing and measurement errors are significantly smaller than the values of the distances. The maximum sensitivity of the distance between two measurement points to the error occurs when measurement points move towards or away from the direction linking these two measurement points. The maximum sensitivity of the distance, D, to the geometric error, h, is calculated by:

∂D = 1. ∂h

(3)

Based on the above discussion, matching of corresponding points in terms of distances among measurement points and their corresponding points on the design surface is more robust than matching of these points in terms of curvatures. In this research, matching of the corresponding distances among points is used together with the matching of the corresponding curvatures to improve the robustness in rough localization. Localization based on the distances between all of the measured points and their possible corresponding points on the design surface is computationally expensive. To reduce the computation effort, the robust rough localization in this research is conducted in

(a) Intersection of two spheres (locus L1,2 ).

In rough localization, only a few target measurement points are selected to search for their corresponding points on the design surface to reduce the computation effort. When too many target measurement points are selected, a great computation effort is required although the achieved localization result is unique and reliable. When the number of target measurement points is not sufficient, multiple and wrong localization results can be obtained. Therefore it is essential to first discuss the minimum number of target points that are required for rough localization. In addition, locations of these target measurement points should be properly selected such that the rough localization result is the least sensitive to the manufacturing and measurement errors. Assume that two points C1 and C2 are selected as target measurement points on the manufactured surface and the points C′1 and C′2 are their corresponding points on the design surface respectively. Suppose a third measured point P has distances R1 and R2 from the points C1 and C2 respectively. In order to find the corresponding point P′ on the design surface, the locus of points with distance R1 from the points C′1 and distance R2 from the point C′2 on the design surface (i.e., L1,2 ) should be achieved. The locus L1,2 is a circle obtained as the intersection of the sphere with center C′1 and radius R1 and the sphere with center C′2 and radius R2 , as shown in Fig. 2(a). Since the locus L1,2 is not a unique point, more than two target measurement points are required to obtain a unique corresponding point on the design surface. Assume that a point C3 is selected as the third target measurement point such that C1 , C2 and C3 are not collinear, and its corresponding point C′3 is obtained on the design surface. The locus of points with distances R1 , R2 and R3 from points C′1 , C′2 and C′3 (i.e., L1,2,3 ) is composed of two points obtained as the intersection of the locus L1,2 and the sphere with center C′3 and radius R3 as shown by square symbols in Fig. 2(b). Since the locus L1,2,3 is not yet a unique point, more than three target measurement points are required for rough localization. Assume that another point C4 is selected as the fourth target measurement point such that C1 , C2 , C3 and C4 are not coplanar, and its corresponding point C′4 is obtained on the design surface. The locus of points with distances R1 , R2 , R3 and R4 from points C′1 , C′2 , C′3

(b) Intersection of three spheres with non-collinear centers (locus L1,2,3 ).

(c) Intersection of four spheres with non-coplanar centers (locus L1,2,3,4 ).

Fig. 2. Loci of points with given distances from different target measurement points.

V. Mehrad et al. / Computer-Aided Design 53 (2014) 90–103

93

Fig. 3. Measured points and their normal projections on the best fit plane.

Fig. 4. Process to select four target points among the projected measured points on the best fit plane.

and C′4 (i.e., L1,2,3,4 ) is a unique point obtained as the intersection of the four spheres as shown by the star symbol in Fig. 2(c). Therefore the minimum number of required target measurement points for rough localization is four. Among all the measurement points, the selection of the proper locations of these target measurement points also plays an important role on the quality of rough localization. When these target measurement points are far from each other, the manufacturing and/or measurement errors have insignificant influences to the distances among these target measurement points. The target measurement points can be selected manually. In this work, a heuristic method has also been developed to automatically select these target measurement points. Since the approximated curvature measures at the boundaries of measured region of the manufactured surface could be inaccurate, the target measurement points should not be selected on the boundaries of the measured region of the manufactured surface. The points on the boundaries are identified by a method developed based on the method introduced by Duckham et al. [15]. First, the best fit plane is obtained by minimizing the least squared errors between the measured points and the fitted plane, and the measured points are then projected onto the best fit plane, as shown in Fig. 3. The planar Delaunay triangulation method is then applied to create triangular patches from the measured points. Suppose triangle T1 is called a neighbor of triangle T2 when T1 and T2 share an edge, the triangles that have less than three neighbors can be detected as the boundary triangles and the points only belonging to boundary triangular patches are the boundary points. The locations of the identified boundary points and centroid of the measured points on the best fit plane are shown in Fig. 4(a). The location of the farthest non-boundary measured point from the centroid on the best fit plane is selected as the location of

the first target measurement point (i.e., point A in Fig. 4(b)). Then the location of the farthest non-boundary point from point A on the best fit plane is selected as the location of the second target measurement point (i.e., point B in Fig. 4(c)). The locations of the two non-boundary points on the bisector line of angle BGA with the largest distances from the centroid are subsequently selected as the locations of the third and fourth target measurement points (i.e., points C and D in Fig. 4(d)). 2.2. Identification of the corresponding points on the design surface for the selected target points After the target measurement points are selected, their corresponding points on the design surface should be identified based on similarities in curvatures and distances of these points. The method to identify the corresponding points is explained with a simple example as shown in Fig. 5. A corresponding point on the design surface should have similar curvature as the target measurement point. Suppose that the design surface is a flat plane with 5 spherical indentations, and only a portion of the manufactured surface that contains the two large spherical indentations is measured as shown in Fig. 5(a). Since the indentations have spherical shapes, the indentations with similar spherical radius also have similar curvature. For the smaller indentation on the measured portion of the manufactured surface, there is only one possible corresponding spherical indentation on the design surface. For the larger spherical indentation on the measured portion of the manufactured surface, however, there are two spherical indentations on the design surface with the same radius. When only similarities in curvature are considered, the measured portion of the manufactured surface cannot be localized with the design surface.

94

V. Mehrad et al. / Computer-Aided Design 53 (2014) 90–103

(a) Features with similar curvatures.

(b) Features with similar curvatures and distances.

(c) Matching of the identified corresponding features.

Fig. 5. Rough localization based on matching of curvatures and distances.

(a) Regions on the design surface with similar major curvature.

(b) Regions on the design surface with similar minor curvatures.

(c) Regions on the design surface with similar major and minor curvatures.

Fig. 6. Search of possible corresponding points on the design surface for a selected target measurement point based on curvature similarities.

(a) Distances between the selected target measurement points.

(b) Distances between the candidate corresponding points on the design surface.

Fig. 7. Identification of possible corresponding points on the design surface by matching the distances.

In this research, the distances among target measurement points are also used to identify the corresponding points on the design surface. Suppose that the distance between centers of the two spherical indentations in the measured portion of the manufactured surface is d(M ) , and the distances between the center of the smaller indentation sphere and the centers of the two larger in(D) (D) dentations spheres on the design surface are d1 and d2 as shown (D)

in Fig. 5(b). Since only the distance d1 matches with the distance d(M ) , the correct corresponding features can be identified. Fig. 5(c) shows the result of matching the identified corresponding features. When the surface is a freeform surface, the curvature properties of any point on the surface can be obtained either using the measurement points near the selected location or using the mathematical model of the surface. The Gaussian and mean curvatures are often selected to match the measurement points with the corresponding points on the design surface. The Gaussian curvature is the multiplication product of the two principal curvatures (also called major and minor curvatures) and the mean curvature is the average of the two principal curvatures. In the flat regions of the surface, since both of the major and minor curvatures are small, the Gaussian curvature is very small. Therefore the manufacturing

and/or measurement errors near the selected location have significant impacts on the Gaussian curvature. Compared with the Gaussian curvature, the major and minor curvatures are less sensitive to the manufacturing and measurement errors. In this research, the major and minor curvatures have been selected as the measures for improving robustness of rough localization. Fig. 6 shows the regions on the design surface with similar curvature measures with a selected target measurement point. Search for regions with similar curvature measures is conducted by selecting a grid of points (e.g., 30 × 30 = 900 points) on the design surface and calculating their major/minor curvatures. Several regions on the design surface may have the similar curvature measures as the selected target measurement point as shown in Fig. 6(c). The distances among the target measurement points are then used to identify the correct region by eliminating the non-feasible regions. For the four selected target measurement points, a total of six distance measures are used to identify the corresponding points on the design surface as shown in Fig. 7. First all candidate corresponding points for each of the four target measurement points on the design surface are obtained based on similarities in curvatures and the candidate corresponding points

V. Mehrad et al. / Computer-Aided Design 53 (2014) 90–103

95

Fig. 8. Alignment of four target measurement points with their corresponding points on the design surface.

for the four target measurement points are stored on the lists (D) (D) (D) (D) C1 , C2 , C3 and C4 as shown in Fig. 7. Then the six distance constraints are evaluated through the following two steps: (D)

(D)

(D)

(D)

Step 1: From the lists C1 , C2 , C3 and C4 , find all possible loops with 4 points P1 P2 P3 P4 that can satisfy distance constraints defined by d1,2 , d2,3 , d3,4 and d1,4 . Step 2: From the loops identified in Step 1, find the loops that can satisfy distance constraints defined by d1,3 and d2,4 . Since the curvature measures are obtained and matched based on a grid of points on the design surface, the distances among possible corresponding points are described by discrete values. Therefore the similarity criteria for matching of the distances should be selected according to the selected grid values on the design surface. In the matching process, first a large grid value is selected for the design surface to evaluate the distance constraints with loosely defined similarity criteria to eliminate non-feasible regions. Then the remaining regions of the design surface are further discretized with smaller grid value (e.g., 20% of the previous grid value) for matching the distances with tighter similarity criteria. Suppose that the maximum manufacturing process error is ±A and the maximum measurement process error is ±B; then it is reasonable to select the grid value on the design surface to be larger than A + B to avoid influences of these errors in searching for the corresponding points on the design surface. 2.3. Alignment of the target measurement points to their corresponding points on the design surface When four pairs of corresponding points are obtained, the coordinate system alignment is then conducted as illustrated in Fig. 8. The four target measurement points are shown with stars in Fig. 8. These points are connected together to form a tetrahedron. Each of the connecting lines in Fig. 8 is associated with a distance between two target measurement points. The corresponding points on the design surface are shown with dots in Fig. 8 and they are connected to form another tetrahedron where the six edges are associated with the six distances among the corresponding points on the design surface. As shown in Fig. 8, the transformation matrix Tr can be used to align the measurement coordinate system to the design coordinate system. The transformation matrix Tr can be obtained by matching the four corresponding pairs of points as follows [16]:



Tr = Q

(c ) (t )T

Q



(t ) (t )T

Q Q

−1

(4)

where Q(t ) and Q(c ) are the matrices of homogeneous coordinates of the target measurement points and their corresponding points on the design surface respectively in the following form:



(λ)

x1

 (λ) y1 z (λ)

Q(λ) = 

1

1

(λ)

x2

(λ)

y2

(λ)

(λ)

x3

(λ)

y3

(λ)

z2

z3

1

1

(λ) 

x4

(λ) 

y4  (λ) z4 



1

4 ×4

(5)

where λ represents either t for target measurement points or c for corresponding points on the design surface. 3. Robust fine localization to align measurement points on the manufactured surface with the design surface Fine localization is the process to finalize the matching between the measurement coordinate system and the design coordinate system. In this section, first the details of fine localization process are introduced. Then the uncertainties of the coordinates of finely localized measurement points are obtained. The selection of the optimal design coordinate system is subsequently discussed to minimize the uncertainties of the finely localized measurement points. The framework of the robust fine localization is provided in Fig. 9 [17]. 3.1. Fine localization to align measured points on the manufactured surface with the design surface In this work, the fine localization process is conducted using the iterative closest point (ICP) method. Suppose that n measured points are digitized on a manufactured surface and then roughly localized towards the design surface. The homogeneous form of the coordinates of the roughly localized measurement points is described by a matrix:



(r )

x1

 (r ) y1 z (r )

P(r ) = 

(r )

..

x(nr )

(r )

..

(r )

.. ..

y(nr ) 

x2

y2

1

z2

1

1



  z (r ) 

.

(6)

n

1

4×n

The finely localized measurement points can be obtained by transforming the roughly localized measurement points from the roughly localized coordinate system to the design coordinate system as follows: P(f ) = P(d) + ε = Tf P(r )



cy cz  cz sx sy + cx sz = −cx cz sy + sx sz 0

−cy sz −sx sy sz + cx cz cx sy sz + cz sx 0

sy −cy sx cx cy 0



dx dy  ( r ) P dz  1

(7)

where P(r ) is the 4 × n matrix defined in Eq. (6), P(f ) is the 4 × n matrix with coordinates of the finely localized measurement points, P(d) is the 4 × n matrix with coordinates of the normal projections of the finely localized measurement points on the design surface, cλ and sλ stand for cos(θλ ) and sin(θλ ) where θλ is the rotation angle about the λ (i.e., X , Y or Z ) axis, ε is the matrix of residual errors between the finely localized measurement points and their closest points on the design surface in X , Y and Z directions, and Tf is the 4 × 4 transformation matrix defined by: Tf = dRx Ry Rz

(8)

96

V. Mehrad et al. / Computer-Aided Design 53 (2014) 90–103

Fig. 9. Framework of robust fine localization for freeform surface inspection.

where Rx , Ry and Rz are the rotation matrices about the X , Y and Z axes, respectively, and d is the translation matrix. Suppose that the sum of squared Euclidean distances between the finely localized measurement points, P(f ) , and their closest points on the design surface, P(d) , is defined as L; then the 6 fine localization transformation parameters, dx , dy , dz , θx , θy and θz , can be obtained based on the orthogonal least squares method by solving the following 6 equations: gj = ∂ L/∂τj = 0,

j = 1, 2, . . . , 6

(9)

where τj represents the j-th fine localization transformation parameter (i.e., τ1 , τ2 , τ3 , τ4 , τ5 and τ6 stand for dx , dy , dz , θx , θy and θz respectively). Each of these 6 equations is a non-linear function of the 6 independent fine transformation parameters. Iterative numerical method can be employed to identify the values of these 6 fine localization transformation parameters to minimize L [8]. 3.2. Estimation of uncertainties of the finely localized measurement points considering uncertainties in rough and fine localization processes In this work, the uncertainties are measured by variances [17]. Based on the relationships between the X , Y and Z coordinates of the i-th roughly and finely localized measurement points given in Eq. (7), the variances of X , Y and Z coordinates of the finely localized measurement points can be calculated by the following equation [18]: (f )

var(λi ) =

2  2  ∂λ(i f ) /∂θx var(θx ) + ∂λ(i f ) /∂θy var(θy ) 2  2  + ∂λ(i f ) /∂θz var(θz ) + ∂λi(f ) /∂ dx var(dx )  2  2 + ∂λ(i f ) /∂ dy var(dy ) + ∂λi(f ) /∂ dz var(dz )  2 + ∂λ(i f ) /∂ x(i r ) var(x(i r ) )  2 + ∂λ(i f ) /∂ y(i r ) var(y(i r ) )  2 + ∂λ(i f ) /∂ zi(r ) var(zi(r ) ),

(f )

(f )

(f )

i = 1, 2, . . . , n (f )

is the variance of the obtained translation value along the λ (r ) axis, and var(λi ) is the variance of λ coordinate of the i-th roughly localized measurement point. var(θλ ) and var(dλ ) can be statistically estimated by repeating the fine localization process. (r ) var(λi ) can be statistically estimated by repeating the rough localization process. In Eq. (10), covariance terms are not considered since their values are either zeros or insignificant compared with the variance terms. All of the terms in Eq. (10) can be expanded by substituting respective coordinates using Eq. (7). For instance, the expanded form of one of the terms is provided in Eq. (11).

∂ x(i f ) /∂θy = −sy cz xi(r ) + sy sz y(i r ) + cy zi(r ) ,

i = 1, 2, . . . , n.

(11)

In this research, the Cartesian location of a finely localized measurement point is assumed to follow a multivariate normal distribution with components of its X , Y and Z coordinates. The variance–covariance for a finely localized measurement point can be described by:

 

(f )

var(xi )

(f )

 (P(i f ) ) = cov(x(i f ) , y(i f ) ) (f )

(f )

cov(xi , zi )

(f )

cov(xi , yi ) (f )

var(yi ) (f )

(f )

cov(yi , zi )

i = 1, 2, . . . , n.

(f )

(f )



(f )

(f )



cov(xi , zi )

cov(yi , zi ) , (f )

var(zi )

(12)

In Eq. (12), since the variance terms are positive and larger than the covariance terms, the sum of the variance terms is selected as a measure to evaluate uncertainty: (f )

(f )

(f )

(f )

Λ(Pi ) = var(xi ) + var(yi ) + var(zi ), i = 1, 2, . . . , n.

(10)

where λi stands for either xi , yi or zi , var(θλ ) is the variance of the obtained rotation angle about the λ axis, var(dλ )

(13)

Eqs. (10)–(13) show that the uncertainty of the i-th finely localized measurement point is a function of coordinates of (r ) (r ) (r ) roughly localized measurement points, xi , yi and zi . Therefore if the values of these coordinates are changed, the variances of the finely localized measurement points will also be changed. For a set of points in the space, when the location and orientation of the coordinate system are changed, the coordinate values of the same points will also be changed. Therefore the uncertainty of finely localized measurement points, which are calculated from the coordinates of the roughly localized measurement points, can be reduced by proper selection of the location and orientation of the coordinate system.

V. Mehrad et al. / Computer-Aided Design 53 (2014) 90–103

3.3. Modification of the coordinate system to reduce uncertainties of the finely localized measurement points In order to summarize the influences of the input uncertainties (i.e., uncertainties of the 6 fine localization transformation parameters and uncertainties of the coordinates of roughly localized measurement points) on the output uncertainties (i.e., uncertainties of the finely localized measurement points), Eq. (13) can be rewritten as follows [17]: (f )

(1)

(2)

+ var(dx ) + var(dy ) + var(dz ) + Ci(4) var(x(i r ) ) (1)

(2)

(3)

(4)

i = 1, 2, . . . , n

(5)

(14)

(6)

where each of Ci , Ci , Ci , Ci , Ci and Ci is a positive coefficient obtained from Eqs. (10) and (13). According to Eq. (14), if these six coefficients get smaller, the sensitivity of the output uncertainty to the input uncertainties will be reduced. Since the input uncertainties are inevitable, when these coefficients are minimized, the fine localization process becomes more robust. The location and orientation of the coordinate system can be selected (f ) such that the Λ(Pi ) in Eq. (14) is minimized. Assume that the original roughly localized coordinate system is modified using the following transformation matrix for robust fine localization: Tm = [Rx (α)][Ry (β)][Rz (γ )]D

(15)

where Tm is the modification transformation matrix for robust fine localization, D is the 3-D translation matrix with translation parameters of Dx , Dy and Dz in X , Y and Z directions, and [Rx (α)], [Ry (β)] and [Rz (γ )] are the rotation matrices with rotational angles of α, β and γ about X , Y and Z axes, respectively. When the original roughly localized coordinate system is transformed into the modified coordinate system, coordinates of the i-th roughly localized measurement point will change from (x(i r ) , y(i r ) , zi(r ) ) to (x(i R) , y(i R) , zi(R) ). Since only the coefficients Ci(1) , (r )

(r )

(3)

(2)

(r )

Ci and Ci in Eq. (14) are functions of xi , yi and zi , their values will be changed in the modified coordinate system as shown in Eqs. (16)–(18) respectively. (1)

Ci

(2)

Ci

(3)

Ci

= ((cx cz sy − sx sz )x(i R) + (−cx sy sz − cz sx )y(i R) − cx cy zi(R) )2 + ((cz sx sy + cx sz )x(i R) + (−sx sy sz + cx cz )y(i R) − cy sx zi(R) )2 , i = 1, . . . , n ( R)

(R)

(R)

(R) 2

= (−cy sz xi − cy cz yi ) + ((−sz sx sy + cx cz )x(i R) + (−sx sy cz − cx sz )y(i R) )2 + ((cx sz sy + sx cz )x(i R) + (cx sy cz − sz sx )y(i R) )2 , i = 1, 2, . . . , n (R)

( R)

(16)

(R) 2

= (−cz sy xi + sy sz yi + cy zi ) + (cy cz sx x(i R) − cy sx sz y(i R) + sx sy zi(R) )2 + (−cx cy cz x(i R) + cx cy sz y(i R) − cx sy zi(R) )2 , i = 0, 1, . . . , n

(17)

(18)

(1)

(2)

(3)

the sum of three coefficients, Ci , Ci and Ci , can be used to represent the uncertainty of the i-th finely localized measurement point:



(1)



Minimize

w.r.t. Dx , Dy , Dz ,α, β, γ

(Ci )

(20) (2)

(3)

where Ci is the sum of three positive coefficients Ci , Ci and Ci based on Eqs. (16), (17), (18) and (19). When the original coordinate system is modified using the 6 coordinate system modification parameters obtained from Eq. (20), the uncertainty of the ith finely localized measurement point due to uncertainties of the coordinates of the roughly localized measurement points and uncertainties of the 6 fine localization parameters can be minimized. The obtained location and orientation of the optimal coordinate system based on Eq. (20) can only minimize the uncertainty of the i-th finely localized measurement point. When n measured points are considered, uncertainty evaluation measures considering all n measured points have to be developed. In this research, two measures are developed considering the worst uncertainty of the finely localized measurement points and the mean uncertainty of the finely localized measurement points. The identification of the coordinate system for robust fine localization considering the worst uncertainty of the finely localized measurement points is defined by: Minimize

w.r.t. Dx , Dy , Dz ,α, β, γ

(Max {C1 , C2 , . . . , Cn }).

(21)

Identification of the coordinate system for robust fine localization considering the mean uncertainty of the finely localized measurement points is defined by: n 

Minimize

w.r.t. Dx , Dy , Dz ,α, β, γ

i=1

n

Ci

.

(22)

First an initial guess for the location and orientation of the modified coordinate system is selected for optimization. The coordinates of the center of gravity for all the particles representing the roughly localized measurement points are used as the initial values for location of this coordinate system, Dx , Dy and Dz . The initial values for three rotation angles α, β and γ are obtained by a step-wise search of different combinations of angles within their upper and lower boundaries. The rotation boundaries about the X and Y axes are obtained such that the modified Z axis has only one intersection point with the measurement surface. The rotation boundary about the Z axis is from 0° to 360°. The obtained initial guesses for the location and orientation of the coordinate system are then used for optimization based on Eq. (21) or Eq. (22) to obtain the 6 coordinate system modification parameters. 4. Case studies

(R)

where xi , yi and zi are the coordinates of the i-th roughly localized measurement point in the modified coordinate system. (1) (2) (3) Since Ci , Ci and Ci are always positive, when equal weighting factors are assumed for var(θx ), var(θy ) and var(θz ),

Ci = Ci

In Eq. (19), since the coordinates of the roughly localized (R) (R) (R) measurement points (i.e., xi , yi and zi ) are functions of the six coordinate system modification variables for robust fine localization (i.e., Dx , Dy , Dz , α, β and γ ), the optimal values of these six coordinate system modification variables can be achieved through optimization to minimize the Ci as follows:

(1)

(3)

Λ(Pi ) = Ci var(θx ) + Ci var(θy ) + Ci var(θz )

+ Ci(5) var(y(i r ) ) + Ci(6) var(zi(r ) ),

97

    + Ci(2) + Ci(3) ,

i = 1, 2, . . . , n.

(19)

The developed method has been applied to two case studies in freeform surface inspection to demonstrate its effectiveness. In the first case study, the geometry of the freeform surface is simple. In the second case study, the geometry of the freeform surface is more complicated and the measured portion of the manufactured surface has a long and narrow shape, making the localization process more challenging. These case studies were conducted on a computer with the CoreTM 2 Duo 2.0 GHz processor and 4 GB RAM.

98

V. Mehrad et al. / Computer-Aided Design 53 (2014) 90–103

(a) Before localization.

(b) After localization.

Fig. 10. Measured points, target points and design surface in case study 1.

(a) Candidate points for the first target point.

(b) Candidate points for the second target point.

(c) Candidate points for the third target point.

(d) Candidate points for the fourth target point.

Fig. 11. Possible corresponding (candidate) points for target points based on curvature similarities in case study 1.

4.1. Case study 1 In the first case study, the design surface was defined by the following equation: Z = 0.2(X + 25) cos(π (X − 75)/120) + 0.4(Y + 24) cos(π (Y − 76)/120) (mm), where X and Y were bounded within [−80, 80] (mm) and [−80, 80] (mm) respectively. X and Y were selected as the input variables, and Z was selected as the output (response) variable. To simulate the measurement process for surface inspection, a sample of 225 measured points were digitized on the design surface. The measurement sample contained a grid of randomly distributed points within four boundaries defined by the following equations: Y = (X + 20)/62 − 19, X = 42 − (Y + 18)/35, Y = X /2 + 32 and X = (Y − 32)/2.55. The X and Y coordinates of the 75 points on the boundaries and 150 points inside these boundaries were created randomly using the low-discrepancy sequence method [19]. The measured points were modified by adding random manufacturing errors with a standard deviation of 0.05 mm and random measurement errors with a standard deviation of 0.01 mm. The obtained points were subsequently transformed from the design coordinate system to the measurement coordinate system by three rotations of 23°, 6° and −35° about Z , Y and X axes, and three translations of −60, −60 and 50 mm in Z , Y and X directions. The design surface and the 225 simulated measurement points are shown in Fig. 10(a). For rough localization, four target points were selected based on the method provided in Section 2.1. The four target points before and after rough localization processes are shown in Fig. 10(a) and (b). In rough localization, first the design surface should be searched to identify the regions with similar curvature characteristics for each target measurement point. For this reason, the design surface was digitized to a grid of size 1 mm in both X and Y directions. The major and minor principal curvatures at each grid point on the design surface were calculated based on the mathematical model of the freeform surface [20]. The major and minor principal

curvatures on the manufactured surface were estimated based on a reconstructed B-spline surface with 10 × 10 control points and uniform knot vectors over the measured points following the methods introduced by Ma and Kruth [21] and Piegl and Tiller [22]. At the beginning, all of the points were considered as possible corresponding points (candidate points) for a target measurement point. When the difference between the curvature of a grid point and the curvature of the target measurement point was larger than max{0.01 × curvature range, 0.15 × curvature value}, the point was eliminated from the list of candidate points for this target point. The program can adjust the curvature similarity criteria to obtain a proper number of candidate points. The regions of design surface with similar curvatures for the four target measurement points are shown in Fig. 11. Then the distances among the four target points on the manufactured surface were calculated. The identified regions with similar curvatures (shown in Fig. 11) were narrowed down by eliminating the points that do not satisfy the distance constraints. The distance criterion was selected such that the difference between the corresponding distances should be smaller than 0.3(XG + YG ), where XG and YG were the grid values on the design surface. The program has the capability to adjust the criteria to avoid too few or too many corresponding points to be created for each target measurement point. The remaining four regions on the design surface contained the corresponding points of the four target points as shown in Fig. 12. The obtained regions were further narrowed down by reducing the grid values of XG and YG on the design surface. The coordinates of the corresponding points were estimated by averaging the coordinates of points in each tiny region. The coordinates of corresponding points obtained through the rough localization process are shown and compared to the ideal coordinates of the corresponding points in Table 1. The CPU time to estimate the curvature properties at measurement points was 195 s. The CPU time for selection of target measurement points, identification of

V. Mehrad et al. / Computer-Aided Design 53 (2014) 90–103

(a) Candidate points for the first target point.

(b) Candidate points for the second target point.

99

(c) Candidate points for the third target point.

(d) Candidate points for the fourth target point.

Fig. 12. Possible corresponding points for target points based on curvature and distance similarities in case study 1.

(a) Coordinate system S0 .

(b) Coordinate system S1 .

(c) Coordinate system S2 .

Fig. 13. Design surface, measurement points and three coordinate systems in case study 1. Table 1 Coordinates of the corresponding points on the design surface achieved in rough localization in case study 1. Coordinates Obtained coordinates of the corresponding points based of target on similar curvatures and points distances (mm)

Coordinates of the ideal corresponding points on the design surface (mm)

Error (mm)

P1

X Y Z

59.4870 60.4429 46.5171

59.4935 60.5714 46.6215

−0.0065 −0.1285 −0.1044

P2

X Y Z

111.9740 60.5987 46.6322

111.9870 60.6494 46.6750

−0.0130 −0.0507 −0.0428

P3

X Y Z

111.4805 123.1896 35.0713

111.7403 123.1948 34.9773

−0.2598 −0.0052

P4

X Y Z

74.3052 102.8779 58.5028

74.4026 103.0390 58.4585

−0.0974 −0.1611

0.0940

0.0443

corresponding points on the design surface and alignment of the two coordinate systems in rough localization was 2.5 s. Rough localization for this case study was also tested using the ICP method, the most popular localization method. The ICP method can only handle the situation where the measurement and design coordinate systems are close. Since the measurement and design coordinate systems for this case study are quite different, the localization process converged to a wrong solution using the ICP method.

The transformation matrix for rough localization was obtained based on Eq. (4) provided in Section 2.3 and the results are shown in the second row of Table 2. The fine localization using ICP method was also conducted and the respective results are shown in the third row of Table 2. The iterations of the fine localization process were continued until the change in sum of squared errors in two consecutive iterations became less than 0.002 (mm2 ). The fine localization was converged after 28 iterations. The computation time for the fine localization process was 88 s. The sum of squared errors between the localized measurement points and their corresponding points on the design surface are also provided for both rough and fine localization processes in Table 2. The obtained translational transformation parameters (i.e., dx , dy and dz ) and rotational transformation parameters (i.e., θx , θy and θz ) for fine localization were assumed to have standard deviations of 0.012 (mm) and 0.012 (°) respectively. The coordi(r ) (r ) nates of the roughly localized measured points (i.e., xi , yi and (r )

zi ) were assumed to have a standard deviation of 0.2 (mm). The fine localization was conducted based on three coordinate systems with different locations and orientations: (1) the original coordinate system, S0 , shown in Fig. 13(a), (2) the modified coordinate system to minimize the maximum uncertainty among the finely localized measurement points, S1 , shown in Fig. 13(b), and (3) the modified coordinate system to minimize the average uncertainty of the finely localized measurement points, S2 , shown in Fig. 13(c). The differences among computation times for fine localization based on the three coordinate systems S0 , S1 and S2 were insignificant.

Table 2 Transformation parameters for rough and fine localization processes in case study 1. Transformation parameters

dx (mm)

dy (mm)

dz (mm)

θx (°)

θy (°)

θz (°)

Sum squared errors between the matched points (mm2 )

Obtained by rough localization Obtained by fine localization Ideal results

−50.0488 −50.0750 −50.0000

59.7725 59.8639 60.0000

60.3480 60.3283 60.0000

34.6034 34.6658 35.0000

−6.1006 −6.1116 −6.0000

−23.2069 −23.2334 −23.0000

16.5697 0.8082 –

100

V. Mehrad et al. / Computer-Aided Design 53 (2014) 90–103

(a) Before localization.

(b) After localization.

Fig. 14. Measured points, target points and design surface in case study 2.

Table 3 The obtained coordinate modification parameters to get the optimum coordinate systems S1 and S2 in case study 1. Coordinate Dx (mm) system

Dy (mm)

Dz (mm)

α (°)

β ( °)

S1 S2

92.0049 86.1241

34.3581 53.7705

37.0967 37.8396

−11.6017 228.4317 −11.7536 241.5921

85.3574 91.2954

γ ( °)

The optimization results to modify the coordinate system S0 to obtain the coordinate systems S1 and S2 are provided in Table 3. When different coordinate systems are used, the nominal values of the 6 obtained transformation parameters in the fine localization process are very similar. However the variances of the finely localized measurement points using the 3 coordinate systems are noticeably different as shown in Table 4. The smallest maximum uncertainties and the smallest mean uncertainties among the measured points and the respective evaluation measures are shown in bold font in Table 4. The results showed a noticeable decrease in the maximum or mean uncertainty among the localized measurement points by modification of the coordinate systems. The six sigma variation boundary around the location of each (f ) (f ) (f ) finely localized measurement point (xi , yi , zi ) can be compared with the design tolerance zone at the location of the cor(d) (d) (d) responding point on the design surface (xi , yi , zi ) in freeform surface inspection. 4.2. Case study 2 In the second case study, the design surface was defined by: Z = −0.25(X + 75) cos(π (X + 75)/40) − 0.167(Y + 75) cos(π(Y + 75)/40) (mm), where X and Y were bounded within [−75.5, 75.5] (mm) and [−76.5, 76.5] (mm) respectively. X and Y were selected as the input variables, and Z was selected as the output (response) variable. To simulate the measurement process for surface inspection, a uniform grid of 217 points (grid of 7 points parallel to the X axis and 31 points parallel to the Y axis) were digitized on the design surface for −0.5 < X < 17.5 and −50.3 < Y < 39.7. The measured points were modified by adding random manufacturing errors with a standard deviation of 0.05 mm and random measurement errors with a standard deviation of 0.01 mm. The obtained points were subsequently transformed from the design coordinate system to the measurement coordinate system by three rotations of 52°, 45° and −45° about Z , Y and X axes, and three translations of −20 mm, −60 mm and 50 mm in Z , Y and

X directions, respectively. The design surface, the 217 simulated measurement points, and the four target points are shown in Fig. 14(a). The four target points on the manufactured surface were selected manually to discuss a special case in which a fifth target point can be added to find a unique match for each target point. The measurement points on the manufactured surface after the localization process and all of the five matched pairs of points are shown in Fig. 14(b). In rough localization, the design surface was digitized to a grid of size 1 mm in both X and Y directions. The major and minor principal curvatures at each grid point on the design surface were calculated based on the mathematical model of this surface. The major and minor principal curvatures on the manufactured surface were estimated numerically based on the gradient calculation function in MATLAB and the method provided by Struik [20]. The curvature similarity criterion was the same as that used in the first case study. The regions of the design surface with similar curvature measures for the four target points are shown in Fig. 15. Then the distances among the four target points on the manufactured surface were calculated. The identified regions with similar curvatures (shown in Fig. 15) were narrowed down by eliminating the points that do not satisfy the distance constraints. The distance similarity criterion was similar to that used in the first case study. The remaining four regions on the design surface contained the corresponding points of the four target points as shown in Fig. 16. From Fig. 16, multiple solutions are identified in the search of the corresponding points on the design surface. This special case rarely happens and can be probably avoided by refining the grid values on the design surface. In this case study, instead of refining the grid values, an additional target point was added to eliminate non-feasible solutions. When the fifth target point was added, the candidate points for each of the five target points were narrowed down to a single position. The corresponding points were then estimated by averaging the coordinates of the remaining points in each tiny region. The coordinates of the corresponding points obtained through rough localization are shown and compared to the ideal coordinates of the corresponding points in Table 5. The CPU time for the estimation of curvature properties at the grid of measurement points was 0.5 s due to the small region of measurement area. The CPU time for selection of target measurement points, identification of corresponding points on the design surface and alignment of the two coordinate systems in rough localization was 3.5 s.

Table 4 The uncertainty measures considering the three different coordinate systems in case study 1. (l)

( l)

(l)

( l)

Coordinate system

Max {Ci }

Max {Λ(Pi )}

Decrease in Max {Λ(Pi )}

Mean {Ci }

Mean {Λ(Pi )}

Decrease in Mean {Λ(Pi )}

S0 S1 S2

5.8236 × 103 3.6431 × 103 5.0185 × 103

0.1502 0.1285 0.1341

– 14.4584% 10.7286%

2.4488 × 103 1.8360 × 103 1.4905 × 103

0.1237 0.1214 0.1212

– 1.7953% 1.9824%

V. Mehrad et al. / Computer-Aided Design 53 (2014) 90–103

(a) Candidate points for the first target point.

(b) Candidate points for the second target point.

(c) Candidate points for the third target point.

101

(d) Candidate points for the fourth target point.

Fig. 15. Possible corresponding points for target points based on curvature similarities in case study 2.

(a) Candidate points for the first target point.

(b) Candidate points for the second target point.

(c) Candidate points for the third target point.

(d) Candidate points for the fourth target point.

Fig. 16. Possible corresponding points for target points based on curvature and distance similarities in case study 2.

Table 5 Coordinates of the corresponding points on the design surface achieved in rough localization in case study 2. Coordinates of selected measured points

Obtained coordinates of the corresponding points based on similar curvatures and distances (mm)

Coordinates of the ideal corresponding points on the design surface (mm)

Error (mm)

X Y Z

5.5000

5.5000

P1

−44.3000 −16.2981

−44.5000 −16.3767

0.0000 0.2000 0.0786

X Y Z

11.5000

11.5000

P2

−44.3000 −15.0564

−44.5000 −15.1349

X Y Z

11.5000 30.7000 −11.2420

12.0000 30.5000 −11.1666

−0.5000

P3

P4

X Y Z

2.5000 6.7000 −32.4982

1.5000 6.5000 −31.8961

1.0000 0.2000 −0.6021

X Y Z

5.5000 30.7000 −12.4837

6.0000 30.5000 −12.4084

−0.5000

P5

0.0000 0.2000 0.0785 0.2000

−0.0754

0.2000

−0.0753

Table 6 Transformation parameters for rough and fine localization processes in case study 2. Transformation parameters

dx (mm)

dy (mm)

dz (mm)

θx (°)

θy (°)

θ z (° )

Sum squared errors between the matched points (mm2 )

Obtained by rough localization Obtained by fine localization Ideal results

−50.8793 −49.5870 −50.0000

61.0369 60.3446 60.000

20.7803 19.5960 20.0000

44.2160 43.4843 45.0000

−49.8451 −44.5186 −45.0000

−60.0429 −51.4773 −52.0000

121.5320 4.1646 –

Rough localization for this case study was also tested using the ICP method, the most popular localization method. The ICP method can only handle the situation where the measurement and design coordinate systems are close. Since the measurement and design coordinate systems for this case study are quite different, the localization process converged to a wrong solution using the ICP method.

The transformation matrix for rough localization was obtained based on Eq. (4) provided in Section 2.3, and the results are shown in the second row of Table 6. The fine localization using the ICP method was also conducted and the respective results are shown in the third row of Table 6. The iterations of the fine localization process were continued until the change in sum of squared error in two consecutive iterations became less than 0.03 (mm2 ). The fine

102

V. Mehrad et al. / Computer-Aided Design 53 (2014) 90–103

(a) Coordinate system S0 .

(b) Coordinate system S1 .

(c) Coordinate system S2 .

Fig. 17. Design surface, measurement points and three coordinate systems in case study 2.

Table 7 The obtained coordinate modification parameters to get the optimum coordinate systems S1 and S2 in case study 2. Dz (mm)

α (°)

β (°)

γ (°)

Coordinate system

Dx (mm)

Dy (mm)

S1 S2

8.9532 8.3608

−5.0014 −5.2351 −35.4274 7.6985 349.5369 −5.3609 −14.8608 35.4274 −3.7067 182.9092

Similar to the first case study, the six sigma variation boundary around the location of each finely localized measurement point (x(i f ) , y(i f ) , zi(f ) ) can be compared with the design tolerance zone at the location of the corresponding point on the design surface, (x(i d) , y(i d) , zi(d) ), for tolerance verification in the freeform surface inspection process. 4.3. Experimental evaluation

localization was converged after 55 iterations. The computation time for the fine localization process was 189 s. The sum of squared errors between the localized measurement points and their corresponding points on the design surface for rough and fine localization processes are also provided in Table 6. Due to the high aspect ratio of the measured portion of the manufactured surface, the uncertainties of the localized measurement points were expected to be larger than those in the first case study. Therefore the obtained translational transformation parameters (i.e., dx , dy and dz ) and rotational transformation parameters (i.e., θx , θy and θz ) for fine localization were assumed to have standard deviations of 0.02 (mm) and 0.02 (°) respectively. The co(r ) (r ) ordinates of the roughly localized measured points (i.e., xi , yi (r )

and zi ) are assumed to have a standard deviation of 0.25 (mm). The fine localization was conducted based on three coordinate systems with different locations and orientations: (1) the original coordinate system, S0 , shown in Fig. 17(a), (2) the modified coordinate system to minimize the maximum uncertainty among the finely localized measurement points, S1 , shown in Fig. 17(b), and (3) the modified coordinate system to minimize the average uncertainty of the finely localized measurement points, S2 , shown in Fig. 17(c). The differences among computation times for fine localization based on the three coordinate systems S0 , S1 and S2 were insignificant. The optimization results to modify the coordinate system S0 to obtain the coordinate systems S1 and S2 are provided in Table 7. When different coordinate systems are used, the nominal values of the 6 obtained transformation parameters in the fine localization process are very similar. However the variances of the finely localized measurement points using the 3 coordinate systems were noticeably different as shown in Table 8. The smallest maximum uncertainties and the smallest mean uncertainties among the measured points and the respective evaluation measures are shown in bold font in Table 8. The results showed a significant decrease in the maximum or mean uncertainty among the localized measurement points by modification of the coordinate systems.

The developed method has also been tested through experiment. After machining of the freeform surface, a sample of points was collected on the manufactured surface. Then the collected measurement points were successfully localized with the design surface defined by: Z = (0.012)X + 6 sin(0.07X + 3.185) + (0.036X + 1.638) cos(−0.1Y − 4.55) + 0.006(Y + 45.5)2 − 4.8 × 10−5 (Y −45.5)3 −10.708 (mm), where both X and Y were bounded within [−45, 45] (mm). X and Y were selected as the input variables, and Z was selected as the output (response) variable. The designed surface was machined on HAAS Mini Super Mill CNC machine tool through rough and fine machining steps. In order to inspect the geometric accuracy of the manufactured surface, a uniform grid of 10 × 10 measurement points was digitized on the manufactured surface for −40 ≤ X ≤ 41 and −40 ≤ Y ≤ 41. The coordinates of measurement points were acquired using Renishaw OMP40-2 touch trigger probe with a M4 Ruby probe stylus (6 mm diameter). This probe was installed on the machine tool spindle using a CAT40 shank adapter. When the probe touches the surface, the touch detection sensor inside the probe sends the touch signal to the light indicators using an OMI-2 transmitter. During the measurement process, first the probe center location was identified and saved in machine tool computer by touching the probe to the flat datum planes at top and two perpendicular sides of the manufactured part. Collection of the measurement points on the manufactured surface was subsequently conducted. The probe was first located above the surface to avoid collision. Then the probe was moved in X and Y directions to the desired measurement location (X , Y ) and subsequently moved downward to measure the Z coordinate. The experimental setups for machining and measurement of the freeform surface are illustrated in Fig. 18. 5. Discussions on computation efficiency Many factors influence the computation efficiency for rough localization and fine localization. The major influencing factors are summarized as follows:

Table 8 The uncertainty measures considering the three different coordinate systems in case study 2. (l)

Max {Λ(Pi )}

Coordinate system

Max {Ci }

S0 S1 S2

5.8236 × 10 3.6431 × 103 5.0185 × 103 3

0.2713 0.2110 0.2266

( l)

( l)

Decrease in Max {Λ(Pi )}

Mean {Ci }

– 22.23% 16.50%

2.4488 × 10 1.8360 × 103 1.4905 × 103 3

(l)

Mean {Λ(Pi )}

Decrease in Mean {Λ(Pi )}

0.1977 0.1915 0.1909

– 3.11% 3.45%

V. Mehrad et al. / Computer-Aided Design 53 (2014) 90–103

(a) Machining.

103

(b) Measurement.

Fig. 18. Experimental setups for machining and measurement of a part with freeform surface.

Major influencing factor on computation efficiency for rough localization

• The method to estimate curvatures of measurement points. In









this work, since a B-spline surface is reconstructed to estimate the curvatures at the measurement points, this method takes considerable time. The number of measurement points. This factor influences the time required for the estimation of curvatures at these measurement points and the time required for automated selection of target measurement points. The number of target measurement points. This factor influences the number of the distance constraints and the time to search for the candidate corresponding points on the design surface. The initial grid value for the design surface and its reduction rate for sub-division of surface. These factors influence the time to search for the corresponding points on the design surface. Initial similarity criteria on curvature and distance constraints and their reduction rates for convergence of computation. These factors influence the time to search for the corresponding points on the design surface.

Major influencing factor on computation efficiency for fine localization

• The number of measurement points. For each iteration in the ICP localization method, the closest points of all the measurement points on the design surface need to be identified. • The convergence stopping criteria. The number of iterations in the ICP localization method is determined by the convergence stopping criteria. 6. Conclusions New methods have been developed in this research to improve the robustness in rough and fine localization processes to align the measurement points in the measurement coordinate system with the design surface in the design coordinate system for freeform surface inspection. Characteristics of this research are summarized as follows. 1. By using the similarities between the distances of the target measurement points and the distances of their corresponding points on the design surface in addition to the similarities in major and minor curvatures, the rough localization process is more robust to the errors introduced in the manufacturing and measurement processes. 2. By selecting the optimal design coordinate system, uncertainties of the localized measurement points can be minimized to improve the robustness for fine localization.

Acknowledgment The authors would like to thank the Natural Sciences and Engineering Research Council (NSERC) of Canada for providing financial support to this research through its CANRIMT (Canadian Network for Research and Innovation in Machining Technology) Strategic Network Program. References [1] Li Y, Gu P. Free-form surface inspection techniques state of the art review. Comput-Aided Des 2004;36:1395–417. [2] Zhu LM, Luo HG, Ding H. Optimal design of measurement point layout for workpiece localization. Trans ASME, J Manuf Sci Eng 2009;131. [3] Mehrad V, Xue D, Gu P. Inspection of freeform surfaces considering uncertainties in measurement, localization and surface reconstruction. Meas Sci Technol 2013;24. [4] Yamany SM, Farag AA. Surface signatures: an orientation independent freeform surface representation scheme for the purpose of objects registration and matching. IEEE Trans Pattern Anal Mach Intell 2002;24:1105–20. [5] Ko KH, Maekawa T, Patrikalakis NM. An algorithm for optimal free-form object matching. Comput-Aided Des 2003;35:913–23. [6] Li Y, Gu P. Automatic localization and comparison for free-form surface inspection. J Manuf Syst 2006;25:251–68. [7] OuYang DS, Feng HY, Jahangir NA, Song H. Robust initial matching of free-form objects represented by point clouds. Trans ASME, J Manuf Sci Eng 2012;13. [8] Besl PJ, McKay ND. A method for registration of 3-D shapes. IEEE Trans Pattern Anal Mach Intell 1992;14:239–56. [9] Li ZL, Xu Z, Cen MY, Ding XL. Robust surface matching for automated detection of local deformations using least-median-of-squares estimator. Photogramm Eng Remote Sens 2001;67:1283–92. [10] Sharp GC, Lee SW, Wehe DK. ICP registration using invariant features. IEEE Trans Pattern Anal Mach Intell 2002;24:90–102. [11] Orazi L, Tani G. Geometrical inspection of designed and acquired surfaces. Int J Adv Manuf Technol 2006;34:149–55. [12] Che C, Ni J. A generic coordinate transformation uncertainty assessment approach and its application in machine vision metrology. Int J Mach Tools Manuf 1998;38:1241–56. [13] Yan Z, Menq CH. Uncertainty analysis and variation reduction of threedimensional coordinate metrology—part 2: uncertainty analysis. Int J Mach Tools Manuf 1999;39:1219–38. [14] Poniatowska M. Determining the uncertainty of fitting discrete measurement data to a nominal surface. Metrol Meas Syst 2008;15:595–606. [15] Duckham M, Kulik L, Worboys M, Galton A. Efficient generation of simple polygons for characterizing the shape of a set of points in the plane. Pattern Recognit 2008;41:3224–36. [16] Huang X, Gu P, Zernicke R. Localization and comparison of two free-form surfaces. Comput-Aided Des 1996;28:1017–22. [17] Mehrad V, Xue D, Gu P. Robust localization for freeform surface inspection. In: Proceedings of the 2nd international conference on virtual machining process technology. VMPT 2013. 2013. [18] Meyer SL. Data analysis for scientists and engineers. New York: Wiley; 1975. [19] Niederreiter H. Random number generation and quasi-Monte Carlo methods. Philadelphia: Society for Industrial and Applied Mathematics; 1992. [20] Struik DJ. Lectures on classical differential geometry. 2nd ed. Toronto: Dover Publications; 1988. [21] Ma W, Kruth JP. Parameterization of randomly measured points for least squares fitting of B-spline curves and surfaces. Comput-Aided Des 1995;27: 663–75. [22] Piegl LA, Tiller W. The NURBS book. New York: Springer-Verlag; 1997.