7
Medwell Journals ISSN: 1816-949X \ Journalof Engineering & Applied Sciences \ \ \ I -L j ~8J ~ - c o n t a c t Medwell Journals ANSlnet Building 308-Lasani Town Sargodha Road Faisalabad, Pakistan Tel. #: 0092 41 500 40 00 e-mail: [email protected] URL: http://www.medwelljournals.com For online Support [email protected] [email protected]

~8J - University of Bridgeport | 126 Park Avenue, … of Engineering and Applied Sciences 2 (2): 299-304, 2007 @ Medwell Journals, 2007 Visualization of Tolerance for Manufaturing

  • Upload
    vodieu

  • View
    217

  • Download
    1

Embed Size (px)

Citation preview

Page 1: ~8J - University of Bridgeport | 126 Park Avenue, … of Engineering and Applied Sciences 2 (2): 299-304, 2007 @ Medwell Journals, 2007 Visualization of Tolerance for Manufaturing

Medwell Journals ISSN: 1816-949X

\ Journalof

Engineering & Applied Sciences

\

\

\I

-L

j~8J

~

-

c o n t a c tMedwell Journals

ANSlnet Building308-Lasani TownSargodha Road

Faisalabad, PakistanTel. #: 0092 41 500 40 00

e-mail: [email protected]: http://www.medwelljournals.com

For online [email protected]

[email protected]

Page 2: ~8J - University of Bridgeport | 126 Park Avenue, … of Engineering and Applied Sciences 2 (2): 299-304, 2007 @ Medwell Journals, 2007 Visualization of Tolerance for Manufaturing

.. Journal of Engineering and Applied Sciences 2 (2): 299-304, 2007@ Medwell Journals, 2007

Visualization of Tolerance for Manufaturing

Tarek Sobh, Xio Hong Zhu and Sarosh PatelComputer Sciences of Engineering Department Bridgeport, CT 06604

Abstract: In this study the problem of visualizing uncertainty in sensed data for manufacturing applicationsis discussed. Constructing geometric models for the objects from sense data is the intermediate step in a reverseengineering manufacturing system. Sensors are usually inaccurate, providing uncertain sense information. Weconstruct geometric entities with uncertainty models for the objects under consideration from noisymeasurements. This case study mainly addresses recovering uncertainty in the geometric entities, in order toaid making later decisions about the geometry of the reconstructed parts.

Key words: Reverse engineering, uncertainty models, visualizing tolerances

INTRODUCTION

Reverse engineering is a process that reconstructs arepresentation of a physical model, so that it can bereproduced identically. It is a new branch in theCAD/CAM field. Parts are manufactured according toblue prints, but when blue prints are not available, (suchas, the part is too oldand its blue prints are missing),reverse engineering can be used to reproduce these parts.This can be achieved by the following two steps, sensingthe part to construct its CAD representation and thenmanufacturing the part according to the representation. Itis easy to see that the accuracy of measurement is the keyto success in reproducing an accurate CAD model.

The accuracy of the measurement can beimproved not only by improving the quality ofmeasuring instrument, but also by optimizing samplingdata. A reverse engineering system has been builtand the measuring process is done by a vision sensor(B/W CCD camera).

In our reverse engineering system, we use aprobabilistic approach to provide information for furthermeasurements required to refine the CAD modeland alsogives a quantitative measure of the accuracy of thecurrent CAD model. The geometric reasoning on theprobabilities of uncertain geometries can guide the sensorto perform focused measurements to allow for higheraccuracy and efficiency. For instance, the slot (Fig. I), inmechanical engineering is a commonly used feature andthe parallelism of the two side planes is an importantmeasurement.

The two side planes are based on sampling pointsfrom sensed data. Measurements of these points are notexact, therefore, these two planes that are constructedfrom these measurements, are planes with probabilities as

the confidence measure. Consequently, the parallelism isno longer a definite relation, it has a probabilitydistribution. If the confidence of the parallelism does notsatisfy the manufacturing requirement, refinement of thetwo side planes is required; hence re-measuring of thepoints is performed.

