Optimized Tool Path Planning in 5-Axis Flank Machining sing Electromagnetism-like Algorithms Chi-Lung Kuo 1, Chih-Hsing Chu 1, Ying Li 2, Xinyu Li 2, Liang Gao 2 1
Department of Industrial Engineering and Engineering Management, National Tsing Hua University, Hsinchu, Taiwan State Key Lab of Digital Manufacturing Equipment & Technology,, Huazhong University of Science & Technology, Wuhan, China (
[email protected])
2
Abstract - Optimization of tool path planning using metaheuristic algorithms provides a feasible approach to reduce geometrical machining errors in 5-axis flank machining of ruled surfaces. The solution quality of these algorithms is unsatisfactory in a high-dimensional search space. In this study, various algorithms derived from the electromagnetism-like mechanism (EM) were applied. The test results of representative surfaces showed that all EMbased methods yield more effective optimal solutions than does PSO, despite a longer search time. A new EM-MSS (electromagnetism-like mechanism with move solution screening) algorithm produces the most favourable results by ensuring the continuous improvement of new searches. This work improves the practical values of tool path planning by offering a satisfactory machining quality.
like mechanism with move solution screening (EM-MSS) algorithm. The SEM algorithm simplifies calculation of the interaction forces between particles. The EM-MSS algorithm guarantees continuous improvement of search results by adding a solution screening step. These algorithms were used to optimize the tool path planning with a set of representative test surfaces. The test results were compared with those produced by PSO on computational time and solution quality. Conclusion remarks were given to summarize the effectiveness of the EM-based methods on reducing the geometrical deviations in 5-axis flank finishing cut of ruled surfaces. II. TOOL PATH PLANNING IN 5-AXIS FLANK MACHINING
electromagnetism-like mechanism Keywords algorithm, 5-axis machining, flank milling, tool path planning
A CNC tool path is defined by a set of cutter locations (CL). The cutter normally follows a linearly interpolated tool motion between consecutive cutter locations. In 5-axis flank finishing cut of a ruled surface, the simplest method for tool path planning is to allow the cutter to move along the surface rulings. The resultant path produces excessive machining deviations in twisted surface regions, though.
I. INTRODUCTION 5-axis CNC machining has been commonly used in manufacturing of complex geometries in automobile, aerospace, energy, and mold industries. This advanced machining operation provides better shaping capability and higher productivity compared to traditional 3-axis machining. Tool path planning becomes a challenging task in most 5-axis machining operations due to additional degrees of freedom in the tool motion. In 5-axis flank machining, the flank part of a cutter is used to remove stock materials and create the design geometry. The cutter will induce substantial deviations near twisted surface regions [1]. Precise control of the machining deviations is still lack of solutions. The geometrical deviations in 5-axis flank finishing of ruled surfaces can be reduced by adjusting all cutter locations of a tool path simultaneously. Previous studies [2-4] have shown that meta-heuristic algorithms provide a systematic approach to controlling and reducing the geometrical deviations in 5-axis flank finishing cut of ruled surfaces through optimization of tool path planning. However, the optimization schemes based on ACS and various PSO algorithms failed to produce good search results due to high dimensionality of the solution space. This study developed optimization methods based on the electromagnetism-like mechanism (EM) to enhance the solution quality. Two new algorithms were derived from the original EM: a simplified electromagnetism-like mechanism (SEM) algorithm and an electromagnetism-
978-1-4799-6410-9/14/$31.00 ©2014 IEEE
Fig. 1. Defining a cutter location with respect to a ruled surface
A cutter location is specified with respect to a ruled surface as shown in Fig. 1. The cutter contact points pA and pB are first generated from the two boundary curves (A and B) and each corresponds to the parameter values uA and uB, respectively. The cutter center point is then determined by offsetting the contact point along the surface normal with a distance of the cutter radius. The cutter orientation lies in the direction connecting the two
973
Proceedings of the 2014 IEEE IEEM
cutter center points. In this study, we allow the cutter center point to deviate from the cutter contact point in the surface normal, tangent, and bi-normal directions. When the objective function is to minimize the accumulated deviations on the machined surface, optimization of the tool path planning is expressed as:
III. OPTIMIZATION SCHEMES A. Electromagnetism-like Mechanism (EM) EM is a stochastic optimization method based on electromagnetism [7]. The original EM algorithm imitates the attraction/repulsion in the electromagnetism theory. A solution is a charged particle in search space and its charge relates to the objective function value. Due to the electromagnetic force between two particles, a particle with more charge attracts the other and the other one repulses the former. The better the objective function value, the higher the magnitude of attraction or repulsion between particles, determined by the particle charge. The original EM algorithm consists of four phases [8]: initialization of the algorithm (Initialize), application of neighborhood search to exploit the local (Local), calculation of the total force (CalcF) exerted on each particle, and movement along the force direction (Move). A general framework is described as follows.
(1) Subject to
0did(N1), 0duAd1, 0duBd1;
where is the geometrical deviation induced by the cutter motion from to . The curve parameters are uA and uB, respectively. A tool path consists of N cutter locations. A cutter location can be adjusted in 3D space by varying a set of 8 parameter values [3]. To obtain an optimal tool path yielding minimized geometric deviations requires adjustment of all cutter locations simultaneously. This involves search for optimal solutions in a high-dimensional solution space (8N dimensions in this case). 1. Generate sample points
3. Intersect the lines with the cutter
EM Framework EM(m, MAXITER, LSITER, ) m: particle number MAXITER: maximum number of iterations LSITER: maximum number of local search iterations : local search parameter, [א0,1]
2. Produce line segments at each sample point
1: 2: 3: 4: 5: 6: 7: 8:
4. Calculate the accumulated deviations
Initialize () iteration m 1 while iteration < MAXITER do Local (LSITER, ) F m CalcF () Move (F) iteration m iteration + 1 end while
Initialize The procedure Initialize randomly samples n points in an m-dimensional search space. Assume that the coordinates of a sampling point follow a uniform distribution U(0, 1) between given upper and lower bounds, uk and lk. Each sampling point corresponds to a particle in the EM algorithm. The particle with the best value is stored as xbest .
Fig. 2. Estimating machining deviations by the stock height method [6]
In this study, the objective function applied in the optimization process is the accumulated geometrical deviations on the finished surface. Exact estimation of the geometrical deviations is highly difficult and might not be required. The stock height method developed in the previous study [6] estimates the deviations approximately. As shown in Fig. 2, the estimation process contains four steps. The optimization problem described in (2) has thus become:
Local Most random search algorithms reply on local search to attain good optimal solutions. The procedure Local is applied to improve the quality of the initial solutions obtained by Initialize. It is a simple random line search determined by two parameters – LSITER and , representing the number of iterations and a multiplier .
(2) where is the approximate deviations estimated by the stock height method. A set of intermediate cutter locations and replaces the linear interpolated from continuous tool motion. This mimics the linear interpolation normally conducted by a CNC controller.
CalcF The procedure CalcF integrates local and global search results by calculating the electromagnetic-like force between two particles. The force exerted on a particle by the other is inversely proportional to the
974
Proceedings of the 2014 IEEE IEEM
distance between them and directly proportional to the product of their charges (see (3)). Note that the charge carried by particles can change in the EM algorithm, but this change is not possible in reality. The charge of particle i is determined as:
problem, a simplified formula is proposed to calculate the particle charge: (6) The force is written as:
(3)
(7)
This equation indicates that higher charges produce better objective function values. The number of dimensions n multiplied in the equation avoids overflow in the exponential function when the denominator becomes too large. Experimental results obtained by the previous study [9] have shown that determining the particle charge by (4) normally gives satisfactory search results. The total force Fi exerted on particle i is computed as:
The algorithm adopting this new procedure is named as Simplified Electromagnetism-like Algorithm (SEM). C. Electromagnetism-like Algorithm with Move Solution Screening (EM-MSS) SEM does not guarantee that the solution generated by the Move procedure is better than the original one. This may lengthen the computational time during the optimization process and deteriorate the solution quality. A screening mechanism is proposed to assure generation of better solutions after the Move procedure. This procedure repeats until the new solution is of a better objective function value than the previous one. The EM algorithm using this screening mechanism is referred to as Electromagnetism-like Algorithm with Move Solution Screening (EM-MSS).
(4)
The charge calculated by (4) does not carry a positive or negative sign. The direction of the electromagnetic-like force is determined by (5). As shown in the procedure CalcF, a particle with a better objective function value attracts the other particle; the one with a worse value repels the other. Since xbest has the best objective function value, it attracts all other points in the population.
IV. TEST RESULTS The previous study [5] proposed a set of representative ruled surfaces for comparing the effectiveness of different tool path planning methods. These surfaces were constructed by varying three intrinsic properties: curvature (C), twist (T), and the length difference (L) between two boundary curves defining a ruled surface. Eight types of ruled surfaces can be constructed by varying those three properties as follows [5]. Connecting two boundary curves of large normal curvatures produces a surface of a large curvature. Rotating a boundary curve with respect to the other yields a twisted surface. Placing the control points of a free-form curve in space controls its arc length. Table 1 lists the setting of cutting parameters in the subsequent tests. The numbers of sample points determine the precision of estimating the objective function, i.e. the geometrical deviations estimated using the stock height method. The number of interpolation between consecutive cutter locations also relates to the precision. The values of those parameters were chosen as recommended by the previous studies [3-5]. PSO-based tool path planning was also tested for comparison with EM-based approaches. The parameter setting in the EM-based algorithms is shown in Table 2. Each algorithm was conducted three times to reduce the
Move In this procedure, particle i will be moved in the direction of Fi by a random step length given by: (5)
We assume that obeys a uniform distribution between 0 and 1. Distributions of other types can also be used in calculating the step length. A step length randomly determined guarantees a nonzero probability of moving toward unvisited search space. B. Simplified Electromagnetism-like Algorithm (SEM) In the EM algorithm, estimation of the particle charge using (4) and the resultant force using (5) involves a large number of algebraic operations. The optimization process may require lengthy computational time when solving complex problems. A greater value of the denominator in (5) produces smaller forces between particles. As a result, the step length in the procedure Move tends to be too short and the search result is thus likely to be restricted within a small neighborhood in the solution space. To avoid this
975
Proceedings of the 2014 IEEE IEEM
influence of randomness. An initial tool path was generated by allowing the cutter to contact discrete surface rulings determined by varying the curve parameter u with a constant increment of 0.025, as the number of cutter locations is 40 in all tests. Table 3 lists the results, the best and average values in three runs, generated by PSO, EM, SEM, and EM-MSS algorithms for eight test surfaces. Fig. 3 shows that the search processes produced by all gradually converge to the final solutions. Figs. 4 and 5 compare the test results in bar charts. The EM-MSS algorithm yields the best solutions in all test cases. The EM and SEM algorithms perform better than PSO in most tests except Surf3 and Surf4. Large surface twist normally results in an excessive amount of the machining deviations. The test results (Surfs 5, 6, 7, and 8) indicate that the solution quality of the PSO algorithm is worse than those of the EM-based algorithms in this case.
V. CONCLUSION Optimized tool path planning driven by metaheuristic algorithms provides a systematic approach to reducing the geometrical deviations in 5-axis flank finishing cut of ruled surfaces. However, the search results thus generated seem to quickly converge to local optima and are difficult to be further improved. This study developed various EM-based algorithms and applied them to the tool path planning problem. The SEM algorithm simplifies calculation of the particle charge in EM to increase the step length in determining new search result. The EM-MSS algorithm includes a screening step to guarantee continuous improvement in the Move procedure. Test results with representative surfaces have shown that the EM algorithms normally yield smaller optimal solutions than those of PSO, but require a longer computational time. The improvement of using simplified particle charge was not significant.
TABLE I Setting of cutting parameterį # of sample points in the u direction
200
# of sample points in the v direction
10
# of cutter locations (CL)
40
cutter length
30 mm
cutter radius
2 mm
# of interpolations between cutter locations
10 Fig. 3. The convergence processes of all algorithms.
TABLE IŊ Setting of cutting parameterį Parameter setting in the EM-based algorithms
# of particles maximum # of iterations
Notation m MAXITER
Value 50 50
maximum # of iterations in local search
LSITER
1
uk
0.05
lk
-0.05
umax lmax
1 -1
upper bound of variable change in one iteration lower bound of variable change in one iteration upper bound of variable setting lower bound of variable setting
Fig. 4. Comparison of optimal solutions (best value) in bar charts.
EM-MSS yields better solutions than EM and SEM in all test surfaces. We thus conclude that the screening mechanism works well by assuring good search results every time after applying the Move procedure. The solution quality of SEM is slightly better than that of EM in all tests. Improvement of the search results is limited using the new force calculation (5). However, SEM indeed requires shorter computational time in the optimization process with this simplified formula (see Table 4). Fig. 5. Comparison of optimal solutions (average value) in bar charts.
976
Proceedings of the 2014 IEEE IEEM
TABLE IŊŊ Test results of different algorithmsį Surface Surf1 Surf2 Surf3 Surf4 Surf5 Surf6 Surf7 Surf8
PSO Best 8.534 15.812 7.315 7.601 25.753 27.969 21.364 25.352
EM Ave. 12.119 20.562 11.691 12.321 32.449 30.953 23.451 28.087
Best 6.334 9.456 9.434 11.879 10.101 20.049 13.424 24.435
SEM Ave. 7.845 11.170 11.922 15.046 12.652 22.124 14.231 26.657
Best 6.486 9.196 9.325 11.235 11.437 20.135 12.676 22.365
Ave. 7.737 11.155 11.876 14.757 12.121 22.121 14.206 25.829
EM-MSS Best Ave. 4.642 6.323 9.275 10.234 4.678 7.244 6.539 8.431 7.919 11.257 4.831 5.267 7.602 12.367 22.288 24.125
TABLE IV The computational time of different algorithms (units: second)į Surface Surf1 Surf2 Surf3 Surf4 Surf5 Surf6 Surf7 Surf8
PSO Best 9634 9782 9843 9756 10156 10537 10342 10432
EM Ave. 10123 10243 10356 10342 10643 10789 10974 10622
Best 33231 32796 34288 34531 33998 35413 32168 34468
SEM Ave. 34592 35693 37119 37654 38852 38752 35575 35857
Best 29078 31044 33462 32344 31137 30560 31727 33038
Ave. 29806 32018 35961 32845 31732 31440 34005 34677
EM-MSS Best Ave. 36257 37369 42396 45056 44199 47264 41056 42965 38921 42337 38200 41463 42695 44223 41095 44747
[6] Wu, P. H., Li, Y. W., and Chu, C. H., “Optimized tool path generation based on dynamic programming for five-axis flank milling of rule surface,” International Journal of Machine Tools and Manufacture, Vol. 48, No. 11, pp.12241233, 2008. [7] Birbil, . . and Fang, S. C., “An electromagnetism-like mechanism for global optimization,” Journal of Global Optimization, Vol. 25, No. 3, pp. 263-282, 2003. [8] Zhang, C., Li, X., Gao, L., and Wu, Q., “An improved electromagnetism-like mechanism algorithm for constrained optimization,” Expert Systems with Applications, Vol. 40, No. 14, pp. 5621-5634, 2013. [9] Wu, Q., Li, X., Gao, L. and Li, Y. “A simplified electromagnetism-like mechanism algorithm for tool path planning in 5-axis flank milling,” IEEE 17th International Conference on Computer Supported Cooperative Work in Design, Whistler, Canada, 2013.
The EM-MSS algorithm produced best solutions in all test surfaces, with a small increase in search times. This study has demonstrated the feasibility of the global optimization algorithm EM on tool path planning in 5-axis flank machining of ruled surfaces. Although the EM algorithms are effective in finding better solutions, they require a greater number of search trials than PSO. A potential enhancement is to reduce the range of local search in those algorithms. Sampling techniques can be incorporated to reduce the number of optimization variables at various iteration stages during the search process. REFERENCES [1] Chu, C. H. and Chen, J. T., “Tool path planning for 5-axis flank milling with developable surface approximation,” International Journal of Advanced Manufacturing Technology, Vol. 29, No. 7-8, pp. 707-713, 2006. [2] Chu, C. H., Lee, C. T., Tien, K. W., and Ting, C. J., “Efficient tool path planning for 5-axis flank milling of ruled surfaces using ant colony system algorithms,” International Journal of Production Research, Vol. 49, No. 6, pp. 1557-1574, 2011. [3] Hsieh, H. T. and Chu C. H., “PSO-based tool path planning for 5-axis flank milling accelerated by GPU,” International Journal of Computer Integrated Manufacturing, Vol. 24, pp. 676-687, 2010. [4] Hsieh, H. T. and Chu, C. H., “Optimization of tool path planning in 5-axis flank milling of ruled surfaces with improved PSO,” International Journal of Precision Engineering and Manufacturing, Vol. 13, No. 1, pp. 77-84, 2012. [5] Hsieh, H. T. and Chu, C. H., “Improving tool path planning in 5-axis flank milling of ruled surfaces using advanced PSO algorithms,” Robotics & Computer Integrated Manufacturing, Vol. 29, No. 3, pp. 3-11, 2013.
977