Woodworking Tool Wear Condition Monitoring during Milling Based on Power Signals and a Particle Swarm Optimization-Back Propagation Neural Network

: In the intelligent manufacturing of furniture, the power signal has the characteristics of low cost and high accuracy and is often used as a tool wear condition monitoring signal. However, the power signal is not very sensitive to tool wear conditions. The present work addresses this issue by proposing a novel woodworking tool wear condition monitoring method that employs a limiting arithmetic average ﬁltering method and particle swarm optimization (PSO)-back propagation (BP) neural network algorithm. The limiting arithmetic average ﬁltering method was used to process the power signal and extracted the features of the woodworking tool wear conditions. The spindle speed, depths of milling, features and tool wear conditions were used as sample vectors. The PSO-BP neural network algorithm was used to establish the monitoring model of the woodworking tool wear condition. Experiments show that the proposed limiting arithmetic average ﬁltering method and PSO-BP neural network algorithm can accurately monitor the woodworking tool wear conditions under different milling parameters.


Introduction
Woodworking tools are one of the most important tools in the intelligent manufacturing of furniture [1,2]. The cutting edge of the tool and the material to be processed interact to produce a force that causes the tool to wear [3]. Severe tool wear will cause defects such as tearing, digging and cutting of the edge surface of the wooden furniture during cutting [4], which affects the surface roughness of the edge processing of the wooden furniture and the overall appearance of the wooden furniture [5][6][7]. Timely replacement of worn tools can improve product quality and reduce production costs [8][9][10]. Therefore, research on the monitoring technology of woodworking tool wear conditions is of great significance to improve the cutting performance of woodworking tools and promote the development of intelligent furniture manufacturing technology.
Wood-plastic composite materials (WPC) are composite materials made of wood powder and thermoplastics which are widely used in furniture manufacturing, such as decorative panels, railings, cladding, wall panels, windows and door frames [11]. WPC has extremely high corrosion resistance and a low manufacturing cost, and it is a recyclable environmentally friendly green material. With superior mechanical properties, the utilization rate and market share of WPC are gradually increasing [12]. In the process of producing WPC, the size of wood powder particles is different, which causes the internal structure of WPC to have inhomogeneity properties [13]. Inhomogeneity causes interference to the power signal of the machine tool spindle in the cutting of WPC, including periodic disturbances of current and voltage fluctuations and random disturbances of the machine tool vibration. Therefore, the monitoring signals collected during the cutting process of woodworking tools contain various forms of interference [14,15], and the monitoring signals need to be processed.
The monitoring method of tool wear conditions is mainly based on the cutting force signal [16][17][18][19]. Ma et al. collected cutting force signals in the milling of TC18 and used a convolutional bidirectional long-and short-term memory network (CNN + BILSTM) and a convolutional bidirectional gated loop unit (CNN + BIGRU) to accurately monitor tool wear conditions [20]. However, the cutting force signal is affected by the structure of the machine tool and the processing environment during the manufacturing process of wooden furniture. The power signal is directly related to the cutting force signal, and the power signal acquisition is not affected by the clamping structure of the machine tool. Dong et al. used a discrete wavelet transform to process the spindle power signal during WPC milling, and used the BP neural network optimized by the genetic algorithm to train the monitoring model to monitor the tool wear conditions [21]. Therefore, the power signal can be used in tool wear condition monitoring.
The accuracy of tool wear monitoring depends on the authenticity of the features extracted from the signal and the reliability of the monitoring model. Researchers have conducted a lot of explorations on tool wear conditions monitoring technology using power signals. In the feature extraction method, Shen et al. used the Hilbert-Huang transform (HHT) algorithm to extract two features from the spindle power signals of different machining states to detect tool wear, and found that the extracted features are highly correlated with the tool wear condition [22]. Gajewski et al. used the discrete wave transform (DWT) to process the noise of the power signal and specified the features of the power signal, which was later used as the input data of the fuzzy neural network to classify the tool wear conditions [23]. In the monitoring model, Rodrigo et al. measured and classified the cutting power and acoustic emission signals in the milling process; they then used a probabilistic neural network to establish a tool wear monitoring model, and found that the monitoring accuracy reached 91% [24]. Du et al. considered cutting parameters and tool wear values as variables and used time-frequency domain analysis to extract important features of vibration signals as input for neural network pattern recognition. They then established a wear condition monitoring model through the adaptive learning of a BP neural network [25]. Compared with a probabilistic neural network, the BP neural network has excellent ability to process classification issues, which are widely used in the field of fault diagnosis [26]. The classification accuracy of the BP neural network is affected by the weight, threshold, and the number of hidden layers [27]. Meanwhile, the BP neural network has the shortcoming of rapid convergence; it is also easy for this network to fall into the minimum value. These problems can be solved using intelligent optimization algorithms [28]. Feng et al. used the adaptive particle swarm optimization (PSO) algorithm to overcome the shortcomings of BP neural networks, which are easily trapped in the local optimum and have a long training time [29]. The particle swarm optimization (PSO) algorithm has characteristics such as rapidity and robustness, which are widely used in the optimization of the network parameters of the BP neural network.
The purpose of this research is focused on the problem of woodworking tool wear condition monitoring and proposes a limiting arithmetic average filtering method and PSO-BP neural network algorithm. The method includes three processing stages. In stage one, the spindle power signals under different spindle speeds, depths of milling and tool wear conditions were collected. In stage two, the limiting arithmetic average filtering method is used to process the spindle power signal and extract the features of the woodworking tool wear conditions. Finally, the spindle speed, depths of milling, features and tool wear conditions were used as sample vectors, and subsequently, the PSO-BP neural network algorithm was used to establish a woodworking tool wear monitoring model through the sample to achieve high-precision monitoring of woodworking tool wear conditions under different milling parameters.