Some work has been done in the probabilisticrelationship between the geometric objects and theirrelations, but the probability relations between thesampling points and geometric primitives have not yetbeen studied extensively. The geometric objects that thisprobabilistic geometric modeler is based on areconstructed from sensing data. Therefore, study of therelation of the probabilistic characters of geometricobjects and sensing data is very important. This work

-Fig. 1: The slot mechanical engineering is a used feature

Corresponding Author: Tarek Sob, Computer Sciences and Engineering Department Bridgeport, CT 06604299

Page 3: ~8J - University of Bridgeport | 126 Park Avenue, … of Engineering and Applied Sciences 2 (2): 299-304, 2007 @ Medwell Journals, 2007 Visualization of Tolerance for Manufaturing

J. Eng. Applied Sci.. 2 (2): 299-304, 2007

presents the study of these relations and ways ofvisualizing them. The work addresses the statisticgeometric objects constructed from sensing data,relations of these statistic geometriesand the effect ofdecisions on its relative geometric objects.

Related work: Stochastic geometry has beensystematicalIy studied by mathematicians. In (KandalI andMoran, 1963) mathematical theories of stochasticgeometry are welI studiedand uncertain geometric featurescan be represented as constrained functions. Classicexamples of stochastic geometry can be found in(Burtrand, 1907; Kendall and Moran, 1963), describe amethod of choosing distributions on geometric elementswhich provide a consistent interpretation of physicalgeometric elements.

Recently, research about sensing and uncertaingeometry in robotics presents lots of ideas for handlinguncertainty geometry. Hugh F. (Durrant-Whyte 1986,1988) in has modeled the sensor in a manner that explicitlyaccounts for the inherent uncertainty encountered inrobot operations. In Davidson's thesis Davidson (1968)he made the important observation that arbitrary randomgeometric objects can be described by a point process inparameter space.

In computer-aided geometric modeling,methodologies for building a robust geometric modelerexplore ways of handling the uncertain geometry causedby the imprecise computations. Arbitrary decisionsare made, when uncertainty arises. In (Zhu, 1993;Bruderlin, 1990, 1991; Fang and Bruderlin, 1992, 1991;Bruderlin and Fang, 1992; Bruderlin, 1990; Fang et a/.,1992, 1993;Fang, 1992) three region tolerances are used tokeep track of uncertainty caused by the computationalerror. In (Fang, 1993), arbitrary decisions are made andcorresponding uncertainties are restricted.

Representations for uncertain geometry: In geometricmodeling, algorithms and representations for geometricobjects are well developed, but the tolerance (uncertaintyof geometry) has not yet been welI defined. In (Zhu, 1993),a geometric object is represented by boundary and hybridrepresentations, associated with a tolerance representingthe uncertainty ofthe geometry.

Based on the representations that has beendeveloped and used in (Zhu, 1993), a representation foruncertain geometry is developed as follows:

An uncertain geometric object is represented in twoparts: a geometric description and a probabilisticdistribution of geometry. The geometric description is aparameter vectorand the probabilistic distribution ofgeometry is a vector of the same dimensions as thegeometric description, but with correspondingprobabilistic distributions of the parameters.

