Tool Cutting Force Prediction Model Based on ALO-ELM Algorithm

Aiming at the problems of low learning efficiency, slow convergence speed, and low prediction accuracy of traditional data-driven model applied to tool cutting force prediction, a prediction method of tool cutting force based on ant lion optimizer (ALO) extreme learning machine (ELM) is proposed. ALO was used to improve the weights of input layer and hidden layer of ELM, so as to improve its prediction accuracy. The tool cutting force prediction models were established by using ALO-ELM, ELM, BP (backpropagation) neural network, and support vector machine, respectively. The experimental results show that the mean square error, mean absolute percentage error, and mean absolute error of ALO-ELM prediction model are 0.9911%, 0.0011%, and 1.0863%, respectively, which are far lower than the other three prediction models. ALO-ELM prediction model has stronger prediction accuracy and generalization ability, which can be effectively applied to the prediction of cutting force.


Introduction
In modern manufacturing, as an important indicator that directly affects workpiece processing-cutting force, it is closely related to product quality and production cost [1]. However, since there are many factors affecting the cutting force, and there is a highly complex relationship between it and the cutting force, it is difficult to predict the cutting force [2]. Scholars at home and abroad often use the empirical formula method and the physical analysis method to model the cutting force, but the two methods also have the following limitations. First, most of the parameters involved in the model need to be determined through experiments; second, the driving of the mathematical model must be based on domain expert knowledge, so it takes a lot of time, manpower, and material resources.
In this case, a data-driven model can be the solution. e scheme is based on the monitoring data provided by the sensor and realizes the prediction of the cutting force of the tool by fitting the test data, emphasizing the modeling according to the historical data. For the problem of predicting tool cutting force, scholars have also tried to solve the problem of tool cutting force prediction through data-driven models. For example, Hashemitaheri et al. established comparative models based on support vector machine and Gaussian process regression, respectively, to predict cutting force [3]; Wang and Chao proposed a prediction model of cutting force based on combination algorithm [4]; Xiang and Zhang established a prediction model of cutting force through WOA-Kriging algorithm [5].
Although typical data-driven models (such as backpropagation (BP) neural network and support vector machine) have good nonlinear approximation ability and strong generalization ability, this model also has problems such as low learning efficiency, slow convergence speed, and easy to fall into local optimum. Extreme learning machine (ELM), proposed by Huang et al. [6] in 2004, is a singlehidden-layer feedforward neural network (single-hiddenlayer feedforward neural networks) machine learning algorithm. It makes up for the shortcomings of slow learning speed and gradient descent of neural networks, has the characteristics of fast training speed and good generalization performance [7], and has been successfully used in classification [8], regression prediction [9], and other fields. However, since the ELM randomly generates the weights of the input layer and the hidden layer, the trained ELM model cannot achieve the optimal performance, which will affect the generalization performance and stability of the ELM. To ensure ELM better model, accuracy can only be achieved by increasing the number of neurons in the hidden layer, and increasing the number of neurons in the hidden layer will increase the running time of the model and reduce the efficiency. After 2015, Genetic Algorithm (GA) [10], Particle Swarm Optimization (PSO) [11], Grey Wolf Optimizer (GWO) [12], Simulated Annealing e emergence of swarm intelligence optimization algorithms (Swarm Intelligence, SI) such as Annealing, SA) [13] has made this problem a better solution. Because the swarm intelligence algorithm has the characteristics of simple operation, fast convergence speed, and good global convergence, it has become an ideal method for scholars to optimize ELM parameters to improve model performance. Also, ant lion optimization (ALO) is also a swarm intelligence optimization algorithm, although it was only proposed in 2015 [14]. However, it is widely used in the engineering field because of its characteristics of less parameters to be set, good convergence, and high robustness. Compared the prediction performance of the PSO algorithm and the ALO algorithm on the same problem. e experimental results show that ALO algorithm has better performance in optimization accuracy, global search ability, and parameter setting than PSO algorithm. erefore, ALO algorithm was used in this paper to automatically optimize the parameters of ELM.
Based on the above content, this paper proposes a tool cutting force prediction method based on ALO-ELM. First, the principles and operation steps of ELM and ALO algorithms are introduced, and then, ALO-ELM, ELM, BP neural network, and SVM are used to establish a tool cutting force prediction model. Root mean square error (RMSE), mean absolute percentage error (MAPE), and mean absolute error (MAE) were used to evaluate the prediction effects of the four models. e experimental results prove that the classification model based on ALO-ELM has higher classification accuracy.

