Method and system for predicting wear state of numerical control machining tool

By collecting cutting force and vibration signals in CNC machining, using random forest and support vector machine models, extracting the characteristic signals of wear precursors, and accurately predicting the tool wear state is solved, and the problem of tool wear affecting machining accuracy and efficiency is solved.

CN120190674APending Publication Date: 2025-06-24HUZHOU VOCATIONAL TECH COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510261660.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

In CNC machining, tool wear will affect processing accuracy, surface quality and efficiency, and it is difficult for the prior art to effectively predict tool wear status.

Method used

By collecting cutting force signals and vibration signals, using a random forest model to identify interference signals, extract wear precursor feature signals, and construct a support vector machine state prediction model for training to achieve tool wear status prediction.

Benefits of technology

It effectively reduces the variance of the model, improves the accuracy of wear occurrence prediction, can quickly extract the characteristic values ​​of wear data, and evaluate the importance of each feature.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120190674A_ABST
    Figure CN120190674A_ABST
Patent Text Reader

Abstract

The invention discloses a method and system for predicting the wear state of a numerical control machining tool. The method comprises the steps that S1, a cutting force signal and a vibration signal during numerical control machining of the tool are collected, and data cleaning is conducted; s2, performing interference signal identification on the signal after data cleaning by using a random forest model to obtain a wear precursor characteristic signal; s3, building a state prediction model by using a support vector machine, and training the state prediction model by using the wear precursor characteristic signal to obtain a trained tool wear state prediction model; and S4, performing state prediction on a cutting force signal and a vibration signal of a to-be-detected cutter by using the trained cutter wear state prediction model to complete numerical control machining cutter wear state prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of numerical control machining, and particularly to a method and system for predicting the wear state of a numerical control machining tool. Background Art

[0002] With the wide application of numerical control machining technology, the requirements for high-precision and high-efficiency machining are increasing continuously. Tool wear will affect machining accuracy, surface quality and machining efficiency. Analyzing the vibration signal of tool wear is an urgent problem to be solved in numerical control machining. Summary of the Invention

[0003] To solve the above technical problems, the present invention provides a method for predicting the wear state of a numerical control machining tool, and the method includes:

[0004] Step S1: Collect the cutting force signal and vibration signal during numerical control machining of the tool and perform data cleaning;

[0005] Step S2: Use a random forest model to identify interference signals in the signals after data cleaning, and obtain wear precursor characteristic signals;

[0006] Step S3: Use a support vector machine to construct a state prediction model, and use the wear precursor characteristic signals to train the state prediction model to obtain a trained tool wear state prediction model;

[0007] Step S4: Use the trained tool wear state prediction model to perform state prediction on the cutting force signal and vibration signal to be detected, and complete the prediction of the wear state of the numerical control machining tool.

[0008] Optionally, in step S1, the process of data cleaning specifically includes: using the find function in MATLAB to query for missing values in the cutting force signal and the vibration signal;

[0009] Using the KS test to detect outliers in the cutting force signal and the vibration signal without missing data.

[0010] Optionally, using the KS test to detect outliers in the cutting force signal and the vibration signal without missing data specifically includes: selecting one sample from each of the cutting force signal and the vibration signal without missing data to obtain two signal samples for the KS test;

[0011] If the test result conforms to the one-dimensional continuous distribution, the interference signal characteristic distribution of the two signal samples is obtained based on the KS test result;

[0012] If the test result does not conform to the one-dimensional continuous distribution, a box plot is used to process the interference signal characteristic distribution of the two signal samples;

[0013] Arrange the obtained interference signal feature distribution data in ascending order, and determine the outliers based on quartiles.

[0014] Optionally, in step S2, using a random forest model to identify interference signals in the signal after data cleaning, the content of obtaining the wear precursor feature signal specifically includes: calculating the sliding average value and sliding standard deviation of each window of the signal after data cleaning;

[0015] Calculate the volatility of the signal based on the sliding average value and the sliding standard deviation;

[0016] Extract the basic features of the signal after data cleaning in each window based on the obtained volatility of the signal;

[0017] Use the random forest model to calculate the basic features of each window to obtain the wear precursor positive signal.

[0018] The present invention also discloses a system for predicting the wear state of a numerically controlled machining tool, and the system includes:

[0019] A data acquisition and preprocessing module, which is used to acquire the cutting force signal and vibration signal during numerically controlled machining of the tool and perform data cleaning;

[0020] A signal data feature extraction module, which is used to use a random forest model to identify interference signals in the signal after data cleaning to obtain wear precursor feature signals;

[0021] A model construction and pre-training module, which is used to use a support vector machine to construct a state prediction model, and use the wear precursor feature signal to train the state prediction model to obtain a trained tool wear state prediction model;

[0022] A tool wear state prediction module, which is used to use the trained tool wear state prediction model to perform state prediction on the cutting force signal and vibration signal to be detected, and complete the prediction of the wear state of the numerically controlled machining tool.

[0023] Optionally, in the data acquisition and preprocessing module, the process of data cleaning specifically includes:

[0024] Use the find function in MATLAB to query the missing values of the cutting force signal and the vibration signal;

[0025] Use the KS test to detect outliers in the cutting force signal and the vibration signal without missing data.

[0026] Optionally, using the KS test to detect outliers in the cutting force signal and the vibration signal without missing data specifically includes:

