SAMPLE SIZE PLANNING AND EVALUATION OF PROFILE ERRORS USING COORDINATE MEASURING MACHINE Sung Ho Chang Gary D. Herrin Department of Industrial & Operations Engineering The University of Michigan Ann Arbor, Michigan 48109-2117 February 1991 Technical Report 91-5

ABSTRACT The definitions of profile errors in the current standards are based on the usage of functional gauging systems and are not for discrete sampling systems such as a coordinate measuring machine (CMM). Methods have been developed for the statistical evaluation of form and profile errors using a CMM. Practical mathematical definition of profile error has been proposed which are consistent with the current standards and can be used for both continuous and discrete measurements. Minimum sample sizes and estimation method for profile error with a certain level of error have been developed for a surface patch and a surface with arrays of contiguous patches. The proposed sample sizes and estimating method have been tested by simulation and by measuring actual manufactured part. 2

1. Introduction Doubly curved surfaces appear frequently in design and development of dies and molds used in the manufacture of automobiles, ships, aircrafts, sheet-metal parts, plastic parts and many industrial products. These surfaces are not, in most cases, explicitly defined. Only discrete x, y and z data points on the surface are measured at the nodes of a quadralateral grid using a coordinate measuring device such as a coordinate measuring machine. Most of the available surface fitting algorithms are concerned with accurately passing surfaces through these points. However, in the assembly of sheetmetal parts, the profile error must be accurately determined to fit each other part. A profile is the outline of an object in a given plane (two dimensional figure). Profiles are formed by projecting a three dimensional figure onto a plane or by taking cross sections through the figure. The profile tolerance specifies a uniform boundary along the true profile within which the elements of the surface must lie (ANSI Y14.5). It is desired to develop a mathematical technique to evaluate the profile error accurately and efficiently. Even though formal definitions of profile errors are given in current standards (ISO 1101 and ANSI Y14.5), these definitions are based on the usage of functional gauge and are not for the discrete measuring devices such as a coordinate measuring machine. As a result they did not specify how many points are needed to evaluate profile errors and how to interprete the discrtements' results. To compensate for these limitations in the standards, it is current practice to estimate profile errors as the sum of the algebraic maximum and minimum deviations from discrete measurements. These deviations are obtained from estimated surfaces. These surfaces are estimated by the various methods [ElMaraghy, Wu and ElMaraghy (1989), Shunmugam (1987, 1986), Fukuda and Shimokobe (1984), Murthy (1982), Murthy and Abdin (1980), Kakino and Kitazawa (1978), Gota and Lizuka (1977)]. However, those approaches are limited to the special surfaces or curves such as straight line, flat plane, circle, and cylinders. Also these estimated surfaces vary or change depending on the number of discrete (sample) measurements. Because current practice does not consider the uncertainty of manufactured surfaces, it is not possible to give statistical confidence to 3

the estimated profile errors or to suggest statistically reliable minimum sample points. Sample size planning were proposed by the various methods [Chang et. al (1990), Chang and Herrin (1991), Menq et. al (1990), and Menq and Yau (1991)]. Those approaches suggested the approapriate sample sizes. While Chang et. al [1990,1991] considered the characteristics of concerned surface, Menq [1990,1991] did not consider the difference between concerned surfaces. Then, Menq [1990,1991] gave the same sample size regardless of the concerned surface. When we classify the surface into two cases such as single patch surface and a combination of patches, the minimum number of points to calculate profile errors is straight forward. As an example, a minimum of seventeen points are necessary to get a single patch profile error when the surface is represented by parametric bi-cubic surface. Sixteen points are used to estimate a surface and one point is used to get the information about the uncertainty of the estimated surface. However, there are no surfaces or curves whose uncertainty information can be explained by one point. Therefore, the theoretical minimum number of seventeen points are not enough to obtain information about profile error. Additional measurements are needed to get statistically reliable information. By establishing a statistically reliable minimum, the manufacturer does not have to measure an inordinate number of points. In previous case, we use the approach that estimates surface to evaluate profile error. However, when the surface shape is complicated it is represented by the combination of many patches which are represented by the parametric representation in current CAD system. Then, we cannot get explicit single representation of whole surface while we have explicit parametric representation of each patch. Therefore, at least one measurement should be collected from patch to have information about the variation of each patch profile. By comparing the variation of each patch profile to the given profile tolerance zone width, we can make a decision whether the considered surface satisfies the profile tolerance or not. When the considered surface does not satisfy the given tolerance, we can find which patch generates unexpected variation. In the following section, the proposed new definitions of profile error is presented. Then, the proposed approach to determine the sample size for 4

