Modeling and Control of Contouring Errors for Five-Axis...

8
Burak Sencer Ph.D. Candidate Yusuf Altintas Professor, ASME Fellow Elizabeth Croft Professor Manufacturing Automation Laboratory, University of British Columbia, Vancouver, BC, V6T 1Z4, Canada Modeling and Control of Contouring Errors for Five-Axis Machine Tools—Part I: Modeling Aerospace, die, and mold industries utilize parts with sculptured surfaces, which are machined on five-axis computer numerical controlled machine tools. Accurate path track- ing for contouring is not always possible along the desired space curves due to the loss of joint coordination during the five-axis motion. This two-part paper presents modeling and robust control of contouring errors for five-axis machines. In Part I, two types of contouring errors are defined by considering the normal deviation of tool tip from the reference path, and by the normal deviation of the tool axis orientation from the reference orientation trajectory defined in the spherical coordinates. Overall contouring errors are modeled during five-axis motion that has simultaneous translation and rotary motions. The coupled kinematic configuration and the rigid body dynamics of all five drives are considered. The contouring error model is experimentally validated on a five-axis ma- chine tool. The error model developed in this paper is then used for simultaneous, real- time robust control of all five drives in Part II. DOI: 10.1115/1.3123335 1 Introduction Five-axis computer numerical controlled CNC machine tools are widely used in machining parts with complex sculptured sur- faces such as dies, molds, and aerospace parts. The ultimate goal of for these industrial machining applications is to attain high dimensional accuracy in five-axis machining at fast cutting and feed speeds. However, the dimensional accuracy of the part is affected by the relative structural and thermal deformations of the tool and workpiece, volumetric accuracy of the machine tool 1, and contouring errors induced by the feed drive control system. Each drive on the machine tool is subject to unavoidable tracking errors between the commanded and actual positions due to the servo controller dynamics. These tracking errors are kinematically transformed to the tool tip, resulting in contouring errors between the commanded tool-path and actual path delivered by the CNC unit. The dedicated control law of each drive tries to minimize the tracking error e x , e y , e z ,... independent of other drives. As a con- sequence of the non-Cartesian kinematics of the five-axis machine tool, small tracking errors on rotary axes may result in larger deviations of the tool tip from the reference tool-path relative to the workpiece. In addition, when one axis is subject to a distur- bance, other axes will perform as if the disturbed axis is function- ing normally. This results in a loss of coordination and degrada- tion of the overall contouring accuracy. The contour error , which is defined as the orthogonal de- viation from the desired tool-path 2, is the actual measure of the part accuracy. Figure 1 shows the relationship between contour error and the axis tracking errors for simple linear and curved tool-paths. When following a linear tool-path see Fig. 1a, the contour error can be expressed as a simple analytical function of the axis tracking errors e x , e y as =- C x e x + C y e y C x = sin C y = cos 1 On the other hand, while machining curved tool-path such as B-splines or Nurbs, accurate computation of the contour errors becomes more challenging Fig. 1b. Koren and Lo 3 used Eq. 1 in estimating the contour errors in two-axis machining along simple linear tool-paths. They proposed the first cross coupling control CCC algorithm to reduce the normal deviation of the tool tip from the path. Later, Koren and Lo 4 extended the con- tour error estimation to design a CCC algorithm for circular tool- paths. Erkorkmaz and Altintas 5 estimated the contour error along arbitrary tool-paths by computing the Euclidian distance from the desired tool-path to the actual tool position in the vicinity of n number of interpolated points, and identified the reference point with the minimum deviation from the actual tool tip. The contour error vector was then defined to be normal to the vector between the identified and the consecutive reference path points. As a result, the shortest vector normal to the desired contour is obtained, but the computationally intensive nature of the iterative solution proposed was undesirable for real-time control. Chiu and Tomizuka 6 developed an analytical contour error estimation procedure for two-axis machining of C 2 continuous curved tool- paths. They reflected the tracking errors of the Cartesian axes on the tangent and normal directions of the tool-path, and considered the error component in the normal direction as the approximation of actual contour error. Later, Yeh and Hsu 7 defined the gains C x t , C y t in Eq. 1 to vary as a function of the time. Thus, they were able to estimate contour errors also for splines and curved paths. The contour error approximation becomes inaccurate if the error in tangent direction is high. This occurs particularly during high speed machining of paths with sharp curvature changes. Peng and Chen 8 attacked this problem and modified the previous approximations with addition of an extra term so that the overcut- ting of the path is avoided in two-axis Cartesian motions. Apart from Cartesian contouring systems, Katz et al. 9 addressed the contouring problem on a nonorthogonal reconfigurable three-axis machine tool. They modeled the kinematics of the machine tool and designed time varying gains for Eq. 1 in order estimate the contour errors. Lin and Hu 10 used the kinematics of a five-axis machine tool and estimated contour errors of the tool tip only as Contributed by the Manufacturing Engineering Division of ASME for publication in the JOURNAL OF MANUFACTURING SCIENCE AND ENGINEERING. Manuscript received July 14, 2008; final manuscript received February 27, 2009; published online May 1, 2009. Review conducted by Eric R. Marsh. Journal of Manufacturing Science and Engineering JUNE 2009, Vol. 131 / 031006-1 Copyright © 2009 by ASME Downloaded 23 Nov 2010 to 133.6.188.55. Redistribution subject to ASME license or copyright; see http://www.asme.org/terms/Terms_Use.cfm

Transcript of Modeling and Control of Contouring Errors for Five-Axis...

Page 1: Modeling and Control of Contouring Errors for Five-Axis ...research.engr.oregonstate.edu/mpcl/resources/5-Ax-CC1.pdf · Five-axis computer numerical controlled #CNC$ machine tools

