Online Tool Wear Monitoring Method Based on Attention Recurrent Neural Network
The attention-based RNN model for tool wear monitoring addresses inaccuracies in existing methods by providing precise and adaptive tool wear prediction, improving machining efficiency and reducing downtime.
Patent Information
- Application Number
- CN202210917959.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-01
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-08-01
AI Technical Summary
The prior art is difficult to accurately monitor the wear degree of tool, resulting in the failure of processing accuracy or the untimely replacement of tool, which can lead to waste, affecting production efficiency and downtime.
The method based on attention recurrent neural network is adopted to preprocess and feature extraction of tool wear data, combine wavelet packet transformation and noise reduction, and use attention mechanism and gated recurrent neural network for training to establish a tool wear monitoring model to realize online monitoring.
Improves the accuracy and prediction accuracy of tool wear monitoring, reduces downtime, and improves processing efficiency and productivity.
Smart Images

Figure CN115392292B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of on-line monitoring of tool wear in machine tools, and more particularly to an on-line monitoring method for tool wear based on an attention recurrent neural network. Background Art
[0002] With the growing demand for high-precision parts in industries such as aerospace, automotive, and precision machinery, machining technology plays a key role in modern manufacturing. The degree of automation in modern manufacturing is constantly increasing, and under the drive of industrial big data, intelligent manufacturing will become an important trend for future development. Intelligent manufacturing requires real-time monitoring of the production process. In the machining process of products, whether the tool is in a healthy working state has an important impact on the machining quality of workpieces. When the tool wear exceeds the failure standard, if the tool cannot be replaced in time, it will be difficult to meet the machining accuracy requirements for the surface quality of the machined workpiece. However, if the tool is replaced too early, it will cause waste and reduce productivity. Therefore, accurate monitoring of the tool wear degree can bring high machining efficiency and improve the accuracy of products in production and processing. According to statistics, in April 2018, in the United States alone, the value of scrapped tools was as high as $200 million. In addition, approximately 20% of the downtime of machine tools is caused by tool failures. The data statistics by W. Koening in Germany show that the introduction of an intelligent tool condition monitoring system in the CNC machining process can increase the production efficiency by 10% - 60%, and can reduce the downtime caused by tool failures by 75%. Therefore, it is of great significance to achieve accurate tool wear monitoring. Summary of the Invention
[0003] Aiming at the deficiencies of the existing technologies in the research field of on-line monitoring of tool wear, the present invention proposes an on-line monitoring method for tool wear based on an attention recurrent neural network. This method includes preprocessing the data set and on-line monitoring of the tool wear. This method can extract the features of the tool wear data and perform hierarchical extraction in a hierarchical manner to keep the real signal in the tool wear process intact; the tool wear signal data is a sequence with a time series relationship. The model uses a recurrent neural network, which can fully consider the characteristics of historical information data and assign weights during training; the model introduces an attention mechanism, which can capture the data features at each moment in detail, enabling the feature micro amounts of the real wear signal to be mined and noticed. The model has high prediction accuracy, good generalization and adaptive capabilities. The tool remaining life prediction model proposed in this paper has strong robustness, high prediction accuracy rate, and fast learning speed, and has good popularization and application value in milling machining.
[0004] To achieve the above object, the present invention provides an on-line monitoring method for tool wear based on an attention recurrent neural network, which includes the following steps:
[0005] S1. Collect the tool wear data during the machining process of the machine tool and create an original data set: Continuously collect the signal data during the tool cutting process at equal time intervals, record the machining parameter information such as the feed rate and sampling frequency, and organize the data as the original data set;
[0006] S2. Preprocess the original tool wear data set, including eliminating invalid data and denoising by wavelet packet transform:
[0007] S21. Initially eliminate invalid data. Use the third quartile method to determine the positions of the data points to be eliminated. Arrange the data recorded by the sensor during the tool feed and retraction processes in ascending order of value, divide the data into four equal parts, and the corresponding third cut-off point is the position of the data point to be eliminated;
[0008] S22. Denoise the detailed invalid data. Use wavelet transform to extract the time and frequency characteristics of the signal data. The wavelet packet transform calculation formula is as follows:
[0009]
[0010]
[0011] Among them, ψ(·) represents the wavelet function and has: g k represents any function in the wavelet function space W j and has k is an arbitrary integer, f(t) is any function in the space W j , is the scaling function, α is the scaling factor, τ is the displacement, t is the current time, a k is the scaling coefficient, and dt is the integral symbol;
[0012] The scaling function calculation formula is as follows:
[0013]
[0014] Among them, h k is any function in the space V j formed during the calculation of the wavelet function in the real number domain, and k is an arbitrary integer;
[0015] S3. Input the preprocessed tool wear data set into the tool wear monitoring model based on the attention recurrent neural network for iterative training;
[0016] S31. Establish a tool wear monitoring model. The tool wear monitoring model includes an attention mechanism feature extraction module and a gated recurrent neural network monitoring module;
[0017] S32. Train the tool wear monitoring model: Obtain the preprocessed experimental data set, which includes the wear data during the tool cutting process and its corresponding wear values. Divide the entire offline data set into a training set and a validation set according to a ratio, and input them into the tool wear monitoring model based on the attention recurrent neural network for training. The data passes through the attention mechanism feature extraction module and the recurrent neural network monitoring module in sequence to complete the training process, and output the training results and the monitoring accuracy;
[0018] S33. For the stored memory S at time t of the recurrent neural network monitoring module t There is:
[0019] S t = σ(UX t + WS t-1 )
[0020] Among them, σ represents the softmax activation function, U and W represent weights, and X t represents the true input at the current moment, and S t-1 represents the stored memory at the previous moment;
[0021] S34. For the output O at time t of the recurrent neural network monitoring module t There is:
[0022] O t = VS t + C
[0023] Among them, V represents the weight, and C represents the output at the previous state moment;
[0024] S35. For the model prediction output moment y(t) of the recurrent neural network monitoring module, there is:
[0025] y(t) = σ(O t );
[0026] S4. Judge whether the training results meet the requirements: Calculate the error between the monitoring value and the actual value of the model. When the experimental error is less than the threshold specified by the current machining condition, save the trained tool wear monitoring model and apply it to the online tool wear detection and analysis; Calculate the error of the tool wear monitoring model based on the attention gated recurrent neural network. Select the root mean square error RMSE and the mean absolute error MAE as the model evaluation indexes respectively, and there is:
[0027]
[0028] Among them, RMSE represents the calculation result of the root mean square error, y m represents the mth tool wear prediction value, represents the mth tool wear true value, and M represents the number of data in the validation set;
[0029] Analyze the accuracy of the tool prediction results. The mean absolute error MAE is as follows:
[0030]
[0031] The ranges of both the root mean square error RMSE and the mean absolute error MAE are in [0, +∞). When the tool wear monitoring value coincides with the true tool wear value, both RMSE and MAE are 0 at this time; when the values of RMSE and MAE are larger, it is necessary to adjust the network structure of the model to obtain small difference data;
[0032] S5. Online collect the wear signals during the tool machining process for online monitoring: Load the tool wear monitoring model saved in step S3, and sequentially perform the invalid data elimination and wavelet packet transform on the sensor signal data collected online, and then input it into the saved model for wear monitoring to obtain the tool wear monitoring value.
[0033] Furthermore, in the attention mechanism feature extraction module in step S31, for the input data vector, this mechanism multiplies the data vector by a matrix to obtain 3 sub-vectors, namely the Q vector, the K vector, and the V vector.
[0034] Furthermore, the Q vector, the K vector, and the V vector input into the multi-head attention mechanism undergo linear transformation through a linear layer, and the 3 sub-vectors are input into the scaled dot-product attention mechanism, and after multiple calculations, multi-head calculation is realized.
[0035] Furthermore, the attention mechanism network in step S3 extracts features from the denoised experimental data, inputs the input data features into the gated recurrent neural network model, and establishes a non-linear mapping relationship between the tool wear degradation eigenvalue and the tool wear value through the RNN layer, and outputs the tool wear monitoring value.
[0036] Preferably, the threshold specified in the current machining condition in step S4 is calculated according to the current model monitoring accuracy, machining parameters, and the required accuracy of machining.
[0037] Preferably, the tool wear monitoring model in step S31 is output through a custom fully connected layer. The custom fully connected layer includes two liner connection layers, one ReLU activation function layer, and one Sigmoid activation function layer, and specifically includes the following steps:
[0038] S311. After the data passes through a liner connection layer, it is processed by the ReLU activation function layer;
[0039] S312. Input the data into the second liner connection layer;
[0040] It is output after being processed by the Sigmoid activation function layer.
[0041] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0042] Before the tool wear monitoring is carried out by this method, through the elimination of invalid data and the noise reduction processing of wavelet transform, the integrity of the experimental data is stronger; this method has high accuracy for tool wear monitoring, small result deviation, low dispersion degree, good model fitting, and has strong generalization performance and robustness; the present invention provides a more convenient way for the use and maintenance of numerical control machine tools. Operators can enter the tool change link in advance through this tool wear monitoring method, which improves the machining efficiency of the machine tool. Description of the Drawings
[0043] Figure 1 It is a simplified flowchart of the steps of the on-line tool wear monitoring method based on the attention recurrent neural network provided by the present invention;
[0044] Figure 2 It is a schematic diagram of invalid data in the tool cutting signal data of the embodiment of the present invention;
[0045] Figure 3a and Figure 3b They are respectively color and black-and-white schematic diagrams of invalid data in the feed and retraction processes processed by the third quartile method in the embodiment of the present invention;
[0046] Figure 4a and Figure 4b They are respectively schematic diagrams of the cutting force signal and energy spectrum in the X direction in the embodiment of the present invention;
[0047] Figure 5a and Figure 5b They are respectively visualization schematic diagrams of the original signal data and noise-reduced signal data of the cutting force in the X direction in the embodiment of the present invention;
[0048] Figure 6 It is a schematic diagram of the structure of the multi-head attention mechanism in the embodiment of the present invention;
[0049] Figure 7 It is a schematic diagram of the RNN network structure in the embodiment of the present invention;
[0050] Figure 8a and Figure 8b They are respectively color and black-and-white curve graphs of the tool wear monitoring value and the true value taking the C1 data set as an example in the embodiment of the present invention;
[0051] Figure 9a and Figure 9b They are respectively color and black-and-white curve graphs of the tool wear monitoring value and the true value taking the C4 data set as an example in the embodiment of the present invention;
[0052] Figure 10a and Figure 10b This is the color and black - and - white curve graph of the tool wear monitoring value and the true value in the embodiment of the present invention taking the C6 dataset as an example. Detailed implementation manners
[0053] The following further elaborates on this application with reference to the attached drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the relevant invention and not to limit the invention. Additionally, it should be noted that for the sake of convenience in description, only the parts related to the relevant invention are shown in the drawings. Without conflict, the embodiments in this application and the features in the embodiments can be combined with each other.
[0054] The present invention provides an on - line tool wear monitoring method based on an attention recurrent neural network, which includes the following steps:
[0055] S1. Collect tool wear data during the machining process of the machine tool and make an original dataset: Continuously collect signal data during the tool cutting process at equal time intervals, record the machining parameter information such as the feed speed and the sampling frequency, and organize the data as the original dataset;
[0056] S2. Pre - process the original dataset of tool wear, including eliminating invalid data and denoising by wavelet packet transform:
[0057] S21. Initially eliminate invalid data. Use the third - quartile method to determine the positions of the data points to be eliminated. The data recorded by the sensor during the tool feed - in and feed - out processes are arranged in ascending order of value, and the data is evenly divided into four parts. The corresponding third truncation point is the position of the data point to be eliminated;
[0058] S22. Denoise the detailed invalid data. Use wavelet transform to extract the time and frequency characteristics of the signal data. The wavelet packet transform calculation formula is as follows:
[0059]
[0060]
[0061] Among them, ψ(·) represents the wavelet function and has: g k represents an arbitrary function in the wavelet function space W j and has k is an arbitrary integer, f(t) is an arbitrary function in the space W j and is the scaling function, α is the scale factor, τ is the displacement amount, t is the current moment, a k is the scaling coefficient, and dt is the integral symbol;
[0062] The scaling function calculation formula is as follows:
[0063]
[0064] Among them, h k is an arbitrary function in the space V j formed during the calculation process of the wavelet function in the real number domain, and k is an arbitrary integer;
[0065] S3. Input the preprocessed tool wear data set into the tool wear monitoring model based on the attention recurrent neural network for iterative training;
[0066] S31. Establish a tool wear monitoring model, which includes an attention mechanism feature extraction module and a gated recurrent neural network monitoring module;
[0067] S32. Train the tool wear monitoring model: Obtain the preprocessed experimental data set, which includes the wear data during the tool cutting process and its corresponding wear value. Divide the entire offline data set into a training set and a validation set according to the ratio of 8:2, and input it into the tool wear monitoring model based on the attention recurrent neural network for training. The data passes through the attention mechanism feature extraction module and the recurrent neural network monitoring module in sequence to complete the training process, and output the training result and monitoring accuracy;
[0068] S33. For the storage memory S at time t of the recurrent neural network monitoring module t There is:
[0069] S t =σ(UX t +WS t-1 )
[0070] Among them, σ represents the softmax activation function, U and W represent weights, X t represents the true input at the current moment, and S t-1 represents the storage memory at the previous moment;
[0071] S34. For the output O at time t of the recurrent neural network monitoring module t There is:
[0072] O t =VS t +C
[0073] Among them, V represents the weight, and C represents the output at the previous state moment;
[0074] S35. For the model prediction output moment y(t) of the recurrent neural network monitoring module, there is:
[0075] y(t)=σ(O t );
[0076] S4. Determine whether the training result meets the requirements: Calculate the error between the monitored value and the actual value of the model. When the experimental error is less than the threshold specified by the current processing condition, save the trained tool wear monitoring model and apply it to the online tool wear detection and analysis; Calculate the error of the tool wear monitoring model based on the attention gated recurrent neural network, and select the root mean square error RMSE and the mean absolute error MAE as the model evaluation indicators respectively, and there is:
[0077]
[0078] where RMSE represents the calculation result of the root mean square error, y m represents the predicted value of the tool wear at the mth time, represents the true value of the tool wear at the mth time, and M represents the number of data in the validation set;
[0079] Analyze the accuracy of the tool prediction result. The mean absolute error MAE has:
[0080]
[0081] The ranges of both the root mean square error RMSE and the mean absolute error MAE are in [0, +∞). When the tool wear monitoring value coincides with the true value of the tool wear, both RMSE and MAE are 0 at this time; When the values of RMSE and MAE are larger, it is necessary to adjust the network structure of the model to obtain small difference data;
[0082] S5. Online collect the wear signal during the tool processing and conduct online monitoring: Load the tool wear monitoring model saved in step S3, sequentially perform the invalid data elimination and wavelet packet transform on the sensor signal data collected online as described in step S2, and then input it into the saved model for wear monitoring to obtain the tool wear monitoring value.
[0083] Next Figure 1 The following shows an online tool wear monitoring method based on an attention recurrent neural network disclosed by the present invention, which includes the following steps:
[0084] S1. Collect the tool wear data during the machining process of the machine tool and create an original data set: Analyze the publicly available tool wear data set, the milling tool wear data set of PHM2010. The data set contains the wear signal data of each feed during the complete life cycle of 6 tools (C1, C2, C3, C4, C5, C6), and the flank wear values (VB values) of 3 tools (C1, C4, C6) corresponding to the wear signal data. The complete life cycle of each tool is 315 feeds. The data recorded for each feed includes three-dimensional data of cutting force signals (x, y, z), three-dimensional data of vibration signals (x, y, z), and one-dimensional data of acoustic emission signals, for a total of seven dimensions. Approximately 200,000 groups of data are recorded each time. Table 1 shows the machining parameters of the milling machining experimental data set used.
[0085] Cutting parameters Spindle speed (r / min) Feed rate (mm / min) Milling width (Y) (mm) Cutting depth (Z) (mm) Value 10400 1555 0.125 0.200
[0086] Table 1
[0087] S2. Preprocess the original tool wear data set, including removing invalid data and denoising using wavelet packet transform:
[0088] S21. As Figure 2 shown, the amount of data recorded during each feed process is huge, and invalid data will be generated during the feed-in and feed-out processes. For preliminary removal of invalid data, the third quartile method is used to determine the positions of the data points to be removed. The data recorded by the sensor during the feed-in and feed-out processes are arranged in ascending order of numerical value, and this section of data is evenly divided into four parts. The corresponding third cut-off point is the position of the data point to be removed. By using the third quartile method, the feed-in data points to be removed are found. As Figure 3a and Figure 3b shown, the blue line segments represent the data that can be used for subsequent feature extraction, and the red line segments represent the invalid data generated during the feed-in and feed-out processes. This part of the data can be removed.
[0089] S22. For detailed denoising of invalid data, wavelet transform is used to extract the time and frequency features of the signal data. The wavelet packet transform calculation formula is as follows:
[0090]
[0091]
[0092] where ψ(·) represents the wavelet function and has: g k represents any function in the wavelet function space W j and has k is any integer, f(t) is any function in the space W j and is a scaling function, α is the scale factor, τ is the displacement, t is the current time, a k is the scaling coefficient, and dt is the integral symbol;
[0093] The calculation formula of the scaling function is as follows:
[0094]
[0095] where h k is an arbitrary function in the space V formed during the calculation of the wavelet function in the real number domain j and k is an arbitrary integer.
[0096] Perform energy spectrum analysis on the cutting force signal data in the X direction during the 10th tool feed of the first tool C1 in the data set, as Figure 4a and Figure 4b shown. This method uses 5-layer wavelet transform, and the basis function of the wavelet is "sym8". According to the energy spectrum analysis of the signal data, wavelet transform is performed on the data to remove non-signal data such as noise. The original cutting force signal and the noise-reduced signal in the x-axis direction are as Figure 5a and Figure 5b shown.
[0097] S3. Input the preprocessed tool wear data set into the tool wear monitoring model based on the attention recurrent neural network for iterative training:
[0098] S31. Establish a tool wear monitoring model, which consists of an attention mechanism feature extraction module and a gated recurrent neural network monitoring module; for the input data vector, the attention mechanism feature extraction module multiplies the data vector by a matrix to obtain 3 sub-vectors, namely the Q (Query) vector, the K (Key) vector, and the V (Value) vector; then, it is passed into the multi-head attention mechanism. The Q vector, the K vector, and the V vector are linearly transformed through a linear layer, and the 3 sub-vectors are passed into the scaled dot-product attention mechanism. After i calculations, i is called the head in the attention mechanism; finally, the results calculated by the scaled dot-product attention mechanism are concatenated, and the concatenated results are linearly transformed through a linear layer to obtain the final result. The tool wear monitoring model is output through a custom fully connected layer, and the custom fully connected layer includes two liner connection layers, a ReLU activation function layer, and a Sigmoid activation function layer, which specifically includes the following steps:
[0099] S311. After the data passes through a liner connection layer, it is processed by the ReLU activation function layer;
[0100] S312. Pass the data into the second liner connection layer;
[0101] S313. Process and output through the Sigmoid activation function layer.
[0102] The network structure of the multi - head attention mechanism is as Figure 6 shown.
[0103] S32. Train the tool wear monitoring model: Obtain the pre - processed experimental data set. The data set includes the wear data during the tool cutting process and the corresponding wear values. Divide the entire offline data set into a training set and a validation set according to the ratio of 8:2, and input it into the tool wear monitoring model based on the attention recurrent neural network for training. The data passes through the attention mechanism feature extraction module and the recurrent neural network monitoring module in sequence to complete the training process, and output the training results and monitoring accuracy.
[0104] S33. For the stored memory S at time t of the recurrent neural network monitoring module t there is:
[0105] S t = σ(UX t + WS t-1 )
[0106] where σ represents the softmax activation function, U and W represent weights, X t represents the true input at the current moment, and S t-1 represents the stored memory at the previous moment;
[0107] S34. For the output O at time t of the recurrent neural network monitoring module t there is:
[0108] O t = VS t + C
[0109] where V represents the weight and C represents the output at the previous state moment;
[0110] S35. For the model prediction output moment y(t) of the recurrent neural network monitoring module, there is:
[0111] y(t)= σ(O t );
[0112] The structure of the recurrent neural network is as Figure 7 shown.
[0113] The above step S3 is an important inventive point of the present invention, mainly reflected in that the attention mechanism network extracts features from the denoised experimental data, inputs the data features of the current input into the gated recurrent neural network model, establishes a non - linear mapping relationship between the tool wear degradation feature value and the tool wear value through the RNN layer, and outputs the tool wear monitoring value.
[0114] S4. Determine whether the training result meets the requirements: Calculate the error between the monitored value and the actual value of the model. When the experimental error is less than the threshold specified for the current machining condition, save the trained tool wear monitoring model and apply it to the online tool wear detection and analysis. The threshold is calculated based on the current model monitoring accuracy, machining parameters, and the required accuracy of machining; for the calculation of the error of the tool wear monitoring model based on the attention gated recurrent neural network, the root mean square error RMSE and the mean absolute error MAE are respectively selected as the model evaluation indicators, and there are:
[0115]
[0116] Among them, RMSE represents the calculation result of the root mean square error, y m represents the predicted value of the tool wear at the m-th position, represents the true value of the tool wear at the m-th position, and M represents the number of data in the validation set;
[0117] Analyze the accuracy of the tool prediction result. The mean absolute error MAE has:
[0118]
[0119] The ranges of both the root mean square error RMSE and the mean absolute error MAE are in [0, +∞). When the tool wear monitoring value is exactly the same as the true value of the tool wear, RMSE and MAE are both 0 at this time; when the values of RMSE and MAE are larger, it indicates that the training accuracy of the model is poor, and the network structure of the model needs to be adjusted to obtain smaller difference data;
[0120] S5. Online collect the wear signals during the tool machining process for online monitoring: Load the tool wear monitoring model saved in step S3, and sequentially perform the invalid data elimination and wavelet packet transform described in step S2 on the sensor signal data collected online, and then input it into the saved model for wear monitoring to obtain the tool wear monitoring value.
[0121] Table 2 shows the analysis of the prediction accuracy of this method, where RMSE / MAE respectively represent the root mean square error function and the mean absolute error function. In the field of deep learning, the value of the loss function is generally used to evaluate the accuracy of the model. Figure 8a and Figure 8b 、Figure 9a and Figure 9b 、 Figure 10a and Figure 10bThey respectively represent the curves of the monitored values and the true values obtained by using the above method with C1, C4, and C6 data as the experimental data. Table 2 shows the accuracy of the calculation results, and the last column "average" represents the average accuracy of the three experiments. By analyzing the data results in the table, it can be seen that the calculation results of the present invention can be well applied to the monitoring calculation of actual tool wear.
[0122] No. C1 C4 C6 Average RMSE 1.771 3.125 2.305 2.400 MAE 0.588 0.944 0.860 0.797
[0123] Table 2
[0124] In summary, the monitoring results of this case prove that an online tool wear monitoring method based on an attention recurrent neural network has good monitoring effects.
[0125] Finally, it should be noted that the above embodiments are only used to illustrate rather than limit the technical solutions of the present invention. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: the present invention can still be modified or equivalently replaced, and any modification or partial replacement without departing from the spirit and scope of the present invention shall be covered by the scope of the claims of the present invention.
Claims
1. An online tool wear monitoring method based on an attention recurrent neural network, characterized in that, It includes the following steps: S1. Collect the tool wear data during the machining process of the machine tool and make the original data set: Continuously collect the signal data during the tool cutting process at equal time intervals, record the machining parameter information such as the feed speed and sampling frequency, and organize the data as the original data set; S2. Preprocess the original data set of tool wear, including eliminating invalid data and denoising by wavelet packet transform: S21. Initially eliminate invalid data. Use the third quartile method to determine the position of the data points to be eliminated. The data recorded by the sensor during the tool feed and retraction processes are arranged in ascending order of numerical value, and the data are evenly divided into four parts. The corresponding third cut-off point is the position of the data points to be eliminated; S22. Denoise the detailed invalid data. Use wavelet transform to extract the time and frequency characteristics of the signal data. The calculation formula of wavelet packet transform is as follows: where, ψ(·) represents a wavelet function and there is: g k represents an arbitrary function in the wavelet function space W j and there is k is an arbitrary integer, f(t) is an arbitrary function in the space W j and is a scaling function, α is a scaling factor, τ is a displacement, t is the current time, a k is a scaling coefficient; The calculation formula of the scaling function is as follows: where h k is an arbitrary function in the space V j formed during the calculation process of the wavelet function in the real number domain, and k is an arbitrary integer; S3. Input the preprocessed tool wear data set into the tool wear monitoring model based on the attention recurrent neural network for iterative training; S31. Establish a tool wear monitoring model. The tool wear monitoring model includes an attention mechanism feature extraction module and a gated recurrent neural network monitoring module; S32. Train the tool wear monitoring model: Obtain the preprocessed experimental data set. The data set includes the wear data during the tool cutting process and its corresponding wear value. Divide the entire offline data set into a training set and a validation set according to a certain proportion, and input it into the tool wear monitoring model based on the attention recurrent neural network for training. The data passes through the attention mechanism feature extraction module and the recurrent neural network monitoring module in sequence to complete the training process, and output the training result and monitoring accuracy; S33. For the stored memory S of the recurrent neural network monitoring module at time t t There is: S t = σ(UX t + WS t-1 ) Among them, σ represents the softmax activation function, U and W represent weights, and X t represents the true input at the current moment, and S t-1 represents the stored memory at the previous moment; S34. For the output O of the recurrent neural network monitoring module at time t t There is O t = VS t + C Among them, V represents the weight, and C represents the output at the previous state moment; For the model prediction output moment y(t) of the recurrent neural network monitoring module, there is: y(t) = σ(O t ) S4. Judge whether the training result meets the requirements: Calculate the error between the monitoring value and the actual value of the model. When the experimental error is less than the threshold specified by the current machining condition, save the trained tool wear monitoring model and apply it to the online tool wear detection and analysis; Calculate the error of the tool wear monitoring model based on the attention gated recurrent neural network. Select the root mean square error RMSE and the mean absolute error MAE as the model evaluation indexes respectively, and there is: Among them, RMSE represents the calculation result of the root mean square error, and y m represents the predicted value of tool wear for the m-th tool, represents the true value of tool wear for the m-th tool, and M represents the number of data in the validation set; Analyze the accuracy of the tool prediction result. The mean absolute error MAE has: The ranges of both the root mean square error RMSE and the mean absolute error MAE are in [0, +∞). When the tool wear monitoring value coincides with the true tool wear value, both RMSE and MAE are 0 at this time; When the values of RMSE and MAE are larger, it is necessary to adjust the network structure of the model to obtain smaller difference data; S5. Online collect the wear signal during the tool machining process for online monitoring: Load the tool wear monitoring model saved in step S3, sequentially perform the elimination of invalid data and wavelet packet transform on the online collected sensor signal data as described in step S2, and then input it into the saved model for wear monitoring to obtain the tool wear monitoring value.
2. The on-line tool wear monitoring method based on an attention recurrent neural network according to claim 1, characterized in that In the attention mechanism feature extraction module in step S31, for the input data vector, the mechanism multiplies the data vector by a matrix to obtain three sub-vectors, namely the Q vector, the K vector, and the V vector.
3. The online tool wear monitoring method based on an attention recurrent neural network according to claim 2, wherein The Q vector, K vector, and V vector passed into the multi-head attention mechanism are linearly transformed through a linear layer, and the three sub-vectors are passed into the scaled dot-product attention mechanism. After multiple calculations, multi-head calculation is achieved.
4. The online tool wear monitoring method based on an attention recurrent neural network according to claim 1, characterized in that In step S3, the attention mechanism network extracts features from the denoised experimental data, inputs the input data features into the gated recurrent neural network model, establishes a non-linear mapping relationship between the tool wear degradation eigenvalue and the tool wear value through the RNN layer, and outputs the tool wear monitoring value.
5. The on-line tool wear monitoring method based on an attention recurrent neural network according to claim 1, characterized in that The threshold specified by the current machining condition in step S4 is calculated based on the current model monitoring accuracy, machining parameters, and the required accuracy of machining.
6. The on-line tool wear monitoring method based on an attention recurrent neural network according to claim 1, characterized in that The tool wear monitoring model in step S31 is output through a custom fully connected layer. The custom fully connected layer includes two linear connection layers, one ReLU activation function layer, and one Sigmoid activation function layer, and specifically includes the following steps: S311. After the data passes through a linear connection layer, it is processed through the ReLU activation function layer. S312. The data is passed into the second linear connection layer. S313. It is processed and output through the Sigmoid activation function layer.
Citation Information
Patent Citations
Unmanned aerial vehicle reconnaissance target evolution rule prediction method based on circular neural network
CN108460481A
Electrocardiosignal positioning method based on an attention recurrent neural network
CN109871742A