On-line evolutionary identification technology for milling chatter of thin walled parts based on the incremental-sparse K-means and the online sequential extreme learning machine

In the milling process of thin-walled parts, chatter is very easy to occur, which has a very adverse impact on the surface quality and machining efficiency of the workpiece. In order to solve the problem of low accuracy of milling state identification caused by few initial samples and dynamic changes in the milling process, a hybrid online evolutionary chatter identification model combining unsupervised learning and supervised learning was proposed. First of all, aiming at the problem that traditional K-means algorithm is difficult to adapt to online dynamic clustering of milling chatter, an online incremental-sparse K-means algorithm (ISK-Means) was proposed, and the dynamic incremental-sparse strategy of K-means was designed. Second, aiming at the problem that the online sequential extreme learning machine (OS-ELM) algorithm directly adds its predicted samples to the training sample set during the incremental learning process, and the pseudo-samples in the training sample set would lead to the degradation of the OS-ELM model, a hybrid online evolutionary chatter identification model combining the ISK-means and the OS-ELM was proposed, and the online identification and evolution strategy was designed. Finally, the experimental results show that the ISK-means algorithm can greatly improve the clustering efficiency and is suitable for milling chatter online dynamic clustering. Meanwhile, compared with the existing model, the recognition accuracy of the hybrid online evolutionary chatter recognition model combined with ISK-means algorithm and OS-ELM algorithm is improved by 1.31%. This is of great significance for the online control of subsequent chatter.


