With the development of modern manufacturing,the machining accuracy of CNC machine tools has drawn increasing attention.Especially in the milling process of difficult-to-machine materials,the tool wear is very serious,which is the main source of machining errors.Therefore,it is of great significance to monitor the milling cutters wear state and compensate the error for improving machining accuracy and efficiency.Aiming at the integration of automatic and intelligent detection-machining-compensation process,the tool wear detection and the error compensation technology caused by wear in the milling process are studied.Firstly,a machine vision detection system for milling cutter wear is proposed and the corresponding software is developed.According to the needs of monitoring the milling cutter wear in the machining gap,the telecentric lens and the ring light source are used to capture the surface images of the milling cutter.The zoom lens and backlight are used to collect the milling cutter profile images.Then,based on the Spring Boot and React JS frameworks,the corresponding functions are integrated into the “Nagaoyun” CNC machine tool intelligent cloud platform to realize cloud monitoring and management of the entire analysis process.Secondly,a fast image registration and synthesis algorithm based on feature point input is proposed.First,the SURF feature point detection is performed.The local center symmetry point of the image is found as the reference point of the milling cutter tool nose,and the points of multiple images are input as known quantities.Then,the feature point matching pairs from the vicinity of the tool nose are searched.After repeated iterations,the registration feature point pairs with the best matching effect are obtained.The innovative method uses the tool nose as a known input point,so there is no need to randomly search among multiple images.It could improve the registration efficiency and the accuracy,also reduce the number of mismatched points.Thirdly,for the wear of the milling cutter edge,a new online wear image processing workflow based on edge detection and contour modeling is proposed in this paper to model the shape of the milling cutter’s rotating envelope and analyze the wear pattern.The overall contour images of the tool are acquired for several times.After distortion correction,filtering and image enhancement,the Canny operator and the improved Zernike moment method are used to obtain the precise positioning of the the milling cutter edge.Then the contour model of the envelope surface that is in direct contact with the workpiece formed by the high-speed rotation of the milling cutter is reconstructed.The surface profile model is used as the basis for compensation of errors caused by wear.This innovative workflow solves the problem that milling cutter shape changes caused by wear are difficult to model online.Therefore,the online-collected milling cutter profile image can not only be used to monitor of the milling cutter wear state,but also as a model basis for compensating the error caused by wear during milling.Fourthly,an improved Attention Branch Network(ABN)for the task of milling cutter wear status classification is proposed.The network structure and the calculation method of the training loss function are optimized,making it more suitable for the fine-grained image classification task of milling cutter wear state classification.The interpretability of the model is improved by adding the attention mechanism and using the attention map as feedback during the training process.At the same time,the attention area is trained.One of the goals of model training is to find the best attention area.The attention weight is marked in the original image to form an attention map,which is used as an enhancement feature to reduce the attention area of the model from the entire image to the wear area of the milling cutter surface image.The wear feature can be decoupled from other features,which improves the accuracy of the milling cutter image wear type classification task and the generalization ability of the model.Finally,the automatic generation technology of milling processing G-code and the compensation strategy for errors caused by milling cutter wear are studied.In order to ensure the automation of the processing process,a module for automatically generating milling processing G-code is developed and used as a reference for compensation.First,the STL files of the raw material and the workpiece are analyzed to obtain the shape and size of the removed part.Then,the the key point coordinates of the contour are picked up.According to the input process parameters,the idea of layered milling is used to generate the milling track and machining G-code.The geometric relationship between the tool axis trajectory surface and the milling cutter rotation envelope surface is modeled and analyzed.Different strategies are adopted to complete the correction of the side milling and point milling tool paths and the optimization of processing parameters. |