Error Analysis in Surfaces Reconstruction by Fitting and Interpolation Technique

Error between surfaces is the measurement to give us information how similar or different they are. Moreover, since the data associated with error between two matching surfaces are too huge and further need to be filtered into meaningful information. This research shows the suitable ways to represent error, to achieve data reduction and how detailed. Surface representations that may then be used as a part of many applications in engineering, clinic, virtual and other CAD applications. The statistical tools analysis of error has been developed to provide effective visual inputs that the designer can interpret of meaningful information. The comparison between two matching surfaces was done by using the differences in elevation techniques that called distance error between surfaces. A comparison has been made between the two adopted techniques of surface generation (fitting and interpolation) depending on several standard functions (sine-cosine functions, exponential functions and power functions), where the two techniques (fitting and interpolation) have been applied to analyze the representing error statistically. Then the design results have been implemented in manufacturing three of these surfaces using three axis vertical CNC milling machine tool with ball end mill cutter. By applying the proposed surface models, the similarity factor was found to be ranged between 84.86% for one of the models to 100% for other models that are reconstructed by the adopted fitting and interpolating techniques.


INTRODUCTION
omparison of two free-form surfaces based on discrete data points is very important for Reverse Engineering digitized data.It can be used to assess the accuracy of the reconstructed surfaces and to quantify the difference between two such surfaces [1], this is called error between Similar Surfaces.Error between curves or surfaces is the measurement to give us information how similar or different they are.Error analysis is a convenient way to tell us if the new measured surface is identical to the original surface or not identical [2].The main objective of this work is the comparison of different methodologies to model surfaces from a set of three dimensional data samples using 2D least squares and spline interpolation methods.The basic structure used to represent the surface is the rectangular regular network, whose rectangle vertices are the sample points.

Methodology
The methodology of this work to represent and analyze the error caused by using 2D least square with different interpolating order (3rd to 5th) and spline interpolation of sculptured surfaces, can divide into the following steps: -Definition of the input data point set and Surface representation by using mathematically defined function.Surfaces reconstruction by fitting and interpolation.Error evaluation.Statistical analysis of the error caused by fitting and interpolation.Implementation.