Burak SencerPh.D. Candidate

Yusuf AltintasProfessor,

ASME Fellow

Elizabeth CroftProfessor

Manufacturing Automation Laboratory,University of British Columbia,

Vancouver, BC, V6T 1Z4, Canada

Modeling and Control ofContouring Errors for Five-AxisMachine Tools—Part I: ModelingAerospace, die, and mold industries utilize parts with sculptured surfaces, which aremachined on five-axis computer numerical controlled machine tools. Accurate path track-ing for contouring is not always possible along the desired space curves due to the lossof joint coordination during the five-axis motion. This two-part paper presents modelingand robust control of contouring errors for five-axis machines. In Part I, two types ofcontouring errors are defined by considering the normal deviation of tool tip from thereference path, and by the normal deviation of the tool axis orientation from the referenceorientation trajectory defined in the spherical coordinates. Overall contouring errors aremodeled during five-axis motion that has simultaneous translation and rotary motions.The coupled kinematic configuration and the rigid body dynamics of all five drives areconsidered. The contouring error model is experimentally validated on a five-axis ma-chine tool. The error model developed in this paper is then used for simultaneous, real-time robust control of all five drives in Part II. !DOI: 10.1115/1.3123335"

1 IntroductionFive-axis computer numerical controlled #CNC$ machine tools

are widely used in machining parts with complex sculptured sur-faces such as dies, molds, and aerospace parts. The ultimate goalof for these industrial machining applications is to attain highdimensional accuracy in five-axis machining at fast cutting andfeed speeds. However, the dimensional accuracy of the part isaffected by the relative structural and thermal deformations of thetool and workpiece, volumetric accuracy of the machine tool !1",and contouring errors induced by the feed drive control system.Each drive on the machine tool is subject to unavoidable trackingerrors between the commanded and actual positions due to theservo controller dynamics. These tracking errors are kinematicallytransformed to the tool tip, resulting in contouring errors betweenthe commanded tool-path and actual path delivered by the CNCunit.

The dedicated control law of each drive tries to minimize thetracking error #ex ,ey ,ez , . . .$ independent of other drives. As a con-sequence of the non-Cartesian kinematics of the five-axis machinetool, small tracking errors on rotary axes may result in largerdeviations of the tool tip from the reference tool-path relative tothe workpiece. In addition, when one axis is subject to a distur-bance, other axes will perform as if the disturbed axis is function-ing normally. This results in a loss of coordination and degrada-tion of the overall contouring accuracy.

The contour error #!$, which is defined as the orthogonal de-viation from the desired tool-path !2", is the actual measure of thepart accuracy. Figure 1 shows the relationship between contourerror and the axis tracking errors for simple linear and curvedtool-paths. When following a linear tool-path #see Fig. 1#a$$, thecontour error #!$ can be expressed as a simple analytical functionof the axis tracking errors #ex ,ey$ as

% ! = ! Cxex + Cyey

Cx = sin#"$Cy = cos#"$

& #1$

On the other hand, while machining curved tool-path such asB-splines or Nurbs, accurate computation of the contour errorsbecomes more challenging #Fig. 1#b$$. Koren and Lo !3" used Eq.#1$ in estimating the contour errors in two-axis machining alongsimple linear tool-paths. They proposed the first cross couplingcontrol #CCC$ algorithm to reduce the normal deviation of thetool tip from the path. Later, Koren and Lo !4" extended the con-tour error estimation to design a CCC algorithm for circular tool-paths. Erkorkmaz and Altintas !5" estimated the contour erroralong arbitrary tool-paths by computing the Euclidian distancefrom the desired tool-path to the actual tool position in the vicinityof n number of interpolated points, and identified the referencepoint with the minimum deviation from the actual tool tip. Thecontour error vector was then defined to be normal to the vectorbetween the identified and the consecutive reference path points.As a result, the shortest vector normal to the desired contour isobtained, but the computationally intensive nature of the iterativesolution proposed was undesirable for real-time control. Chiu andTomizuka !6" developed an analytical contour error estimationprocedure for two-axis machining of C2 continuous curved tool-paths. They reflected the tracking errors of the Cartesian axes onthe tangent and normal directions of the tool-path, and consideredthe error component in the normal direction as the approximationof actual contour error. Later, Yeh and Hsu !7" defined the gainsCx#t$ ,Cy#t$ in Eq. #1$ to vary as a function of the time. Thus, theywere able to estimate contour errors also for splines and curvedpaths. The contour error approximation becomes inaccurate if theerror in tangent direction is high. This occurs particularly duringhigh speed machining of paths with sharp curvature changes. Pengand Chen !8" attacked this problem and modified the previousapproximations with addition of an extra term so that the overcut-ting of the path is avoided in two-axis Cartesian motions. Apartfrom Cartesian contouring systems, Katz et al. !9" addressed thecontouring problem on a nonorthogonal reconfigurable three-axismachine tool. They modeled the kinematics of the machine tooland designed time varying gains for Eq. #1$ in order estimate thecontour errors. Lin and Hu !10" used the kinematics of a five-axismachine tool and estimated contour errors of the tool tip only as

Contributed by the Manufacturing Engineering Division of ASME for publicationin the JOURNAL OF MANUFACTURING SCIENCE AND ENGINEERING. Manuscript receivedJuly 14, 2008; final manuscript received February 27, 2009; published online May 1,2009. Review conducted by Eric R. Marsh.

Journal of Manufacturing Science and Engineering JUNE 2009, Vol. 131 / 031006-1Copyright © 2009 by ASME

Downloaded 23 Nov 2010 to 133.6.188.55. Redistribution subject to ASME license or copyright; see http://www.asme.org/terms/Terms_Use.cfm

