Mortise broach wear state identification method
By using a CNN-ViT hybrid model and a triaxial vibration sensor to identify the wear state of the tenon and slot broach, the problems of signal overlap interference and downtime measurement in traditional methods are solved, and high-precision online monitoring is achieved.
Patent Information
- Application Number
- CN202511025388.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-24
- Publication Date
- 2025-11-21
AI Technical Summary
Existing technologies struggle to accurately identify the wear condition of tenon and slot broaches, especially in complex geometries and multi-tooth cutting situations. Traditional methods suffer from signal overlap interference and require machine downtime for measurement.
A CNN-ViT hybrid model is used to extract features from the vibration signals of broaching. Combined with signals collected by a triaxial vibration sensor, local and global features are extracted using a self-built CNN and ViT model to achieve high-precision identification of the wear state of the tenon and slot broach.
It achieves high-precision identification of the wear status of tenon and slot broaches, with an identification accuracy, precision and recall rate of over 98.63%, reducing scrap rate and unplanned downtime losses, and providing a non-intrusive online monitoring solution.
Smart Images

Figure CN120995069A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of state recognition, and particularly relates to a tenon and slot broach wear state recognition method. BACKGROUND
[0002] Broaching is a special machining method, in which the tool removes material by gradually increasing the size of the tool teeth through linear motion in one direction. Since its inception, this technology has been applied in many special part machining fields due to its high efficiency, high machining precision, high surface quality, and excellent repeatability. Tool state is particularly important for machining quality. Abnormal tool state not only makes the workpiece surface machining quality unable to meet the requirements, but also may damage the machine tool itself, and in severe cases, may even directly cause the machine tool to be paralyzed and personnel to be injured, causing a large economic loss to the enterprise.
[0003] Due to the particularity of broaching machining and the complex geometric shape of the broach teeth, it is difficult to directly observe and monitor the broach using optical instruments. Some tool wear state recognition methods have been proposed in the prior art.
[0004] For example, patent number 202310380723.8, entitled "Rotary tool wear monitoring method based on vibration signal feature fusion graph", extracts features in time domain, frequency domain, waveform and wavelet domain from the detection signal, and calculates the correlation between the extracted features and the tool wear value to establish a feature fusion graph data set of the tool wear. Since this scheme is only applicable to a single tool, the broach is composed of multiple teeth, resulting in overlapping interference during signal processing, making it difficult to accurately extract the state features of each tooth.
[0005] Patent number 202510046720.X, entitled "Single-working-condition tool wear prediction method based on deep fusion network", uses a method based on the third and fourth quartiles to process sensor signal data, and reconstructs the tensor data input into a prediction network model based on a deep fusion network by wavelet denoising, to realize wear prediction. This scheme needs to collect cutting force signals, but in actual broach machining, obtaining force signals often requires structural modification of the machine tool, which easily affects the structural integrity and dynamic performance of the equipment.
[0006] Patent number 202421239621.0, entitled "Device for broach wear detection", uses an optical microscope to directly monitor the broach, which requires disassembly of the tool after shutdown and cannot realize online monitoring, limiting its application in actual machining.
[0007] To this end, the present application provides a mortise broach wear state recognition method, which uses deep learning technology to extract features from the broaching vibration signal containing rich space-time information, and finally completes the recognition of the broach wear state, realizing the broach wear state monitoring in the whole broaching process. SUMMARY
[0008] In view of the problems in the prior art, the present application provides a mortise broach wear state recognition method, which breaks through the traditional single feature extraction method and uses a self-built CNN model and a ViT model to extract local features and global features from the broaching vibration signal respectively, so as to achieve higher accuracy and faster recognition speed.
[0009] The technical scheme of the present application is as follows:
[0010] A mortise broach wear state recognition method comprises the following steps:
[0011] 1) Data set acquisition:
[0012] The acceleration signal sensor is arranged on the tool box of the broaching machine to obtain the time domain information of the original vibration signal in the x, y and z geometric directions in a single broaching stroke; the broach is taken off from the tool box after each broaching stroke, and the actual wear value is measured by an optical device, and a label corresponding to the wear of the current tool is marked according to the measured value, the collected vibration signal is associated with the corresponding wear label, and thus the data set is obtained;
[0013] 2) Data preprocessing
[0014] The empty stroke information in the data set is removed, and the maximum and minimum normalization operation is used on all input signals in the data set, so that the value distribution of the input sequence is in [0, 1] and then used as the model input. The formula of the maximum and minimum normalization is as follows:
[0015]
[0016] Wherein, x t is the value of the original signal at the current time step t; represents the value of the processed signal at the current time step; x min represents the minimum value that the signal can reach; x max represents the maximum value that the signal can reach;
[0017] 3) Model construction
[0018] A CNN-ViT broach wear state recognition model is constructed to extract features from the broaching vibration signal containing space-time information and complete the monitoring of the wear state of the broach. The recognition model comprises a convolutional neural network CNN and a visual transformer ViT.
[0019] 4) Dataset division
[0020] The labeled signal is divided into three parts of training set, validation set and test set, wherein the training set is used for training of the model; the validation set is verified after each training round, and the model with the best performance in the validation set is reserved; the test set is used for testing the finally saved best model to judge the quality of the model;
[0021] 5) Training and testing model
[0022] The preprocessed data is input into the model as an input quantity for training, and the current model is immediately verified once in each round. The output of the model is the predicted label, and the loss function is used to quantify the gap between the model prediction result and the actual result, and outputs the loss value. The optimizer calculates the gradient of the loss value to the model parameters through back propagation, and updates the weights of the model according to these gradients, so as to gradually reduce the loss value. When the number of training reaches the set or meets the early stopping requirement, the training is ended, and the model with the best performance in the validation set will be determined as the final model;
[0023] 6) Recognition of broach wear state
[0024] The vibration signal is input into the final model of step 5) to obtain the recognition result of the broach wear state.
[0025] Further, the label of the current tool corresponding to the wear is marked according to the measured value, which is specifically as follows:
[0026] The tool wear considers the relief wear of the broach. According to the wear standard, the broach wear state is divided into three types: initial wear 0-50 μm, normal wear 51-200 μm and severe wear > 200 μm.
[0027] Further, step 3) is specifically as follows:
[0028] Convolutional neural network CNN: the input signal is projected to high dimension through point-by-point convolution, and then subjected to local feature extraction and dimension reduction through two one-dimensional depth separable convolution DSC and one one-dimensional convolutional neural network Conv1D, wherein batch normalization BN step is performed after each convolution operation and activation function ReLU is used; at the same time, residual connection is added in the two DSCs; the output obtained after the input passes through the CNN part is the local extracted feature of the network model;
[0029] Vision Transformer ViT: The sequence of local extracted features will be divided into multiple sequence blocks according to the time sequence logic, the sequence blocks will be changed in dimension through the embedding layer, then a classification token, namely ClS Token, will be introduced, and a position encoding will be added to make the model understand the position information of the input and capture the order relationship of the elements, after random dropout, the embedding information will be sent to the Transformer encoder for global feature extraction;
[0030] In the Transformer encoder, first, the multi-head self-attention mechanism is calculated, in the self-attention mechanism, the query, key and value come from the same sequence, namely the input sequence itself, which is used to model the correlation between the elements in the sequence;
[0031] After the multi-head self-attention calculation, the sequence will pass through the multi-layer perception block MLP Block to increase the non-linear feature extraction capability, the multi-layer perception block is composed of a layer normalization LN, two linear layers, an activation function GELU and a random dropout; Finally, the classification token carrying the global features of the sequence will be extracted and normalized by layer.
[0032] Then, it will be input into the multi-layer perception head MLP Head composed of two fully connected layers and a random dropout, and finally mapped to the classification label space.
[0033] Further, the expression of the self-attention mechanism is as follows:
[0034]
[0035] For each input element X, a query vector Q, a key vector K and a value vector V will be generated, the query vector Q and the key vector K will be multiplied to obtain the correlation score, and then divided by the square root of the vector dimension Scaling, then get the attention weight of each element through the Softmax function, and the final output is obtained by weighting the sum of V according to the attention weight;
[0036] In the application of self-attention mechanism, multi-head attention is used to enhance the representation ability, forming a multi-head self-attention mechanism; Through parallel calculation of attention by multiple heads, the expression ability of the model is enhanced, so that the model can capture different features of the input sequence from multiple angles, enhance the global feature representation, specifically assuming that there are h heads, the dimension of each head is d head , d k is 1 / h of the dimension; head i The corresponding Q i , K i , V i will be calculated by attention:
[0037]
[0038] where W i Q , W i K , W i V represent the Q i , K i , V i mapping matrix of the i-th head respectively;
[0039] The results of all multi-head attentions are spliced together to obtain a more rich feature representation result:
[0040] MuliHead(Q,K,V)=Concat(head1,head2,...head h )W O
[0041] where W O is a linear transformation matrix for mapping the spliced output back to the original feature space.
[0042] Further, the step 6) is specifically as follows:
[0043] The normalized three-direction vibration signal will be subjected to a 1DCNN network for preliminary feature extraction, and the preliminary extracted features will be divided into multiple blocks Patch according to the time sequence logic;The block Patch will be subjected to dimension change through an embedding layer, spliced by adding a classification label, and then put into a Transformer encoder network for global feature extraction after adding position embedding;In the Transformer encoder, the input is subjected to multi-head attention mechanism calculation and put into an MLP module for further nonlinear transformation and feature combination, so as to extract higher level features;The MLP module is composed of an LN layer, two linear Linear layers, an activation function layer and a random inactivation Dropout, wherein the activation function uses a Gaussian error linear unit function GELU, and a nonlinearity is introduced, and the expression of GELU is as follows:
[0044]
[0045] where Φ(x) is the cumulative distribution function of the standard normal distribution, indicating that the input x is weighted by its corresponding probability, so as to realize the activation;For convenience of calculation, GELU uses the approximate expression after the approximate equal sign;
[0046] At the end of the model, the fully learned classification label is extracted and put into an MLP head with two fully connected FC layers to obtain a classification result.
[0047] The beneficial effects of the present application are as follows:
[0048] 1)CNN-ViT hybrid model applied to broach wear monitoring field
[0049] In view of the complexity of the working condition caused by the complex tooth profile, long stroke and multi-tooth cutting of the tenon and groove broaching tool, a CNN-ViT hybrid model is innovatively proposed. The model combines the local feature extraction capability of convolutional neural network (CNN) and the global time sequence modeling advantage of visual transformer (ViT), realizes high-precision identification of the tool wear state in the last machining process, and breaks through the monitoring bottleneck of traditional methods in complex scenes.
[0050] 2)Double-path feature extraction architecture improves signal analysis accuracy
[0051] A double-path architecture of time series decomposition and feature fusion is adopted, the local time-frequency features and global space-time correlation of the vibration signal are extracted by CNN-ViT layer by layer, and the full-dimensional mining of wear features is realized. Experimental verification shows that the recognition accuracy, precision, recall rate and F1 score are all above 98.63%, the single recognition time is as low as 1.4ms, and for the first time, the timeliness problem of wear real-time monitoring in broaching process is solved.
[0052] 3)Low-cost non-stop solution based on three-axis vibration sensor
[0053] Only three-axis vibration sensors (x / y / z directions) are needed to collect processing vibration signals, avoiding the environmental interference risk and production line downtime cost of direct monitoring methods such as optical measurement. An online monitoring solution with non-invasion and high economy is provided for high-value broaching equipment, which significantly reduces the waste rate and unplanned downtime loss caused by abnormal tool wear. BRIEF DESCRIPTION OF DRAWINGS
[0054] Figure 1 The figure is a schematic diagram of the data acquisition process of the present application;
[0055] Figure 2 The figure is a schematic diagram of the original signal of the present application;
[0056] Figure 3 The figure is a schematic diagram of the CNN-ViT broach wear state recognition model of the present application;
[0057] Figure 4 The figure is a schematic diagram of the model training process of the present application. DETAILED DESCRIPTION
[0058] The present application is further described below in conjunction with the drawings of the specification.
[0059] The present application proposes a CNN-ViT broach wear state recognition model and a recognition method based on the model in view of broaching and broach characteristics.
[0060] 1. Data preprocessing and cutter wear state classification
[0061] 1) The acceleration signal sensor will be arranged on the cutter box to obtain the time domain information of the original vibration signal in three geometric directions in a single hobbing stroke. Non-important idle stroke information is removed. Since the three signals come from different directions of vibration, there may be large differences, so maximum and minimum normalization operations will be used for all input signals. The value distribution of the input sequence is in [0, 1] after which it is input into the model, making the model training more stable, faster convergence, and reducing the difference between different characteristic values.
[0062] 2) Considering the wear of the relief of the hob, the wear width VB measured at 1 / 2 of the relief is used as the hob wear standard according to the international standard ISO. The hob wear state is divided into three types: initial wear (0-50 μm), normal wear (51-200 μm), and severe wear (>200 μm). Since the number of teeth exceeds 1000, the wear VB value at 1 / 2 of the first tooth relief of rough machining, semi-finish machining and finish machining is measured, 3 times for each group, and the average value is recorded.
[0063] 2. Constructing a recognition model
[0064] For hobbing machining, a CNN-ViT hob wear state recognition model is constructed to extract features from hobbing machining vibration containing rich spatio-temporal information and complete the monitoring of the wear state of the hob. The model mainly consists of two parts: the Convolutional Neural Network (CNN) part and the Vision Transformer (ViT) part.
[0065] 1) The CNN part is a self-constructed convolutional neural network. The input signal will be projected to a high dimension through pointwise convolution to obtain more rich information. Then, 2 one-dimensional depthwise separable convolution (DSC) and 1 one-dimensional convolutional neural network (Conv1D) are used for local feature extraction and dimension reduction. One-dimensional convolution can better handle time series information. Batch normalization (BN) step is performed after each convolution operation and an activation function is used. BN is a regularization technique in neural networks that speeds up model training and improves model performance and stability. The activation function selects the commonly used rectified linear unit function (ReLU), which is simple to calculate, can alleviate the gradient vanishing problem and bring sparse activation effect.
[0066] The expression of ReLU is as follows:
[0067] ReLU(x) = max(0, x)
[0068] In order to prevent gradient vanishing, accelerate convergence, residual connections are also added in two DSCs. The output obtained after the input passes through the CNN part is the local feature extracted by the network model, which contains more concise important information and can be more efficiently processed by subsequent methods.
[0069] 2) The embedding layer size, number of heads, and number of stacks of the ViT model part are 256, 4, and 2, respectively. The sequence of local extracted features will be divided into multiple "sequence blocks" according to the time sequence logic, and these "sequence blocks" will be changed in dimension through the embedding layer. Then, a "classification token" will be introduced, which will be input into the model together with the image blocks after the block segmentation layer. Since the Transformer is essentially a sequential-independent architecture, a position encoding is added to each embedding to make the model understand the position information of the input and capture the order relationship of the elements. After random dropout, the embedding information will be sent to the Transformer encoder for global feature extraction.
[0070] First of all, these information will be calculated by multi-head self-attention mechanism. Self-attention mechanism is a special form of attention mechanism, which is used for internal information capture of the same sequence. In self-attention mechanism, the query, key and value all come from the same sequence (i.e. the input sequence itself), which is mainly used for modeling the correlation between elements in the sequence. Specifically, for each input element X, a query vector Q, a key vector K and a value vector V are generated, which are generated by linear transformation of the input through different weight matrices. Multi-head self-attention mechanism is an improved mechanism based on self-attention mechanism. By calculating attention in multiple heads in parallel, the model's expression ability is enhanced, so that the model can capture different features of the input sequence from multiple angles, enhance the global feature representation, and improve the flexibility and expression ability of the model.
[0071] The sequence calculated by multi-head self-attention will pass through the multi-layer perception block (MLP Block) to increase the non-linear feature extraction ability. Here, the multi-layer perception block is composed of a layer normalization (Layer Normalization, LN), two linear layers (Linear), an activation function (GELU), and a random dropout.
[0072] Finally, the classification token carrying the global feature of the sequence will be extracted and layer normalized. Then, it will be input into a multi-layer perception head (MLP Head) consisting of two linear layers and a random activation, finally mapping to the classification label space, completing the classification of the broach wear state.
[0073] Specifically, the Transformer encoder includes core modules such as Multi-Head Self-Attention, Transformer Encoder, Position Embedding, CLS Token, etc.
[0074] a) Multi-Head Self-Attention
[0075] Self-attention mechanism is a special form of attention mechanism, which is used for internal information capture of the same sequence. In the self-attention mechanism, the query, key and value all come from the same sequence (i.e. the input sequence itself), which is mainly used for modeling the correlation between the elements in the sequence. Specifically, for each input element X, a query vector Q, a key vector K and a value vector V are generated, which are generated by linear transformation of the input through different weight matrices. Q and K are dot multiplied to get the correlation score, which is divided by the square root of the vector dimension Scaling is performed, then the attention weight of each element is obtained by the Softmax function, and the final output is obtained by weighted summation of V according to the attention weight. Such operations make the output features contain information related to the elements in the sequence.
[0076] The expression of self-attention mechanism is as follows:
[0077]
[0078] In the application of self-attention mechanism, multi-head attention is usually used to enhance the representation ability, forming a multi-head self-attention mechanism. By parallel computing attention through multiple heads, the expression ability of the model is enhanced, so that the model can capture different features of the input sequence from multiple angles, enhance the global feature representation, and improve the flexibility and expression ability of the model. Assuming that there are h heads, the dimension of each head is d head , which is 1 / h of the dimension d k of the head i The attention calculation by the corresponding Q i , K i , V i is as follows:
[0079]
[0080] where W i Q , W i K , W i V represent the Q i , K i , V i mapping matrix of the i-th head respectively.
[0081] Concatenate the results of all multi-head attentions to get a more rich feature representation result:
[0082] MuliHead(Q,K,V) = Concat(head1, head2,...head h )W O
[0083] where W O is a linear transformation matrix, which is used to map the output after concatenation back to the original feature space.
[0084] b) Transformer encoder
[0085] The Transformer encoder is a typical encoder architecture, which is stacked by multiple encoding layers. Each encoding layer contains a multi-head self-attention mechanism for capturing the global features of the input sequence, a multi-layer perceptron block (MLPBlock) for increasing the non-linear feature extraction capability, and a residual connection and layer normalization (LN) for accelerating training and stabilizing the network.
[0086] c) Position embedding
[0087] Position embedding is used to encode the position or order information of the input elements in the Transformer. Since the Transformer is essentially a sequence-independent architecture, it cannot directly obtain the order of elements in the sequence. By adding a position encoding in each embedding, the model can understand the position information of the input and capture the order relationship of the elements. In this paper, the input sequence is divided into blocks according to the time feature. After adding the position encoding, the ViT can capture the sequence relationship and perform subsequent feature extraction.
[0088] d) Classification label
[0089] A "classification token" is introduced in ViT, which is called "ClS Token". It will be input into the model together with the image patches after the patch splitting layer. After passing through the Transformer encoder, the token carries the global features of the sequence. After extracting the classification token alone, it is put into the Multi-Layer Perceptron Head (MLP Head) and finally mapped to the classification label space.
[0090] 3. Model training:
[0091] 1) Dataset acquisition:
[0092] The acceleration signal sensor will be placed on the tool box of the broaching machine. The original vibration signal time domain information in the x, y, z three geometric directions will be obtained in a single broaching stroke. Multi-directional signal acquisition can enrich the model input content to obtain more accurate results. After each broaching stroke, the broach will be removed from the tool box, and the actual wear value will be measured by optical equipment, and the corresponding wear label will be marked according to the measurement value. At this time, the collected vibration signal is associated with the corresponding wear label, and the dataset is obtained.
[0093] 2) Dataset division
[0094] The labeled signal is divided into three parts: training set, validation set and test set, accounting for 64%, 16% and 20% of the total respectively. Among them, the training set will be used for model training. The validation set will be validated after each training round, and the model with the best performance on the validation set will be retained. The test set is used to test the last saved model (that is, the best model) to evaluate the quality of the model.
[0095] 3) Set the hyperparameters used by the training model.
[0096] In order to balance the training efficiency, while avoiding instability and divergence, the base learning rate is set to 0.001. The Adam optimizer is selected because of its high efficiency, strong adaptability and automatic adjustment of learning rate. To avoid overfitting, the weight decay parameter is set to 10 -4 , and the random dropout rate is 0.2. The loss function is the Cross-Entropy Loss function. In order to avoid excessive training time and effectively use computing resources, avoid memory overload, the maximum batch size is set to 32. The training round is set to 100, so that the model can learn fully. When the training result reaches a high standard and fails to further improve in the next several rounds of iteration, in order to stop unnecessary iterations and waste of computing resources, the early stopping parameter is set to 50.
[0097] 4) Data preprocessing
[0098] Because of the existence of the feed and retreat process in the whole signal acquisition process, the broach does not carry out the actual effective cutting during this period of time, so the two empty stroke information is removed, and the most useful processing signal is reserved.
[0099] In addition, the three signals are derived from vibrations in different directions, so there may be large differences, so the maximum and minimum normalization operation will be used for all input signals, and the value distribution of the input sequence will be in [0, 1] after being input into the model, so that the model training is more stable, the convergence speed is faster, and the difference between different characteristic values can be reduced. The formula of maximum and minimum normalization is as follows:
[0100]
[0101] where x t is the value of the original signal at the current time step t; represents the value of the processed signal at the current time step; x min represents the minimum value that the signal can reach; x max represents the maximum value that the signal can reach.
[0102] 5) Train test model
[0103] The preprocessed data is used as the input quantity and input into the model for training. In each round, one training is performed, and the current model is immediately validated. The output of the model is the predicted label, and the loss function is used to quantify the difference between the model prediction result (label) and the actual result (label), and output the loss value. The optimizer calculates the gradient of the loss value with respect to the model parameters through backpropagation, and updates the weights of the model according to these gradients, so as to gradually reduce the loss value. When the number of training reaches the set or meets the early stop requirement, the training is ended, and the model that performs best in the validation set will be designated as the final model obtained this time.
[0104] The final model is the model that performs best during the entire training process, which will be tested for recognition ability on the test set divided earlier, and the test result will be used as the basis for evaluating the model.
[0105] 4、Identification process:
[0106] First, the original vibration signal time domain information is obtained through the sensor. Because the three signals are derived from vibrations in different directions, there may be large differences, so normalization operation will be used for all input signals before being input into the model, so that the model training is more stable, the convergence speed is faster, and the difference between different characteristic values can be reduced. A relatively simple maximum and minimum normalization is used to distribute the value of the input sequence in [0, 1].
[0107] The normalized three-direction vibration signal will be subjected to a 1D CNN network for preliminary feature extraction. The preliminary extracted features will be divided into multiple patches according to the time sequence logic. These patches will be subjected to dimension change through an embedding layer, spliced by adding classification labels and position embedding, and then put into a Transformer encoder network for global feature extraction. In the Transformer encoder, the input is subjected to calculation through a multi-head attention mechanism, put into an MLP module for further nonlinear transformation and feature combination, so as to extract higher-level features.
[0108] In the model of the application, the MLP module is composed of an LN layer, two linear (Linear) layers, an activation function layer and dropout. The activation function uses the Gaussian error linear unit function (Gaussian Error Linear Unit, GELU), which has the characteristics of smoothness, probability interpretation and introduction of nonlinearity. The expression of GELU is shown in formula (1-6)
[0109]
[0110] where Φ(x) is the cumulative distribution function of the standard normal distribution. This definition means that the input x is weighted by its corresponding probability (i.e. the probability that x is positive), thereby realizing activation. For convenience of calculation, GELU often uses the approximate expression after the approximate equality. The approximate expression not only has fast calculation speed, but also can well capture the characteristics of GELU in most cases, and the actual effect is almost the same as using the complete function.
[0111] At the end of the model, the fully learned classification labels are extracted and put into an MLP head with two fully connected (Fully Connected, FC) layers to obtain the classification results.
[0112] Table 1 Comparison of identification results of different models
[0113]
[0114] The above comparison uses the same vibration signal data set, and the server hardware configuration environment is as follows:
[0115]
[0116] From the above comparison results, it can be seen that the application has obvious improvement in recognition accuracy, single recognition time, precision, recall rate, F1 score compared with the existing recognition model.
[0117] The above embodiments are only the preferred embodiments of the present application, and are not intended to limit the technical solutions of the present application, and any technical solutions that can be realized on the basis of the above embodiments without creative labor shall be considered to fall within the protection scope of the present application patent.
Claims
1. A method of identifying a wear state of a mortise tool, characterized by, Comprising the following steps: 1) data set acquisition: The acceleration signal sensor will be arranged on the tool box of the broaching machine, and the time domain information of the original vibration signal in the x, y, z three geometric directions will be obtained in a single broaching stroke; the broach will be taken off from the tool box after each broaching stroke, and the actual wear value will be measured by optical equipment, and a label corresponding to the current tool wear will be marked according to the measured value, and the collected vibration signal will be associated with the corresponding wear label, so as to obtain the data set; 2) data preprocessing The idle stroke information in the data set is removed, and the maximum and minimum normalization operation is used for all input signals in the data set, and the value distribution of the input sequence is in [0, 1] after the maximum and minimum normalization operation, and then the input is used as the model input. The formula of maximum and minimum normalization is as follows: where x t is the value of the original signal at the current time step t; represents the value of the processed signal at the current time step; x min denotes the minimum value that the signal can reach; x max represents the maximum value that the signal can reach; 3) model construction The CNN-ViT broach wear state recognition model is constructed to extract features from the broaching processing vibration signal containing space-time information and complete the monitoring of the wear state of the broach; wherein the recognition model includes convolutional neural network CNN and visual transformer ViT; 4) data set division The labeled signal is divided into three parts of training set, validation set and test set, wherein the training set is used for model training; the validation set is verified after each training round, and the model with the best performance in the validation set is reserved, and the test set is used to test the best model saved finally to evaluate the quality of the model; 5) training and testing model The preprocessed data is used as the input quantity and input into the model for training, and the current model is immediately validated once in each round. The output of the model is the predicted label, and the loss function is used to quantify the difference between the predicted result and the actual result, and outputs the loss value. The optimizer calculates the gradient of the loss value to the model parameters through back propagation, and updates the weights of the model according to these gradients, so as to gradually reduce the loss value. When the number of training reaches the set or meets the early stop requirements, the training is ended, and the model with the best performance in the validation set is defined as the final model; 6) state recognition The vibration signal is input into the final model of step 5) to obtain the broach wear state recognition result.
2. The method according to claim 1, wherein The label corresponding to the current tool wear is marked according to the measured value, which is as follows: The tool wear considers the relief wear of the broach, and according to the wear standard, the broach wear state is divided into three types: initial wear 0-50 mu m, normal wear 51-200 mu m and severe wear >200 mu m.
3. The method of identifying the wear state of a mortise router according to claim 1, characterized in that, Step 3) is as follows: Convolutional neural network CNN: the input signal is projected to high dimension through point-by-point convolution, and then local feature extraction and dimension reduction are performed through 2 one-dimensional depth separable convolution DSC and 1 one-dimensional convolutional neural network Conv1D, wherein batch normalization BN step is performed after each convolution operation and activation function ReLU is used. At the same time, residual connection is added in the two DSCs; the output obtained after the input passes through the CNN part is the local extracted feature of the network model; Visual Transformer ViT: The sequence of local extracted features will be divided into multiple sequence blocks according to the time sequence logic, and the sequence blocks will be changed in dimension through the embedding layer, then a classification token, namely ClS Token, will be introduced, and a position encoding will be added to make the model understand the position information of the input and capture the order relationship of the elements, after random dropout, the embedded information will be sent to the Transformer encoder for global feature extraction; In the Transformer encoder, first, the multi-head self-attention mechanism is calculated, in the self-attention mechanism, the query, key and value come from the same sequence, namely the input sequence itself, which is used to model the correlation between each element in the sequence; The sequence after multi-head self-attention calculation will increase the non-linear feature extraction capability through the multi-layer perception block MLP Block, which is composed of a layer normalization LN, two linear layers, an activation function GELU and a random dropout; finally, the classification token carrying the global features of the sequence will be extracted and normalized by layer. Then, it will be input into the multi-layer perception head MLP Head composed of two fully connected layers and a random dropout, and finally mapped to the classification label space.
4. The method of identifying the wear state of a mortise router according to claim 1, characterized in that, The expression of the self-attention mechanism is as follows: For each input element X, a query vector Q, a key vector K and a value vector V are generated, the query vector Q is dot multiplied with the key vector K to obtain a relevance score, which is then divided by the square root of the vector dimension Scaling is performed, then the attention weight of each element is obtained by the Softmax function, and the final output is obtained by weighted summation of V according to the attention weight; In the application of self-attention mechanism, multi-head attention is used to enhance the representation capability, forming a multi-head self-attention mechanism; the representation capability of the model is enhanced by parallel computing attention through multiple heads, so that the model can capture different features of the input sequence from multiple angles and enhance the global feature representation. Specifically, it is assumed that there are h heads, and the dimension of each head is d head , which is 1 / h of the dimension d k of the head i The attention calculation by the corresponding Q i , K i , V i is as follows: wherein Q represents the Qth head i , K i , V i mapping matrix; The results of all multi-head attention are spliced together to get richer feature representation results: MuliHead(Q, K, V) = Concat(headl, head2,... head h )W O where W O is a linear transformation matrix used to map the concatenated output back to the original feature space.
5. The method of identifying the wear state of a mortise router according to claim 1, wherein The step 6) is specifically as follows: The normalized three-direction vibration signal will be processed by the 1DCNN network to extract the initial features, and the initial extracted features will be divided into multiple blocks Patch according to the time sequence logic; the block Patch will be changed in dimension through the embedding layer, and the classification token will be spliced and added with the position embedding, and then put into the Transformer encoder network for global feature extraction; in the Transformer encoder, the input is calculated through the multi-head attention mechanism, and put into the MLP module for further nonlinear transformation and feature combination, so as to extract higher level features; the MLP module is composed of LN layer, two linear layers, an activation function layer and random dropout, wherein the activation function uses Gaussian error linear unit function GELU, and introduces nonlinearity, the expression of GELU is as follows: Where Φ(x) is the cumulative distribution function of the standard normal distribution, which means that the input x is weighted by its corresponding probability, so as to realize activation; for easy calculation, GELU uses the approximate expression after the approximate equal sign; At the end of the model, the fully learned classification token is extracted and put into the MLP head with two fully connected FC layers to get the classification result.
Citation Information
Patent Citations
A Rotating Tool Wear Monitoring Method Based on the Feature Fusion Map of Acoustic-Vibration Signals
CN116787225B
Single-working-condition tool wear prediction method based on deep fusion network
CN119848466A
Device for detecting abrasion of broach
CN222364538U
Turbine disc mortise broach abrasion identification method based on vibration signals and deep learning
CN116257814A
Turbine disc mortise broach abrasion identification method based on combination of space and time sequence
CN116628467A