Theoretical Overview of the ALO-ELM
2.1. Extreme Learning Machine. As a relatively new datadriven method (compared to artificial neural network-ANN-and support vector machine-SVM), extreme learning machine adopts an efficient single-hidden-layer feedforward neural network [6]. is is different from the traditional backpropagation algorithm ANN, which provides a way to solve the output weights through the least-squares method instead of iteration. Since the input layer weights and hidden layer thresholds are random, and the output has a unique least-squares solution, the ELM model is able to solve regression (or classification) problems in a short time. At the same time, relying on the Moore-Penrose generalized inverse [6], ELM can solve the problem that the traditional backpropagation algorithm tends to be locally optimal.
Generally, the ELM network structure consists of an input layer, an output layer, and a hidden layer. Input layer weights and hidden layer thresholds are used to establish connections between two adjacent layers. In addition, in the ELM model, the weights of the input layer and the thresholds of the hidden layer are randomly generated. erefore, the parameters that need to be manually set are only the activation function and the number of neurons in the hidden layer. Suppose there are Q different training samples (X i , Y i ) ∈ R n × R m , if L is the number of neurons in the hidden layer, the standard feedforward neural network can be described as follows: where w i � [w i1 , w i2 , . . . , w in ] T is the weight connecting the input layer node and the ith hidden layer neuron; T is the weight connecting the ith hidden layer neuron and the output layer node; b i is the threshold of the ith hidden layer neuron; Q j � [Q j1 , Q j2 , . . . , Q jn ] T is the output of the network; h(x) represents the activation function, and the sigmoid activation function is used in this paper. e network structure of ELM is shown in Figure 1.
If the output matrix of ELM is set to H, the training result of the model and the expected output result y j can be close to zero error after a certain training time, and the expression is (2) Equation (3) can also be converted into the following matrix form: In the formula, H represents the output matrix obtained from the hidden layer, and its expression is e purpose of ELM training is to calculate the minimum value of the error of Hβ − Y ′ . When the activation function is infinitely differentiable, the smallest β can be determined according to the least-squares method: Final results are as follows: where H + is generalized inverse of H, and β is the weight matrix of the output layer.  [14]. It is based on modeling the hunting mechanism of antlions in nature and includes five main steps, namely random walk of ants, construction of traps, entrapment of ants in traps, capture of ants, and reconstruction of traps. It has the advantages of less adjustment parameters and better optimization accuracy. is section will introduce the mathematical model of the antlion algorithm.

Ant Random Walk.
Ants move through the search space affected by antlion traps by random walks and change their positions according to the following equation: Among them, cs represents the calculation of the cumulative sum, T represents the maximum number of iterations, t is the current iteration number, and r(t) represents the random function, which is defined as follows: where rand is a uniformly distributed random number generated in the interval [0, 1]. At the same time, in order to ensure that the random walks of all ants fall within the boundary of the search space, the normalization process is carried out using the following formula: where a i and b i are the minimum and maximum values of the random walk for the ith variable, and c t i and d t i are the minimum and maximum values for the t-th iteration of the ith variable.

Build a Trap.
e roulette wheel is used to simulate the hunting ability of the antlion, and the ALO algorithm selects the most suitable antlion through the roulette wheel to make the probability of catching ants higher.