Experimental Program
The wood-plastic composite material (WPC) prepared by Kolo Material Co., Ltd. (Hefei, China) was selected as the cutting workpiece. The size of the cutting workpiece was 960 mm × 630 mm × 8 mm. The main components and mechanical properties are shown in Table 1. The milling test was carried out on the MGK01 high-speed wood composite machining center manufactured by Nanxing Machinery Co., Ltd. (Dongguan, China).
The carbide single-tooth shank milling cutter produced by Boshen Prigo (Shanghai) Tools Co., Ltd. (Shanghai, China) was selected as the cutting tool. The tool geometries are shown in Table 2. The AN87300 three-phase power analyzer produced by Ainuo Intelligent Instrument Co., Ltd. (Qingdao, China) was used to collect the power signal of the machine tool spindle. The sampling frequency of the three-phase power analyzer is the same as that of the machine tool, which is constant at 50 Hz. The power signal acquisition system is shown in Figure 1. The three-phase analyzer was connected to the input terminal of the spindle motor of the machine tool control box and the data processing computer to realize the real-time acquisition of the spindle power signal. through the sample to achieve high-precision monitoring of woodworking tool wear conditions under different milling parameters.

Experimental Program
The wood-plastic composite material (WPC) prepared by Kolo Material Co., Ltd. (Hefei, China) was selected as the cutting workpiece. The size of the cutting workpiece was 960 mm × 630 mm × 8 mm. The main components and mechanical properties are shown in Table 1. The milling test was carried out on the MGK01 high-speed wood composite machining center manufactured by Nanxing Machinery Co., Ltd. (Dongguan, China).
The carbide single-tooth shank milling cutter produced by Boshen Prigo (Shanghai) Tools Co., Ltd. (Shanghai, China) was selected as the cutting tool. The tool geometries are shown in Table 2.

Diameter
Rake Angle Wedge Angle 12 mm 10° 45° The AN87300 three-phase power analyzer produced by Ainuo Intelligent Instrument Co., Ltd. (Qingdao, China) was used to collect the power signal of the machine tool spindle. The sampling frequency of the three-phase power analyzer is the same as that of the machine tool, which is constant at 50 Hz. The power signal acquisition system is shown in Figure 1. The three-phase analyzer was connected to the input terminal of the spindle motor of the machine tool control box and the data processing computer to realize the real-time acquisition of the spindle power signal. The plan of the spindle power signal acquisition was planned by varying the milling parameters, as shown in Table 3. The plan of the spindle power signal acquisition was planned by varying the milling parameters, as shown in Table 3.

