Improving optimization of tool path planning in 5-axis flank milling using advanced PSO algorithms

Improving optimization of tool path planning in 5-axis flank milling using advanced PSO algorithms

Robotics and Computer-Integrated Manufacturing 29 (2013) 3–11 Contents lists available at SciVerse ScienceDirect Robotics and Computer-Integrated Ma...

844KB Sizes 0 Downloads 38 Views

Robotics and Computer-Integrated Manufacturing 29 (2013) 3–11

Contents lists available at SciVerse ScienceDirect

Robotics and Computer-Integrated Manufacturing journal homepage: www.elsevier.com/locate/rcim

Improving optimization of tool path planning in 5-axis flank milling using advanced PSO algorithms Hsin-Ta Hsieh, Chih-Hsing Chu n Department of Industrial Engineering and Engineering Management, National Tsing Hua University, Hsinchu, Taiwan

a r t i c l e i n f o

abstract

Article history: Received 12 December 2011 Received in revised form 28 March 2012 Accepted 29 April 2012 Available online 22 May 2012

This paper studies optimization of tool path planning in 5-axis flank milling of ruled surfaces using advanced Particle Swarm Optimization (PSO) methods with machining error as an objective. We enlarge the solution space in the optimization by relaxing the constraint imposed by previous studies that the cutter must make contact with the boundary curves. Advanced Particle Swarm Optimization (APSO) and Fully Informed Particle Swarm Optimization (FIPS) algorithms are applied to improve the quality of optimal solutions and search efficiency. Test surfaces are constructed by systematic variations of three surface properties, cutter radius, and the number of cutter locations comprising a tool path. Test results show that FIPS is most effective in reducing the error in all the trials, while PSO performs best when the number of cutter locations is very low. This research improves tool path planning in 5-axis flank milling by producing smaller machining errors compared to past works. It also provides insightful findings in PSO based optimization of the tool path planning. & 2012 Elsevier Ltd. All rights reserved.

Keywords: 5-axis machining Flank milling Particle swarm optimization Ruled surface

1. Introduction 5-axis machining provides a higher productivity and better shaping capability compared to traditional 3-axis machining with two additional degrees of freedom in tool motion. It has been commonly used in manufacturing of complex parts in automobile, aerospace, energy, and mold industries since the late 90’s. The 5-axis machining operation contains two different milling methods: end milling and flank milling. The cutting edges near the end of a cutter perform actual material removal in end milling while the circumferential part of a cutter mainly does the cutting in flank milling. Tool path planning is a critical task in both milling operations, with avoidance of tool collision and machining error control as two major concerns [1]. In 5-axis flank milling, it is highly difficult to produce a machined surface exactly the same as its design specifications using a cylindrical cutter. Unless for simple geometries like cylindrical and conical surfaces, the cylindrical cutter cannot make a contact with a surface ruling without inducing overcut or undercut around the ruling due to local non-developability of a ruled surface [2]. The machined surface is considered acceptable in practice as long as the amount of machining deviation is limited within a given tolerance. A common method used in

n

Corresponding author. E-mail address: [email protected] (C.-H. Chu).

0736-5845/$ - see front matter & 2012 Elsevier Ltd. All rights reserved. http://dx.doi.org/10.1016/j.rcim.2012.04.007

industry is to make the cutter follow the surface rulings, although serious machining errors often occur on twisted surfaces [3]. Various approaches have been proposed to reduce the machining error induced in this way. Previous studies [4–6] have shown that the machining error in 5-axis flank milling of ruled surfaces can be effectively reduced through optimization of tool path planning in a global (or near global) manner. Such an optimization approach works as a systematic mechanism for precise control of machining error. Wu and Chu [4] transformed tool path planning in 5-axis flank milling into a curve matching problem and applied discrete dynamic programming to solve for an optimal matching with the total error on the machined surface as an objective function in the optimization. They solved the similar curve matching problem with Ant Colony Systems (ACS) algorithm to reduce the lengthy time required by the dynamic programming approach [5]. Hsieh and Chu [6] allowed the cutter to freely make contact with the surface to be machined, rather than moving among pre-defined surface points in previous works [4,5]. They also adopted GPU computing technologies to accelerate PSO based search in same optimization process and thus enhanced the practicality of machining error control by optimization of tool path planning in 5-axis flank milling. All the previous studies mentioned above imposed a major constraint to simplify the optimization problem. They assumed that the cutter must make contact with the boundary curves of the ruled surface to be machined. This assumption seriously restricts the