Trapped in an Antlion Trap.
e random walk of the ants will be affected by the antlion trap location, which is mathematically explained using the following formula: Among them, c t and d t are the minimum and maximum values of all variables, and Antlion t j represents the position of the j antlion obtained in the tth iteration. e variables c and d together define the roaming behavior of the ants within a trap constructed by the selected antlion.

Ant Sliding to Antlion.
When an ant walks into the antlion's trap, in order to slide the ant towards the antlion, the antlion shoots sand outward until the trapped ant slips down. e mathematical model of the above operation can be realized by adaptively reducing the hypersphere radius of the ant random walk, and the formula is In the formula, I � 10 w t/T., t is the current number of iterations, T is the maximum number of iterations, w is a constant defined based on the current number of iterations, which can adjust the accuracy of the search, expressed as

Catch the Ants and Rebuild the Trap.
e final stage of antlion hunting is to capture ants that slip to the bottom of the pit, and then, the antlion must update its position to the latest position of the hunted ants through equation (2.14) to increase its chances of catching other ants.
Among them, Ant t i is the position of the ith ant in the tth iteration, and f(·) is the fitness function.

Elitism.
e elite antlion is the optimal solution obtained in each iteration, which affects the motion of all ants during the iteration. erefore, each ant will randomly walk around the antlion and elite antlion chosen by the roulette wheel, and the process can be modeled as Computational Intelligence and Neuroscience where R t A is the random walk of the antlion selected by the roulette principle in the t-th iteration, and R t E is the random walk of the ants around the elite antlion in the t-th iteration.

Construction of Cutting Force Prediction Model Based on ALO-ELM
Since the input layer weights and hidden layer thresholds of the extreme learning machine are randomly generated, in order to improve the extreme learning machine and improve the accuracy of the model, ALO is used for the input layer weights w i � [w i1 , w i2 , . . . , w in ] T is optimized with the hidden layer threshold b i . In order to quantitatively analyze the accuracy of the tool cutting force prediction model, the statistical index mean square error (MSE) is used as the individual fitness to evaluate the prediction results, and its expression is as follows: Among them, n is the number of sample data, y i is the actual tool cutting force, y i is the predicted tool cutting force, and the prediction result with smaller MSE will be considered better. e relevant optimization function can be expressed as e specific workflow of the extreme learning machine tool cutting force prediction model based on ALO-ELM is as follows ( Figure 2): (1) Data preprocessing: analyze and select the main factors that affect the cutting force of the tool according to relevant theories, determine the input and output parameters of the model, and normalize the data set to eliminate dimensional differences.
(2) Prediction model establishment and data analysis: divide the training set and test set according to the ratio of 8 : 2, and then evaluate the fitness value of the antlion based on the MSE value and determine the antlion with the minimum MSE value through multiple iterations. e information corresponding to the input layer weight and the hidden layer threshold carried by the antlion is the optimal ELM input weight parameter and the hidden layer threshold parameter. After this, the model will be used to predict the test data.

Experimental Program.
Considering that the cutting force of tooth cutting is affected by the workpiece speed, tool speed, feed, and depth of cut in practice, the four cutting parameters are selected as variables for testing. e machine tool used in the tooth cutting experiment is a vertical CNC tooth cutting machine; the workpiece material is the finished product with 83 teeth, and the material is 45# steel; the tool has 40 teeth, and the material is GU20; the measuring equipment for the cutting force is a Kistler 9171A rotary dynamometer. e attribute information of the 25 groups of data measured in this experiment is shown in Table 1. According to step 1 in the tool cutting force prediction model, the sample data set is normalized, and finally, 80% of the total number of samples is selected as the training data set by uniform random selection, and the remaining 20% is used as the test data set.