Limiting Arithmetic Average Filtering Method
The limiting arithmetic average filtering method is a common method used to process signals. The limiting arithmetic average filtering method can process the spindle power signal and extract the features of the woodworking tool wear conditions. The steps of the limiting arithmetic average filtering method are as follows: Step 1: Set the maximum sampling deviation (Y) of the limiting filter method.
Step 2: Use a high-precision three-phase power analyzer to collect the spindle power signal when the machine tool is cutting the workpiece.
Step 3: Determine the deviation (X i ) of the two-adjacent data of the spindle power signal according to the acquisition time sequence: When |X i ≤ Y|, the two data are retained, and when |X i > Y|, the average value of the two data is used as the output result.
Step 4: Repeat the judgment until the filtering of a group of spindle power signals ends.
Step 5: Use the arithmetic average filtering method to arithmetically average the filtered spindle power signal.
Step 6: Output the features of the woodworking tool wear conditions.

Back Propagation Neural Network
Rumelhart and McClelland proposed the back propagation neural network in 1985 [30]. The BP neural network is an effective nonlinear problem modeling algorithm which has wide applications in many research fields [31]. The performance of the BP neural network depends on the network structure, training algorithm and parameter selection. Choosing a suitable network structure and optimal weight set can make the BP neural network have higher accuracy and convergence speed. Figure 2 shows a common three-layer BP neural network structure. The BP neural network includes input layer neurons (i1, i2), hidden layer neurons (h1, h2) and output layer neurons (o1, o2). The input layer neuron and the hidden layer each contain a deviation (b1, b2), and the hidden layer, the input layer neuron and the output layer neuron also contain a weight (wi).

Limiting Arithmetic Average Filtering Method
The limiting arithmetic average filtering method is a common method used to process signals. The limiting arithmetic average filtering method can process the spindle power signal and extract the features of the woodworking tool wear conditions. The steps of the limiting arithmetic average filtering method are as follows: Step 1: Set the maximum sampling deviation (Y) of the limiting filter method.
Step 2: Use a high-precision three-phase power analyzer to collect the spindle power signal when the machine tool is cutting the workpiece.
Step 3: Determine the deviation (Xi) of the two-adjacent data of the spindle power signal according to the acquisition time sequence: When i X Y ≤ , the two data are retained, and when i X Y ＞ , the average value of the two data is used as the output result.
Step 4: Repeat the judgment until the filtering of a group of spindle power signals ends.
Step 5: Use the arithmetic average filtering method to arithmetically average the filtered spindle power signal.
Step 6: Output the features of the woodworking tool wear conditions.

Back Propagation Neural Network
Rumelhart and McClelland proposed the back propagation neural network in 1985 [30]. The BP neural network is an effective nonlinear problem modeling algorithm which has wide applications in many research fields [31]. The performance of the BP neural network depends on the network structure, training algorithm and parameter selection. Choosing a suitable network structure and optimal weight set can make the BP neural network have higher accuracy and convergence speed. Figure 2 shows a common three-layer BP neural network structure. The BP neural network includes input layer neurons (i1, i2), hidden layer neurons (h1, h2) and output layer neurons (o1, o2). The input layer neuron and the hidden layer each contain a deviation (b1, b2), and the hidden layer, the input layer neuron and the output layer neuron also contain a weight (wi).