Introduction
In aerospace, power generation, and other fields, structural components are often designed as thin-walled frame structures in order to reduce weight and increase bearing capacity [1]. These structures are usually multi-frame structures and are mainly processed by milling. Because of the low stiffness of these thin-walled parts and the use of titanium alloy and other difficult materials, it is easy to induce chatter in the process of machining. Chatter is a kind of self-excited regenerative vibration generated between the tool and the workpiece in the process of machining, which is caused by the insufficient stiffness of the tool, the fixture, the workpiece and the machine itself, and the unreasonable selection of cutting parameters [2]. Chatter has a great negative impact on the quality of the workpiece, the life of the tool, and the efficiency of the machining, which has aroused widespread concern in the cutting community.
In order to suppress chatter, it is essential to identify the cutting stability state. At present, cutting chatter identification methods are mainly divided into direct identification method and indirect identification method. Direct identification method is difficult to be carried out online and suitable for off-line detection. Indirect identification method detects whether chatter occurs by means of signal analysis and is suitable for on-line monitoring. In this method, mode recognition is the most widely used method to monitor chatter. Before monitoring chatter by pattern recognition method, feature extraction is required, i.e., extracting processing state characterization with high correlation, sensitivity, reliability, and robustness from the collected signals. At present, the commonly used feature extraction methods are time domain method [3,4], frequency domain method [5,6], and time-frequency domain method [7][8][9]. After feature extraction, pattern recognition is needed to identify the current processing state. Commonly used pattern recognition methods mainly include supervised learning and unsupervised learning.
In supervised learning, support vector machines (SVM) [7,10,11], hidden Markov models (HMM) [12,13], and neural networks [14][15][16] are the most widely used models. Wang et al. [10] proposed a method for chatter identification and diagnosis of thin-walled parts in milling based on signal Q-factor and support vector machine. Zheng et al. [11] proposed a chatter detection multi-feature recognition system based on the fusion technology of wavelet packet transform and particle swarm optimization support vector machine. Han et al. [13] established a milling chatter identification model based on HMM and carried out experimental verification. Lamraoui et al. [15] extracted the statistical characteristics of filtered signals and selected the best features according to their relative entropies. Finally, two neural networks, radial basis function (RBF) and multi-layer perceptron (MLP), were used to identify the chatter. Park et al. [16] used one-dimensional convolution neural network to extract the required features from the filtered spectrum and identify the milling process state.
Extreme learning machine (ELM), as a kind of neural network, has been widely used in pattern recognition due to its high learning efficiency and generalization ability [17][18][19]. Liu et al. [17] proposed an ELM fault diagnosis model based on ensemble empirical mode decomposition and particle swarm optimization and used the bearing experimental data set of Xi'an Jiaotong University to verify the performance of the model. Dong et al. [19] proposed a novel fault diagnosis method combining the refined generalized composite multiscale state joint entropy, robust spectral feature selection unsupervised learning framework, and ELM and applied it to fault diagnosis of wind turbine gearbox and bearing.
In unsupervised learning, K-means algorithm has been widely used in practical cases because of its simplicity and fast running speed [20][21][22][23]. Bigdeli et al.
[21] used K-means algorithm to cluster transformer faults based on frequency response data and used grasshopper optimization algorithm to determine the cluster center. Feng et al. [22] applied the improved K-means algorithm to the fault detection of turbine blades. However, K-means algorithm is easy to fall into local optimum in the process of use. Under this background, Arthur et al. [24] proposed an improved K-means algorithm (K-means + +). Dong et al. [25] used K-means + + algorithm to cluster images. The experimental results show that this method is superior to fuzzy C-means clustering method and K-means clustering algorithm. However, the above recognition models are trained offline and cannot be updated online during the monitoring process, which causes two problems. One is that due to the small number of samples in the offline training process, the accuracy and generalization of the established model are poor. The second problem is that the cutting process is a dynamic change process. As the processing progresses, the stiffness of the workpiece and the wear of the tool will change, resulting in continuous decline in the accuracy of chatter monitoring. Through the online update of the model, we can solve this problem. However, with the accumulation of samples online, if the model is updated online each time by using the old and new samples, it will lead to problems such as model expansion and poor real-time performance [26], which obviously does not meet the actual needs.
With incremental learning, the above problems can be solved. In recent years, online sequential extreme learning machine (OS-ELM) [27] has attracted wide attention in incremental learning and has been widely applied in online modeling of practical problems [28][29][30][31]. Yin et al. [28] established an online sequential extreme learning machine classification model and used it for bearing fault diagnosis. The results showed that the recognition accuracy of OS-ELM model was equal to that of SVM model and was higher than that of ELM model, but the online learning efficiency of OS-ELM model was much higher than that of SVM and ELM model.
Through the above research status, it can be seen that the current chatter recognition model mainly focuses on the offline model. Although the OS-ELM model can realize incremental learning, OS-ELM directly uses its predicted results as the labels of the samples in the process of incremental learning. However, if the result of this prediction is wrong and it is used for the next incremental learning of OS-ELM, it will lead to degradation of the OS-ELM model. How to ensure the accuracy of the samples for the next incremental learning is a problem worth studying. At the same time, neither K-means algorithm nor K-means + + algorithm has the ability of online incremental learning at present, and they are difficult to cluster cutting chatter dynamically. There are two main reasons. First, in the process of cutting chatter monitoring, the data are generated dynamically in turn. If the new and old samples are clustered at the same time, it will lead to infinite expansion of the model, which is not conducive to the real-time performance of cutting chatter monitoring. Second, if only the newly collected samples in this cycle are clustered, although the problem of model expansion can be solved, the newly collected data in this cycle may only contain data in one cutting state, and the results obtained at this time are bound to be wrong when multi-classification is performed. Therefore, it is necessary to optimize the K-means algorithm to make it have the ability of online evolution and suitable for the dynamic monitoring of cutting process.
In order to solve the above problems, a new on-line evolutionary monitoring method for cutting chatter is proposed in this paper. First, an online incremental-sparse K-means (ISKmeans) algorithm is proposed. The online incremental-sparse process of samples is realized by introducing sample pool, and the incremental learning framework of K-means is designed. Then, an online incremental learning algorithm combining unsupervised learning (ISK-Means) and supervised learning (OL-ELM) is put forward. When the newly collected samples reach the set threshold, the ISK-means algorithm is used to cluster. Samples with consistent recognition results from ISKmeans and OL-ELM are used for incremental learning of OL-ELM, which can maximize the accuracy of the incremental learning samples. In this way, the interference of pseudo-samples on the incremental learning of OL-ELM is reduced, and the accuracy of chatter monitoring can be improved. Finally, experimental verification is carried out. This paper is organized as follows: part 2 studies ISK-means online evolutionary algorithm. Part 3 studies hybrid online evolution models of ISK-means and OS-ELM. Part 4 designs the experiment. Part 5 validates and analyzes the performance of the model. Part 6 is the conclusion of this paper.

K-means mathematical theory model
The K-means algorithm is an iterative process, and the number k of final clusters needs to be specified in the use process. In the initial clustering process, k samples are randomly selected from all samples as the initial k clustering centers. The rest of the samples are divided into the closest class cluster to obtain the initial clustering result. Then, the mean value of each class cluster is calculated as the center of the next clustering, and the above steps are repeated until the result converges. Among them, 2-norm distance is most widely used in K-means algorithm. Assuming the cutting sample dataset is D = x i |x i ∈ R m , i = 1, 2, … , n , and the category space belongs to C = C 1 , C 2 , … , C k , where m is the sample dimension, n is the sample number and k is the category number. The distance between samples x i and x j can be expressed as [24] The mean values i of all samples within the cluster are as follows: where N i is the number of samples belonging to type i. The K-means algorithm is actually an optimization problem, and its ultimate goal is to minimize the distance within the cluster, i.e., However, the traditional K-means algorithm needs to recluster according to the steps of K-means algorithm when new cutting samples arrive. This kind of behavior does not take into account the previous clustering results, resulting in inefficient clustering. At the same time, with the continuous arrival of new samples, the number of clustered samples is increasing and the model is expanding constantly, which leads to a significant increase in the time of clustering. These shortcomings severely limit the application of K-means algorithm in online chatter identification.

