Numerical control machining fault diagnosis method based on fault mechanism and transfer learning
By establishing a CNC machining fault diagnosis method for fault mechanism and transfer learning, combined with deep learning algorithms, the problems of insufficient mechanism model and low data efficiency in CNC machine tool fault diagnosis are solved, and efficient fault identification and diagnosis are achieved.
Patent Information
- Application Number
- CN202411193471.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-11-12
AI Technical Summary
The existing CNC machine tool fault diagnosis methods have problems such as insufficient research on mechanism models, low data acquisition rate and training efficiency, which makes it difficult to ensure the working effect of the digital twin-driven CNC energy-saving system in the new processing environment.
Using CNC machining fault diagnosis method based on fault mechanism and transfer learning, by collecting processing data, the tool wear and cutting force correlation model and the fault mechanism power increment model are established, and combined with long and short-term memory neural network and convolutional neural network, CNC machining is constructed Fault diagnosis model and transfer learning to transfer knowledge between different processing conditions.
It effectively improves the accuracy and robustness of CNC machining fault diagnosis, improves training efficiency, and realizes real-time fault diagnosis during the machining process.
Smart Images

Figure CN118938878A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of CNC machine tool processing, and in particular to a CNC processing fault diagnosis method based on fault mechanism and transfer learning. Background Art
[0002] As the core equipment of intelligent manufacturing, CNC machine tools play a vital role in modern manufacturing. According to statistics, there are more than 10 million CNC machine tools in my country. If the average processing power of each machine tool is 10 kilowatts, its total rated power is more than 4 times the total power generation of the Three Gorges Power Station. Therefore, improving CNC processing efficiency is of great significance to improving electricity efficiency and saving energy.
[0003] Realizing high-end green CNC machining driven by digital twins is an important goal for my country to achieve modernization and intelligent manufacturing. How to maximize the energy efficiency of high-end machining is an important research direction. To achieve this goal, the country has issued a plan to promote the application of intelligent manufacturing technologies related to digital twins, such as big data, artificial intelligence, and edge computing in manufacturing to achieve high-quality and efficient planning and scheduling. In August 2022, it was proposed to further promote the development of advanced manufacturing to achieve the strategic goal of revitalizing the industry. Promoting the reconstruction of the industrial base and enhancing the industry's scientific and technological innovation capabilities are important development goals.
[0004] In the context of interdisciplinary studies, the use of emerging technologies such as intelligent sensing measurement systems based on digital twins, big data analysis, deep learning algorithms, data visualization, edge computing, etc., combined with traditional mechanical processing mechanism models, can effectively optimize processing energy consumption, efficiency and equipment utilization.
[0005] In recent years, the development of big data and deep learning algorithms has gradually slowed down, and the research direction has shifted from new theories, new algorithm design and hardware architecture innovation to algorithm improvement and comparison. Due to the bottleneck period of the development process, the existing methods still generally have problems such as insufficient mechanism model research, low data acquisition rate and training efficiency, which makes it difficult to guarantee the working effect of digital twin-driven CNC energy-saving systems in new processing environments.
[0006] In view of this, how to optimize the mechanism model to provide strong support for data analysis and how to improve the training efficiency of CNC machining fault diagnosis and analysis models have important application value and strategic significance. Summary of the invention
[0007] The purpose of the present invention is to provide a CNC machining fault diagnosis method based on fault mechanism and transfer learning to solve the above problems.
[0008] To achieve the above object, the present invention adopts the following technical solutions:
[0009] A method for NC machining fault diagnosis based on fault mechanism and transfer learning comprises the following steps:
[0010] S1. Collecting original processing data under the same processing conditions, wherein the original processing data at least includes processing power, processing parameters, cutting tool image and workpiece surface quality image, and the processing conditions at least include cutting processing parameters and workpiece type;
[0011] S2. Through the wear curve of the cutting tool, the cutting tool processing life cycle is divided into three intervals: running-in period, steady-state period, and failure period. For the running-in period and steady-state period, a tool wear and tool cutting force correlation model is established. The tool wear and tool cutting force correlation model is:
[0012]
[0013] Where i is the i-th tool wear state in the cutting tool processing life cycle, A i is the wear amount of the i-th tool under wear state, which is obtained through image analysis, F i is the cutting force corresponding to the i-th tool wear data, F0 is the initial cutting force of the cutting tool, a and b are constants determined based on the wear curve of the cutting tool;
[0014] For the workpiece surface quality image, a grayscale image is obtained through grayscale processing, and the fractal dimension of the grayscale surface of the grayscale image is calculated. The grayscale plane of the image is covered by boxes of different sizes, and the number of boxes required to cover the entire grayscale surface is calculated. Then, the fractal dimension is obtained by least square fitting. The obtained fractal dimension is normalized to obtain the workpiece surface roughness, and the corresponding processing data with surface roughness greater than the preset threshold σ is eliminated;
[0015] Matlab software is used to estimate the cutting force during the machining life cycle, analyze the nonlinear relationship between cutting tool wear and cutting force increment, and define the tool aging coefficient K cutter , K cutter The solution model is:
[0016]
[0017] Among them, K cutter is the tool aging coefficient, c and d are model parameters;
[0018] Based on the original processing data, the tool wear power increment model is established:
[0019] ΔP ik =P i ·f(K cutter )
[0020]
[0021] Among them, ΔP ik is the machining power increment between the kth tool wear state and the ith tool wear state, P i is the machining power under the i-th tool wear state, f(K cutter ) is a function of the tool aging coefficient, g, h, and n are model parameters;
[0022] Obtaining machining data of other different working conditions, verifying the tool wear power increment model, and optimizing model parameters;
[0023] For other machining fault conditions besides tool wear, collect machining data and establish a power increment model of the fault mechanism:
[0024] ΔP yik =P yi ·f(L y )
[0025]
[0026] Among them, ΔP yik is the processing power increment between the kth processing state and the ith processing state, P yi is the processing power under the i-th processing state, f(L y ) is a function of the fault factor, L y is the numerical representation of the fault factor, and u, v, and m are model parameters;
[0027] The power increment model of tool wear is integrated with the power increment model of fault mechanism to obtain the power increment analysis model;
[0028] S3. For the processing data under different processing conditions, the power increment analysis model is used to mark the data. Each processing data has a classification label, and the classification label includes a tool wear degree label and a processing fault category label. The labeled data is used as source domain data.
[0029] S4. Based on the source domain data, an algorithm model is established and trained to obtain a CNC machining fault diagnosis model, wherein the CNC machining fault diagnosis model is implemented by combining a long short-term memory neural network with a convolutional neural network;
[0030] S5. Monitor the input processing data and determine whether the processing conditions have changed. If not, use the CNC machining fault diagnosis model obtained in step S4 for learning and training. If so, use the input data as the target domain data to build a deep learning algorithm model based on transfer learning, analyze the feature distribution differences between the source domain data and the target domain data, introduce alignment weights for data alignment to achieve cross-domain data transfer, use the Tensorflow deep learning architecture to build a deep learning algorithm for forward calculation training, use parameter transfer learning and retain most of the training parameters, perform back propagation calculations to optimize feature distribution, use the maximum mean difference to measure the difference in probability distribution between the source domain and the target domain, combine deep learning training cross entropy to characterize the training error results, use regularized maximum mean difference and cross entropy to build the optimization target of the algorithm, and obtain the final CNC machining fault diagnosis model after training for real-time machining fault diagnosis during the machining process.
[0031] Preferably, the wear amount of the tool under the wear state is obtained by the following method:
[0032] Acquire a cutting tool image, wherein the cutting tool image is obtained by photographing a CCD camera installed at a corresponding position of the CNC machine tool;
[0033] Extracting tool feature information using an image feature extraction method, wherein the tool feature information includes tool contour features, tool surface texture features, tool wear area texture features, and tool wear area edge features;
[0034] Based on the tool feature information, obtain tool geometry information and position and geometry information of the wear area;
[0035] Based on the tool geometry information and the position and geometry information of the wear region, the area of the wear region and the depth of the wear region are calculated, and then the volume of the wear region is calculated as the wear amount.
[0036] Furthermore, it also includes: after establishing the tool wear power increment model, using the optimization function to optimize the tool wear power increment model, the optimized tool wear power increment model is expressed as:
[0037] ΔP final =P i ·f(K cutter ))·δ(K cutter , R i )
[0038]
[0039] Among them, ΔP final The power increment result after optimization, δ(K cutter , R i) is the optimization function, R i is the surface roughness of the workpiece processed under the i-th tool wear state, β is a constant, 0<β<0.5.
[0040] Preferably, the step S1 further comprises: for the cutting tool image and the workpiece surface quality image, segmenting the cutting tool and the workpiece from the image respectively by a threshold segmentation algorithm; and removing noise in the cutting tool image and the workpiece surface quality image by a median filtering algorithm.
[0041] Preferably, the implementation steps of the median filtering are as follows: define a moving window of odd points, and make the center of the template coincide with a pixel position in the image; read the grayscale values of the corresponding pixels under the template and sort them; select the middle value in the sorted grayscale sequence; assign this middle value to the pixel at the center position of the template to complete the filtering operation.
[0042] Preferably, the wear curve of the cutting tool is used to characterize the change of the wear amount with the machining time during the machining life cycle.
[0043] Preferably, the other processing fault states in step S2 include at least one of spindle failure, processing vibration and tool crack.
[0044] Preferably, the CNC machining fault diagnosis model structure in step S4 includes a convolution layer, a pooling layer, an LSTM layer and a fully connected layer. The convolution layer and the pooling layer are used for feature extraction, the LSTM layer is used to process time series data, and the fully connected layer is used for the final diagnosis result classification.
[0045] Preferably, the forward computation training in step S5 is implemented by the following method:
[0046] Randomly initialize the model's weight matrix and bias parameters;
[0047] Input source domain data and target domain data to each layer of the neural network, and output the diagnosis result. The diagnosis result is calculated by the following formula:
[0048]
[0049] Among them, y is the output diagnosis result, x is the input source domain data and target domain data, b is the bias parameter, is the activation function, which uses one of the ReLU function, PReLU function, Softmax function, and Swish function;
[0050] The loss function is used to calculate the error between the output diagnosis result and the true label.
[0051] Preferably, the back propagation calculation in step S5 is implemented by the following method:
[0052] Calculate the gradient of the loss function with respect to each model parameter. Based on the obtained gradient of each model parameter, use the gradient descent algorithm to update the model parameters of the neural network. Specifically:
[0053] Select an initial point θ0, define θ as the model parameter, and θ0 as the initialization parameter;
[0054] Choose a loss function L(θ) that measures the difference between the predictions given the model parameters θ and the actual observations;
[0055] Determine an appropriate learning rate η, which controls the step size of updating the parameters at each iteration;
[0056] Iterative update, for each training sample i, calculate the gradient of the loss function with respect to θ:
[0057]
[0058] Among them, g i is the gradient, x i is the input temperature data, y i is the corresponding predicted value of thermal error.
[0059] After adopting the above technical solution, the present invention has the following beneficial effects compared with the background technology:
[0060] 1. The present invention is based on the processing fault analysis of the cutting tool processing life cycle. Processing faults caused by tool wear will cause incremental changes in processing power. Spindle failure, processing vibration, tool cracks and other processing fault conditions will also cause incremental changes in processing power. By constructing a tool wear power increment model and a fault mechanism power increment model, and obtaining a power increment analysis model through model fusion, the influence of tool wear and other processing faults on processing power is fully considered. Based on the incremental changes in processing power, the abnormal energy mode of major changes in the machine or tool state during the processing process is identified. This can effectively guide data labeling and classification, and reasonably diagnose CNC processing faults, thereby improving the accuracy and robustness of data diagnosis.
[0061] 2. The present invention constructs a deep learning algorithm model based on transfer learning, realizes efficient knowledge transfer between different processing conditions throughout the life cycle of the entire processing process, reuses the labeled data of the source domain, constructs an algorithm to migrate old data from the source domain to the target domain, and reuses the training parameters of the deep learning algorithm in the original processing conditions, which can effectively improve its training accuracy and efficiency.
[0062] 3. The present invention performs image analysis on cutting tool images and workpiece surface quality images, eliminates data that does not meet surface quality specifications based on surface roughness indicators, and optimizes the tool wear power increment model using surface roughness indicators, further improving the accuracy and robustness of data diagnosis.
[0063] Instruction Manual
[0064] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the 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.
[0066] Example
[0067] The technical idea of the present invention is based on digital twin technology. The application of digital twin technology in the field of CNC machine tools can simulate the operating status and processing of machine tools in a virtual environment by creating an accurate digital copy of the physical machine tool, so that the performance, efficiency and potential problems of the machine tool can be comprehensively predicted and analyzed. Emerging technologies such as intelligent sensor measurement systems, big data analysis, deep learning algorithms, data preprocessing, data visualization, edge computing, and processing compensation technology based on digital twins, combined with traditional mechanical processing mechanism models, can effectively realize effective diagnosis, analysis and intervention of CNC machining.
[0068] Deep learning is a subset of machine learning that is based on artificial neural networks. The learning process is deep because of the structure of artificial neural networks, which consists of multiple input, output, and hidden layers. Each layer contains units that transform input data into information that the next layer uses for a specific prediction task. Thanks to this structure, the machine can learn through its own data processing.
[0069] Transfer learning is an important concept in the field of machine learning. Its core idea is to use the knowledge learned in one task or field to accelerate or improve the learning process of another related task or field. This method is particularly effective in the case of data scarcity or domain migration, because it can significantly reduce the need for a large amount of labeled data and improve the learning efficiency and generalization ability of the model.
[0070] The embodiment of the present invention discloses a method for NC machining fault diagnosis based on fault mechanism and transfer learning, comprising the following steps:
[0071] S1. Collecting original processing data under the same processing conditions, wherein the original processing data at least includes processing power, processing parameters, cutting tool image and workpiece surface quality image, and the processing conditions at least include cutting processing parameters and workpiece type.
[0072] For the cutting tool image and the workpiece surface quality image, the cutting tool and the workpiece are segmented from the image respectively by the threshold segmentation algorithm. Image threshold segmentation is based on the gray level of the image to classify pixels. The core lies in how to select an appropriate gray threshold. The gray threshold is determined according to the gray histogram of the image. In this embodiment, the threshold segmentation algorithm adopts one of the global threshold segmentation, adaptive threshold segmentation, Otsu algorithm, and block variable threshold segmentation. The selection of the segmentation algorithm is based on the segmentation quality and efficiency.
[0073] The median filtering algorithm is used to remove noise from the cutting tool image and the workpiece surface quality image. The specific implementation steps are as follows:
[0074] 1) Define a moving window of odd points and make the center of the template coincide with a pixel position in the image.
[0075] 2) Read the grayscale values of the corresponding pixels under the template and sort them.
[0076] 3) Select the middle value in the sorted grayscale sequence.
[0077] 4) Assign this intermediate value to the pixel at the center of the template to complete the filtering operation.
[0078] S2, construct tool wear power increment model and fault mechanism power increment model, and obtain power increment analysis model through model fusion. This step specifically includes the following sub-steps:
[0079] S21. Through the wear curve of the cutting tool, the cutting tool processing life cycle is divided into three intervals: running-in period, steady-state period, and failure period. The wear curve of the cutting tool is used to characterize the change of wear amount with processing time during the processing life cycle. For the running-in period and steady-state period, a tool wear and tool cutting force correlation model is established. The tool wear and tool cutting force correlation model is:
[0080]
[0081] Where i is the i-th tool wear state in the cutting tool processing life cycle, A i is the wear amount of the i-th tool under wear state, which is obtained through image analysis, F iis the cutting force corresponding to the i-th tool wear data, F0 is the initial cutting force of the cutting tool, and a and b are constants determined based on the wear curve of the cutting tool. In this embodiment, the wear amount of the tool under the wear state is obtained by the following method:
[0082] 1) obtaining a cutting tool image, wherein the cutting tool image is obtained by photographing a CCD camera installed at a corresponding position of a CNC machine tool;
[0083] 2) extracting tool feature information using an image feature extraction method, wherein the tool feature information includes tool contour features, tool surface texture features, tool wear area texture features, and tool wear area edge features;
[0084] 3) Based on the tool feature information, obtaining tool geometry information and position and geometry information of the wear area;
[0085] 4) Based on the tool geometry information and the position and geometry information of the wear area, the area and depth of the wear area are calculated, and then the volume of the wear area is calculated as the wear amount.
[0086] S22. For the workpiece surface quality image, a grayscale image is obtained through grayscale processing, and the fractal dimension of the grayscale surface of the grayscale image is calculated. The grayscale plane of the image is covered by boxes of different sizes, and the number of boxes required to cover the entire grayscale surface is calculated. Then, the fractal dimension is obtained by least squares fitting. The obtained fractal dimension is normalized to obtain the surface roughness of the workpiece, and the corresponding processing data with surface roughness greater than the preset threshold σ is eliminated.
[0087] S23. Use Matlab software to estimate the cutting force during the machining life cycle, analyze the nonlinear relationship between cutting tool wear and cutting force increment, and define the tool aging coefficient K. cutter , K cutter The solution model is:
[0088]
[0089] Among them, K cutter is the tool aging coefficient, c and d are model parameters;
[0090] Based on the original processing data, the tool wear power increment model is established:
[0091] ΔP ik =P i ·f(K cutter )
[0092]
[0093] Where ΔP ikis the machining power increment between the kth tool wear state and the ith tool wear state, P i is the machining power under the i-th tool wear state, f(K cutter ) is a function of the tool aging coefficient, and g, h, and n are model parameters.
[0094] S24. After the tool wear power increment model is established, the tool wear power increment model is optimized using an optimization function. The optimized tool wear power increment model is expressed as:
[0095] ΔP final =P i ·f(K cutter )·δ(K cutter , R i )
[0096]
[0097] Where ΔP final The power increment result after optimization, δ(K cutter , R i ) is the optimization function, R i is the surface roughness of the workpiece processed under the i-th tool wear state, β is a constant, 0<β<0.5. The tool wear power increment model is optimized using the surface roughness index, which further improves the accuracy and robustness of data diagnosis.
[0098] S25, obtaining processing data of other different working conditions, verifying the tool wear power increment model, and optimizing model parameters.
[0099] S26. For other processing fault conditions other than tool wear, other processing fault conditions include at least one of spindle failure, processing vibration, and tool crack. Collect processing data and establish a fault mechanism power increment model:
[0100] ΔP yik =P yi ·f(L y )
[0101]
[0102] Where ΔP yik is the processing power increment between the kth processing state and the ith processing state, P yi is the processing power under the i-th processing state, f(L y ) is a function of the fault factor, L y It is the numerical representation of the fault factor, and u, v, and m are model parameters.
[0103] Taking machining vibration as an example, vibration is considered to be a destructive phenomenon that interferes with the forming motion and thus affects the machining quality, affecting the tool cutting action and causing machining power abnormalities. Based on machining vibration or other machining faults, the principle of establishing the fault mechanism power increment model is the same as the tool wear power increment model.
[0104] S27. The power increment model of tool wear is integrated with the power increment model of the fault mechanism to obtain a power increment analysis model. The power increment analysis model obtained in this way, under the premise of fully considering the influence of tool wear and processing faults on processing power, can identify abnormal energy patterns of significant changes in the machine or tool state during processing based on the change of processing power increment, effectively guide data labeling and classification, perform reasonable diagnosis of CNC processing faults, and improve the accuracy and robustness of data diagnosis.
[0105] S3. For the processing data under different processing conditions, the power increment analysis model is used to mark the data. Each processing data has a classification label, and the classification label includes a tool wear degree label and a processing fault category label. The labeled data is used as the source domain data. In this way, for the processing data under different processing conditions, the corresponding power data is obtained, and the processing state can be quickly identified, the abnormal function increment can be identified, and the data can be marked.
[0106] S4. Based on the source domain data, an algorithm model is established and trained to obtain a CNC machining fault diagnosis model, which is implemented by combining a long short-term memory neural network with a convolutional neural network. The structure of the CNC machining fault diagnosis model includes a convolutional layer, a pooling layer, an LSTM layer (long short-term memory network layer) and a fully connected layer. The convolutional layer and the pooling layer are used for feature extraction, the LSTM layer is used to process time series data, and the fully connected layer is used for the final diagnosis result classification. Among them, the convolutional layer is the core of the convolutional neural network (CNN) and is used to extract local features in the image; the pooling layer is used to reduce the spatial size of the feature map, thereby reducing the number of parameters and the amount of calculation. It achieves downsampling by applying the maximum value operation in a certain area, which helps to improve the invariance of feature detection; LSTM controls the flow of information by introducing a gating mechanism (input gate, forget gate and output gate), so that it can learn long-term dependencies; each node of the fully connected layer is connected to all activation values of the previous layer. The fully connected layer is located at the end of the network and is used to integrate the features transferred from the convolutional layer and the pooling layer for final classification or regression.
[0107] S5. Monitor the input processing data and determine whether the processing conditions have changed. If not, use the CNC machining fault diagnosis model obtained in step S4 for learning and training. If so, use the input data as the target domain data to build a deep learning algorithm model based on transfer learning, analyze the feature distribution differences between the source domain data and the target domain data, introduce alignment weights for data alignment to achieve cross-domain data transfer, use the Tensorflow deep learning architecture to build a deep learning algorithm for forward calculation training, use parameter transfer learning and retain most of the training parameters, perform back propagation calculations to optimize feature distribution, use the maximum mean difference to measure the difference in probability distribution between the source domain and the target domain, combine deep learning training cross entropy to characterize the training error results, use regularized maximum mean difference and cross entropy to build the optimization target of the algorithm, and obtain the final CNC machining fault diagnosis model after training for real-time machining fault diagnosis during the machining process.
[0108] The forward calculation training in step S5 is implemented by the following method:
[0109] Randomly initialize the model's weight matrix and bias parameters;
[0110] Input source domain data and target domain data to each layer of the neural network, and output the diagnosis result. The diagnosis result is calculated by the following formula:
[0111]
[0112] Among them, y is the output diagnosis result, x is the input source domain data and target domain data, b is the bias parameter, is the activation function, which uses one of the ReLU function, PReLU function, Softmax function, and Swish function;
[0113] The loss function is used to calculate the error between the output diagnosis result and the true label.
[0114] The back propagation calculation in step S5 is implemented by the following method:
[0115] Calculate the gradient of the loss function with respect to each model parameter. Based on the obtained gradient of each model parameter, use the gradient descent algorithm to update the model parameters of the neural network. Specifically:
[0116] Select an initial point θ0, define θ as the model parameter, and θ0 as the initialization parameter;
[0117] Choose a loss function L(θ) that measures the difference between the predictions given the model parameters θ and the actual observations;
[0118] Determine an appropriate learning rate η, which controls the step size of updating the parameters at each iteration;
[0119] Iterative update, for each training sample i, calculate the gradient of the loss function with respect to θ:
[0120]
[0121] Among them, g i is the gradient, x i is the input temperature data, y i is the corresponding predicted thermal error.
[0122] Based on the CNC machining fault diagnosis method of the present invention, the impact of tool wear and machining faults on machining power is fully considered, and abnormal energy patterns of major changes in machine or tool states during machining are identified based on the incremental changes in machining power, which can effectively guide data labeling and classification, and improve the accuracy and robustness of data diagnosis; a deep learning algorithm model based on transfer learning is constructed, and efficient knowledge transfer between different machining conditions is achieved throughout the life cycle of the entire machining process. The training parameters of the deep learning algorithm in the original machining conditions are reused, which can effectively improve its training accuracy and efficiency.
[0123] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A CNC machining fault diagnosis method based on fault mechanism and transfer learning, characterized in that: The following steps are involved: S1. Collecting original processing data under the same processing conditions, wherein the original processing data at least includes processing power, processing parameters, cutting tool image and workpiece surface quality image, and the processing conditions at least include cutting processing parameters and workpiece type; S2. Through the wear curve of the cutting tool, the cutting tool processing life cycle is divided into three intervals: running-in period, steady-state period, and failure period. For the running-in period and steady-state period, a tool wear and tool cutting force correlation model is established. The tool wear and tool cutting force correlation model is: Where i is the i-th tool wear state in the cutting tool processing life cycle, A i is the wear amount of the i-th tool under wear state, which is obtained through image analysis, F i is the cutting force corresponding to the i-th tool wear data, F0 is the initial cutting force of the cutting tool, a and b are constants determined based on the wear curve of the cutting tool; For the workpiece surface quality image, a grayscale image is obtained through grayscale processing, and the fractal dimension of the grayscale surface of the grayscale image is calculated. The grayscale plane of the image is covered by boxes of different sizes, and the number of boxes required to cover the entire grayscale surface is calculated. Then, the fractal dimension is obtained by least square fitting. The obtained fractal dimension is normalized to obtain the workpiece surface roughness, and the corresponding processing data with surface roughness greater than the preset threshold σ is eliminated; Matlab software is used to estimate the cutting force during the machining life cycle, analyze the nonlinear relationship between cutting tool wear and cutting force increment, and define the tool aging coefficient K cutter , K cutter The solution model is: Among them, K cutter is the tool aging coefficient, c and d are model parameters; Based on the original processing data, the tool wear power increment model is established: ΔP ik =P i ·f(K cutter ) Where ΔP ik is the machining power increment between the kth tool wear state and the ith tool wear state, P i is the machining power under the i-th tool wear state, f(K cutter ) is a function of the tool aging coefficient, g, h, and n are model parameters; Obtaining machining data of other different working conditions, verifying the tool wear power increment model, and optimizing model parameters; For other machining fault conditions besides tool wear, collect machining data and establish a power increment model of the fault mechanism: ΔP yik =P yi ·f(L y ) Where ΔP yik is the processing power increment between the kth processing state and the ith processing state, P yi is the processing power under the i-th processing state, f(L y ) is a function of the fault factor, L y is the numerical representation of the fault factor, and u, v, and m are model parameters; The power increment model of tool wear is integrated with the power increment model of fault mechanism to obtain the power increment analysis model; S3. For the processing data under different processing conditions, the power increment analysis model is used to mark the data. Each processing data has a classification label, and the classification label includes a tool wear degree label and a processing fault category label. The labeled data is used as source domain data. S4. Based on the source domain data, an algorithm model is established and trained to obtain a CNC machining fault diagnosis model, wherein the CNC machining fault diagnosis model is implemented by combining a long short-term memory neural network with a convolutional neural network; S5. Monitor the input processing data and determine whether the processing conditions have changed. If not, use the CNC machining fault diagnosis model obtained in step S4 for learning and training. If so, use the input data as the target domain data to build a deep learning algorithm model based on transfer learning, analyze the feature distribution differences between the source domain data and the target domain data, introduce alignment weights for data alignment to achieve cross-domain data transfer, use the Tensorflow deep learning architecture to build a deep learning algorithm for forward calculation training, use parameter transfer learning and retain most of the training parameters, perform back propagation calculations to optimize feature distribution, use the maximum mean difference to measure the difference in probability distribution between the source domain and the target domain, combine deep learning training cross entropy to characterize the training error results, use regularized maximum mean difference and cross entropy to build the optimization target of the algorithm, and obtain the final CNC machining fault diagnosis model after training for real-time machining fault diagnosis during the machining process.
2. A CNC machining fault diagnosis method based on fault mechanism and transfer learning as claimed in claim 1, characterized in that: The wear amount of the tool under the wear state is specifically obtained by the following method: Acquire a cutting tool image, wherein the cutting tool image is obtained by photographing a CCD camera installed at a corresponding position of the CNC machine tool; Extracting tool feature information using an image feature extraction method, wherein the tool feature information includes tool contour features, tool surface texture features, tool wear area texture features, and tool wear area edge features; Based on the tool feature information, obtain tool geometry information and position and geometry information of the wear area; Based on the tool geometry information and the position and geometry information of the wear region, the area of the wear region and the depth of the wear region are calculated, and then the volume of the wear region is calculated as the wear amount.
3. A CNC machining fault diagnosis method based on fault mechanism and transfer learning as claimed in claim 2, characterized in that: Also includes: After establishing the tool wear power increment model, the optimization function is used to optimize the tool wear power increment model. The optimized tool wear power increment model is expressed as: ΔP final =P i ·f(K cutter )·δ(K cutter ,R i ) Where ΔP final The power increment result after optimization, δ(K cutter , R i ) is the optimization function, R i is the surface roughness of the workpiece processed under the i-th tool wear state, β is a constant, 0<β<0.
5.
4. A CNC machining fault diagnosis method based on fault mechanism and transfer learning as claimed in claim 3, characterized in that: The step S1 also includes: for the cutting tool image and the workpiece surface quality image, segmenting the cutting tool and the workpiece from the image respectively by using a threshold segmentation algorithm; and removing noise in the cutting tool image and the workpiece surface quality image by using a median filtering algorithm.
5. A CNC machining fault diagnosis method based on fault mechanism and transfer learning as claimed in claim 4, characterized in that: The steps for implementing the median filter are as follows: define a moving window of odd points, and make the center of the template coincide with a pixel position in the image; read the grayscale values of the corresponding pixels under the template and sort them; select the middle value in the sorted grayscale sequence; assign this middle value to the pixel at the center position of the template to complete the filtering operation.
6. A method for NC machining fault diagnosis based on fault mechanism and transfer learning as claimed in claim 1, characterized in that: The wear curve of the cutting tool is used to characterize the change of the wear amount with the machining time during the machining life cycle.
7. A method for NC machining fault diagnosis based on fault mechanism and transfer learning as claimed in claim 1, characterized in that: The other processing fault states in step S2 include at least one of spindle failure, processing vibration, and tool crack.
8. A method for NC machining fault diagnosis based on fault mechanism and transfer learning as claimed in claim 4 or 5, characterized in that: The CNC machining fault diagnosis model structure in step S4 includes a convolution layer, a pooling layer, an LSTM layer and a fully connected layer. The convolution layer and the pooling layer are used for feature extraction, the LSTM layer is used to process time series data, and the fully connected layer is used for the final diagnosis result classification.
9. A method for NC machining fault diagnosis based on fault mechanism and transfer learning as claimed in claim 8, characterized in that: The forward calculation training in step S5 is implemented by the following method: Randomly initialize the model's weight matrix and bias parameters; Input source domain data and target domain data to each layer of the neural network, and output the diagnosis result. The diagnosis result is calculated by the following formula: Among them, y is the output diagnosis result, x is the input source domain data and target domain data, b is the bias parameter, is the activation function, which uses one of the ReLU function, PReLU function, Softmax function, and Swish function; The loss function is used to calculate the error between the output diagnosis result and the true label.
10. A method for NC machining fault diagnosis based on fault mechanism and transfer learning as claimed in claim 8, characterized in that: The back propagation calculation in step S5 is implemented by the following method: Calculate the gradient of the loss function with respect to each model parameter. Based on the obtained gradient of each model parameter, use the gradient descent algorithm to update the model parameters of the neural network. Specifically: Select an initial point θ0, define θ as the model parameter, and θ0 as the initialization parameter; Choose a loss function L(θ) that measures the difference between the predictions given the model parameters θ and the actual observations; Determine an appropriate learning rate η, which controls the step size of updating the parameters at each iteration; Iterative update, for each training sample i, calculate the gradient of the loss function with respect to θ: Among them, g i is the gradient, x i is the input temperature data, y i is the corresponding predicted thermal error.
Citation Information
Cited By
Numerical control tool fault diagnosis method based on deep learning
CN120540270A
Deep learning based numerical control tool failure diagnosis method
CN120540270B
Electricity utilization information acquisition system and method for identifying faults of electric energy meter
CN120559564A
A power consumption information acquisition system and method for identifying faults of a power meter
CN120559564B
Industrial production line fault self-diagnosis system based on digital twinning
CN120722874A