Page 2: Modeling and Control of Contouring Errors for Five-Axis ...research.engr.oregonstate.edu/mpcl/resources/5-Ax-CC1.pdf · Five-axis computer numerical controlled #CNC$ machine tools

the difference between the reference and the actual circle radii,during simple circular interpolation. Later, Lo !11" designedcoupled proportional-integral-derivative #PID$ controllers andshowed that minimizing the tracking errors of the tool tip in theworkpiece coordinates results in better contouring performance.

Past literature has been mainly addressed the contouring controlproblem for three-axis Cartesian machining applications, wherethe contour error is simply defined as the norm of the translationaldeviation of the tool tip from the reference tool-path. However,the tool translates and rotates to follow the reference orientation infive-axis machining !12,13" #Fig. 2#a$$, producing both the “tooltip contour error” and the “tool orientation contour error,” as il-lustrated in Fig. 2#b$. Similar to two- or three-axis Cartesian ma-chining applications, tool tip contour error is very important foravoiding both overcutting and undercutting during general pointmilling operations. On the other hand, the tool orientation contourerror is defined as the normal angular deviation of the tool axisfrom desired orientation trajectory. As shown in Fig. 2#b$, orien-tation contour error becomes detrimental to part tolerances, espe-cially in flank milling operations where the cutting is performedmainly along the tool axis. Consequently, when using flat or tor-oidal end mils, the combination of the tool tip and tool orientationerrors causes gouging of the workpiece. In order to attain desiredpart tolerances, both the tool tip and the tool axis orientation con-tour errors need to be controlled.

This two-part paper series presents the modeling and control ofcontouring errors in five-axis machining. Part I presents the mod-eling of five-axis machine kinematics, dynamics, and the predic-tion of the contour errors. Section 2 describes the kinematic mod-eling of the five-axis machine tool, which is then used in the

formulation of the general tracking error dynamics of the toolduring five-axis motion. The prediction model for tool tip andorientation contouring errors is presented in Sec. 3. The predictedcontour errors are compared experimentally against the measurederrors in Sec. 4, and the paper is concluded in Sec. 5. The contourerror model is later used in the design of a sliding mode contourerror controller that is presented in Part II of the series.

2 Kinematic Model of Five-Axis MachineThe motion of the tool during five-axis contouring operation

depends on the movement of the physical drives of the machinetool. A widely used, tilting-rotary-table type kinematic configura-tion !14" is taken as an example here, as illustrated in Fig. 3. Thefive-axis machine has three translational motions, x, y, and z,combined with the rotations "a and "c of the a and c rotary drives,respectively. The tool positions are expressed in the workpiececoordinate system #P-system$ by the position vector of the tool tipP#t$= !Px#t$ , Py#t$ , Pz#t$"T, and by the unit vector defining the toolaxis orientation O#t$= !Oi#t$ ,Oj#t$ ,Ok#t$"T , 'O'=1 #see Fig. 2#a$$.

The reference tool-path variables #Px,Py, Pz, Oi, Oj, and, Ok$ inthe P-system are transformed into position commands of thephysical drives of the machine tool

y

x!

ReferencePosition

Actual ToolPosition

a) Contour Error (Linear Tool-path)

" ex

b) Contour Error (Curved Tool-path)

"1

"2

ReferencePositiony

x

DesiredContour

ex1

ex2

ey2ey1

ey

Fig. 1 Definition of contour errors in two-axis Cartesianmachining

P = [Px Py Pz]T

O = [Oi Oj Ok]T

XY

ZWorkpiece Coordinate

System

Cutter ContactPoint

Tool Tip Point

a) Tool Motion in Workpiece Coodinates(P-System)

b) Contour Error Defitition for Five-Axis(Orientation and Tool Tip Contour Errors)

!

Actual ToolOrientation

"

Actual ToolTip PointSurface

Fig. 2 Tool motion in workpiece coordinates „P-system…

Inverse KinematicsTransformation

q = [x, y, z, a, c]TMachine Axis Motion

(M-system)[Px Py PzOi Oj Ok]

Tool Motion in P-System

!a

!c

ReferenceCoordinate Sys.

ToolCoordinate Sys.

a2

d4

Tilt-AxisCoordinate Sys.

Rotary-AxisCoordinate Sys.

TableCoordinate Sys.x

z

y

Fig. 3 Tilting rotation table „TRT… five-axis machine tool

031006-2 / Vol. 131, JUNE 2009 Transactions of the ASME

Downloaded 23 Nov 2010 to 133.6.188.55. Redistribution subject to ASME license or copyright; see http://www.asme.org/terms/Terms_Use.cfm

Page 3: Modeling and Control of Contouring Errors for Five-Axis ...research.engr.oregonstate.edu/mpcl/resources/5-Ax-CC1.pdf · Five-axis computer numerical controlled #CNC$ machine tools

q#t$ = !x#t$,y#t$,z#t$,"a#t$,"c#t$"T #2$

where x, y, z, "a, and "c are the axis coordinates in the machinetool coordinate system #M-system$.

The transformation from the P-system to the M-system is car-ried out using an inverse kinematics transformation in two steps!15". The angular motions of the rotary axes are obtained from

( "a = ! sin!1#Ok$ ,#! # $ a % #$"c = tan!1#Oi,Oj$ ,#Oi = Oj ! 0$

#3$

which are kinematically transformed to define the tool axis direc-tion as

#4$

The rotary axis velocities #"a#t$ and "c#t$$ are related to the angu-

lar velocity vector #!#t$= !Oi#t$ , Oj#t$ , Ok#t$"T$ of the tool by theorientation Jacobian JO!R3&2 of the machine

#5$

The Cartesian axes positions !x#t$y#t$z#t$"T are evaluated by ap-plying Devanit–Hartenberg method !16" on the machine shown inFig. 3.

)x#t$y#t$z#t$