4

H.-T. Hsieh, C.-H. Chu / Robotics and Computer-Integrated Manufacturing 29 (2013) 3–11

solution space in the optimization process, leading to worse optima. In addition, the PSO based search in the previous work suffers from unsatisfactory quality of optimal solutions due to highly nonlinearity inherited in the machining error estimation [6]. Experimental results have shown that the solutions obtained by PSO easily get trapped in local optima and are thus very far from global optima. This research overcomes these problems with two main improvements over previous methods. First, we relax the constraint that the cutter must contact the boundary curves of the ruled surface to be machined. The cutter is allowed to deviate from the surface along the normal, tangent, and bi-normal directions at any points of the boundary curves. This creates a much larger solution space in the subsequent optimization of tool path planning. Advanced PSO algorithms, Advanced Particle Swarm Optimization (APSO) and Fully Informed Particle Swarm Optimization (FIPS), are applied to improve the quality of optimal solutions and search efficiency. Three-level full factorial experiments are conducted to determine best parameter values in these algorithms. Test ruled surfaces are constructed by systematic variations of three intrinsic surface properties. Analyses of test results reveal how the computational performance of each algorithm varies with the surface properties, cutter radius, and the number of cutter locations comprising a tool path. Graphical simulation and verification of the resultant tool paths validates the error estimation in this work. This research improves previous methods of tool path planning in 5-axis flank milling by offering smaller machining errors. It also provides important findings in PSO based optimization of the tool path planning.

2. Optimization of tool path planning based on PSO 2.1. Encoding of cutter location in PSO This section explains how to encode a tool path in 5-axis flank milling for PSO. A continuous tool path contains a series of discrete cutter locations (CL’s) in Computer Numerical Control (CNC). The previous studies [4,5,7–9] proposed that a cutter location is first determined by a connection between the two boundary curves of the ruled surface to be machined. The machining deviation thus induced is then reduced by adjustment of individual cutter locations. In this case, the optimization task is to find a series of curve parameter pairs that can result in a minimized machining error. The tool path thus generated indeed outperforms the result generated by traditional methods, e.g., the cutter follows the surface rulings or it moves at a tilt angle while moving along the rulings. It is not necessary that the cutter must make contact with the boundary curves. This simplification largely reduces the search space in the optimization and produces an optimal tool path of a larger machining error. We propose a new encoding scheme to relax this constraint. The cutter does not have to stay on the boundary curves any more. The distance between consecutive cutter locations is only limited by the machine tool capability. In practice, the number of cutter locations comprising of a tool path cannot be too high, regardless of the tool path planning method. Our studies [4,5] have shown that the tool path generated by global (or near global) optimization produces smaller machining errors than other previous methods in all different numbers of cutter locations. As shown in Fig. 1, a movement vector m can be produced from any given point on the boundary as m¼(tT, nN, bB). The three scalars t, n, and b indicate the movement along the tangent (T), normal (N), and bi-normal (B) directions of the point on the surface, respectively. The two center points of the cutter are translated with the corresponding movement vectors in 3D space.

Fig. 1. Enlarging the solution space in optimization of tool path planning.