Research on online incremental-sparse K-means clustering algorithm
During the cutting process, with the change of tool wear and workpiece modal parameters, all kinds of signals in the cutting process will change dynamically. In order to improve the accuracy and efficiency of K-means algorithm and make the K-means algorithm can be applied to online chatter clustering, an online ISK-means clustering algorithm is proposed in this paper. The flowchart of the algorithm is shown in Fig. 1.
In the process of cutting, most of the time is in the normal cutting stage, so most of the samples added within a clustering cycle are normal cutting samples, and sometimes even the newly added samples are all normal samples. In this case, if only the newly added samples are clustered, the samples will be seriously unbalanced at this time, resulting in poor clustering effect. In order to solve this problem, the sample pool is introduced in the online incremental-sparse strategy, and the data of various states are included in the initial sample pool. In the offline phase, the data in the initial sample pool are first clustered to obtain the offline cluster centers. When new samples arrive, they are added to the sample pool first, and then the samples in the sample pool are clustered online. Specifically, the strategy consists of two stages, one is incremental learning and the other is sample sparsity. In the incremental learning stage, when new samples are added to the sample pool, the last cluster center is used as the initial cluster center to cluster all samples in the sample pool online, and a new cluster center is obtained at the same time. Because the last clustering result is used in the process of this clustering, the efficiency of incremental clustering can be greatly improved, and the possible negative effect of non-global optimum caused by random selection of centroid can be eliminated. In the sample sparse stage, the sample number of each class cluster is compared with the set threshold value, and then it is determined whether to trim sample in the class cluster. The threshold set here is the threshold that starts the sample trimming process, known as the trimming threshold. When the number of samples in the class cluster is larger than the set threshold, the earliest sample is deleted so that the number of samples in the class cluster equals the set threshold. Through the sparse stage, the samples in the sample pool can be dynamically updated and maintain the closest connection with the current cutting state at all times. Meanwhile, the sample pool can be effectively prevented from excessive expansion.

OS-ELM mathematical theory model
OS-ELM is an incremental machine learning algorithm, which can evolve online according to a group of samples or a sample [27]. Suppose there are N 0 cutting train- If there are L hidden layer nodes, according to classical ELM theory [32], the output of the network can be expressed as The training objective of ELM is to minimize the error between the output value and the actual value, that is, there exist i ,a i ,b i such that Namely, The above equation is expressed in the matrix form of Since a i and b i are randomly generated in ELM, the problem is transformed into calculating β (0) . According to the method of calculating generalized inverse, we can get According to the OS-ELM theory [27], in the incremental learning stage, suppose N 1 cutting samples arrive, and then incremental online learning is carried out. At this time, the  problem is transformed to find the (1) corresponding to the minimum value of Eq. 10.
where According to the generalized inverse method, we can get formula 13.
In order to realize the recursive update of β, (1) in Eq. 13 is expressed as a function of (0) , K 1 , H 1 , and Y 1 , namely: According to formula 14, the recursive formula is obtained as follows.
According to Woodbury's formula: . From Eqs. 15 and 16, the following can be obtained.
According to the principle of OL-ELM algorithm, OS-ELM includes two parts. The first part is the traditional ELM offline learning stage, in which the number of hidden layer nodes should be set in advance, and the input weights and biases of hidden layer nodes are randomly generated. Then, the output weight β is calculated using a small number of cutting samples to obtain the ELM initialization model. The second part is the incremental learning part, which performs incremental learning on one or a batch of new cutting samples, that is, updates the hidden layer output weight β and realizes the online evolution of the ELM model. The specific workflow is shown in Fig. 2.

Research on online evolutionary identification technology for milling chatter based on ISK-means and OL-ELM
From the working process of OS-ELM, it can be seen that the initial model of OS-ELM can be dynamically modified by incremental learning, which is consistent with the characteristics of signal dynamic changes during cutting process. However, during the application of OS-ELM, the category of new sample is forecasted and marked by its own model, so there is a problem of accuracy. Because the forecast accuracy of any one model cannot reach 100% at present, including OS-ELM model, newly added samples may be mislabeled. If the original model is dynamically corrected by using new samples with incorrect marking, the forecasting model will deviate and the forecasting accuracy will be reduced, which is not conducive to online monitoring of cutting chatter. In order to solve this problem, this paper combines unsupervised learning with supervised learning and proposes an online evolutionary recognition algorithm based on ISK-means and OS-ELM. The specific algorithm structure process is shown in Fig. 3. In the figure, the dotted line represents the offline training

