You are on page 1of 11

S.

Pholpho Page 1 of 11
26th International Conference of CAD/CAM, Robotics & Factories of the Future (CARs&FOF 2011)
26-28 July 2011, Kuala Lumpur, Malaysia
VERIFICATION OF FIVE-AXIS TOOL PATH OPTIMIZATION USING VERICUT

S. Pholpho
1
and M. Munlin
2

Faculty of Information Science and Technology,
Mahanakorn University of Technology,
140 Cheum-Sampan Rd., Nong Chok,
Bangkok 10530 Thailand
Tel: +662-988-3655 ext. 4112 Fax: +662-988-4027
Email: saichol_phd01
1
@yahoo.com, Email: mmunlin@gmail.com
2


ABSTRACT
When the tool of a five-axis milling machine travels near a stationary point, the rotation
angles may change sharply leading to unexpected deviations from the estimated
trajectories. Several algorithms have been proposed to optimize the rotations of the
machine drives without increasing the number of tool positions or changing the tool
orientations. The main idea is minimization of the distance traveled by the tool in the
angular space at the expense of using multiple solutions of the inverse kinematics
equations and switching the rotation angles or inserting new points at certain positions.
We employ Vericut to verify theses algorithms. A virtual five-axis model of MAHO600E
is constructed using its inverse kinematics and real machine parameters. Numerical
experiments and cutting by a virtual five-axis milling machine built in Vericut validates
the results of these optimization algorithms. The efficiency of these algorithms has been
verified by a virtual machine as well as by real cutting on five-axis machine
MAHO600E at the CIM Lab, Asian Institute of Technology of Thailand.

Keywords: Five-axis machines, inverse kinematics, tool path simulation, kinematics
error, CAD/CAM, Vericut

1. INTRODUCTION
Milling machines are programmable mechanisms for cutting industrial parts. The
machine consists of several moving parts designed to establish the required coordinates
and orientations of the tool during the cutting process. The axes of the machine define
the number of the degrees of freedom of the cutting device. The movements of the
machine parts are guided by a controller which is fed with NC program comprising
commands carrying spatial coordinates of the tool-tip and angles needed to rotate the
machine parts to establish the orientation of the tool.

The main goal of five-axis tool path planning is minimization the difference between
the desired and the actual surface while producing the actual surface for a minimum
time. However, mathematical formulations presented in the literature vary in terms of
the error criteria and the set of optimized variables. The tool path is optimized with
regard to the machining time, accuracy, the length of the tool path, the width of the
machining strip, the volume of the removed material, the size of the remaining scallops,
etc. [1,2,3]. Furthermore, the error analysis and optimization in the areas of large
variations of the rotation angles have not been provided by commercial CAD/CAM
S. Pholpho Page 2 of 11
26th International Conference of CAD/CAM, Robotics & Factories of the Future (CARs&FOF 2011)
26-28 July 2011, Kuala Lumpur, Malaysia
systems such as Unigraphics [8], EdgeCam, Vericut, etc. Besides, only a few research
papers deal with the subject. However, the rotations invoke large kinematics errors.
Besides, machines with rotation axes on the table often have to turn around heavy
workpieces. As a result, the machines have low capacities for acceleration which
significantly increases the machining time. This effect is amplified in high speed
machining, when the rotation axes reach greater speeds.

In [4] the authors analyze the sequence of rotations to minimize the number of the phase
reverse steps at discontinuities of the first derivative of the surface (corners etc). A
method of avoiding singularities has been presented in [5]. The method certainly has its
merits since it allows inserting additional points without any modifications. However,
the computation is complex, computationally expensive and does not preserve the
original CC points. Modifying of the machine codes to solve the surface singularities
problems have also been presented in [10, 11]. However, the methods keep inserting
new CC points and slightly changing tool orientation until the cutting error is less than
the tolerance.