The optimization task is to search for an optimal set of those scalars that minimizes the machining error. Given the boundary curves as cA(u) and cB(u), each cutter location is defined with the following variables: 1. A pair of curve parameters uij on the two boundary curves where i¼ 1,2 and j ¼1  n. i is the index of the boundary curves and j represents the index of cutter location. The total number of cutter locations is n. 2. Tij is the movement along the tangent of the boundary curves at uij. 3. Nij is the movement along the surface normal at uij. 4. Bij is the movement along the bi-normal of the surface at uij.

2.2. Machining error estimation Exact estimation of the machined geometry is highly difficult, if not impossible. A more feasible approach is to approximate the geometry using spatial partition techniques. For example, the machining error was estimated using the z-buffer method in our previous work [4]. The estimation procedure consists of four steps as shown in Fig. 2. A group of sampling points is first obtained from the surface. At each sampling point, two straight lines are generated in both positive and negative surface normal directions with a distance of the cutter radius. The lengths of these line segments are updated after the cutter has moved from a cutter location to the next along a given tool path. Discrete intermediate locations will be linearly interpolated from two consecutive cutter locations, i.e. linear CNC interpolation in this case. The sampling density and the number of linear interpolations are specified by users to control the precision of the error approximation. The line segments shown above/below the surface indicate occurrence of undercut and overcut, respectively. 2.3. PSO algorithm Particle Swarm Optimization (PSO) is a stochastic optimization technique inspired by social behavior of bird flocking or fish schooling [10]. A PSO algorithm begins with a population of random solutions and searches for optima by updating

H.-T. Hsieh, C.-H. Chu / Robotics and Computer-Integrated Manufacturing 29 (2013) 3–11

1. Determine sampling points

2. Generate line segments

3. Generate cutter locations

4. Linearly interpolation

5

5. Compute machining error

Fig. 2. Machining error estimation with the stock height method [4].

generations. The potential solutions in PSO, referred to as particles, explore the solution space by following the current optimum particles. Each particle keeps track of its positions in the solution space associated with the best solution it has achieved so far, noted as pbest. It also records the best value obtained so far by its neighbors, namely lbest. The value becomes a global best gbest when a particle takes all the population as its neighbors. The PSO procedure changes each particle velocity toward its pbest and lbest. The variables in the PSO algorithm are summarized as follows: Xgb(t): global optimal location; fgb(t): the objective value of Xgb(t); Xib(t): the optimal location of particle i in one iteration; fib(t): the objective value of Xib(t); Xi(t): the location of particle i at time t; fi(t): the value of Xi(t); Vi(t): the velocity of Xi(t); W: weight; C1, C2: learning factors; rand1 and rand2: random numbers generated from a distribution U(0,1); N: the population of particles; T: the number of iterations. The location of Xi(t) corresponds to a tool path consisting of n cutter locations. A cutter location is fully determined with four pairs of variables: uij, tij, nij, and bij. A complete tool path produces an objective value fi(t) that guides the search process. In this paper, we choose the machining error as the objective to be minimized. The initial velocity of each particle is null. The PSO based search process is described as follows: V i ðt þ 1Þ ¼ W  V i ðtÞ þC 1  rand1  ðX ib ðtÞX i ðtÞÞ þC 2  rand2 ðX gb ðtÞX i ðtÞÞ X i ðt þ 1Þ ¼ X i ðtÞ þV i ðtÞ 0 rt r ðT1Þ,

rand1  Uð0,1Þ,

rand2  Uð0,1Þ,

i ¼ 1,2,:::N

where W, C1, and C2 are constants to be specified by the user.

ð1Þ ð2Þ

The algorithm consists of the following steps: Step 1: N sets of tool path are randomly generated from a uniform distribution. Each tool path corresponds to the location of a particle Xi. The initial velocity Vi(0) is null. We determine the minimal value Xgb(0) by calculating the machining error produced by each particle. Step 2: For each particle, we calculate Xi(t), Vi(t), and fi(t) based on Eqs.(1) and (2). fib(t) is replaced with the smaller between fib(t) and the error. The same update is applied to fgb(t), too. Step 3: The process terminates after T times of iteration, which is used as the termination criterion; otherwise repeats Step 2.

