Big data-oriented wheel position and geometry calculation for cutting tool groove manufacturing based on AI algorithms

Groove is a key structure of high-performance integral cutting tools. It has to be manufactured by 5-axis grinding machine due to its complex spatial geometry and hard materials. The crucial manufacturing parameters (CMP) are grinding wheel positions and geometries. However, it is a challenging problem to solve the CMP for the designed groove. The traditional trial-and-error or analytical methods have defects such as time-consuming, limited-applying, and low accuracy. In this study, the problem is translated into a multiple output regression model of groove manufacture (MORGM) based on the big data technology and AI algorithms. The inputs are 34 groove geometry features, and the outputs are 5 CMP. Firstly, two groove machining big data sets with different range are established, each of which is includes 46,656 records. They are used as data resource for MORGM. Secondly, 7 AI algorithms, including linear regression, k nearest-neighbor regression, decision trees, random forest regression, support vector regression, and ANN algorithms, are discussed to build the model. Then, 28 experiments are carried out to test the big data set and algorithms. Finally, the best MORGM is built by ANN algorithm and the big data set with a larger range. The results show that CMP can be calculated accurately and conveniently by the built MORGM.


Introduction
Groove is one of the most important structures of integral cutting tools, such as end mill, drill, and reamer, because it determines the strength and sharpness of cutting edges, as well as the chip removal ability. Groove has to be machined by 5-axis grinding machine due to its complex spatial surface and tough blank material. With the emergence of diverse groove geometries, how to set the crucial manufacturing parameters (CMP), including grinding wheel positions and geometries, to get the desired groove geometry has been an urgent problem for groove machining and cutting tool manufacture.
During the groove grinding process, CMP and groove geometry follow the enveloping theory, namely, the common normal at the contact point between the wheel and the groove surface must intersect with the tool axis [1]. Accordingly, mathematical relationships (i.e., enveloping equation) between CMP and groove could be deduced. However, the enveloping equation was a transcendental equation with trigonometric functions, which was hard to be solved. To solve the problem, two methods were mainly used: divideand-conquer method and objective function [2].
The divide-and-conquer method was an iterative approach. By finding the different influence rates of the wheel position on the machined groove parameters, the wheel position was searched step by step. Based on the directly proportional relationship between the wheel position and the two groove parameters rake angle and core radius, Kim et al. [3], Rababah and Chen [4] and Ren et al. [5] roughly searched and slightly adjusted the wheel position by the rake angle and the core radius respectively and successively. Furthermore, the calculation precision was improved by Nguyen and Ko [6]. Differently, Xiao et al. [7] and Jia et al. [8] changed the calculation order: The core radius was considered first, followed by the rake angle. Chen et al. [9] take the calculation procedure: core radius, groove width, and then rake angle.
The objective function method was an optimization approach to calculate the wheel position until the function was approximately solved. Wang et al. [10] built an objective function by the error of rake angle, core radius, and groove width between the desired and the machined groove. Then, the 1A1-type wheel position was obtained by searching the minimum value of the function. Ren et al. [11] created a system of nonlinear equations to calculate the wheel position, and the wheel position can be calculated accurately to ensure the accuracy of the groove parameters: rake angle, core radius, and flute width. Karpuschewski et al. [12] and Li et al. [13] built the objective function with machine errors and successfully searched the wheel position using intelligent algorithms, such as PSO and NPSO. Habibi and Chen [14] calculated the established constraint equations by using Newton iteration algorithm to improve the speed and reliability of the calculation.
Besides, Fang et al. [15] discussed an approach to calculating the wheel location and orientation for CNC flute-grinding by re-formulating the wheel's determination model and analyzing the geometrical constraints for interference, over-cut, and undercut in a unified framework. The model was integrated with the evolution algorithm and local search operator to optimize the wheel's location and orientation. Li et al. [2] built a general model that is established to calculate the wheel path for complex groove machining based on a mathematical optimization model, which have three constraints and one objective. Considering that the worn wheel would result in groove grinding error without a proper compensation, Liu et al. [16] proposed a compensation algorithm of worn wheel by analyzing the boundary contact condition which is influenced by wheel wear. Uhlmann et al. [17] presented a method for designing application-oriented grinding wheels to improve the productivity and the quality of grinding processes so that grinding wheels with different layers over its width were developed to compensate the varying and complex contact conditions. Wasif et al. [18] proposed an approach to determine the non-standard grinding wheel that can be economically produced or dressed to accurately grind the end-mill cutters using the five-axis CNC grinding process.
In conclusion, the method discussed above focused on solving complex equation set, which was time-consuming and limited-applying. Essentially, the groove machining problem could be translated into a multiple output regression problem. The input parameters were groove geometry features and the output targets were CMP. Considering that artificial intelligence (AI) algorithms were good at building regression models, a multiple output regression model of groove manufacture (MORGM) is opted based on AI algorithms and big data of groove machining processes so that the CMP could be readily calculated to manufacture the desired groove.