* = ) ! cos#"c#t$$ sin#"c#t$$ 0

! cos#"a#t$$sin#"c#t$$ ! cos#"a#t$$cos#"c#t$$ sin#"a#t$$sin#"a#t$$sin#"c#t$$ sin#"a#t$$cos#"c#t$$ cos#"a#t$$

*)Px

Py

Pz* + ) 0 0

sin#"a#t$$ 0

cos#"a#t$$ ! 1*+d4

a2, #6$

where d4 and a2 are linear offsets between the rotary drive coordinate frames. The coordinates of the tool tip position in the P-systemcan be evaluated from Eq. #2$ as a function of the axis positions as

#7$

The direct kinematic transformation #Eq. #7$$ shows that transla-tional #x ,y ,z$ and rotational #"a ,"c$ drive positions in theM-system govern the tool tip location #P= !PxPyPz"T$ on theworkpiece surface. Consequently, the tracking error on any driveis reflected on the tool tip; hence, this error will contribute to thecontouring error along the path. A “tool pose variable,” which willbe used later for the controller design, is defined as

#8$

which contains the tool tip location in the P-system and the tworotary drive positions. The partial derivatives of the tool tip coor-dinates with respect to the axis positions are obtained by differen-tiating Eq. #7$ as follows:

Jij ="Pi

"qji ! #x,y,z$, qj ! #x,y,z,"a,"c$ #9$

and by adding two unity elements on the diagonal for the rota-tional drive positions, the following square Jacobian matrix #J#t$!R5&5$ is formed:

J#t$ = )J11 J12 J13 J14 J15

J21 J22 J23 J24 J25

J31 J32 J33 J34 J35

0 0 0 1 0

0 0 0 0 1* #10$

The Jacobian matrix relates the drive velocities #q#t$$ and accel-erations #q#t$$ to the tool pose kinematics #x#t$ and x#t$$ as

#11$3 Real-Time Prediction of Contouring Errors

Contour errors left on the finished surface vary as a nonlinearfunction of the tracking errors of the tool, while the tool movesalong the reference tool-path. Tracking errors of the tool, on theother hand, are governed by the machine kinematics and the errorsof the axis servo drives.

Journal of Manufacturing Science and Engineering JUNE 2009, Vol. 131 / 031006-3

Downloaded 23 Nov 2010 to 133.6.188.55. Redistribution subject to ASME license or copyright; see http://www.asme.org/terms/Terms_Use.cfm

Page 4: Modeling and Control of Contouring Errors for Five-Axis ...research.engr.oregonstate.edu/mpcl/resources/5-Ax-CC1.pdf · Five-axis computer numerical controlled #CNC$ machine tools

3.1 Tracking Error Dynamics on the Workpiece. The sim-plified linear dynamics of a typical feed drive system is presentedin Fig. 4. The corresponding rigid body model can then be ex-pressed as

#12$

where mi=Ji /KaiKtirgi is the equivalent inertia, ci=Bi /KaiKtirgi isviscous damping, ui#t$ is control voltage produced by the digitalcontrol law of the drive, di#t$ is equivalent disturbance, and thesuffix i=x ,y ,z ,a ,c denotes x ,y ,z ,a ,c drives, respectively. Ka andKt are the amplifier and motor torque constants, and rg is the gearreduction ratio of the drives. The drive accelerations #q$ can berepresented in compact form by

q#t$ = M!1!u#t$ ! d#t$ ! Cq#t$" #13$By substituting the kinematics relationships from Eq. #11$ into Eq.#13$, the drive dynamics can be mapped to the tool pose as

x#t$ = J#t$q#t$ + J#t$M!1!u#t$ ! d#t$ ! Cq#t$" #14$The actual position, velocity, and acceleration of the pose can bewritten as a sum of the reference commands and correspondingtracking errors

xref#t$ = !Px,ref,Py,ref,Pz,ref,aref,cref"T, e#t$ = !ePx,ePy,ePz,ea,ec"T

! e = xref ! x #15$Substituting Eq. #16$ into Eq. #14$, the tracking error dynamics ofthe tool is expressed by

e#t$ = xref#t$ ! J#t$q#t$ ! J#t$M!1!u#t$ ! d#t$ ! Cq#t$" #16$Note that in Eq. #16$, the vector xref#t$ is trajectory dependent

where J#t$ and J#t$ introduce time varying nonlinear couplingsince they depend on the drive position as well as on velocities.

3.2 Tool Tip Contour Error Estimation. The reference tra-jectory of the tool tip #Pref= !Px,ref , Py,ref , Pz,ref"T$, the correspond-ing tracking errors #eP= !ePx ,ePy ,ePz"T$, as well as the contourerror vector #"$ are illustrated in Fig. 5#a$. The mutually orthogo-nal unit tangent, t#t$, and normal, n#t$, vectors along the path arecomputed using the reference velocity and acceleration of the tooltip;

t = + Px,ref

-Pref-,

Py,ref

-Pref-,

Pz,ref

-Pref-,T

, n = + Px,ref

-Pref-,

Py,ref

-Pref-,

Pz,ref

-Pref-,T

#17$

where Pref=dPref /dt and Pref=d2Pref /dt2. By defining the binor-mal vector b#t$= t#t$&n#t$, a moving local coordinate frame,namely, a Frenet frame !17", on the tool-path at reference toolcenter point #Pref#t$$ is defined as #!t#t$ ,n#t$ ,b#t$"3&3$. The Frenetframe in Cartesian coordinates is shown in Fig. 5#a$ and modifiedas