[0027] Select one sample from the cutting force signal and the vibration signal without missing data respectively to obtain two signal samples for KS test;

[0028] If the test result conforms to the one-dimensional continuous distribution, the interference signal feature distribution of the two signal samples is obtained based on the KS test result;

[0029] If the test result does not conform to the one-dimensional continuous distribution, use a box plot to process the interference signal feature distribution of the two signal samples;

[0030] Arrange the obtained interference signal feature distribution data from small to large, and determine the outliers based on the quartiles.

[0031] Optionally, the working process of the signal data feature extraction module specifically includes:

[0032] Calculate the moving average and moving standard deviation of each window of the signal after data cleaning;

[0033] Calculate the volatility of the signal based on the moving average and the moving standard deviation;

[0034] Based on the obtained volatility of the signal, extract the basic features of the signal after data cleaning in each window;

[0035] Use the random forest model to calculate the basic features of each window to obtain the wear precursor prediction signal.

[0036] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. Due to the comprehensive results of cutting force and vibration signals, the variance of the model can be effectively reduced, and the accuracy of wear occurrence prediction is high; 2. It can process various wear feature data, and can quickly extract various feature values of wear data to find the effective information therein; 3. It can evaluate the wear features, and can give the importance degree of each feature to the model prediction result, and realize the effective extraction of features. Description of the Drawings

[0037] In order to more clearly illustrate the technical solutions of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0038] Figure 1 It is the Q-Q diagram of the cutting force signal (CF) and the vibration signal (CV) of the embodiment of the present invention, where Figure 1 (a) is the Q-Q diagram of the cutting force signal, Figure 1 (b) is the Q-Q diagram of the vibration signal;

[0039] Figure 2 This is the box plot of the vibration signal (CV) in the embodiments of the present invention. Among them, Figure 2 (a) is the box plot of the normal value of the vibration signal; Figure 2 (b) is the box plot of the vibration signal with outliers;

[0040] Figure 3 This is the box plot of the cutting force signal (CF) in the embodiments of the present invention. Among them, Figure 3 (a) is the box plot of the normal value of the cutting force signal, Figure 3 (b) is the box plot of the cutting force signal with interference signals;

[0041] Figure 4 This is the calculation result of the vibration signal (CV) and the cutting force signal (CF) in the embodiments of the present invention. Among them, Figure 4 (a) is the calculation result of the vibration signal; Figure 4 (b) is the calculation result of the cutting force signal;

[0042] Figure 5 This is the characteristic of the cutting force interference signal in the embodiments of the present invention. Among them, Figure 5 (a) is the single-sided spectrum of the cutting force interference signal, Figure 5 (b) is the statistical index of the cutting force interference signal;

[0043] Figure 6 This is the characteristic of the vibration interference signal in the embodiments of the present invention. Among them, Figure 6 (a) is the single-sided spectrum of the vibration interference signal, Figure 6 (b) is the statistical index of the vibration interference signal;

[0044] Figure 7 This is the method step diagram of a method for predicting the wear state of a CNC machining tool in the embodiments of the present invention. Detailed implementation manners

[0045] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0046] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation manners. The symbol descriptions used in this embodiment are shown in Table 1:

[0047] Table 1

[0048]

[0049] Example 1

[0050] A method for predicting the wear state of a numerically controlled machining tool, as Figure 7 shown, the method includes:

[0051] Step S1: Collect the cutting force signal and vibration signal during numerically controlled machining and perform data cleaning.

[0052] In step S1, the process of data cleaning specifically includes:

[0053] Use the find function in MATLAB to query for missing values in the cutting force signal and the vibration signal; use the KS test to detect outliers in the cutting force signal and the vibration signal without missing data, specifically including:

[0054] Select one sample from the cutting force signal and the vibration signal without missing data respectively to obtain two signal samples for KS test; if the test result conforms to the one-dimensional continuous distribution, obtain the interference signal characteristic distribution of the two signal samples based on the KS test result; if the test result does not conform to the one-dimensional continuous distribution, use the box plot to process the interference signal characteristic distribution of the two signal samples; arrange the obtained interference signal characteristic distribution data from small to large, and determine the outliers based on the quartiles.

[0055] The main requirement is to identify and analyze the interference signal and give the characteristics of the interference signal data in the two signals. However, due to the interference of various factors on the obtained signals, there is a lot of noise in the collected cutting force signal and vibration signal. If not processed, the noise signal will seriously affect the reliability of the detection result. Therefore, first consider starting from signal denoising, perform data cleaning on the signal, and remove outliers and missing values. To determine whether there is missing data, the find function in MATLAB can be used to find the relevant information of the non-zero elements in the matrix, and then the KS test can be used to test the nature of the data, and it is concluded that the data does not follow the normal distribution, so the box plot is used to determine and remove the outliers. On this basis, the obtained results are analyzed and processed in combination with descriptive statistical tools. The interference signal feature extraction can be carried out through a random forest model, and the average amplitude difference, variance, kurtosis, frequency, etc. are analyzed and calculated. The extracted features are used to train a random forest classification model through the TreeBagger function, and the trained model is tested to identify the time interval where the interference signal is located in the vibration and cutting force signals during a specific time period.