Experimental setup
In order to verify the effectiveness of the online evolutionary chatter intelligent detection algorithm, experiments were carried out. The hardware of the experiment included Dalian VDL-1000E three-axis milling machine, PCB acceleration sensor, and Donghua DH5922 acquisition box. The experimental scenario is shown in Fig. 4. During the experiment, the sampling frequency of the acceleration signal was 5 kHz. Down milling without coolant was carried out during the experiment. The specific parameters of the experiment are shown in Table 1. The tool used is shown in Table 2, and the material properties of the workpiece are shown in Table 3. The length, height, and thickness of the overhang part of the workpiece are 202 mm, 70 mm, and 5 mm, respectively. The acceleration signal collected in the Y-direction (i.e., perpendicular to the thin-walled direction) during the experiment is shown in Fig. 5. Due to the influence of initial workpiece deformation, tool wear, material hard points, and sensor placement, different processing states appeared under the same set of processing parameters. In order to divide the different machining states, the surface quality of the workpiece after the cutting experiment is analyzed. Local enlargements and global images of the workpiece surface are shown in Fig. 6. The basis for dividing the processing state by the surface quality of the workpiece is as follows. During the stable processing stage, the surface quality of the workpiece is good and there are no chatter marks. During the transition phase, slight chatter marks appear on the surface of the workpiece, but they are not obvious and have small spacing. During the chatter explosion stage, serious chatter marks appear on the workpiece surface, and the distance between the chatter marks increases significantly. According to the classification basis, the machining status is divided. The processing state is stable in 0-7.03 s and 44.40-50.50 s. During 7.03-13.93 s and 39.63-44.40 s, the processing state is transitional. The machining state is chatter in 13.93-39.63 s.

ISK-means clustering efficiency verification
First, the clustering efficiency of K-means and ISK-means was compared. During the experiment, the convergence error and maximum number of iterations of both algorithms were set to 1 × 10 -6 and 1000. Multiple comparative experiments were conducted, and the ISK-means algorithm conducted incremental learning by 50 samples in each group experiment. The experimental results are shown in the Table 4. For ease of understanding, take the first set of experiments as an example for explanation. The K-means algorithm directly clusters the 200 samples. The ISK-means algorithm uses the clustering centers obtained from the first 150 samples as the initial clustering centers and then clusters all 200 samples. In fact, this process simulates the incremental clustering process of the ISK-means algorithm, which is equivalent to adding 50 samples to the initial 150 samples and then clustering. In order to more accurately reflect the performance of the two algorithms and reduce random interference, 10 experiments had been conducted for each algorithm, and the average value was taken as the final result. The experimental process was conducted on a Dell precision 3551 computer with Intel (R) Core (TM) i7-10750H CPU, and the software used during the experiment was MATLAB 2019.
From the table, it can be seen that the ISK-means algorithm can significantly improve clustering efficiency under various parameters, and the specific efficiency improvement is influenced by multiple factors such as sample dimension, number of samples, and sample category. At the same time,  because the algorithm proposed in this paper makes full use of the results of the last clustering, it can also avoid the problem of K-means algorithm falling into local optimization.