In [12], the authors present a generic five-axis postprocessor system for various five-axis
machine tools and verification by Borland C++ Builder and OpenGL. The wireframe
model of the configured five-axis machine tool can be promptly shown and rotated or
zoomed dynamically on the screen to assist the user to input relevant parameters
correctly and efficiently. Through the implementation of the developed postprocessor
and the verification by the solid cutting simulation software as well as the real
machining experiment, the effectiveness of the proposed scheme was confirmed.

In [13], the authors proposed a new simulation and verification system of belt grinding
with industrial robots. The work piece surface is represented by a discrete height field,
an array of extended height segments, and a fast collision detection algorithm using k-
DOP bounding volumes is adopted to accelerate the localization of the contact area. A
local grinding model is incorporated to decide the real material removal. Unlike the
usual global linear model, it determines the removed material in the contact area based
on the acting force distribution and some other grinding parameters. With this new
system, robot programmers can improve the path planning by visualizing the
manufacturing process, predicting potential problems and measuring dimensional errors.

In [6] the authors proposed an angle switching algorithm to optimize the sequence of
the rotation angles without increasing the number of tool positions or changing the tool
orientations. The main idea is to minimize the distance traveled by the tool in the
angular space at the expense of using multiple solutions of the inverse kinematics
equations, which is, switching the rotation angles at certain position. Considering the
entire set of angles requires the shortest path techniques to minimize the total angular
distance. In [7] the algorithm was extended to the case when the cost function
differentiates between damaging undercuts and repairable overcuts.

Modern industries manufacture complex parts design using CNC machine to achieve
higher accuracy and less machining time [1, 3]. However, using the real machine with the
S. Pholpho Page 3 of 11
26th International Conference of CAD/CAM, Robotics & Factories of the Future (CARs&FOF 2011)
26-28 July 2011, Kuala Lumpur, Malaysia
real work piece without computer simulation involves iterative trial and errors and
therefore, increases costs and times. This paper presents the 3D simulation model of five-
axis milling machine maho600e, constructed by using Vericut program. The simulator
resembles the functions of the real maho600e from the given NC program. This makes it
possible to analyze an accuracy of machining and well as perform collision detection. The
results of the simulation can be used to simulate the milling process, verify the final cut
and estimate the errors of the actual tool path before the real work piece is actually cut
with the real machine.

2. FIVE AXIS SIMULATION USING VERICUT

Vericut is a CNC based machining simulation process. It simulates the exact depth,
width, and angle of each cut. It knows exactly how much material is removed by each
cut segment and divides the motion into smaller segments. Where necessary, based on
the amount of material removed in each segment, it assigns the best feed rate for each
cutting condition encountered. It then outputs a new tool path, identical to the original
but with improved feed rates, but does not alter the trajectory. Tool path verification and
optimization using Vericut are two of the best ways that can dramatically improve the
manufacturing operation and save cost with relatively little work. In this paper, we
employ Vericut to construct a virtual five-axis model of MAHO600E from its inverse
kinematics and real machine parameters to verify the tool path optimization algorithms.

2.1 Inverse kinematics of a five-axis milling machines

A five-axis milling machine normally has three translational and two rotary degrees of
freedom. These configurations allow programming in any arbitrary tool axis orientation.
Usually both rotary axes are perpendicular to each other and their orientation equals the
direction of the linear axes. The primary rotary axes have a constant orientation, while
the orientation of a secondary axis changes due to a rotation around the primary axis.
One rotary axis has a fixed inclination with respect to the tool axis. The second rotary
axis has a fixed orientation with respect to the clamping table. To simplify the formulae
in this section the rotary axis which orientation remains fixed with respect to the tool
axis will be defined as the principal rotary axis. If the conventional kinematics of a five
axis milling machine is considered, the conclusion follows that each orientation of the
tool-axis (i,j,k) can be achieved at two different positions of the rotary axes. However a
limited range of the rotary axes often eliminates one of these solutions. If the principal
B-axis is zero ( i=0, j=0, k=1) then any value for the second axis is satisfactory. This is
called a degenerated position. If the tool axis is moved from the first solution space (B >
0) into the other solution space (B < 0) then the tool axis goes through the degenerated
position (B = 0 and i=0, j= 0, k=1) [5].