a single patch estimation based on the maximum prediction interval is introduced. The approach to determine the sample size for a surface with arrays of contiguous patches are presented. The obtained sample sizes are tested by simulation study. 2. Proposed Definition If it is assumed that manufacturing process is noisy, then the deviations of the product surface from the nominal (designed) product surface can be expected to follow a normal distribution [Greenwood and Williamson (1966)]. A nominal surface is the intended surface contour which is usually shown and dimensioned on a drawing or descriptive specification. Theoretically, normal distributions have no finite minimum or maximum values. However, such large values are not found among the deviations. Practically, most of the data values lie within +3a (standard deviation) of the nominal surface and these are the range from +3a to -3a, called the range of natural tolerance limits. If a profile error is defined as 6a, then this range can contain all the elements of a manufactured surface from a practical point of view. Therefore, this range satisfies the definition of the standard (ISO 1101). Accordingly the following definition which can be applied to profile error is proposed. Profile envelope is the largest 6a or the largest range of natural tolerance limits among all the concerned dimensions when the deviations from each parametric representation of nominal curve or surface follow a Normal distribution. Because the exact value of the standard deviation is not usually known, the standard deviation is estimated from a sample. When the sample size is large enough to be considered a continuous measurement, the estimated standard deviation can be used to obtain profile error. The estimated standard deviation is, however, a random variable. When the sample size is small, the estimated profile error could vary depending on sample size and the profile error can be under or overestimated. This problem will be considered in the later section. 5

3. Maximum Prediction Interval Approach for Single Patch The estimated standard deviation or surface shape parameter values can be simply used to obtain profile error without considering statistical confidence. However, the variations of the real nominal surface and the probability of parameter estimations will not be known. Therefore, a prediction interval length that considers the variation of real nominal surface and the variation of parameter estimation is used. The prediction interval length (PI) can be represented by the function of the sample size, a specified point and an estimated standard deviation in general linear regression analysis. PI = 2*t(n-p,l-a)*{l + h(n,P0))* MSE where t(n-p,l-a): upper (1-a) percentage point of t-distribution with (n-p) degrees of freedom h(n,Po): function of sample size n and a specified point Po MSE: estimated variance. When a certain PI, with given sample size n, confidence level (1-a) and MSE, is approximately equal to 6a, it can be an estimated form error. The bands of the PI, however, are curvilinear and our objective is to find maximum bands which cover the maximum variations of the nominal surface and its estimation. The maximum PI is chosen at a given sample size (Fig. 1). However, the interval estimate of the PI is a random variable because the sample standard deviation (or IMSE) is a random variable. The expected prediction interval is compared to 6a. PI at that sample size can be an estimation of profile error when the e txpected length of the maximum prediction interval, at a certain sample size with a certain confidence level, is approximately equal to 6a. 6