Definition of the input data point set and Surface representation by using mathematically defined function: -
The first step for modeling surfaces is the definition of the input data point set that will be used to reconstruct the surfaces.
A three-dimensional surface can be approximated in a number of forms, including irregularly spaced point observations, a regular grid of values, or contour lines of equal value (isolines).Surface interpolates a regular grid of values from data in the input object and outputs the grid as a meshed object.The input data can be in the form of points stored in a vector object or in a database that has X and Y coordinate fields for each record.The input object used in this work is a 3D vector object regularly spaced sample elevation points from a sculptured surface.The elevation is stored as a Z value for each point.The proposed reconstruction method can be used in a variety of CAD/CAM applications and reverse engineering.The first pattern of comparison is the following mathematically defined function that will be called sine/cosine function: The second pattern of comparison is the following mathematically defined function that will called Exponential function: The third pattern of comparison is the following mathematically defined function that will called power function: The three original surfaces are illustrated in the Figures 2, 3 and 4 respectively.2D least square Fitting: -A higher degree polynomial would presumably give a better fit.Matlab has a function (fit), where fit is a Matlab function that computes a least squares polynomial for a given set of data which can quickly and easily fit a set of data points with a polynomial ,the form of this function is:-, , , … . . 4 Where ( , are independent variables . is a dependent variable.′ ′ Mean fitting by polynomial with dx degree for and dy degree for .Note: The degree is limited from (1st to 5th for both , ) The adopted algorithm is illustrated in the Figures 1.

Spline Interpolation: -
In MATLAB, the general form of 2D interpolation function is interp2 that performs twodimensional interpolation, and the general form is: 2 , , , , , … . . 5 Where: Z is a rectangular array containing the values of a two-dimensional function, and X and Y are arrays of the same size containing the points for which the values in Z are given.Xi and Yi are matrices containing the points at which to interpolate the data and spline is the method.The Figures (1, 2, and 3) illustrate the representation of the selected surfaces by using fitting and interpolating methods.

Error evaluation: Distance Error between Similar Surfaces (E dis ):
The mesh representation of the surface S (original surface) can be compared to the other mesh surface S' (reconstructed surface) by measuring distances , ' between surfaces at certain points, where lies on the surface S and ' lie on S', where 1, 2. .; n denotes the number of samples on one surface.Consequently, distances , ' represent error values between original surface and the reconstructed surface:-, '  … . .6 Where: . .represents the original data, and the . .represents the new data constructed by fitting or interpolation processes.
Using the same original input data for substitute in mathematical model to reconstruct a new surface by fitting or interpolation processes yields:-.

And
. ' For each point of a regular rectangular grid, we calculate the values of the distance error ( ) as:-

Statistical Analysis of Error
Statistics is a mathematical tool for quantitative analysis of data, and as such it serves as the means by which we extract useful information from data.Statistical analysis can be used to …… (7) Error summarize those observations by estimating the maximum, average, standard deviation and Similarity factor Sf [3].

Average:
Average is defined as the sum of the individual data points (error) divided by the number of points (n), the average formula is represented as:- n represents the number of surface points.

Standard Deviation (SD):
Standard deviation is a statistical term that measures the amount of dispersion around an average.Dispersion is the difference between the actual value and the average value.The larger this dispersion or variability is, the higher the standard deviation.The smaller this dispersion or variability is, the lower the standard deviation.In symbolic terms, it is given by the formula as:

Percentage of Error:
The percentage of error can be represented for distance error as [9]:- * 100 … 11

Similarity Factor (S f ):
The similarity factor (Sf) is a logarithmic transformation of the sum-squared error of differences between a new curve or surface and the reference curve or surface over all points (error), the similarity factor (Sf) can be represented by the formula as [4] : Where, w is the weight factor.

Implementation
The techniques have been implemented for the design of several different sculptured surfaces to illustrate the system flexibility.The design result have been implemented for manufacturing these surfaces using type of material called an Epoxy Resin (Ureol), Ø8mm flat end tip mill tool is for roughing and Ø8mm ball tip mill cutter for finishing, and tool material is (H.S.S), the machining was achieved on 3-axis vertical milling machine.Figures 5, 6, and 7 illustrated these surfaces after machining by using CNC vertical machine.

Results and Conclusions
After the elevation comparison have been made between the fitting surfaces 3rd -5th order and interpolating by spline interpolation with the original models, the elevation error in each grid of the interpolated surfaces are calculated by using equation (8).Then the results are analyzed according to the equations (9 to 12) as average of error, standard deviation, percent error and similarity factor as illustrated in the tables 1, 2 and 3. Where: Table 1 show 5th degree least square fitting is chosen as the best methods used to represent surface of sine -cosine function.
Table 2 show that spline interpolation is chosen as the best methods used to represent surface of exponential function.Table 3 show 4th degree least square fitting is chosen as the best methods used to represent surface of 3rd degree power function.

Comparison between Theoretical and Practical Error:
Tables (4), ( 5) and (6) show the comparison between theoretical error (error between original surface (S) and the reconstructed surface(S').This is by fitting and interpolating technique) and practical error (error between surfaces (one, two, and three) and the real parts (part one, part two and part three after milling by using 3-axis vertical milling machine) calculated by coordinating measuring machine C.M.M.The measurements of machined surfaces have been achieved by using C.M.M machine FARO PLATINUM ARM, model p04 as shown in figure (8).The coordinating measuring machine has this specification, arm of six degree of freedom, touch measurement probes, (1200mm) working volume, up to 0.018mm accuracy, fast, easy, and accurate measurements.The measurements have been achieved in Technical University Freiberg (TU-Bergakademie Freiberg, Germany).The FARO PALTINUM ARM is a multiple-axis articulated arm with a spherical working volume, each joint has a rotary encoder, the signals from these encoders are processed and positional data is sent through the USB communications cable to the computer by using CAM2 Measure X software.The inspection has been achieved by comparison between the CAD model and the real part, where every measured model can be compared with its CAD model, where the surface of the CAD Model was presented by original data.The result of the measurement is a selected set of measurement points of a specified distribution on the measured surface as shown in figure (9).The proposed algorithm for fitting and interpolating different surfaces is developed and implemented successfully.


Information is provided about the value of error between two surfaces, where the error has been detected, represented and analyzed successfully.


The tools discussed in this research benefit the designer by providing more information and insight into the characteristic differences between two closely matched surfaces.


Similarity factor Sf has been used as a new statistical analysis factor of error it is an effective way to find out similarity identification between two surfaces.By applying the proposed surface interpolating models the similarity factor Sf is found to be range between 84.86% for one model and 100% for other models that are reconstructed by the adopted fitting and interpolating techniques.


Based on the results presented in this work, it can be said that the problem of reduction of error related data to meaningful information has been solved to a satisfactory degree.Quantification of error feedback has also been achieved (the designer can estimate the value and location of error between two surfaces with a reasonable degree of ease and accuracy).The difference in position data between two surfaces has successfully captured "error surface".By looking at the shape of error surface, the designer can quickly isolate the areas of significant error.

Figure ( 9 )
Figure (9) depicts the measurement points on the IGES CAD Models: Where: A-Measurement points on IGES CAD Model-1.B-Measurement points on IGES CAD Model-2.C-Measurement points on IGES CAD Model-3.