Optimization of tool path planning in terms of machining error is a highly nonlinear problem. This is mainly because that estimation of the machining error cannot be described as a closed-form representation. The problem complexity increases rapidly with the number of cutter locations in a tool path. To search for optimal solutions under such circumstances is extremely difficult. Most past studies employed meta-heuristic algorithms to search for a better tool path, which is generally not guaranteed to be a global optimum. Our previous work [6] was the first attempt that converts the tool path planning in 5-axis flank milling into an optimization problem and solves for optimized tool path using PSO. Experimental results showed that the machining error induced by the tool path thus generated is significantly reduced compared to the ones produced by the tool paths generated using geometric algorithms [3,9]. However, the search efficiency in the optimization process and the quality of optimal solutions were not satisfactory. To overcome these problems, we apply advanced PSO algorithms to search for optima, including Advanced Particle Swarm Optimization (APSO), and Fully Informed Particle Swarm Optimization (FIPS). APSO and FIPS were derived from PSO for performance improvement. The algorithms we adopt in this work were proposed by Kennedy and Eberhart [10] and Jalilvand et al. [11], respectively. They are described as follows.

6

H.-T. Hsieh, C.-H. Chu / Robotics and Computer-Integrated Manufacturing 29 (2013) 3–11

2.4. APSO algorithm Compared to the original PSO algorithm, APSO updates the particle velocity in a different and more sophisticated manner. The random numbers in Eq. (1) are computed as: rand1¼1  (Fbestid/Fid)þrand; rand2¼1  (Fbestgd/Fid)þrand; Fbestgd: the global optimal solution; Fbestid: the local optimal solution of the current particle; Fid: the solution of the current particle; rand: a random number from a distribution U(0,1). The way of generating rand1 and rand2 leads to different particle velocities in APSO. The particle velocity in APSO is related

to the distance between the current particle solution and the global optimal solution. When the particle is far from the global optimal solution, its moving velocity in APSO is faster than that in PSO. This change may accelerate the search process in some occasions.

2.5. FIPS algorithm Similar to APSO, this method is extended from the original PSO algorithm. In the search process driven by FIPS, a particle utilizes information from all its neighbors to determine the next move, rather than just the best one in PSO. Following this idea, the particle velocity is determined as: ! Ki X , , , , V i,d ¼ W  V i,d þ C  randðÞ  ðP nbrn ,d X i,d Þ n¼1 ,

,

,

,

If V i,d 4 V max,d ,V i,d ¼ V max,d Table 1 the parameter of milling cutter. Number of cutter location Cutter length Cutter radius

,

,

,

X i,d ¼ X i,d þ V i,d 40 30 mm 2 mm

ð3Þ

Ki: the number of neighbors that affects the particle velocity; nbrn: the nth particle which that affects the particle velocity; C: the weight value.

(1) C: small; T: small; L: small

(2) C: small; T: small; L: large

(3) C: large; T: small; L: small

(4) C: large; T: small; L: large

(5) C: small; T: large; L: small

(6) C: small; T: large; L: large

(7) C: large; T: large; L: small

(8) C: large; T: large; L: large

Fig. 3. Eight different surfaces generated by varying three factors.

H.-T. Hsieh, C.-H. Chu / Robotics and Computer-Integrated Manufacturing 29 (2013) 3–11

3. Implementation

7

Table 3 Levels of parameters in PSO and APSO.