F#t$ = )tx nx bx 0 0

ty ny by 0 0

tz nz bz 0 0

0 0 0 1 0

0 0 0 0 1* #18$

to include the rotation errors. The following coordinate transfor-mation holds:

e#t$ = F#t$eF#t$ " eF#t$ = FT#t$e#t$ #19$where FT=F!1, and e= !ex ,ey ,ez ,ea ,ec"T and eF#t$= !et ,en ,eb ,ea ,ec"T are vectors that contain tracking errors of thetool tip in the workpiece coordinate system and in the Frenetframe, respectively. As shown in Fig. 5#a$, the vector sums of theerrors in normal and binormal directions represent an approxima-tion to the contour error vector as

! . en + eb #20$If the tool-path does not contain sharp curvatures and the feedswere low, the contouring error vector expressed in Eq. #20$ issufficiently accurate. However, at high speed contouring, the lim-ited control bandwidth of the drives creates a time delay betweenthe reference and actual positions of the tool. The tracking errorsof the rotary drives may offset the workpiece and can even causethe actual tool position to lead the reference trajectory duringfive-axis machining. The delay or lead time between the referenceand the actual tool tip positions is estimated from the error intangent direction #et$ as

td =et

/Px,ref2 + Py,ref

2 + Pz,ref2

#21$

and is used to shift the Frenet frame in time as follows:

F = F#t ! td$ #22$Since the reference trajectory is generated in advance, one cansimply use the shifted Frenet frame #F$ and utilize the normal and

Js+B1 rg s

1KtKau i Tm

Td! x. x

CurrentAmplifier

Motor Inertia andViscousDamping

LeadScrew

ControlSignal

Disturbance

-

Fig. 4 Axis dynamics

t

nb

F F

e

e

h

!

et!

Feenn++eebbeenn++eebb

Workpiece CoordinateSystem

xy

z

xy

z

Desired Contour

P xref, Pyref, Pzref

P x,Py,P z

Actual Tool TipLocation

Actual Tool TipLocation

a) b)

Fig. 5 Tool tip contour error estimation

031006-4 / Vol. 131, JUNE 2009 Transactions of the ASME

Downloaded 23 Nov 2010 to 133.6.188.55. Redistribution subject to ASME license or copyright; see http://www.asme.org/terms/Terms_Use.cfm

Page 5: Modeling and Control of Contouring Errors for Five-Axis ...research.engr.oregonstate.edu/mpcl/resources/5-Ax-CC1.pdf · Five-axis computer numerical controlled #CNC$ machine tools

binormal error components to improve the contour error estima-tion. Although the direction of the contour error vector is esti-mated more accurately, such a transformation does not evaluatethe amplitude #'"'$ accurately, leading to over- or undercuts duringactual contouring control. As illustrated in Fig. 5#b$, the vectorbetween the current and the delayed reference positions is ex-pressed as

h = )Pref#t$ ! Pref#t ! td$0

0*, h ! R5&1 #23$

and its representation on F is computed by

hF = FTh #24$

In order to correct the estimation, only the normal and binormalcomponents are used, and the tangent component is excluded bymultiplying with W=diag#0,!1,!1,1 ,1$,

hF = WhF #25$

The tracking errors on the compensated Frenet frame F become

eF = FTe + hF #26$

As shown in Fig. 5#b$, the sum of vector components in the nor-mal and binormal directions #en+ eb$ obtained from Eq. #26$ moreaccurately approximates the actual contour error along arbitrarytool-paths.

3.3 Tool Orientation Contour Error Estimation. As shownin Fig. 6, there is a difference in the definition of tool orientationtracking error vector eo, and the actual orientation contour errorvector ", both defined in the spherical coordinate system. Theorientation tracking error vector is measured from the current toolorientation #O$ to the current reference orientation #Oref$. By sim-ply minimizing the tracking errors of the rotary drives, the orien-tation tracking errors can be eliminated. However, doing so doesnot necessarily rotate the tool closer to the desired orientationtrajectory. The tool orientation may be corrected by eliminatingthe approximated contour error vector "0 #see Fig. 6$.

Similar to the Cartesian contour error approximation, the orien-

tation contour error vector is predicted by transforming the track-ing errors to obtain the vector that is normal to the referencetrajectory as

"o = )!oi

!oj

!ok* = eo !

!

'!'eo · !

'!'#27$

where != !!i! j!k"T is the angular velocity vector. Normalizingthe velocity of the tool axis, !=! / '!', we can rewrite Eq. #27$ as

"o = eo ! !#eo · !$ #28$From the kinematics of the five-axis machine tool, it is known thatthe orientation Jacobian #JO$ in Eq. #1$ relates the rotary axisvelocities #v= !va ,vc"T$ to the orientation velocity of the tool

! = kJov #29$where v=v / 'v' is the unit vector velocity in the M-system and k= '!' / 'v' is a scalar.

In addition, assuming that the orientation errors are compen-sated with small drive rotations within the control sampling inter-val T=1 msec#millisecond$, we can use the following approxima-tion:

eo 0 JOeR #30$where eR= !ea ,ec"T is the array containing the individual rotarydrive errors. Substituting Eqs. #29$ and #30$ into #28$ results in

"o = JOeR ! k2JOvvTJOT JOeR #31$

Using Eq. #29$ and properties of the unit vectors #! ,v$, it can beshown that

vTv = !T! = k2vTJOT JOv = 1 ! k2vTJO

T JO = vT #32$which allows us to simplify Eq. #31$ as

#33$

As a result, the relationship between the tool orientation contourerror #"o$ in the P-system and the corresponding rotary driveerrors #"R= !!a ,!c"$ in the M-system is obtained from Eq. #33$ as

