A Robust Tool Condition Monitoring System Based on Cluster Density under Variable Machining Processes

: Real-time tool condition monitoring (TCM) is becoming more and more important to meet the increased requirement of reducing downtime and ensuring the machining quality of manufacturing systems. However, it is difﬁcult to satisfy both robustness and effectiveness of pattern recognition for a TCM system without using an unsupervised strategy. In this paper, a clustering-based TCM system is proposed that can be used for different machining conditions such as variable cutting parameters, variable cutters, and even variable cutting methods. The solution is based on a signiﬁcant statistical correlation between tool wear and the distribution of cutting force features, which is revealed through the clustering results obtained from a novel clustering method based on adjacent grids searching (CAGS). This statistical correlation is converted into tool wear status by using an empirical factor that is robust for variable cutting processes. The proposed TCM system is completely unsupervised as a training-free procedure is used in the monitoring process. To verify the effectiveness of the system, a series of experiments are conducted, such as whole life-cycle wear experiment under same milling condition, tool wear experiment under variable milling conditions and tool wear experiment under same turning condition. The prediction accuracy of our system for tool wear experiment under variable milling conditions is 100%, 75% and 75%, respectively. In contrast, BP neural network, Bayesian network and SVM are used for tool wear prediction under the same conditions. Experimental results show the superiority and effectiveness of our TCM system based on cluster density of CAGS over several state-of-the-art supervised methods.


Introduction
Tool condition monitoring (TCM) is of great importance to provide cost saving and reduce downtimes of machine tools [1][2][3]. Thus, a vast amount of research has been focusing on TCM and tool condition prognostics approaches for the machining process [4][5][6]. Results show that a TCM-based optimization of cutting parameters during machining can extend the remaining useful life of cutting tools [7,8]. In the existing TCM system based on a data-driven model, according to whether the data processing model needs training data, it is mainly divided into a supervised TCM system and an unsupervised TCM system. A supervised TCM system requires more or less teacher data to train model parameters, such as Hidden Markov Model [9,10], Neural Network [11][12][13], SVM [14,15], Deep Learning [16,17], etc. The Hidden Markov Model (HMM) is a Markov chain and a production model. It can be used to establish a stochastic process model describing tool states based on training data, which has a strong generalization ability. Liao et al. [18] proposed a new tool wear condition monitoring method based on multi-scale mixed hidden Markov model analysis of cutting force signals. However, one of the limitations of HMM in the application is that the construction of the model requires a large number of samples to support. Tool pattern recognition based on a neural network uses a structure of networked topology Appl. Sci. 2023, 13, 7226 2 of 20 to express the mapping relationship between features and tool wear. Different networked structures show different mapping capabilities and nonlinear fitting capabilities. Zhang et al. [19] designed a convolution neural network algorithm to deal with the optimized features to achieve tool wear prediction. Huang et al. [20] proposed a tool wear monitoring method based on short-time Fourier transform and deep convolution neural network. Compared with neural network models, Support Vector Machines (SVM) can achieve better generalization ability when training samples are limited. Milla et al. [21] proposed a new method to monitor tool wear in the micro-milling process using the SVM artificial intelligence model, vibration and sound signals. Niu et al. [22] developed multistage SVM to identify tool wear based on the selected features. However, the performance of the SVM model largely depends on the selection of penalty factors and kernel function parameters. The above-mentioned models require feature extraction of the original signals during the cutting process before use, so the monitoring quality is also significantly affected by the effectiveness of the features. In contrast, deep learning algorithms can achieve automatic feature extraction through autoencoders, thus they are able to find more effective features to characterize tool states. Zhang et al. [23] proposed a tool wear monitoring method for milling complex parts based on deep learning. However, this also increases the nonlinear degree of the system, requiring more training data to improve the accuracy of identification. In the machining process of some complex parts, sufficient training samples cannot be obtained due to high manufacturing cost and fast tool wear, so it is difficult to apply and popularize the supervised TCM system. Different from supervised methods, unsupervised TCM systems establish model parameters only by using monitoring signals rather than training data [24]. However, there are few reports on TCM research based on unsupervised methods due to their poor nonlinear fitting ability and real-world supervising ability. Thomas Gittler et al. [25] proposed an unsupervised approach for degradation prognostics of machine tool components and consumables. However, this was not a completely unsupervised method although a clustering algorithm was used as the core algorithm, since the model should be trained on the selected samples and their respective feature distributions. Especially, a retraining process was required when cutting parameters changed. Dou et al. [26] proposed an unsupervised method to monitor the wear state of milling cutter based on sparse auto-encoder (SAE). The established SAE model extracted characteristics of the signal and completed the training of the model without supervision of the empirical label. However, the performance of the SAE process had a heavy dependence on the continuity of cutting, which was similar to a dimensionless method of threshold monitoring. This led to the failure of TCM when switching the cutting parameters according to the manufacturing procedure.
Based on the above analysis, it can be seen that current TCM systems are often designed for specific cutting conditions, which means that different cutting conditions require different training processes. To the best of our knowledge, current monitoring systems are not competent to complete the TCM process when dealing with complex parts that involve multiple cutting methods and parameters. More flexible and adaptable TCM systems are needed to provide effective performance in these situations. Therefore, to solve the above deficiencies of the TCM system under variable machining processes, a clustering-based method is proposed in this paper. First, time-domain statistical features are extracted to construct the feature space. Then, a novel clustering method based on adjacent grids searching (CAGS) is proposed to find clusters, corresponding to different tool wear conditions, in the feature space. Second, an important statistical correlation between tool wear and the distribution of cutting force features is studied. The cluster density is used to mine sensitive information about tool wear that is not sensitive to cutting conditions. Third, a cluster density factor is proposed to convert the cluster density into the value reflecting actual tool wear and then the TCM process is accomplished.