Modeling of groove machining process
The cutting tool groove was generated by the principle of "envelope forming." Namely, the groove was machined by the profile of the grinding wheel, which moved helically around the tool axis. Thus, the groove was determined by the grinding wheel geometry, as well as its position that relative to the tool. The grinding wheel process was modeled by space analytical geometric theory, as presented in Fig. 1. Two Cartesian coordinate systems were established. One was the grinding wheel coordinate, denoted as O W -X W Y W Z X , whose Z W -axis was coincided with the wheel axis, and

target labels
Wheel position: Δx, Δy, Δαx wheel geometry: θ W , gr, B W X W -Y W plane was coincided with the end face of the wheel. The other was the tool coordinate, denoted as O T -X T Y T Z T , whose Z T -axis was coincided with the tool axis, and X W -Y W plane was coincided with the end face of the tool. During the machining process, the O T -X T Y T Z T was motionless, while the O W -X W Y W Z W was moved helically around the tool axis together with the wheel.
The wheel position was defined by 3 parameters: the distance between X W and X T (i.e., Δy), the distance between Z W and Z T (i.e., Δx), and the angle that rotated from Z T -axis to Z W -axis around X T -axis (i.e., Δαx).
The 1A1 type grinding wheel geometry was expressed by 3 variable parameters: the thickness B W , the taper angle θ W , and the fillet radius gr.
According to the method introduced in reference [13], the groove geometry could be calculated with the known wheel geometry and its position. And the groove was predicted by discrete points that belong to a series of annuluses, which had the same width and different radius. Then, the groove profile as well as its features could be defined by these points.
The groove in the reference was defined by only 3 features, namely, rake angle, core radius, and groove width. Obviously, three features were too few for AI algorithms to establish the MORGM. Therefore, much more features should be defined. As presented in Fig. 2, 34 features were used in the study, including the commonly used two features core radius (r c ) and groove width (Φ), and the Euclidean distance between points that located on the groove profile. In this study, 30 annuluses were used so that 61 points were deduced. The first Euclidean distance d 1 was the distance between p 1 and p rc ; the second d 2 was the distance between p 61 and p rc . Then, other Euclidean distances were between the two points that located in the same annulus, which were denoted as d 3 , d 4 , d 5 … d 32 .

Big data generation
In order to establish MORGM by AI algorithms, two big datasets were established. And for every set, 6 parameters were selected, namely, Δαx, Δx, Δy, θ W , gr, and B W . The wheel diameter D w was excluded because its influence on the groove could be offset by Δx.
Then, each parameter was assigned to 6 values. Differently, the first set (denoted as SETA) had a small variable space, and the second set (denoted as SETB) had a big one, as listed in Table 1. Thus, every set was consisted of 46,656 records, and each record included 6 output labels and 34 input features. The structure and some data for SETB is listed in Table 2. The corresponding groove geometries for SETA and SETB are presented in Figs. 3 and 4.

Big data analysis and feature extraction
As features would have great impact on the accuracy and efficiency for AI algorithms, the big datasets were analyzed to select efficient features. Dispersion coefficient was a relative statistic to measure the degree of dispersion of data, which was mainly used to compare the degree of dispersion of different sample data. The large dispersion coefficient indicated that the degree of dispersion of data was also large. If the units were different, standard deviation could not be used to compare the degree of dispersion, but the ratio of standard deviation to the mean (relative value) should be used to compare the dispersion. Therefore  third features had bigger values than others, but the difference were indistinctively. Vs for SETA is always lower than SETB for all 34 features, because SETA had a small variable space while SETB had a big one, as listed in Table 1. Considering that Vs is a relative statistic to evaluate the degree of data dispersion, and that the large dispersion coefficient indicates that the degree of data dispersion is also large, Vs for SETA is always lower than SETB is an acceptable result. Thus, all the 34 features were selected.