Consider a typical configuration of the MAHO600E five axis milling machine with the
rotary axis on the table as shown in Figure 1. Recall that the machine is guided by axial
commands carrying the three spatial coordinates of the tool tip in the machine
coordinate system M and the two rotation angles. The CAM software generates a set of
successive coordinates called cutter location points or CL-points (X, Y, Z, I, J, K) in the
work piece coordinate (X, Y, Z, A, B). Typically, the CAM software distributes the CL-
S. Pholpho Page 4 of 11
26th International Conference of CAD/CAM, Robotics & Factories of the Future (CARs&FOF 2011)
26-28 July 2011, Kuala Lumpur, Malaysia
points along a set of curves, which constitutes the so-called zigzag or spiral pattern. A
post processing which includes a transformation to the M-system generates a set of
machine axial commands which provide the reference inputs for the servo-controllers of
the milling machine [14].


Figure 1. The corresponding reference coordinate systems


















Figure 2. Non-linearity of the tool-path in the workpiece coordinates
1
C

The kinematics of the machine depend on matrix-functions A(a), B(b) associated with
the rotations a and b and around the primary (the rotary table) and the secondary (the
tilt table) axes shown in Figure 1. A simple analysis of the inverse kinematics equations
reveals that a linear trajectory of the tool tip in the machine coordinates may produce a
non-linear trajectory in the work piece coordinates as shown in Figure 2. We shall call
the deviation from the non-linear trajectory the kinematics error. Note that a fine cut of
S. Pholpho Page 5 of 11
26th International Conference of CAD/CAM, Robotics & Factories of the Future (CARs&FOF 2011)
26-28 July 2011, Kuala Lumpur, Malaysia
a smooth surface employing small spatial and angular steps may not demonstrate the
detrimental effects near the singularity points. However, a rough cut characterized by
large gradients could produce considerable errors. It is because of the sharp angular
jumps that the machine produces the loop-like trajectories of the tool. Moving along
such trajectories may destroy the work piece and even lead to a collision with the
machine parts. Furthermore, suppose that the tool vector changes the sign from positive
to negative or vice versa, the inverse kinematics produces the singularity for which any
value of the rotation angle is admissible [9]. Such singularity point on the surface
presents a special case the rotation angles may jump considerably leading to unexpected
deviations from the prescribed trajectory. Approaching the stationary point (minimum,
maximum of saddle) involves sharp variations of the rotation angles even when the
spatial steps are small. Moving along such trajectories may destroy the work piece and
even lead to a collision with the machine parts. If the tool is aligned along the surface
normal, then the rotation angles are evaluated by

1
1
1
tan ( ) , 0 and 0,
tan ( ) , 0,
2 tan ( ) , otherwise.
base
j
i j
i
j
a i
i
j
i

>

= + <

(1)

1
sin ( )
base
b k