"R = +!a

!c, = eR ! v#v · eR$ #34$

4 Implementation and Experimental ResultsThe proposed contouring error prediction models are experi-

mentally validated on a five-axis machine tool shown in Fig. 7.The in-house developed research CNC has an open architecture,which allows rapid implementation of trajectory generation andcontrol laws. The Cartesian x-y table carries the rotary drives, andthe z-axis carries the spindle. The Cartesian drives have 2.9 'mencoder resolutions. The rotary table is driven by the a and cdrives equipped with 8.7 'rad resolution encoders where the off-set between their axis or rotation is a2=70 mm. The dynamicparameters of the drives identified experimentally !18" are pre-sented in Table 1.

All five drives are individually controlled by robust slidingmode controllers #SMCs$ in order to obtain higher tracking per-formance. The design procedure is presented by Altintas et al. !19"where the sliding surface is based purely on the tracking errors ofthe individual axes #Eq. #12$$. Thus, the SMC of each axis drive istuned separately, and the bandwidth of each Cartesian axis isclosely matched in order to obtain better contouring performance#see Table 2$.

The proposed contour estimation, as well as the robust axiscontrol algorithms, was implemented on the LABVIEW RT© systemcomprised by two personal computers for real-time computationof the control law, and a field programmable gate array #FPGA$

ij

k

O = Actual ToolOrientation

eo

!

Oref

"o

"

DesiredOrientationTrajectory

Fig. 6 Orientation contour error estimation

Journal of Manufacturing Science and Engineering JUNE 2009, Vol. 131 / 031006-5

Downloaded 23 Nov 2010 to 133.6.188.55. Redistribution subject to ASME license or copyright; see http://www.asme.org/terms/Terms_Use.cfm

Page 6: Modeling and Control of Contouring Errors for Five-Axis ...research.engr.oregonstate.edu/mpcl/resources/5-Ax-CC1.pdf · Five-axis computer numerical controlled #CNC$ machine tools

card for data acquisition and decoding of the encoder signals. Thesampling rate of the control loop is fixed to 1 kHz.

The effectiveness of the proposed five-axis contour error esti-mation algorithms is demonstrated on a tool-path that contains acircular contour for the tool tip motion and smoothly varying ori-entation for the tool axis.

The reference five-axis test tool-path is analytically given by

%Pxref = 15 cos#l$ + 5 sin#l$Pyref = 15 sin#l$ ! 5 cos#l$Pzref = 15l

aref = ! sin!1#sin#l$//5$cref = ! tan#cos#l$//5$

& l = 0 ¯ 4# #35$

and shown in Fig. 8. The reference path of the tool orientationcontinuously changes as shown in Fig. 8#b$. The path of the tooltip follows a circular motion in the x-y plane, and at the same timethe cutter moves in the z direction where the total distance oftravel along the workpiece is about 273.87 mm. The referencetool-path is interpolated by generating a smooth trajectory with amaximum cruise feed of 50 mm/s and cubic acceleration/decelerations not exceeding 1500 mm /s2.

In order to investigate the accuracy of the proposed five-axistool tip contour error computation methods, the basic Frenet frame#Eq. #20$$, shifted Frenet frame #Eq. #22$$, and the compensatedFrenet frame #Eq. #26$$ are compared against the true tool tipcontour errors as shown in Fig. 9. The true contouring errors arecalculated through an iterative search of the shortest distance be-tween the tool tip position and the actual path as presented byErkorkmaz and Altintas !5", measured in the workpiece coordinate

system. The proposed compensated Frenet frame approximationprovides the most accurate estimation of the contour errors asshown in Fig. 9#a$. Severe peaks in the contour error trend can beobserved at times 11 s, 2.2 s, 3.5 s, and 5 s during air cutting. Inaddition, relatively smaller jumps occur in between at 11.5 s, 3 s,3.5 s, and 4.2 s. As the rotational axes go through a directionreversal during five-axis operation, the joint velocity changes rap-idly with high acceleration, and, at the same time, the Coulombfriction at the joint acts as a sudden step disturbance to the drive.Each axis controller deals with the disturbance individually andtries to track the high acceleration reference command. The dis-turbance is rejected in finite time, and severe tracking error at theaxis level occurs jeopardizing the coordination between thedrives. This deteriorates the contouring performance severely.Thus, contour error peaks in Fig. 9#a$ coincide with the locationswhen the a rotary axis goes through velocity reversal, and smallererror peaks are related to the tracking performance of the c axis#see Figs. 10#a$ and 10#b$$. This indicates that during five-axismachining not only the Cartesian but also the rotary drives con-tribute strongly to the contouring performance. A closer view ofthe estimation errors of the basic, delayed, and compensatedFrenet frame is shown in Fig. 9#b$. All the proposed methodsestimate the contour errors within an acceptable average estima-tion discrepancy #0.01–0.05 'm$. The most severe cases occurwhen the contour error spikes above 300 'm where the actualtool tip has its maximum lag from the reference point. This lagcan be observed from the delay time computed from Eq. #22$ andplotted in Fig. 9#c$. The basic and compensated Frenet frame ap-proximations show good performance even at these locations withestimation errors as high as 0.1 'm and 0.05 'm, respectively.

-Workstation PC.Read NC-Program

-Real Time Control PC (1kHz).Decode NC-Program.Generate Trajectorylinear, circular, spline.Position ControlPID, ZPECT, SMC, Fric.Comp

Ethernet

- FPGA Board (40kHz).Read ADC.Quadrature Encoder Decoding.Write DAC

PCI Bus

LabviewRealTime

EncoderFeedback

Motor CurrentCommand

Fig. 7 Five-axis machine tool