Data preprocessing
Considering that the 34 features had different units, the data in the set should be preprocessed. There were usually two ways: one was the standardization method and the other was the normalization method. The standardization method was based on the mean and standard deviation of the raw data: where μ is the mean value and σ is the standard deviation.
After processed, all the data were in accordance with standard normal distribution.
Normalization was a way of simplifying the calculation by transforming a dimensionless expression into a dimensionless expression: where x max and x min are the maximum and minimum values of the data. After processed, all the data were mapped to the range [0,1].

AI methods for MORGM
The problem discussed in the study was essentially a multiple output regression problem. So far, the main algorithms that support multiple output regressions are as follows: linear regression (LR), k nearest-neighbor regression (kNN), decision trees (DTs), random forest regression (RFR), and ANN. However, some algorithms had to be modified to support multiple output, such as SVR. In this paper, the wrapper multiple output regression algorithm and the chained multiple output regression algorithm were used to reconstruct the SVR algorithm respectively. Therefore, in order to find the  best method, seven AI methods was respectively employed to build the MORGM.

k-Nearest neighbor(kNN)
k-Nearest neighbor was a kind of supervised learning methods. It could be used for solving classification and regression problems. The target was predicted based on the k nearest neighbors of each query point. In this study, 5 neighbors (namely, k = 5),and uniform weights were used: That is, each point in the local neighborhood contributes uniformly to the classification of a query point.

Random forest regressor (RFR)
A random forest was a meta estimator that fits a number of classifying decision trees on various sub-samples of the dataset and uses averaging to improve the predictive accuracy and control over-fitting. In this study, the number of trees in the forest was 10. The maximum depth of the tree was none, which mean that nodes were expanded until all leaves were pure or until all leaves contained less than 2 samples.

Decision trees (DTs)
Decision trees (DTs) were a non-parametric supervised learning method used for regression. In order to support multi-output problems, decision trees were changed by two ways: (1) store 6 output values in leaves and (2) use

SVR-multi-output-regressor (SVR-MOR)
Support vector regression (SVR) was a typical single output model. For this study, it was modified by two methods to meet the multiple output requirement. One was multi-target regression strategy, and the other is chain strategy.
Multi-target regression strategy consists of fitting one regressor per target, which was a commonly used strategy for extending regressors that do not natively support multitarget regression.

SVR-regressor-chain (SVR-RC)
The chain strategy was a multi-label model that arranges regressions into a chain. Each model made a prediction in the order specified by the chain using all of the available features provided to the model plus the predictions of models that were earlier in the chain.

Artificial neural network (ANN)
The fully connected artificial neural network was established. It included 7 layers, and each layer consists of 384, 192, 96, 48, 24, 12, and 6 notes. "Sigmoid" was selected as the activation function, and "RMSProp" was employed   Group4  22  A2  B2  C1  A2B2C1  9  A1  B2  C2  A1B2C2  23  A2  B2  C2  A2B2C2  10  A1  B2  C3  A1B2C3  24  A2  B2  C3  A2B2C3  11  A1  B2  C4  A1B2C4  25  A2  B2  C4  A2B2C4  12  A1  B2  C5  A1B2C5  26  A2  B2  C5  A2B2C5  13  A1  B2  C6  A1B2C6  27  A2  B2  C6  A2B2C6  14  A1  B2  C7  A1B2C7  28  A2  B2  C7  A2B2C7 as the optimizer algorithm. The expression of 'Sigmoid' is . It is one of the most widely used activation functions. Its main advantage is that its output is a range of probabilities from 0 to 1, and the sum of all probabilities is 1. Thus, it is suitable for multi-class problems. Considering that our study is a multiple output regression problem, which is similar to the multi-class problem, "Sigmoid" is employed as activation function. RMSProp, root mean square propagation, is an optimization algorithm/method designed for artificial neural network (ANN) training. RMSProp lies in the realm of adaptive learning rate methods, which have been growing in popularity in recent years because it is the extension of stochastic gradient descent (SGD) algorithm, momentum method, and the foundation of Adam algorithm. RMSProp is able to continually reduce the loss throughout the training process until the local minimum is reached. One of the applications of RMSProp is the stochastic technology for mini-batch gradient descent. Therefore, "RMSProp" is employed as optimizer algorithm in the study.  The structure of the network was presented in Fig. 6.