Parameter Settings.
e ALO-ELM prediction model mainly involves three parameters: the number of neurons in the hidden layer, L, the population size of antlions and ants, N, and the maximum number of iterations, T. First, in order to determine the optimal number of hidden layer neurons,  Computational Intelligence and Neuroscience the interval of the number of hidden layer neurons was set as [10,100], the population size of antlions and ants was set as 100, and the maximum iteration was set as 100. Also, the results shown in Figure 3 are obtained by using MSE and training time analysis. When the number of neurons in the hidden layer is 30, its MSE is relatively small, and its training time is the smallest among all network structures with the same prediction accuracy, so the optimal number of neurons in the hidden layer is determined to be 30. Second, the population size N was set to 60, 70, 80, 90, and 100, respectively, and the convergence of the prediction model under 100 iterations and different population sizes was calculated. e results are shown in Figure 4.
It can be seen from Figure 4 that under different population sizes, the MSE values of the ALO-ELM prediction model show a significant decrease with the increase of the number of iterations. At the same time, considering that the training time of the model will greatly increase with the expansion of the population size, it is necessary to comprehensively consider the training time and prediction accuracy. It can be seen from Figure 4 that when the population size N is set to 80, a good balance can be achieved between training time and prediction accuracy. At the same time, when the iteration reaches about 90 times, the fitness MSE of the prediction model remains basically stable. erefore, in order to take into account the time factor, the maximum number of iterations T is set to 90.

Analysis and Comparison of Experimental Results.
In order to verify the feasibility and superiority of ALO to optimize ELM in this paper, on the basis of ALO-ELM to predict cutting force, the prediction results of the ALO-ELM method in this paper are compared with the traditional ELM, BP neural network, and SVM for cutting force. And analyze the performance of each algorithm. At the same time, considering the randomness of the algorithm, under the same conditions, the simulation experiments of the above four algorithms are repeated many times, and the average value is taken. Second, the three performance indicators of mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) are used to comprehensively evaluate the prediction effects of the three models. e calculation formulas are as follows: where n is the total number of data samples, and y i and y i are the actual and predicted values, respectively. e prediction results of each model are shown in Figures 4-8, where samples 1 : 20 are training sets, and samples 21 : 25 are test sets. e prediction performance comparison of each model is shown in Table 2.
As can be seen from Table 2 and Figures 4-8, compared with BP neural network and SVM, the accuracy of ELM in predicting cutting force has been improved to a certain extent. Compared with the BP neural network, the mean square error RMSE, the RMSE, MAPE, and MAE values of ELM prediction model are numerically reduced by 84.4, 0.041, and 41.258, respectively, compared with BP neural network, and 45.01, 0.0003, and 5.643, respectively, compared with SVM. erefore, to a certain extent, it shows the effectiveness of ELM in predicting the cutting force of the tool. At the same time, it is worth noting that the prediction effect of the ALO-ELM prediction model is the best, and the prediction results of the test set and training set have a higher degree of fitting than the actual value. At the same time, the mean square error RMSE, the mean absolute percentage error MAPE, and the mean absolute error MAE all show a significant reduction compared with ELM, which is enough to foresee the advantages of the swarm intelligence algorithm. It shows that it is feasible to use the antlion optimization algorithm to optimize the extreme learning machine in the prediction of tool cutting force.

Conclusion
In this paper, aiming at the problems of low learning efficiency, slow convergence speed, and low prediction accuracy of traditional data-driven model applied to tool cutting force prediction, a tool life prediction method based on ALO-ELM was proposed based on ELM. At the same time, this paper compares the model with the traditional ELM prediction model, BP neural network prediction model, and SVM prediction model. e results show that the prediction effect of this model is the most consistent with the actual cutting force compared with the model without algorithm optimization, and the accuracy is the highest. erefore, it can provide a new method for the prediction of cutting force. In addition, the model is a black box model, so it has strong adaptability, and the parameters can be changed according to the actual conditions to achieve the prediction of different tools.
Data Availability e raw/processed data required to reproduce these findings cannot be shared at this time as the data also forms part of an ongoing study.

Disclosure
Zhang Hongna completed this thesis independently.

Conflicts of Interest
e authors declare that they have no conflicts of interest.