A single-source domain generalization method for milling cutter wear monitoring with discontinuous characteristic constraints
Through the single-source domain generalization method of milling cutter wear monitoring constrained by discontinuous characteristics, the spatial attention mechanism and generation module are used to improve the generalization and interpretability of the milling cutter wear monitoring model, solve the problem of insufficient generalization of deep learning models when working conditions change, and achieve accurate positioning and monitoring under unknown working conditions.
Patent Information
- Application Number
- CN202311695581.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-08
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2043-12-08
AI Technical Summary
Existing deep learning models lack generalization in milling cutter wear monitoring, especially when working conditions change, it is difficult to establish the correlation between historical data and non-occurring data to be monitored, which limits the application effect of the model.
A single-source domain generalization method for milling cutter wear monitoring based on discontinuous feature constraints is proposed. The spatial attention mechanism is used to extract discontinuous physical features, a generation module is constructed to enhance feature diversity, and the consistency of generated features is constrained by standard trend samples to establish the association relationship between the source domain and the target domain.
The generalization ability and interpretability of the model under unknown working conditions are improved, and the accurate positioning and precise monitoring of the wear status of the milling cutter are achieved.
Smart Images

Figure CN117620774B_ABST
Abstract
Description
Technical field
[0001] The present invention relates to the technical field of milling cutter wear monitoring in milling processing, and in particular to a single-source domain generalization method for milling cutter wear monitoring constrained by discontinuous characteristics. [Background Technology]
[0002] Cutting tools are the key executive components of machine tools, known as the teeth of the manufacturing industry, and occupy an irreplaceable and critical position in the industry. Cutting tools are in a state of constant wear during the cutting process. When the wear is large, it deteriorates product quality and equipment performance, increases manufacturing costs, and even causes safety accidents. Real-time and accurate monitoring of tool wear has always been an important issue in the manufacturing industry. With the development of manufacturing technology and changes in production models (personalized, small-batch customized production), the structure and materials of cutting tools and the working conditions they face have become more complex and changeable, which undoubtedly poses a challenge to the generalization of tool wear status monitoring methods.
[0003] Data-driven tool wear monitoring, represented by deep learning, is one of the key technologies in current intelligent manufacturing. Domestic invention patent CN115446663B discloses a tool wear state monitoring method and application based on a physics-guided deep learning network; domestic invention patent CN111325112B discloses a tool wear state monitoring method based on a deep gated recurrent unit neural network; domestic invention patent CN115971970A discloses a milling cutter wear monitoring method based on a multi-parameter guided spatial attention mechanism. By using multiple parameters such as process parameters, milling cutter structure parameters, and sampling rate to determine the model structure parameters, the non-continuous characteristics in the tool wear monitoring signal can be adaptively captured, and the constructed deep model can be made interpretable. The above methods have explored milling cutter wear monitoring technology based on deep learning, but lack consideration of the model's effectiveness when the working conditions change. In order to improve the monitoring accuracy under variable working conditions, domestic invention patent CN115351601A discloses a tool wear monitoring method based on transfer learning; domestic invention patent CN117001420A discloses a variable working condition tool wear state monitoring method based on VWC-Transformer transfer learning. However, the model based on transfer learning needs to introduce data from the target domain (the tool to be detected) during the training process. Therefore, this type of method needs to update the model in real time by obtaining online data of the monitored object in actual processing, which is difficult to adapt to the offline monitoring needs in actual processing scenarios. Domestic invention patent CN114102260B discloses a variable working condition tool wear state monitoring method driven by mechanism-data fusion. This method first uses the spindle acceleration signal and the spindle motor current signal to reconstruct the cutting force, and uses the reconstructed cutting force and detailed working condition parameters as input to train the deep model. This method achieves improved monitoring accuracy under variable working conditions, but the process is cumbersome and its applicability to unknown working conditions needs further verification.
[0004] The most fundamental requirement for a tool wear monitoring model is that a model trained on cutting process data from a single tool can be applied to other tools of the same model under identical or similar working conditions. However, errors in the workpiece and tool installation position are inherent in the cutting process. Furthermore, even tools of the same model and batch can exhibit geometric errors during the manufacturing process, leading to inconsistencies in geometric parameters such as the tool edge line and helix angle, and making it difficult to achieve complete uniformity in physical properties. In other words, data distribution varies for each cutting task. Therefore, improving the generalization of deep models requires addressing the data distribution differences under different working conditions. In recent years, domain generalization technology has attracted considerable attention from deep learning researchers. Its purpose is to train models using existing data and test them on data from an unknown distribution. Domain generalization technology can be categorized as multi-source domain generalization and single-source domain generalization, distinguished by whether the samples used to train the model are from a single source domain. The application of multi-source domain generalization raises two key issues: 1. How large a difference in data distribution must exist between multiple source domains for the model to generalize? 2. How many source domains are needed to ensure generalization across target domains? Existing generalization techniques for single-source domains primarily enhance signals or increase signal diversity through adversarial generation. However, these enhancement methods primarily establish mathematical relationships between source and generated signals and are not guaranteed to be effective in unknown target domains.
[0005] In summary, existing deep learning-based tool wear monitoring models generally have the problem of insufficient generalization, especially the difficulty in establishing the correlation between historical data (source domain) and the data to be monitored (target domain) that has not occurred. This limits the practical application of related technologies. By studying the discontinuous physical characteristics of the milling cutter during cutting, adaptively extracting the discontinuous characteristics through deep learning, and generating feature diversity based on the extracted high-purity features, it is of great significance to improve the generalization of the model and promote the application of deep learning methods in the field of tool wear monitoring. [Summary of the invention]
[0006] The present invention aims to address the shortcomings of deep learning in milling cutter wear monitoring, especially the difficulty in ensuring the generalization of the model when the working conditions change. A single-source domain generalization method for milling cutter wear monitoring with discontinuous characteristic constraints is proposed. The method first extracts the discontinuous physical characteristics in the monitoring signal through a spatial attention mechanism, and then generates diversity features based on the extracted discontinuous physical characteristics through a constructed diversity generation module; at the same time, the generated features are constrained by consistency through the constructed standard trend samples. The designed model can realize the adaptive extraction and diversity generation of discontinuous physical characteristics in the signal, establish a consistency relationship between the source domain and the target domain, and improve the generalization ability of the model under unknown working conditions.
[0007] To achieve the above purpose, the technical solution provided by the present invention is:
[0008] A single-source domain generalization method for milling cutter wear monitoring with discontinuous feature constraints is characterized by comprising a single-source domain generalization model for milling cutter wear monitoring with discontinuous feature constraints; the model comprises a spatial attention module MS, a generation module MG, a feature extraction module MF, a classification module MC and a standard trend sample S T ; The S T is a vector {-1,…,1,0,…,0,…,-1,…,1,0,…,0}, which is composed of N sub-vectors {-1,…,1,0,…,0} of length l arranged in sequence; the sub-vector {-1,…,1,0,…,0} is periodically composed of a monotonically increasing vector t1{-1,…,1} from -1 to 1 and a continuous 0 vector t0{0,…,0}; the sum of the lengths of t0 and t1 is Where n is the number of tool teeth; the length of t1 Wherein Ap is the axial cutting depth in mm, α is the tool helix angle in degrees, D is the tool diameter in mm, and π is the circumference of a circle; l is the monitoring signal length corresponding to one rotation of the tool; the method comprises the following steps:
[0009] S1: Obtain the wear process monitoring signal with the milling cutter wear stage label under the source domain working condition A, preprocess and spatially align the signal, and perform sample interception with a length of N×l to obtain the source domain sample set data_S;
[0010] S2: MS training:
[0011] S21: After randomly shuffling the order of the samples in data_S, the samples are input into MS in batches according to the number of batches. The spatial attention weights w_att1 with discontinuous characteristics corresponding to the samples are extracted.
[0012] S22: Use w_att1 to perform attention weighting on the input sample to obtain the weighted feature w_s;
[0013] S23: Input w_s into the sequentially connected MF and MC to obtain the output classification probability;
[0014] S24: Perform cross entropy calculation on the classification probability and the wear stage label corresponding to the input sample, and optimize MS, MF and MC through back propagation;
[0015] S25: After repeating S21 to S24 for a specified number of rounds, the trained MS_trained is obtained;
[0016] S3: MF, MC training:
[0017] S31: After randomly shuffling the order of the samples in data_S, the samples are input into MS_trained in batches according to the number of batches. The spatial attention weights w_att2 with discontinuous characteristics corresponding to the samples are extracted.
[0018] S32: Use w_att2 to perform attention weighting on the input sample to obtain the weighted feature w_S;
[0019] S33: Input w_S to MG to obtain the generated weight w_g with discontinuous characteristics, and combine w_g and the S T Perform similarity L g1 measure;
[0020] S34: Use w_g to weight the input sample to obtain the generated feature w_G;
[0021] S35: Input w_S and w_G into MF at the same time to obtain the source domain feature fea_S and the generated domain feature fea_G respectively;
[0022] S36: Diversity L between fea_S and fea_G g2 To measure, use L g1 +β×L g2 MG is optimized as the generation module loss;
[0023] S37: Input fea_S and fea_G into MC, and output the source domain classification probability and the generated domain classification probability respectively;
[0024] S38: Perform cross entropy operations on the source domain classification probability and the generated domain classification probability with the wear stage label corresponding to the input sample to obtain the source domain loss L S and the generation domain loss L G ;
[0025] S39: Using L S +L G Optimize MF and MC simultaneously;
[0026] S310: After repeating S31 to S39 for a specified number of rounds, the trained MF_trained and MC_trained are obtained;
[0027] S4, preprocess and spatially align the monitoring signal of the milling cutter wear process to be monitored under the target domain working condition B, and intercept the sample according to the length of N×l to obtain the target domain sample data_T; input data_T into the sequentially connected MS_trained, MF_trained, and MC_trained to output the tool wear status monitoring result.
[0028] Furthermore, the MG structure is a sequentially connected structure with a step size and a kernel size of k. pool The average pooling layer, the convolution layer with both input and output channels being 1, the AdaIN layer, the convolution layer with both input channels being 2 and output channels being 4, the convolution layer with both input channels being 4 and output channels being 1, the transposed convolution layer with both input channels being 4 and output channels being 1, and the Tanh activation layer; the step size of the convolution layer is 1 and the kernel size is k; the step size of the transposed convolution layer is k pool , the kernel size is k-1; Where n is the number of teeth of the milling cutter; the AdaIN layer is defined as:
[0029]
[0030] In the formula, x represents the feature of the previous layer, y represents the noise that obeys the normal distribution, σ represents the mean, and μ represents the standard deviation;
[0031] The L in S33 g1 pass Calculate, where n S is the number of samples in data_S; L in S36 g2 pass Calculate, where k(fea_S i ,fea_G i )=exp(-||fea_S i -fea_G i || 2 / 2γ 2 ), γ is the kernel width; β in S36 is any integer in [-20, -1];
[0032] The Ap comes from the source domain working condition A.
[0033] Furthermore, the MS structure is a sequentially connected average pooling layer, convolution layer, batch normalization layer, ReLU activation layer, and element repetition layer; the step size and kernel size of the average pooling layer are both k poolThe kernel size of the convolution layer is k, the step size and input and output channels are 1; the repetition multiple of the element repetition layer is k pool , the repeated dimension is the last dimension; the MF is a WDCNN structure; the MC is a fully connected layer.
[0034] Furthermore, the preprocessing in S1 and S4 refers to first performing zero-mean processing on the original signal; then performing Fourier low-pass filtering on the signal, and the cutoff frequency of the Fourier low-pass filtering is 10 times the tooth-pass frequency in the source domain working condition A; then slicing the signal with a length of (N+1)×l and normalizing it to [-1,1]; the spatial alignment in S1 and S4 refers to taking the minimum value of the first l points of the sliced signal as the starting point and intercepting a signal with a length of N×l; the tool structure and spindle speed of the source domain working condition A and the target domain working condition B must be consistent; the weighting in S22, S32 and S34 refers to multiplying the weight and the elements at the same position of the input sample, and then adding the obtained product to the elements at the same position of the input sample.
[0035] Compared with the prior art, the beneficial effects of the present invention are as follows: the present invention utilizes process parameters, tool structure parameters and signal sampling rate to quantify the discontinuous characteristics in the milling cutter processing process, and constructs an attention module based on this to achieve adaptive extraction of discontinuous characteristics and suppress signal segments that are not related to tool wear; in addition, a generation module is constructed based on the discontinuous characteristics to enhance the diversity of source domain signal features; at the same time, a standard trend sample that meets the discontinuous characteristics is constructed to constrain the consistency between the generated features and the real signal. The method proposed in the present invention can establish consistency constraints on source domain features, generated features and target domain features. It enables the model to accurately locate key signal segments under different working conditions, improves the generalization and interpretability of the model, and is of great significance to promoting the application of deep learning methods in the field of tool wear state identification under unknown working conditions.
Brief Description of the Drawings
[0036] Figure 1 It is a flow chart of the method of the present invention;
[0037] Figure 2 Schematic diagram of the structure of the spatial attention module of the present invention;
[0038] Figure 3 It is a schematic structural diagram of the generation module of the present invention;
[0039] Figure 4 is a schematic diagram of a standard trend sample of the present invention;
[0040] Figure 5 This is a statistical diagram of the identification accuracy of the milling cutter wear state under different working conditions in the implementation case of the present invention;
[0041] Figure 6 Schematic diagram of consistency between the source domain and the generated domain in an embodiment of the present invention;
[0042] Figure 7 It is a schematic diagram of the consistency of the target domain in the implementation case of the present invention. [Specific implementation method]
[0043] To make the objects, technical solutions, and advantages of the present invention more clear, the present invention is further described in detail below in conjunction with the examples and drawings. It should be understood that the exemplary embodiments of the present invention and their descriptions are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined in any manner as long as they do not conflict with each other.
[0044] See Figures 1 to 4 The present invention provides a single-source domain generalization method for milling cutter wear monitoring with discontinuous feature constraints, including a single-source domain generalization model for milling cutter wear monitoring with discontinuous feature constraints; the model includes a spatial attention module MS, a generation module MG, a feature extraction module MF, a classification module MC and a standard trend sample S T ; The S T is a vector {-1,…,1,0,…,0,…,-1,…,1,0,…,0}, which is composed of N sub-vectors {-1,…,1,0,…,0} of length l arranged in sequence; the sub-vector {-1,…,1,0,…,0} is periodically composed of a monotonically increasing vector t1{-1,…,1} from -1 to 1 and a continuous 0 vector t0{0,…,0}; the sum of the lengths of t0 and t1 is Where n is the number of tool teeth; the length of t1 Wherein Ap is the axial cutting depth in mm, α is the tool helix angle in degrees, D is the tool diameter in mm, and π is the circumference of a circle; l is the monitoring signal length corresponding to one rotation of the tool; the method comprises the following steps:
[0045] S1: Obtain the wear process monitoring signal with the milling cutter wear stage label under the source domain working condition A, preprocess and spatially align the signal, and perform sample interception with a length of N×l to obtain the source domain sample set data_S;
[0046] S2: MS training:
[0047] S21: After randomly shuffling the order of the samples in data_S, the samples are input into MS in batches according to the number of batches. The spatial attention weights w_att1 with discontinuous characteristics corresponding to the samples are extracted.
[0048] S22: Use w_att1 to perform attention weighting on the input sample to obtain the weighted feature w_s;
[0049] S23: Input w_s into the sequentially connected MF and MC to obtain the output classification probability;
[0050] S24: Perform cross entropy calculation on the classification probability and the wear stage label corresponding to the input sample, and optimize MS, MF and MC through back propagation;
[0051] S25: After repeating S21 to S24 for a specified number of rounds, the trained MS_trained is obtained;
[0052] S3: MF, MC training:
[0053] S31: After randomly shuffling the order of the samples in data_S, the samples are input into MS_trained in batches according to the number of batches. The spatial attention weights w_att2 with discontinuous characteristics corresponding to the samples are extracted.
[0054] S32: Use w_att2 to perform attention weighting on the input sample to obtain the weighted feature w_S;
[0055] S33: Input w_S to MG to obtain the generated weight w_g with discontinuous characteristics, and combine w_g and the S T Perform similarity L g1 measure;
[0056] S34: Use w_g to weight the input sample to obtain the generated feature w_G;
[0057] S35: Input w_S and w_G into MF at the same time to obtain the source domain feature fea_S and the generated domain feature fea_G respectively;
[0058] S36: Diversity L between fea_S and fea_G g2 To measure, use L g1 +β×L g2 MG is optimized as the generation module loss;
[0059] S37: Input fea_S and fea_G into MC, and output the source domain classification probability and the generated domain classification probability respectively;
[0060] S38: Perform cross entropy operations on the source domain classification probability and the generated domain classification probability with the wear stage label corresponding to the input sample to obtain the source domain loss L S and the generation domain loss L G ;
[0061] S39: Using L S+L G Optimize MF and MC simultaneously;
[0062] S310: After repeating S31 to S39 for a specified number of rounds, the trained MF_trained and MC_trained are obtained;
[0063] S4, preprocess and spatially align the monitoring signal of the milling cutter wear process to be monitored under the target domain working condition B, and intercept the sample according to the length of N×l to obtain the target domain sample data_T; input data_T into the sequentially connected MS_trained, MF_trained, and MC_trained to output the tool wear status monitoring result.
[0064] Specifically, the MG structure is a sequentially connected structure where both the step length and the kernel size are k pool The average pooling layer, the convolution layer with both input and output channels being 1, the AdaIN layer, the convolution layer with both input channels being 2 and output channels being 4, the convolution layer with both input channels being 4 and output channels being 1, the transposed convolution layer with both input channels being 4 and output channels being 1, and the Tanh activation layer; the step size of the convolution layer is 1 and the kernel size is k; the step size of the transposed convolution layer is k pool , the kernel size is k-1; Where n is the number of teeth of the milling cutter; the AdaIN layer is defined as:
[0065]
[0066] In the formula, x represents the feature of the previous layer, y represents the noise that obeys the normal distribution, σ represents the mean, and μ represents the standard deviation;
[0067] The L in S33 g1 pass Calculate, where n S is the number of samples in data_S; L in S36 g2 pass Calculate, where k(fea_S i ,fea_G i )=exp(-||fea_S i -fea_G i || 2 / 2γ 2 ), γ is the core width; β in the S36 is -20;
[0068] The Ap comes from the source domain working condition A.
[0069] Specifically, the MS structure is a sequentially connected average pooling layer, convolution layer, batch normalization layer, ReLU activation layer, and element repetition layer; the step size and kernel size of the average pooling layer are both kpool The kernel size of the convolution layer is k, the step size and input and output channels are 1; the repetition multiple of the element repetition layer is k pool , the repeated dimension is the last dimension; the MF is a WDCNN structure; the MC is a fully connected layer.
[0070] Specifically, the preprocessing in S1 and S4 refers to first performing zero-mean processing on the original signal; then performing Fourier low-pass filtering on the signal, and the cutoff frequency of the Fourier low-pass filtering is 10 times the tooth-pass frequency in the source domain working condition A; then slicing the signal with a length of (N+1)×l and normalizing it to [-1,1]; the spatial alignment in S1 and S4 refers to taking the minimum value of the first l points of the sliced signal as the starting point and intercepting a signal with a length of N×l; the tool structure and spindle speed of the source domain working condition A and the target domain working condition B must be consistent; the weighting in S22, S32 and S34 refers to multiplying the weight and the elements at the same position of the input sample, and then adding the obtained product to the elements at the same position of the input sample.
[0071] Working process of the present invention:
[0072] The present invention provides a single-source domain generalization method for milling cutter wear monitoring with discontinuous characteristic constraints, which is described in conjunction with an embodiment during operation.
[0073] 1. Data Acquisition
[0074] The experiment was conducted on a five-axis CNC machining center. The workpiece material being cut was 40# steel, and the tool travel was 420mm each time. The milling cutter used to cut the workpiece was a certain type of 3-tooth integral end mill (number of teeth n was 3, diameter D was 16mm, and helix angle α≈35°). A certain type of three-axis vibration acceleration sensor was used to collect the vibration signals of the spindle in the X, Y, and Z directions. The sampling frequency of the obtained vibration signal was f. s The spindle vibration signal in the X direction is used as the analysis object. A total of five tools are used for the wear cutting experiment. The process parameters corresponding to each tool are shown in Table 1.
[0075] Table 1 Maximum flank wear VB value and wear status at the end of each pass
[0076]
[0077] After each pass, the maximum flank wear (VB) value of the cutting edge was measured using a digital microscope and recorded until the VB value exceeded 0.3 mm. The milling cutter wear state was classified into the initial wear stage, the stable wear stage, the rapid wear stage, and the failure stage based on the VB value of 0-0.1 mm, 0.1-0.2 mm, 0.2-0.3 mm, and greater than 0.3 mm. Tool C1 was used as the source domain for model training, and all other tools were used as target domains for testing.
[0078] 2. Data preprocessing, slicing and sample alignment:
[0079] All the acquired original signals are preprocessed separately. The preprocessing method is to first perform zero-mean processing on the original signals; then perform Fourier low-pass filtering on the signals, and the cutoff frequency of the low-pass filtering is 10 times the tooth-pass frequency in the source domain working condition A, that is, 600 Hz; then the signals are sliced with a length of (N+1)×l, that is, 6500 data points per sample (the data length corresponding to one rotation of the tool is 500) and normalized to [-1, 1]; the minimum value of the first 500 points of the sliced signal is used as the starting point, and a signal with a length of 6000 is intercepted to achieve spatial alignment of each sample.
[0080] 3. Model construction
[0081] The model was built using Python 3.9.7, Anaconda 2.1.1, and Pytorch 1.10.1, and trained on an i7-11800H 16GB GPU and NVIDIA's GeForce GTC 3060 GPU. The model hyperparameter settings are shown in Table 2. Except for special notes (generating module learning rate), the hyperparameter settings for the pre-training and training phases are the same.
[0082] Table 2 Model training hyperparameters
[0083]
[0084]
[0085] The structure and parameters of the model in this embodiment are shown in Table 3.
[0086] Table 3 Model structure and parameters
[0087]
[0088] k=41; the standard trend sample S T In the example, the length of t1 is l1=48.
[0089] 4. MS training:
[0090] After randomly shuffling the samples in the sample set data_S in the source domain A(C1), they are input into the MS in batches of Batch=64. The spatial attention weights w_att1 with discontinuous characteristics corresponding to the samples are extracted. The samples are weighted by w_att1 to obtain the weighted features w_s. w_s is input into the sequentially connected MF and MC to obtain the output classification probability. The classification probability is cross-entropy calculated with the wear stage label corresponding to the input sample, and the optimization of MS, MF, and MC is achieved through backpropagation. After 100 rounds of optimization, the pre-trained MS_trained is obtained.
[0091] 5. MF and MC training:
[0092] Use MS_trained to extract the attention weight w_att2 of the input samples in batches of data_S with the number of batches being Batch=64, and use w_att2 to perform attention weighting on the input samples to obtain the corresponding weighted features w_S; input w_S into MG to obtain the generated weight w_g with discontinuous characteristics, and compare w_g with the S T Perform similarity L g1 Measurement; Use w_g to weight the input sample to obtain the generated feature w_G; Input w_S and w_G into MF at the same time to obtain the source domain feature fea_S and the generated domain feature fea_G respectively; The diversity L between fea_S and fea_G g2 To measure, use L g1 -20×L g2 MG is optimized as the generation module loss; fea_S and fea_G are input to MC, and the source domain classification probability and the generated domain classification probability are output respectively; the source domain classification probability and the generated domain classification probability are respectively cross-entropy operated with the wear stage label corresponding to the input sample to obtain the source domain loss L S and the generation domain loss L G ; Using L S +L G MF and MC are optimized simultaneously; after MG, MF and MC are optimized for 100 rounds, the trained MF_trained and MC_trained are obtained;
[0093] 6. Model testing:
[0094] See Figure 5, the samples from the target domain tools (C2-C5) are input into the sequentially connected MS_trained, MF_trained, and MC_trained, and the classification results are output. Accuracy statistics show that the model achieves recognition accuracies of 92.05%, 93.01%, 91.64%, and 88.57% in different target domains, respectively. Therefore, it can well meet the needs of tool wear monitoring in actual machining.
[0095] 7. Analysis of beneficial effects:
[0096] See Figure 6 Each input sample in C1, along with its corresponding attention weight and generation weight, is normalized between 0 and 1 and displayed as a graph. The original data (6,000 data points) is then cropped and concatenated at 500 data points per rotation, and a heat map is generated. It can be seen that compared to the input sample, the attention weights suppress a significant amount of information. The weighted signal features exhibit a distinct discontinuous characteristic, and the spatial locations of the enhancements within each rotation cycle (horizontally) are highly consistent with those within other rotation cycles (vertically). This demonstrates that the spatial attention module effectively identifies and adaptively weights the cut / non-cut segments in the signal. Furthermore, the heat map of the generated weights reveals that a large number of spatial features are re-weighted, achieving diverse generation, while retaining their overall discontinuous characteristics. Consequently, there is a high degree of consistency between the source and generated domains.
[0097] participate Figure 7 , the same operation is performed on the attention weights of different target domains at different wear stages. First, at each wear stage of each target domain, the attention weights show obvious discontinuous characteristics, and the high weight value part is the same as that at Figure 6 The spatial distribution consistency in is strong, so it can be considered that the method proposed in this paper establishes an effective consistency constraint between the source domain and the target domain.
[0098] The present invention utilizes process parameters, tool structure parameters, and signal sampling rate to quantify the discontinuous characteristics of the milling cutter machining process, and constructs an attention module based on this to achieve adaptive extraction of discontinuous characteristics and suppress signal segments that are not related to tool wear. In addition, a generation module is constructed based on the discontinuous characteristics to enhance the diversity of source domain signal features. At the same time, a standard trend sample that meets the discontinuous characteristics is constructed to constrain the consistency between the generated features and the real signal. The method proposed in the present invention can establish consistency constraints on source domain features, generated features, and target domain features. This enables the model to accurately locate key signal segments under different working conditions, improves the generalization and interpretability of the model, and is of great significance in promoting the application of deep learning methods in the field of tool wear state identification under unknown working conditions.
[0099] The above embodiments are intended to illustrate the present invention, not to limit the present invention. Any person skilled in the art can easily conceive of various equivalent modifications or replacements within the technical scope disclosed in the present invention, and these modifications or replacements should all be included in the scope of protection of the present invention.
Claims
1. A single-source domain generalization method for milling cutter wear monitoring with discontinuous characteristic constraints, characterized by: A single-source domain generalization model for milling cutter wear monitoring with discontinuous feature constraints is provided; the model comprises a spatial attention module MS, a generation module MG, a feature extraction module MF, a classification module MC and a standard trend sample S T ; The S T is a vector {-1,…,1,0,…,0,…,-1,…,1,0,…,0}, which is composed of N sub-vectors {-1,…,1,0,…,0} of length l arranged in sequence; the sub-vector {-1,…,1,0,…,0} is periodically composed of a monotonically increasing vector t1{-1,…,1} from -1 to 1 and a continuous 0 vector t0{0,…,0}; the sum of the lengths of t0 and t1 is Where n is the number of tool teeth; the length of t1 Wherein Ap is the axial cutting depth in mm, α is the tool helix angle in degrees, D is the tool diameter in mm, and π is the circumference of a circle; l is the monitoring signal length corresponding to one rotation of the tool; the method comprises the following steps: S1: Obtain the wear process monitoring signal with the milling cutter wear stage label under the source domain working condition A, preprocess and spatially align the signal, and perform sample interception with a length of N×l to obtain the source domain sample set data_S; S2: MS training: S21: After randomly shuffling the order of the samples in data_S, the samples are input into MS in batches according to the number of batches. The spatial attention weights w_att1 with discontinuous characteristics corresponding to the samples are extracted. S22: Use w_att1 to perform attention weighting on the input sample to obtain the weighted feature w_s; S23: Input w_s into the sequentially connected MF and MC to obtain the output classification probability; S24: Perform cross entropy calculation on the classification probability and the wear stage label corresponding to the input sample, and optimize MS, MF and MC through back propagation; S25: After repeating S21 to S24 for a specified number of rounds, the trained MS_trained is obtained; S3: MF, MC training: S31: After randomly shuffling the order of the samples in data_S, the samples are input into MS_trained in batches according to the number of batches. The spatial attention weights w_att2 with discontinuous characteristics corresponding to the samples are extracted. S32: Use w_att2 to perform attention weighting on the input sample to obtain the weighted feature w_S; S33: Input w_S to MG to obtain the generated weight w_g with discontinuous characteristics, and combine w_g and the S T Perform similarity L g1 measure; S34: Use w_g to weight the input sample to obtain the generated feature w_G; S35: Input w_S and w_G into MF at the same time to obtain the source domain feature fea_S and the generated domain feature fea_G respectively; S36: Diversity L between fea_S and fea_G g2 To measure, use L g1 +β×L g2 MG is optimized as the generation module loss; S37: Input fea_S and fea_G into MC, and output the source domain classification probability and the generated domain classification probability respectively; S38: Perform cross entropy operations on the source domain classification probability and the generated domain classification probability with the wear stage label corresponding to the input sample to obtain the source domain loss L S and the generation domain loss L G ; S39: Using L S +L G Optimize MF and MC simultaneously; S310: After repeating S31 to S39 for a specified number of rounds, the trained MF_trained and MC_trained are obtained; S4, preprocess and spatially align the monitoring signal of the milling cutter wear process to be monitored under the target domain working condition B, and intercept the sample according to the length of N×l to obtain the target domain sample data_T; input data_T into the sequentially connected MS_trained, MF_trained, and MC_trained to output the tool wear status monitoring result.
2. The single-source domain generalization method for milling cutter wear monitoring with discontinuous characteristic constraints according to claim 1 is characterized in that: The MG structure is a sequentially connected structure with a step size and a kernel size of k pool The average pooling layer, the convolution layer with both input and output channels being 1, the AdaIN layer, the convolution layer with both input channels being 2 and output channels being 4, the convolution layer with both input channels being 4 and output channels being 1, the transposed convolution layer with both input channels being 4 and output channels being 1, and the Tanh activation layer; the step size of the convolution layer is 1 and the kernel size is k; the step size of the transposed convolution layer is k pool , the kernel size is k-1; Where n is the number of teeth of the milling cutter; the AdaIN layer is defined as: In the formula, x represents the feature of the previous layer, y represents the noise that obeys the normal distribution, σ represents the mean, and μ represents the standard deviation; The L in S33 g1 pass Calculate, where n S is the number of samples in data_S; L in S36 g2 pass Calculate, where k(fea_S i ,fea_G i )=exp(-||fea_S i -fea_G i || 2 / 2γ 2 ), γ is the kernel width; β in S36 is any integer in [-20, -1]; The Ap comes from the source domain working condition A.
3. The single-source domain generalization method for milling cutter wear monitoring with discontinuous characteristic constraints according to claim 1 is characterized in that: The MS structure is an average pooling layer, a convolutional layer, a batch normalization layer, a ReLU activation layer, and an element repetition layer connected sequentially; the step size and kernel size of the average pooling layer are both k pool The kernel size of the convolution layer is k, the step size and input and output channels are 1; the repetition multiple of the element repetition layer is k pool , the repeated dimension is the last dimension; the MF is a WDCNN structure; the MC is a fully connected layer.
4. The single-source domain generalization method for milling cutter wear monitoring with discontinuous characteristic constraints according to claim 1 is characterized in that: The preprocessing in S1 and S4 refers to first performing zero-mean processing on the original signal; then performing Fourier low-pass filtering on the signal, and the cutoff frequency of the Fourier low-pass filtering is 10 times the tooth-pass frequency in the source domain working condition A; then slicing the signal with a length of (N+1)×l and normalizing it to [-1,1]; the spatial alignment in S1 and S4 refers to taking the minimum value of the first l points of the sliced signal as the starting point and intercepting a signal with a length of N×l; The tool structure and spindle speed of the source domain working condition A and the target domain working condition B must be consistent; the weighting in S22, S32 and S34 refers to multiplying the weight and the elements at the same position of the input sample, and then adding the resulting product to the elements at the same position of the input sample.
Citation Information
Patent Citations
Tool Wear State Monitoring Method Based on Deep Gated Recurrent Unit Neural Network
CN111325112B
Mechanism-Data Fusion Driven Method for Monitoring Tool Wear Condition under Variable Working Conditions
CN114102260B
Cutter wear monitoring method based on transfer learning
CN115351601A
A Physics-Guided Deep Learning Network-Based Tool Wear Condition Monitoring Method and Its Application
CN115446663B
Milling cutter wear monitoring method based on multi-parameter guide space attention mechanism
CN115971970A