# Tool Cutting Force Prediction Model Based on ALO-ELM Algorithm

Authors: Hongna Zhang
Journal: Computational Intelligence and Neuroscience
 (2022)

---

## Abstract

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.


---

## Body

## 1. 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. The 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 single-hidden-layer feedforward neural network (single-hidden-layer 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 The 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. The experimental results show that ALO algorithm has better performance in optimization accuracy, global search ability, and parameter setting than PSO algorithm. Therefore, 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. The experimental results prove that the classification model based on ALO-ELM has higher classification accuracy.


## 2. Theoretical Overview of the ALO-ELM

### 2.1. Extreme Learning Machine

As a relatively new data-driven 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]. This 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. Therefore, the parameters that need to be manually set are only the activation function and the number of neurons in the hidden layer. Suppose there areQ different training samples Xi,Yi∈Rn×Rm, if L is the number of neurons in the hidden layer, the standard feedforward neural network can be described as follows:(1)∑i=1Lβihwi⋅xi+bi=Qj,j=1,…,N,where wi=wi1,wi2,…,winT is the weight connecting the input layer node and the ith hidden layer neuron; βi=βi1,βi2,…,βinTis the weight connecting the ith hidden layer neuron and the output layer node; bi is the threshold of the ith hidden layer neuron; Qj=Qj1,Qj2,…,QjnT is the output of the network; hx represents the activation function, and the sigmoid activation function is used in this paper. The network structure of ELM is shown in Figure 1.Figure 1
ELM network structure.If the output matrix of ELM is set toH, the training result of the model and the expected output result yj can be close to zero error after a certain training time, and the expression is(2)∑i=1Lβihwi⋅xi+bi=yj,j=1,…,N.Equation (3) can also be converted into the following matrix form:(3)Hβ=Y.In the formula,H represents the output matrix obtained from the hidden layer, and its expression is(4)H=hx1⋮hxN=hw1⋅x1+b1⋯hwL⋅x1+bL⋮⋯⋮hw1⋅xN+b1⋯hwL⋅xN+bLN×L.The expression of the expected output weight matrixY is(5)Y=y1T⋮yNT=y11⋯y1m⋮⋮yN1⋯yNm.The purpose of ELM training is to calculate the minimum value of the error ofHβ−Y′. When the activation function is infinitely differentiable, the smallest β^ can be determined according to the least-squares method:(6)minβHβ−Y′.Final results are as follows:(7)β^=H+Y,where H+ is generalized inverse of H, and β^ is the weight matrix of the output layer.


### 2.2. Antlion Algorithm