Table 1 Drive parameters

x-axis

y-axis

z-axis

a-axis

c-axis

m=J /KaKtrg 0.00162 V s2 /mm 0.00174 V s2 /mm 0.00296 V s2 /mm 0.00682 V s2 / rad 0.00054 V s2 / radc=B /KaKtrg 0.00681 V s /mm 0.00863 V s /mm 0.01518 V s /mm 0.01964 V s / rad 0.00368 V s / rad

Table 2 Five-axis SMC parameters „SISO scheme…

SMC parametersx

-axisy

-axisz

-axisa

-axisc

-axis

(n #rad/s$ 200 200 180 150 200Ks #V /nm s$ #V / rad s for rotary drives$ 7 5 5 0.5 1Disturbance adaptation gain ) #V/mm or rad$ 25 30 15 3 3

031006-6 / Vol. 131, JUNE 2009 Transactions of the ASME

Downloaded 23 Nov 2010 to 133.6.188.55. Redistribution subject to ASME license or copyright; see http://www.asme.org/terms/Terms_Use.cfm

Page 7: Modeling and Control of Contouring Errors for Five-Axis ...research.engr.oregonstate.edu/mpcl/resources/5-Ax-CC1.pdf · Five-axis computer numerical controlled #CNC$ machine tools

As a result, both the basic and the compensated Frenet framemethods prove to be sufficiently accurate for contouring controleven when the tool tip deviates high from the desired path. On theother hand, the delayed Frenet frame shows the worst perfor-mance confirming that the offset h in Eq. #23$ must be compen-sated to estimate the amplitude of the contour error accurately.

Similar to the Cartesian case, the actual orientation contourerror vector can be obtained by iteratively finding the closest nor-mal point to the actual reference orientation tool-path in sphericalcoordinates. The actual orientation contour error vector #!$ iscomputed and transformed into the corresponding a and c rotarydrive tracking errors #!a,c$ using the orientation Jacobian #Eq.#30$$

!A,C 0 JO! #36$and compared against the proposed analytical estimation given inEq. #34$. Figure 10 represents the experimentally recorded rotarydrive tracking errors, as well as the true and estimated orientationcontour errors expressed in drive coordinates. As shown in Figs.

10#a$ and 10#b$, the transformation of the orientation contour er-rors computed from Eqs. #30$ and #34$ match, and they both showdistinct error trends in comparison to the tracking errors of therotary drives. Rotary drive tracking errors show peaks due to theCoulomb friction at path locations when a and c axes go throughvelocity reversals. The orientation contour error componentsmainly follow the tracking errors, indicating that the motionshould be synchronized. However, deviations between the trendsoccur especially when the synchronization is lost as one rotarydrive is exposed to a velocity reversal yielding high tracking er-rors and the other one does not. In Fig. 10#a$ one can see that thea rotary drive tracking and orientation error trends differ fromeach other around 0.5 s, 1.5 s, 3 s, and 4 s on the time scale,corresponding to the locations where the c rotary drive has itshighest tracking errors. Similar observation can be made for the caxis at 1 s, 2.5 s, 3.5 s, and 5 s, indicating that elimination oforientation contour errors is crucial in establishing synchroniza-tion of the drives toward improving the part accuracy. Figures10#c$ and 10#d$ show the deviation of the proposed analytical

-30-20

-100

-10

0

10

20

0

20

40

60

80

100

120

140

160

180

z[mm]

z[mm]

x [mm] i

jy [mm]

-1

1

1

-1

1 k

a) Reference Tool Tip (Pref=[Px,Py,Pz]) Path b) Reference Tool Axis Orientation Path(Oref=[Oi,Oj,Ok])

Fig. 8 Experimental tool-path

0

200

400a) Comparison of True and Estimated Tool Tip Contour Errors

True Tool Tip Contour Error(solid)& Proposed Estimation(dashed)

ContourError

[micron]

Discrepency

[micron]

00.20.40.6

b) Discrepancy of Proposed Estimations from True Contour Errors

0 1 4 5

1 2 3 4 5

1 2

2

3 4 5

-5

0

5

time[sec]

[milisecond]

c) Delay Time

CompensatedFrenet Frame(Eq.26)

Shifted Frame(Eq.22)

Basic Frame(Eq.20)

Fig. 9 Comparison of tool tip contouring estimations

0 1 4 5!3

!2

!1

0

1

2

3a) A Axis Errors b) C Axis Errors

c) Discrepancy in the Proposed ContourError Estimation in a Axis

d) Discrepancy in the Proposed ContourError Estimation in c Axis

time[sec]

Error[milliradians]

0 1 4 5time[sec]

0 1 4 5time[sec] 0 1 4 5time[sec]

!2

!1

0

1

2

0

0.001

0.002

-0.002

-0.001EstimationErrors

[milliradians]

0

0.001

0.002

-0.002

-0.001

Tracking Errors

Tracking Errors

True&ApproximatedContour Error Components

True&ApproximatedContour Error Components

Fig. 10 Orientation contour errors

Journal of Manufacturing Science and Engineering JUNE 2009, Vol. 131 / 031006-7

Downloaded 23 Nov 2010 to 133.6.188.55. Redistribution subject to ASME license or copyright; see http://www.asme.org/terms/Terms_Use.cfm

Page 8: Modeling and Control of Contouring Errors for Five-Axis ...research.engr.oregonstate.edu/mpcl/resources/5-Ax-CC1.pdf · Five-axis computer numerical controlled #CNC$ machine tools

orientation contour error estimation from the measured values.The maximum deviation is less than 6 'rad for both a and cdrives. Considering that the rotary encoders have a resolution of8.7 'rad, the proposed estimation is valid and suitable for design-ing orientation contour controller, which is presented in the Part IIof this paper.

