# A metaheuristic for fast machining error compensation

- 1.4k Downloads
- 4 Citations

## Abstract

In case of complex parts machining or multi-directional machining in multi-part fixtures the error compensation in multi-dimensional decision space poses a difficult problem. The article focuses on the limitation of defective products by means of systematic increase of the remaining error budget due to correction of the setup data. A vectorial equation for machine tool space description is presented. The development of geometric dimensioning and tolerancing scheme to the levels connected with the setup data is proposed. The optimization algorithm used here is based on the paradigm particle swarm optimization (PSO), but it includes a few significant modifications inspired by the growth of the coral reef thus the name of the method—coral reefs inspired particle swarm optimization (CRIPSO). CRIPSO has been compared with three other popular metaheuristics: classic PSO, genetic algorithm, and cuckoo optimization algorithm. There is a practical example in this article.

## Keywords

Workpiece accuracy Error budget Machining error compensation Metaheuristic optimization algorithm## List of symbols

## Indices

- \(f\)
Index of features \((f = 1, 2, \ldots , \left| F \right| )\)

- \(i\)
Index of decision variable \((i = 1, 2 , \ldots , \left| W \right| +\left| T \right| )\)

- \(j\)
Index of WKS \((j = 1, 2 , \ldots , \left| W \right| )\)

- \(m\)
Index of MKS \((m = 1, 2 , \ldots , \left| M \right| )\)

- \(q\)
Index of dimension \((q = 1, 2 , \ldots , \left| D \right| )\)

- \(p\)
Index of particle (polyp) \((\hbox {p} = 1, 2 , \ldots , \left| P \right| )\)

- \(t\)
Index of tool \((t = 1, 2 , \ldots , \left| T \right| )\)

## Sets

- \(M\)
Nonempty, finite set of machine points

- \(W\)
Nonempty, finite set of WKS points

- \(T\)
Nonempty, finite set of code points of tools

- \(F\)
Nonempty, finite set of features

- \(D\)
Nonempty, finite set of dimensions

- \(P\)
Current set of solutions (particles, polyps)

- \(P_{1}\)
Set of solutions fulfilling criterion \(f_{1}\)

- \(R\)
\(R_{MW} \cup R_{WF} \cup R_{TF} \cup R_{FD}\)

- \(R_{MW}\)
Relation between the elements of sets \(M\) and \(W\)

- \(R_{WF}\)
Relation between the elements of sets \(W\) and \(F\)

- \(R_{TF}\)
Relation between the elements of sets \(T\) and \(F\)

- \(R_{FD}\)
Relation between the elements of sets \(F\) and \(D\)

## Parameters

- \(b\)
Error budget bonus

- \(c_{1}\)
Cognition coefficient

- \(c_{2}\)
Social coefficient

- \({\mathop {\mathop {D}\limits ^{\leftrightarrow }}\nolimits _{q}}\)
The modification of

*q*th dimension- \(dZ^{-}\)
Lower error budget

- \(dZ^{+}\)
Top error budget

- \(E^{sd}_{i}\)
Error of

*i*th setup data- \(\varepsilon _{q}\)
Performance error of

*q*th dimension- \(E_{q}\)
Random error of

*q*th dimension- \({\mathop {\mathop {F}\limits ^{\leftrightarrow }}\nolimits _{f}}\)
The modification of

*f*th surface position- \(gbest_{i}\)
*i*th coordinate of the best positioned polyp- \(plast_{i}\)
*i*th coordinate of the last planula- \(pbest_{i}\)
*i*th coordinate of the best planula- \(r, r_{1}, r_{2}\)
Uniformly distributed random numbers among 0 to 1

- \(T_{q}\)
Tolerance of

*q*th dimension- \(w, w_{1}, w_{2}\)
Weighting factors

- \(\delta \)
Unilateral error budget

- \(\varDelta Z\)
Maximum error budget

## Decision variables

- \(\mathop {W}\limits ^{\leftrightarrow }\)
Correction of

*n*th WKS- \(\mathop {T}\limits ^{\leftrightarrow }\)
Correction of

*t*th tool- \(x_i\)
Position of the polyp in

*i*th dimension- \(x^{\prime }_i\)
The position of setting a new planula in