3.1. Construction of test surfaces Numerous factors can influence the machining error induced by a tool path in 5-axis flank milling of ruled surfaces. These factors can be categorized into two groups. The first set of parameters defines the cutter geometry such as tool radius, nose radius, and taper angle. A flat-end cylindrical cutter is the most common type used in 5-axis flank milling. The cutter size is usually determined by a process planner or manufacturing engineer in the shop floor in consideration of cutting loads and material removal rate. In this work, we employ a cylindrical milling cutter for implementing all optimization algorithms and the subsequent analyses. The cutter parameters are listed in Table 1. We are also interested in how the performance of those optimization algorithms varies with the properties of the surface to be machined. Three intrinsic surface properties are examined in the subsequent analyses: curvature (C), twist (T), and the length difference (L) between two boundary curves defining a ruled surface. They work as independent factors to be varied systematically in construction of test geometries. The surface curvature refers to the maximum normal curvature of a C2 surface. It measures the maximum degree of bending in a regular surface at each point. Twist describes a local property of a surface ruling. This property indicates the deviation between the tangent directions of the end points of the ruling on the boundary curves. It is estimated as the angle extended by the projections of the tangent vectors along the ruling onto a plane. The twist of a ruled surface is defined as the sum of the twist for all surface rulings. The third factor is defined as the length difference between the two boundary curves of a ruled surface.

Table 2 Control points of eight test surfaces.

Factor

Level

W C1 C2

0.5 0.5 0.5

0.75 0.75 0.75

1 1 1

0.75 1.5 4

1 2 8

Table 4 Levels of parameters in FIPS. Factor

Level

W C K

0.5 1 2

Eight types of ruled surfaces can be constructed by varying those three factors. A surface of a large curvature is generated by linear interpolation of both boundary curves of large normal curvatures. The surface twist is created by rotating a boundary curve with respect to the other. The length difference is created by using two boundary curves of different lengths. The eight surfaces generated in these manners are shown in Fig. 3 with the corresponding control points listed in Table 2. We next apply three meta-heuristic algorithms: PSO, APSO, and FIPS, to search for optimized tool paths with machining error as the objective function. According to Kennedy and Eberhart [10], the parameters in the PSO algorithm are chosen as w¼1, C1 ¼2, C2 ¼ 2 without any prior knowledge of the problem to be solved. In this work, these parameter values are determined by a series of full factorial experiments. Each parameter value in PSO and APSO contains three levels in the experiments, as shown in Table 3. FIPS has a different set of parameters and each contains three levels of value. The setting of these FIPS parameters is shown in Table 4. We choose the population size (i.e. the number of particles) as 100 in all optimizations. The initial values of these particles are randomly generated once and used for all three algorithms to eliminate the influence of various initial conditions. The search process terminates after 100 iterations.

4. Test results and discussion A

B

A

B

(1) 1 2 3 4

70,2,  10 81.545,6,  10 92.157,0,  10 109.3,4,  10

70,5,0 81.545,1,0 92.157,5,0 109.3,1,0

(2) 79.125,2,  10 90.204,0,  10 90.204,0,  10 98.775,4,  10

70,5,0 81.545,1,0 92.157,5,0 109.3,1,0

(3) 1 2 3 4

79.125,4,  10 84.898,12,  10 90.204,0,  10 98.775,8,  10

79.125,2,0 84.898,10,0 90.204,2,0 98.775,10,0

(4) 79.125,4,  10 84.898,12,  10 90.204,0,  10 98.775,8,  10

70,4,0 81.545,20,0 92.157,4,0 109.3,20,0

(5) 1 2 3 4

70,2,  10 81.545,6,  10 92.157,0,  10 109.3,4,  10

73.445,13.8573,0 81.443,4.621,0 92.634,2.779,0 105.48,  9.257,0

(6) 79.125,2,  10 84.898,6,  10 90.204,0,  10 98.775,4,  10

73.445,13.857,0 81.443,4.621,0 92.634,2.779,0 105.48,  9.257,0

(7) 1 2 3 4

79.125,4,  10 84.898,12,  10 90.204,0,  10 98.775,8,  10

82.348,  2.027,0 83.347,7.788,0 91.942,3.513,0 95.365,14.726,0

(8) 79.125,4,  10 84.898,12,  10 90.204,0,  10 98.775,8,  10

76.445,  4.053,0 78.443,15.575,0 95.634,7.025,0 102.48,29.453,0

