A tool wear monitoring method for CNC machine tools based on deep learning
By installing multiple vision sensors on CNC machine tools, multi-view image data is obtained and preprocessed, a multi-view and multi-scale tool wear feature fusion model is constructed, and combined with deep learning algorithms, the tool wear of CNC machine tools is strongly robust. , high accuracy online monitoring solves the problems of poor real-time and low accuracy in traditional methods, and improves processing efficiency and quality.
Patent Information
- Application Number
- CN202411345772.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-09-26
AI Technical Summary
During the processing of CNC machine tools, traditional tool wear monitoring methods have problems such as poor real-time performance and low accuracy. Due to the complex processing environment and insufficient imaging quality of vision sensors, it is difficult to achieve robust and high-precision tool wear monitoring.
Multiple vision sensors are used to obtain tool image data under different viewing angles and lighting conditions, perform image preprocessing and feature extraction, build a multi-view angle and multi-scale tool wear feature fusion model, and combine deep learning algorithms to automatically extract deep features to achieve tool wear Online identification and quantitative characterization of states.
It improves the accuracy, robustness and stability of tool wear recognition, reduces the labeled data required for model training, has good generalization ability and adaptability, and effectively guides tool maintenance and replacement of CNC machine tools.
Smart Images

Figure CN118848670B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of CNC machine tools, and in particular to a CNC machine tool tool wear monitoring method based on deep learning. Background Art
[0002] In the process of CNC machine tool processing, tool wear is one of the key factors affecting processing quality and efficiency. Traditional tool wear monitoring methods mainly rely on manual periodic detection or indirect measurement, which have problems such as poor real-time performance and low precision. In order to realize online real-time monitoring of tool wear, a CNC machine tool tool wear monitoring method based on deep learning is proposed. This method intends to collect tool image data in real time through the visual sensor on the machine tool spindle, and use the pre-trained deep learning model to analyze the image data to realize online identification and quantitative characterization of tool wear status.
[0003] However, in practical applications, due to the complexity and variability of the CNC machine tool processing environment, the imaging quality of the tool image is difficult to guarantee. There are interferences from factors such as distortion, occlusion, and illumination changes, which lead to many challenges in the feature extraction and analysis of image data. At the same time, limited by the internal installation space of the machine tool, the imaging angle and resolution of the visual sensor are difficult to meet the needs of accurate tool wear analysis. In addition, under complex processing conditions, the tool image data obtained by a single visual sensor may be insufficient and difficult to fully reflect the multiple characteristics of tool wear. Therefore, it is urgent to research and develop a robust and high-precision tool image data acquisition and analysis method to improve the tool wear recognition performance of the deep learning model and realize reliable online monitoring of tool wear of CNC machine tools. Summary of the invention
[0004] Technical issues to be solved
[0005] In view of this, the embodiments of this specification provide a CNC machine tool tool wear monitoring method based on deep learning with strong robustness and high accuracy.
[0006] Technical Solution
[0007] To solve the technical problem, the present invention provides the following technical solution: a method for monitoring tool wear of CNC machine tools based on deep learning, comprising the following steps: S1 acquiring tool image data based on multiple visual sensors; S2 preprocessing the tool image data based on image preprocessing technology to obtain a preprocessed data set; S3 constructing a tool wear recognition model based on a convolutional neural network model, inputting the preprocessed data set into the tool wear recognition model for calculation, and generating fused tool wear features; S4 classifying and regressing the fused tool wear features to generate tool wear monitoring results.
[0008] In some embodiments, in step S1, multiple visual sensors are installed on the spindle of a machine tool, the multiple visual sensors have different monitoring angles, and tool image data under different visual and lighting conditions are acquired based on different visual sensors.
[0009] In some embodiments, in step S2, the tool image data is converted into a grayscale image; based on an adaptive median filtering algorithm, the grayscale image is denoised, smoothed, and salt and pepper noise is eliminated in sequence to obtain a denoised image; the denoised image is histogram equalized to generate an equalized image; the equalized image is geometrically corrected by perspective transformation to generate a corrected image; a multi-scale Gabor filter group is constructed, and the texture features of the wear area in the corrected image are extracted based on the multi-scale Gabor filter group to obtain a Gabor texture feature map; the Gabor texture feature map is binarized, and the Otsu threshold segmentation algorithm is used to adaptively determine the binarization threshold, segment the wear area, and generate a preprocessed data set.
[0010] In some embodiments, the process of forming a corrected image includes: obtaining pixel coordinate information of the tool area in the equalized image; determining the coordinates of the four corner points of the perspective transformation based on the pixel coordinate information; establishing a perspective transformation matrix based on the four corner point coordinates; using the perspective transformation matrix to perform a geometric transformation on the equalized image to eliminate perspective distortion in the image; performing distortion correction on the image after the perspective transformation to eliminate lens distortion in the image; obtaining the contour information of the tool by performing edge extraction on the image after the distortion correction; and obtaining a corrected image based on the contour information of the tool.
[0011] In some embodiments, the tool wear recognition model in step S3 obtains tool wear detection data by preprocessing a data set, performs data cleaning and feature extraction on the wear detection data, and constructs a machine learning model training data set; constructs a convolutional neural network model, trains the convolutional neural network model with the machine learning model training data set, and obtains a tool wear recognition model.
[0012] In some embodiments, the tool wear features in step S3 obtain preliminary feature representations of the preprocessed data set through a feature cascade method; for the feature representation, a weight optimization algorithm is used to determine the weight coefficients of each feature representation to obtain an optimized feature representation; the optimized feature representation is input into a tool wear recognition model, and the deep features of the tool wear are obtained through the tool wear recognition model; and a fused tool wear feature is generated based on the deep features of the tool wear.
[0013] In some embodiments, a support vector machine algorithm is used to classify the tool wear degree in the deep features of tool wear. If the classification result meets a preset threshold, the deep features are used as the final tool wear features.
[0014] In some embodiments, in step S3, a tool wear detection data set is obtained, and a preset feature extraction algorithm is used to extract wear features to construct an initial tool wear recognition model; for newly added wear detection data, an incremental learning strategy is used to extract features, which are integrated with the initial tool wear recognition model to update the parameters of the initial tool wear recognition model; if the model accuracy does not reach the preset threshold, incremental learning is continued; the tool wear status is detected according to the updated model to determine whether maintenance is required; if the model detection result does not reach the preset reliability threshold, the model is tuned; and the model is updated regularly.
[0015] In some embodiments, in step S4: obtain a multi-source sensor signal including at least vibration, acoustic emission and current signals, pre-process the multi-source sensor signal, and extract the time-frequency domain characteristics of the multi-source sensor signal; construct a deep learning model integrating classification and regression based on the time-frequency domain characteristics of the multi-source sensor signal; the deep learning model includes a classification head and a regression head; classify the fused tool wear features based on the classification head to generate the tool wear status; quantify the tool wear degree of the fused tool wear features based on the regression head to generate a quantified result.
[0016] Beneficial Effects
[0017] Compared with the prior art, the present invention has the following advantages and technical effects: the present invention installs multiple visual sensors on the spindle of the machine tool to obtain tool image data under different viewing angles and lighting conditions, performs image preprocessing, designs targeted image feature extraction algorithms, constructs a multi-view and multi-scale tool wear feature fusion model, and combines deep learning algorithms to automatically extract deep features of tool wear, thereby realizing online recognition and quantitative characterization of tool wear status. The present invention improves the accuracy, robustness and stability of tool wear identification, reduces the labeled data required for model training, has good generalization ability and adaptability, and can effectively guide tool maintenance and replacement of CNC machine tools. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 This is a flow chart of a method for monitoring tool wear of CNC machine tools based on deep learning according to an embodiment of the present invention;
[0020] Figure 2 A schematic diagram of tool wear characteristic result generation according to an embodiment of the present invention;
[0021] Figure 3 This is a schematic diagram of obtaining the original shape of a tool according to an embodiment of the present invention. DETAILED DESCRIPTION
[0022] The present application is described in detail below with reference to the accompanying drawings and specific embodiments.
[0023] The following describes the implementation methods of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, in the absence of conflict, the following embodiments and the features in the embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work belong to the scope of protection of the present application.
[0024] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present application, it should be understood by those skilled in the art that an aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number and aspect described herein can be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this device and / or practice this method.
[0025] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. The illustrations only show the components related to the present application rather than being drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.
[0026] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the examples can be practiced without these specific details.
[0027] The technical solutions provided by various embodiments of the present application are described below in conjunction with the accompanying drawings.
[0028] See also Figure 1-3In this embodiment: a CNC machine tool tool wear monitoring method based on deep learning includes: S1. Aiming at the complex and changeable processing environment of CNC machine tools, multiple visual sensors are installed on the machine tool spindle to obtain tool image data under different viewing angles and lighting conditions, and the sensor layout and parameter settings are optimized according to the installation space inside the machine tool and the imaging quality requirements to ensure that clear and stable tool image data are obtained; tool image data under multiple viewing angles and multiple lighting conditions are obtained, and image fusion algorithm is used for processing to generate a three-dimensional surface model of the tool in a unified coordinate system; for the three-dimensional surface model of the tool, tool geometric parameters and surface texture features are extracted to construct a tool feature vector; if the tool is judged to be abnormally worn or damaged according to the tool feature vector, an alarm signal is triggered to notify the operator to replace the tool to avoid degradation of processing quality and damage to equipment.
[0029] For example, according to the processing environment characteristics of the CNC machine tool, a high-resolution industrial camera can be installed in each of the four directions of the front, back, left, and right of the machine tool spindle. For example, a camera with a resolution of 2448×2048 pixels and a frame rate of 60 frames per second is used, and a fixed-focus lens with a focal length of 25mm and an aperture of F4 is selected to obtain multi-perspective, high-quality tool image data; the camera coordinate system is unified with the machine tool coordinate system through calibration, and then the image stitching algorithm, such as image stitching based on SIFT feature matching, is used to fuse the multi-perspective images into a three-dimensional surface model of the tool in a unified coordinate system; for the obtained three-dimensional surface model of the tool, the geometric parameters of the tool, such as length, diameter, helix angle, etc., and the table The tool feature vector is constructed based on surface texture features, such as grayscale co-occurrence matrix and wavelet transform coefficients. The support vector machine algorithm is used to train and classify the tool features. The model parameters are optimized through grid search and cross-validation to obtain a tool status monitoring model with an accuracy of more than 95%. During the CNC machining process, the tool image is collected in real time and input into the monitoring model. If the tool wear exceeds the threshold (such as 3mm) or abnormal conditions such as chipping and broken edge occur, an alarm signal is sent to the CNC system, and the feed speed and rotation speed are dynamically adjusted according to the wear status. For example, when the wear is 1-2mm, the feed speed is reduced by 20% and the rotation speed is reduced by 10%, so as to extend the tool life and improve the machining surface quality and efficiency.
[0030] S2. Use image preprocessing technology to denoise, enhance and correct the collected tool image data to reduce the interference of factors such as distortion, occlusion, and illumination changes. Improve the quality and availability of image data through algorithms such as adaptive filtering, histogram equalization, and perspective transformation. Design targeted image feature extraction algorithms based on the characteristics of tool wear to highlight the texture, edge, color and other features of the tool wear area.
[0031] Step 1: Get the original tool image data and convert it into a grayscale image; Step 2: Use the adaptive median filtering algorithm to denoise the grayscale image, smooth the image, eliminate the salt and pepper noise, and obtain the denoised image; Step 3: Perform histogram equalization on the denoised image, stretch the pixel grayscale value distribution range, and enhance the overall image contrast; Step 4: Perform geometric correction on the equalized image through perspective transformation to eliminate the distortion introduced by lens distortion and restore the original shape of the tool; Step 5: On the corrected image, design a multi-scale Gabor filter group based on the grayscale, texture, and edge features of the tool wear area to extract the texture features of the wear area; Step 6: Binarize the Gabor texture feature map, use the Otsu threshold segmentation algorithm to adaptively determine the binarization threshold, and segment the wear area; Step 7: For the segmented wear area, extract its shape, area, grayscale statistical histogram and other feature vectors for subsequent wear degree judgment and classification.
[0032] Exemplarily, a multi-scale Gabor filter group is designed according to the grayscale, texture, and edge features of the tool wear area, and the position and shape of the wear area are determined by extracting texture features.
[0033] The tool wear area image is acquired and preprocessed to obtain a preprocessed image; a multi-scale Gabor filter group is constructed to extract texture features from the preprocessed image to form a feature vector; and a support vector machine recognition model is trained based on the feature vector to determine the position and shape of the wear area of the tool image to be tested.
[0034] Exemplarily, first, after acquiring an image of the tool wear area, image preprocessing is performed to improve image quality, and a Gaussian filter is used for denoising. Assuming that the noise of the image is Gaussian noise, a convolution operation is performed using a 3x3 Gaussian kernel to smooth the image; then histogram equalization is performed to enhance the contrast of the image to make the wear area more obvious; then, a multi-scale Gabor filter group is constructed to extract texture features of different scales and directions; assuming that a Gabor filter group of 5 scales and 8 directions is used, a convolution operation is performed on the image to obtain 40 response maps; each response map represents the texture features of the image at a specific scale and direction; next, the grayscale, texture and edge features of the tool wear area are extracted; the grayscale features can be obtained by calculating the average grayscale value of the wear area; the texture features are statistically analyzed through the response map of the Gabor filter, such as calculating the mean and standard deviation of the response map. ; Edge features can be extracted through the Canny edge detection algorithm, and the low threshold is set to 50 and the high threshold is set to 150 to obtain an edge map; these features are combined into a feature vector; based on the extracted feature vector, the support vector machine algorithm is used to train the wear area recognition model; 1000 labeled wear images are used as the training set, and the RBF kernel function is used to set the penalty parameter C to 1 for model training; the trained model is used to determine the position and shape of the wear area of the tool image to be tested; if the wear area is identified, the degree of wear of the tool is determined based on its position and shape information; the degree of wear can be quantified by calculating the ratio of the area of the wear area to the total area of the tool. For example, if the ratio is greater than 2, it is considered that the wear is severe; based on the degree of wear, the result of whether the tool needs to be replaced or maintained is obtained. If the wear is severe, it is recommended to replace the tool, otherwise it is recommended to perform maintenance; through the above steps, the wear area detection is completed.
[0035] The Otsu threshold segmentation algorithm is used to binarize the Gabor texture feature map, and the threshold is adaptively determined to accurately segment the wear area of the tool.
[0036] The preprocessed tool image is obtained, and the Gabor texture features of the tool image are extracted to obtain a Gabor texture feature map; the Otsu threshold segmentation algorithm is used to determine the optimal binarization threshold of the Gabor texture feature map; if the pixel value of the Gabor texture feature map is greater than the optimal binarization threshold, the pixel point is set as the target pixel point to obtain a binary image; through morphological processing, the candidate wear area of the binary image is obtained; according to the area and perimeter of the candidate wear area, whether the candidate wear area is a tool wear area is determined to obtain the final wear area of the tool.
[0037] Exemplarily, first, after acquiring the tool image, grayscale processing is performed to convert the color image into a grayscale image to reduce computational complexity and data redundancy; grayscale can be achieved by a weighted average method, for example, using the formula Y=299R+587G+114B, where R, G, and B are the pixel values of the red, green, and blue channels, respectively; then, a Gaussian filter is applied for denoising, and a suitable filter size and standard deviation are selected, such as a 3x3 filter and a standard deviation of 0, to smooth the image and reduce noise interference; then, a Gabor filter is used to extract the texture features of the image; a set of Gabor filters with different directions and frequencies, such as 8 directions and 4 frequencies, are selected and applied to the preprocessed image to obtain a Gabor texture feature map; next, the Otsu threshold segmentation algorithm is used to perform adaptive threshold calculation on the Gabor texture feature map; the Otsu algorithm determines the optimal threshold by maximizing the inter-class variance The image is divided into foreground and background according to the calculated optimal threshold. The Gabor texture feature map is binarized according to the calculated optimal threshold, and the feature map is converted into a binary image. The binarized image may still have noise and interference areas, so morphological processing is required. First, an erosion operation is performed using a 3x3 structural element to remove small noise points. Then an expansion operation is performed to restore the real edges that have been eroded. After morphological processing, the connected areas in the binary image are extracted, and the connected component labeling algorithm is used to identify the candidate wear areas. Finally, the candidate wear areas are judged according to their geometric features, such as calculating the area and perimeter of each area, setting threshold conditions, such as if the area is greater than 50 pixels and the perimeter is greater than 30 pixels, to determine whether it is a real tool wear area, thereby obtaining the final tool wear area. The equalized image is geometrically corrected through perspective transformation to eliminate lens distortion and obtain the original shape of the tool for subsequent analysis.
[0038] Obtain pixel coordinate information of the tool area in the equalized tool image; determine the coordinates of four corner points of perspective transformation according to the pixel coordinate information; establish a perspective transformation matrix according to the four corner point coordinates; use the perspective transformation matrix to perform geometric transformation on the equalized tool image to eliminate perspective distortion in the image; perform distortion correction on the image after perspective transformation to eliminate lens distortion in the image; obtain tool contour information by performing edge extraction on the image after distortion correction; and obtain the original shape of the tool according to the tool contour information.
[0039] Exemplarily, first, the equalized tool image is analyzed by image processing technology, and the pixel coordinate information of the tool area is extracted using an edge detection algorithm such as the Canny operator; assuming that the extracted coordinates are (100, 200), (400, 200), (100, 500), and (400, 500), these coordinates represent the four vertices of the tool area; next, based on these vertex coordinates, the coordinates of the four corner points of the perspective transformation are determined; the corner points can be further accurately located by calculating the geometric center of the image or using the Hough transform; assuming that the final corner point coordinates are (120, 220), (380, 220), (120, 480), and (380, 480); using these corner point coordinates, a perspective transformation matrix is established; the perspective transformation matrix can be obtained by using the getPerspectiveTransform in OpenCV. m function is calculated; then, the perspective transformation matrix is used to perform geometric transformation on the equalized tool image to eliminate the perspective distortion in the image; next, the image after perspective transformation is subjected to distortion correction to eliminate the lens distortion in the image; the camera calibration parameters and the undistort function in OpenCV can be used for correction; the corrected image is closer to the real shape; then, the edge information of the tool is obtained by extracting the edge of the distortion-corrected image; the Sobel operator or the Laplacian operator can be used for edge detection to obtain the tool contour; according to the obtained tool contour information, the contour approximation algorithm such as the Douglas-Peucker algorithm is used to obtain the original shape of the tool; this provides a basis for subsequent tool defect detection; the entire process is completed automatically through information technology means, ensuring the accuracy and efficiency of the processing.
[0040] S3. Construct a multi-view and multi-scale tool wear feature fusion model, comprehensively analyze tool image data at different viewpoints and resolutions, and comprehensively characterize multiple features of tool wear. Use deep learning algorithms such as convolutional neural networks to automatically learn and extract deep features of tool wear, and improve the robustness and discriminability of feature representation. Through strategies such as feature cascading and weight optimization, effective fusion of multi-view features is achieved.
[0041] Acquire multi-view and multi-scale image data of the tool, pre-process the image data to improve the quality of the image data; use a convolutional neural network to extract deep features from the pre-processed image data; use a feature fusion strategy to achieve the fusion of the deep features; construct a tool wear discrimination model based on the fused features; if the discrimination result shows that the tool is worn, determine the remaining service life of the tool; continuously collect the tool wear data, and optimize the feature fusion model and the discrimination model through incremental learning.
[0042] Exemplarily, through feature cascading and weight optimization, effective fusion of multi-view and multi-scale features is achieved to obtain deep features of tool wear.
[0043] Acquire multi-view and multi-scale tool image features, fuse the image features through the feature cascade method, and obtain a preliminary feature representation; for the preliminary feature representation, use a weight optimization algorithm to determine the weight coefficient of each feature to obtain an optimized feature representation; input the optimized feature representation into a deep learning model, and obtain the deep features of tool wear through a tool wear recognition model; according to the deep features, use a support vector machine algorithm to classify the degree of tool wear. If the classification result meets the preset threshold, use the deep features as the final tool wear features, otherwise return to the weight optimization step.
[0044] For example, in the tool wear image dataset, three viewing angles of 0°, 45°, and 90° were selected, and three scales of 100×100, 200×200, and 300×300 were used to collect tool images, and 9 groups of image features with different viewing angles and scales were obtained; through the feature cascade method, these 9 groups of image features were fused according to the viewing angle and scale, and a preliminary feature representation containing 2700 dimensional features was obtained; for this preliminary feature representation, the particle swarm optimization algorithm was used to optimize the feature weights, and by setting the fitness function and taking the classification accuracy as the optimization target, after 50 iterations, the optimal weight coefficients of each feature were obtained; the optimized feature representation was input into the convolutional neural network model, and the model contained 3 convolutional layers, 2 pooling layers, and 2 fully connected layers. The tool wear model was obtained through convolutional neural network model training. The 512-dimensional deep features of tool wear are used; according to the deep features, the support vector machine algorithm is used to classify the tool wear degree, and four categories are set: new tool, light wear, moderate wear, and severe wear. Through 5-fold cross validation, a classification accuracy of 92% is obtained, which meets the preset 90% accuracy threshold. Therefore, the current deep features are used as the final tool wear features; the extracted tool wear features are applied to the real-time monitoring system of CNC machine tools. The tool images are collected by high-speed cameras, the wear features are extracted, and compared with the preset thresholds. When the wear degree reaches moderate wear, the system automatically sends out a warning signal to prompt the operator to replace the tool, thereby realizing real-time monitoring and early warning of the tool wear status, providing a reliable decision-making basis for tool maintenance and replacement, effectively extending the service life of the tool, and improving processing efficiency and quality.
[0045] Based on the wear detection results, a machine learning algorithm is used to determine the wear status and remaining service life of the tool, obtaining a basis for decision-making on maintenance and replacement.
[0046] Acquire wear detection data of the tool, perform data cleaning and feature extraction on the wear detection data, and construct a machine learning model training data set; use at least one machine learning algorithm to train a wear state prediction model for the training data set; input the wear detection data of the tool to be predicted into the wear state prediction model to obtain a wear state prediction result of the tool; calculate the remaining service life of the tool based on the wear state prediction result and the preset tool service life law.
[0047] For example, when collecting and preprocessing wear data, the vibration, temperature, and acoustic emission signal of the tool can be collected in real time through sensors; assuming that the collected data set contains 1000 records, each record has 10 features, including vibration frequency, temperature change rate, etc.; during the data cleaning process, first remove missing values and outliers, for example, records with a vibration frequency exceeding 1000Hz are considered abnormal and deleted; when extracting features, principal component analysis (PCA) can be used to reduce the dimensionality of the 10 features to 3 principal components to reduce the computational complexity; next, select a suitable machine learning algorithm to train the wear state prediction model; the random forest algorithm can be selected because it performs well in processing high-dimensional data and nonlinear relationships; divide the data set into a training set and a test set in a ratio of 8:2, use the training set to train the model, and the test set to evaluate the model performance ; The trained model can predict the wear status of the tool. For example, the prediction result shows that the wear degree of a certain tool is 7 (between 0 and 1), which means that the wear is serious; combined with the wear status prediction results, the linear regression model is used to predict the remaining service life of the tool; it is assumed that according to historical data, the average remaining service life of a tool with a wear degree of 7 is 50 hours; if the predicted remaining service life is lower than the threshold of 30 hours, the system automatically outputs the decision to maintain or replace the tool; in order to evaluate and optimize the prediction model, the actual maintenance and replacement time can be compared with the prediction results, the prediction error can be calculated, and the model parameters can be adjusted using cross-validation; when continuously iterating and updating the model, new wear detection data is regularly collected and the model is retrained to improve the prediction accuracy; for example, the data set is updated once a month to ensure that the model can adapt to new wear patterns and environmental changes.
[0048] Through incremental learning, the feature fusion model is continuously updated and optimized to improve the accuracy and reliability of wear detection and ensure the accuracy of tool maintenance.
[0049] Obtain a tool wear detection data set, use a preset feature extraction algorithm to extract wear features, and build an initial feature fusion model; for the newly added wear detection data, use an incremental learning strategy to extract features, fuse them with the initial model, and update the model parameters; if the model accuracy does not reach the preset threshold, continue incremental learning; detect the tool wear status according to the updated model to determine whether maintenance is required; if the model detection result does not reach the preset reliability threshold, tune the model; and update the model regularly.
[0050] For example, in tool wear detection, wear features are first extracted from vibration signals through a preset feature extraction algorithm, such as wavelet transform or Fourier transform. Assume that we use wavelet transform to decompose the signal into different frequency bands and extract energy features as the initial feature set. Next, an initial feature fusion model is constructed using support vector machine (SVM). Assume that the accuracy of the initial model is 85%. As time goes by, new wear detection data continues to increase. We adopt an incremental learning strategy and use online learning algorithms such as stochastic gradient descent (SGD) to update model parameters. After each new data is added, feature extraction is performed and fused with the initial model. The updated model is evaluated by a cross-validation method. Assume that the cross-validation results show that the model accuracy is improved to 88%. If the model accuracy does not reach the preset threshold of 90%, incremental learning continues. The new model detects the tool wear status and determines whether maintenance is needed. It is assumed that the test results show that the wear degree of a batch of tools has reached a critical value and maintenance is needed. The results of the model test are statistically analyzed. If the statistical results show that the reliability of the model under certain specific working conditions is only 92%, which does not meet the preset reliability threshold of 95%, the model is tuned. During the tuning process, the Bayesian optimization method may be used to adjust the model parameters. The optimized model is used for tool wear detection again, assuming that the accuracy and reliability of the model meet the preset requirements at this time. In order to ensure the long-term effectiveness of the model, the model is regularly updated to adapt to new tool wear characteristics to ensure the accuracy of wear detection and the timeliness of maintenance. In this way, the entire process forms a closed-loop automated system that can continuously improve the accuracy and reliability of tool wear detection.
[0051] S4. The tool wear recognition model based on deep learning classifies and regresses the fused tool wear features to achieve online recognition and quantitative characterization of the tool wear status; adopts transfer learning, small sample learning and other technologies, uses the knowledge of pre-trained models, reduces the labeled data required for model training, and improves the generalization ability and adaptability of the model; through model integration, incremental learning and other methods, further improves the accuracy and stability of tool wear recognition.
[0052] Acquire multi-source sensor signals including at least vibration, acoustic emission and current signals, preprocess the multi-source sensor signals, and extract time-frequency domain features of the multi-source sensor signals; construct a deep learning model integrating classification and regression, the deep learning model includes a classification head and a regression head, the classification head is used to judge the tool wear state, and the regression head is used to quantify the tool wear degree; acquire tool wear data collected online, adopt an incremental learning method to dynamically update the deep learning model, and adjust the parameters of the deep learning model according to new samples.
[0053] Exemplarily, the most discriminative feature subset of tool wear is obtained through feature selection and feature fusion algorithms.
[0054] For the collected tool wear data set, a feature selection algorithm is used to screen out discriminative features; a feature fusion algorithm is used for the screened features to combine a feature subset with stronger discriminative power; a preset wear discrimination model is used to verify the feature subset to determine whether it has a high wear discrimination ability; if the verification result does not reach the preset threshold, the feature selection algorithm parameters are adjusted and re-screened; if the verification result has reached the preset threshold, the feature subset is applied to the real-time monitoring system of tool wear to improve the monitoring accuracy.
[0055] Exemplarily, first, for the collected tool wear data set, the Relief feature selection algorithm is used to preliminarily screen out the features with discriminative power; the algorithm calculates the correlation between each feature and the category, and selects the top 20% of the features with the highest correlation with the category as the preliminary screening results; then, the Canonical Correlation Analysis (CCA) feature fusion algorithm is used for the preliminarily screened features, these features are combined in pairs, the typical correlation coefficients between them are calculated, and the features with correlation coefficients greater than 8 are combined into new fused features, and further combined into feature subsets with stronger discriminative power; then, the preset support vector machine (SVM) wear discrimination model is used to cross-validate the fused feature subset to determine whether it has a high wear discrimination ability; if the average accuracy of the 5-fold cross validation does not reach the preset 90%, the SVM ... threshold, return to the first step, adjust the selection ratio of the Relief algorithm to 25% and then re-screen; if the verification result shows that the discriminative power of the feature subset has reached the preset threshold, then output the feature subset as the final result; apply the obtained feature subset to the tool wear real-time monitoring system based on Convolutional Neural Network (CNN) to improve the monitoring accuracy; at the same time, collect new tool wear data every month, and use the incremental learning algorithm to update the model parameters of the Relief feature selection and CCA feature fusion algorithms to adapt to changes in wear patterns; through the above method, a feature subset with high discriminative power can be automatically screened out from massive tool wear data and applied to the real-time monitoring system, thereby realizing accurate discrimination and prediction of tool wear status, and providing a reliable decision-making basis for equipment management and production scheduling of manufacturing enterprises.
[0056] A transfer learning approach is adopted to obtain a universal tool wear feature representation using a pre-trained deep learning model.
[0057] Acquire at least one tool wear image data set, use a pre-trained deep learning model to perform feature extraction on the tool wear image, and obtain a preliminary wear feature representation vector; use a clustering algorithm to perform feature aggregation on the preliminary wear feature representation vector to obtain a compact and robust target wear feature representation; train a support vector machine classification model based on the target wear feature representation, and if the support vector machine classification model is trained, use it for identification and classification of tool wear status.
[0058] Exemplarily, in the implementation process, the ResNet50 model pre-trained on the ImageNet dataset was first used, and the transfer learning technology was used to obtain the features of the tool wear image dataset; specifically, the tool wear image was input into the ResNet50 model, and the output of the penultimate convolutional layer was extracted as the preliminary wear feature representation vector, which had a length of 2048; then, in order to optimize these feature representations, the K-means clustering algorithm was used to cluster the feature vectors into 5 categories. The Euclidean distance was used as the distance metric in the clustering process, and the optimal number of clusters was determined by the elbow rule; after obtaining the cluster center, each feature vector was connected to its nearest cluster center to form a new feature representation, so that Not only does it make the feature representation more compact, but it also enhances the robustness of the model. On this basis, the support vector machine classification model is trained using these optimized feature representations. The radial basis function is selected as the kernel function, and the grid search method is used to determine the optimal hyperparameters, that is, the penalty parameter C is 10, and the kernel function parameter gamma is 01. After training, the accuracy of the obtained classification model on the test set reached 92%. Finally, the model is deployed in the actual production environment, and the collected tool images are analyzed in real time. The model can accurately determine the wear status of the tool. For example, in a certain production process, the model accurately identified 3 severely worn tools and promptly prompted the operator to replace them, which effectively ensured the processing quality and improved production efficiency.
[0059] According to the incremental learning method, the model parameters are dynamically updated to improve the accuracy of judging new wear states; the vibration, temperature, and current multi-source sensor data of the equipment are obtained, and relevant features are extracted as inputs of the support vector machine model; the current wear state of the equipment is judged; if the current wear state does not belong to a known wear state category, the current wear state data is added to the training set; the support vector machine model is retrained by incremental learning, and the parameters of the support vector machine model are updated; the wear state of the equipment is judged according to the updated support vector machine model, and the judgment result is fed back to the equipment management system.
[0060] Exemplarily, in the process of monitoring the wear status of equipment, the vibration signal of the equipment is collected by a vibration sensor with a sampling frequency of 10kHz, and each sample contains 1024 data points; the vibration signal is analyzed in time and frequency using wavelet transform, and 10 characteristic parameters such as wavelet energy and wavelet entropy are extracted to construct a characteristic vector; the support vector machine algorithm is used to train the existing 100 equipment wear status sample data to establish an initial wear status discrimination model; when new wear status data of the equipment is obtained, the characteristic vector is extracted and input into the support vector machine model for classification and discrimination; if the confidence of the classification result is lower than 8, it is considered that the wear status does not belong to a known category, and it is added to the training set, and the support vector machine is trained using an incremental learning algorithm. The model is retrained and the model parameters are updated. For example, when a new wear status data is collected, the feature vector is extracted and input into the model. The classification confidence is 75, which is lower than the threshold of 8. Then the sample data is added to the training set, and the support vector, Lagrange multiplier and other parameters of the support vector machine are updated using the sequence minimum optimization algorithm to obtain an updated wear status discrimination model. The updated model is used to discriminate the subsequent collected equipment wear status data, continuously improving the generalization ability and classification accuracy of the model, and providing a reliable basis for equipment maintenance decisions. Through incremental learning and dynamic updating of model parameters, the wear status discrimination model can continuously evolve, adapt to changes in the equipment wear status, and realize real-time monitoring and early warning of the equipment health status.
[0061] The same and similar parts between the various embodiments in this specification can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0062] The above is only a specific implementation of the present application, but the protection scope of the present application 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 in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A CNC machine tool tool wear monitoring method based on deep learning, characterized in that: The following steps are involved: S1: Acquire tool image data based on multiple visual sensors; S2: preprocessing the tool image data based on image preprocessing technology to obtain a preprocessed data set; S3: constructing a tool wear recognition model based on a convolutional neural network model, inputting the preprocessed data set into the tool wear recognition model for calculation, and generating a fused tool wear feature; S4: classifying and regressing the fused tool wear features to generate tool wear monitoring results; In the step S4: obtaining a multi-source sensor signal including at least vibration, acoustic emission and current signals, preprocessing the multi-source sensor signal, and extracting time-frequency domain features of the multi-source sensor signal; Based on the time-frequency domain features of the multi-source sensor signals, a deep learning model integrating classification and regression is constructed; the deep learning model includes a classification head and a regression head; based on the classification head, the fused tool wear features are classified to generate a tool wear state; quantifying the tool wear degree of the fused tool wear features based on the regression head to generate a quantified result; For the collected tool wear data set, a feature selection algorithm is used to filter out discriminative features; Use feature fusion algorithm on the selected features to combine feature subsets with stronger discriminative power; Using a preset wear discrimination model, the feature subset is verified to determine whether it has a high wear discrimination capability; if the verification result does not reach a preset threshold, the feature selection algorithm parameters are adjusted and re-screened; if the verification result has reached the preset threshold, the feature subset is applied to a real-time monitoring system for tool wear to improve monitoring accuracy; A transfer learning method is used to obtain a universal tool wear feature representation using a pre-trained deep learning model; Acquire at least one tool wear image data set, use a pre-trained deep learning model to perform feature extraction on the tool wear image to obtain a preliminary wear feature representation vector; use a clustering algorithm to perform feature aggregation on the preliminary wear feature representation vector to obtain a compact and robust target wear feature representation; train a support vector machine classification model based on the target wear feature representation, and if the support vector machine classification model is trained, use it for identification and classification of tool wear status; According to the incremental learning method, the model parameters are dynamically updated to improve the accuracy of judging new wear states; the vibration, temperature, and current multi-source sensor data of the equipment are obtained, and relevant features are extracted as inputs of the support vector machine model; the current wear state of the equipment is judged; if the current wear state does not belong to the known wear state category, the data of the current wear state is added to the training set; the support vector machine model is retrained by incremental learning, and the parameters of the support vector machine model are updated; the wear state of the equipment is judged according to the updated support vector machine model, and the judgment result is fed back to the equipment management system.
2. The method for monitoring tool wear of CNC machine tools based on deep learning according to claim 1, characterized in that: In the step S1, a plurality of the visual sensors are installed on the main spindle of the machine tool, the monitoring angles of the plurality of visual sensors are different, and the tool image data under different visual and lighting conditions are acquired based on different visual sensors.
3. The method for monitoring tool wear of CNC machine tools based on deep learning according to claim 1, characterized in that: In the step S2, the tool image data is converted into a grayscale image; based on an adaptive median filtering algorithm, the grayscale image is sequentially denoised, smoothed, and salt and pepper noise is eliminated to obtain a denoised image; the denoised image is subjected to histogram equalization to generate an equalized image; the equalized image is geometrically corrected by perspective transformation to generate a corrected image; a multiscale Gabor filter group is constructed, and based on the multiscale Gabor filter group, texture features of the wear area in the corrected image are extracted to obtain a Gabor texture feature map; the Gabor texture feature map is binarized, and the Otsu threshold segmentation algorithm is used to adaptively determine the binarization threshold, segment the wear area, and generate the preprocessed data set.
4. The method for monitoring tool wear of CNC machine tools based on deep learning according to claim 3 is characterized in that: The formation process of the corrected image includes: obtaining pixel coordinate information of the tool area in the equalized image; determining the coordinates of four corner points of perspective transformation according to the pixel coordinate information; establishing a perspective transformation matrix according to the four corner point coordinates; using the perspective transformation matrix to perform geometric transformation on the equalized image to eliminate perspective distortion in the image; performing distortion correction on the image after perspective transformation to eliminate lens distortion in the image; obtaining the contour information of the tool by performing edge extraction on the image after distortion correction; and obtaining the corrected image according to the contour information of the tool.
5. The method for monitoring tool wear of CNC machine tools based on deep learning according to claim 1, characterized in that: The tool wear identification model in step S3 obtains the tool wear detection data through the preprocessing data set, performs data cleaning and feature extraction on the wear detection data, and constructs a machine learning model training data set; constructs the convolutional neural network model, trains the convolutional neural network model through the machine learning model training data set, and obtains the tool wear identification model.
6. The method for monitoring tool wear of CNC machine tools based on deep learning according to claim 1, characterized in that: The tool wear feature in step S3 obtains the preliminary feature representation of the preprocessed data set through the feature cascade method; for the feature representation, a weight optimization algorithm is used to determine the weight coefficient of each feature representation to obtain the optimized feature representation; the optimized feature representation is input into the tool wear recognition model, and the deep features of tool wear are obtained through the tool wear recognition model training; the fused tool wear features are generated based on the deep features of tool wear.
7. The method for monitoring tool wear of CNC machine tools based on deep learning according to claim 6, characterized in that: A support vector machine algorithm is used to classify the tool wear degree in the deep features of the tool wear. If the classification result meets a preset threshold, the deep features are used as the final tool wear features.
8. The method for monitoring tool wear of CNC machine tools based on deep learning according to claim 1, characterized in that: In the step S3, a tool wear detection data set is obtained, and a preset feature extraction algorithm is used to extract wear features to construct the initial tool wear recognition model; for the newly added wear detection data, features are extracted using an incremental learning strategy, and merged with the initial tool wear recognition model to update the parameters of the initial tool wear recognition model; if the model accuracy does not reach the preset threshold, incremental learning is continued; the tool wear state is detected according to the updated model to determine whether maintenance is required; If the model detection result does not reach the preset reliability threshold, the model is tuned; the model is updated regularly.
Citation Information
Patent Citations
Article image defect detection method and device based on convolutional neural network
CN110766689A
Cutter-oriented online rapid optimization model monitoring method
CN113601261A
Wind power equipment defect intelligent image analysis method
CN117994679A
Wind generating set image identification fault detection method
CN118053111A
Deep learning-based numerical control machine tool cutter life prediction method and system
CN118378373A