*i*th dimension- \(\mathop {x}\limits ^{\leftrightarrow }\)
\([{\mathop {\mathop {W}\limits ^{\leftrightarrow }}\nolimits _{1}}, {\mathop {\mathop {W}\limits ^{\leftrightarrow }}\nolimits _{2}}, \ldots , {\mathop {\mathop {W}\limits ^{\leftrightarrow }}\nolimits _{|W|}}] \,\cup \, [{\mathop {\mathop {T}\limits ^{\leftrightarrow }}\nolimits _{1}}, {\mathop {\mathop {T}\limits ^{\leftrightarrow }}\nolimits _{2}}, \ldots , {\mathop {\mathop {T}\limits ^{\leftrightarrow }}\nolimits _{|T|}}]\)

## Introduction

Error budget serves to predict and/or control errors in a system. Every machine tool has its own error budget serving to predict its accuracy and repeatability (Slocum 1992). The error budget helps identify where to focus resources to improve the accuracy of an existing machine or one under development (Hale 1999). Every workpiece can be also given certain error budget which stands for an acceptable error in machining it. The amount of error budget is related to the production cost (Bohez 2002). Therefore on every stage of the production process we need to maximize the remaining error budget.

In the machining process many various sources of errors can be identified (Fig. 1) as well as the manners of their compensation (Yuan and Ni 1998; Liu 1999; Ramesh et al. 2000a, b; Mehrabi et al. 2002; Wang et al. 2006; Loose et al. 2007; Rahou et al. 2009; Mekid and Ogedengbe 2010). Identification and compensation for particular errors is difficult time-consuming and costly, moreover their total eradication is in most cases impossible. The amount of errors can be limited even while designing the machine tool (Hale 1999) or they can be measured and compensated for (Sartori and Zhang 1995). Compensation can relate to the chosen errors or the total error. Typical approach to the error compensation includes building the mathematical models taking into account the data from the sensors placed on the machine tool in on-machine-measurement (OMM) system (Ziegert and Kalle 1994; Ouafi et al. 2000; Cho et al. 2006; Marinescu et al. 2011), by the reconstruction of the control program (Mäkelä et al. 2011; Cui et al. 2012) and more.

This article discusses automatic determination of the corrections on the axle Z of the machine tool by changing the setup data of the tools and the position of the local coordinate systems connected with the workpiece. In case of a complex geometric dimensioning and tolerancing (GD&T) model finding good solution requires optimization procedure.

## Metaheuristic techniques in process planning and manufacturing

The problem of optimization in the discussed issue comes down to searching the optimal solution in multi-dimensional, discrete state space. It is a classical artificial intelligence problem. Computational intelligence (CI) is a successor of good old-fashioned artificial intelligence (GOFAI). GOFAI developed as the project of empirical research, implements a weak model of semantic networks. CI rather relies on metaheuristic algorithms such as fuzzy systems, artificial neural networks (ANNs), evolutionary computation, artificial immune systems, etc. CI combines elements of learning, adaptation, evolution and fuzzy logic (rough sets) to create programs that are, in a sense, intelligent. So far, many metaheuristic search algorithms have been invented. Timeline of main metaheuristic algorithms devised up to 2010 has been presented in (Gandomi et al. 2013). Recently, there’s been rapid increase in popularity of newly defined approaches, such as: cuckoo search algorithm (Mohamad et al. 2013), glowworm swarm optimization (Zainal et al. 2013), Levy flight algorithm (Kamaruzaman et al. 2013), firefly algorithm (Johari et al. 2013).

In year 2000, Kusiak published a trailblazing book (Kusiak 2000), which, for the first time, included state-of-the-art CI techniques to all phases of manufacturing system design and operations. The most important areas of manufacturing engineering are process planning and process control. The process plan constitutes an ordered sequence of tasks which can transform raw material into the final part economically and competitively. The major process planning activities are: features extraction, part classification for group technology, machining volume decomposition, tool path generation, machining condition optimization, operation sequencing, machine, setup and tool selection, and others. Because process planning is a NP-hard problem, some global search techniques must be applied. A brief review of CI applications in machining process planning and related methods and problems will be presented in work (Stryczek 2007). Fuzzy logic (FL) can by effectively used in modeling of machining processes such as predicting the surface roughness and controlling the cutting force. Adnan et al. (2013) present FL techniques used in machining process. FL was considered for prediction, selection, monitoring, control and optimization of machining process.