For instance, a plane can be specified as an equation:(A, B, C), (f., fb, fe), where (A, B, C) is the geometricdescription and z = Ax+By+C. (r., fb,fJ is the probabilisticdistribution of geometryand also can be specified inanother form: (P, V), (fp,f.), where P is a base pointand Vis the normal vector of the plane. fbis the uncertainty ofthe base pointand f. is the uncertainty of the normalvector. It can be proved that fp and f. can be computedfrom r., fb,(and P, V can be computed from (A, B, C). Bydefining fa> fb, fe' different types of probabilitydistributions can be handled by this representation.

Experiment on statistic geometric objects constructedfrom sensing data: The geometric objects being dealt withare constructed from the sensed data. How thedistribution of sensing data affects the uncertainty of thegeometry is the basis for defining the distributions of thegeometry. In this section, the uncertainty of the planerelating to the sensing 3D coordinates is studied. A set ofdiscrete sensing data is used to perform thecomputations.

Best least square fit: In order to reduce the randomerror, usualIy, n sampling points are measured to defininga plane, yet the points have certain probabilitydistributions which mainly depend on the measuringmachine, the n points are independent random events.Therefore, a best least square fit method for computingthe plane parameter is used. This approach gives themaximum likelihood result and confidence on the samplingdata to be a plane.

Assuming that input data is (x;, y;, z;), where X;,Yi,Zjare either fixed values, or probability functions. They canbe either independent, or correlated. Explicit functiondefinition for a plane in 3D will be Z= Ax+By+C. Ifthereare n points, the best least fit plane should be the solutionof the following equation set.

Z=p.x

-

X~[~]

300

Page 4: ~8J - University of Bridgeport | 126 Park Avenue, … of Engineering and Applied Sciences 2 (2): 299-304, 2007 @ Medwell Journals, 2007 Visualization of Tolerance for Manufaturing

J. Eng. Applied Sci., 2 (2): 299-304, 2007

Because P is an n x 3 matrixand X is a 3xl matrix,rank(P) = 3and n = 3, solution of X is unique. Whenn > $, the solution X is a best least square fit.

Or in the other form:

A=f(x,y,z)

B=f(x,y,z)

C=h(x,y,z)

Where x E [xu x2],y E [YI,Y2]'z E [z" Z2]are discrete.Function f, g, h are non-linear functions. To compute theprobability distribution of A, Band C, exhaustivelycomputing values of f, gand h, will provide the discreteprobability distribution array for A, Band C.

From the above mathematics, we can see that thecomputation complexity is exponential. Ifm is the numberof distribution values and n is the number ofsampling points, this above computation will beperformed (3m).times.

Sensing data and its corresponding results: The sensingdata is modeled by discrete points with theircorresponding probabilities. Normally, a point in 3D isrepresented as (x, y, z), but for this sensing data, x, yandz, are no long a single value; they are distributions asshown in Fig. 2.

Due to the computational complexityand thegenerality of the problem, a three distribution values dataset is used for experiments. The resulting planes (A, B, C)along with their distributions are computed. Graphs of A,Band C distributions are approximated by the followingcomputations.

What we want to get is the concept of the f(x) shape.The data we computed are discrete state vector (A, B, C)and its probability. is computed and plotted,

x.+1

P(xj < X< Xi+l)= f f(x)x,

Probability

0.240.20

0.04

x-OOlx Data value

Fig. 2: Sesing data

Probability

0.330.2 I 0.2

Data value

Fig. 3: Uniform distribution

Probability0.5

0.250.2 I 0.2

Data value

Fig. 4: Gaussian distribution

where x can be A, B, or C. and Xmin= Xi= xm". In order tosmooth the curve, an overlapped set of X;is used. In theresult figures, the x axis are the values of A, B, Crespectivelyand the y axis are the correspondingprobability of that value.Test] : Uniform distribution: the sensing data is shown inFig. 3. There are a total three points with suchdistributions; planes defined by these points arecomputed.Test 2: Gaussian distribution: the sensing data is shownin Fig. 4. There are a total of three points with suchdistributions; the planes defined by these points arecomputed.

Next, we discuss an algorithm for visualizing thegroups of resulting probabilistic planes from the senseddata.

Visualizing sensed data for planar surfacesProblem: Given sensed data for planar surfaces thegoal is to design an algorithm for grouping thisdata and then finding effective ways of visualizingthese groups. .

Each actual planar surface is represented by a verylarge number of planes of the form: -

Z = a, X+b, Y+c,Z = a2X+b2Y+c2Z = a. X+b. Y+c.

301

Page 5: ~8J - University of Bridgeport | 126 Park Avenue, … of Engineering and Applied Sciences 2 (2): 299-304, 2007 @ Medwell Journals, 2007 Visualization of Tolerance for Manufaturing

The sensed data consists of:

J. Eng. Applied Sci., 2 (2): 299-304,2007

Ai, bj, G values for each of the above planes.Probability of each plane represented by (ai' bj, cj) ofbeing the actual planar surface.

Given the above sensed data we want to find a way tocluster these (a;, b;, cYs according to their spatialproximity in (a,b,c) 3D space and then to find a suitableway of visualizing these clusters.

The algorithm: The Algorithm has the following threebasic steps:

Use a Recursive Algorithm to find all pairs of points(aj, aj) such that the distance between them does notexceed a small number 8.

The above step returns a set of clusters each havingtwo elements such that the distance between thesetwo elements does not exceed a smaIl number

$\epsilon$. In this step we group all those clustershaving one common element i.e. if(0,1),(0,2),(0,3) aresome of the clusters returned by the previous thenthis step would combine these three clusters to forma final cluster (0,1,2,3). So this step in effect reducesthe number of clusters returned by the previous stepby combining all those clusters which have points ata distance not more than $\epsilon$ from a commonpoint which is the SEED for that cluster.The goal of this step is to combine clusters returnedby the previous step by identifying the Seed for eachcluster. In this step we represent each cluster as a nband of planes where n is the number of (a, b, c)values in this cluster. The planes are represented bytriangles. Each cluster is represented in a differentcolor. The thickness of a set of triangles representinga cluster are a measure of the probability of this setof a, b, c values of being that of the actual plane.

Detailed description of the algorithm: Step 1: OurAlgorithm uses the n-dimensional BILS Method(Midori, 1993).

N-dimensional bills method: Suppose we wish to solve ann dimensional problem: for a set S = ai, a2,... amof mpoints in n dimensional space report all coincident pairs(aj, a) such that aj and a /i<j) are points in S and thedistance between a; and aj does not exceed a given smaIlnumber E

Let aj in S be represented as an ordered setof nfloatingpointnumbers(Pi!,Pi2' Pin)'SO, ai = (Pi!, Pi2'....P;') for i = 1,2,... m

In each axis direction k, we find the lower bound Ibkand the upper bound ubk. Thus we can find the bounding

box which encloses S by n intervals [lbj, ubj], wherej = I,2,...,n.

The algorithm computes the dividing axis k as Rmodulo n where R is the current recursion depth and n isthe dimension of the space. The kth interval of thebounding box B is subdivided into two subintervals ofequal size [Ibk,midpoint] and [midpoint, ubk].Hence thebounding box B is subdivided into two boxes B, and B2.

The original List of indices L is subdivided into twosublists L, and L] so that L, contains the indices of allpoints which are in B, and L] contains the list of all indiceswhich are in B]. The List is subdivided into two lists L,and L] by simply comparingthe kth co-ordinateP;k of a;