= , (2)
where (i,j,k) is the tool orientation vector. Furthermore, there are four sets of a-
angles and b-angles within the range [0, 2 ] that can rotate the tool vector into the
required orientation. The set of the a-angles is defined by
} , , 2 , { +
base base base base
a a a a as shown in Figure 3.

i>0,j>0
tan
-1
(j/i)
i<0,j<0
i>0,j<0
i<0,j>0
j
i
+tan
-1
(j/i)
+tan
-1
(j/i)
2+tan
-1
(j/i)
Tool vector
i>0,j>0
tan
-1
(j/i)
i<0,j<0
i>0,j<0
i<0,j>0
j
i
+tan
-1
(j/i)
+tan
-1
(j/i)
2+tan
-1
(j/i)
Tool vector


Figure 3. Computation of
base
a in each quadrant



S. Pholpho Page 6 of 11
26th International Conference of CAD/CAM, Robotics & Factories of the Future (CARs&FOF 2011)
26-28 July 2011, Kuala Lumpur, Malaysia
2.2 Virtual five-axis milling machine simulator (MAHOSIM)

To verify the effectiveness of the inverse kinematics and tool path optimization
algorithms, window-based postprocessor software has been developed under the
Windows environment and Visual C++ programming language integrated with the
OpenGL graphics library [12]. The generated five-axis NC programs are further verified
on Vericut using the virtual five-axis milling machine of MAHO600E or MAHOSIM.
The MAHOSIM is constructed using the inverse kinematics and the real CNC
parameters of MAHO600E as shown in Figure 4. Vericut can build the kinematics
model of any CNC machine tool and simulate the cutting operations from the given tool
path.


Figure 4. MAHO600E Virtual Five-Axis Milling Machine (MAHOSIM)

The generalized kinematics model of MAHOSIM includes the primary and secondary
rotary axes on the work piece table and the spindle for the five-axis machine tool. We
first create two rotary axes and the corresponding rotational directions. The system will
automatically display the wireframe model of the configured machine tool and two
feasible tool orientations. Once the kinematics model has been configured correctly, we
should enter the relevant parameters for NC machining, e.g. the offset vector from the
program origin to the centre of the secondary rotary table, the offset vector from the
centre of the secondary rotary table to the centre of the primary rotary table, the offset
vector from the center of the primary rotary spindle to the centre of the secondary rotary
spindle and the tool tip vector. To operate the MAHOSIM, we read the given NC
program generated by the post processor. According to the MAHOSIM in Figure 1 and
4, the kinematics involving two rotations and three translations are given by
M(t)=B(t)(A(t)(W(t)+R)+T)+C, (3)
where R, T, and C are respectively the coordinates of the origin of the work piece in the
rotary table coordinates, coordinates of the origin of the rotary table coordinates in the
tilt table coordinates and the origin of the tilt table coordinates in the cutter center
coordinates. Given the M-coordinates of two consecutive CL-points P
1
=(x
1
, y
1
, z
1
) and
P
2
=(x
2
, y
2
, z
2
) and the two rotation angles representing an orientation of the tool, the
virtual machine will perform the required motion by means of the inverse kinematics to
simulate the entire cutting operation.
S. Pholpho Page 7 of 11
26th International Conference of CAD/CAM, Robotics & Factories of the Future (CARs&FOF 2011)
26-28 July 2011, Kuala Lumpur, Malaysia
3. VERIFICATION OF THE TOOL PATH USING MAHOSIM

We verify the five-axis tool path optimization using MAHOSIM from the given tool
path generated by the tool path optimization algorithms namely, angle switching, angle
insertion and iterative angle switching.

3.1 Angle Switching and Angle Insertion Algorithms

The singular position such as the minimum or the maximum or the saddle point may
generate loops. Usually the loops represent the largest errors and appear because the
large variations of the rotation angles a and b. Some loops, although small, may destroy
the required surface if it is undercut the surface as shown with thick line in Figure 5.
Therefore, the optimization can be performed only in the vicinities of these points. The
angle switching will select the shortest path from the feasible sequences of the angles in
such a way that |a
p+1
- a
p
|+|b
p+1
- b
p
| is minimized. The algorithm decreases the sharp
rotation angle turns large loops (Figure 5a) into smaller ones (Figure 6a). The
corresponding results of the cutting operation is simulated and verified using
MAHOSIM as shown in Figure 5b and 6b respectively.



(a) (b)
Figure 5. (a) The original surface trajectory, (b) Verification in MAHOSIM


(a) (b)
Figure 6. (a) The repaired surface trajectory, (b) Verification in MAHOSIM
Bad loop Sharp rotation
sharp rotations have
been eliminated
S. Pholpho Page 8 of 11
26th International Conference of CAD/CAM, Robotics & Factories of the Future (CARs&FOF 2011)
26-28 July 2011, Kuala Lumpur, Malaysia
The angle switching algorithm may still leave loops, which can be further eliminated
only by inserting additional CC points. In particular, when the tool path crosses the
stationary point in the direction parallel (or nearly so) to the secondary rotary axis, the
work piece often must be rotated by an angle close to . Therefore, further optimization
is required to reduce such angular jumps. If the trajectory lies far from singularities a
conventional approach to insert spatially uniform grid of the CC points between the two
given positions solves the problem. However, such interpolation does not remove the
jumps near the singularities. In order to solve this problem, a special interpolation called
the angle insertion (uniform angular grid) [7] is proposed to partition the large angular
interval into a grid having equal angular increments. The singular point can be located
by finding the largest loop in which the tool vector changes the sign of the i or the j
component as shown in Figure 7a and 7b. The repaired trajectory produced by the angle
insertion algorithms and verified by MAHOSIM is given in Figure 8a and 8b
respectively.



a
b

Figure 7. (a) The original trajectory, (b) Verification in MAHOSIM




a b

Figure 8. (a) The repaired trajectory, (b)Verification in MAHOSIM



3.2 Iterative Angle Switching Algorithm

S. Pholpho Page 9 of 11
26th International Conference of CAD/CAM, Robotics & Factories of the Future (CARs&FOF 2011)
26-28 July 2011, Kuala Lumpur, Malaysia
When it is necessary to insert additional points, there are many methods for such
insertions. However, from the viewpoint of the kinematics error one of the most
efficient methods near stationary points is angular insertion proposed in [7]. The method
injects the points into large loops by equi distributing them with regard to the rotation
angle having the largest variation. This complies with the idea of functional that the
angle variation affects the kinematics error the most.

Our introductory example presents a saddle surface S given by (see Figure 5a):
2 3 4
100 50
( , ) 100 50
80 ( 1)(3.55 14.8 21.15 9.9 ) 28
u
S u v v
v v u u u u
| |
|
=
|
|
+
\
(4)
Consider the optimized surface S(u,v) in Figure 5b, where the tool path obtained by the
angle switching algorithm. The largest loop is on the right side of the surface. Inserting a
point in the middle of the loop produces a larger loop. Therefore, a single additional
point may destroy the integrity of a particular shortest path. The iterative angle
switching algorithm is proposed to iteratively switch the angles when the additional
points are inserted [7]. A combination of the angle switching and the angle insertion
leads to even better optimizations. It is clear that the algorithm converges because in the
worst case additional points are inserted into every interval. However, in this case
switching of the angles is no longer possible to accomplish. Therefore, we are interested
in solutions when benefits of the angle switching are combined with error reduction
produced by inserting some relatively small number of points.

Figures 9a shows the surface S(u,v) generated by the iterative angle switching algorithm
subjected to the above mentioned procedures after the maximum error has been reduced
to a certain prescribed value. It has been proven experimentally that the proposed
method requires less additional points than conventional schemes performed near the
stationary points. The simulation model verified by MAHOSIM and the real machining
using five-axis machine MAHO600E is given in Figure 9b and 10 respectively.


(a) (b)
Figure 9: (a) Test surface produced by iterative angle switching,
(b) Verification in MAHOSIM

S. Pholpho Page 10 of 11
26th International Conference of CAD/CAM, Robotics & Factories of the Future (CARs&FOF 2011)
26-28 July 2011, Kuala Lumpur, Malaysia



Figure 10. The real cut of the surface after applying Iterative angle switching

Table 1 compares the iterative angle switching algorithm (ITS) with the angle switching
algorithm (AS) combined with different methods for inserting additional CL points. PI
stands for inserting equi-spaced points along the tool trajectory in the physical space
(x,y,z), whereas AI stands for points equi distributed in the angular space (a,b) along
the angular arc. The maximum allowable error is 2 mm. Clearly the angle switching
algorithm combined with angular based inserting uses the smallest number of points.
This is because the method presents an appropriate combination of angle switching and
inserting, whereas AS and AI use only a single technique. The preliminary results show
a 20% improvement over the pure angular insertion scheme and about 50%
improvement with the reference to spatially equi-distributed points.

Table 1: Comparison of the inserted points with several methods on the test surface S

Method AS PI AI ITS/PI ITS/AI
# Points 0 74 48 56 39
Max Error 7.451 1.963 1.963 1.963 1.963

4. CONCLUSIONS

Simulation of Numerical experiments and cutting by a virtual five-axis milling machine
built in Vericut validates the results of the tool path optimization algorithms. The
efficiency of the algorithm has been verified by a virtual machine MAHOSIM as well as
by real cutting on five-axis machine MAHO600E. The iterative angle switching based
on the angle switching algorithm combined with the angle insertion of the cutter location
points in the angular space improves the efficiency of five-axis machining. The
preliminary results show a 20% improvement over the pure angular insertion scheme
and about 50% improvement with the reference to spatially equi-distributed points. The
algorithms have been verified visually and numerically using MAHOSIM and our tool
path optimization algorithms. The numerical experiments demonstrate a large accuracy
increase ranging which depends on the surface and the configuration of the five-axis
machine. The methods are most efficient in the case of the rough cut characterized by
large angle variations which produce considerable errors. The algorithms produce
S. Pholpho Page 11 of 11
26th International Conference of CAD/CAM, Robotics & Factories of the Future (CARs&FOF 2011)
26-28 July 2011, Kuala Lumpur, Malaysia
impressive results and therefore, can be used by the CAD/CAM industries to verify the
tool path graphically and to produce and optimize the NC programs.

5. REFERENCES
[1] Taejung Kim and Sanjay E. Sarma, Tool path generation along directions of
maximum kinematics performance; a first cut at machine-optimum paths, Computer
Aided Design, 34, 2002, 453-468.
[2] Chuang-Jang Chiou and Yuan-Shin Lee, A machining potential field approach to tool
path generation for multi-axis sculpture surface machining, Computer Aided Design 34,
2002, 357-371.
[3] C-C Lo, Efficient cutter-path planning for five-axis surface machining with a flat-end
cutter, Computer Aided Design 31, 1999, 557-566.
[4] Y.H. Jung, D.W. Lee, J.S. Kim and H.S. Mok, NC post-processor for 5-axis milling
machine of table-rotating/tilting type, Journal of Materials Processing Technology, 130-
131, 2002, 641-646.
[5] Affouard, E. Duc, C. Lartigue, J.M. Langeron, and P. Bourdet, Avoiding 5-axis
singularities using tool path deformation, International Journal of Machine Tools and
Manufacture, 44(4), 2004, 415-425.
[6] M. Munlin, S. S. Makhanov and E.L. J. Bohez, Optimization of Rotations of a Five-
Axis Milling Machine Near Stationary Points, Computer-Aided Design 36, 2004, 1117-
1128.
[7] S. S. Makhanov and M. Munlin, Optimal sequencing of rotation angles for five-axis
machining, International Journal of Advanced Manufacturing Technology, 35, 2007,
4154.
[8] Unigraphics Solution Inc., Unigraphics System Software V18, 2001.
[9] J.P. Kruth, B. Lauwers, P. Klewais, and P. Dejonghe, NC postprocessing and NC-
simulation for five-axis milling operations with automatic collision Avoidance, Journal
for Manufacturing Science and Production (2005)1-12
[10] Ming-Che Ho, Yean-Ren Hwang, Machine codes modification algorithm for five-
axis machining, Journal of Materials Processing Technology, 142, 2003, 452-460.
[11] Knut Sorby,Inverse kinematics of five-axis machines near singular configurations,
International Journal of Machine Tools and Manufacture, 47, 2007, 299-306.
[12] Chen-Hua She and Chun-Cheng Chang, Design of a generic five-axis postprocessor
based on generalized kinematics model of machine tool, International Journal of
Machine Tools & Manufacture ,47 (2007) 537545.
[13] B. Kuhlenkottera, H. Muller, Simulation and verification of belt grinding with
industrial robots, International Journal of Machine Tools & Manufacture 46 (2006)
708716.
[14]M.Munlin,VirtualFive-Axis Milling Machine: Tool Path Generation and Simulation,
Thammasat International Journal Sc.T ech, 9, (2004)1-11,

You might also like