Antlion algorithm is a novel natural heuristic algorithm proposed by Mirjalili et al. in 2015 [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. This section will introduce the mathematical model of the antlion algorithm.


#### 2.2.1. 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:(8)Xt=0,cs2rt1−1,cs2rt2−1,…,cs2rtn−1.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:(9)rt=1ifrand>0.5,0ifrand<0.5,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:(10)Xit=Xit−ai×dit−citbi−ai+cit,where ai and bi are the minimum and maximum values of the random walk for the ith variable, and cit and dit are the minimum and maximum values for the t-th iteration of the ith variable.


#### 2.2.2. Build a Trap

The 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.


#### 2.2.3. Trapped in an Antlion Trap

The random walk of the ants will be affected by the antlion trap location, which is mathematically explained using the following formula:(11)cit=Antlionjt+ctdit=Antlionjt+dt.Among them,ct and dt are the minimum and maximum values of all variables, and Antlionjt represents the position of the j antlion obtained in the tth iteration. The variables c and d together define the roaming behavior of the ants within a trap constructed by the selected antlion.


#### 2.2.4. 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. The mathematical model of the above operation can be realized by adaptively reducing the hypersphere radius of the ant random walk, and the formula is(12)ct=ctIdt=dtI.In the formula,I=10wt/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(13)w=2,t>0.1T3,t>0.5T4,t>0.75T5,t>0.9T6,t>0.95T.


#### 2.2.5. Catch the Ants and Rebuild the Trap

The 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.(14)Antlionjt=AntitiffAntit>fAntlionjt.Among them,Antit is the position of the ith ant in the t-th iteration, and f⋅ is the fitness function.


#### 2.2.6. Elitism

The elite antlion is the optimal solution obtained in each iteration, which affects the motion of all ants during the iteration. Therefore, each ant will randomly walk around the antlion and elite antlion chosen by the roulette wheel, and the process can be modeled as(15)Antit=RAt+REt2,where RAtis the random walk of the antlion selected by the roulette principle in the t-th iteration, and REt is the random walk of the ants around the elite antlion in the t-th iteration.


## 2.1. Extreme Learning Machine

As a relatively new data-driven 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]. This 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. Therefore, the parameters that need to be manually set are only the activation function and the number of neurons in the hidden layer. Suppose there areQ different training samples Xi,Yi∈Rn×Rm, if L is the number of neurons in the hidden layer, the standard feedforward neural network can be described as follows:(1)∑i=1Lβihwi⋅xi+bi=Qj,j=1,…,N,where wi=wi1,wi2,…,winT is the weight connecting the input layer node and the ith hidden layer neuron; βi=βi1,βi2,…,βinTis the weight connecting the ith hidden layer neuron and the output layer node; bi is the threshold of the ith hidden layer neuron; Qj=Qj1,Qj2,…,QjnT is the output of the network; hx represents the activation function, and the sigmoid activation function is used in this paper. The network structure of ELM is shown in Figure 1.Figure 1
ELM network structure.If the output matrix of ELM is set toH, the training result of the model and the expected output result yj can be close to zero error after a certain training time, and the expression is(2)∑i=1Lβihwi⋅xi+bi=yj,j=1,…,N.Equation (3) can also be converted into the following matrix form:(3)Hβ=Y.In the formula,H represents the output matrix obtained from the hidden layer, and its expression is(4)H=hx1⋮hxN=hw1⋅x1+b1⋯hwL⋅x1+bL⋮⋯⋮hw1⋅xN+b1⋯hwL⋅xN+bLN×L.The expression of the expected output weight matrixY is(5)Y=y1T⋮yNT=y11⋯y1m⋮⋮yN1⋯yNm.The purpose of ELM training is to calculate the minimum value of the error ofHβ−Y′. When the activation function is infinitely differentiable, the smallest β^ can be determined according to the least-squares method:(6)minβHβ−Y′.Final results are as follows:(7)β^=H+Y,where H+ is generalized inverse of H, and β^ is the weight matrix of the output layer.


## 2.2. Antlion Algorithm