Three optimization algorithms, PSO, APSO, and FIPS, are tested on the eight different surfaces constructed in the previous section. A total number of 24 trials are conducted for each combination of algorithm and test surface to determine the best parameter setting. Each run is repeated three times. The machining error is calculated as the average value of the optimal solutions obtained in the three runs. Table 5 summarizes the test results. The best parameter setting and the minimized error are listed for each result. The minimized errors of each algorithm are compared in Fig. 4(a). This figure shows that FIPS produces the smallest error in most test conditions, except for the test surface of a large length difference, a small curvature, and a small twist. The result obtained by FIPS is fairly close to the best value in this case. The same tests are conducted for the second time with a smaller cutter and the results are shown in Table 6 and Fig. 4(b). FIPS outperforms PSO and APSO by producing the smallest error in all surfaces after the cutter radius has been reduced. It is concluded that FIPS is more effective in optimization of tool path planning

8

H.-T. Hsieh, C.-H. Chu / Robotics and Computer-Integrated Manufacturing 29 (2013) 3–11

Table 5 Test results with cutter radius¼ 2 mm (units: mm). Length different

Curvature

Twist

W

C1 or C

C2 or K

Minimized error by PSO/APSO/FIPS

Small

Small

Small

Large

Small

Small

Small

Large

Small

Large

Large

Small

Small

Small

Large

Large

Small

Large

Small

Large

Large

Large

Large

Large

0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.5 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75

0.75 1 2 1 1 2 0.5 1 1.5 1 1 1.5 1 1 2 0.75 1 1.5 1 1 2 1 1 2

0.5 0.5 8 0.5 0.75 4 0.5 0.5 8 0.5 0.5 8 0.5 0.5 8 0.5 0.75 8 0.5 0.5 8 0.5 0.5 4

10.76273 12.1402 7.77356 27.58787 28.38707 28.54463 7.683013 8.883763 3.805677 8.19887 9.804107 4.694397 32.73473 31.78623 20.73527 56.4203 61.5624 49.5559 18.85557 22.64723 13.76547 36.7107 37.81593 31.47817

The test results also show that the surface properties to a large extent influence the performance of the optimization algorithms, particularly PSO and APSO. Quantitative analysis is conducted to characterize how the performance of each algorithm varies with each surface property. The smallest error emin can be generated from the three algorithms. We define ratio of error as: Ratio of error ¼

Fig. 4. Minimized errors generated by the three optimization algorithms on eight test surfaces (a) cutter radius¼ 2 mm and (b) cutter radius¼1 mm.

in 5-axis flank milling of ruled surfaces than PSO and APSO. Another observation is that the best parameter setting in the optimizations largely depends on the surface properties. It is necessary to select the parameter values according to the test surface in order to produce better optimal solutions.

erremin emin

ð4Þ

where err is the minimized error obtained by each run. As shown in Fig. 5, ‘‘high’’ and ‘‘low’’ in the x-axis indicate the high and low level setting of surface property. The figure shows that FIPS has the most stable performance with respect to variation of the surface properties. FIPS performs better than the other two algorithms regardless of the property setting. In contrast, intersection of the lines corresponding to PSO and ASPO indicates that their solution quality varies with different property values. We also investigate the performance of the three algorithms relating to different numbers of cutter locations. The test surface is of a large length different, a large curvature, and a large twist in this case. Such a surface has the most complex shape and, as expected, the resultant largest machining error. This may produce a larger difference in the machining error when various parameter settings are tested. We proportionally decrease the number of surface sampling points in the error estimation while reducing the number of cutter location. This assures the optimal solutions are comparable. The test results are shown in Table 7. The results show that the performance of the three algorithms varies with the number of cutter locations. An interesting observation is that PSO produces the smallest error with the fewest cutter locations. The solution quality generated by PSO is better with a shorter encoding length or, alternatively stated, a smaller solution space of low dimensions. The search capability of FIPS is superior to PSO and APSO in a large solution space. This conclusion can be explained better with a simple example, in which PSO and FIPS algorithms are applied to minimize a polynomial