. withtwothresholdvalues(midpoint-8)and(midpoint+8)for each element i in the List. The algorithm allows theindex list subdivision method to be binary subdivisionregardless of the dimension of the space.

The above algorithm as given by (Midori, 1993) doesnot give a way on deciding on E and the value of E isconstant regardless of the data points. Our algorithm isadaptive because the value of E changes for differentclusters depending on the data points. In our algorithmwe set E to a small value initially and keep increasing Eand calling the above recursive algorithm till all the a, b, cvalues are in some cluster. At the end of this stepeach cluster has a pair of points at a distance not morethan E from each other where E may be different fordifferent clusters.

Our Algorithm:E = 1;DONE = FALSE;While NOT DONE

DONE = TRUE;rec-depth = 0;Initialize the bounds array to the minimum and maximumvalues along the X,Y and Z directions.biIs(index,num-eIements,bounds,rec-depth);For each element i in the index arrayIf any element is not in a clusterDONE = FALSE;increment E by 1;end of while

In the above algorithm:

The bounds array has the minimum and maximum

value in all axis directions. In our case we are workingwith 3D points and so X, Y and Z are the axisdirections.

The index array has the list of all indices.num-elements is the total number of (a, b, c) values.rech-depth is the recursion depth.

-

302

Page 6: ~8J - University of Bridgeport | 126 Park Avenue, … of Engineering and Applied Sciences 2 (2): 299-304, 2007 @ Medwell Journals, 2007 Visualization of Tolerance for Manufaturing