Framework of the Proposed TCM System
In the cutting process, tool wear increases nonlinearly with cutting time. According to the characteristics of the tool wear curve, the tool wear process could be divided into three stages including initial wear, middle wear and severe wear [27], as shown in Figure 1. The tool wear increases rapidly in the initial wear stage as the surface of the new tool is rough and uneven and the blade is sharp. It can be seen that the tool wear increases slowly and uniformly in the middle wear stage, which is attributable to the polish of the tool surface at the cutting edge and the reduction of cutting temperature. When the cutting edge becomes rough in the severe wear stage, the cutting temperature increases rapidly, accelerating the wear speed.

Framework of the Proposed TCM System
In the cutting process, tool wear increases nonlinearly with cutting time. According to the characteristics of the tool wear curve, the tool wear process could be divided into three stages including initial wear, middle wear and severe wear [27], as shown in Figure  1. The tool wear increases rapidly in the initial wear stage as the surface of the new tool is rough and uneven and the blade is sharp. It can be seen that the tool wear increases slowly and uniformly in the middle wear stage, which is attributable to the polish of the tool surface at the cutting edge and the reduction of cutting temperature. When the cutting edge becomes rough in the severe wear stage, the cutting temperature increases rapidly, accelerating the wear speed.  In recent research, TCM is mainly based on constructing a model such as an analytical model, neural network model and nonlinear classifier between tool wear and feature values of cutting signals. However, the feature values of cutting signals are prone to being affected by matters other than tool wear, including cutting parameters and lubrication. In this study, an important statistical correlation between tool wear and the distribution of cutting force features is revealed to find robust information indicating tool wear conditions. To achieve TCM under different cutting conditions, an unsupervised method based on cluster density of CAGS is proposed, as shown in Figure 2. First, force signals are collected during the cutting process under different tool wear conditions. Then, time-domain statistical features, which are commonly used in the machining process, are extracted from the force signals to form the feature space containing tool wear information. Using CAGS, the samples are divided into several clusters with different densities and thus the tool wear information is clarified. To accomplish TCM, the cluster density factor is proposed to transfer the density of a cluster to a value corresponding to tool wear. In recent research, TCM is mainly based on constructing a model such as an analytical model, neural network model and nonlinear classifier between tool wear and feature values of cutting signals. However, the feature values of cutting signals are prone to being affected by matters other than tool wear, including cutting parameters and lubrication. In this study, an important statistical correlation between tool wear and the distribution of cutting force features is revealed to find robust information indicating tool wear conditions. To achieve TCM under different cutting conditions, an unsupervised method based on cluster density of CAGS is proposed, as shown in Figure 2. First, force signals are collected during the cutting process under different tool wear conditions. Then, time-domain statistical features, which are commonly used in the machining process, are extracted from the force signals to form the feature space containing tool wear information. Using CAGS, the samples are divided into several clusters with different densities and thus the tool wear information is clarified. To accomplish TCM, the cluster density factor is proposed to transfer the density of a cluster to a value corresponding to tool wear.

Feature Extraction
The shear resistance within the workpiece material and the friction between the tool and the workpiece are the main factors to produce cutting force. The friction between the tool and the workpiece increases when the tool is worn, thus increasing the cutting force. For most cutting conditions, the reflection of cutting force on the tool wear state is more sensitive, and it is also one of the most effective signals to characterize the tool state, so the cutting force signal is used to characterize the tool wear state in this paper. In addition, time-domain signals reflect amplitude changes over time. Time-domain feature extraction is the simplest and most direct feature extraction method. The time-domain features used in this paper are as follows.

Feature Extraction
The shear resistance within the workpiece material and the friction between the tool and the workpiece are the main factors to produce cutting force. The friction between the tool and the workpiece increases when the tool is worn, thus increasing the cutting force. For most cutting conditions, the reflection of cutting force on the tool wear state is more sensitive, and it is also one of the most effective signals to characterize the tool state, so the cutting force signal is used to characterize the tool wear state in this paper. In addition, time-domain signals reflect amplitude changes over time. Time-domain feature extraction is the simplest and most direct feature extraction method. The time-domain features used in this paper are as follows.