5 ConclusionThe main concerns during five-axis contouring are the tool tip

and the tool orientation contour errors. The kinematic model offive-axis machine tools shows that all five physical drives influ-ence tool tip positioning accuracy while the tool axis orientationerrors are caused only by the rotary drives. In this paper, thekinematics and rigid body dynamics of five axes, namely, threetranslational and two rotary drives, are combined to predict tooltip and tool orientation errors that produce contouring errors onthe machined part surface. It is shown that even if the trackingaccuracies of all five drives are individually greatly improved byhigh bandwidth, robust controllers, the overall contouring error offive-axis tool-paths can still be significant due to the path curva-ture and the kinematics of the machine. Instead of controllingeach drive individually, the experimentally validated real-timecontouring error estimation model allows the design of a global,sliding mode controller, which simultaneously controls all fivedrives with the objective of achieving high path tracking accuracy.This controller improves the path tracking accuracy and is pre-sented in Part II of this series.

AcknowledgmentThis research is supported by National Sciences and Engineer-

ing Research Council of Canada #NSERC$ Discovery and VirtualMachining Chair Grants and AUTO21 CM03 Micro MillingGrant.

References!1" Tsutsumi, M., and Saito, A., 2003, “Identification and Compensation of Sys-

tematic Deviations Particular to 5-Axis Machining Centers,” Int. J. Mach.Tools Manuf., 43#8$, pp. 771–780.

!2" Koren, Y., 1983, Computer Control of Manufacturing Systems, McGraw-Hill,New York.

!3" Koren, Y., and Lo, C.-C., 1980, “Cross-Coupled Biaxial Computer Control forManufacturing Systems,” ASME J. Dyn. Syst., Meas., Control, 102, pp. 265–272.

!4" Koren, Y., and Lo, C.-C., 1991, “Variable-Gain Cross-Coupling Controller forContouring,” CIRP Ann., 40#1$, pp. 371–374.

!5" Erkorkmaz, K., and Altintas, Y., 1998, “High Speed Contouring Control Al-gorithm for CNC Machine Tools,” Proceedings of the ASME Dynamic Systemsand Control Division, ASME International Mechanical Engineering Congressand Exposition, DSC 64, pp. 463–469.

!6" Chiu, G. T.-C., and Tomizuka, M., 2001, “Contouring Control of Machine ToolFeed Drive Systems: A Task Coordinate Frame Approach,” IEEE Trans. Con-trol Syst. Technol., 9#1$, pp. 130–139.

!7" Yeh, S.-S., and Hsu, P.-L., 2002, “Estimation of the Contouring Error Vectorfor the Cross-Coupled Control Design, IEEE/ASME Trans. Mechatron., 7#1$,pp. 44–51.

!8" Peng, C.-C., and Chen, C.-L., 2007, “Biaxial contouring Control With FrictionDynamics Using a Contour Index Approach,” Int. J. Mach. Tools Manuf.,47#10$, pp. 1542–1555.

!9" Katz, R., Yook, J., and Koren, Y., 2004, “Control of a Non-Orthogonal Recon-figurable Machine Tool,” ASME J. Dyn. Syst., Meas., Control, 126#2$, pp.397–405.

!10" Lin, R.-S., and Hu, C. W., 1999, “Modeling of the Dynamic Contour Error ofFive-Axis CNC Machine Tools,” ASME Dynamic Systems Control and Con-trol Division, Ver. 67, pp. 861–868.

!11" Lo, C.-C., 2002, “A Tool-Path Control Scheme for Five-Axis Machine Tools,”Int. J. Mach. Tools Manuf., 42#1$, pp. 79–88.

!12" Langeron, J.-M., Duc, E., Lartigue, C., and Bourdet, P., 2004, “A New Formatfor 5-Axis Tool Path Computation, Using Bspline Curves,” CAD, 36#12$, pp.1219–1229.

!13" Tutunea-Fatan, O. R., and Feng, H.-Y., 2004, “Configuration Analysis of Five-Axis Machine Tools Using a Generic Kinematic Model,” Int. J. Mach. ToolsManuf., 44#11$, pp. 1235–1243.

!14" Bohez, E. L. J., 2002, “Five-Axis Milling Machine Tool Kinematic ChainDesign and Analysis,” Int. J. Mach. Tools Manuf., 42#4$, pp. 505–520.

!15" Jung, Y. H., Lee, D. W., Kim, J. S., and Mok, H. S., 2002, “NC Post-Processorfor 5-Axis Milling Machine of Table-Rotating/Tilting Type,” J. Mater. Process.Technol., 130–131, pp. 641–646.

!16" Devanit, J., and Hartenberg, R. S., 1955, “A Kinematic Notation for LowerPair Mechanisms Based on Matrices,” ASME J. Appl. Mech., 22#2$, pp. 215–221.

!17" Do Carmo, M. P., 1976, Differential Geometry of Curves and Surfaces,Prentice-Hall, Englewood Cliffs, NJ.

!18" Erkorkmaz, K., and Altintas, Y., 2001, “High Speed CNC System Design: PartII—Modeling and Identification of Feed Drives,” Int. J. Mach. Tools Manuf.,41#10$, pp. 1487–1509.

!19" Altintas, Y., Erkorkmaz, K., and Zhu, W.-H., 2000, “Sliding Mode ControllerDesign for High Speed Drives,” CIRP Ann., 49#1$, pp. 265–270.

031006-8 / Vol. 131, JUNE 2009 Transactions of the ASME

Downloaded 23 Nov 2010 to 133.6.188.55. Redistribution subject to ASME license or copyright; see http://www.asme.org/terms/Terms_Use.cfm