J. Eng. Applied Sci., 2 (2): 299-304,2007

The above algorithm calls the following bils algorithm:bils(index-list,num-index, b,curr-rec-depth)If((num-index <= E) OR (curr-rec-depth == MAX-DEPTH»search(index-list,num-index);else

k = curr-rec-depth modulo n;nl=0;n2=0;Let the mean of $lb-k$ and $ub-k$ be midpoint, where lbkand ubk are the lower and upper bounds of the kthdimension.For each element i in the index_listLet k[i] be the kth co-ordinate of a point Uiin S.Ifk[i] <=$ (midpoint + E)add i to list}; increment n} by 1.Ifk[i] >=$ (midpoint- E)add i to list2; increment n2 by 1.If(n} > I)Set the kth interval of b to be [Ibk,midpoint];bils(listl,n 1,b,curr-rec-depth+ I);If(n2 > 1)Set the kth interval of b to be [midpoint, ubk];bils(list2,n2,b,curr-rec-depth+ I);

In the above algorithm:

Index-list array has the list of all indices.Num-index is the total number of (a, b, c) values.B has the minimum and maximum values in each axisdirection.

Curr-rec-depth is the current recursion depth.S is the list of (a, b, c) values.

Step 2: This step combines clusters returned by theprevious step and the criterion for combining is that theelements in a final cluster should be within a distance notmore than E from the seed of the cluster.

i = 0; j = 1; finaLcluster30unt = 0;Let the first and second element in cluster i be clusteriland cluster;2 respectively.Let the first and second element in cluster j be cluster"and cluster 12respectively.For each cluster i in the cluster arrayIf cluster" is not in any final-clusterSET SEED =cluster II;

Put cluster il in final-cluster.

If cluster i2 is not in any final-clusterPut cluster12infinal-cluster kelse

If $cluster i2is not in any final-clusterSET SEED = cluster ;2;Put cluster i2infinal-cluster k.For each cluster j in the cluster array (i < j)If (clusterj, == SEED)

If clusterj2is not in any final-clusterPut clusterj2 infinal-cluster kincrement final-cluster-count;increment i;SET j = 1+1;

Step 3: Once we have the final clusters i.e. for each clusterwe have a set of a, b, c values. These a, b, c valuesrepresent planes of the form Z = a X+bY+cFor each a, b, c value in a cluster we find the intersectionof the plane it represents with the three principal axes X,Y,Z.Intersection with Z axis put X = 0, Y = 0 and so we get (0,0, c).Intersection with X axis put Z = 0, Y = 0 and so we get(-cia, 0, 0).Intersection with Y axis put X = 0, Z = 0 and so we get (0,-c/b, 0).So we now have three points on the plane i.e. theintersection with X, Y and Z axes. We therefore representeach plane as a triangle. A cluster is represented as aband of triangles. Each plane has a probability of beingthe actual plane. Now a cluster has a number of suchplanes. A cluster with more planes will have a highercluster probability and this is indicated by the thicknessof the triangles.

Statistical geometries and their effect on relativegeometries: The above algorithm has been implementedusing the C Language and GL on SOl (IRIS) workstationand provision has been given to zoom and rotate thefigure interactively to help in visualizing. Sensed datafrom four actual planes was used.

As mentioned in the introduction, the goal of thisprobabilistic approach is to feedback control to thesensing devices to measure the physical model and givea quantitative confidence measurement for the CADmodel. Some relations of these uncertain geometries arecomputedand results are computed with their uncertaintydistributions.

Basically, geometric relations are set relations, suchas: intersecting, coincidence, incidence, apartnessandparallelism. Because of the uncertainty of the geometries,these relations are not definite, they are decisions withcertain confidence, also, this confidence can be specifiedby its probability. For instance, a point incident on aplane, can be computed as a point incident on theplane with 0.9 probability. This provides reasoning basedon probabilities (Table 1).

Table 1:Reasoning based on probabilitiesABC1.034723 -0.961805 2.3864581.036584 0.966461 2.3917681.038042 0.970109 2.395936