H.-T. Hsieh, C.-H. Chu / Robotics and Computer-Integrated Manufacturing 29 (2013) 3–11

9

Table 6 Test results with cutter radius¼ 1 mm (units: mm). Length different

Curvature

Twist

W

C1 or C

C2 or K

Minimized error by PSO/APSO/FIPS

Small

Small

Small

Large

Small

Small

Small

Large

Small

Large

Large

Small

Small

Small

Large

Large

Small

Large

Small

Large

Large

Large

Large

Large

0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75

1 1 1.5 1 1 2 1 1 2 1 1 1.5 1 1 1.5 1 1 2 1 0.75 2 0.75 1 2

0.5 0.5 8 0.5 0.5 8 0.5 0.5 8 0.5 0.5 8 0.5 0.5 8 0.5 0.5 8 0.5 0.5 4 0.5 0.5 8

8.534187 9.50094 4.84927 15.81173 13.62047 12.5187 7.314887 8.971233 3.53476 7.60114 9.141437 4.598927 25.7539 24.32783 14.5411 27.96893 29.8218 23.52083 21.36427 20.54093 11.96813 25.3527 26.58437 17.6254

Table 7 Test results with different numbers of cutter locations (units: mm).

Fig. 5. Influences of (a) the length difference, (b) curvature, and (c) twist on the performance of the three algorithms.

objective function as: Min f ðxÞ ¼

N X i¼1

x2i

3 rxi Z 3

ð5Þ

Number of cutter locations

PSO

APSO

FIPS

40 20 10 5

36.711 18.365 9.231 3.442

37.816 18.732 9.222 3.466

31.478 15.739 9.313 3.563

where xi is generated randomly. In this example, N indicates the encoding length. The fitness values generated by PSO and FIPS with different N values are shown in Fig. 6. We can observe that PSO performs better than FIPS when the encoding length is lower than 40. FIPS produces a smaller fitness value as the length is increased. Moreover, the greater the encoding length is, the better performance FIPS provides compared to PSO. This simple example serves as an analogy explaining why PSO performs better than FIPS when the solution space is small, corresponding to a low number of cutter locations. We validate the test results using a commercial package NC VericutTM. This software package is commonly used in industry for graphical simulation and verification of CNC tool path. It accepts tool motion in NC or APT (Automatically Programmed Tool) format as input and performs real-time simulation for material removal during the cutting process. The simulated result helps process planners detect tool collision or other errors in the tool motion. NC VericutTM also facilitates optimized feedrate adjustment and elimination of redundant tool motion. The surface used in the following simulation is of a large length different, a large curvature, and a large twist. The cutter radius is 2 mm. As shown in Fig. 7, different colors on the machined surface indicate occurrence of overcut and undercut. Table 8 compares the machining errors estimated by this work and NC VericutTM. Both

10

H.-T. Hsieh, C.-H. Chu / Robotics and Computer-Integrated Manufacturing 29 (2013) 3–11

Table 8 Validation of machining errors with NC VericutTM (units: mm).

This work NC VericutTM

Fig. 6. Optimal solutions obtained by PSO and FIPS with respect to different encoding lengths.

Fig. 7. Tool motion simulation and verification.

PSO

APSO

FIPS

36.5421 36.8231

37.3646 37.8212

31.5288 31.532