Clustering Analysis
In the processing of complex structural parts, due to the lack of off-line test to provide the necessary prior knowledge, unsupervised pattern recognition method becomes a necessary option, and clustering algorithm is commonly used in unsupervised pattern recognition algorithm. In this paper, a clustering method CAGS is used to perform data mining from the distribution of cutting force features. (1) Root Mean Square (RMS) (2) Mean Value (3) Standard Deviation (STD) where x (i) is the signal collected within a certain time t during the cutting process, i = 1, 2, . . . , N.

Clustering Analysis
In the processing of complex structural parts, due to the lack of off-line test to provide the necessary prior knowledge, unsupervised pattern recognition method becomes a necessary option, and clustering algorithm is commonly used in unsupervised pattern recognition algorithm. In this paper, a clustering method CAGS is used to perform data mining from the distribution of cutting force features.
For a 2D space S, a dataset D distributed in S can be defined as where N is the number of samples of D, X i is the ith sample of D. A scale sequence SC i is used to divide the ith dimension of S into R parts, which can be written as SC i = {sc i (0), sc i (1), . . . , sc i (R)} (6) As the result, the grid space G is generated.
where C i is the ith cell with following attributes in G where location is the cell coordinate in the grid space; member records all samples in the cell; density denotes the number of samples in the cell. The location of C i can be defined as follows.
where the subscript i can be calculated by In Formula (6), sc i (j − 1) and sc i (j) are the left and right boundaries of cells whose ith coordinate is c * j , where * denotes the subscript of the cells. Thus, each sample of D can be assigned to a cell by using Equations (5), (6) and (9). The resolution R in Formula (6) can be determined according to the scale of the input dataset by the following formula where Int(x) denotes the forward rounding function, f R is the resolution coefficient. To achieve the clustering of D, a traversal process is proposed by using an adjacent cell operator which can be defined as Aopt = { −1, 1 , −1, 0 , −1, 1 , 0, −1 , 0, 1 , 1, −1 , 1, 0 , 1, 1 } By using the Aopt, the adjacent cells of C i can be obtained as follows.
Before clustering, the halo threshold is used to divide the cells into peripheral cells and core cells.
where f H is halo coefficient, M is the total number of non-null cells. If the density of a cell is higher than threH, it could be defined as core cell. Otherwise, it is peripheral cells. The clustering process is performed through two main stages including a core cell traversal and a peripheral cell traversal. Figure 3 is the flowchart of the main process of CAGS. Different from other density-based clustering methods, CAGS calculates the mean density of each cluster as an interface to find the intrinsic information of the dataset. The mean density of the kth cluster is defined as where N k is the number of cells of the kth cluster.
where is the number of cells of the kth cluster.

Tool Condition Recognition
Affected by various factors, the cutting force signals in the machining process are highly stochastic and non-stationary, by which the tool wear information is always hidden in the statistical correlation of the cutting force features. Generally, it is known that the cutting force signal increases with tool wear when other conditions remain unchanged. However, a statistical tendency is found through a large amount of cutting data that the within-class scatter increases with tool wear. That is, the more severe the tool wear, the sparser the distribution of the corresponding cutting force features. In contrast, the statistical tendency is effective in characterizing tool wear rather than the value of cutting force

Tool Condition Recognition
Affected by various factors, the cutting force signals in the machining process are highly stochastic and non-stationary, by which the tool wear information is always hidden in the statistical correlation of the cutting force features. Generally, it is known that the cutting force signal increases with tool wear when other conditions remain unchanged. However, a statistical tendency is found through a large amount of cutting data that the within-class scatter increases with tool wear. That is, the more severe the tool wear, the sparser the distribution of the corresponding cutting force features. In contrast, the statistical tendency is effective in characterizing tool wear rather than the value of cutting force and its features. This could be attributed to the dynamic property of the cutting force generation process, and it will be reported in the subsequent studies.
To transfer the statistical correlation to quantitative tool wear information, a cluster density factor is defined as follows.
where War(i) is the density factor of the ith cluster obtained by CAGS, density 0 is the smallest value of the mean density of all clusters, density(i) is the mean density of the ith cluster, T is the truncation coefficient. As a rule of thumb, the T can be set to 5.54.

Experiments
To verify the effectiveness of the unsupervised TCM system, a series of experiments are conducted, including a whole life-cycle wear experiment under the same milling condition, a tool wear experiment under variable milling conditions and a tool wear experiment under the same turning condition. A three-axis piezoelectric dynamometer (Kistler, type 9257A, Winterthur, Switzerland) is used to collect cutting force signals in machining processes, as shown in Figure 4a. The cutting force signal is initially preamplified by a multichannel charge amplifier (Kistler 5070), as shown in Figure 4b, and then transferred directly to data acquisition card sampling at 10 kHz.
Appl. Sci. 2023, 13, 7226 7 of 21 and its features. This could be attributed to the dynamic property of the cutting force generation process, and it will be reported in the subsequent studies.
To transfer the statistical correlation to quantitative tool wear information, a cluster density factor is defined as follows.
where ( ) is the density factor of the th cluster obtained by CAGS, is the smallest value of the mean density of all clusters, ( ) is the mean density of the th cluster, is the truncation coefficient. As a rule of thumb, the can be set to 5.54.