Accuracy verification of OL-ELM and ISK-means hybrid online evolutionary chatter identification model
On the basis of proving the clustering efficiency of ISKmeans, the recognition accuracy of the ISK-means and OS-ELM hybrid model proposed in this paper was verified by experiments in Sect. 4. Because the identification accuracy of ELM and OL-ELM models has been compared in literature [28], which proves the superiority of OL-ELM model, the model proposed in this paper is directly compared with OL-ELM model, not with ELM model. In order to reduce the impact of cutting in and cutting out, the 1-49 s signal in Fig. 5 was selected for experimental verification. First, the signal was separated from 25.0 s, and the first half was used as the training set to train the offline part of the online evolutionary model. The second half was used as a test set to verify the accuracy of the two online evolutionary models. The window length of signal analysis was set to 1024 sampling points. The signal was divided into overlapping frames, and the overlapping was 512 sampling points, i.e., each window offset was 512 sampling points. The methods in references [8,9] were used to extract sample entropy and multi-scale permutation entropy characteristics of signals for subsequent verification. After such treatment, the number of samples under different processing conditions obtained from training set and test set is shown in Table 5.
Before the experiment, the parameters of the ISK-means algorithm in the mixture model were set, in which the trimming threshold was set to 55 and the execution threshold was set to 30. According to the above settings, the clustering accuracy of the ISK-means algorithm for the test set is  90.39%. However, if the samples from the initial sample pool and the test set are clustered by the K-means algorithm, the overall recognition accuracy of the test set is 89.09%. The recognition confusion matrix of the two algorithms is shown in the Fig. 7. The reason why the recognition accuracy of the ISK-means algorithm is slightly higher than that of the K-means algorithm is mainly because the ISK-means algorithm eliminates early samples with low correlation with the current processing state, preventing the impact of early samples on the clustering results of the current processing state. Subsequently, a comparative experiment was conducted on the recognition accuracy of OS-ELM model and ISKmeans and OS-ELM model. The update cycle of both models was set to 30 samples, that was, when the number of identified samples reached 30, the online evolutionary model was updated once. It should be pointed out that the OS-ELM model is updated online using all 30 samples, while the model proposed in this article selects samples with consistent recognition results from ISK-means and OS-ELM for online updates. In this way, the two models had been updated 7 times while recognizing samples.
The comparison of recognition accuracy between OS-ELM and ISK-means and OS-ELM models is shown in Fig. 8. It can be seen from the diagram that the accuracy of OS-ELM online evolution model is 94.76%, and that of the proposed online evolution model in this paper is 96.07%, higher than that of OS-ELM model. This is mainly due to the fact that OS-ELM evolves its own model using its own marked all samples, while the accuracy of OS-ELM model recognition cannot reach 100%, which may lead to the labeling error of online evolutionary samples. Evolution of OS-ELM model using mismarked samples has affected  In the model proposed in this paper, the samples with the same recognition results of unsupervised learning and supervised online evolutionary learning algorithm are selected as online evolutionary samples, which effectively solves the impact of label error samples on the chatter online evolution model and improves the accuracy of the model. By comparison, the recognition accuracy of the proposed model in this paper is only 1.31% higher than that of the existing OS-ELM online evolutionary model. This is mainly due to the short processing time, the small number of samples and evolution, and the unsignificant change of cutting system characteristics, but this fully proves the superiority of the proposed algorithm. The more complex the machining conditions and the more drastic changes in modal parameters and tool wear, the more obvious the advantages of the proposed algorithm will be. At the same time, it can be found from the Fig. 8 that the recognition accuracy of stable cutting and chatter is higher, while the recognition accuracy of transition stage is lower. This is mainly because the transition status is in the intermediate stage of stable cutting and chatter explosion and is comparatively similar to both machining states. In the future research, we should focus on solving this problem and improve the identification accuracy of transition stage.

Conclusion
In order to solve the problem of low accuracy of chatter identification in the milling process of titanium alloy thinwalled parts, an online evolutionary chatter identification model combining unsupervised learning and supervised learning was proposed and verified by experiments. First, ISK-means algorithm was proposed, and online incrementalsparse clustering process of ISK-means algorithm was designed to achieve online incremental-sparse clustering of K-means algorithm. Then, aiming at the problem that there may be false samples in the incremental learning process of OL-ELM algorithm, which affects the online evolution of its model, a hybrid online evolutionary chatter identification algorithm based on ISK-means and OL-ELM was proposed. Finally, the experimental verification was carried out. The experimental results and analysis show that ISK-means algorithm can improve the efficiency and accuracy of clustering and is suitable for online clustering of milling chatter. The hybrid model of ISK-means and OS-ELM can reduce the impact of false samples on the online evolution of OS-ELM. In this experiment, the recognition accuracy of the hybrid models is improved by about 1.31% compared with the existing OS-ELM model. This is of great significance for subsequent chatter control.
Author contribution Zhixue Wang has designed the experiments, analyzed and arranged data, and written the manuscript; Caixu Yue has conducted the experiments, analyzed and arranged data, and written the manuscript; Xianli Liu has organized the project and collected and analyzed data; Maoyue Li has conducted the experiments and collected and analyzed data; Boyang Meng and Liying Yong have reviewed the manuscript.
Funding This work was financially supported by (1)

Data availability
The raw/processed data required to reproduce these findings cannot be shared for the time being. Data will be made available upon request.

Declarations
Ethical approval The research does not involve human participants or animals and the authors warrant that the paper fulfills the ethical standards of the journal.

Consent to participate
It is confirmed that all the authors are aware and satisfied of the authorship order and correspondence of the paper.
Consent for publication All the authors are satisfied that the last revised version of the paper is published without any change.

Competing interests
The authors declare no competing interests.