Antlion algorithm is a novel natural heuristic algorithm proposed by Mirjalili et al. in 2015 [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. This section will introduce the mathematical model of the antlion algorithm.


### 2.2.1. 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:(8)Xt=0,cs2rt1−1,cs2rt2−1,…,cs2rtn−1.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:(9)rt=1ifrand>0.5,0ifrand<0.5,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:(10)Xit=Xit−ai×dit−citbi−ai+cit,where ai and bi are the minimum and maximum values of the random walk for the ith variable, and cit and dit are the minimum and maximum values for the t-th iteration of the ith variable.


### 2.2.2. Build a Trap

The 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.


### 2.2.3. Trapped in an Antlion Trap

The random walk of the ants will be affected by the antlion trap location, which is mathematically explained using the following formula:(11)cit=Antlionjt+ctdit=Antlionjt+dt.Among them,ct and dt are the minimum and maximum values of all variables, and Antlionjt represents the position of the j antlion obtained in the tth iteration. The variables c and d together define the roaming behavior of the ants within a trap constructed by the selected antlion.


### 2.2.4. 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. The mathematical model of the above operation can be realized by adaptively reducing the hypersphere radius of the ant random walk, and the formula is(12)ct=ctIdt=dtI.In the formula,I=10wt/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(13)w=2,t>0.1T3,t>0.5T4,t>0.75T5,t>0.9T6,t>0.95T.


### 2.2.5. Catch the Ants and Rebuild the Trap

The 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.(14)Antlionjt=AntitiffAntit>fAntlionjt.Among them,Antit is the position of the ith ant in the t-th iteration, and f⋅ is the fitness function.


### 2.2.6. Elitism

The elite antlion is the optimal solution obtained in each iteration, which affects the motion of all ants during the iteration. Therefore, each ant will randomly walk around the antlion and elite antlion chosen by the roulette wheel, and the process can be modeled as(15)Antit=RAt+REt2,where RAtis the random walk of the antlion selected by the roulette principle in the t-th iteration, and REt is the random walk of the ants around the elite antlion in the t-th iteration.


## 2.2.1. 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:(8)Xt=0,cs2rt1−1,cs2rt2−1,…,cs2rtn−1.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:(9)rt=1ifrand>0.5,0ifrand<0.5,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:(10)Xit=Xit−ai×dit−citbi−ai+cit,where ai and bi are the minimum and maximum values of the random walk for the ith variable, and cit and dit are the minimum and maximum values for the t-th iteration of the ith variable.


## 2.2.2. Build a Trap

The 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.


## 2.2.3. Trapped in an Antlion Trap

The random walk of the ants will be affected by the antlion trap location, which is mathematically explained using the following formula:(11)cit=Antlionjt+ctdit=Antlionjt+dt.Among them,ct and dt are the minimum and maximum values of all variables, and Antlionjt represents the position of the j antlion obtained in the tth iteration. The variables c and d together define the roaming behavior of the ants within a trap constructed by the selected antlion.


## 2.2.4. 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. The mathematical model of the above operation can be realized by adaptively reducing the hypersphere radius of the ant random walk, and the formula is(12)ct=ctIdt=dtI.In the formula,I=10wt/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(13)w=2,t>0.1T3,t>0.5T4,t>0.75T5,t>0.9T6,t>0.95T.


## 2.2.5. Catch the Ants and Rebuild the Trap

The 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.(14)Antlionjt=AntitiffAntit>fAntlionjt.Among them,Antit is the position of the ith ant in the t-th iteration, and f⋅ is the fitness function.


## 2.2.6. Elitism

The elite antlion is the optimal solution obtained in each iteration, which affects the motion of all ants during the iteration. Therefore, each ant will randomly walk around the antlion and elite antlion chosen by the roulette wheel, and the process can be modeled as(15)Antit=RAt+REt2,where RAtis the random walk of the antlion selected by the roulette principle in the t-th iteration, and REt is the random walk of the ants around the elite antlion in the t-th iteration.


## 3. 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 weightswi=wi1,wi2,…,winT is optimized with the hidden layer threshold bi. 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:(16)MSE=1n∑i=1nyi−y^i2.Among them,n is the number of sample data, yi 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.The relevant optimization function can be expressed as(17)minFw,bs.t.w∈−1,1b∈−1,1.The specific workflow of the extreme learning machine tool cutting force prediction model based on ALO-ELM is as follows (Figure2):(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. The 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.(3)
Validation of the prediction model: input test set data, and compare the prediction results with the measured values to evaluate the accuracy of the prediction model.Figure 2
Predictive model workflow.


## 4. Experimental Simulation and Result Analysis

### 4.1. 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.The 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.The attribute information of the 25 groups of data measured in this experiment is shown in Table1.Table 1
Experimental dataset.
Sample numberWorkpiece speed (r/min)Depth of cutp (mm)Axial feed (mm/r)Tool speed (r/min)Cutting force (N)1247.50.10.1450674.536922750.10.12500698.641533300.10.15600715.01754357.50.10.18650680.01453850.10.2700816.16486247.50.150.12450737.784572750.150.15500789.525283300.150.18600885.894593300.150.26001030.643103850.150.1700741.029711247.50.20.15450876.6236122750.20.185001118.269133300.20.2600892.972614357.50.20.1650903.3825153850.20.127001006.92616247.50.250.184501416.827172750.250.2500777.2387183300.250.1600961.5092193300.250.126001151.608203850.250.157001061.48521247.50.30.2450863.1338222750.30.1500675.6478233300.30.12600913.728624357.50.30.156501037.882253850.30.187001036.097According 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.


### 4.2. Parameter Settings

The 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, 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.Figure 3
MSE and training time of ALO-ELM under different numbers of neurons in the hidden layer.Second, the population sizeN 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. The results are shown in Figure 4.Figure 4
Iteration of ALO-ELM under different population sizes.It can be seen from Figure4 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. Therefore, in order to take into account the time factor, the maximum number of iterations T is set to 90.


### 4.3. 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. The calculation formulas are as follows:(18)MAE=1n∑i=1nyi−y¯i,MAPE=100n∑i=1nyi−y¯iyi,RMSE=1n∑i=1nyi−y¯i2,where n is the total number of data samples, and yi and y¯i are the actual and predicted values, respectively. The 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. The prediction performance comparison of each model is shown in Table 2.Figure 5
Comparison of predicted value and actual value of BP neural network.Figure 6
Comparison of SVM predicted value and actual value.Figure 7
Comparison of ELM predicted value and actual value.Figure 8
Comparison of ALO-ELM predicted value and actual value.Table 2
Performance comparison of prediction models.
ModelsRMSEMAPE (%)MAEBP187.63740.1300123.5699SVM148.24920.089387.9549ELM103.23700.089082.3118ALO-ELM0.99110.00111.0863As can be seen from Table2 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. Therefore, 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.


## 4.1. 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.The 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.The attribute information of the 25 groups of data measured in this experiment is shown in Table1.Table 1
Experimental dataset.
Sample numberWorkpiece speed (r/min)Depth of cutp (mm)Axial feed (mm/r)Tool speed (r/min)Cutting force (N)1247.50.10.1450674.536922750.10.12500698.641533300.10.15600715.01754357.50.10.18650680.01453850.10.2700816.16486247.50.150.12450737.784572750.150.15500789.525283300.150.18600885.894593300.150.26001030.643103850.150.1700741.029711247.50.20.15450876.6236122750.20.185001118.269133300.20.2600892.972614357.50.20.1650903.3825153850.20.127001006.92616247.50.250.184501416.827172750.250.2500777.2387183300.250.1600961.5092193300.250.126001151.608203850.250.157001061.48521247.50.30.2450863.1338222750.30.1500675.6478233300.30.12600913.728624357.50.30.156501037.882253850.30.187001036.097According 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.


## 4.2. Parameter Settings

The 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, 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.Figure 3
MSE and training time of ALO-ELM under different numbers of neurons in the hidden layer.Second, the population sizeN 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. The results are shown in Figure 4.Figure 4
Iteration of ALO-ELM under different population sizes.It can be seen from Figure4 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. Therefore, in order to take into account the time factor, the maximum number of iterations T is set to 90.


## 4.3. 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. The calculation formulas are as follows:(18)MAE=1n∑i=1nyi−y¯i,MAPE=100n∑i=1nyi−y¯iyi,RMSE=1n∑i=1nyi−y¯i2,where n is the total number of data samples, and yi and y¯i are the actual and predicted values, respectively. The 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. The prediction performance comparison of each model is shown in Table 2.Figure 5
Comparison of predicted value and actual value of BP neural network.Figure 6
Comparison of SVM predicted value and actual value.Figure 7
Comparison of ELM predicted value and actual value.Figure 8
Comparison of ALO-ELM predicted value and actual value.Table 2
Performance comparison of prediction models.
ModelsRMSEMAPE (%)MAEBP187.63740.1300123.5699SVM148.24920.089387.9549ELM103.23700.089082.3118ALO-ELM0.99110.00111.0863As can be seen from Table2 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. Therefore, 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.


## 5. 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. The 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. Therefore, 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.



---

*Source: 1486205-2022-09-26.xml*