Experimental design
Generally, training datasets, data preprocessing methods, and algorithms were main factors for regression models.
In order to get the best MORGM, 28 experiments were designed, as listed in Table 3. Variables included 2 different datasets, 2 data preprocessing methods, and 7 modeling algorithms. To increase readability, all experiments were marked with letters and numbers and divided into 4 groups on average. Based on the datasets introduced in Sect. 2.2, all the 46,656 records were divided into two sets. One was the training set including 40,000 records, and the other was the testing sets including 6656 records.
All the algorithms were implemented by Python 3.9.1 and Keras 2.4.0 with Tensorflow2.4.1 as their backend, and running on one Intel(R) UHD Graphics GPU. The server operating system was Windows 10. The functions corresponding to the 7 approaches are listed in Table 4.

Model performance metrics
Generally, mean square error (MSE), mean absolute error (MAE), and R square (R 2 ) were used to evaluate regression models. Considering that they had the similar effects, MSE (a) MSE Table 5. The 6 labels were analyzed respectively, as shown in Fig. 7. Obviously, Lab6 had the largest MSE nearly for all the 28 experiments. It was because that there were only two valid samples for Lab6 (as shown in Figs. 3 and 4), which was insufficient to establish a regression model. Besides, according to Fig. 4, Lab6 (i.e., the thickness of the wheel) had little impact on the groove. Therefore, Lab6 was removed from label groups, and the average of the prior 5 labels were used for evaluation. For convenience, the symbol "SME" means the average of the prior 5 labels in the following section.

Datasets analysis
As dataset was a foundation for a regression model, SETA and SETB were used to evaluate the influence of dataset on MORGM.
The results were presented in Fig. 8. It indicated that MSE changed with different datasets and SETA (signed as A1) performed better than SETB (signed as A2). Besides,

Data preprocessing analysis
The influences of standardization and normalization methods on MSE were analyzed, as shown in Fig. 9. The results showed that B1 was much better than B2 for all the 7 methods, as well as for all the 2 datasets. Therefore, B1 (normalization) method was selected to build MORGM.

AI methods analysis
The average MSE of the prior 5 labels were used to compare the performances of the 7 methods, as shown in Fig. 10. It indicated that C1, C5, and C6 had poor performances, while C2, C3, C4, and C7 had good accurate, and C7 was the best among them. Therefore, C7 (ANN) method was selected to build MORGM.

Modeling and validating of MORGM
As has been discussed above, MORGM was built by the ANN methods (C7), and the normalization method (B1) was selected to preprocess the datasets. The MORGM have high accuracy both for SETA and SETB (see Fig. 10). The biggest MSE of the testing set (including 6656 records) that produced by A1B1C7 was picked out, as listed in Table 6. It showed that the biggest MSE value was 0.0256, which was so little for a multi-output regression model. Furthermore, two grooves that machined respectively with true and predicted parameters were plotted in Fig. 11. It showed that the groove produced by the predicted parameters was in good consistence with the true parameters.

Conclusion
In order to meet the increasing manufacturing requirements of diverse cutting tool grooves, MORGM was established based on AI algorithms and big data technology, so that the CMP could be readily calculated to manufacture the desired groove. The main contributions can be concluded as follows: 1. Different from previous studies, the groove geometry was determined by 34 features, which could recognize the groove more exactly and be more appropriate for AI algorithms. 2. Big data of groove machining process was built, which was consisted of 46,656 records and each record concluding 6 output labels and 34 input features. It would be a valuable data resource for groove machining. 3. MORGM was built by the ANN algorithm and the normalization data preprocess method. And the wheel position and geometry could be readily calculated by the desired groove. The results showed that the built MORGM had high accuracy and will have wide application prospect in groove manufacture.