In the field of machining process planning, CI methods have been used most often for optimizing machining process parameters. The gradient-based non-linear optimization techniques have difficulty with solving those optimization problems; one must resort to alternative, conventional, non-systematic optimization techniques, i.e., evolutionary algorithms (Zhang et al. 2006). An overview and the comparison of the researches from 2007 to 2012 that used evolutionary optimization techniques to optimize machining process parameters were presented in Yusup et al. (2012a, b). Genetic algorithm (GA) stands out among CI methods as it is currently the full-grown method of single and multi-objective optimization, tested in many variants. Zain et al. (2008) discussed on how GA system operates in order to optimize the surface roughness performance measure in milling process. Yusoff et al. (2011) reviews the application of non dominated sorting genetic algorithm II (NSGA-II), classified as one of multi-objective GA techniques, for optimizing process parameters in various machining operations.

## Coral reefs inspired particle swarm optimization

The popular metaheuristic, Particle Swarm Optimization (PSO), has been developed originally by Kennedy and Eberhart (1995). At the same time deep modifications have been introduced to PSO (Poli et al. 2007). They were inspired by the rebuilding processes in the coral reef, so the method has been called coral reefs inspired particle swarm optimization (CRIPSO).

The coral reef is a complicated ecosystem bound by the evolution rules, which undergoes constant reconstruction. It is a live organism consisting mostly of polyps which cluster into colonies. During the reproduction coral reef grows upwards and sideward. Polyps produce small larva better known as planula. After swimming for a few hours or even days planula settles down and transforms into a new polyp competing for food and space. Comparing polyp colonies with the particle swarm we can see the following differences. Polyp is a stationary particle undergoing reproduction and dying many times. In the classic PSO, particle is in constant movement and there is no generational change. Potential advantage of the modification is that the particles with the lower mark are eliminated from the population and the best ones can generate their descendants many times. CRIPSO is based on the principle of elitism

- I.
The shift of the last planula generated by the given polyp. In case of a new polyp the direction of the inertia vector is agrees with the movement direction between the planula’s parent’s position and the point of planula’s settlement.

- II.
The shift towards the descendant of the given polyp which has the best position so far. In case of a new polyp, position “polyp best” is inherited from the parent.

- III.
The shift towards the best situated polyp in the whole colony.

## The proposed compensation system

*t*th tool and \(\dot{F}\)—the toolholder reference point.

## Formulating the optimization task

During the first step we seek the solutions for which \(f_{1}\) has maximum value. The decision space should be limited on both sides in each of dimensions, e.g. to the range [\(-\)0.1, 0.1]. Furthermore it is a discrete space which results from the precision of determining the setup data; mostly 0.001 mm or 0.0001 of an inch. However the number of solutions, even with the above limitations, is huge, e.g. \(1.024\times 10^{23}\) for 10-dimensional decision space. Therefore the set of \(P_{1}\) solutions matching \(f_{1}\) is also quite numerous. Among \(P_{1}\) elements we need to find the one for which the resultant vector of the change for all the setup data is the smallest \((f_{2})\). To make calculations simpler the substitute objective function \(f\) has been introduced. It converts the original problem with two objectives into a single-objective optimization problem.

## Practical example

## Comparison between the proposed CRIPSO and other algorithms

## Validate the results of the proposed scheme

## Conclusion

The article presented the practical method of the automatic correction of setup data of the horizontal-spindle machining center in axle Z. Applying this method to the remaining axles is aimless as the errors in *XY* surface and in axle \(B\) have different character. This method is suitable for multi-directional and multi-tool machining using multi-part fixtures. The approach presented has been compared with the classic PSO, GA and COA methods. The effectiveness of PSO, GA and CRIPSO has been on a similar level and the results have been within the range of the random spread characteristic for these methods. The above method of the setup data correction can be applied automatically without the worker’s interference. It should be the essential element of the computer-integrated manufacturing (CIM). The time needed to apply this method in practice depends mainly on the link between GD&T and the setup data in the production process. Therefore the further research should focus on automation of this stage of planning.

## References