[0056] Data cleaning is performed on the interference signal to remove outliers and missing values. The find() function in MATLAB can be used to search for missing data. After searching the test data, no relevant information about non-zero elements in the matrix is found, indicating that the data has no missing values. The determination of outliers can be carried out by performing a normal distribution test on them. In this invention, the Kolmogorov-Smirnov test (usually referred to as the KS test) is used. The KS test is a non-parametric statistical method for the similarity between two independent distributions. In the single-sample case, the KS test compares the cumulative distribution function of the observed data with the cumulative distribution function specified by the null hypothesis. This method expects that in certain specific time intervals, the amplitude distribution under normal conditions will be compared with the amplitude distribution under fault conditions to determine whether there are significant differences. The maximum gap between the two is obtained through the KS test method to decide whether the interference signal data set conforms to this interval. The sum of the interference signal amplitudes in each interval is used as a feature vector to generate a sample. If the maximum gap is less than a certain critical value, the data set is considered to follow this theoretical distribution; otherwise, it does not conform to this theoretical distribution.

[0057] The theoretical distribution under normal conditions is generally a one-dimensional continuous distribution F, and the problem to be tested is

[0058]

[0059] In the formula, F n (x i ) and F(x i ) are the order statistics of the cutting force and vibration measurement value samples;

[0060] n is the number of samples

[0061] When performing the KS test on the cutting force and vibration signals, if the statistic satisfies the one-dimensional continuous distribution F

[0062] D→K = sup|B(F(x))|

[0063] If the statistic D is greater than the threshold value or the significance level (generally 0.05) is less than the preset value, it indicates that the two samples have different distributions; otherwise, it indicates that the two samples have the same distribution.

[0064] To better obtain the distribution of the cutting force (CF) interference signal and the vibration (CV) interference signal, two methods are respectively used to comprehensively evaluate the sample data, namely, the statistical analysis method to draw the Q-Q plot and the KS test to distinguish the distribution of the sample data. The abscissa of the Q-Q plot is the quantile of the standard normal sample, and the ordinate is the quantile of the CV sample data. The results are as Figure 1 (a) and Figure 1 (b) shown.

[0065] Calculate the moving average and moving standard deviation of each window of the signal after data cleaning; use the moving standard deviation as a direct measure of volatility, which is reflected in the calculated moving standard deviation sequence. Calculate the volatility of the signal based on the moving average and moving standard deviation; extract the basic features of the signal after data cleaning in each window based on the obtained volatility of the signal; use the basic features of each window of the random forest model for calculation to obtain the wear precursor feature signal. Most of the points in the Q-Q plots of cutting force and vibration seem to follow the trend line. However, the scatter plots are distributed in the middle and at both ends respectively, showing deviations. Combine the KS function for analysis, and the analysis results are shown in Tables 2 and 3.

[0066] Table 2

[0067]

[0068] Table 3

[0069]

[0070] As can be seen from Tables 2 and 3, multiple indicators reject the null hypothesis, so the sample data does not conform to the normal distribution.

[0071] For data that does not follow the normal distribution, the present invention adopts the box plot (Box-plot) data processing method. It is mainly used to reflect the characteristics of the original data distribution and can also be used for comparing the distribution characteristics of multiple groups of data. The drawing method of the box plot is to first find the maximum value, minimum value, median, and two quartiles of a set of data, then connect the two quartiles to draw a box, and then connect the maximum value and the minimum value to the box. The median is in the middle of the box. Through the box plot, the discrete distribution of the sample data can be visually obtained, and outliers can be identified.

[0072] Arrange the sample data in ascending order to obtain an ordered sequence Calculate its upper edge, upper quartile Q3, median M, lower quartile Q1, lower edge respectively, and find the outliers. The median M is denoted as

[0073]

[0074] Determination of outliers:

[0075] Sort the data in ascending order. The lower quartile Q1 is the value ranked 25%, and the upper quartile Q3 is the value ranked 75%. Then, those outside [Q1 - 1.5(Q3 - Q1), Q3 + 1.5(Q3 - Q1)] are outliers.

[0076] It can be written as

[0077] X1 > Q3 + K·(Q3 - Q1) < Q1 - K·(Q3 - Q1)

[0078] In the formula:

[0079] Q3 —— The upper quartile, the median of the interval [M, X n , indicating that 25% of the values in the sample are greater than Q3;

[0080] Q1 —— The lower quartile, the median of the interval [X1, M], indicating that 25% of the values in the sample are less than Q1;

[0081] K —— The step coefficient, take K = 1.5.

[0082] Use the boxplot function in MATLAB to generate the boxes of the cutting force (CF), vibration (CV) and the sample function box plots, and conduct inspections to identify outliers. The MATLAB running results are as Figure 2 and Figure 3 shown.

[0083] Step S2: Use the random forest model to identify the interference signals in the signals after data cleaning, and obtain the wear precursor characteristic signals, specifically including:

[0084] According to the signal sample function, after data processing, the characteristic values can be obtained.

[0085] Analysis of wear precursor characteristic signals. According to the signal characteristics when tool wear occurs, the wear precursor signals will increase cyclically over time. The time series can be used to analyze and identify the characteristics of the precursor signals. First, the same data processing method as in Problem 1 can be used to denoise the collected data, that is, to clean the data. The sliding window method is used to frame the specified time series, so as to calculate the statistical indicators within the frame, calculate the average value, standard deviation and energy of each window, etc. Then use the random forest algorithm to train the classification model. Import the vibration and cutting force data within the specified time period given in the question into the model, and perform the same data processing method as in Problem 1 on it for data training and feature extraction. Identify the time interval where the precursor characteristics are located in the vibration and cutting force signals within the specified time period, and then fill in the form for the content. Analyze the overall distribution of the cutting force signal and the vibration signal (information such as variance, mean, kurtosis, skewness, etc.). Real-time warning of precursor characteristic signals, predicting the probability of precursor characteristic signals. Use the sliding window algorithm to process the vibration and cutting force signal data. To capture the trend and volatility of the data, calculate the sliding average value and sliding standard deviation of each window. To quantify the intensity of the signal, calculate the energy of each window signal. The calculation results are as Figure 4, Figure (a) shows the calculation results of the vibration signal, and Figure (b) shows the calculation results of the cutting force signal. These statistics can capture the basic characteristics of the signal within each window and provide input features for subsequent model training. The data is screened as the training set, and the extracted moving average, moving standard deviation, and energy are used as features to train the support vector base model. For the pre-located sequence point data of each test data file, that is, the last data point, the trained support vector base model is used for prediction to evaluate the probability of the occurrence of the precursor feature signal at that moment.

[0086] From Figure 5 Some characteristics of the cutting force signal can be obtained:

[0087] Peak value: Figure (a) is the single-sided spectrogram of the signal. It can be seen from the figure that the signal has a large peak value in the low-frequency band and there are sharp peaks, which are the characteristics of the fault signal.

[0088] Main frequency component: The energy of the signal in Figure (a) is mainly concentrated in the low-frequency band, and the amplitude in the high-frequency band is very small, indicating that there is a vibration signal in the signal, which has little impact on the signal.

[0089] Mean value: From the results of Figure (b), it can be known that the mean value of the signal is 59.9691.

[0090] Standard deviation (Std): 80.4218, which gives the degree of dispersion of the signal.

[0091] Skewness: 4.8817, which gives the degree and direction of skewness of the signal data and obtains the asymmetry of the signal.

[0092] Kurtosis: Approximately 26.0055, which is the degree of sharpness and flatness of the peak. The signal distribution form protrudes and has sharp peak values.

[0093] From Figure 6 Some characteristics of the vibration interference signal can be obtained:

[0094] Peak value: Figure (a) is the single-sided spectrogram of the signal. It can be seen from the figure that the signal has a large peak value in the low-frequency band and there are sharp peaks, which are the characteristics of the fault signal.

[0095] Main frequency component: The energy of the signal in Figure (a) is mainly concentrated in the low-frequency band, and the amplitude in the high-frequency band is very small, indicating that there is a vibration signal in the signal, which has little impact on the signal.

[0096] Mean value: From Figure (b), it can be known that the mean value of the signal is 77.9585

[0097] Standard deviation (Std): 90.7159, and the signal shows a discrete state.

[0098] Skewness: 3.1238, the signal data has a certain skew.

[0099] Kurtosis: 12.9982, the signal has sharp peaks.

[0100] Through the above analysis, compared with the normal signal, the mean and variance of the interference signal have mutations, so its external characteristics can be obtained from the interference signal.

[0101] The extraction of interference signal characteristics is the basis for ensuring the effectiveness of data science and machine learning models. To identify the interference signals in vibration signals and cutting force signals within a specific time interval, amplitude, noise level,

[0102] energy and frequency analysis can be used. Through these characteristics, a model is constructed, and then the trained model is tested to find the continuous time points with the output category of interference signals, which are defined as the interference occurrence time point and the end time point, to distinguish normal signals from precursor feature signals, so as to provide early warnings in practical applications.

[0103] In this example, the random forest is used to process the data, and then MATLAB is used to analyze the characteristics of interference signals in different time intervals.

[0104] Through the above analysis, the time intervals where the vibration interference signal and the cutting force interference signal are located within a specific time period are identified, and the intervals where the earliest 5 interference signals occur are obtained.

[0105] Step S3: Use a support vector machine to construct a state prediction model, and use the wear precursor feature signal to train the state prediction model to obtain a trained tool wear state prediction model.

[0106] The extraction and processing of precursor feature signals first perform data cleaning, then data preprocessing, construct a moving average feature characterized by a time frame, and construct a classification model. Using the data obtained from testing, the time domain waveforms, moving averages, moving standard deviations, and energies of vibration (CV) and cutting force (CF) signals are extracted.

[0107] Through the above analysis, obtaining these characteristic indicators helps to identify signal mutations, influencing factors, and development trends, providing theoretical guidance for risk prediction.

[0108] The extracted features are imported into the random forest model for training, and the trained random forest model is used to predict the test data and mark the precursor features. The vibration and cutting force data in the measured data are imported into the model, and data processing, data training, and feature extraction are performed on them. The time intervals where the precursor features in the vibration and cutting force signals within a specific time period are located are identified. According to the analysis results, the precursor feature time intervals are obtained.

[0109] Read the attachment data in MATLAB software and extract the characteristic signals.

[0110] To capture the trend and volatility of the data, calculate the moving average and moving standard deviation of each window. To quantify the signal intensity, calculate the energy of the signal in each window. Through the calculation results, statistical features such as moving average, moving standard deviation, and energy can be obtained. The changes in these features help to capture abnormal signals, and the information of signal mutation can be obtained from the energy. The change characteristics of the moving average are mainly used to smooth the original data, reduce the random fluctuations of the data, and observe the trend of the data more clearly, playing an optimization role. The moving standard deviation feature reflects the degree of fluctuation or dispersion of the data in each window. Energy represents the degree of signal activity.

[0111] These statistics can capture the basic features of the signal within each window and provide input features for subsequent model training. Screen the data as the training set, and use the extracted moving average, moving standard deviation, and energy as features to train the random forest model. For the pre-located sequence point data of each test data file, that is, the last data point, use the trained random forest model to make predictions and evaluate the probability of the appearance of the precursor feature signal at that moment.

[0112] Use the support vector machine (SVM) to solve the probability problem of the early warning model. The support vector machine is a powerful classification algorithm, suitable for small to medium-sized data sets, and especially suitable for high-dimensional data. In the extraction of precursor feature signals, it is necessary to predict the probability of the appearance of the precursor feature signal at the last time point in each test data, which can be effectively processed by SVM.

[0113] Use the fitcsvm function in MATLAB to train the SVM model. Tune the parameters of the SVM. Repeat the process of data import and feature calculation for each data. Calculate the feature values of the last data point of each test data. Use the trained SVM model to make predictions for the last data point of each test data. Obtain the predicted probability or decision function value to get the prediction result.

[0114] For the pre-located sequence point data of each test data file, that is, the last data point, use the trained support vector basis model to make predictions, evaluate the probability of the appearance of the precursor feature signal at that moment, and record and process the results.

[0115] Step S4: Use the trained tool wear state prediction model to perform state prediction on the detected cutting force signal and vibration signal, and complete the prediction of the tool wear state in numerical control machining.

[0116] Embodiment 2

[0117] The data acquisition and preprocessing module is used to collect the cutting force signal and vibration signal during CNC machining tool cutting and perform data cleaning. The process of data cleaning specifically includes:

[0118] Use the find function in MATLAB to query for missing values in the cutting force signal and the vibration signal; use the KS test to detect outliers in the cutting force signal and the vibration signal without missing data, specifically including:

[0119] Select one sample from the cutting force signal and the vibration signal without missing data respectively to obtain two signal samples for KS test; if the test result conforms to the one-dimensional continuous distribution, obtain the interference signal feature distribution of the two signal samples based on the KS test result; if the test result does not conform to the one-dimensional continuous distribution, use the box plot to process the interference signal feature distribution of the two signal samples; arrange the obtained interference signal feature distribution data from small to large, and determine the outliers based on the quartiles.

[0120] The main requirement is to identify and analyze the interference signal and give the characteristics of the interference signal data in the two signals. However, due to the interference of various factors on the obtained signal, there is a lot of noise in the collected cutting force signal and vibration signal. If not processed, the noise signal will seriously affect the reliability of the detection result. Therefore, first consider starting from signal denoising, perform data cleaning on the signal, remove outliers and missing values. To determine whether there are missing data, the find function in MATLAB can be used to find the relevant information of the non-zero elements in the matrix, and then the KS test can be used to test the nature of the data. It is concluded that the data does not follow the normal distribution, so the box plot is used to determine and remove the outliers. On this basis, the obtained results are analyzed and processed in combination with descriptive statistical tools. The interference signal feature extraction can be carried out through the random forest model, and the average amplitude difference, variance, kurtosis, frequency, etc. are analyzed and calculated. The extracted features are used to train the random forest classification model through the TreeBagger function, and the trained model is tested to identify the time interval where the interference signal is located in the vibration and cutting force signals within a specific time period.

[0121] Data cleaning is performed on the interference signal to remove outliers and missing values. The find() function in MATLAB can be used to search for missing data. After searching the given data in the question, no relevant information about non-zero elements in the matrix is found, so it is determined that there is no missing data. The determination of outliers can be carried out by performing a normal distribution test on them. In this invention, the Kolmogorov-Smirnov test (usually called the KS test) is used. The KS test is a non-parametric statistical method for the similarity between two independent distributions. In the single-sample case, the KS test compares the cumulative distribution function of the observed data with the cumulative distribution function specified by the null hypothesis. This method expects that in certain specific time intervals, the amplitude distribution under normal conditions will be compared with the amplitude distribution under fault conditions to determine whether there are significant differences. The maximum gap between the two is obtained through the KS test method to determine whether the interference signal data set conforms to this interval. The sum of the interference signal amplitudes in each interval is used as a feature vector to generate a sample. If the maximum gap is less than a certain critical value, it is considered that the data set follows this theoretical distribution; otherwise, it does not conform to this theoretical distribution.

[0122] The theoretical distribution under normal conditions is generally a one-dimensional continuous distribution F, and the problem to be tested is

[0123]

[0124] In the formula, F n (x i ), F(x i ) —— The order statistics of two samples;

[0125] n —— The number of samples

[0126] When performing the KS test on two samples, if the statistic satisfies the one-dimensional continuous distribution F

[0127] D→K = sup|B(F(x))|

[0128] If the statistic is greater than the threshold value or the significance level (generally 0.05) is less than the preset value, it indicates that the two samples have different distributions; otherwise, it indicates that the two samples have the same distribution.

[0129] To better obtain the distribution of the cutting force (CF) interference signal and the vibration (CV) interference signal, two methods are respectively used to comprehensively evaluate the sample data, namely, the statistical analysis method to draw the Q-Q plot and the KS test to discriminate the distribution of the sample data. The abscissa of the Q-Q plot is the quantile of the standard normal sample, and the ordinate is the quantile of the CV sample data. The results are as Figure 1 (a) and Figure 1 (b) shown.

[0130] Calculate the moving average and moving standard deviation of the signal for each window after data cleaning; calculate the volatility of the signal based on the moving average and moving standard deviation; extract the basic features of the signal for each window after data cleaning based on the obtained volatility of the signal; use the basic features of each window of the random forest model for calculation to obtain the positive signal of wear precursors. In the Q-Q plots of cutting force and vibration, most points seem to follow the trend line. However, the scatter plots are distributed in the middle and at both ends respectively, showing deviations. Combining with the KS function for analysis, the analysis results are shown in Tables 4 and 5.

[0131] Table 4

[0132]

[0133] Table 5

[0134]

[0135] As can be seen from Tables 4 and 5, multiple indicators reject the null hypothesis, so the sample data does not conform to the normal distribution.

[0136] For data that does not follow the normal distribution, the present invention adopts the box-plot data processing method. It is mainly used to reflect the characteristics of the original data distribution and can also be used for comparing the distribution characteristics of multiple groups of data. The drawing method of the box plot is to first find the maximum value, minimum value, median, and two quartiles of a set of data, then connect the two quartiles to draw a box, and then connect the maximum value and the minimum value to the box. The median is in the middle of the box. Through the box plot, the discrete distribution of the sample data can be visually obtained, and outliers can be identified.

[0137] Arrange the sample data in ascending order to obtain an ordered sequence Calculate its upper edge, upper quartile Q3, median M, lower quartile Q1, lower edge respectively, and find the outliers. The median M is denoted as

[0138]

[0139] Determination of outliers:

[0140] Sort the data in ascending order. The lower quartile Q1 is the value ranked 25%, and the upper quartile Q3 is the value ranked 75%. Then, those outside [Q1 - 1.5(Q3 - Q1), Q3 + 1.5(Q3 - Q1)] are outliers.

[0141] It can be written as

[0142] X1 > Q3 + K·(Q3 - Q1) < Q1 - K·(Q3 - Q1)

[0143] In the formula:

[0144] Q3 - upper quartile, the median of the interval [M, X n , indicating that 25% of the values in the sample are greater than Q3;

[0145] Q1 - lower quartile, the median of the interval [X1, M], indicating that 25% of the values in the sample are less than Q1;

[0146] K - step coefficient, take K = 1.5.

[0147] Use the boxplot function in MATLAB to generate the box plots of cutting force (CF), vibration (CV), and the sample function, and perform tests to identify outliers. The MATLAB running results are as Figure 2 and Figure 3 shown.

[0148] The signal data feature extraction module is used to identify interference signals in the signals after data cleaning using a random forest model, and obtain the wear precursor feature signals, specifically including:

[0149] According to the signal sample function, after data processing, the characteristic values can be obtained.

[0150] Analysis of precursor feature signals. According to the test data information, the precursor signals will increase cyclically over time. Time series can be used to analyze and identify the characteristics of precursor signals. First, the same data processing method as in Question 1 can be followed to denoise the collected data, that is, to clean the data. The sliding window method is used to frame the specified time series, thereby calculating the statistical indicators within the frame, such as calculating the mean, standard deviation, and energy of each window. Then, the random forest algorithm is used to train the classification model. Import the vibration and cutting force data within the specific time period given in the question into the model, and perform the same data processing method as in Question 1 for data training and feature extraction. Identify the time interval where the precursor features are located in the vibration and cutting force signals within the specific time period, and then fill in the form for the content. Analyze the overall distribution of the cutting force signal and vibration signal (information such as variance, mean, kurtosis, skewness, etc.). Real-time warning of precursor feature signals, predicting the probability of precursor feature signals. The sliding window algorithm is used to process the vibration and cutting force signal data. To capture the trend and volatility of the data, calculate the sliding mean and sliding standard deviation of each window. To quantify the intensity of the signal, calculate the energy of the signal for each window. These statistics can capture the basic characteristics of the signal within each window and provide input features for subsequent model training. Screen the data as the training set, use the extracted sliding mean, sliding standard deviation, and energy as features to train the support vector base model. For the pre-located sequence point data of each test data file, that is, the last data point, use the trained support vector base model for prediction to evaluate the probability of the precursor feature signal appearing at that moment.

[0151] From Figure 5 Some characteristics of the cutting force signal can be obtained:

[0152] Peak value: Figure (a) is the single-sided frequency spectrum diagram of the signal. It can be seen from the figure that the signal has a large peak value in the low-frequency band and there are sharp peaks, which are the characteristics of the fault signal.

[0153] Main frequency component: The energy of the signal in Figure (a) is mainly concentrated in the low-frequency band, and the amplitude in the high-frequency band is very small, indicating that there are vibration signals in the signal and they have little impact on the signal.

[0154] Mean value: From the result of Figure (b), it can be known that the mean value of the signal is 59.9691.

[0155] Standard deviation (Std): 80.4218, which gives the degree of dispersion of the signal.

[0156] Skewness: 4.8817, which gives the degree and direction of skewness of the signal data and obtains the asymmetry of the signal.

[0157] Kurtosis: approximately 26.0055, which reflects the flatness of the peak. The signal distribution has a prominent peak with sharp peak values.

[0158] From Figure 6 Some characteristics of the vibration interference signal can be obtained:

[0159] Peak value: Figure (a) shows the single-sided frequency spectrum of the signal. It can be seen from the figure that the signal has a relatively large peak value in the low-frequency band and sharp peaks appear, which are characteristics of the fault signal.

[0160] Main frequency component: The energy of the signal in Figure (a) is mainly concentrated in the low-frequency band, and the amplitude in the high-frequency band is very small, indicating that there are vibration signals in the signal, but they have little impact on the signal.

[0161] Mean: As can be seen from Figure (b), the mean value of the signal is 77.9585

[0162] Standard deviation (Std): 90.7159, indicating that the signal shows a discrete state.

[0163] Skewness: 3.1238, indicating that the signal data has a certain skew.

[0164] Kurtosis: 12.9982, indicating that the signal has sharp peak values.

[0165] Through the above analysis, compared with the normal signal, both the mean and variance of the interference signal have mutations. Therefore, the external characteristics can be obtained from the interference signal.

[0166] The extraction of interference signal characteristics is the basis for ensuring the effectiveness of data science and machine learning models. To identify interference signals in vibration signals and cutting force signals within a specific time interval, it can be achieved through amplitude, noise level,

[0167] energy, and frequency analysis. Based on these characteristics, a model is constructed, and then the trained model is tested to find the continuous time points with the output category of interference signals, which are defined as the start time point and end time point of interference occurrence, so as to distinguish normal signals from precursor feature signals and provide early warnings in practical applications.

[0168] In this example, the random forest is used to process the data, and then MATLAB is used to analyze the characteristics of interference signals in different time intervals.

[0169] Through the above analysis, the time intervals where vibration interference signals and cutting force interference signals are located within a specific time period are identified, and the intervals where the earliest 5 interference signals occur are obtained.

[0170] The model construction and pre-training module is used to construct a state prediction model using a support vector machine and train the state prediction model with wear precursor feature signals to obtain a trained tool wear state prediction model.

[0171] Based on the analysis of precursor feature signals, a model is established and solved. Real-time early warning of precursor feature signals, predicting the probability of precursor feature signals. The sliding window algorithm is used to process vibration and cutting force signal data. To capture the trend and volatility of the data, the sliding average and sliding standard deviation of each window are calculated. To quantify the intensity of the signal, the energy of the signal in each window is calculated. These statistics can capture the basic characteristics of the signal within each window and provide input features for subsequent model training. The data is screened as the training set, and the extracted sliding average, sliding standard deviation, and energy are used as features to train the support vector base model. For the pre-positioned sequence point data of each test data file, that is, the last data point, the trained support vector base model is used for prediction to evaluate the probability of the occurrence of precursor feature signals at that moment.

[0172] The extraction and processing of precursor feature signals first perform data cleaning, then data preprocessing, construct moving average features characterized by time frames, and construct a classification model. Using the data obtained from testing, the time-domain waveforms, moving averages, moving standard deviations, and energies of vibration (CV) and cutting force (CF) signals are extracted.

[0173] Through the above analysis, obtaining these characteristic indicators helps to identify signal mutations, influencing factors, and development trends, providing theoretical guidance for risk prediction.

[0174] The extracted features are imported into the random forest model for training, and the trained random forest model is used to predict the test data and mark the precursor features. The vibration and cutting force data in the measured data are imported into the model, and data processing is performed on them for data training and feature extraction to identify the time interval where the precursor features are located in the vibration and cutting force signals within a specific time period. According to the analysis results, the precursor feature time interval is obtained.

[0175] Read the attachment data in MATLAVB software to extract feature signals.

[0176] To capture the trend and volatility of the data, the sliding average and sliding standard deviation of each window are calculated. To quantify the strength of the signal, the energy of the signal in each window is calculated. Statistical features such as the sliding average, sliding standard deviation, and energy can be obtained from the calculation results. The changes in these features help to capture abnormal signals, and the information of signal mutations can be obtained from the energy. The change feature of the sliding average is mainly used to smooth the original data, reduce the random fluctuations of the data, and observe the trend of the data more clearly, playing an optimization role. The sliding standard deviation feature reflects the degree of fluctuation or dispersion of the data in each window. Energy represents the degree of signal activity.

[0177] These statistics can capture the basic features of the signal within each window and provide input features for subsequent model training. The data is screened as the training set, and the extracted sliding average, sliding standard deviation, and energy are used as features to train the random forest model. For the pre-located sequence point data of each test data file, that is, the last data point, the trained random forest model is used for prediction to evaluate the probability of the appearance of the precursor feature signal at that moment.

[0178] The support vector machine (SVM) is used to solve the probability problem of the early warning model. The support vector machine is a powerful classification algorithm suitable for small to medium-sized data sets and is especially suitable for high-dimensional data. In the extraction of precursor feature signals, it is necessary to predict the probability of the appearance of the precursor feature signal at the last time point in each test data, which can be effectively processed by SVM.

[0179] The fitcsvm function in MATLAB is used to train the SVM model. The parameters of the SVM are tuned. The process of data import and feature calculation is repeated for each data file. The feature values of the last data point of each file are calculated. The trained SVM model is used to predict the last data point of each test data. The predicted probability or decision function value is obtained to get the prediction result.

[0180] For the pre-located sequence point data of each test data file, that is, the last data point, the trained support vector base model is used for prediction to evaluate the probability of the appearance of the precursor feature signal at that moment, and the results are recorded and processed.

[0181] The tool wear state prediction module is used to use the trained tool wear state prediction model to predict the state of the cutting force signal and vibration signal to be detected, and complete the prediction of the tool wear state in numerical control machining.

[0182] The embodiments described above are only descriptions of the preferred embodiments of the present invention and do not limit the scope of the present invention. Without departing from the spirit of the design of the present invention, various deformations and improvements made by those of ordinary skill in the art to the technical solutions of the present invention shall fall within the protection scope determined by the claims of the present invention.

Claims

1. A method for predicting the wear state of a CNC machining tool, characterized in that: The method comprises: Step S1, collecting cutting force signals and vibration signals of CNC machining tools and performing data cleaning; Step S2, using a random forest model to identify interference signals from the signals after data cleaning to obtain wear precursor characteristic signals; Step S3, using a support vector machine to build a state prediction model, and using the wear precursor characteristic signal to train the state prediction model to obtain a trained tool wear state prediction model; Step S4: Use the trained tool wear state prediction model to perform state prediction on the cutting force signal and vibration signal to be detected, and complete the CNC machining tool wear state prediction.

2. The method for predicting the wear state of a CNC machining tool according to claim 1, characterized in that: In step S1, the data cleaning process specifically includes: Use the find function in MATLAB to query missing values ​​of the cutting force signal and the vibration signal; The KS test is used to detect outliers on the cutting force signal and the vibration signal without missing data.

3. The method for predicting the wear state of a CNC machining tool according to claim 2, characterized in that: The KS test is used to detect outliers on the cutting force signal and the vibration signal without missing data, specifically including: Select one sample from each of the cutting force signal and the vibration signal without missing data to obtain two signal samples for KS test; If the test result conforms to the one-dimensional continuous distribution, the interference signal characteristic distribution of the two signal samples is obtained based on the KS test result; If the test result does not conform to the one-dimensional continuous distribution, the box plot is used to process the two signal samples to interfere with the characteristic distribution of the signal; The obtained interference signal characteristic distribution data are arranged from small to large, and the outliers are determined based on the quartiles.

4. The method for predicting the wear state of a CNC machining tool according to claim 1, characterized in that: In step S2, the interference signal is identified by using the random forest model on the signal after data cleaning, and the content of the wear precursor characteristic signal obtained specifically includes: Calculate the sliding mean and sliding standard deviation of each window of the signal after data cleaning; calculating the volatility of the signal based on the sliding mean and the sliding standard deviation; Based on the obtained volatility of the signal, extract the basic features of the signal after data cleaning in each window; The basic features of each window are calculated using the random forest model to obtain a positive wear precursor signal.

5. A system for predicting the wear state of a CNC machining tool, the system being used to implement the method according to any one of claims 1 to 4, characterized in that the system include: Data acquisition and preprocessing module, used to collect cutting force signals and vibration signals of CNC machining tools and perform data cleaning; The signal data feature extraction module is used to identify interference signals from the signals after data cleaning using a random forest model to obtain wear precursor feature signals; A model building and pre-training module is used to build a state prediction model using a support vector machine, and train the state prediction model using a wear precursor characteristic signal to obtain a trained tool wear state prediction model; The tool wear state prediction module is used to use the trained tool wear state prediction model to perform state prediction on the cutting force signal and vibration signal to be detected, and complete the CNC machining tool wear state prediction.

6. The system for predicting the wear state of CNC machining tools according to claim 5, characterized in that: In the data collection and preprocessing module, the data cleaning process specifically includes: Use the find function in MATLAB to query missing values ​​of the cutting force signal and the vibration signal; The KS test is used to detect outliers on the cutting force signal and the vibration signal without missing data.

7. The system for predicting the wear state of CNC machining tools according to claim 6, characterized in that: The KS test is used to detect outliers on the cutting force signal and the vibration signal without missing data, specifically including: Select one sample from each of the cutting force signal and the vibration signal without missing data to obtain two signal samples for KS test; If the test result conforms to the one-dimensional continuous distribution, the interference signal characteristic distribution of the two signal samples is obtained based on the KS test result; If the test result does not conform to the one-dimensional continuous distribution, the box plot is used to process the two signal samples to interfere with the characteristic distribution of the signal; The obtained interference signal characteristic distribution data are arranged from small to large, and the outliers are determined based on the quartiles.

8. The system for predicting the wear state of CNC machining tools according to claim 5, characterized in that: The workflow of the signal data feature extraction module specifically includes: Calculate the sliding mean and sliding standard deviation of each window of the signal after data cleaning; calculating the volatility of the signal based on the sliding mean and the sliding standard deviation; Based on the obtained volatility of the signal, extract the basic features of the signal after data cleaning in each window; The basic features of each window are calculated using the random forest model to obtain a positive wear precursor signal.