Experiments
To verify the effectiveness of the unsupervised TCM system, a series of experiments are conducted, including a whole life-cycle wear experiment under the same milling condition, a tool wear experiment under variable milling conditions and a tool wear experiment under the same turning condition. A three-axis piezoelectric dynamometer (Kistler, type 9257A, Winterthur, Switzerland) is used to collect cutting force signals in machining processes, as shown in Figure 4a. The cutting force signal is initially preamplified by a multichannel charge amplifier (Kistler 5070), as shown in Figure 4b, and then transferred directly to data acquisition card sampling at 10 kHz.

Test I: Whole Life-Cycle Wear Experiment under Same Milling Condition
This test is conducted to verify the performance of the proposed system for condition monitoring of the entire tool life evolution process. The experiment is carried out at

Test I: Whole Life-Cycle Wear Experiment under Same Milling Condition
This test is conducted to verify the performance of the proposed system for condition monitoring of the entire tool life evolution process. The experiment is carried out at MAKINO FNC86-A20 vertical machining center. The workpiece (Ti-6Al-4V) with a size of 150 × 100 × 30 mm is clamped to the dynamometer. In addition, a Mitsubishi cutter (type MAKINO FNC86-A20 vertical machining center. The workpiece (Ti-6Al-4V) with a size of 150 × 100 × 30 mm is clamped to the dynamometer. In addition, a Mitsubishi cutter (type APMT1135PDER-H2) is fixed to a 12 mm diameter cutter bar. Cutting tool and workpiece are as shown in Figure 5. In this experiment, a type of down-milling operation is used, in which the milling spindle speed is 1060 r/min, the cutting speed is 39.9 m/min, the cutting depth is 0.4 mm, the cutting width is 6 mm and the feeding rate is 0.1 mm/tooth. The flank wear is measured after each cutting of the 35 cuttings and the mean value of the wear zone is taken as the VB value [28]. When the VB value reaches or exceeds 0.3 mm, the tool life limit is considered to be reached. Figure 6 shows the tool wear diagram of three different states.

Test II: Tool Wear Experiment under Variable Milling Conditions
This experiment is conducted to test the performance stability of the monitoring system under variable milling conditions. On the basis of Test I, the cut depth is changed to 1 mm, the cutting width is changed to 22 mm, the diameter of cutter bar is changed to 25 mm, the number of cutters is changed to 4, the cutting speed and feed rate are set as shown in Table 1, and other options remain unchanged. Cutting tool machining workpiece is as shown in Figure 7. In this experiment, three different parameter groups are set In this experiment, a type of down-milling operation is used, in which the milling spindle speed is 1060 r/min, the cutting speed is 39.9 m/min, the cutting depth is 0.4 mm, the cutting width is 6 mm and the feeding rate is 0.1 mm/tooth. The flank wear is measured after each cutting of the 35 cuttings and the mean value of the wear zone is taken as the VB value [28]. When the VB value reaches or exceeds 0.3 mm, the tool life limit is considered to be reached. Figure 6 shows the tool wear diagram of three different states. MAKINO FNC86-A20 vertical machining center. The workpiece (Ti-6Al-4V) with a size of 150 × 100 × 30 mm is clamped to the dynamometer. In addition, a Mitsubishi cutter (type APMT1135PDER-H2) is fixed to a 12 mm diameter cutter bar. Cutting tool and workpiece are as shown in Figure 5. In this experiment, a type of down-milling operation is used, in which the milling spindle speed is 1060 r/min, the cutting speed is 39.9 m/min, the cutting depth is 0.4 mm, the cutting width is 6 mm and the feeding rate is 0.1 mm/tooth. The flank wear is measured after each cutting of the 35 cuttings and the mean value of the wear zone is taken as the VB value [28]. When the VB value reaches or exceeds 0.3 mm, the tool life limit is considered to be reached. Figure 6 shows the tool wear diagram of three different states.

Test II: Tool Wear Experiment under Variable Milling Conditions
This experiment is conducted to test the performance stability of the monitoring system under variable milling conditions. On the basis of Test I, the cut depth is changed to 1 mm, the cutting width is changed to 22 mm, the diameter of cutter bar is changed to 25 mm, the number of cutters is changed to 4, the cutting speed and feed rate are set as shown in Table 1, and other options remain unchanged. Cutting tool machining workpiece is as shown in Figure 7. In this experiment, three different parameter groups are set

Test II: Tool Wear Experiment under Variable Milling Conditions
This experiment is conducted to test the performance stability of the monitoring system under variable milling conditions. On the basis of Test I, the cut depth is changed to 1 mm, the cutting width is changed to 22 mm, the diameter of cutter bar is changed to 25 mm, the number of cutters is changed to 4, the cutting speed and feed rate are set as shown in Table 1, and other options remain unchanged. Cutting tool machining workpiece is as shown in Figure 7. In this experiment, three different parameter groups are set respectively to conduct the experiment. Table 1 shows the specific parameters of the experiment. The flank wear is measured after each cutting as shown in Figure 8. respectively to conduct the experiment. Table 1 shows the specific parameters of the experiment. The flank wear is measured after each cutting as shown in Figure 8.

Test III: Tool Wear Experiment under Same Turning Condition
This test is used to verify the robustness of the proposed system on the turning process, which is completely different from the milling process. The workpiece is GH4169 superalloy bar with a diameter of 100 mm and a length of 200 mm. In this experiment, the spindle speed of milling is 500 r/min, the feeding rate is 0.1 mm/r, the cutting speed is 157 m/min and the cutting depth is 0.2 mm. The flank wear is measured after each cutting and is as shown in Figure 9. respectively to conduct the experiment. Table 1 shows the specific parameters of the experiment. The flank wear is measured after each cutting as shown in Figure 8.

Test III: Tool Wear Experiment under Same Turning Condition
This test is used to verify the robustness of the proposed system on the turning process, which is completely different from the milling process. The workpiece is GH4169 superalloy bar with a diameter of 100 mm and a length of 200 mm. In this experiment, the spindle speed of milling is 500 r/min, the feeding rate is 0.1 mm/r, the cutting speed is 157 m/min and the cutting depth is 0.2 mm. The flank wear is measured after each cutting and is as shown in Figure 9.

Test III: Tool Wear Experiment under Same Turning Condition
This test is used to verify the robustness of the proposed system on the turning process, which is completely different from the milling process. The workpiece is GH4169 superalloy bar with a diameter of 100 mm and a length of 200 mm. In this experiment, the spindle speed of milling is 500 r/min, the feeding rate is 0.1 mm/r, the cutting speed is 157 m/min and the cutting depth is 0.2 mm. The flank wear is measured after each cutting and is as shown in Figure 9.

Cutting Force Signal and Feature Extraction
The force signals in the process of continuous milling have been collected through Test I, and the force signal waveforms of three different tool wear states are shown in Figure 10. The spindle rotational period can be divided into two stages, as labeled in Fig-Figure 9. Tool morphology under different tool wear states in Test III: (a) initial wear; (b) middle wear; (c) severe wear.

Cutting Force Signal and Feature Extraction
The force signals in the process of continuous milling have been collected through Test I, and the force signal waveforms of three different tool wear states are shown in Figure 10. The spindle rotational period can be divided into two stages, as labeled in Figure 10, where Stage I is the cutting process of the cutter and Stage II is the idle process in which the cutter has been separated from the workpiece. Thus, the cutting force is nearly 0 N in Stage II. For the milling process, RMS of the cutting force in the feed direction and the vertical radial direction is extracted as the common feature.

Cutting Force Signal and Feature Extraction
The force signals in the process of continuous milling have been collected thro Test I, and the force signal waveforms of three different tool wear states are show Figure 10. The spindle rotational period can be divided into two stages, as labeled in ure 10, where Stage I is the cutting process of the cutter and Stage II is the idle proces which the cutter has been separated from the workpiece. Thus, the cutting force is ne 0 N in Stage II. For the milling process, RMS of the cutting force in the feed direction the vertical radial direction is extracted as the common feature. To create a dataset reflecting the statistical correlation with tool wear, cutting f signals are partitioned into segments with a length of six spindle rotational periods. T 3500 samples corresponding to the 35 cuttings are obtained, including 1600 sample initial wear, 1300 samples of middle wear and 600 samples of severe wear. The scatte samples is shown in Figure 11 and parts of the cuttings are marked. Since the tool w values increase gradually from NO. 1 to NO. 35, the samples with different tool wear st highly overlap with each other. In addition, the tendency that the within-class scatter creases with tool wear is visible. To create a dataset reflecting the statistical correlation with tool wear, cutting force signals are partitioned into segments with a length of six spindle rotational periods. Thus, 3500 samples corresponding to the 35 cuttings are obtained, including 1600 samples of initial wear, 1300 samples of middle wear and 600 samples of severe wear. The scatter of samples is shown in Figure 11 and parts of the cuttings are marked. Since the tool wear values increase gradually from NO. 1 to NO. 35, the samples with different tool wear states highly overlap with each other. In addition, the tendency that the within-class scatter increases with tool wear is visible.
in vertical radial direction under middle wear, (e) force in feed direction under severe wear, (f) for in vertical radial direction under severe wear.
To create a dataset reflecting the statistical correlation with tool wear, cutting forc signals are partitioned into segments with a length of six spindle rotational periods. Thu 3500 samples corresponding to the 35 cuttings are obtained, including 1600 samples o initial wear, 1300 samples of middle wear and 600 samples of severe wear. The scatter o samples is shown in Figure 11 and parts of the cuttings are marked. Since the tool wea values increase gradually from NO. 1 to NO. 35, the samples with different tool wear state highly overlap with each other. In addition, the tendency that the within-class scatter in creases with tool wear is visible. Compared with the force signal waveforms in Test I, the cutting processes fill up th whole spindle rotational period since four cutters are used in Test Ⅱ. The stages from I t IV, marked in Figure 12, correspond to cutting processes of four cutters, respectivel Without loss of generality, the same features with Test I are extracted. Compared with the force signal waveforms in Test I, the cutting processes fill up the whole spindle rotational period since four cutters are used in Test II. The stages from I to IV, marked in Figure 12, correspond to cutting processes of four cutters, respectively. Without loss of generality, the same features with Test I are extracted.
Due to the disturbance factors such as spindle runout, there is a difference in cutting force waveform between the cutting processes of different cutters, as shown in Figure 12. To eliminate the above influence, a sufficiently long sample length should be chosen. However, limited cutting force signals are collected in this test. Therefore, a proper balance should be struck between the sample length and the number of samples, and the length of a spindle rotational period is used for partitioning cutting force signals. As the result, 1080 samples corresponding to the 12 cuttings are obtained, the scatter of samples is shown in Figure 13 and parts of the cuttings are marked. The samples of NO. 1 to NO. 3 and NO. 9 to NO. 11, corresponding to initial wear, have a concentrated distribution in the bottom-left of Figure 13. The samples of NO. 4 to NO. 8 correspond to middle wear and the samples NO. 12 correspond to the severe wear. The tendency that the within-class scatter increases with tool wear appears again as shown in Figure 13. However, the samples corresponding to middle wear and severe wear are distributed in different regions because of different cutting parameters. For example, the samples of NO. 1 to NO. 3 (Test ID: A) and NO. 6 to NO. 7 (Test ID: B) are separated, for which both correspond to initial wear. In addition, the samples of NO. 4 (Test ID: A) and NO. 8 (Test ID: B) are separated, for which both correspond to middle wear.
In Test III the force signals in five cutting processes including initial wear (NO. 1, NO. 2), middle wear (NO. 3, NO. 4) and severe wear (NO. 5) are collected, respectively. Figure 14 shows waveforms of three different tool wear states. It can be seen that no periodicity can be found from the cutting force waveforms of the turning process. Thus, features different from the milling process should be used. In this study, STD of the cutting force in the feed direction and the vertical radial direction is extracted as the common feature. Due to the disturbance factors such as spindle runout, there is a difference in cutting force waveform between the cutting processes of different cutters, as shown in Figure 12. To eliminate the above influence, a sufficiently long sample length should be chosen. However, limited cutting force signals are collected in this test. Therefore, a proper balance should be struck between the sample length and the number of samples, and the length of a spindle rotational period is used for partitioning cutting force signals. As the result, 1080 samples corresponding to the 12 cuttings are obtained, the scatter of samples is shown in Figure 13 and parts of the cuttings are marked. The samples of NO. 1 to NO. 3 and NO. 9 to NO. 11, corresponding to initial wear, have a concentrated distribution in the bottom-left of Figure 13. The samples of NO. 4 to NO. 8 correspond to middle wear and the samples NO. 12 correspond to the severe wear. The tendency that the within-class scatter increases with tool wear appears again as shown in Figure 13. However, the samples corresponding to middle wear and severe wear are distributed in different regions because of different cutting parameters. For example, the samples of NO. 1 to NO. 3 (Test ID: A) and NO. 6 to NO. 7 (Test ID: B) are separated, for which both correspond to initial In Test Ⅲ the force signals in five cutting processes including initial wear (NO. 1, NO. 2), middle wear (NO. 3, NO. 4) and severe wear (NO. 5) are collected, respectively. Figure  14 shows waveforms of three different tool wear states. It can be seen that no periodicity can be found from the cutting force waveforms of the turning process. Thus, features different from the milling process should be used. In this study, STD of the cutting force in  In Test Ⅲ the force signals in five cutting processes including initial wear (NO. 1, NO. 2), middle wear (NO. 3, NO. 4) and severe wear (NO. 5) are collected, respectively. Figure  14 shows waveforms of three different tool wear states. It can be seen that no periodicity can be found from the cutting force waveforms of the turning process. Thus, features different from the milling process should be used. In this study, STD of the cutting force in the feed direction and the vertical radial direction is extracted as the common feature. Since the collection of cutting force signal is intermittent, the 500 samples of the cutting processes are separately distributed in Figure 15, which is different from Test I in that the samples are distributed consecutively in Figure 11. However, the important statistical correlation between tool wear and the distribution of cutting force features still exists. Since the collection of cutting force signal is intermittent, the 500 samples of the cutting processes are separately distributed in Figure 15, which is different from Test I in that the samples are distributed consecutively in Figure 11. However, the important statistical correlation between tool wear and the distribution of cutting force features still exists.

Clustering and Tool Condition Identification
The dataset obtained from Test I is inputted into CAGS, where the noise coefficient is set to 0.2, the resolution coefficient is set to 0.5, the halo coefficient is set to 2, and the merge coefficient is set to 0.1. The clustering results are shown in Figure 16. The samples of 35 cuttings are finally partitioned into six clusters, that is, the samples of NO. 1 to NO. 7 are recognized as cluster I, the samples of NO. 8 to NO. 14 are recognized as cluster II, the samples of NO. 15 to NO. 16 are recognized as cluster III, the samples of NO. 17 to NO. 20 are recognized as cluster V, the samples of NO. 21 to NO. 27 are recognized as cluster IV, and the samples of NO. 28 to NO. 35 are recognized as cluster VI. In addition, some samples that deviate from the core samples are detected as noise points. For a clustering method, clustering labels are randomly generated and have no specific meaning. That is, tool wear conditions could not be obtained from clustering labels. Thus, most of the unsupervised methods are difficult to use for online monitoring.
(e) (f) Figure 14. Raw cutting force signals in Test III: (a) force in feed direction under initial wear, (b) force in vertical radial direction under initial wear, (c) force in feed direction under middle wear, (d) force in vertical radial direction under middle wear, (e) force in feed direction under severe wear, (f) force in vertical radial direction under severe wear.
Since the collection of cutting force signal is intermittent, the 500 samples of the cutting processes are separately distributed in Figure 15, which is different from Test I in that the samples are distributed consecutively in Figure 11. However, the important statistical correlation between tool wear and the distribution of cutting force features still exists.

Clustering and Tool Condition Identification
The dataset obtained from Test I is inputted into CAGS, where the noise coefficient is set to 0.2, the resolution coefficient is set to 0.5, the halo coefficient is set to 2, and the merge coefficient is set to 0.1. The clustering results are shown in Figure 16. The samples of 35 cuttings are finally partitioned into six clusters, that is, the samples of NO. 1 to NO. 7 are recognized as cluster I, the samples of NO. 8 to NO. 14 are recognized as cluster II, the samples of NO. 15 to NO. 16 are recognized as cluster III, the samples of NO. 17 to NO. 20 are recognized as cluster V, the samples of NO. 21 to NO. 27 are recognized as cluster IV, and the samples of NO. 28 to NO. 35 are recognized as cluster VI. In addition, some samples that deviate from the core samples are detected as noise points. For a clustering method, clustering labels are randomly generated and have no specific meaning. That is, tool wear conditions could not be obtained from clustering labels. Thus, most of the unsupervised methods are difficult to use for online monitoring. To address the above problem, Formulas (15) and (16) are used to reveal the robust information of tool wear conditions from cluster densities. The results are listed in Table  2, which shows the corresponding relationship between the actual tool wear conditions and the predicted wear conditions. It can be found that the density factor effectively matches VB. Therefore, almost all of the predicted wear conditions obtained by using successfully match the actual tool wear conditions obtained by VB.  To address the above problem, Formulas (15) and (16) are used to reveal the robust information of tool wear conditions from cluster densities. The results are listed in Table 2, which shows the corresponding relationship between the actual tool wear conditions and the predicted wear conditions. It can be found that the density factor War effectively matches VB. Therefore, almost all of the predicted wear conditions obtained by using War successfully match the actual tool wear conditions obtained by VB. In Test II, all samples with different cutting parameters of this test are fed into CAGS, where the noise coefficient is set to 0.2, the resolution coefficient is set to 1, the halo coefficient is set to 1, and the merge coefficient is set to 0.1. The clustering results are shown in Figure 17, where six clusters are discovered by CAGS. The samples of NO. 1, NO. 2, NO. 3, NO. 5, NO. 9, NO. 10 and NO. 11 are recognized as cluster I, the samples of NO. 6 and NO. 7 are recognized as cluster II, the samples of NO. 12 are recognized as cluster III, the samples of NO. 8 are recognized as cluster IV, the samples of NO. 4 are recognized as cluster V and VI classes. In this stage, less tool wear information than seen in Test I can be directly seen in the distribution of cutting force features, because of the influence of the change cutting parameters. Specifically, samples with the same tool wear condition (NO. 1 and NO. 6) may be distributed in different regions, and vice versa (NO. 7 and NO. 12). Thus, tool wear information is difficult to be separated from cutting parameters. However, as shown in Table 3, the cluster density can be used to indicate tool wear conditions as its insensitivity to cutting parameters.
In addition, the cluster density factor War is used to predict tool wear states under three different cutting parameters. It can be found that War provides fault tolerance to the whole TCM system, although an incorrect partition is obtained by CAGS. For example, the samples of NO. 4 are partitioned into cluster V and VI, which should be recognized as a single cluster. However, the War of cluster V and VI are 0.25 and 0.27, respectively. The monitoring of tool wear condition is unaffected. Appl. Sci. 2023, 13, 7226 17 of 21 Figure 17. Clustering results of Test II. In addition, the cluster density factor is used to predict tool wear states under three different cutting parameters. It can be found that provides fault tolerance to the whole TCM system, although an incorrect partition is obtained by CAGS. For example, the samples of NO. 4 are partitioned into cluster V and VI, which should be recognized as a single cluster. However, the of cluster V and VI are 0.25 and 0.27, respectively. The monitoring of tool wear condition is unaffected.
In this Test Ⅲ , samples of the turning process are fed into CAGS, where the noise coefficient is set to 0.2, the resolution coefficient is set to 1, the halo coefficient is set to 0.5, and the merge coefficient is set to 0.1. Clustering results are shown in Figure 18, where the five groups of samples are finally clustered into four classes. Based on clustering results, the of each cluster is calculated and listed in Table 4. The predicted wear conditions fully match with the actual tool wear conditions, although the of cluster III has a difference with the VB of NO. 3 and NO. 4. The results of this test demonstrate the robustness  In this Test III, samples of the turning process are fed into CAGS, where the noise coefficient is set to 0.2, the resolution coefficient is set to 1, the halo coefficient is set to 0.5, and the merge coefficient is set to 0.1. Clustering results are shown in Figure 18, where the five groups of samples are finally clustered into four classes. Based on clustering results, the War of each cluster is calculated and listed in Table 4. The predicted wear conditions fully match with the actual tool wear conditions, although the War of cluster III has a difference with the VB of NO. 3 and NO. 4. The results of this test demonstrate the robustness of the proposed TCM system, which is effective for variable cutting processes such as milling and turning. of the proposed TCM system, which is effective for variable cutting processes such as milling and turning.

Performance Comparison
In this paper, the prediction accuracy of the proposed method is verified by comparing the recognition accuracy with several state-of-the-art supervised methods, including BP neural network, Bayesian network and support vector machine (SVM). The verification is achieved based on the dataset of Test II. In order to realize quantitative analysis of prediction accuracy, the accuracy [29] of different models is calculated by comparing the predicted tool wear states with the actual tool wear states. As it is known that the training process is necessary in supervised algorithms, to compare the experimental results more objectively, three groups of data under cutting parameters A, B and C in test II are utilized as the training data, respectively. Correspondingly, the other two groups of data are taken as the test data. For each of the above supervised methods, optimum parameters are selected after many tests. The obtained results are shown in Tables 5-7, while the unsupervised method proposed in this paper can directly obtain the prediction results without any training, and the prediction accuracy is shown in Table 8. It can be seen that the proposed method outperforms the state-of-the-art supervised methods. For each test dataset in Tables 5-7, prediction accuracy varies with the training dataset, demonstrating that supervised monitoring methods are unstable with respect to cutting parameters. In addition, the prediction accuracy of our method for Test I and Test III is 94% and 100%, respectively.

Performance Comparison
In this paper, the prediction accuracy of the proposed method is verified by comparing the recognition accuracy with several state-of-the-art supervised methods, including BP neural network, Bayesian network and support vector machine (SVM). The verification is achieved based on the dataset of Test II. In order to realize quantitative analysis of prediction accuracy, the accuracy [29] of different models is calculated by comparing the predicted tool wear states with the actual tool wear states. As it is known that the training process is necessary in supervised algorithms, to compare the experimental results more objectively, three groups of data under cutting parameters A, B and C in test II are utilized as the training data, respectively. Correspondingly, the other two groups of data are taken as the test data. For each of the above supervised methods, optimum parameters are selected after many tests. The obtained results are shown in Tables 5-7, while the unsupervised method proposed in this paper can directly obtain the prediction results without any training, and the prediction accuracy is shown in Table 8. It can be seen that the proposed method outperforms the state-of-the-art supervised methods. For each test dataset in Tables 5-7, prediction accuracy varies with the training dataset, demonstrating that supervised monitoring methods are unstable with respect to cutting parameters. In addition, the prediction accuracy of our method for Test I and Test III is 94% and 100%, respectively. However, it is evident that worse results would be obtained by supervised methods, when taking the data of Test II as the training dataset to process the data of Test I or Test III. 75% -70% C 83% 53% - Table 7. Prediction accuracy of SVM on Test II.

Conclusions
In this paper, a cluster-based tool condition monitoring (TCM) system is established and validated. The proposition of a novel clustering method based on adjacent grids searching (CAGS) and a tool condition monitor based on cluster density factor are the key aspects. The main conclusions of this work are listed as follows.
(4) A cluster density factor is proposed to accomplish the TCM process, which can convert the cluster density into the value reflecting actual tool wear. Experimental results indicate that the factor is easy to obtain by using a stationary truncation coefficient T, which is set to 5.54 in all tests in this paper. This factor can be widely used in variable cutting processes. (5) From the perspective of experimental design, a full test set is conducted. A whole life-cycle wear experiment under the same milling condition is firstly carried out to simulate the TCM of cutting process of a large-scale workpiece. A tool wear experiment under variable milling conditions is then performed to verify the effectiveness of our method for machining a complex part with multiple operations. This is completely different from the composition of multiple independent cutting tests, since the cutting signals are mixed up as can be seen in Figure 13. In this experiment, the TCM system is blind to the switching of cutting parameters. Finally, a tool wear experiment under the same turning condition is conducted to test the robustness of the proposed system on a different cutting mode.
Further works of the proposed method include optimizing CAGS to provide more accurate density information by adapting higher dimensional feature space and constructing the common feature sets for more cutting processes such as drilling and ultra-precision milling.

Data Availability Statement:
The datasets generated and/or analyzed during the current study are available from the corresponding author on reasonable request.

Conflicts of Interest:
The authors declare no conflict of interest.