Particle Swarm Optimization Algorithm
The particle swarm optimization algorithm is a global random search algorithm proposed by Kennedy and Eberhart based on the bird swarm foraging phenomenon [32]. The PSO algorithm has excellent global optimization capabilities and is often used to optimize the parameters of neural networks. The PSO algorithm searches for the optimal solution by designing a particle that simulates birds. The particles have two attributes: speed and position. When each particle searches for the optimal solution, it continuously marks itself as an individual extreme value, and shares the individual extreme value with other particles until the optimal individual extreme value is found [33]. The speed and position of the particles are adjusted by searching for individual extremums and global optimal solutions [34]. The classification accuracy of the BP neural network is affected by the weight, threshold, and the number of hidden layers. The BP neural network has the shortcoming of rapid convergence; furthermore, it is easy for this algorithm to fall into the minimum value. These problems can be solved using intelligent optimization algorithms. The PSO algorithm has characteristics such as rapidity and robustness, which are widely used in the optimization of network parameters of BP neural network [35].
The PSO algorithm optimization of the BP neural network process is as follows: Step 1: Initialize the parameters of the BP neural network and the relevant parameters in the particle swarm algorithm.
Step 2: Update the speed and position of individual particles in the particle swarm.
Step 3: Update the individual extremum and global extremum in the particle swarm.
Step 4: Update the fitness of the particles and the global optimal fitness.
Step 5: Cycle the optimization.
Step 6: Output the optimal extremum and the weights and thresholds of the BP neural network.

Spindle Power Data in Process Analysis
The tool wear condition is usually divided into three categories: initial wear (flank wear is 0.1 mm), normal wear (flank wear is 0.2 mm) and rapid wear (flank wear is 0.3 mm), as shown in Figure 3.
by designing a particle that simulates birds. The particles have two attributes: speed and position. When each particle searches for the optimal solution, it continuously marks itself as an individual extreme value, and shares the individual extreme value with other particles until the optimal individual extreme value is found [33]. The speed and position of the particles are adjusted by searching for individual extremums and global optimal solutions [34].
The classification accuracy of the BP neural network is affected by the weight, threshold, and the number of hidden layers. The BP neural network has the shortcoming of rapid convergence; furthermore, it is easy for this algorithm to fall into the minimum value. These problems can be solved using intelligent optimization algorithms. The PSO algorithm has characteristics such as rapidity and robustness, which are widely used in the optimization of network parameters of BP neural network [35].
The PSO algorithm optimization of the BP neural network process is as follows: Step 1: Initialize the parameters of the BP neural network and the relevant parameters in the particle swarm algorithm.
Step 2: Update the speed and position of individual particles in the particle swarm.
Step 3: Update the individual extremum and global extremum in the particle swarm.
Step 4: Update the fitness of the particles and the global optimal fitness.
Step 5: Cycle the optimization.
Step 6: Output the optimal extremum and the weights and thresholds of the BP neural network.

Spindle Power Data in Process Analysis
The tool wear condition is usually divided into three categories: initial wear (flank wear is 0.1 mm), normal wear (flank wear is 0.2 mm) and rapid wear (flank wear is 0.3 mm), as shown in Figure 3.  The maximum sampling deviation (Y) was selected as 0.1 to process the spindle power signal. Figure 4 shows the comparison of the features and the average value of the spindle power signal under different milling parameters. In Figure 4, the average value of the spindle power signal is numerically the same as the features of the woodworking tool wear conditions. Therefore, it is effective to use the limiting arithmetic average filtering method to extract the features of the woodworking tool wear conditions. The maximum sampling deviation (Y) was selected as 0.1 to process the spindle power signal. Figure 4 shows the comparison of the features and the average value of the spindle power signal under different milling parameters. In Figure 4, the average value of the spindle power signal is numerically the same as the features of the woodworking tool wear conditions. Therefore, it is effective to use the limiting arithmetic average filtering method to extract the features of the woodworking tool wear conditions.   Table 4 shows a sample of woodworking tool wear conditions under different milling parameters. The spindle speed, depth of milling, and features of the spindle power signal were used as input vectors, and the tool wear conditions were used as the output vector.   Table 4 shows a sample of woodworking tool wear conditions under different milling parameters. The spindle speed, depth of milling, and features of the spindle power signal were used as input vectors, and the tool wear conditions were used as the output vector.