Y., Prediction Interval Bands;'~ Estimated Line,.****1<1111^J^^'-oliv..Iol"!!a " -^ "',,.~"1"1 Maximum Prediction,',,,,,,,,,,,11,11, Interval Bands P I I o" xl x2 Figure 1 Illustration of Maximum Prediction Interval Bands The statements above can be represented in mathematical terms as follow; PI(Po) = 2 * tnp,l 1-/2 1 + ( /MSE (5) where PI(PO): length of prediction interval at Po PO: specified column vector of P' P: observation design matrix MSE: estimated variance of least square residuals p: # of parameters estimated a: confidence level. Since the residual error variance (MSE) follows a Chi-square distribution, the expected length of the prediction interval (E[PI]) can be represented as follows E[PI] = 2 tnp, 2 (l+h(n,Po))1/2 E[n-p] (6) n-p [n-] where h(n,Po) =P0' (P'p)-1 Po E[Xn-p] = F[(n-p+)/2] 42 (See Appendix A) = [(n-p)/2] r(n) = Gamma function 00 = Jxn-le dx. If E[PI] = 6cy, the appropriate sample size needed to estimate the profile error when the confidence level is given can be determined. Or, the appropriate confidence level can be determined when the sample size is given which satisfies 7

tnpa/2 h(nPo) n =3. (7) The most general way of expressing the continuous equation of a three dimensional curve or surface in mathematical form is in parametric terms. In parametric form the degrees of freedom are represented by two independent variables, or parameters, u and v. The algebraic form of a parametric general bicubic surface is given by the following polynomials in vector form [Mortenson (1985)]: p(u,w) = a33 u3w3 + a32 u3w2 + a31 u3w + 30 u3 + a23 u2w3 + a22 u2w2 + a2 u2w + a20 u2 + a13uw3 +a12uw2 + alluw+a 0u + a3 w3 + a2 2 + a w + a00o. (8) By constructing the observation design matrix and obtaining maximum prediction interval, we can get the appropriate sample sizes as 28 (4 by 7) and 256 (16 by 16) with 95% and 99% confidence respectively for single patch surface. 4. Sample Size for a Surface with Arrays of Contiguous Patches Profile error of a surface with arrays of contiguous pataches is more practical problem rather than single patch profile error problem. Sample size determination is necessary even though it is difficult to determine theoretically. We define that the profile error is 6a in previous section when we assume that the deviations from the true profile follow a normal distribution. When we obtain the deviations from the true profile of the considered surface by a CMM, the profile error for each patch can be estimated by sample standard deviation. However, sample standard deviation (s) is not an unbiased estimator of a while sample variance (s2) is an unbiased estimator as follow: n i=1 s2 n - n-1 8

where ei: deviations from true profile n: # of measurements in each patch n i=l S= nE(s2) = 02 2 11/2 F[n/2] n-1 r[(n-1)/2] where F(n) = Gamma function 00 = J xn-1 e-x dx. Therefore, we cannot simply estimate patch profile error by multiplying 6 to the sample standard deviation. Instead we multiply by 6 2 1/2 14n/2] and divided by the constant, (n- 1) [(n-)/2]' to estimate patch profile error. Then, we can obtain the estimated profile error without considering confidence level. However, when we consider the confidence level, the standard deviation of the sample standard deviation s. That is 1 - c2, where c = (-1/2) [(n1/2] Theoretically, the desired sample size with -"1 F[(n-1)/2] ' high confidence level is too large. As an example almost 200 measurements are needed for 99% confidence. Consequently, the theoretical sample size cannot be used as a useful practice for CMM users. As an alternative approach we propose heuristic method by simulation. For simulation study we use normal random numbers as deviations from true profile. We generated 5000 different sets of normal random numbers with mean zero and standard deviation 0.001 for each sample size from 2 to 25. Then we assumed that the true profile error was 0.006. We estimate profile errors for each different sample sizes by 9

(9) 6.s/{( 112 F[n/2] - rF[(n-1)/2] where s: sample standard deviation n: sample size Average of estimated profile errors was calculated for each sample size. estimated profile error - true profile error Also relative error, true profile error was true profile error calculated. These average values of the estimated profile errors and relative errors are shown in Table 1. The estimated profile errors were decreased and close to real profile error when the sample size was increased (Fig. 2). From these results we can choose the desired sample size depending on the relative error rate. As an example when the desired error rate is not more than 5%, minimum sample size will be 10 for each patch. Therefore, total sample size for a surface with arrays of contiguous patches will be multiplication of minimum sample size for a patch by the number of patches on a surface. Actually this proposed sampling plan is based on random sample. However, it will be easy for CMM measuring procedure that the sampled points are equally distributed on a patch. Also we recommend 16 points for each patch because the estimation of 16 coefficients is required for the construction of a bi-cubic surface. A bi-cubic surface is a most widely used surface in practice. When a surface with arrays of contiguous patches is constructed, the boundaries of each patch should satisfy the condition of continuity. Therefore, when we measure 16 points in a patch, 12 points on the patch boundaries can be shared with adjacent patches (Fig. 3). Consequently actual total measuring points are reduced. 10

_ Sample Size Estimated Profile Error Relative Error (%) 2 0.0096 60.0 3 0.0077 28.3 4 0.0071 18.3 5 0.0068 13.3 6 0.0066 10.0 7 0.0065 8.3 8 0.0064 6.7 9 0.0064 6.7 10 0.0063 5.0 11 0.0063 5.0 12 0.0063 5.0 13 0.0062 3.3 14 0.0062 3.3 15 0.0062 3.3 16 0.0062 3.3 17 0.0062 3.3 18 0.0062 3.3 19 0.0062 3.3 20 0.0061 1.7 21 0.0061 1.7 22 0.0061 1.7 23 0.0061 1.7 24 0.0061 1.7 25 0.0061 1.7 Table 1 Estimated Profile Error and Relative Error 0.010 '4 I! 0.009 0.008 0.007 0.006 0.005 0 5 10 15 20 25 30 Sample Size Figure 2 Estimate Profile Errors depending on Sample Size 11

*: Measured Point Figure 3 Recommended Measuring Points 5. Evaluating Profile Error for a Surface with Contiguous Patches The profile error of a surface can be determined based on the estimated profile errors of each patch. The profile tolerance specifies a uniform boundary along the true profile within which the elements of the surface must lie (ANSI Y14.5). Therefore, estimated profile errors of each patch should satisfy the surface profile tolerance because each patch is one element of the surface. We define the surface profile error as follow based on estimated profile errors of patches The surface profile error is the largest value among the consisted patch profile errors. When all the estimated profile errors of each patch are less than a surface profile tolerance, we can say that the surface profile error satisfies the tolerance. When any of the estimated profile errors of each patch is greater than a surface profile error, we can say that the surface profile error does not satisfy the tolerance. When the surface profile error does not satisfy the tolerance, we can find the cause area of out of specification by observing the estimated profile errors of each patch. Evaluation of profile error of a surface was tested by simulation. Let a surface be consisted of four patches shown in Fig. 4 and its profile 12

tolerance be given as 0.09 (Fig. 5). We used four different random normal number sets of size 16 for each patch. Sample size 16 was used because the desired relative error rate was assumed less than 5%. Random normal number sets with mean zero and standard deviations 0.010, 0.013, 0.012, and 0.011 for patch 1, patch 2, patch 3, and patch 4 respectively were generated. We assume these generated numbers were the deviations from each patch. From these numbers (Table 2) we estimated profile errors of each patch and compared with the surface tolerance (Table 3). From Table 3 results we can say that the surface profile error was 0.085 and it was intolerance. Even though surface profile error should be 0.078 (0.013*6) theoretically, when we consider the relative error rate as 5% (0.078*1.05 = 0.082), the obtained value is reasonable. Figure 4 Simulated Surface consisted of Four Patches ' True Profile Figure 5 Profile Tolerance Boundaries of the Simulated surface 13

Measurement Number Patch 1 Pach 2 Patch 3 Patch 4 1 0.004 -0.015 0.017 0.006 2 0.006 -0.013 0.023 0.002 3 -0.008 -0.007 0.003 -0.012 4 -0.010 -0.007 -0.009 0.006 5 -0.005 0.019 -0.007 -0.004 6 0.011 0.003 -0.013 0.003 7 -0.002 -0.001 -0.015 0.024 8 0.017 -0.031 0.025 0.012 9 0.032 0.007 0.011 -0.005 10 -0.006 0.022 0.021 0.004 11 0.009 -0.020 0.012 -0.009 12 0.006 -0.001 -0.005 0.021 13 0.006 -0.009 -0.001 0.003 14 -0.002 -0.011 -0.014 -0.009 15 0.005 -0.021 0.004 0.008 16 0.015 0.008 0.001 0.019 Standard Deviation 0.011 0.014 0.014 0.011 Table 2 Measured Values for each Patch and Standard Deviation Patch Profile Error = 6*Standard Deviation/(-K) r1/ 5/2] Table 3 Patch Profile Error Comparison to Surface Profile Tolerance for InTolerance Case As a second simulation test, we changed the generated random normal numbers for patch 2 with mean zero and standard deviation 0.018 (Table 4). Estimated profile error of patch 2 was 0.122 and the surface profile was decided by 0.122. Because of this patch, the surface was decided as out-of-tolerance (Table 5). Generated Values for Patch 2 -0.021 0.026 0.010 -0.012 -0.018 0.004 0.033 -0.015 -0.009 -0.002 -0.031 -0.029 -0.010 -0.042 -0.001 0.011 Standard Deviation 0.020 Table 4 Generated Values for Patch 2 in Out-of-Tolerance Case 14

Surface Patch 1 Profile Patch 1 Profile Patch 1 Profile Patch 1 Profile Tolerance Error Error Error Error 0.09 0.067 0.122 0.085 0.067 2 1/2 148] Patch Profile Error = 6*Standard Deviation/{(-) T15/2] Table 5 Patch Profile Error Comparison to Surface Profile Tolerance for Out-of-Tolerance Case For a reduced sample size case, we share the measurements with adjacent patches. Random normal number sets with mean zero and standard deviations 0.10, 0.13, 0.12, and 0.11 for patch 1, patch 2, patch 3, and patch 4 respectively were generated. Shared measurements were generated with mean zero and average standard deviation value of adjacent standard deviations. In other words, 0.0115 for patch 1 and patch 2, 0.0125 for patch 2 and patch 3, and 0.0115 for patch 3 and patch 4 were used as standard deviation to generate random normal numbers. These values and estimated standard deviation values are shown in Table 6. Each patch profile error was estimated and was compared to surface profile tolerance (Table 7). From these results we can say that the surface profile error was 0.085 and it was in-tolerance. Measurement Number Patch 1 Pach 2 Patch 3 Patch 4 1 0.004 -0.015 0.017 0.006 2 0.002 -0.010 -0.006 0.003 3 -0.007 0.007 -0.006 0.016 4 0.002 -0.014 0.004 -0.002 5 0.017 -0.028 0.023 0.012 6 -0.005 -0.008 0.022 0.020 7 0.010 -0.011 0.008 0.000 8 -0.007 -0.001 0.003 -0.003 9 0.005 0.007 -0.005 0.008 10 0.017 -0.012 -0.023 0.014 11 0.002 -0.007 0.003 -0.002 12 0.005 -0.001 -0.003 -0.005 13 0.007 0.024 0.024 -0.005 14 -0.012 -0.015 -0.015 -0.023 15 -0.007 0.008 0.008 0.003 16 -0.001 0.024 0.024 -0.003 Standard Deviation 0.008 0.014 0.014 0.010 Table 6 Measured Values for each Patch shared and Standard Deviation with Adjacent Patches 15

Surface Patch 1 Profile Patch 1 Profile Patch 1 Profile Patch 1 Profile Tolerance Error Error Error Error 0.09 0.049 0.085 0.085 0.061 Patch Profile Error = 6*Standard Deviation/((-) rl25/2] Table 7 Patch Profile Error Comparison to Surface Profile Tolerance for sharing measurements with Adjacent Patches 6. Conclusion In this paper we proposed sampling planning and evaluation procedure of a surface profile error. A concerned surface was a single patch and was consisted of arrays of contiguous patches. Because of complex characteristic of this surface, theoretical sampling plan is not practical. Therefore, we proposed new sampling plan based on heuristic simulation results. Even though this sampling plan did not give the exact value of a surface profile error, it gave the reasonable estimation within the considered relative error rate. The results of this paper can be utilized for practical sampling plan in CMM users practice. Further investigation will be needed for more theoretical basis. Appendix A. Expectation of Xk The probability density function of 2 distribution is k k x I 1L 2 1 2 2 f(x)= (2) x e r( ) The expectation of Xk can be calculated by substituting \x into x in applying the definition of expectation, 00 k k x E[x] = Hx- 11 2 2'1 'x t(~)x2 e dx 16

00 k k 1 x 1 1 2 2 2 2 = I k (2) x e dx J 0 oo k k+l x 1 1) 2 2 ' 2 | r() x e dx J 2 00 k+l k+l k+l 1 2 2 2'2 1 2 )2 x2 e 2 )dx IF() 2 k+1 2 1 2 - 2 r( ) J 2 2 k+l k+l x 1 12 2 -1 2."k+l x e dx ( 2 k2) k+l 1 r(2 1 2 k (2) l2' 17