P (Probability)0.330.340.33

-

303

Page 7: ~8J - University of Bridgeport | 126 Park Avenue, … of Engineering and Applied Sciences 2 (2): 299-304, 2007 @ Medwell Journals, 2007 Visualization of Tolerance for Manufaturing

1. Eng. Applied Sci., 2 (2): 299-304, 2007

A feedback computation of a plane that is supposedto be collinear with a given plane is studied. A programthat takes the output discrete planes along with theirprobabilities is implementedand the cases of parallel andcollinear statements are computed with their probabilities.Some examples of parallelism and co linearity have beentested. For example, co linearity and parallelism of theuniform distribution planes (as described above has beentested). The probability for parallelism is 0.824719, for colinearity is 0.334722. The parallelism and co linearity of theplanes of the three points Gaussian distribution and theuniform distributions have also been tested. The

parallelism is 0.66730846and the co linearity is 0.27099140.(the tolerance for testing them is the square distance lessthan IOe.2)

If we assume that the plane constructed from theuniform distribution sensing data is decided to becollinear to the plane defined by the above table, then, itsdistribution is recomputed as follows: among this planeset, the plane instances which are not collinear with anyof the plane instances in the given plane set, is discarded.

CONCLUSION

Based on real sensing data, the probability of thegeometry of the objects under consideration is computedand visualized. This provides us with the capability todefine the probability distribution of the geometry basedon robust computations as opposed to noisy measuringinstruments. The relations between uncertain geometriesare dependent on the uncertainty of geometries.Quantitative measurement for the constructed CAD modelcan thus be computed and decisions can be made with thehelp of the visualization modules.

REFERENCES

Bruderlin, B., 1991. Detecting ambiguities: An optimisticapproach to robustness problems in computationalgeometry. Tech. Rep. UUCS 90-003 (submitted).Computer Science Department, University of Utah,

Bruderlin, B. and S. Fang, 1992. Intuitionnistic geometry:A new approach for handling geometric robustness.Submitted to: IntI. J. Computational Geo. andApplications.

De Leon and K. Midori, 1993. Boolean operations onpolygon meshes, PhD Thesis, Texas A\&MUniversity, College Station, Texas.

Durrant-Whyte, H.F., 1986. Concerning uncertaingeometry in robotics. IEEE J. Robotics andAutomation.

Durrant-Whyte, H.F., 1988. Integration, Coordination andControl of Multi-Sensor Robot Systems. KluwerAcademic Publisher.

Fang, 1992. Robustness In geometric modeling. PhDthesis, University of Utah.

Fang, S. and B. Bruderlin, 1991. Robustness in geometricmodeling-tolerance based methods. In ComputationalGeometry-Methods, Algorithms and Applications,International Workshop on Computational GeometryCG'91, Springer Lecture Notes in Computer Science553, Bern, Switzerland.

Fang, S. and B. Bruderlin, 1992. Robust GeometricModeling with Implicit Surfaces. In: Proc. IntI.Conference on Manufacturing Automation, HongKong.

Fang, S., B. Bruderlin and X. Zhu, 1993. Robustness insolid modeling-a tolerance-based, intuitionisticapproach. To appear: Computer-Aided Design(Special Issue on Uncertainties in GeometricComputations.

Fang, S., X. Zhu and B. Bruderlin, 1992. Robustness insolid modeling-a tolerance based, intuitionisticapproach. Tech. Rep. UUCS 92-030 (submitted),Computer Science Department, University of Utah,

Fang, S. and B. Bruderlin, 1993. Obtaining robust booleanset operation for manifold solids by avoiding andeliminating redundancy. In Proc. 2nd Symposium onSolid Modeling and Applications.

J. Bertrand, Ca1cul des Probabilites. Paris, 1907.

Kendall, M. and P. Moran, 1963. Geometrical ProbabilityGriffin.

Davidson, R., 1968. Some Arithmetic and Geometry inProbability Theory, Ph.D Thesis, CambridgeUniversity.

Zhu, X., 1993. Consistent geometric modeling approaches,Master Thesis.

-

304