In-situ measurement and error compensation method and system for microstructure ultra-precision machining
By integrating an optical microscopy imaging module and a super-resolution reconstruction network into an ultra-precision machine tool, the problem of insufficient measurement accuracy in ultra-precision machining is solved, enabling nanoscale in-situ measurement and error compensation of microstructures, thereby improving machining efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG UNIV
- Filing Date
- 2026-03-02
- Publication Date
- 2026-06-09
AI Technical Summary
Existing ultra-precision machining technologies suffer from secondary clamping errors in off-machine measurements, limited resolution of microscopic images in in-situ measurements, and insufficient measurement accuracy, making it difficult to meet the needs of nanoscale geometric evaluation.
An optical microscopic imaging module is integrated into an ultra-precision machine tool. Through pixel size calibration and a super-resolution reconstruction network based on a local implicit image function framework, a high-resolution reconstructed image is generated. Combined with pixel-level edge detection and sub-pixel fitting, in-situ measurement and error compensation of microstructures are achieved.
It achieves nanometer-level in-situ measurement and closed-loop error compensation of microstructure geometry accuracy, improves processing efficiency and dimensional consistency, reduces workpiece assembly and disassembly time and energy consumption, and does not require a significant increase in hardware complexity.
Smart Images

Figure CN122175784A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ultra-precision machining and measurement technology, and in particular to an in-situ measurement and error compensation method and system for ultra-precision machining of microstructures. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Functional microstructures are widely used in high-end fields such as optical systems, semiconductor devices, and precision instruments. The accuracy of their geometry and critical dimensions directly determines the performance of the devices. Ultra-precision machining technology can achieve sub-micron level geometric accuracy and nanometer level surface quality on workpiece surfaces. However, due to various factors such as machine tool thermal drift, tool wear, material elastic-plastic effects, and machining vibration, the actual morphology of the machined microstructure inevitably deviates from the designed morphology. Therefore, it is necessary to perform high-precision geometric evaluation of the microstructure and implement error compensation.
[0004] Currently, the mainstream method for improving the precision of microstructures in industry is a cyclical model of "machining-off-machine measurement-re-machining compensation". This method requires multiple disassembly and assembly of the workpiece, which is not only time-consuming and energy-intensive, but also introduces secondary clamping errors, making it difficult to meet the extremely high precision requirements of ultra-precision machining. To solve the problem of secondary clamping errors, in-situ measurement technology has emerged, which measures the workpiece directly during the machining process to eliminate the positional deviations caused by disassembly and assembly. Among existing in-situ measurement technologies, high-end optical metrology equipment such as white light interferometry and laser confocal microscopy have high resolution, but their system structures are complex, and the purchase and maintenance costs are high. They are also highly sensitive to environmental vibrations and temperature and humidity changes, making it difficult to integrate them stably on ultra-precision machine tools for a long time. In-situ measurement methods based on microscopic vision have become a current research hotspot due to their advantages such as simple structure, low cost, and ease of integration into machine tools. However, their measurement accuracy is poor due to the low effective resolution of microscopic imaging, large sensor sampling interval, and noise and edge blurring in microscopic images. Furthermore, microscopic images of microstructures at the microscopic scale have problems such as wide boundary transition regions, weak texture, and low signal-to-noise ratio. This makes traditional size measurement methods based on pixel counting prone to quantization errors and false edge interference, which are difficult to meet the needs of ultra-precision machining for nanoscale geometric evaluation. Summary of the Invention
[0005] To address the issues of secondary clamping errors in off-machine measurement, limited microscopic image resolution in in-situ measurement, and insufficient measurement accuracy in existing ultra-precision machining technologies, this invention provides an in-situ measurement and error compensation method and system for ultra-precision machining of microstructures. Without significantly increasing hardware complexity, it combines the advantages of high precision, high robustness, and easy engineering implementation, achieving nanometer-level in-situ measurement and closed-loop error compensation of microstructure geometric accuracy, thereby improving the efficiency, accuracy, and dimensional consistency of ultra-precision machining.
[0006] In a first aspect, the present invention provides an in-situ measurement and error compensation method for ultra-precision machining of microstructures.
[0007] An in-situ measurement and error compensation method for ultra-precision machining of microstructures includes: By utilizing the optical microscopic imaging module integrated on an ultra-precision machine tool, low-resolution microscopic images of the processed microstructure surface can be acquired in situ while the workpiece is clamped. The pixel size of the optical microscopy imaging module is calibrated to determine the pixel-to-length conversion factor; Low-resolution microscopic images are input into a super-resolution reconstruction network based on a local implicit image function framework for super-resolution reconstruction, generating high-resolution reconstructed images at any set magnification. Pixel-level edge detection and sub-pixel fitting are performed on high-resolution reconstructed images, and the actual measured dimensions of key geometries of microstructures are calculated by combining pixel-length conversion coefficients. The compensation amount is calculated based on the deviation between the design target size and the actual measured size of the microstructure. Under the same clamping datum, the compensation amount is converted into a tool path correction amount and then implemented for on-machine remachining to complete the closed-loop compensation of geometric error.
[0008] A further technical solution is that the optical microscopic imaging module includes a telecentric magnifying objective, a coaxial illumination source and an industrial camera arranged in sequence, wherein the optical axis of the telecentric magnifying objective is aligned with the normal of the surface of the microstructure workpiece, and the optical microscopic imaging module is rigidly mounted on the Z-axis slide of an ultra-precision machining tool. The pixel size of the optical microscopy imaging module was calibrated using a standard resolution test board, as follows: Using an optical microscopy imaging module, a microscopic image of a standard resolution test board is acquired, and the number of pixels representing the test board features in the microscopic image is determined. The ratio of the number of pixels in the test board features to its actual physical length is used as the pixel-to-length conversion factor.
[0009] A further technical solution is that the super-resolution reconstruction network based on the local implicit image function framework is built on an encoder-implicit decoder architecture, wherein: The encoder uses a residual dense network (RDN) as the backbone feature extraction network to process the input low-resolution microscopic images. I LR Perform deep feature extraction to generate a two-dimensional feature map. M ; The implicit decoder employs a multilayer perceptron structure, using continuous spatial coordinates. x Local feature vectors in the corresponding two-dimensional feature map z As input, the predicted coordinates x pixel valuess For the output, establish a mapping relationship between discrete pixels and continuous image functions; Reconstructing images of arbitrary resolution using a super-resolution reconstruction network involves: reconstructing the acquired low-resolution microscopic image... I LR Input the super-resolution reconstruction network, extract two-dimensional feature maps through the encoder, and then combine the two-dimensional feature maps with arbitrary continuous query coordinates of the image to be reconstructed. The input is fed into the implicit decoder, which, based on the pre-established mapping relationship, outputs the pixel prediction result at the query coordinate position, thus obtaining the reconstructed high-resolution image.
[0010] A further technical solution is that, during the reconstruction process, the super-resolution reconstruction network performs neighborhood feature expansion on the feature map, and concatenates the feature vectors within the neighborhood of the target prediction location to form expanded features; A local integration and weighted fusion strategy is adopted to decode the four sub-regions adjacent to the query coordinate point respectively, and the decoding results are weighted and fused according to the area or distance weight to obtain a smooth pixel prediction result.
[0011] A further technical solution is that the super-resolution reconstruction network is a network model that has been pre-trained offline and has its parameters frozen. Its offline training process includes: High-resolution raw images of microstructures were obtained using laser confocal microscopy as real sample data. Different tool parameters, machining parameters and light intensity variations are introduced into the sample data. Random scale cropping and downsampling are performed on the high-resolution original image to generate a low-resolution input image and the corresponding high-resolution supervised image, thus constructing a self-supervised training dataset. Using a self-supervised training dataset containing high- and low-resolution image pairs, a pre-built super-resolution reconstruction network is trained using an end-to-end optimization approach. The loss function is used as the loss function, Adam is used as the optimizer, and the model performance is evaluated by peak signal-to-noise ratio and structural similarity index, and iterative training is carried out. After training, all network parameters are frozen and stored to obtain a trained super-resolution reconstruction network. In the in-situ measurement stage, only the forward inference of the network is performed to complete the real-time resolution enhancement of the microscopic image.
[0012] Further technical solutions include pixel-level edge detection and sub-pixel fitting of high-resolution reconstructed images, including: The Canny operator is used to perform pixel-level edge detection on high-resolution reconstructed images, and pixel-level edge point sets are formed by double threshold hysteresis connection. For each pixel-level edge point, the gradient magnitude is collected at three adjacent sampling points along the gradient normal direction. The gradient magnitudes at the three points are then fitted with a quadratic function, and the extreme values are solved to obtain the sub-pixel offset. s ; subpixel offset s Applying the coordinates of the original pixel edge points yields sub-pixel level edge point coordinates; Based on all the acquired sub-pixel level edge points, the geometric contours of straight lines or arcs are reconstructed using least-squares line fitting or least-squares circle fitting according to the boundary type, and the corresponding pixel domain size is calculated. ; according to Converted to actual physical dimensions, the actual physical dimensions of the key geometry of the microstructure are output; among which... λ This is the pixel-to-length conversion factor. r For super-resolution reconstruction of magnification, the key geometry of the microstructure includes the width, spacing, and radius of the arc of the microgroove.
[0013] In a further technical solution, the tool path correction amount is a radial or axial correction amount, and the machine tool adopts a small depth of cut to perform in-machine remapping; after the in-machine remapping is completed, the in-situ measurement process is executed again to verify the error compensation effect. If the compensated dimension still does not meet the design accuracy requirements, the compensation machining process is iteratively executed until the design accuracy is met.
[0014] Secondly, the present invention provides an in-situ measurement and error compensation system for ultra-precision machining of microstructures.
[0015] An in-situ measurement and error compensation system for ultra-precision machining of microstructures includes: The low-resolution image acquisition module is used to acquire low-resolution microscopic images of the processed microstructure surface in situ while the workpiece is clamped, by utilizing the optical microscopic imaging module integrated on the ultra-precision machine tool. The pixel size calibration module is used to calibrate the pixel size of the optical microscopy imaging module and determine the pixel-length conversion factor. The high-resolution image reconstruction module is used to input low-resolution microscopic images into a super-resolution reconstruction network based on a local implicit image function framework for super-resolution reconstruction, and generate high-resolution reconstructed images at any set magnification. The microstructure geometry determination module is used to perform pixel-level edge detection and sub-pixel fitting on high-resolution reconstructed images, and calculates the actual measured dimensions of key microstructure geometry by combining pixel-length conversion coefficients. The ultra-precision machining error compensation control module is used to calculate the compensation amount based on the deviation between the design target size and the actual measured size of the microstructure. Under the same clamping reference, the compensation amount is converted into the tool path correction amount and implemented in-machine remachining to complete the geometric error closed-loop compensation.
[0016] Thirdly, the present invention also provides an electronic device, comprising: a memory for storing executable instructions; and a processor for executing the executable instructions stored in the memory to realize the above-mentioned in-situ measurement and error compensation method for ultra-precision machining of microstructures.
[0017] Fourthly, the present invention also provides a computer-readable storage medium storing executable instructions for inducing a processor to execute the executable instructions to realize the above-mentioned in-situ measurement and error compensation method for ultra-precision machining of microstructures.
[0018] The above one or more technical solutions have the following beneficial effects: 1. This invention provides an in-situ measurement and error compensation method and system for ultra-precision machining of microstructures. By integrating a microscopic imaging module into an ultra-precision machine tool, in-situ measurement and on-machine reprocessing compensation of microstructures are completed under the same clamping reference, eliminating secondary clamping errors caused by off-machine measurement. Without significantly increasing hardware complexity, it combines the advantages of high precision, high robustness, and easy engineering implementation, achieving nanometer-level in-situ measurement and closed-loop error compensation of microstructure geometric accuracy, improving error compensation accuracy, improving the efficiency and dimensional consistency of ultra-precision machining, while reducing workpiece disassembly and transfer time, improving processing efficiency and reducing energy consumption. It effectively solves the problems of secondary clamping errors in off-machine measurement, limited resolution of microscopic images in in-situ measurement, and insufficient measurement accuracy in existing ultra-precision machining technologies.
[0019] 2. This invention constructs a continuous-scale super-resolution reconstruction network based on a local implicit image function framework and using a residual dense network as the encoder backbone. It supports continuous-scale microscopic image reconstruction at arbitrary magnification, overcomes the resolution bottleneck caused by the optical diffraction limit and camera sampling interval, and can effectively recover microstructure boundary details in microscopic images with weak texture, blurred edges, and low signal-to-noise ratio, thus improving boundary measurability. At the same time, through neighborhood feature expansion and local integration weighted fusion strategies, it suppresses block artifacts in the reconstructed image and ensures the accuracy of boundary reconstruction.
[0020] 3. This invention proposes a method for constructing a training dataset for super-resolution reconstruction networks adapted to microscopic scales. It uses a laser confocal microscope to acquire high signal-to-noise ratio reference images and combines multi-condition data augmentation and self-supervised training mechanisms to solve the problem of scarce high-quality training samples for microscopic structures. This improves the generalization ability and robustness of the model, and eliminates the need for additional high-precision calibration samples, reducing the cost of acquiring training data. This provides a reliable data foundation for the generalization ability and high-precision reconstruction of super-resolution networks under microscopic conditions.
[0021] 4. This invention employs a measurement scheme that couples sub-pixel-level edge extraction with geometric fitting. Stable sub-pixel localization is achieved through three-point sampling and quadratic interpolation to find the extreme value. Geometric contour reconstruction is completed by combining least squares or robust fitting. Furthermore, interference from noise points and false edges is suppressed through multi-frame measurement mean and global geometric constraints. This strategy effectively avoids quantization errors caused by single-point / pixel counting, improving the robustness and repeatability of the measurement.
[0022] 5. The measurement and compensation system of this invention adopts a modular process design, with decoupling of each link and universal interfaces, which facilitates integration and deployment on different types of ultra-precision machine tools and microscopic imaging configurations. This invention improves measurement accuracy through algorithm optimization, making the average measurement deviation reach the nanometer level, and does not require the replacement of high-end microscopic imaging hardware. Without significantly increasing hardware investment, it enables ordinary microscopic vision systems to achieve measurement capabilities close to those of high-end optical metrology equipment such as laser confocal and white light interferometry, meeting the online measurement and on-machine compensation needs of industrial production sites.
[0023] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0024] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0025] Figure 1 This is a flowchart of the in-situ measurement and error compensation method for ultra-precision microstructure machining in Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the machine tool integrated optical microscopic imaging module used in Embodiment 1 of the present invention; Figure 3 This is a schematic diagram of pixel size calibration in Embodiment 1 of the present invention; Figure 4 This is a schematic diagram of microstructure image super-resolution reconstruction in Embodiment 1 of the present invention; Figure 5This is an example image of the training dataset for super-resolution reconstruction of microstructure images from ultra-precision micro-machining at the microscale in Embodiment 1 of the present invention; Figure 6 This is a schematic diagram of the workflow of the super-resolution reconstruction network based on the local implicit image function framework in Embodiment 1 of the present invention; wherein, (a) is an image preprocessing flowchart, (b) is a super-resolution reconstruction flowchart based on the local implicit image function framework, and (c) is a schematic diagram of the residual dense network backbone network structure used for super-resolution feature extraction. Figure 7 The following are example images of the subpixel edge detection results and geometric fitting results of the microstructure image in Embodiment 1 of the present invention; wherein, (a) is the subpixel edge detection result and (b) is the geometric fitting result; Figure 8 This is a visualization example of the results of geometric fitting and size extraction of microstructure images in Embodiment 1 of the present invention; Figure 9 This is a schematic diagram of the measurement results and error statistics of the straight groove width in Example 1 of Embodiment 1 of the present invention; wherein, (a) is the measurement result and (b) is the error statistics result; Figure 10 This is a schematic diagram of the measurement results and error statistics of the arc groove width in Example 2 of Embodiment 1 of the present invention; wherein, (a) is the measurement result and (b) is the error statistics result.
[0026] Among them, 1. machine tool spindle; 2. microstructured workpiece; 3. machine tool linear motion axis; 4. fine-tuning displacement stage; 5. telecentric magnifying objective lens; 6. industrial camera; 7. coaxial lighting source. Detailed Implementation
[0027] It should be noted that the following detailed descriptions are exemplary and are intended only to describe specific embodiments and to provide further explanation of the invention, and are not intended to limit the scope of exemplary embodiments of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0028] Example 1 To address the issues of secondary clamping errors in off-machine measurement, limited resolution of microscopic images in in-situ measurement, and insufficient measurement accuracy in existing ultra-precision machining technologies, this invention provides an in-situ measurement and error compensation method for ultra-precision machining of microstructures. This method integrates an optical microscopic imaging module on an ultra-precision machine tool to acquire low-resolution microscopic images of the machined surface in situ. Then, a super-resolution reconstruction network model pre-trained and parameter-frozen based on a microscale ultra-precision machining microstructure dataset is used to enhance the resolution of the acquired low-resolution microscopic images, resulting in a high-resolution reconstructed image. For this, a sub-pixel localization method using three-point sampling and quadratic interpolation along the gradient normal direction is employed to extract stable boundaries. Least squares geometric fitting is then used to complete the conversion from the pixel domain to the physical scale and output key geometric dimensions. Finally, error compensation is achieved through re-machining under the same clamping condition, thus realizing an integrated measurement-compensation closed loop. The measurement process of this embodiment is as follows: Figure 1 As shown, the process includes in-situ microscopic imaging and data acquisition, pixel calibration, image super-resolution reconstruction, edge detection and sub-pixel fitting, and on-machine reprocessing to compensate for errors. The specific steps are as follows: Step S1: Using the optical microscopic imaging module integrated on the ultra-precision machine tool, low-resolution microscopic images of the processed microstructure surface are acquired in situ while the workpiece is clamped. Step S2: Perform pixel size calibration on the optical microscopy imaging module and determine the pixel-length conversion factor; Step S3: Input the low-resolution microscopic image into the super-resolution reconstruction network based on the local implicit image function framework for super-resolution reconstruction, and generate a high-resolution reconstructed image at any set magnification. Step S4: Perform pixel-level edge detection and sub-pixel fitting on the high-resolution reconstructed image, and calculate the actual measured dimensions of the key geometry of the microstructure by combining the pixel-length conversion factor. Step S5: Calculate the compensation amount based on the deviation between the design target size and the actual measured size of the microstructure. Under the same clamping datum, convert the compensation amount into the tool path correction amount and perform on-machine remachining to complete the geometric error closed-loop compensation.
[0029] The following content provides a more detailed introduction to the in-situ measurement and error compensation method for ultra-precision microstructure machining proposed in this embodiment.
[0030] In step S1, an optical microscopic imaging module is rigidly mounted on an ultra-precision machine tool, such as... Figure 2As shown, the optical microscopy imaging module includes a telecentric magnifying objective lens 5, a coaxial illumination source 7, and an industrial camera 6 arranged sequentially. The optical axis of the telecentric magnifying objective lens 5 is aligned with the surface normal of the microstructure workpiece 2 placed on the machine tool spindle 1 to reduce imaging distortion and dimensional conversion errors caused by tilting. The optical microscopy imaging module is rigidly mounted on the Z-axis slide of the ultra-precision machining machine tool, that is, the optical microscopy imaging module is rigidly mounted on the fine-tuning displacement stage 4 of the linear motion axis 3 of the machine tool. In this way, the imaging module is used to acquire low-resolution microscopic images of ultra-precision machined microstructures.
[0031] In this embodiment, an optical microscopic imaging module (or imaging coefficient, imaging device, etc.) is rigidly installed on the Z-axis slide of a three-axis ultra-precision machine tool. The telecentric magnifying objective lens has a magnification of 10×, the coaxial illumination source is a coaxial LED light source, the imaging device is a monochrome CMOS industrial camera, and the optical axis of the objective lens is aligned with the normal of the workpiece surface.
[0032] Based on this, a three-axis ultra-precision machine tool was used to machine the microstructure. The workpiece material was oxygen-free copper TU2. In the pre-machining stage, a diamond tool with a large tip radius was used to finish the end face of the workpiece to a mirror finish. Subsequently, a circular arc-shaped natural single-crystal diamond tool was used to machine the microstructure, with a tip radius of 0.1 mm, a rake angle of 0°, and a clearance angle of 10°. The microstructure included intersecting straight microgrooves and circular arc microgrooves, with depths set to 3, 4, and 5 μm, respectively, and a cutting speed of 50 mm / min.
[0033] After the microstructure is fabricated, without changing the workpiece clamping state, the machine tool in-situ optical microscopy imaging module is used to measure and acquire low-resolution microscopic images of the area to be measured. These images serve as input data for subsequent super-resolution reconstruction and measurement processes.
[0034] Step S2 performs pixel calibration, which involves using a standard resolution test board to calibrate and standardize the pixel size of the optical microscopy imaging module. For example... Figure 3 As shown, a standard resolution test board microscopic image is acquired using an optical microscopy imaging module, and the number of pixels representing the test board features in the microscopic image is determined. D pix Then, based on the number of pixels of the test board features... D pix Its actual physical length L real The ratio of the two values is used as the pixel-to-length conversion factor. λ This conversion factor is used to convert pixel distances in image coordinates into actual physical dimensions.
[0035] As a further implementation, to ensure the consistency of the measurement benchmark, the imaging module (or imaging coefficient, imaging device) is calibrated for pixel size before the aforementioned geometric dimension measurement. The USAF-1951 resolution test board is selected as the calibration component. The pixel span of known geometric features in the test board is extracted and mapped to their corresponding actual physical length to obtain the pixel-to-length conversion coefficient. λ This embodiment yields... λ =0.248866 μm / pixel, used to subsequently convert pixel distance into actual physical size.
[0036] Step S3 performs image super-resolution reconstruction, such as Figure 4 As shown, the acquired low-resolution microscopic images are input into a super-resolution reconstruction network oriented towards the microscopic scale for image enhancement processing, according to the magnification ratio. r The corresponding high-resolution reconstructed image is generated. The super-resolution reconstruction network is implemented using a continuous-scale super-resolution reconstruction algorithm based on the Local Implicit Image Function (LIIF) framework. The Residual Dense Network (RDN) is used as the backbone feature extraction network. By mapping discrete pixel representations to continuous spatial functions and combining neighborhood feature expansion and local integration strategies, the reconstruction of microscopic images at arbitrary magnification is achieved, thereby improving the measurability of microstructure boundaries and the accuracy of geometric measurement.
[0037] Specifically, the super-resolution reconstruction network based on local implicit image functions is built using an encoder-implicit decoder architecture, such as... Figure 6 As shown in (c), the encoder uses a residual dense network (RDN) as the backbone feature extraction network for the input low-resolution microscopic image. I LR Perform deep feature extraction to generate a two-dimensional feature map. MRDN aims to fully utilize the hierarchical features of images. It consists of three parts: a Shallow Feature Extraction Network (SFENet), stacked residual dense blocks (RDBs), and a Global Feature Fusion (GFF) module. SFENet-1 and SFENet-2 both use two convolutional layers for shallow feature extraction. The output feature map of SFENet-1 serves as the input to subsequent deep feature extraction networks and also directly participates in the final global residual fusion to preserve basic structural information. Subsequently, multiple RDBs act as residual dense blocks to extract deep image features, achieving stronger feature reuse and improving the efficiency of information flow within the network through dense connections. Finally, the GFF module globally aggregates the deep features at each level to fuse global information, outputting a high-quality feature representation for continuous coordinate queries in the implicit decoder, thereby improving the ability to express details under conditions of weak texture and blurred edges. The above feature extraction process can be represented as: ; in, I LR The input is a low-resolution image. For encoder networks, M This is the output two-dimensional feature map.
[0038] like Figure 6 As shown in (b), the implicit decoder employs a multilayer perceptron structure, using continuous spatial coordinates. x Local feature vectors in the corresponding two-dimensional feature map z As input, the predicted coordinates x pixel values s For the output, a mapping relationship is established from discrete pixels to continuous image functions, and its expression is: ; in, x For continuous spatial coordinates, z For local feature vectors, s To predict pixel values, For implicit decoder networks, θ These are network parameters.
[0039] like Figure 6 As shown in (a), the reconstruction of images at arbitrary resolution using a super-resolution reconstruction network is as follows: [The following is a description of the process:] For the acquired low-resolution microscopic image... I LRPreprocessing is performed by randomly cropping and downsampling to obtain the low-resolution microscopic image region to be reconstructed. This region is then input into a super-resolution reconstruction network, where an encoder extracts a two-dimensional feature map. Finally, the two-dimensional feature map and any continuous query coordinates of the image to be reconstructed are used. x q The input is fed into an implicit decoder, which, based on a pre-established mapping, outputs the pixel prediction result at the query coordinate location, resulting in the reconstructed high-resolution image. Specifically, for any query coordinate... x q The corresponding pixel prediction can be expressed as: ; in, z The feature vector in the feature map that is closest to the query coordinates. v Given its coordinates in the image domain, since the input coordinates are continuous variables, it is possible to generate images of any resolution.
[0040] As a further implementation, to enhance local structural information and improve boundary detail reconstruction, neighborhood feature expansion is performed on the feature map, concatenating feature vectors within the neighborhood of the target location to form expanded features. Its expression is: ; Here, Concat represents the vector concatenation operation. Extended features allow the decoder to utilize richer contextual information during prediction, thereby improving the reconstruction accuracy at microstructure boundaries.
[0041] Meanwhile, to avoid block artifacts caused by relying solely on a single nearest feature, this embodiment employs a local integration and weighted fusion strategy. Multiple sub-regions adjacent to the query coordinate point are decoded separately, and weighted fusion is performed according to area or distance weights to obtain a smooth and consistent pixel prediction result. The expression is as follows: ; Where the denominator is the normalization coefficient, z t , v t The first t The local implicit feature vectors and coordinates corresponding to each sub-region are set in this embodiment, which sets four sub-regions; S t To query coordinates x q Area or distance weighting coefficients related to relative location This is the normalization factor.
[0042] Furthermore, the aforementioned super-resolution reconstruction network employs a model pre-trained and parameter-frozen based on a training dataset of microscale ultra-precision fabricated microstructures to adapt to the microscopic imaging characteristics of microstructures and enhance the ability to represent boundary details. The training process for this super-resolution reconstruction network is a pre-completed offline training process, including: First, high-resolution microstructure images are acquired using laser confocal microscopy as real sample data. Optical slicing is achieved through point scanning and pinhole-based confocal detection, which can effectively suppress defocus stray light and reduce the effective point spread function, thereby obtaining microstructure images with high signal-to-noise ratio.
[0043] Secondly, different tool parameters, machining parameters, and light intensity variations are introduced during the dataset construction process to improve the model's generalization ability and robustness. By performing random scale cropping and downsampling on the high-resolution original images, low-resolution input images and corresponding high-resolution supervised images are generated to construct a self-supervised training dataset. This enables a self-supervised training mechanism that does not require additional high-precision calibration samples, thereby reducing the cost of acquiring training data and improving the model's generalization ability.
[0044] In this embodiment, during the offline training process of the super-resolution reconstruction network model, such as Figure 5 As shown, a training dataset was constructed using high-resolution reference images acquired by a laser confocal microscope. A total of 1,000 images were acquired, with a resolution of 1,000×1,000 and an equivalent pixel size of 139.84 nm. The data covered different tool parameters, machining parameters, and changes in illumination intensity to enhance the generalization ability and robustness of the model.
[0045] Next, based on a self-supervised training dataset containing high- and low-resolution image pairs, an end-to-end optimization approach is adopted, using pixel pairs sampled from the original high-resolution images as supervision, and utilizing... L The network parameters are updated by backpropagation using the loss and the Adam optimizer (or other optimizers). Peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM) are used to evaluate model performance. Training is iterated until the set convergence conditions are met, such as minimizing the loss (core decision) and PSNR and SSIM reaching preset image reconstruction requirements (auxiliary verification). At this point, training iterations terminate, model parameters are frozen, and the model is deployed. L 1. Loss is represented as: ; In the above formula, y i For the first i The true label value of each sample For the first i The model prediction value for each sample.
[0046] Specifically, a self-supervised multi-scale sampling strategy is employed during training. High-resolution samples are randomly cropped and downsampled to generate low-resolution and high-resolution training pairs. The low-resolution images are input into the encoder, where a residual dense backbone network extracts deep two-dimensional feature representations. Next, features from a 3×3 region surrounding the target location are stitched together using a neighborhood feature expansion method to enhance local contextual information representation. Then, the implicit decoder employs a multilayer perceptron structure, using continuous spatial coordinates and corresponding local features as input to predict the pixel value at that location. Simultaneously, it combines local ensemble and distance or area-weighted fusion strategies to suppress block artifacts and ensure the spatial continuity of the reconstruction results. This network structure supports continuous-scale reconstruction at arbitrary magnification and effectively improves detail recovery capabilities under conditions of weak texture and blurred edges. Based on the predicted pixel values and the actual pixel values of the high-resolution image, the system... L 1. Iteratively train the network model using the loss function until the loss value is minimized and the model performance reaches its optimal level, thus completing the training of the network model.
[0047] Finally, after training, all network parameters are frozen and stored, resulting in a trained super-resolution reconstruction network. This network model is then deployed in a machine tool measurement system. During the in-situ measurement phase, only the network's forward inference is executed, achieving real-time resolution enhancement of the microscopic image. The magnification factor *r* is set as an arbitrary real number, determined based on the target measurement resolution. The equivalent pixel size of the reconstructed high-resolution image is the ratio of the pixel-length conversion factor *λ* to the magnification factor *r*, thereby increasing edge sampling density and reducing pixel quantization error. In this embodiment, a low-resolution input image is reconstructed at a magnification factor of 4 to obtain a high-resolution image. The equivalent pixel size of the reconstructed image is 62.217 nm, thus reducing pixel quantization error and improving the stability of subsequent sub-pixel edge localization.
[0048] Step S4 performs edge detection and sub-pixel fitting. For example... Figure 7 As shown, the Canny operator is used to perform pixel-level edge detection on the high-resolution reconstructed image. A pixel-level edge point set is formed by double-threshold hysteresis connection. For each pixel-level edge point, the gradient magnitude is sampled at three adjacent points along the gradient normal direction. M 1, M 0, M +1 The sub-pixel offset is obtained by fitting a quadratic function to the gradient magnitudes (i.e., one-dimensional profiles) corresponding to the three points and finding the extreme values. s Then adjust the subpixel offset s This is applied to the coordinates of the original pixel edge points, thereby obtaining sub-pixel level edge point coordinates. x i,y i ), can be represented as: ; in, a , b , c These are the coefficients of the quadratic fitting function. s Indicates sub-pixel offset, three samples in s Data is collected at values of -1, 0, and 1, and the extreme values are solved to obtain the true edge location. s , θ It is the direction angle of the gradient normal direction.
[0049] Then, the obtained sub-pixel edge points are categorized according to boundaries, and the parameters of geometric models such as lines and arcs are solved using least squares or robust fitting methods. That is, the geometric contours are reconstructed by least squares line fitting or least squares circle fitting according to the boundary type, and the pixel domain size is obtained from the fitting parameters. D sr Then, the actual measured size is obtained through pixel-to-length conversion and magnification conversion, i.e., according to... L mea = D sr · λ / r Converted to actual physical dimensions, the key geometric dimensions of the microstructure, such as the width, spacing, and radius of curvature of the microgroove, are output.
[0050] like Figure 8 As shown, in this embodiment, for straight microgrooves, the left and right boundaries are fitted with linear least squares, and the shortest distance between the two fitted lines is used as the groove width; for arc-shaped microgrooves, the boundaries are fitted with circular least squares, and the groove width or arc radius is calculated based on the geometric relationship of the fitted arc. Preferably, after performing super-resolution reconstruction, edge detection, and sub-pixel fitting on multiple consecutively acquired microscopic images, the mean of the measurement results of multiple frames is calculated as the final measurement value of the key geometric dimensions of the microstructure, thereby improving the confidence level.
[0051] Finally, in step S5, based on the above measurement results, the compensation amount is calculated according to the deviation between the design target size and the actual measured size of the microstructure. Under the condition of not disassembling the workpiece (i.e., the same clamping datum), the compensation amount is converted into a tool path correction amount, which is a radial or axial correction amount. The in-machine remapping compensation amount is determined and the machine tool is driven to perform the corresponding path correction or local shaping. After the in-machine remapping is completed, the in-situ measurement process is executed again to verify the error compensation effect. If the size after compensation still does not meet the design accuracy requirements, the compensation machining process is iteratively executed until the design accuracy is met, thereby completing the geometric error closed-loop compensation.
[0052] The superiority of the method proposed in this embodiment will be illustrated and verified through the following specific examples.
[0053] Example 1: On a three-axis ultra-precision machine tool, a linear microgroove structure was machined on the surface of an oxygen-free copper workpiece using a diamond tool. One hundred frames of microscopic images of the microgroove were continuously acquired using an in-situ microscopic imaging device on the machine tool. The acquired low-resolution microscopic images were input into a super-resolution reconstruction network model for microscale microstructure images for 4× reconstruction, resulting in a high-resolution reconstructed image of 2048×2048, with an equivalent pixel size of 62.2165 nm. Edge extraction and sub-pixel localization were performed on the reconstructed image, and least-squares line fitting was performed on the sub-pixel point sets of both boundaries. The shortest distance between the two fitted lines was taken as the microgroove width.
[0054] Using the microgroove width of 55.868 μm measured by laser confocal microscopy as a reference, the microgroove width measured by the above method is 55.87125 μm. Statistical analysis of 100 frames yields an average error of 3.25 nm, a maximum error of 18.97464 nm, and a measurement uncertainty of 0.756 nm. Specific results are as follows... Figure 9 As shown, the deviation from the target groove width of 60 μm is 4.12875 μm.
[0055] Example 2: A circular arc-shaped microgroove structure was machined on the surface of an oxygen-free copper workpiece using a diamond tool, and 100 frames of microscopic images of the arc groove were continuously acquired using an in-situ microscopic imaging device. The low-resolution images were then input into a super-resolution reconstruction network model for 4× reconstruction, resulting in a high-resolution reconstructed image of 2048×2048, with an equivalent pixel size of 62.2165 nm. Subsequently, edge extraction and sub-pixel localization were performed, and least-squares circle or arc fitting was applied to the sub-pixel point set of the arc groove boundary to determine the boundary parameters, and the width of the arc groove was calculated accordingly.
[0056] Using the groove width of 53.839 μm measured by laser confocal microscopy as a reference, the groove width measured by the above method is 53.84497 μm. Statistical analysis of 100 frames yields an average error of 5.97 nm, a maximum error of 21.16694 nm, and a measurement uncertainty of 0.826 nm. Specific results are as follows: Figure 10 As shown, the deviation from the target groove width of 60 μm is 6.15503 μm.
[0057] The above examples demonstrate that the measurement accuracy of the method proposed in this embodiment reaches the nanometer level, which can meet the geometric evaluation requirements of ultra-precision machining. Furthermore, through closed-loop compensation, machining errors can be effectively eliminated, the dimensional consistency of microstructure machining can be improved, machining accuracy can be increased, and the workpiece disassembly and transfer time can be reduced, thereby improving machining efficiency and reducing energy consumption.
[0058] Example 2 This embodiment provides an in-situ measurement and error compensation system for ultra-precision machining of microstructures, including: The low-resolution image acquisition module is used to acquire low-resolution microscopic images of the processed microstructure surface in situ while the workpiece is clamped, by utilizing the optical microscopic imaging module integrated on the ultra-precision machine tool. The pixel size calibration module is used to calibrate the pixel size of the optical microscopy imaging module and determine the pixel-length conversion factor. The high-resolution image reconstruction module is used to input low-resolution microscopic images into a super-resolution reconstruction network based on a local implicit image function framework for super-resolution reconstruction, and generate high-resolution reconstructed images at any set magnification. The microstructure geometry determination module is used to perform pixel-level edge detection and sub-pixel fitting on high-resolution reconstructed images, and calculates the actual measured dimensions of key microstructure geometry by combining pixel-length conversion coefficients. The ultra-precision machining error compensation control module is used to calculate the compensation amount based on the deviation between the design target size and the actual measured size of the microstructure. Under the same clamping reference, the compensation amount is converted into the tool path correction amount and implemented in-machine remachining to complete the geometric error closed-loop compensation.
[0059] Example 3 This embodiment provides an electronic device, including: a memory for storing executable instructions; and a processor for executing the executable instructions stored in the memory to implement the method provided in this embodiment.
[0060] Example 4 This embodiment also provides a computer-readable storage medium storing executable instructions, which, when executed by a processor, will cause the processor to execute the method described above in this embodiment.
[0061] The steps involved in Embodiments 2 to 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.
[0062] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.
[0063] The above description is only a preferred embodiment of the present invention. Although the specific implementation of the present invention has been described in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that, based on the technical solution of the present invention, various modifications or variations that can be made by those skilled in the art without creative effort are still within the scope of protection of the present invention.
Claims
1. A method for in-situ measurement and error compensation in ultra-precision machining of microstructures, characterized in that, include: By utilizing the optical microscopic imaging module integrated on an ultra-precision machine tool, low-resolution microscopic images of the processed microstructure surface can be acquired in situ while the workpiece is clamped. The pixel size of the optical microscopy imaging module is calibrated to determine the pixel-to-length conversion factor; Low-resolution microscopic images are input into a super-resolution reconstruction network based on a local implicit image function framework for super-resolution reconstruction, generating high-resolution reconstructed images at any set magnification. Pixel-level edge detection and sub-pixel fitting are performed on high-resolution reconstructed images, and the actual measured dimensions of key geometries of microstructures are calculated by combining pixel-length conversion coefficients. The compensation amount is calculated based on the deviation between the design target size and the actual measured size of the microstructure. Under the same clamping datum, the compensation amount is converted into a tool path correction amount and then implemented for on-machine remachining to complete the closed-loop compensation of geometric error.
2. The in-situ measurement and error compensation method for ultra-precision microstructure machining as described in claim 1, characterized in that, The optical microscopy imaging module includes a telecentric magnifying objective, a coaxial illumination source, and an industrial camera arranged in sequence. The optical axis of the telecentric magnifying objective is aligned with the normal of the surface of the microstructured workpiece, and the optical microscopy imaging module is rigidly mounted on the Z-axis slide of an ultra-precision machine tool. The pixel size of the optical microscopy imaging module was calibrated using a standard resolution test board, as follows: Using an optical microscopy imaging module, a microscopic image of a standard resolution test board is acquired, and the number of pixels representing the test board features in the microscopic image is determined. The ratio of the number of pixels in the test board features to its actual physical length is used as the pixel-to-length conversion factor.
3. The in-situ measurement and error compensation method for ultra-precision microstructure machining as described in claim 1, characterized in that, The super-resolution reconstruction network based on the local implicit image function framework is built on an encoder-implicit decoder architecture, wherein: The encoder uses a residual dense network (RDN) as the backbone feature extraction network for the input low-resolution microscopic images. I LR Perform deep feature extraction to generate a two-dimensional feature map. M , The implicit decoder employs a multilayer perceptron structure, using continuous spatial coordinates. x Local feature vectors in the corresponding two-dimensional feature map z As input, the predicted coordinates x pixel values s For the output, establish a mapping relationship between discrete pixels and continuous image functions; Reconstructing images of arbitrary resolution using a super-resolution reconstruction network involves: reconstructing the acquired low-resolution microscopic image... I LR Input the super-resolution reconstruction network, extract two-dimensional feature maps through the encoder, and then combine the two-dimensional feature maps with arbitrary continuous query coordinates of the image to be reconstructed. The input is fed into the implicit decoder, which, based on the pre-established mapping relationship, outputs the pixel prediction result at the query coordinate position, thus obtaining the reconstructed high-resolution image.
4. The in-situ measurement and error compensation method for ultra-precision microstructure machining as described in claim 3, characterized in that, During the reconstruction process, the super-resolution reconstruction network performs neighborhood feature expansion on the feature map, concatenating feature vectors within the neighborhood of the target prediction location to form expanded features. A local integration and weighted fusion strategy is adopted to decode the four sub-regions adjacent to the query coordinate point respectively, and the decoding results are weighted and fused according to the area or distance weight to obtain a smooth pixel prediction result.
5. The in-situ measurement and error compensation method for ultra-precision microstructure machining as described in claim 1, characterized in that, The super-resolution reconstruction network is a network model that has been pre-trained offline and has its parameters frozen. Its offline training process includes: High-resolution raw images of microstructures were obtained using laser confocal microscopy as real sample data. Different tool parameters, machining parameters and light intensity variations are introduced into the sample data. Random scale cropping and downsampling are performed on the high-resolution original image to generate a low-resolution input image and the corresponding high-resolution supervised image, thus constructing a self-supervised training dataset. Using a self-supervised training dataset containing high- and low-resolution image pairs, a pre-built super-resolution reconstruction network is trained using an end-to-end optimization approach. The loss function is used as the loss function, Adam is used as the optimizer, and the model performance is evaluated by peak signal-to-noise ratio and structural similarity index, and iterative training is carried out. After training, all network parameters are frozen and stored to obtain a trained super-resolution reconstruction network. In the in-situ measurement stage, only the forward inference of the network is performed to complete the real-time resolution enhancement of the microscopic image.
6. The in-situ measurement and error compensation method for ultra-precision microstructure machining as described in claim 1, characterized in that, Pixel-level edge detection and sub-pixel fitting are performed on high-resolution reconstructed images, including: The Canny operator is used to perform pixel-level edge detection on high-resolution reconstructed images, and pixel-level edge point sets are formed by double threshold hysteresis connection. For each pixel-level edge point, the gradient magnitude is collected at three adjacent sampling points along the gradient normal direction. The gradient magnitudes at the three points are then fitted with a quadratic function, and the extreme values are solved to obtain the sub-pixel offset. s ; subpixel offset s Applying the coordinates of the original pixel edge points yields sub-pixel level edge point coordinates; Based on all the acquired sub-pixel level edge points, the geometric contours of straight lines or arcs are reconstructed using least-squares line fitting or least-squares circle fitting according to the boundary type, and the corresponding pixel domain size is calculated. ; according to Converted to actual physical dimensions, the actual physical dimensions of the key geometry of the microstructure are output; among which... λ This is the pixel-to-length conversion factor. r For super-resolution reconstruction of magnification, the key geometry of the microstructure includes the width, spacing, and radius of the arc of the microgroove.
7. The in-situ measurement and error compensation method for ultra-precision microstructure machining as described in claim 1, characterized in that, The tool path correction amount is a radial or axial correction amount. The machine tool adopts a small depth of cut to perform in-machine remapping. After the in-machine remapping is completed, the in-situ measurement process is executed again to verify the error compensation effect. If the compensated dimension still does not meet the design accuracy requirements, the compensation machining process is iteratively executed until the design accuracy is met.
8. An in-situ measurement and error compensation system for ultra-precision machining of microstructures, characterized in that, include: The low-resolution image acquisition module is used to acquire low-resolution microscopic images of the processed microstructure surface in situ while the workpiece is clamped, by utilizing the optical microscopic imaging module integrated on the ultra-precision machine tool. The pixel size calibration module is used to calibrate the pixel size of the optical microscopy imaging module and determine the pixel-length conversion factor. The high-resolution image reconstruction module is used to input low-resolution microscopic images into a super-resolution reconstruction network based on a local implicit image function framework for super-resolution reconstruction, and generate high-resolution reconstructed images at any set magnification. The microstructure geometry determination module is used to perform pixel-level edge detection and sub-pixel fitting on high-resolution reconstructed images, and calculates the actual measured dimensions of key microstructure geometry by combining pixel-length conversion coefficients. The ultra-precision machining error compensation control module is used to calculate the compensation amount based on the deviation between the design target size and the actual measured size of the microstructure. Under the same clamping reference, the compensation amount is converted into the tool path correction amount and implemented in-machine remachining to complete the geometric error closed-loop compensation.
9. An electronic device, characterized in that, include: Memory, used to store executable instructions; The processor, when executing executable instructions stored in the memory, implements the in-situ measurement and error compensation method for ultra-precision microstructure machining as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, It stores executable instructions for causing a processor to execute the executable instructions to implement the in-situ measurement and error compensation method for microstructure ultra-precision machining as described in any one of claims 1-7.