References American National Standard Institutes (ANSI Y14.5M-1982) Dimensioning and Tolerancing. Bourdet, P., A. Clement and R. Weill [1984], "Methodology and Comparative Study of Optimal Identification Processes for Geometrically Defined Surfaces", Proceedings of the International Symposium on Metrology for Quality Control in Production, Tokyo. Chang, S. H., G. Herrin and S. M. Wu [1990], "Sample Size Planning and Estimation of Form Errors using a Coordinate Measuring Machine", Department of Industrial & Operations Engineering Technical Report 90-35, University of Michigan, Ann Arbor. Chang, S. H. and G. Herrin [1991], "Sample Size Planning for Profile Error Evaluation of Surface with Arrays of Contiguous Patches using Coordinate Measuring Machine", Department of Industrial & Operations Engineering Technical Report 91-2, University of Michigan, Ann Arbor. ElMaraghy, W. H., Z. Wu and H. A. ElMaraghy [1989], "Evaluation of Actual Geometric Tolerances Using Coordinate Measuring Machine Data", ASME Design Technical Conferences, vol. 19-1. Fukuda, M and A. Shimokohbe [1984], "Algorithms for form error evaluation - methods of the minimum zone and least squares", Proc. Int. Sym. Metrology Quality Control Production, Tokyo, Japan, pp 197-202. Gota, M. and K. Lizuka [1977], "An analysis of the relationship between minimum zone deviation in circularity and cylindericity", Proc. Int. Conf. Prod. Eng., New Delhi, India, pp x61-x70. Greenwood, J. A. and J. B. P. Williamson [1966], "Contact of Nominally Flat Surfaces", Proc. Roy. Soc., London, A295, pp 300-319. International Standard Organization (ISO 1101-1983(E)) Technical drawings: geometrical tolerancing - tolerancing of form, orientation, location and runout - generalities, definitions, symbols, indications on drawing. Kakino, Y. and J. Kitazawa [1978], "In situ measurement of cylindricity", Ann. C.I.R.P., Vol. 27, No. 1, pp 371-375. Menq, C. H., H. T. Yau, G. Y. Lai, and R. A. Miller [1990], "Statistical Evaluation of Form Tolerances using Discrete Measurement Data", ASME Winter Annual Meeting 1990. Menq C. H. and H. T. Yau [1991], "An Intelligent, Computer-Integrated and Self-Sustaining Environment For Automated Dimensional Inspection of Manufactured Parts", Proceedings of the 1991 NSF Design and Manufacturing Systems Conference, The University of Texas at Austin. Mortenson M. E. [1985], Geometric Modeling, John Wiley & Sons. Murthy, T. S. R. [1982], "A comparison of different algorithms for cylindricity evaluation", Int. J. Mach. Tool Des. Res., Vol. 22, No. 4, pp 283-292. Murthy, T. S. R., and S. Z. Abdin [1980], "Minimum zone evaluation of surfaces", Int. J. Mach. Tool Des. Res., Vol. 20, No. 2, pp 123-136. 18

Murthy, T. S. R., and S. Z. Abdin [1980], "Minimum zone evaluation of surfaces", Int. J. Mach. Tool Des. Res., Vol. 20, No. 2, pp 123-136. Shunmugam, M. S. [1986], "On assessment of geometric errors", Int. J. Prod. Res., Vol. 24, No. 2, pp 413-425. Shunmugam, M. S. [1987], "Comparison between linear and normal deviations of forms of engineering surfaces", Precision Engineering, Vol. 9, No. 2, pp 96-102. Shunmugam, M. S. [1987], "New approach for evaluating form errors of engineering surfaces", Computer Aided Design, Vol. 19, No. 7, pp 368-374. Shunmugam, R. C. and D. J. Whitehouse [1971], "A unified approach to surface metrology", Proc. Inst. Mech. Eng., London, UK, Vol. 185, pp 697-707. Shunmugam, R. C. and D. J. Whitehouse [1971], "A unified approach to surface metrology", Proc. Inst. Mech. Eng., London, UK, Vol. 185, pp 697-707. 19