Thammasat Int. J. Sc.Tech.,Vol. 9, No. l, January-March 2004
Virtual Five-AxisMilling Machine: Tool Path Generationand Simulation Mud-Armeen Munlin Departmentof InformationTechnology, SirindhornIntemationalInstituteof Technology, ThammasatUniversify,RangsitCampus, PathumThani, 12121,Thailand,
[email protected] Abstract This paper presentsthe algorithmsto generateand simulatenon-lineartool path of the five-axis milling machine.The simulator is based on rD representationand employs an inverse kinematics approachto derive the correspondingrotational and translationmovementof the mechanism.The simulatormakesit possibleto analyzean accuracyof a 3D tool path basedon a prescribedset of the cutter location (CL) points as well as a set of the cutter contact(CC) points and the tool inclination angle. The resulting trajectory of the tool path is not unique and dependson the initial set up of the machinewhich in turn is problem dependent.Furthermore,the simulatorcan be usedto simulatethe milling process,verif, the final cut and estimatethe errors of the actual tool path before the real workpieceis actuallycut with the real machine.Thus, it reducesthe cost of iterativetrial and error. Tool path generationand simulation is verified by a seriesof cutting experimentsperformedby meansof the proposedsoftwareand the accuracyof milling is estimated.It has been shown that the proposedgraphical3D softwarepresentsan efficient interactiveapproachto the modificationof a tool path basedon an appropriateset of transformationsas well as verification of the tool path optimization algorithms.The result of the simulationhas beentestedusing the Maho600ES-Axis Milling Machine at ComputerIntegratedManufacturingLaboratoryat the Asian Instituteof Technology. Keywords: Inversekinematics,five-axisCNC machines,Tool path simulationand optimization. l.
Introduction Simulation of s-axismilling is a must.The softwaremust include tool path tracing,dynamic display of all moving elementscombinedwith a realistic solid modeling This paper introduces software for constructinga tool path (G-Code) from given Cl-points and simulatingtire actuai tool trajectoryoithe cutting operationsof a fiveaxis milling machine. The tool path is constructed based on the kinematics of the machine.The simulationprocessemproysthe 3D geometric modeling approach derived in the framework of inversekinematicsof the five_axis milling machine. The proposed software constitutesa basis to develop a solid modeling system for simuration, verification and optimization of the cutting operations. In particurar, the system allows for an efficient simulation of kinematics of mutti axis-milling machines.Moreover, it is possible to build j virtual environmentthat enablesthe user to
interactively evaluate the kinematics of the mechanismand estimate the geometric errors. Several physical phenomena,such as machine kinematics,thermal effects, static and dynamic loading, common-causefailures often affect the quuliry of the surfaces produced by five-axis machining' However, the particular effect of machinekinematics-geometric errorsseemsto be the mostsignificant[1,2]' Considera typical configurationof the five-,11i"9.tachine with the rotary axis on the :ii: table (Fig'l). The machine is guided by axial commands p1=(l/,$t)eR5 carrying the three spatialcoordinatesW=(xya) of the tool tip in the machine coordinateand the two rotation angles n:@,b). The tool path fl=[{o,f{,...,f1} is a "":rdjnates in the five- dimensional ::!::"": :f coordinatesof the tool path ilili;.ill.ttatial (but not necessarily)lie on the required usually surfaceS: S(z'v)' Usually' the tool visits the
ThammasatInt. J. Sc. Tech.,Vol. 9, No. l, January-March2004
4uv)4S!av)-Tftav)1, (2) positions ll p following a structured spatial pattern such as a zigzag or a spiral patern' Ho*"n"., the path could be also composedfrom where ll ll is an appropriatenorm. Optimization a variety of unconventional patterns and include (1) is subjectedto the following constraints: tool retraction [3]. l) The scallop height constraint. The In order to ensurea prescribedtolerance' the betweenthe successivetool tracks must scallop standardCAM software estimatesthe local errors not exceedthe prescribedtolerance[10]. and incorporatesadditionalpoints (if applicable) 2) The local accessibility constraint. The into a single G-Code block. However, such a insures against the removal of an constraint strategyinvokesa substantialincreaseofthe CLwhen the tool comes in contact material excess points and consequentlya substantialincreaseof surface due to the so-called desired with the the machiningtime [4]. Therefore,recentpapers surface interference and the curvature have displayed a number of sophisticated interference[4,12]. methods to optimize a zigzag or spiral pattem 3) The global accessibilityconstraint.The the combined with techniques dealing with ensuresthat the tool does not come in constraint geometric complexity of the workpiece [5,6]' with either machine parts (collision contact Besides,there exist a variety of off-line methods unwanted parts of the desired or detection) to generatea suitable non-uniform tool-path, for surface [6]. insiance:the neural network modeling approach Given the generalcontext above,we tackle a [7] and the Voronoi diagram technique [8]. particular but important problem of optimization Verification of this method requires an up to date and simulation of the rotation angles in the appropriate non-linear software involving vicinity of stationary points of the desired kinematicsas well as a solid model of the milling surface.It should be noted that there have been a machine. variety of researchfocused on the o:rientation of A full optimizationschemeinvolvesa model the cutting tool. However, the accuracy is also of cutting operations,topologiesof the prescribed affected by the way the orientations are being tool path patternsand an optimizationprocedure' achieved. In other words, the kinematics error Let p, be the parameters related to the dependsnot only on the characteristicsof the configurationofthe machine(suchas coordinates surface versus the tool orientation but on the of thi centers of rotation, workpiece offset previous rotations as well. It is not hard to p, demonstratethat the history of rotationsbecomes relativeto the machinecoordinates,etc.) and particularly important in the vicinity of the the parameters related to the tool (such as the stationarypointsof the desiredsurface.However, diameter,length, shape,etc). The model of the the best of our knowledgesuch analysisis not to cuttingoperations,being fed with p",P,,S and provided by commercial CAD/CAM software lI , producesa result of machining,namely,the suchas Unigraphics,EdgeCam,Vericut, etc. is =T(u,v). optimization The f output surfacs Therefore,we proposea global optimization to minimize the kinematicserror Ill] procedure usuallyperformedwith regardto lI and p, 'The to the feasible angles performed in regard with cuttingoperationscould be optimizedwith regard the vicinity of the stationarypoints as well as to to the machine configurationp. as well' simulate such elrors using the actual tool purely a is often machine However,the optimal trajectory generatedby our post processor.The =,S(a,v) the be optimization is performed within our post theoreticalissue [9]. Let S processorand the tool trajectory is calculatedby required surface. The general optimization applying the inverse transformation from the problemis then formulatedbY machine coordinate back to the workpiece coordinate system as described in the next ( l ) m inim ize lle ll, section. fl ,P, where t denotesthe cost function representing the error given bY
2. Tool Path Generation Considera typical configurationof the fiveaxis milline machinewith the rotary axis on the
ThammasatInt. J. Sc. Tech., Vol. 9, No. 1, January-March 2004
table as shown in Fig. L Recall that the machine is guided by axial commandscarrying the three spatialcoordinatesof the tool tip in the machine coordinate systemM and the two rotation angles. The CAM softwaregeneratesa set of successive coordinatescalled cutter location points or CLpoints (X Y,Z,I,J,K)in the workpiece coordinate Typically, the CAM software system W. distributesthe Cl-points along a set of curyes, which constitutesthe so-calledzigzag or spiral pattern. A post processipgwhich includes a transformationinto the M-systemgeneratesa set of machine axial commandswhich provide the referenceinputs for the servo-controllersof the milling machine. Considerhow the axial commandtranslates the centersof rotation and simultaneouslyrotates the ll-coordinates. Let W, and W6 be two successivespatialpositionsbelongingto the tool path and F.p, ITp,: the correspondingrotation angles. In order to calculatethe tool trajectory wa, first invoke the inverse between LYoand V[/p+t kinematics [5,9] to transform the part-surface coordinates into the machine coordinates M n=(X*Y rZ r) and M n,F(X p*1,Yp1,Zp*r). Second, the rotation angles B=fr(t):(a(t),b(t)) and the machi ne coordinates M=M(t)=(X(t),Y(t),2(t))are assumed to change linearly between the prescribedpoints,namely:
M ( t ) = t M p * t + ( l - t ) M 't , , 91(l; = l9l ",r + (l - t)fr ,.
(3)
Figure 1. Five-axismilling machine The kinematics are representedby the functions A=A(a(t)),8=B(b(t)) associatedwith the rotations around the primary (the rotary table) and the secondary (ilt table) axes respectively.They are specifiedby the structure of the machine. For the five-axis machine in Fig.1, the kinematics involving two rotations and threetranslationsare given by: M(t):B(t)(A(t)(w(t)+R)+I)+C,
where n, T, and C are respectively the coordinatesof the origin of the workpiecein the rotary table coordinates, coordinates of the origin of the rotary table coordinatesin the tilt table coordinatesand the origin of the tilt table coordinatesin the cutter centercoordinates.The generalinversekinematicsare given by: n:(At(Bt (M-q-r))-R.
where / is the fictitious coordinate(0 < I < l). Finally, invoking the transformation from M (for every t) yields W back to W(t)=(x(t)y(t),2(l)). Note that, W(t) representsthe actualtool trajectoryin the workpiececoordinate. Our tool path simulation is therefore, different form the commercialCAD/CAM systemswhere tfrey simulatethe tool path directly from the CLpoints and hence it does not representthe actual tool trajectory.As a result,kinematicserrorscan not be detectedand minimized.
(4)
(s)
In this work, we develop our virtual machinefor generatingand simulating the tool trajectory using the following sequence of transformations to represent the inverse kinematicsof the real five-axismachine. l. Transforma Cl-point Pt @,y, z, i, j, k) into the local coordinatesystem (LCS) of the rotary table by meansof the rotation matrix R1 and the translationvector I1. The new position is P2 : R (Pt Tr). 2. Transform P2 into the LCS of the tilt table by translationvector Z2and rotationR2and R;. The new positionis P; : R 3R 2 (P 2+ T). 3. TransformP: until it is coincidentwith the LCS of the tool tip by translationvector 4. The final positionis Py : P3+ T3.
2004 Int. J. Sc.Tech.,Vol. 9, No. l, January-March Thammasat
The translation vectors are given by fr : = ffi,, \r, fi,f, : Itv, try. tbl, T2 ltu' tzy,tul, Tt where /;, tiy, tp uta the corresponding offsets which depend on the reference position of the machine.The rotation matrices are given by: sin(l)
(cos(A)
0)
R,=[-sin(l) cos(r) ?,,J (o o -t)
R , = l r0 o l , u 0 0)
(cos(B)0 - sin(a)'l 0 I R,=l 0 | [sin(B)
0
Figure 2. Non linear trajectory of the tool path
cos(B)/
The rotation anglesare: A--tan" 11ti1,O