Establishment of Monitoring Model
The PSO-BP neural network was used to establish a monitoring model for the woodworking tool wear conditions in MATLAB (MathWorks Inc., Natick, MA, USA). The evolutionary algebra of the particle swarm algorithm was 30, the minimum error was 0.001, the particle swarm size was 40, the maximum flying speed of the particle was 0.5, the maximum inertia factor was 0.9, and the minimum inertia factor was 0.3. The learning rate of the BP neural network was 0.01, the number of training times was 20, the training accuracy was 0.0001, and the number of hidden layers was 5 layers. Figure 5 shows the fitness curve of the PSO algorithm of the monitoring model. When the evolutionary algebra was 8, the fitness remained the same. The PSO algorithm reached the state of convergence; the optimization effect of the PSO algorithm was the best, and the prediction accuracy of the BP neural network was the highest. Figure 6 shows the prediction accuracy of the established woodworking tool wear monitoring model. The predicted output of all test samples in the figure is basically the same as the actual expected output. Combined with the prediction error analysis of the PSO-BP neural network algorithm in Table 5, it can be concluded from the table that the maximum error rate of the test sample is 7.54%, the minimum error rate is 3.55%, and the average error rate is 5.07%. Therefore, the woodworking tool wear monitoring model established by using PSO-BP neural network algorithm can monitor the woodworking tool wear conditions under variable milling parameters, and can achieve the effect of identifying the woodworking tool wear conditions under variable milling parameters. the particle swarm size was 40, the maximum flying speed of the particle was 0.5, the maximum inertia factor was 0.9, and the minimum inertia factor was 0.3. The learning rate of the BP neural network was 0.01, the number of training times was 20, the training accuracy was 0.0001, and the number of hidden layers was 5 layers. Figure 5 shows the fitness curve of the PSO algorithm of the monitoring model. When the evolutionary algebra was 8, the fitness remained the same. The PSO algorithm reached the state of convergence; the optimization effect of the PSO algorithm was the best, and the prediction accuracy of the BP neural network was the highest.   Table 5, it can be concluded from the table that the maximum error rate of the test sample is 7.54%, the minimum error rate is 3.55%, and the average error rate is 5.07%. Therefore, the woodworking tool wear monitoring model established by using PSO-BP neural network algorithm can monitor the woodworking tool wear conditions under variable milling parameters, and can achieve the effect of identifying the woodworking tool wear conditions under variable milling parameters.    Figure 6 shows the prediction accuracy of the established woodworking tool wear monitoring model. The predicted output of all test samples in the figure is basically the same as the actual expected output. Combined with the prediction error analysis of the PSO-BP neural network algorithm in Table 5, it can be concluded from the table that the maximum error rate of the test sample is 7.54%, the minimum error rate is 3.55%, and the average error rate is 5.07%. Therefore, the woodworking tool wear monitoring model established by using PSO-BP neural network algorithm can monitor the woodworking tool wear conditions under variable milling parameters, and can achieve the effect of identifying the woodworking tool wear conditions under variable milling parameters.   In order to verify the reliability of the PSO-BP neural network algorithm, the established model was run 10 times. Table 6 shows the average error rate of 10 runs; the maximum average error rate is 15.93%, the minimum average error rate is 3.14%, the average error rate (10 times) is 9.48%, and the model running time is 8.59 s. It can be seen that the PSO-BP neural network algorithm has good reliability and fast calculation speed. Therefore, the proposed PSO-BP neural network algorithm can effectively establish a monitoring model for the woodworking tool wear conditions which can realize accurate monitoring of the woodworking tool wear conditions.