advanced machining operation has found its applications in manufacturing of complex geometries in various industries since the late 90’s. Precise control of machining error by tool path planning is a challenging task in 5-axis flank milling of ruled surfaces and still lack of satisfactory solutions. Ad hoc planning methods such as following the surface rulings and tilted at certain angle are commonly used in practice. These methods often fail to meet design specifications by producing excessive deviation on the machined surface. Previous studies have verified the effectiveness of machining error reduction through global optimization of tool path planning. For simplification purpose, most of the studies imposed a pre-condition that the cutter must make contact with the boundary curves of the surface to be machined. This constraint results in a restricted solution space in the optimization and thus suboptimal solutions. In addition, the meta-heuristic approaches adopted by those studies failed to produce satisfactory quality of optimal solutions and efficient search process. Therefore, this research aims at improving optimization of the tool path planning in 5-axis flank milling with advanced PSO algorithms. Our approach allows the cutter to move along the tangent, normal, and b-normal directions at any point of the boundary curves. This produces a solution space in the optimization larger than that in past studies. PSO, APSO and FIPS algorithms have been used to search for optimal tool paths in the enlarged space. Fully factorial experiments were conducted to determine best parameter settings in these algorithms. Test ruled surfaces were constructed by systematic variations of three surface properties: curvature, twist, and the length difference between boundary curves. The three optimization algorithms have also been tested against various cutter radii. The test results have shown that FIPS produces smallest machining errors on all the surfaces regardless of the cutter radius. PSO performs best when a tool path consist of a very low number of cutter locations. An analogous example demonstrates the similar trend that PSO can be more effective in a small solution space. Graphical and numerical simulation of the tool paths validates the error estimation in this work. Compared to previous studies, this research improves tool path planning in 5-axis flank milling by producing smaller machining errors. It also provides important findings in PSO based optimization of the tool path planning. Future work is to incorporate other objective functions into the optimization, such as energy consumption and surface finish. Cutting forces and tool chatter are also issues that can be considered in the tool path planning. Multi-objective optimization schemes are needed in this case. References

optimal solutions are fairly close, regardless of the optimization methods. This validates the machining error estimation proposed by this work.

5. Conclusion 5-axis machining provides higher productivity and better shaping capability than traditional 3-axis machining. This

[1] Rehsteiner F. Collision-free five-axis milling of twisted ruled surfaces. CIRP Annals 1993;42(1):457–61. [2] Chu CH, Chen JT. Automatic tool path generation for 5-axis flank milling based on developable surface approximation. International Journal of Advanced Manufacturing Technology 2006;29(7–8):707–13. [3] Tsay DM, Her MJ. Accurate 5-axis machining of twisted ruled surfaces. ASME Journal of Manufacturing Science and Engineering 2001;123:731–8. [4] Wu PH, Li YW, Chu CH. Tool path planning for 5-axis flank milling based on dynamic programming techniques. International Journal of Machine Tools & Manufacture 2008;50:1224–33.

H.-T. Hsieh, C.-H. Chu / Robotics and Computer-Integrated Manufacturing 29 (2013) 3–11

[5] Chu CH, Tien KW, Lee CT, Ting CJ. Efficient tool path planning in 5-axis milling of ruled surfaces using ant colony system algorithms. International Journal of Production Research 2010;49(6):1557–74. [6] Hsieh ST, Chu CH. PSO-based tool path planning for 5-axis flank milling accelerated by GPU. International Journal of Computer Integrated Manufacturing 2011;24(7):676–87. [7] Liu XW. Five-axis nc cylindrical milling of sculptured surfaces. ComputerAided Design 1995;27(12):887–94. [8] Lartigue C, Duc E, Affouard A. Tool path deformation in 5-axis flank milling using envelop surface. Computer-Aided Design 2003;35:375–82.

11

[9] Menzel C, Bedi S, Mann S. Triple tangent flank milling of ruled surfaces. Computer-Aided Design 2004;36:289–96. [10] Kennedy J and Eberhart RC, Particle Swarm Optimization, Proc. IEEE International Conference on Neural Networks, IEEE Service Center, Piscataway, NJ, (1995) 1942–48. [11] Jalilvand A, Kimiyaghalam A, Ashouri A, and Mahdavi M, Advanced Particle Swarm Optimization-based PID Controller Parameters Tuning, The 12th IEEE Multitopic Conference, Pakistan, (2008) 429–35.