Tool Wear Prediction Method Based on Multi-Scale Spatiotemporal Feature Fusion Neural Network
Through multi-scale spatiotemporal features fusion neural network, combined with 1×1 convolutional layer and GRU layer, the problem of failure to effectively combine spatial features and temporal features in the prior art is solved, and high precision and high generalization capabilities of tool wear prediction are achieved.
Patent Information
- Application Number
- CN202210727090.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-24
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2042-06-24
AI Technical Summary
The existing deep learning methods fail to effectively combine spatial and temporal features in tool wear prediction, and fail to fully extract local features, resulting in poor prediction accuracy and inability to adapt to variable processing conditions.
A multi-scale spatiotemporal feature fusion neural network is adopted, and through feature expansion modules, multi-scale spatial feature extraction modules, connection modules, temporal feature extraction modules and regression modules, combined with 1×1 convolutional layer and gated cyclic unit GRU layer, the full fusion and extraction of the spatial features and temporal features of tool wear data are achieved.
It improves the accuracy and generalization ability of tool wear prediction, reduces training time, enhances the nonlinear expression ability of the model, reduces the number of parameters, and improves the prediction effect.
Smart Images

Figure CN115169660B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of tool wear evaluation and prediction, and in particular to a tool wear prediction method based on a multi-scale spatio-temporal feature fusion neural network. Background Art
[0002] The tool is an execution component of a numerically controlled machine tool, and its health state directly affects the surface quality and production efficiency of the workpiece. Premature replacement of the tool will increase the manufacturing cost; if the worn or damaged tool is not replaced in time, it will affect the quality of the workpiece, and in severe cases, it will cause the machine tool equipment to stop, and even endanger the life safety of the operator.
[0003] At present, the methods that can be used to evaluate tool wear mainly include the direct method and the indirect method. The direct method realizes the measurement of tool wear by using equipment such as an electron microscope, but this method needs to be used under the condition of machine tool shutdown, which delays the production progress, so it is difficult to be popularized and applied to the actual processing site. Compared with the direct method, the indirect method can realize the real-time online prediction of tool wear. This method installs a variety of sensors at designated positions on the machine tool to collect monitoring data during the machining process, then uses a feature extraction method to extract features that can effectively characterize the change of tool wear from the monitoring data, and finally uses a traditional machine learning model to learn the mapping relationship between the features and the wear value, which has the advantages of convenient operation and no impact on the production progress. However, due to the limited non-linear expression ability of the traditional machine learning model and the dependence on manual feature extraction, the prediction effect of wear is not good.
[0004] With the improvement of the computing power of computer equipment, deep learning methods have gradually dominated in the fields of image classification, speech recognition, etc. This method extracts features more thoroughly, has a stronger non-linear ability to express, can get rid of the limitations of manual feature extraction and expert knowledge, and can achieve better regression prediction results, so it has received extensive attention from scholars in the field of tool wear prediction.
[0005] At present, when deep learning methods are applied to solve the tool wear prediction problem, convolutional neural networks (CNNs) and long short-term memory networks (LSTMs) are usually used to extract the spatial and temporal features of tool wear data. However, the prediction effect of using only spatial features or temporal features alone is not good. Therefore, some scholars have proposed to fuse spatial features and temporal features to obtain spatio-temporal features and improve the prediction accuracy of wear. Among them, cascading CNNs and LSTMs to extract the spatio-temporal features of wear monitoring data is a relatively mainstream method at present. However, in this method, there will be a problem of loss of temporal features after the data is extracted by the convolutional neural network for spatial features, resulting in limited improvement in the prediction effect. Therefore, studying how to effectively fuse the temporal and spatial features of tool wear monitoring data is of great significance for improving the prediction accuracy of wear.
[0006] The following technical problems mainly exist when existing deep learning methods are applied to solve the tool wear prediction problem:
[0007] (1) It cannot adapt to changing machining conditions;
[0008] (2) It fails to effectively combine the spatial and temporal features of tool wear monitoring data;
[0009] (3) It does not fully extract the local features of tool wear monitoring data. Summary of the Invention
[0010] The purpose of the present invention is to overcome the deficiencies in the prior art and provide a tool wear prediction method based on a multi-scale spatio-temporal feature fusion neural network, which can fully combine the spatial and temporal features of tool wear monitoring data, and has strong generalization ability and high prediction accuracy.
[0011] The purpose of the present invention is achieved through the following technical solutions:
[0012] A tool wear prediction method based on a multi-scale spatio-temporal feature fusion neural network, comprising:
[0013] Step 1: Collect vibration, acoustic emission, and cutting force data during several identical machining processes of the tool through vibration, acoustic emission, and cutting force sensors as the original input data S. The single machining data is denoted as S j , j = 1, 2, …, m, where m represents the number of machining times, that is, S = [S1, S2, S3, …, S m , and measure the wear value of the tool after each single machining;
[0014] Step 2: Correspond one by one the single - processing data collected in Step 1 with the tool wear values according to the number of processing times;
[0015] Step 3: Perform normalization and truncation processing on the original input data. Divide the single - processing data in the processed original input data into n sub - data segments equally. The sub - data segments are denoted as S j i , where i = 1, 2, …, n, and n is the number of sub - data segments, that is, S j =[S j 1 , S j 2 , S j 3 , …, S j n . The dimension of the sub - data segment S j i is [C, H, W]. C is the number of channels, representing the feature dimension of the sub - data segment, C = 1; H is the number of rows of the sub - data segment, representing the time step, and W is the number of columns of the sub - data segment, representing the number of features. Then divide the original input data S into a training set and a test set according to the ratio of 7:3;
[0016] Step 4: Establish a tool wear prediction model based on multi - scale spatio - temporal feature fusion;
[0017] Step 5: Process the data of the training set in the way of Step 3 and input it into the tool wear prediction model, taking the tool wear value as the training target to train the tool wear prediction model;
[0018] Step 6: Process the data of the test set in the way of Step 3 and input it into the tool wear prediction model for regression prediction, and output the wear prediction values of the test set.
[0019] Furthermore, the tool wear prediction model is composed of a feature expansion module, a multi - scale spatial feature extraction module, a connection module, a feature fusion module, a time feature extraction module and a regression module;
[0020] The feature expansion module is composed of n convolutional layers with a 1×1 convolution kernel size and a non - linear activation layer, and is used to expand the features of n sub - data segments, outputting n data segments. In particular, the n convolutional layers with a 1×1 convolution kernel size share weight parameters;
[0021] The multi - scale spatial feature extraction module is used to extract spatial features from the n data segments output by the feature expansion module, outputting n spatial feature data segments. The multi - scale spatial feature extraction module is composed of n spatial feature extraction units, and the n spatial feature extraction units respectively correspond to the n data segments output by the feature expansion module;
[0022] The connection module consists of a connection layer, which is used to connect n spatial feature data segments output by the multi-scale spatial feature extraction module and output multi-scale spatial features. The connection layer is used to sequentially connect the n spatial feature data segments output by the multi-scale spatial feature extraction module as the input data of the time feature extraction module;
[0023] The time feature extraction module consists of a gated recurrent unit (GRU) layer. The gated recurrent unit (GRU) layer is used to extract the dynamic changes of the multi-scale spatial features output by the connection module, that is, time features;
[0024] The feature fusion module consists of a flattening layer and a connection layer. The flattening layer is used to flatten both the multi-scale spatial features output by the connection module and the time features output by the time feature extraction module into 1D data. The connection layer connects the flattened spatial features and time features to obtain the spatio-temporal features of tool wear as the input of the regression module;
[0025] The regression module consists of a fully connected layer, an activation layer, and a Dropout layer.
[0026] Furthermore, each of the spatial feature extraction units consists of a first convolution module and a second convolution module connected in series; the convolution kernel in the first convolution module is larger than that in the second convolution module, which is used to extract more global local features. The size of the convolution kernel in the second convolution module is set to (i + 2, 3) in the order of sub-data segment S j i The first convolution module and the second convolution module both consist of a convolution layer, an activation layer, a batch normalization layer, and a pooling layer. The convolution layer is used to perform convolution operations on the input data; the activation layer is used to perform non-linear mapping on the data output by the convolution layer; the batch normalization layer is used to perform batch normalization processing on the data output by the activation layer; the pooling layer is used to perform max pooling processing on the data output by the activation layer.
[0027] Furthermore, the number of channels of the n data segments output by the feature expansion module is greater than the number of channels of the n sub-data segments.
[0028] Furthermore, the size of each convolution kernel in the first convolution module is equal, and the size of the convolution kernels in the second convolution module increases sequentially.
[0029] Furthermore, the calculation formula of the gated recurrent unit (GRU) layer is as follows:
[0030] z t =σ(W z x t +U z h t-1 )
[0031] rt = σ(W t x t + U t h t-1 )
[0032]
[0033]
[0034] Where: h t-1 is the input of the previous node, representing the information learned previously; x t is the input under the current node, representing the information to be learned previously; z t is the update gate, the logic gate when updating h t-1 ; r t is the reset gate, determining whether to discard the previous h t-1 ; is the information learned currently; W z , U z , W t , U t , W, U are related parameters; h t is the final output data. σ represents the Sigmoid function; tanh represents the tanh function; represents the Hadamard product, that is, the corresponding elements of the matrices are multiplied;
[0035] Furthermore, the input data of the time feature extraction module is formed by dividing the single - process data in the original input data into n sub - data segments, and the n sub - data segments pass through the feature expansion module and the multi - scale spatial feature extraction module in parallel and then are connected together.
[0036] The present invention also provides a tool wear prediction device based on a multi - scale spatio - temporal feature fusion neural network, including:
[0037] A data acquisition module, configured to collect the processing data of the tool in several identical processing processes as the original input data through sensors, and collect the wear value of the tool after each single - process machining; the original input data includes vibration, acoustic emission, and cutting force data;
[0038] A data arrangement module, configured to correspond the single - process machining data of the tool with the wear value of the tool one by one;
[0039] A data processing module, configured to perform normalization and truncation processing on the original input data and divide the training set and the test set;
[0040] The tool wear prediction module is provided with a tool wear prediction model based on multi-scale spatio-temporal feature fusion. The tool wear prediction model is composed of a feature expansion module, a multi-scale spatial feature extraction module, a connection module, a feature fusion module, a time feature extraction module, and a regression module. The tool wear prediction model is trained with a training set, and the test set is input into the trained tool wear prediction model for regression prediction to output the wear prediction value of the test set.
[0041] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. The characteristic is that when the processor executes the program, the steps of the tool wear prediction method based on the multi-scale spatio-temporal feature fusion neural network are implemented.
[0042] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the tool wear prediction method based on the multi-scale spatio-temporal feature fusion neural network are implemented.
[0043] Compared with the prior art, the beneficial effects brought by the technical solution of the present invention are as follows:
[0044] 1. In the prediction method of the present invention, first, 1×1 convolution is used to expand the features of each sub-data segment divided from the original input data, which improves the effect of the multi-scale spatial feature extraction module in extracting effective feature information. Adding a non-linear activation layer can improve the non-linear expression ability of the model. The feature expansion layer described in the present invention adopts a form of sharing parameters. The 1×1 convolution passed by n sub-data segments has the same weight parameters, effectively reducing the number of parameters and ensuring the consistency of feature expansion.
[0045] 2. In the prediction method of the present invention, aiming at the characteristic of a large amount of tool wear data, the single processing data in the original input data is divided into n sub-data segments for parallel processing, which reduces the training time. At the same time, convolution layers with convolution kernels of different scales are used for each sub-data segment to extract spatial features, and spatial features of different scales can be extracted. Compared with only using a single scale to extract spatial features, this method can retain more useful information and improve the prediction accuracy of tool wear.
[0046] 3. In the prediction method of the present invention, the single processing data in the original input data is divided into n sub-data segments to perform feature expansion and extraction of spatial features respectively, and then the n spatial feature data segments are fused into multi-scale spatial features through the connection module as the input data of the time feature extraction module, maximizing the retention of the spatial features and time features of the tool wear data. Compared with inputting the original input data into the time feature extraction module, the number of parameters is reduced, the model training time is reduced, the effective features can be reused, and the prediction accuracy and generalization ability of the model are improved.
[0047] 4. In the prediction method of the present invention, a gated recurrent unit (GRU) is used as the time feature extraction layer in the time feature extraction module. Compared with the commonly used long short-term memory neural network (LSTM), it reduces the weight parameters and can accelerate the training speed of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 is a schematic diagram of the overall process of the method of the present invention;
[0049] Figure 2 is a schematic diagram of the composition and processing process of the feature expansion module;
[0050] Figure 3 is a schematic diagram of the composition and processing process of the multi-scale spatial feature extraction module;
[0051] Figure 4 is a schematic diagram of the regression module in this embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0052] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. The method in the present invention is implemented based on the Python language and the PyTorch framework.
[0053] This embodiment provides a tool wear prediction method based on a multi-scale spatio-temporal feature fusion neural network, as Figure 1 shown, and the specific process is described as follows:
[0054] Step 1: Install acoustic emission, vibration, and current sensors on the machine tool, collect vibration, acoustic emission, and cutting force data during multiple identical machining processes, and obtain the original input data denoted as S, and the single machining data denoted as S j , j = 1, 2,..., m, where m represents the number of machining times. In this example, m is 315, that is, S = [S1, S2, S3,..., S 315 . At the same time, install an electron microscope beside the machine tool cutter to measure and record the tool wear after single machining;
[0055] Step 2: Correspond the single machining data collected in Step 1 with the tool wear value according to the number of machining times;
[0056] Step 3: Normalize and truncate the original input data, and equally divide the single machining data in the processed original input data into n sub-data segments, and the sub-data segments are denoted as S j i , i = 1, 2,..., n, where n is the number of sub-data segments, that is, S j = [Sj 1 ,S j 2 ,S j 3 ,…,S j n , sub - data segment S j i has dimensions [C, H, W]. C is the number of channels, representing the feature dimension of the sub - data segment. At this time, C = 1. H is the number of rows of the sub - data segment, representing the time step. In this embodiment, H = 2000. W is the number of columns of the sub - data segment, representing the number of features. In this embodiment, W = 7. Then, S is divided into a training set and a test set according to a ratio of 7:3;
[0057] Step 4: Establish a tool wear prediction model based on multi - scale spatio - temporal feature fusion. The tool wear prediction model consists of a feature expansion module, a multi - scale spatial feature extraction module, a connection module, a feature fusion module, a time feature extraction module, and a regression module;
[0058] 401. Feature expansion module:
[0059] The feature expansion module is as Figure 2 shown, and is composed of n convolutional layers with a convolutional kernel size of 1×1 and n non - linear activation layers. The 1×1 convolutional layer performs a convolutional operation on each sub - data segment, increasing the number of channels of the sub - data segment from 1 to 5 to achieve feature expansion. In particular, n sub - data segments correspond to n 1×1 convolutional layers respectively, and the n 1×1 convolutional layers share parameters to ensure the consistency of feature expansion. The non - linear activation layer uses the Sigmoid function as the activation function, which performs a non - linear mapping process on the output data of the convolutional layer, mapping the data value to the interval of 0 - 1 to ensure that each feature has the same weight.
[0060] The convolutional operation adopts the method of the existing technology. In this example, the 1×1 convolutional kernel in the convolutional layer traverses the input data and performs a convolutional operation with the local area of the input data as shown in Equation (1):
[0061]
[0062] In Equation (1): is the feature map output by the j - th convolutional kernel in the l - th layer; M i is the set of output feature maps of the (l - 1) - th layer; is the i - th feature map output by the (l - 1) - th layer; is the j - th convolution in the l - th layer; is the bias term corresponding to the j - th convolution in the l - th layer; f(·) is the activation function.
[0063] 402. Multi - scale spatial feature extraction module:
[0064] The multi-scale spatial feature extraction module is as follows Figure 3 shown, and it is composed of n spatial feature extraction units. The n spatial feature extraction units respectively correspond to n data segments output by the feature expansion module. Each spatial feature extraction unit is composed of 2 convolutional modules connected in series, namely convolutional module one and convolutional module two. In particular, the convolutional kernel in convolutional module one is larger than that in convolutional module two, and is set to (100, 3) for extracting more global local features. The convolutional kernel of the convolutional layer in convolutional module two is set to (i + 2, 3) in the order of sub-data segment S j i , adopting a multi-scale increasing convolutional kernel size for each sub-data segment, and its function is to fully extract spatial features of different scales. Both convolutional module one and convolutional module two are composed of a convolutional layer, an activation layer, a batch normalization layer and a pooling layer. The convolutional layer is used to perform a convolutional operation on the input data; the activation layer is used to perform a non-linear mapping on the data output by the convolutional layer, and the activation layer function adopts the LeakyReLU function; the batch normalization layer is used to perform batch normalization processing on the data output by the activation layer; the pooling layer is used to perform max pooling processing on the data output by the activation layer;
[0065] The connection module is composed of a connection layer, and is used to connect the n spatial feature data segments output by the multi-scale spatial feature extraction module. The connection layer connects the n spatial feature data segments in sequence as the input of the time feature extraction module and the feature fusion module.
[0066] 403. Time Feature Extraction Module
[0067] The time feature extraction module is composed of GRU layers. The operation of the GRU layers adopts the method of the existing technology, and the calculation formula of the GRU layers is as follows
[0068] z t = σ(W z x t + U z h t-1 )
[0069] r t = σ(W t x t + U t h t-1 )
[0070]
[0071]
[0072] In the formula: h t-1 is the input of the previous node, representing the information learned before;
[0073] x t is the input under the current node, representing the information to be learned previously;
[0074] z t is the update gate, the logic gate for updating h t-1 when;
[0075] r t is the reset gate, determining whether to abandon the previous h t-1 ;
[0076] is the information learned currently;
[0077] W z 、U z 、W t 、U t 、W, U are related parameters;
[0078] h t is the final output data;
[0079] σ represents the Sigmoid function;
[0080] tanh represents the tanh function;
[0081] represents the Hadamard product, that is, the corresponding elements of the matrices are multiplied;
[0082] 404. Feature Fusion Module
[0083] The feature fusion module consists of a flattening layer and a concatenation layer. The flattening layer is used to flatten both the multi-scale spatial features output by the connection module and the temporal features output by the temporal feature extraction module into 1D data. The concatenation layer concatenates the flattened spatial features and temporal features to obtain the spatio-temporal features of tool wear, which are used as the input of the regression module.
[0084] 405. Regression Module:
[0085] The regression module consists of a fully connected layer, an activation layer, and a DropOut layer. The parameter settings and structure are as Figure 4 shown. The first fully connected layer uses 64 hidden neurons, the second fully connected layer uses 16 hidden neurons, the third fully connected layer uses 1 hidden neuron. The activation layer uses LeakyReLU as the activation function, the gradient is set to 0.02, and the dropout probability of the Dropout layer is set to 0.3.
[0086] Step 5: After processing the data of the training set in the manner of Step 3, input it into the tool wear prediction model based on multi-scale spatio-temporal feature fusion constructed in Step 4 to train the tool wear prediction model based on multi-scale spatio-temporal feature fusion. The Adam optimizer is used in the training process of the model, the batch_size is set to 15, the learning rate is set to 0.005, and the epoch is set to 1000.
[0087] Step 6: After processing the data of the test set in the manner of Step 3, input it into the model trained in Step 5 for regression prediction, and output the wear prediction value of the test set.
[0088] An embodiment of the present invention provides a specific implementation manner of a tool wear prediction device based on a multi-scale spatio-temporal feature fusion neural network that can implement a tool wear prediction method, including:
[0089] A data acquisition module, configured to collect machining data of a tool in several identical machining processes through sensors as original input data, and collect the wear value of the tool after each single machining; the original input data includes vibration, acoustic emission, and cutting force data.
[0090] A data arrangement module, configured to correspond the machining data of the tool for each single time with the wear value of the tool one by one.
[0091] A data processing module, configured to perform normalization and truncation processing on the original input data and divide it into a training set and a test set.
[0092] A tool wear prediction module, provided with a tool wear prediction model based on multi-scale spatio-temporal feature fusion. The tool wear prediction model is composed of a feature expansion module, a multi-scale spatial feature extraction module, a connection module, a feature fusion module, a time feature extraction module, and a regression module; the tool wear prediction model is trained through a training set, and the test set is input into the trained tool wear prediction model for regression prediction to output the wear prediction value of the test set.
[0093] Specifically, the data acquisition module includes emission, vibration, and current sensors installed on the machine tool, which can collect vibration, acoustic emission, and cutting force data of the machine tool in multiple identical machining processes. At the same time, an electron microscope is installed beside the machine tool tool for measuring and recording the tool wear after each single machining.
[0094] In the data processing module, the single machining data in the processed original input data is evenly divided into n sub-data segments, and the sub-data segment is represented as S j i , i = 1, 2,..., n, where n is the number of sub-data segments, that is, S j = [S j 1 , S j2 , S j 3 , …, S j n , sub - data segment S j i The dimension of is [C, H, W]. C is the number of channels, representing the feature dimension of the sub - data segment. At this time, C = 1. H is the number of rows of the sub - data segment, representing the time step. In this embodiment, H = 2000. W is the number of columns of the sub - data segment, representing the number of features. In this embodiment, W = 7. Then, the training set and the test set are divided according to the ratio of 7:3;
[0095] An embodiment of the present application also provides a specific implementation manner of an electronic device that can implement all steps in the tool wear prediction method based on the multi - scale spatio - temporal feature fusion neural network in the above - mentioned embodiment. The electronic device specifically includes the following:
[0096] A processor, a memory, a communications interface, and a bus;
[0097] Among them, the processor, the memory, and the communications interface complete communication with each other through the bus; the communications interface is used to implement information transmission between related devices such as server - side devices, metering devices, and user - side devices.
[0098] The processor is used to call the computer program in the memory. When the processor executes the computer program, it implements all steps in the tool wear prediction method based on the multi - scale spatio - temporal feature fusion neural network in the above - mentioned embodiment.
[0099] An embodiment of the present application also provides a computer - readable storage medium that can implement all steps in the tool wear prediction method based on the multi - scale spatio - temporal feature fusion neural network in the above - mentioned embodiment. A computer program is stored on the computer - readable storage medium. When the computer program is executed by the processor, it implements all steps in the tool wear prediction method based on the multi - scale spatio - temporal feature fusion neural network in the above - mentioned embodiment.
[0100] Finally, it should be pointed out that: The above examples are only used to illustrate the calculation process of the present invention, rather than limiting it. Although the present invention has been described in detail with reference to the foregoing examples, those of ordinary skill in the art should understand that they can still modify the calculation process recorded in the foregoing examples, or perform equivalent substitution on some of the parameters. These modifications or substitutions do not make the essence of the corresponding calculation method deviate from the spirit and scope of the calculation method of the present invention.
[0101] The above description has been made of specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0102] Although this application provides method operation steps such as in the embodiments or flowcharts, more or fewer operation steps may be included based on routine or non-creative labor. The order of steps recited in the embodiments is only one way among numerous orders of step execution and does not represent the only execution order. When actually executed by a device or client product, it may be executed in the order shown in the embodiments or the drawings or in parallel (such as in an environment of parallel processors or multithreaded processing).
[0103] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) that contain computer-usable program code.
[0104] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0105] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device that implements the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0106] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable apparatus to generate a computer-implemented process, thereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one process or multiple processes and / or blocks Figure 1 one process or multiple processes and / or blocks Figure 1 steps of the functions specified in one block or multiple blocks.
[0107] The present invention is not limited to the embodiments described above. The above description of the specific embodiments is intended to describe and illustrate the technical solutions of the present invention. The above specific embodiments are merely illustrative and not restrictive. Without departing from the spirit of the present invention and the scope protected by the claims, those of ordinary skill in the art can make many forms of specific transformations under the inspiration of the present invention, and these all fall within the protection scope of the present invention.
Claims
1. A tool wear prediction method based on a multi-scale spatio-temporal feature fusion neural network, characterized in that Including: Step 1: Collect vibration, acoustic emission, and cutting force data during several identical machining processes of the tool through vibration, acoustic emission, and cutting force sensors as the original input data S. The data for a single machining process is denoted as S j , j = 1, 2, …, m, where m represents the number of machining times, i.e., S = [S1, S2, S3, …, S m , and measure the wear value of the tool after each single machining Step 2: Correspond one-to-one the single-process data collected in Step 1 with the tool wear values according to the number of processing times; Step 3: Normalize and truncate the original input data, and evenly divide the single-process data in the processed original input data into n sub-data segments, denoted as S j i , where i = 1, 2, …, n, and n is the number of sub-data segments, i.e., S j =[S j 1 ,S j 2 ,S j 3 ,…,S j n , and the dimension of the sub-data segment S j i is [C, H, W]. C is the number of channels, representing the feature dimension of the sub-data segment, and C = 1; H is the number of rows of the sub-data segment, representing the time step, and W is the number of columns of the sub-data segment, representing the number of features. Then divide the original input data S into a training set and a test set according to the ratio of 7:3; Step 4: Establish a tool wear prediction model based on multi-scale spatio-temporal feature fusion; the tool wear prediction model consists of a feature expansion module, a multi-scale spatial feature extraction module, a connection module, a feature fusion module, a time feature extraction module, and a regression module; The feature expansion module is composed of n convolutional layers with a kernel size of 1×1 and a non-linear activation layer, and is used to expand the features of n sub-data segments, outputting n data segments. In particular, the n convolutional layers with a kernel size of 1×1 share weight parameters; The multi-scale spatial feature extraction module is used to extract spatial features from the n data segments output by the feature expansion module, outputting n spatial feature data segments. The multi-scale spatial feature extraction module consists of n spatial feature extraction units, and the n spatial feature extraction units respectively correspond to the n data segments output by the feature expansion module; The connection module consists of a connection layer, and is used to connect the n spatial feature data segments output by the multi-scale spatial feature extraction module, outputting multi-scale spatial features. The connection layer is used to sequentially connect the n spatial feature data segments output by the multi-scale spatial feature extraction module as the input data of the time feature extraction module; The time feature extraction module consists of a gated recurrent unit (GRU) layer; the gated recurrent unit (GRU) layer is used to extract the dynamic changes of the multi-scale spatial features output by the connection module, that is, time features; The feature fusion module consists of a flattening layer and a connection layer. The flattening layer is used to flatten both the multi-scale spatial features output by the connection module and the time features output by the time feature extraction module into 1D data. The connection layer connects the flattened spatial features and time features to obtain the spatio-temporal features of tool wear as the input of the regression module; The regression module consists of a fully connected layer, an activation layer, and a Dropout layer; Step 5: After processing the data in the training set in the manner of Step 3, input it into the tool wear prediction model, and use the tool wear value as the training target to train the tool wear prediction model; Step 6: After processing the data in the test set in the manner of Step 3, input it into the tool wear prediction model for regression prediction, and output the wear prediction values of the test set.
2. The tool wear prediction method based on a multi-scale spatio-temporal feature fusion neural network according to claim 1, wherein Each of the spatial feature extraction units is composed of a first convolutional module and a second convolutional module connected in series; the convolutional kernel in the first convolutional module is larger than the convolutional kernel in the second convolutional module, and is used to extract more global local features. The size of the convolutional kernel in the second convolutional module is set to (i + 2, 3) in the order of sub-data segment S j i ; both the first convolutional module and the second convolutional module are composed of a convolutional layer, an activation layer, a batch normalization layer and a pooling layer. The convolutional layer is used to perform a convolutional operation on the input data; the activation layer is used to perform a non-linear mapping on the data output by the convolutional layer; the batch normalization layer is used to perform a batch normalization process on the data output by the activation layer; the pooling layer is used to perform a max pooling process on the data output by the activation layer.
3. The tool wear prediction method based on a multi-scale spatio-temporal feature fusion neural network according to claim 1, characterized in that The number of channels of the n data segments output by the feature expansion module is greater than the number of channels of the n sub-data segments.
4. The tool wear prediction method based on a multi-scale spatio-temporal feature fusion neural network according to claim 2, wherein The size of each convolution kernel in the first convolution module is equal, and the size of the convolution kernels in the second convolution module increases sequentially.
5. The tool wear prediction method based on a multi-scale spatio-temporal feature fusion neural network according to claim 1, characterized in that The calculation formula of the gated recurrent unit (GRU) layer is as follows: In the formula: represents the Sigmoid function; represents the tanh function; denotes the Hadamard product, that is, the element-wise multiplication of matrices; ; is the input under the current node, representing the information to be learned previously; is the update gate, which updates the logical gate during the update; is a reset gate that determines whether to abandon the previous is the currently learned information; , , , are relevant parameters; It is the final output data.
6. The tool wear prediction method based on a multi-scale spatio-temporal feature fusion neural network according to claim 2, wherein, The input data of the time feature extraction module is formed by dividing the single-process data in the original input data into n sub-data segments, passing the n sub-data segments through the feature expansion module and the multi-scale spatial feature extraction module in parallel, and then connecting them.
7. A tool wear prediction device based on a multi-scale spatio-temporal feature fusion neural network, based on the tool wear prediction method according to any one of claims 1-6, characterized in that, Including: A data acquisition module, configured to collect machining data of a tool during several identical machining processes through sensors as original input data, and collect the wear value of the tool after each single machining; the original input data includes vibration, acoustic emission, and cutting force data; A data sorting module, configured to correspond the machining data of the tool for a single time with the wear value of the tool one by one; A data processing module, configured to perform normalization and truncation processing on the original input data and divide a training set and a test set; A tool wear prediction module, provided with a tool wear prediction model based on multi-scale spatio-temporal feature fusion, the tool wear prediction model is composed of a feature expansion module, a multi-scale spatial feature extraction module, a connection module, a feature fusion module, a time feature extraction module, and a regression module; the tool wear prediction model is trained through the training set, and the test set is input into the trained tool wear prediction model for regression prediction, and the wear prediction value of the test set is output.
8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the tool wear prediction method based on the multi-scale spatio-temporal feature fusion neural network according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the tool wear prediction method based on the multi-scale spatio-temporal feature fusion neural network according to any one of claims 1 to 6.