Comparative Results of Monitoring Model Accuracy
In order to further verify the accuracy and reliability of the monitoring model established by the PSO-BP neural network algorithm, the genetic algorithm (GA)-optimized BP neural network algorithm was selected for reliability comparative analysis.
GA is an optimization algorithm developed based on Darwin's theory of evolution and Mendelian genetics; it is used for neural network parameter optimization and genetic mechanism biological evolution processes [21,36]. Figure 7 shows the fitness curve of the GA of the monitoring model. When the evolutionary algebra was 30 times, the genetic algorithm could not reach the state of convergence. When the evolutionary algebra was 200 times, the GA still could not reach the state of convergence.   Figure 8 shows the prediction accuracy of the monitoring model established using the GA-BP neural network algorithm. It can be seen from the figure that the predicted output of all test samples is basically the same as the actual expected output. Combined with the GA-BP neural network algorithm prediction error analysis in Table 7, it can be concluded that the maximum error rate of the test sample is 10.05%, the minimum error rate is 1.45%, and the average error rate is 6.23%.  Figure 8 shows the prediction accuracy of the monitoring model established using the GA-BP neural network algorithm. It can be seen from the figure that the predicted output of all test samples is basically the same as the actual expected output. Combined with the GA-BP neural network algorithm prediction error analysis in Table 7, it can be concluded that the maximum error rate of the test sample is 10.05%, the minimum error rate is 1.45%, and the average error rate is 6.23%. Figure 8 shows the prediction accuracy of the monitoring model established using the GA-BP neural network algorithm. It can be seen from the figure that the predicted output of all test samples is basically the same as the actual expected output. Combined with the GA-BP neural network algorithm prediction error analysis in Table 7, it can be concluded that the maximum error rate of the test sample is 10.05%, the minimum error rate is 1.45%, and the average error rate is 6.23%.    Table 8 shows the average error rate of 10 runs of the GA-BP neural network algorithm; the maximum average error rate is 22.10%, the minimum average error rate is 6.10%, the average error rate (10 times) is 10.81%, and the GA-BP neural network algorithm training time is 91.53 s. The GA-BP neural network can effectively monitor the woodworking tool wear conditions, but the long training time of the model restricts its application. The proposed PSO-BP neural network algorithm is superior to the GA-BP neural network algorithm in terms of error rate and training time. Overall, the proposed PSO-BP neural network algorithm performs better than the GA-BP neural network algorithm.

Discussion
This work presents a limiting arithmetic average filtering method and a particle swarm optimization (PSO)-back propagation (BP) neural network algorithm to monitor the wear of woodworking tools during the milling process. The proposed method can accurately and quickly monitor the woodworking tool wear conditions under different milling parameters. Table 9 demonstrates the performance comparison analysis of the monitoring model established by the two algorithms. Compared with the GA-BP neural network algorithm [21], the training time of the GA-BP neural network algorithm is much longer than that of the PSO-BP neural network algorithm (91.53 s > 8.5 s), and the monitoring error is also higher than that of the PSO-BP neural network algorithm (10.81% > 9.48%). Overall, the proposed algorithm performs better than the GA-BP neural network algorithm. Therefore, the PSO-BP neural network algorithm is suitable for monitoring the woodworking tool wear conditions under variable milling parameters. The proposed method is still in the theoretical stage. In the next stage, it will be applied in actual production.

Conclusions
In this paper, a limiting arithmetic average filtering method and particle swarm optimization (PSO)-back propagation (BP) neural network algorithm were used to monitor the woodworking tool wear conditions in milling processing. At present, the monitoring level of the woodworking tools wear conditions is still low, and advanced woodworking tool wear monitoring technologies urgently need to be studied to improve the cutting performance of woodworking tools and promote the development of intelligent furniture manufacturing technology. The proposed limiting arithmetic average filtering method was used to process the power signal and extracted the features of the woodworking tool wear conditions. The spindle speed, depths of milling, features and tool wear conditions were used as sample vectors. The BP neural network optimized by PSO was used to establish a monitoring model for the woodworking tool wear conditions. Compared with the genetic algorithm (Table 9), the optimization effect of PSO on the BP neural network is obviously better than the genetic algorithm. PSO can quickly optimize the weights and thresholds of the BP neural network and reduce the training time of the BP neural network. The error of the proposed monitoring model established by the PSO-BP neural network algorithm is 9.48%, and the training time is 8.59 s. Therefore, the proposed method can accurately and quickly monitor the woodworking tool wear conditions under different milling parameters.
The proposed method speeds up the process of intelligent furniture manufacturing and reduces the cost of woodworking tool wear condition monitoring technology. However, the delay effect of the power sensor is not considered, and the hysteresis of the spindle power signal is ignored. In future research, in order to further improve the accuracy of the woodworking tool wear state monitoring model, the question of how to eliminate the hysteresis of the power signal will become the focus.
Author Contributions: Conceptualization, W.D. and X.X.; methodology, W.D. and X.X.; writingoriginal draft preparation, W.D. and X.Y.; writing-review and editing: W.D. and Y.M.; supervision, X.X.; funding acquisition, X.X. All authors have read and agreed to the published version of the manuscript.