Mddgan-based tool wear state monitoring dataset enhancement method
By generating a dataset that closely resembles real tool wear samples using MDDGAN, the problem of sample class imbalance during tool wear is solved, thereby improving the accuracy of tool wear condition monitoring and the usability of the dataset.
Patent Information
- Application Number
- CN202310174221.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-27
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2043-02-27
AI Technical Summary
Existing technologies are unable to effectively address the problem of sample class imbalance during tool wear, resulting in insufficient prediction accuracy of deep learning models in tool wear condition monitoring.
We employ a generative adversarial network (MDDGAN) based on maximizing discriminator differences. Through a dynamic adversarial training strategy, we optimize the decision boundaries of the generator and discriminator, generating a dataset that closely resembles real tool wear samples, thereby enhancing the training dataset.
This improved the accuracy of deep learning models in monitoring tool wear conditions, enhanced the availability of datasets, and improved prediction accuracy.
Smart Images

Figure CN116304690B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of mechanical processing state monitoring, and particularly relates to a tool wear state monitoring data set enhancement method based on MDDGAN. BACKGROUND
[0002] A cutting tool is a core component of a numerical control machine tool, and the use state of the cutting tool directly affects the quality of a part and the machining efficiency of the machine tool. The cutting tool is subjected to severe extrusion and friction during the machining process, which can cause the tool to become dull or even damaged. Therefore, accurately identifying the tool state and timely and reasonably replacing the tool before the tool is damaged is beneficial to ensuring the integrity of the surface quality of a machined workpiece and improving the machining efficiency.
[0003] Thanks to the development of deep learning technology, using a deep learning network to indirectly monitor the tool wear state has become an effective method. However, these methods need a large amount of class-balanced tool wear data set to train the deep learning network model. Tool wear needs to be measured by professional instruments, which is time-consuming and labor-intensive. Therefore, it is difficult to obtain a large number of labeled tool wear samples. Moreover, during the tool wear process, the time in the initial wear stage and the rapid wear stage is relatively short, and the amount of samples collected is less than that in the normal wear stage, which causes the problem of unbalanced tool wear sample classes.
[0004] A sample data set enhancement method based on a generative adversarial network (GAN) provides a good solution to the above problems. The generative adversarial network can learn the data distribution of real samples and generate similar tool wear samples. However, during the gradual wear of the tool, the wear rate and degree of the tool are different. Although the class labels of the tool are consistent, the probability density distribution of the collected vibration signals also changes to some extent. Due to the problem of gradient disappearance of the generative adversarial network itself, it is difficult to learn the data distribution of complex and variable vibration signals. Therefore, we consider combining the maximizing discriminator discrepancy and GAN, and propose a data set enhancement method based on a maximizing discriminator discrepancy generative adversarial network (MDDGAN), which optimizes the model parameters of the generative adversarial network by introducing a new dynamic adversarial learning strategy, so as to generate tool wear samples and improve the prediction accuracy of the deep learning model for tool wear. SUMMARY
[0005] In view of the above problems, the present application provides a tool wear state monitoring data set enhancement method based on MDDGAN. The MDDGAN is designed with two discriminators, and the training of the discriminators and the generator of the MDDGAN is guided by the difference loss between the two discriminators and the traditional adversarial loss. In this process, the decision boundary of the two discriminators is dynamically optimized, so that the sample distribution generated by the generator gradually approaches the real tool wear sample distribution.
[0006] The technical scheme of the present application: a tool wear state monitoring data set enhancement method based on MDDGAN, first, the vibration signal of the spindle in the tool cutting process is collected, and the vibration signal is converted into frequency spectrum data and input into the MDDGAN; second, the two discriminators of the MDDGAN are trained to maximize the traditional adversarial loss and the discriminator difference loss, the generator of the MDDGAN is trained to minimize the traditional adversarial loss and the discriminator difference loss, and the three are dynamically trained in opposition until the training is completed, and the model parameters of the generator are saved; then, the trained generator is used to generate tool wear samples, and it is judged whether the generated tool wear sample distribution is similar to the real tool wear sample distribution; finally, the real tool wear sample and the generated tool wear sample are combined together and input into a deep learning network model to verify the availability of the generated sample; the specific steps are as follows:
[0007] First, collect the vibration signal in the tool cutting process
[0008] In the tool cutting process, the acceleration sensor is fixed on the spindle, and the data acquisition system collects the vibration signal of the spindle in the machining process. The vibration signal is converted into frequency spectrum data as a tool wear sample.
[0009] Second, establish the MDDGAN model and perform dynamic adversarial training
[0010] The MDDGAN is composed of three model structures, a generator G and two discriminators D1 and D2 with different initializations. The traditional GAN optimizes the network model parameters of the generator by minimizing the adversarial loss to ensure the consistency of the distribution of real samples and generated samples. The generator adversarial loss function is shown in formula (1):
[0011]
[0012] Where, P z (z) is the distribution of a given prior noise z, G(z; θ g ) is the sample data generated from the noise data z, θ g represents the network parameters of the generator G; represents the expectation that z comes from the noise distribution.
[0013] D1 and D2 are used to distinguish the generated samples and the real samples. The outputs of D1 and D2 are not only used for the calculation of the adversarial loss function, but also used for the calculation of the discriminator difference loss in the following. The traditional GAN optimizes the network model parameters of the discriminator by minimizing the adversarial loss. It is noted here that D1 and D2 are initialized differently in order to obtain different discriminators from the beginning of training. The adversarial loss functions of D1 and D2 are shown in equations (2) and (3):
[0014]
[0015]
[0016] where D(x; θ d1 ) and D(x; θ d2 ) are the output probabilities of the discriminators D1 and D2 indicating that x comes from the real data, θ d1 and θ d2 are the network model parameters of the discriminators D1 and D2, respectively, and E(x) represents the expectation that x comes from the real data distribution.
[0017] The output functions of D1 and D2 are both Sigmoid functions. Here, the difference term is used as the optimization function of the decision boundary. The difference between the probability outputs of D1 and D2 is defined as shown in equation (4):
[0018]
[0019] where, represents the new generated sample data set, dis(·) represents the difference function, p1 and p2 represent the probability outputs of D1 and D2, respectively, and the L1 norm is used in the present application, and the calculation is shown in equation (5):
[0020] dis(p1, p2) = ||p1-p2||1 (5)
[0021] Based on the above objective function, the dynamic adversarial training strategy based on the decision boundary is introduced into the GAN model training. We optimize the decision boundaries of the two discriminators D1 and D2 through dynamic adversarial training, so that the generated sample distribution is closer to the real sample distribution. The dynamic training steps of MDDGAN are as follows:
[0022] (1) The generator G generates samples x g The real tool wear samples (with label set to 1) are input into D1 and D2. Then the network parameters of G are fixed, and the network parameters of D1 and D2 are updated by maximizing the adversarial loss as shown in equation (6):
[0023] max D1,D2 (L D1(x r ,x g )+L D2 (x r ,x g ))(6)
[0024] (2) The samples generated by G (the label is set to 1) are input into D1 and D2 to obtain the adversarial loss. At this time, the network parameters of the discriminators D1 and D2 are fixed, and the network parameters of G are updated by minimizing the adversarial loss, as shown in equation (7):
[0025] min G L G (x g ) (7)
[0026] (3) The updated G regenerates new samples At this time, the newly generated samples are close to the real samples. They are input into D1 and D2 trained in step (1), and the difference between the probability outputs of D1 and D2 is obtained. The network parameters of G are fixed, and the two discriminators are trained to maximize the difference loss while ensuring the discrimination performance of the two discriminators on real samples and generated samples, so that a stricter decision boundary can be obtained, and the process is shown in equation (8):
[0027]
[0028] (4) The network parameters of D1 and D2 are fixed, and G is independently trained to minimize the difference loss and the adversarial loss. This step forms a dynamic adversarial training with step (3) to align the generated sample distribution with the real sample distribution given a strict decision boundary. The objective function is shown in equation (9):
[0029]
[0030] By repeating the above four steps, the optimal generator G is finally obtained. The model parameters of the generator are saved.
[0031] Third step, comparison of the similarity of generated data and real data
[0032] The trained generator is used to generate sample data, and the generated tool wear spectrum data and the real tool wear spectrum data are compared and analyzed to determine whether the distribution of the generated sample data and the real sample data is the same. If not, return to the MDDGAN for further adversarial training until the distribution of the generated sample data and the real sample data is the same.
[0033] Fourth step, verification of the availability of generated sample data
[0034] The deep learning network model is trained by using the original unbalanced tool wear training data set and the enhanced tool wear training data set respectively, the prediction accuracy of the two is tested, and the availability of the generated data is verified.
[0035] Compared with the prior art, the present application has the beneficial effects that:
[0036] 1. The present application combines the maximization of discriminator difference with GAN, and uses a dynamic adversarial training strategy based on decision boundary to assist in optimizing the network parameters of GAN, effectively improving the learning ability of GAN for variable and complex vibration signal data distribution, and effectively enhancing the tool wear training data set.
[0037] 2. The present application uses the enhanced tool wear training data set to train the deep learning network model, which can effectively improve the accuracy of tool wear state monitoring. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 The flowchart of the tool wear state monitoring data set enhancement method based on MDDGAN.
[0039] Figure 2 The schematic diagram of the sensor installation position.
[0040] Figure 3 The structure diagram of the MDDGAN used in the present application.
[0041] Figure 4 The schematic diagram of the dynamic training step.
[0042] Figure 5 (a) is the discriminator loss value, (b) is the generator loss value, and (c) is the difference loss value between the two discriminators.
[0043] Figure 6 (a) is the real tool wear frequency spectrum data, and (b) is the generated tool wear frequency spectrum data.
[0044] Figure 7 (a) is the test result of the original unbalanced data set, and (b) is the test result of the data set enhanced by MDDGAN.
[0045] In the figure: 1 main shaft, 2 acceleration sensor, 3 tool shank, 4 tool, 5 titanium alloy workpiece. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application will be described in detail with reference to the accompanying drawings. Figure 1 Taking the milling of titanium alloy on a three-axis vertical machining center as an example, the embodiments of the present application are described in detail.
[0047] In this experiment, a 10mm diameter four-tooth feed tool holder with carbide inserts was used to mill the surface of a titanium alloy workpiece. An accelerometer was fixed to the spindle to collect vibration signals during the machining process (see attached diagram). Figure 2 As shown. The sampling frequency of the data acquisition system is 5kHz. An ultra-depth microscope is used to detect the wear value of the flank face. The milling cutting parameters are set as follows: spindle speed 1500r / min, feed rate 720mm / min, and depth of cut 0.4mm.
[0048] In the experiment, the length of the extracted vibration signal time-domain data for each sample was 2500. Since spectral data contains more useful category feature information, we converted the vibration signal time-domain data into spectral data, which was then used as input data for the deep learning network model, and tool wear category was used as the label. According to GB / T16460-2016, the tool wear samples were divided into three categories, as shown in Table 1.
[0049] Table 1. Tool Wear Sample Dataset
[0050]
[0051] The tool wear samples were randomly divided into training and test sets in a 7:3 ratio. As shown in Table 1, the tool wear sample dataset exhibits class imbalance, with an imbalance ratio of approximately 7:1. Therefore, we generated tool wear samples for the first and third classes, respectively. It should be noted that we only generated the training dataset, while the test dataset consists entirely of real samples.
[0052] MDDGAN was used to generate 255 tool wear samples of the first and third classes to balance the tool wear sample dataset. The model structure of MDDGAN is attached. Figure 3 As shown, the dynamic training steps are attached. Figure 4 As shown in Table 2, the model parameters are also shown. The loss value variation curve during the training process of MDDGAN is shown in the appendix. Figure 5 As shown in (a), (b), and (c), the discriminator loss value gradually increases, while the generator loss value and the difference loss value gradually decrease, eventually stabilizing.
[0053] Table 2 Model parameters of MDDGAN
[0054]
[0055] The trained generator was used to generate sample data, and MATLAB was used to create spectrograms of the real and generated sample data. (See attached image.) Figure 6The amplitude of the same category of tool wear spectrum data is slightly different from the figure. Overall, the amplitude fluctuation is concentrated in the central region, and the amplitude of the front and tail is smaller. The spectrum fluctuation of the third category of tool wear is more intense and complex than the first category of tool wear, which indicates that when the tool enters the acute wear stage, the vibration becomes larger, and the tool should be replaced in time. According to the overall distribution characteristics of the real spectrum data, the generated and the real tool wear sample peak position is basically the same. Although there is a slight difference between the generated spectrum data and the real spectrum data, this difference can improve the robustness of model classification. Obviously, MDDGAN can capture the data distribution characteristics of each category of tool wear sample, and can be used to generate tool wear samples.
[0056] The generated tool wear sample data and the real tool wear sample data are combined together to become an enhanced tool wear training data set. The deep belief network model is trained with the enhanced tool wear training data set, and tested on the test set. According to the results, the accuracy of the original unbalanced training data set test is 94.4%, see Figure 7 (a); the accuracy of the training data set enhanced by MDDGAN is 99.4%, see Figure 7 (b). Comparing the three, the tool wear state monitoring data set enhancement method based on MDDGAN effectively improves the accuracy of deep learning network model prediction, thereby verifying the effectiveness of the method and the availability of the generated tool wear sample data.
Claims
1. A data augmentation method for tool wear condition monitoring based on MDDGAN: First, the vibration signal of the spindle during tool cutting is collected, and the vibration signal is converted into spectrum data and input into MDDGAN; Secondly, the two discriminators of MDDGAN are trained to maximize the adversarial loss and the discriminator difference loss, respectively, while the generator of MDDGAN is trained to minimize the adversarial loss and the discriminator difference loss. The three are dynamically adversarially trained until training is complete, and the model parameters of the generator are saved. Then, the trained generator is used to generate tool wear samples, and it is judged whether the distribution of the generated tool wear samples is similar to the distribution of the real tool wear samples. Finally, the real tool wear samples and the generated tool wear samples are combined and input into the deep learning network model to verify the usability of the generated samples. Its features are, The steps are as follows: The first step is to collect vibration signals during the cutting process. During the cutting process, an accelerometer is fixed on the spindle, and the data acquisition system collects the vibration signal of the spindle during the cutting process; the vibration signal is converted into spectrum data as a tool wear sample; The second step is to build the MDDGAN model and perform dynamic adversarial training. MDDGAN consists of three model structures: a generator G and two discriminators D1 and D2 with different initializations; the adversarial loss function of the generator G is shown in Equation (1): Among them, P z (z) is the distribution of a given prior noise z, G(z; θ) g ) is the sample data generated from the prior noise z-mapping, θ g This represents the network parameters of the generator G; This indicates that the prior noise z originates from the expectation of the noise distribution; The adversarial loss functions of discriminators D1 and D2 are shown in equations (2) and (3): Where, D(x; θ) d1 ) and D(x; θ d2 θ represents the output probabilities of discriminators D1 and D2, respectively, that x comes from real data. d1 and θ d2 These are the network model parameters for discriminators D1 and D2, respectively. This represents the expected value of x from the true data distribution; The output functions of discriminators D1 and D2 are both sigmoid functions; the difference term is used as the optimization function of the decision boundary; the difference between the probability outputs of discriminators D1 and D2 is defined as shown in equation (4): in, Let represent the new generated sample dataset, dis(·) represent the difference function, and p1 and p2 represent the probability outputs of discriminators D1 and D2, respectively. The L1 norm is used, and the calculation is shown in equation (5): dis(p1,p2)=‖p1-p2‖1 (5) Based on the above objective function, a dynamic adversarial training strategy based on decision boundaries is introduced into the GAN model training. Dynamic adversarial training optimizes the decision boundaries of the two discriminators, D1 and D2, thereby making the generated sample distribution closer to the real sample distribution. The training steps of MDDGAN are as follows: (1) Generator G generates sample x g Both the actual tool wear sample and the actual tool wear sample were input into discriminators D1 and D2, sample x g The label of the real tool wear sample is set to 0, and the label of the real tool wear sample is set to 1; then the network parameters of the generator G are fixed, and the network parameters of the discriminators D1 and D2 are updated by maximizing the adversarial loss as shown in Equation (6): max D1,D2 (L D1 (x r ,x g )+L D2 (x r ,x g ))(6) (2) Input the samples generated by generator G into discriminators D1 and D2 to obtain adversarial loss, and set the label of generator G to 1; at this time, the network parameters of discriminators D1 and D2 are fixed, and the network parameters of G are updated by minimizing the adversarial loss, as shown in equation (7): min G L G (x g (7) (3) The updated generator G regenerates new samples. At this point, the newly generated sample The samples are close to real samples; they are input into the discriminators D1 and D2 trained in step (1), and the difference between the probability outputs of discriminators D1 and D2 is obtained; the network parameters of generator G are fixed, and the two discriminators are trained to maximize the difference loss, while ensuring the discrimination performance of the two discriminators on real samples and generated samples, thereby obtaining a more stringent decision boundary, as shown in Equation (8): (4) The network parameters of discriminators D1 and D2 are fixed, and G is trained independently to minimize the difference loss and adversarial loss; this step, together with step (3), forms dynamic adversarial training to align the generated sample distribution with the real sample distribution given a strict decision boundary; the objective function is shown in equation (9): By repeating the above four steps, the optimal generator G is finally obtained, and the model parameters of generator G are saved. The third step is to compare the similarity between the generated data and the real data. The trained generator generates sample data, and the generated tool wear spectrum data is compared and analyzed with the real tool wear spectrum data to determine whether the distribution of the generated sample data and the real sample data are the same. If they are not the same, the process returns to the MDDGAN model to continue adversarial training until the distribution of the generated sample data and the real sample data are the same. The fourth step is to verify the usability of the generated sample data. Deep learning network models were trained using the original unbalanced tool wear training dataset and the enhanced tool wear training dataset, respectively. The prediction accuracy of both models was tested, and the usability of the generated data was verified.
Citation Information
Patent Citations
Enhancing method for tool state monitoring dataset based on generated adversarial network
CN111037365A
Cutter wear condition detection method based on improved conditional generative adversarial network
CN114346761A