Integrated Inspection and Machining for Maximum Conformance to Design Tolerances 1
H. A. EIMaraghy’ ( I ) , A. Barari’, G. K. Knopf’ Industrial and Manufacturing Systems Engineering, University of Windsor, Windsor, Ontario, Canada 2 Mechanical and Materials Engineering, University of Western Ontario, London, Ontario, Canada
Abstract Designers’ intent for the form, fit and function of products is expressed by design tolerances the conformance to which is the main objective of manufacturing processes. A methodology for maximizing the adherence to the specified tolerances using an integrated machining and inspection system is presented. Considering the desired tolerance envelope of the part, an error decomposition technique is developed to model machining errors caused by the systematic and non-systematic errors in the machine tool. The model is used to adaptively plan the final machining cuts, based on inspection feedback, to enhance the geometric accuracy of the final product and is illustrated by an example. This approach reduces scrap and rework and their associated costs. Keywords: Optimization, Error Compensation, Design Tolerance
1 INTRODUCTION The accuracy of machine tools is a critical factor that affects the accuracy of manufactured products. Any tool motion error causes a one-to-one corresponding error in the work piece geometry. Errors in machine tool motions are essentially produced by geometric imperfections of the structural elements and by thermal and load induced errors caused by the machining process itself. It is impossible to eliminate all these errors by modifications in design and/or manufacture of the hardware. As a result, developing an error models for the machine tools and software error compensation are important research issues. In late 1970s, researchers focused mostly on the characteristics, classification and behaviours of machine errors in the three dimensional workspace [I]. Later in 1980s, implementations and applications of theoretical error models to compensate the actual machine tool error were developed [2], [3], [4]. Machine tool errors are mostly measured during off line calibration to obtain the model’s coefficients. The resulting error model is applied through the machine controller to modify the actual cutting commands. The model is an analytically expression for the geometric errors of a machine. However, obtaining its coefficients, which vary according to the working loads and thermal conditions, is expensive and time consuming. This would cause the temporal validity of the error model to be in serious doubt. Hence, research shifted to finding alternative approaches recognizing that the geometry of the machined part reflects the contribution of all errors and its accuracy is the ultimate objective. Research related to required sensors, logistics and system architecture for online measurement of the workpiece in recent years have been reported [5][6][7]. Some research tried to find analytical relationship between the actual workpiece accuracy and the coefficients of the machine tool error model [8]. This paper belongs to a new generation of error compensation techniques. It focuses on modelling the machining errors instead of machine tool errors. This approach has some obvious advantages since the machining errors represent the sum of interactions of all independent machine tool errors and their variations. In addition, the generated error model is developed in process and hence can readily be applied for on-line error
compensation of the current work-piece. The Developed machining error model lends itself to directly compensate for errors though machining commands instead of the controller pulses that has been the trend to date. Some approaches used least square line or curve fitting, [9][1O][ll], or neural network learning system [I21 to estimate or model machining errors from the measured points, for 2D contours or turning processes. The proposed method maximizes conformance to the design tolerances and is applicable for 3D sculptured surfaces. The obtained machining errors model ensures that the workpiece features fit within the desired tolerance envelope while minimizing further machining corrections. The proposed method is suitable for use in integrated inspection and machining systems with on-line in-process inspection or intermittent measurement and geometric feedback. 2
BACKGROUND
2.1 Machining Errors Figure 1 shows the relationship between any point defined by vector p,, in the desired geometry or machining command and the corresponding point in the actual cutting result defined by vector p, , where index i is the point index. The corresponding machining error vector is defined by E ~ The relationship can be described as: p*
=p+&T
(11
Machine tool errors are either systematic or nonsystematic. Systematic errors are quasi-static; they vary very slowly with time and are related to the structure of the machine itself [13]. This type of errors includes geometric imperfections, thermal deformations and alignment errors. Non-systematic errors are the minor part of the machine tool total error and are due to some uncontrollable sources such as machine tool vibration, spindle vibration or tool chatter [2]. Systematic errors are estimated to account for %70 of machining total error and have been observed to be as high as 70-120 pm for production class machines [14]. A rigid body kinematic model, based on the homogeneous coordinate transformation, is usually employed to model machine tool quasi-static errors.
.
2.2 Rigid body Kinematics Multi-axis machines are composed of a sequence of elements or links connected by joints to provide motions. With rigid body kinematics, each element and joint can be modelled using homogeneous coordinate transformations to describe the position and orientation of one object with respect to several different coordinate systems. In a typical machine tool, with prismatic joints for each translation axis, there exist errors in six degrees of freedom in addition of the intended motion. By assigning a coordinate frame to a slide and using a homogeneous transformation matrix, it is possible to describe the motion of the slide in a reference coordinate system [2]. Therefore, a machine tool error model can be derived for specific machine types. The actual position and the orientation of the slide coordinate frame are different from that of the ideal slide due to these six unwanted motions. Using the small angle approximation, the desired X slide motion, Hx, with all the unwanted motions, can be represented by the following matrix [14]:
I
1 xRz+ Sxy HX = -XRY-SZX
l o
1 XRX
1
0
0
xTz
Motions of the other slides, Hy and Hz, are represented similarly [2]. In the notations used to depict parametric
the actual point due to quasi-static machine tool error is p which is calculated as follows where ( j = [0 0 0 p =H.j
IT ): (4)
3 QUASISTATIC ERROR AS A LINEAR OPERATOR In common practices, equation (4) is used to compensate for machine tool errors by the controller. The derivation of matrix H requires heavy symbolic manipulation and requires many simplifications. However, since equation (4) represent a point-to-point relationship between p and p , it would be much more efficient to find a unified operator that directly relates the whole nominal geometry to the actual machined surface. Such operator can be applied directly to the machining commands, instead of the controller pulses, with obvious advantages. Therefore, the relationship between the nominal and actual geometry can be expressed as follow:
s~ =OQ.D,
(5)
Where, DG is the desired geometry and SG is the actual machined surface effected by all systematic machine tool errors. By inspection of the second derivatives of p in (4), it appears that each component of p is a linear function of components of the desired point p. Therefore, a Jacobian of p with respect to p extracts the coefficients of the required operator as follows:
The quasi-static errors operator, OQ,is obtained by:
0, = J . V - ( J . p s ) . j T
(7)
Where, matrix V is an identity matrix with all zero in its last column and homogeneous vector ps is the symmetry of p with respect to the reference point. Using (7), the quasistatic errors operator has a form of:
OQ
Figure 1: Desired and actual geometries. errors, R means rotation, and T means translation. The left hand lowercase letter means the moving slide and the right hand lowercase letter means the error direction. In a generic three-axis machine tool, three squareness errors are defined as the constant parametric errors. They can be defined as Sxy, Syz and Szx where in these notations S means squareness, and the two following letters indicate that the error is between these two reference axes. Since a machine tool can be considered as a chain of linkages, the spatial relationship between the cutting tool and the workpiece can be easily determined. The transformation matrix of total system, H, for a generic three-dimensional machine tool is as follow:
- -
H = H, Hu H,
(3)
The forth column of matrix is the actual position of the cutter relative to the reference coordinate system. Therefore, for any desired point in the machining commands, with coordinates of p = [OX DY
DZ
IT,
=[o
...) W~(XRX, ...) 1 -XRZ-SXY W~(XRX, 1 W~(XRX, ...) W~(XRX, ...) 0 ...)+ 1 WE(XRX,...) W~(XRX, XRX 0 0 0 1
In this model, W, to W3 and W4 to WE are second and third order polynomial functions of independent machine tool errors. Therefore, the quasi-static errors of machine tools can be represented by a linear transformation matrix, OQ, which can be applied to the total work-piece geometry to compensate for machine tool errors. It can be proven mathematically that any linear operator can be decomposed into two multiplied linear operators. The most suitable linear operator for machining errors compensation is a rigid body transformation because it lends itself to the tolerance zones definition utilized in the standards [15], and since it is orthogonal; it would be easy to correct machining errors by simply translating and rotating the coordinates of machining commands without affecting the geometry. A method for extracting the required rigid body transformation from the total machining error matrix, OQ,is presented next.
4
MACHINING ERROR CORRECTION AND MAXIMUM CONFOORMANCE TO TOLERANCE The design intents for form, fit and function of products are represented by geometrical and dimensioning tolerances. They define criteria for accepting or rejecting the final part during inspection and quality control. It is essential for some products such as mould and dies used to produce auto-parts, to ensure that these machined parts meet specifications. Any effort to ensure acceptance is worthwhile considering their high cost. An integrated machining and inspection system together with the proposed error correction method are very useful in these cases to evaluate the actual geometric deviations of workpiece in time to make the necessary errors correction. The tolerance zones definition and required condition for conformance to tolerance are prescribed in the standards of mathematical definition of dimensioning and tolerancing principles, ASME Y14.5 [15]. The constraints defined by tolerances describe a tolerance envelope for the part geometry as shown in Figure 1 for a profile feature.
Mathematically a point p,', conforms to the tolerance when there exists a point p, on the nominal surface with a surface normal of n,and some u,for which: p
j
-tl s u s tu
= pi +n,u
(9)
According to this definition, machined part conform,s to the desired profile tolerance envelope if all points p, of the surface lie within the upper or lower tolerance, tu or tl, for some corresponding point p, on the nominal surface. The determination of this corresponding point, p,, is a challenging task [16]. In the current approach, all corresponding points, p,s, are defined such that the maximum conformance with the design tolerances is achieved. Considering equation (9), the tolerance envelope for the part features can be defined by two rigid body transformations when it is topologically constrained by the tolerance envelopes of the related datum features. Therefore, a rigid body transformation that achieves maximum conformance to the tolerance envelope is the required limit for correcting machining errors detected by inspection. In Figure 2(a), the tolerance envelope for a single two dimensional feature is illustrated. Portion (b) shows the result of intermittent measurement represented by discrete data points. Any measured point that lies outside the upper limit of the tolerance envelope represents under cut material that can be corrected. Points under the lower tolerance envelope limit represent an over cut zone that is not possible to correct. Considering these facts and using equation (9), an error function, named Fonformance residual, is defined for any measured point, p, , as follow:
I
{
0
if
.zi = duj if if
{
dui +dli = tu+tl dui + dlj > tu + tl duj < dlj {dq+dlj>tu+tl duj > dlj
Where, du, and dl,, are the Euclidean distances of the measured point, p , , from the lower and upper limits of tolerance envelope of a substitute geometry SG. Tolerance envelope of a substitute geometry SG is the product of rigid body transformation of the desired geometry, DG
Figure 2: Maximum conformance to tolerance method.
SG = T(f). DG
(13)
Where, n,is the corresponding surface normal vector. T(f) is the rigid body transformation matrix defined by vector variable f, which consists of three rotation and three transformation parameters. It can be seen that the error value defined by (10) for any measured point is a function of vector variable f. The maximum conformance to the tolerance envelope is achieved when the maximum of the error function, given by equation (14) is minimized.
obj = ~
t
.)
; ( n~ y x
(14)
The resulting transformation matrix, T', is the major decomposed part of the total error operator. It maximizes conformance to the specified tolerances. The Inverse of this orthogonal matrix is the linear operator used directly for correcting detected machining errors. There is one-toone mapping between points on the actual part surface and their corresponding points on the nominal surface. This makes local correction of residual errors possible. Figure 2-(c) shows the result of optimisation. The total machining error is decomposed into two components: a Compensable error, .zC,, and a residual error E ~ , The . first is
corrected globally for the whole machining surface. Residual errors are corrected locally and iteratively. 5 OPTIMIZATION The optimisation problem defined in (14) has the following characteristics: 0 Objective function is highly nonlinear with 6 variables. 0
0
In order to avoid any over cut in the work-piece; a discontinuity in the objective function is created which makes its solution difficult.
A fast optimisation algorithm is required for on-line applications.
A direct search method, which does not need the gradient of the objective function, is employed; hence the solution is independent of the part geometry. The Nelder-Mead Simplex method is used. Its convergence depends on the initial simplex (starting point) and the function continuity [17]. Although the least square best fit is the most likelihood estimation to fit a substitute function into a set of discrete data, it tends to overestimate the geometric deviation and doesn't conform to the tolerance zone definitions in the standards [16], [15]. However, its result is useful as a quick and reasonable estimation of the initial simplex of the main problem. The sum of square errors to be minimized is: 0
The distribution of the applied noises is chosen such that they represent almost 30% of the total machining errors. The distribution of non-systematic errors has a mean equal to zero and standard deviation of 10 pm, which means that the non-systematic errors statistically vary between -30 to 30 pm in any spatial direction. Simulation and numerical experiments for variety of geometric primitives and sculptured surface were conducted. Figure (3) shows the machining error simulation for a cubic B-spline surface with overall dimensions of 270mmx200mmx60mm created using data set # I and non-systematic errors normally distributed with mean of 0.0 and standard deviation of 0.Olmm. In order to evaluate the generated surface, an Equiparametric sampling method is used [I81 where a sample of points representative of the surface are equally distributed in the parametric space of the B-Spline surface (u-v space). For measurement purposes, 100 sample points were picked from the resulting surface and analysed using a tolerance zone evaluation algorithm to evaluate the actual tolerance of the machined surface. The results show that surface errors range between -0.06631 mm and 0.13039 mm. Since the upper and lower limits of tolerances equal to the 0.05mm, the simulated machined geometry doses not conform to the tolerance envelope. In this figure, the measured points indicated by a circle are those that lie above of the desired geometry and represent a positive error value or under cut.
The objective function switches to (15) automatically whenever the simplex search gets trapped in the infinity part of the error function. The use of these techniques resulted in robust convergence properties for the search. 6
SIMULATION AND VALIDATION EXPRIMENTS
6.1 Simulation of machining errors In order to validate of the proposed method, we need to investigate how close the optimum rigid body transformation matrix obtained by (14), T', is to the transformation matrix presented in (8), OQ.A simulation of the machining errors is presented in this section. Two actual calibration results of two typical vertical milling machine tools are reported in [I31 (data set # 1) and [8] (data set #2) have been used to represent the quasi-static part of the machining error. Using the model presented in (8), the quasi-static operator caused by error set # I is:
[I.OOOOO -.00005 0.00038 0.059001 0.00000 1.00000 -.00006 0.12600 OQl = 0.00000 0.00002 0,99999 0.03049
~0.00000 0.00000
0.00000
1. o o o o o ~
The second data set produces another quasi-static errors operator as follow: 1.OOOOO -.00007
]
0.00027
0.02800
1.00000 -.00009 0.00004 0,99999 0.00000 0.00000 0.00000
0.05999 0.03099 1.ooooo
0.00000
o w = :0.00000
(17)
It can be observed that the determinant of both matrices deviates slightly from unity and that they are very close to being orthogonal transformation matrices. In order to simulate the non-systematic part of the machining error, a normally distribution error is added to the quasi-static errors in all three X, Y and 2 directions.
Figure (3) Machining and Inspection using data set # I . Figure (4) shows the machining simulation of the same geometry, at the same machine location, with the same non-systematic error distribution using the second machine tool (data set #2). Upon inspecting 100 points of the resulting surface, it can be seen that the surface errors range between -0.00431mm to 0,11843 mm. The created surface is within the lower tolerance limit but violates the upper tolerance limit. 6.2 Maximizing Conformance to Design Tolerance The application of the proposed methodology to the worst surface (surface created by data set # I ) is presented. The rigid body transformation, between the nominal surface or, in fact, machining commands coordinate system and the machine coordinate system, to ensure that the machined surface lies completely within the tolerance zone is obtained by optimising using (14) as follows: Rotation about the X axis=0.00035 rad, about the Y axis=0.00002 rad and about the 2 axis=0.00007 rad Translation in the X direction= -0.00011 mm, in the Y direction= 0.00011 mm 8, in the 2 direction= -0.01082 mm
points within the machining commands that correspond to those points machined surface. In order to obtain the desired end result, these corrections are performed iteratively, with intermittent inspection, until complete conformance is achieved. First, an Equiparametric sampling method is used to define the measurement points. Then, based on the location of these points, the machined surface is divided to patches. A compensation value, which is the difference between maximum and minimum errors of each patch, is calculated. Let the surface parameters associated with a patch vertices be named u7 through u4 and v7 through v4 and let a be the associated error compensation value.
Figure (4) Inspection and machining using data set #2.
Figure (6) Residuals of conformance to +/- 0.02 tolerance. Then the compensation command is generated by:
Figure (5) Results of conformance to tolerance of+/- 0.05. With this transformation, the surface completely conforms to the specified tolerance envelope and as the result the conformance residual is equal to 0.00000. Hence, further local corrections are not required. This result is illustrated in Figure (5). The conformance of the same surface with tighter tolerance specifications (i.e. smaller upper and lower tolerance limits equal to 0.02) is analysed. Figure (6) shows the dark areas where conformance residual errors (Eq. 10) remain. The max!mum conformance is achieved by transformation matrix, T , with the following parameters: Rotation about the X axis=-0.00029 rad, about the Y axis=0.00025 rad and about the 2 axis=0.00009 rad Translation in the X direction= -0.00002 mm, in the Y direction= 0.00083 mm 8, in the 2 direction= -0.04733 mm The minimum error is -0.01998 mm and it conforms to the lower limit of the tolerance envelope. The maximum error of 0.0699 mm is much higher than the desired tolerance. The maximum residual of conformance is 0.0499 mm. It should be corrected by extra machining. The optimisation process presents two important pieces of information for use in the compensation process: the transformation matrix, T', helps obtain the maximum global conformance between the nominal and machined surfaces. The inverse of this matrix is used to make the necessary changes in the machining commands to correct these errors. the correspondence map which defines regions on the nominal surface where local corrections are needed and the amount of correction to be applied to various
Seven corrective steps were required to completely remove all residual errors and achieve total surface conformance to the tolerance envelope. Figure (7) shows the residual error in some of these steps. The number of surface patches that needed corrections decreased quickly after the first two compensation steps. The amount of material to be machined in the later steps of compensation is much less than the earlier steps.
Figure (7) Iterative Machining Errors Compensation The maximum Residual surface error in the various compensation steps is presented in the Figure (8). It can be seen that, first, due to the better alignment between the part and machine coordinate frames which maximizes the conformance to the specified tolerance through rigid body transformation, the residual error is reduced by %60. Then, in 7 consecutive compensation steps, complete conformance to the tolerance envelope was achieved.
Maximum Error in Compensation Steps(mm)
Figure (8) Compensation Steps
7 SUMMARY AND DISCUSSION A methodology for compensating for machining errors instead of machine tool errors has been presented. It emphasizes the importance of considering the ultimate outcome of machining in which machining errors are manifest and devising adaptive corrective action based on close coordination between inspection and machining. The proposed approach aims at maximizing conformance to tolerance specification before the final cuts are made. This would ensure 100% acceptance of expensive parts such as complex dies and moulds and reduces waste. It identifies the minimum amount of corrective machining required and where it should be applied. These corrections are applied directly to machining instructions rather than the less user -oriented controller signals. This unique approach is applicable to several variations of integrated inspection and machining systems such as online and intermittent inspection or repetitive manufacture. This method is mathematically applicable to parts with multiple features where consideration of all its datum references is necessary. The features' datum can be modelled as constraints in formulating the optimisation problem. This reduces the solution space but corresponds closer to the requirements of more complex parts. Also in order to avoid possibility of over cutting for the constrained features, the determination of the machining error operator can be determined at a safe distance before the finishing cut by constructing an intermediate surface within the CAD model with which to compare measurements. The accuracy and required time for iterative compensation is also related to the density of sampling points (Eq.18). An adaptive sampling algorithm can potentially increase its speed and efficiency. 8 ACKNOWLEDGMENTS The authors acknowledge the valuable contributions that Professor Waguih EIMaraghy, of the IMS Center at the University of Windsor, made to this research. Funding by the Natural Science 8, Engineering Research Council of Canada (NSERC) 8, Auto21 Network of Centers of Research Excellence and collaboration with Canada's National Research Council 8, its Integrated Manufacturing Technologies Institute (IMTI) are acknowledged. 9
REFERENCES
[ I ] Hocken, R. J., Simpson, A,, Brochardt, B., Lazar, J., Reeve, C., Stein, P., 1977, Three Dimensional Metrology, Annals of CIRP, 26/2:403-408.
Donmez, A,, 1985, A General Methodology for Machine Tool Accuracy Enhancement -Theory, Application and Implementation, PhD Dissertation, Purdue University. Ferreira, P.M., Liu, C.R., 1986, A Contribution to the Analysis and Compensation of the Geometric Error of a Machining Center, Annals of CIRP, 35/1:259-262. Duffie, N. A,, Malmberg, S.J., 1987, Error Diagnosis and Compensation Using Kinematic Model and Position Error Data, Annals of CIRP, 36/1:355-358. Pfeifer, T., Konig, W., 1992, Fiber optics for in-line production measurement, Annals of CIRP, 41/1:577580. Yamazaki, K., Hanaki, Y., Moro, M., Tezuka, K., 1998, Autonomous Coordinate Measurement Planning with Work-In-Progress Measurement for TRUE-CNC, Annals of CIRP, 47/1:445-448. Liu, Z.Q., Venuvinod, P.K., 1999, Error Compensation in CNC Turning Solely from Dimensional Measurements of Previously Machined Parts, Annals of CIRP, 48/1:430-433. Wilhelm, R. G., Srinivasan, F., Farabaugh, F., 1997, Part Form Errors Predicted from Machine Tool Performance Measurement, Annals of CIRP, 46/1:471-474. Lo, C. C., Hsiao C. Y., 1998, A method of tool path compensation for repeated machining process, International Journal of Machine tools 8, Manufacturing, 38/3: 205-213. Suh, S. H., Lee, E. S., Sohn, J. W., 1999, Enhancement of Geometric Accuracy via an Intermediate Geometrical Feedback Scheme, Journal of Manufacturing Systems, 18/1:12-21. Cho, M. W., Seo, T. I., 2002, Machining Error Compensation Using Radial Basis Function Network Based on CAD/CAM/CAI integration, International Production Researches, 40/9:2159-2174. Bandy, H.T., Donmez, M.A., 2001, Methodology for Compensating Errors Detected By processintermittent Inspection, NlST Report, NISTIR-6811 PC A06/MF A01; PB2002-101144/XAB, 1-77. Hocken, R. J, 1980, Technology of Machine Tools, Vol. 5: Machine Tool Accuracy, Lawrence Livermore Laboratory report, n. UCRL -52960-5,l-85. Lin, Y., Shen, Y., 1999, Generic kinematic Error Modeling for Machine Tool Metrology, International Journal of Flexible Automation and Integrated Manufacturing, 7(3&4): 305-220. ASME Y14.5.1M, 1999, Mathematical Definition of Dimensioning and Tolerancing Principles, Reaffirmed, The American Society of Mechanical Engineering. Nassef, A. O., EIMaraghy, H. A,, 1999, Determination of Best Objective Function for Evaluating Geometric Deviations, International Journal of Advanced Manufacturing Technology, 1590-95. Lagarias, J.C., Reeds, J. A,, Wright, M. H., Wright, P.E., 1998, Convergence Properties of the NelderMead Simplex Method in Low Dimensions, Society of International Applied Mathematics, 9/1:112-147. Elkott, D.F., EIMaraghy, H. A,, EIMaraghy, W. A,, 2002, Automatic Sampling for CMM inspection Planning of Free-Form Surfaces, International Journal of Production Research, 40/11:2653-2676.