- Adnan, M. R. H. M., Sarkheyli, A., Zain, A. M., & Haron, H. (2013). Fuzzy logic for modeling machining process: A review.
*Artificial Intelligence Review*. doi: 10.1007/s10462-012-9381-8. - Bohez, E. L. J. (2002). Compensating for systematic errors in 5-axis NC machining.
*Computer-Aided Design*,*34*, 391–403.CrossRefGoogle Scholar - Cho, M. W., Kim, G. H., Seo, T. I., Hong, Y. C., & Cheng, H. H. (2006). Integrated machining error compensation method using OMM data and modified PNN algorithm.
*International Journal of Machine Tools & Manufacturing*,*46*, 1417–1427.CrossRefGoogle Scholar - Cui, G., Lu, Y., Li, J., Gao, D., & Yao, Y. (2012). Geometric error compensation software system for CNC machine tools based on NC program reconstructing.
*International Journal of Advanced Manufacturing Technolology*,*63*, 169–180.CrossRefGoogle Scholar - Davis, T. A., Carlson, S., Red, W. E., Jensen, C. G., & Sipfle, K. (2006). Flexible in-process inspection through direct control.
*Measurement*,*39*, 57–72.CrossRefGoogle Scholar - El Ouafi, A., Guillot, M., & Bedruni, A. (2000). Accuracy enhancement of multi-axis CNC machines through on-line neurocompensation.
*Journal of Intelligent Manufacturing*,*11*, 535–545.CrossRefGoogle Scholar - Gandomi, A. H., Yang, X.-S., & Alavi, A. H. (2013). Cuckoo search algorithm: A metaheuristic approach to solve structural optimization problems.
*Engineering with Computers*,*29*, 17–35.CrossRefGoogle Scholar - Hale, L. C. (1999).
*Principles and techniques for designing precision machines*. Ph.D. thesis. Livermore: University of California.Google Scholar - Johari, N. F., Zain, A. M., Mustafa, N. H., & Udin, A. (2013). Firefly algorithm for optimization problem.
*Applied Mechanics and Materials*,*421*, 496–501.CrossRefGoogle Scholar - Kamaruzaman, A. F., Zain, A. M., Yusuf, S. M., & Udin, A. (2013). Levy llight algorithm for optimization problems—A literature review.
*Applied Mechanics and Materials*,*421*, 496–501.CrossRefGoogle Scholar - Kennedy, J., & Eberhart, R. (1995). Particle swarm optimization.
*Proceedings of IEEE international conference on neural networks*(Vol. 4, pp. 1942–1948).Google Scholar - Kumar, S., Nassehi, A., Newman, S. T., Allen, R. D., & Tiwari, M. K. (2007). Process control in CNC manufacturing for discrete components: A STEP-NC compliant framework.
*Robotics and Computer-Integrated Manufacturing*,*23*, 667–676.CrossRefGoogle Scholar - Kusiak, A. (2000).
*Computational Intelligence in Design and Manufacturing*. New York: Wiley.Google Scholar - Liu, Z. Q. (1999). Repetitive measurement and compensation to improve workpiece machining accuracy.
*International Journal of Advanced Manufacturing Technology*,*15*, 85–89.CrossRefGoogle Scholar - Loose, J. P., Zhou, S., & Ceglarek, D. (2007). Kinematic analysis of dimensional variation propagation for multistage machining processes with general fixture layouts.
*IEEE Transactions on Automation Science and Engineering*,*4*(2), 141–152.CrossRefGoogle Scholar - Mäkelä, K. K., Huapana, J., Kananen, M., Karkalainen, J. A. (2011). Improving accuracy of aging CNC machines without physical changes. In
*IEEE international symposium on ISAPT*(pp. 1–5).Google Scholar - Marinescu, V., Constantin, I., Apostu, C., Marin, F. B., Banu, M., & Epureanu, A. (2011). Adaptive dimensional control based on in-cycle geometry monitoring and programming for CNC turning center.
*International Journal of Advanced Manufacturing Technolology*,*55*, 1079–1097.CrossRefGoogle Scholar - Mehrabi, M. G., O’Neal, G., Min, B. K., Pasek, Z., Koren, Y., & Szuba, P. (2002). Improving machining accuracy in precision line boring.
*Journal of Intelligent Manufacturing*,*13*, 379–389.CrossRefGoogle Scholar - Mekid, S., & Ogedengbe, T. (2010). A review of machine tool accuracy enhancement through error compensation in serial and parallel kinematic machines.
*International Journal of Precision Technology*,*1*(3/4), 251–286.CrossRefGoogle Scholar - Mohamad, A., Zain, A. M., Bazin, N. E. N., & Udin, A. (2013). Cuckoo search algorithm for optimization problems—A literature review.
*Applied Mechanics and Materials*,*421*, 502–506.CrossRefGoogle Scholar - Poli, R., Kennedy, J., & Blackwell, T. (2007). Particle swarm optimization.
*Swarm Intelligence*,*1*, 33–57.CrossRefGoogle Scholar - Rahou, M., Cheikh, A., & Sebaa, F. (2009). Real time compensation of machining errors for machine tools NC based on systematic dispersion.
*Engineering and Technology*,*32*, 10–16.Google Scholar - Rajabioun, R. (2011). Cuckoo optimization algorithm.
*Applied Soft Computing*,*11*, 5508–5518.CrossRefGoogle Scholar - Ramesh, R., Mannan, M. A., & Poo, A. N. (2000a). Error compensation in machine tools—A review. Part I: Geometric, cutting-force induced and fixture dependent errors.
*International Journal of Machine Tools & Manufacture*,*40*, 1257–1284.CrossRefGoogle Scholar - Ramesh, R., Mannan, M. A., & Poo, A. N. (2000b). Error compensation in machine tools—A review. Part II: Thermal errors.
*International Journal of Machine Tools & Manufacture*,*40*, 1257–1284.CrossRefGoogle Scholar - Sartori, S., & Zhang, G. X. (1995). Geometric error measurement and compensation of machines.
*Annals of the CIRP*,*44*(2), 599–609.Google Scholar - Schwenke, H., Knapp, W., Haitjema, H., Weckenmann, A., Schmitt, R., & Delbressine, F. (2008). Geometric error measurement and compensation of machines—An update.
*CIRP Annals—Manufacturing Technology*,*57*, 660–675.CrossRefGoogle Scholar - Slocum, A. H. (1992).
*Precision machine design*. Dearborn: Society of Manufacturing Engineers.Google Scholar - Stryczek, R. (2007). Computational intelligence in computer aided process planning—A review.
*Advances in Manufacturing Science and Technology*,*31*(4), 77–92.Google Scholar - Stryczek, R. (2009). A meta-heuristics for manufacturing systems optimization.
*Advances in Manufacturing Science and Technology*,*33*(2), 23–32.Google Scholar - Wang, S. M., Yu, H. J., & Liao, H. W. (2006). A new high-efficiency error compensation system for CNC multi-axis machine tools.
*International Journal of Advanced Manufacturing Technology*,*28*, 518–526.CrossRefGoogle Scholar - Yusoff, Y., Ngadiman, M. S., & Zain, A. M. (2011). Overview of NSGA-II for optimizing machining process parameters.
*Procedia Engineering*,*15*, 3978–3983.CrossRefGoogle Scholar - Yuan, J., & Ni, J. (1998). The real-time error compensation technique for CNC machining systems.
*Mechatronics*,*8*(4), 352–380.CrossRefGoogle Scholar - Yusup, N., Zain, A. M., & Hashim, S. Z. M. (2012a). Evolutionary techniques in optimizing machining parameters: Review and recent applications (2007-1011).
*Expert Systems with Applications*,*39*, 9909–9927.CrossRefGoogle Scholar - Yusup, N., Zain, A. M., & Hashim, S. Z. M. (2012b). Overview of PSO for optimizing process parameters of machining.
*Procedia Engineering*,*29*, 914–923.CrossRefGoogle Scholar - Zain, A. M., Haron, H., & Sharif, S. (2008). An overview of GA technique for surface roughness optimization in milling process. In
*Proceedings—International symposium on information technology*(Vol. 4, pp. 1–6).Google Scholar - Zainal, N., Zain, A. M., Radzi, N. H. M., & Udin, A. (2013). Glowworm swarm optimization (GSO) algorithm for optimization problems: A state-of-the-art. Review.
*Applied Mechanics and Materials*,*421*, 507–511.CrossRefGoogle Scholar - Zhang, J. Y., Liang, S. Y., Yao, J., Chen, J. M., & Huang, J. L. (2006). Evolutionary optimization of machining process.
*Journal of Intelligent Manufacturing*,*17*, 203–2015. Google Scholar - Zhao, F., Xu, X., & Xiev, S. Q. (2009). Computer-aided inspection planning—The state of the art.
*Computers in Industry*,*60*, 453–466.Google Scholar - Ziegert, J. C., & Kalle, P. (1994). Error compensation in machine tools: A neural network approach.
*Journal of Intelligent Manufacturing*,*5*, 143–151.Google Scholar

## Copyright information

**Open Access**This article is distributed under the terms of the Creative Commons Attribution License which permits any use, distribution, and reproduction in any medium, provided the original author(s) and the source are credited.