Calibration method for high-precision grating coding contact type displacement measurement sensor

By meshing and clustering the workpiece surface and combining it with a deep learning model to predict contact force and error, the problem of insufficient accuracy of traditional sensors in complex surface measurements is solved, and high-precision workpiece height measurement is achieved.

CN120668034AActive Publication Date: 2025-09-19GUANGDONG MOTE INTELLIGENT CONTROL CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202511047776.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-29
Publication Date
2025-09-19
Estimated Expiration
2045-07-29

AI Technical Summary

Technical Problem

When measuring the surface of complex workpieces, traditional grating-encoded contact displacement sensors cannot meet the needs of high-precision detection due to measurement value deviations caused by differences in surface features in different areas.

Method used

By meshing the workpiece surface, identifying and clustering the surface roughness and curvature of the mesh area, and combining the material characteristics of the workpiece and contact head, a deep learning model is used to predict the contact force and measurement error, and perform error analysis and compensation.

Benefits of technology

It significantly improves the measurement accuracy and stability of workpieces with complex surfaces, eliminates measurement errors caused by differences in surface features, and meets high-precision detection needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120668034A_ABST
    Figure CN120668034A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of metering, in particular to a calibration method for a high-precision grating coding contact type displacement measurement sensor. Dividing the surface of the workpiece according to a preset grid size, identifying and acquiring a plurality of surface roughness of a plurality of grid areas according to the workpiece surface image, and acquiring a plurality of surface radians of the plurality of grid areas; clustering the plurality of grid regions to obtain a plurality of same-kind grid region sets; performing measurement contact force prediction, performing height measurement error analysis according to a plurality of predicted contact forces, and outputting a plurality of predicted height measurement errors; height measurement is carried out on a plurality of grid areas on the surface of a workpiece through a high-precision grating coding contact type displacement measurement sensor, mapping compensation is carried out on height measurement values of the areas, and a workpiece height measurement result is output. And the height measurement precision and stability of the high-precision grating coding contact type displacement measurement sensor on a workpiece with a complex surface are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of metrology technology, and in particular to a calibration method for a high-precision grating encoding contact displacement measurement sensor. Background Art

[0002] In industrial inspection, grating displacement sensors are often used to detect the height of workpiece surfaces. For workpieces with complex structures and irregular surfaces, such as special-shaped parts and mold cavities, there are significant regional differences in surface roughness and curvature. When the sensor contact head contacts the workpiece surface, the surface features in different areas will cause the contact force to change, which in turn causes deviations in the measured value and affects the accuracy of the final inspection results. Traditional calibration methods do not take into account the feature differences in different areas of the workpiece surface. Using a unified calibration method, it is difficult to accurately predict and compensate for errors, resulting in low measurement accuracy and an inability to meet the needs of high-precision inspection. Summary of the Invention

[0003] The present invention aims to solve the problem that the measurement results of the grating-encoded contact displacement measurement sensor in the prior art have low accuracy and cannot meet the requirements of high-precision detection. A high-precision grating-encoded contact displacement measurement sensor calibration method is provided to solve the problem.

[0004] The technical solution of the present invention to solve the above technical problems is as follows: In a first aspect, the present invention provides a high-precision grating-encoded contact displacement measurement sensor calibration method, comprising: dividing the workpiece surface according to a preset grid size, obtaining a plurality of surface roughnesses of a plurality of grid areas based on workpiece surface image recognition, and obtaining a plurality of surface radians of the plurality of grid areas; clustering the plurality of grid areas based on the plurality of surface roughnesses and the plurality of surface radians to obtain a plurality of similar grid area sets, wherein each similar grid area set has a surface roughness identifier and a surface radian identifier; based on the workpiece material properties, the contact head material properties and the contact head surface characteristics, predicting the measurement contact force according to the surface roughness identifier and the surface radian identifier, performing height measurement error analysis based on the plurality of predicted contact forces, and outputting a plurality of predicted height measurement errors; performing height measurement of a plurality of grid areas on the workpiece surface by using a high-precision grating-encoded contact displacement measurement sensor, mapping and compensating the height measurement values ​​of a plurality of areas according to the plurality of predicted height measurement errors based on the plurality of similar grid area sets, and outputting a workpiece height measurement result.

[0005] Optionally, the workpiece surface is divided according to a preset grid size, and a plurality of surface roughness values ​​of the plurality of grid areas are obtained based on workpiece surface image recognition, including: The workpiece surface is divided according to a preset grid size to generate a number of grid areas; the workpiece surface is imaged using a CCD image sensor, and the image is segmented according to the several grid areas to obtain a number of regional surface images; after grayscale processing is performed on the several regional surface images, the coefficient of variation of the pixel grayscale values ​​in the region is calculated respectively, and the several coefficients of variation are normalized to obtain a number of surface roughness values, wherein the coefficient of variation is the ratio of the standard deviation of the pixel grayscale values ​​in the region to the mean.

[0006] Optionally, based on the several surface roughnesses and the several surface radians, the several grid areas are clustered to obtain multiple similar grid area sets, including: obtaining an expected error ratio for workpiece height measurement, and setting the ratio of the expected error ratio to the standard error ratio of similar workpieces as a step adjustment coefficient; adjusting the preset clustering step according to the step adjustment coefficient to obtain an adaptive clustering step, wherein the adaptive clustering step includes an adaptive surface roughness step and an adaptive surface radian step; based on the several surface roughnesses and the several surface radians, the several grid areas are clustered according to the adaptive surface roughness step and the adaptive surface radian step to obtain multiple similar grid area sets, wherein the surface roughness deviation of the grid areas in the similar grid area set is less than or equal to the adaptive surface roughness step and the surface radian deviation is less than or equal to the adaptive surface radian step.

[0007] The surface roughness and surface curvature of the plurality of grid areas in the plurality of similar grid area sets are averaged, the surface roughness average of the similar grid area sets is set as the surface roughness identifier, and the surface curvature average is set as the surface curvature identifier.

[0008] Optionally, based on the workpiece material properties, the contact head material properties and the contact head surface features, the measured contact force prediction is performed according to the surface roughness identifier and the surface curvature identifier, including: using the workpiece material properties, the contact head material properties and the contact head surface features as retrieval and comparison constraints, collecting a sample workpiece surface roughness set and a sample workpiece surface curvature set, and obtaining the historical contact force deviation ratio under different sample workpiece surface roughness and sample workpiece surface curvature, setting it as a sample contact force deviation coefficient, and obtaining a sample contact force deviation coefficient set; using the sample workpiece surface roughness set and the sample workpiece surface curvature set as input, using the sample contact force deviation coefficient set as supervision, training a deep learning model until convergence, and obtaining a contact force deviation analyzer; through the contact force deviation analyzer, obtaining multiple predicted contact force deviation coefficients according to the surface roughness identifier and the surface curvature identifier analysis, adjusting the preset contact force of the sensor, and outputting multiple predicted contact forces.

[0009] Optionally, a height measurement error analysis is performed based on multiple predicted contact forces, and multiple predicted height measurement errors are output, including: using the workpiece material properties, the contact head material properties and the contact head surface features as retrieval and comparison constraints, collecting a sample measurement contact force set, and obtaining historical height measurement errors under different sample measurement contact forces to obtain a sample measurement error set; using the sample measurement contact force set and the sample measurement error set to train a deep learning model until convergence, obtaining a measurement error predictor, performing height measurement error analysis on the multiple predicted contact forces, and outputting multiple predicted height measurement errors.

[0010] Optionally, based on the multiple similar grid area sets, several area height measurement values ​​are mapped and compensated according to the multiple predicted height measurement errors, and the workpiece height measurement result is output, including: based on the multiple similar grid area sets and the multiple predicted height measurement errors, a compensation mapping relationship between the predicted height measurement error and the grid area is established; according to the compensation mapping relationship, several area height measurement values ​​are mapped and compensated according to the multiple predicted height measurement errors, and several compensated area height measurement values ​​are output, and they are spliced ​​to obtain the workpiece height measurement result.

[0011] By implementing the present invention, it is possible to divide the workpiece surface according to a preset grid size, obtain a plurality of surface roughness values ​​of a plurality of grid areas based on workpiece surface image recognition, and obtain a plurality of surface radians of the plurality of grid areas. This decomposes the complex workpiece surface into a plurality of grid units that can be analyzed separately, accurately captures the surface features of different local areas, and realizes the automated and objective acquisition of surface roughness and radian through image recognition and quantitative calculation, thus avoiding the subjectivity of manual measurement and providing reliable basic data for subsequent calibration work. By implementing the present invention, it is possible to cluster the plurality of grid regions based on the plurality of surface roughnesses and the plurality of surface curvatures to obtain a plurality of similar grid region sets, wherein each similar grid region set has a surface roughness identifier and a surface curvature identifier, and grid regions with similar surface features are grouped together, thereby reducing the complexity of subsequent processing and improving calibration efficiency. The dynamically adjusted clustering step size can adapt to the accuracy requirements of actual measurement, making the clustering results more in line with the actual situation. The identifiers of the similar region sets provide a clear basis for unified analysis and processing of such regions. By implementing the present invention, it is possible to predict the measured contact force based on the workpiece material properties, the contact head material properties and the contact head surface characteristics, according to the surface roughness mark and the surface curvature mark, and perform height measurement error analysis based on multiple predicted contact forces, and output multiple predicted height measurement errors. This fully considers the influence of key factors such as material on the contact force, and uses historical data for prediction through a deep learning model to accurately obtain the contact force and the corresponding height measurement error in different areas, thereby achieving a forward-looking analysis of the error and providing an accurate quantitative reference for subsequent compensation. By implementing the present invention, it is possible to measure the height of several grid areas on the surface of a workpiece using a high-precision grating-encoded contact displacement measurement sensor, map and compensate the height measurement values ​​of several areas based on the multiple predicted height measurement errors based on the multiple sets of similar grid areas, output the workpiece height measurement results, perform targeted error compensation for different categories of grid areas, effectively correct the measurement deviation caused by differences in surface features, significantly improve the overall measurement accuracy, and the spliced ​​results can fully and accurately reflect the height of the workpiece surface, meeting the measurement requirements of complex workpieces.

[0012] In summary, by implementing the present invention, it is possible to effectively eliminate the measurement error caused by contact force fluctuations due to differences in workpiece surface roughness and curvature, and greatly improve the height measurement accuracy and stability of high-precision grating-encoded contact displacement measurement sensors for complex surface workpieces. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 The present invention provides a flow chart of a method for calibrating a high-precision grating-encoded contact-type displacement measurement sensor. DETAILED DESCRIPTION

[0014] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.

[0015] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of the technical features indicated. Therefore, features specified as "first" or "second" may explicitly or implicitly include one or more of the specified features. In the description of the present invention, "plurality" means two or more, unless otherwise specifically defined.

[0016] In the description of the present invention, the term "for example" is used to mean "used as an example, illustration or explanation". Any embodiment of the present invention described as "for example" is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any person skilled in the art to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes are not elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed herein.

[0017] Example 1, as Figure 1 As shown, an embodiment of the present invention provides a high-precision grating encoding contact displacement measurement sensor calibration method, comprising: S100: Dividing the workpiece surface into a preset grid size, obtaining a plurality of surface roughnesses of a plurality of grid areas according to workpiece surface image recognition, and obtaining a plurality of surface radians of the plurality of grid areas; S200: clustering the plurality of mesh regions based on the plurality of surface roughnesses and the plurality of surface radians to obtain a plurality of similar mesh region sets, wherein each similar mesh region set has a surface roughness identifier and a surface radian identifier; S300: Based on the material properties of the workpiece, the material properties of the contact head, and the surface characteristics of the contact head, a measurement contact force is predicted according to the surface roughness identifier and the surface curvature identifier, and a height measurement error analysis is performed based on the multiple predicted contact forces to output multiple predicted height measurement errors; S400: Measure the height of several grid areas on the surface of the workpiece using a high-precision grating-encoded contact displacement measurement sensor, map and compensate the height measurement values ​​of several areas based on the multiple predicted height measurement errors based on the multiple similar grid area sets, and output the workpiece height measurement result.

[0018] In step S100 of the embodiment of the present application, the workpiece surface is divided according to a preset grid size, and a plurality of surface roughness values ​​of a plurality of grid areas are obtained based on workpiece surface image recognition, including: Divide the workpiece surface according to the preset grid size to generate several grid areas; Capturing an image of the workpiece surface using a CCD image sensor, and segmenting the image according to the plurality of grid regions to obtain a plurality of regional surface images; After grayscale processing is performed on the surface images of the several regions, the coefficients of variation of the grayscale values ​​of the pixels in the regions are calculated respectively, and the coefficients of variation are normalized to obtain several surface roughness values, wherein the coefficient of variation is the ratio of the standard deviation of the grayscale values ​​of the pixels in the region to the mean.

[0019] The purpose of step S100 in this embodiment of the present application is to convert the complex workpiece surface into local units that can be quantified and analyzed, and to accurately obtain the surface roughness data of each unit, providing a basis for subsequent calibration and compensation based on surface features. Specifically, it is necessary to decompose the workpiece surface into multiple small grid areas through meshing to avoid ignoring local feature differences due to overall analysis; then, using image recognition technology, an automated and objective measurement of surface roughness is achieved, ensuring the accuracy and consistency of roughness data in different areas, thereby supporting the subsequent accurate analysis of contact force and measurement error.

[0020] During the implementation process, first of all, it is necessary to divide the workpiece surface evenly or adaptively according to the preset grid size, that is, the specific length and width parameters, and divide the entire workpiece surface into several independent grid areas, so that the complex surface is converted into multiple local units that can be analyzed separately. Suppose a metal workpiece with an irregular curved surface is detected, the workpiece surface size is 100mm×100mm, and there are multiple areas with different roughness and curvature on the workpiece surface. The preset grid size can be 5mm×5mm, and the entire workpiece surface is divided into 400 grid areas. Each area becomes an independent analysis unit. For example, the upper left corner area is marked as A1, the adjacent area on the right is marked as A2, and so on, and all 20*20 areas are marked with serial numbers.

[0021] Next, the CCD image sensor is used to capture the entire workpiece surface image, obtaining a complete workpiece surface image with a resolution of 1024×1024 pixels. The entire image is then segmented according to the previously defined grid area boundaries, for example, into 400 regional surface images. This allows for the extraction of regional surface images corresponding to each grid area, ensuring that the image features of each local area can be extracted separately. For example, assuming that a distance of 1 mm corresponds to 5.12 pixels, the surface image of area A1 corresponds to the 51×51 pixel sub-image in the upper left corner of the image, and the surface image of area A2 corresponds to the adjacent 51×51 pixel sub-image to its right.

[0022] Furthermore, it is necessary to calculate the surface roughness of several surface regions. Optionally, grayscale processing can be performed on the segmented surface images of each region, converting color or complex images into images containing only grayscale information to simplify subsequent calculations. For example, the color sub-image of region A1 can be converted into a grayscale image with pixel grayscale values ​​ranging from 0 (black) to 255 (white). Concave and convex areas of the workpiece surface will exhibit different grayscales, such as high grayscale values ​​for convex areas with strong reflectivity, and low grayscale values ​​for concave areas. This serves as a basis for determining the surface roughness of the workpiece.

[0023] Next, for the grayscale processed regional surface image, the coefficient of variation of the grayscale values ​​of all pixels within that region is calculated. This coefficient effectively reflects the irregularity of the surface texture and indirectly characterizes the surface roughness. Specifically, it can be calculated as the ratio of the standard deviation to the mean of the pixel grayscale values ​​within the region. Assuming the mean grayscale value of the pixels in region A1 is 120 and the standard deviation is 30, the coefficient of variation is 30 / 120 = 0.25. For region A2, the mean grayscale value of the pixels is 150 and the standard deviation is 22.5, resulting in a corresponding coefficient of variation of 22.5 / 150 = 0.15.

[0024] Finally, the coefficient of variation of the surface images of all regions is normalized to eliminate the numerical differences in the images of different regions due to lighting, shooting conditions, etc., and obtain several standardized surface roughness data to make the roughness of different regions comparable. If the coefficient of variation of all regions ranges from 0.1 to 0.5, a normalization formula such as y=(x-0.1) / (0.5-0.1) is used, where x is the coefficient of variation of a certain region and y is the normalized roughness value. The above formula converts the coefficient of variation of 0.25 in region A1 into a roughness value of 0.375, and the coefficient of variation of 0.15 in region A2 into a roughness value of 0.125, to obtain a standardized surface roughness value, which can be directly used for subsequent cluster analysis. For example, the roughness of region A1 of 0.375 can be defined as medium roughness, and the roughness of region A2 of 0.125 can be defined as relatively smooth.

[0025] Furthermore, in step S100 of the embodiment of the present application, it is also necessary to obtain a plurality of surface radians of the plurality of grid areas.

[0026] Obtaining several surface radians of several grid areas also provides key surface feature parameters for subsequent grid area clustering, contact force prediction, and height measurement error analysis.

[0027] In the specific implementation process, after collecting the workpiece surface image through the CCD image sensor and dividing the regional surface image of each grid area, the Canny operator and other algorithms can be used to perform edge detection on the regional surface image after grayscale processing to identify the contour lines of the regional surface.

[0028] The extracted area contours are fitted using a curve fitting algorithm such as the least squares method to obtain the curve equation of the area's surface, such as a circular arc or quadratic curve. The radius of curvature is then calculated based on the obtained curve equation. The surface curvature of the grid area is then determined using the corresponding relationship between the radius of curvature and the curvature of the surface. For example, for circular arc contours, the surface curvature = 1 / curvature radius.

[0029] For example, after edge detection and curve fitting, the surface contour of a grid area is determined to be an arc with a radius of 100 mm. The surface curvature of this area is 1 / 100 mm-1, that is, 0.01 mm-1. After standardization, it can be used to compare and cluster with the surface curvatures of other areas.

[0030] The specific method for standardizing the surface curvature is to collect the original surface curvature values ​​calculated from all grid areas, denoted as R1, R2, ..., Rn, where n is the total number of grid areas, and then count the minimum value Rmin and the maximum value Rmax of these original surface curvature values ​​to clarify the range of the surface curvature data distribution.

[0031] Next, the original surface radian value of each grid area is converted using a linear normalization formula. The specific formula is surface radian Ri′ = (Ri - Rmin) / Rmax - Rmin). Here, Ri is the original surface radian value of the i-th grid area among the n grid areas, and Ri′ is the normalized surface radian value of the i-th grid area. The value range is mapped to the interval [0, 1].

[0032] Through the above normalization steps, the surface radians of all grid areas are expressed as relative values, where 0 represents the minimum radian and 1 represents the maximum radian, eliminating the numerical differences caused by different units and area sizes in the original measurements. For example, if the original radian of area A is 0.01mm-1 and the original radian of area B is 0.05mm-1, if Rmin=0.005mm-1 and Rmax=0.055mm-1 for all areas, then after normalization: RA′=(0.01−0.005) / (0.055−0.005)=0.1, In step S200 of the embodiment of the present application, the plurality of grid regions are clustered based on the plurality of surface roughnesses and the plurality of surface curvatures to obtain a plurality of similar grid region sets, including: Obtaining an expected error ratio of workpiece height measurement, and setting a ratio of the expected error ratio to a standard error ratio of similar workpieces as a step adjustment coefficient; Adjusting the preset clustering step length according to the step length adjustment coefficient to obtain an adaptive clustering step length, wherein the adaptive clustering step length includes an adaptive surface roughness step length and an adaptive surface radian step length; Based on the plurality of surface roughnesses and the plurality of surface radians, the plurality of grid areas are clustered according to the adapted surface roughness step and the adapted surface radian step to obtain a plurality of similar grid area sets, wherein the surface roughness deviation of the grid areas in the similar grid area sets is less than or equal to the adapted surface roughness step and the surface radian deviation is less than or equal to the adapted surface radian step.

[0033] In the embodiment of the present application, the core purpose of this step is to classify grid areas with similar surface features, namely surface roughness and surface curvature, to form a set of similar grid areas, which lays the foundation for the subsequent unified analysis of contact force and height measurement errors and the realization of targeted compensation. By dynamically adjusting the clustering step size, the clustering results are adapted to the accuracy requirements of the actual measurement. That is, when there is a difference between the expected error ratio and the standard error ratio, the step size adjustment ensures that the division of similar areas is neither too coarse, resulting in excessive feature differences and affecting compensation accuracy, nor too fine, which increases the amount of calculation and reduces efficiency, and ultimately achieves a precise match between the clustering results and the error control target.

[0034] First, you need to set the expected error ratio required to calculate the step size adjustment coefficient. This is the ratio of the maximum acceptable error in actual testing to the measured value, for example, requiring an error of no more than 0.5%. Next, you need to obtain the standard error ratio for similar workpieces. This can be the typical error ratio for this type of workpiece in the industry or historical data, such as 1%. The ratio of this expected error ratio to the standard error ratio for similar workpieces is set as the step size adjustment coefficient, for example, 0.5% / 1% = 0.5. This step size adjustment coefficient reflects the difference between the actual accuracy requirement and the standard situation, providing a quantitative basis for step size adjustment.

[0035] Then, the preset clustering step size needs to be adjusted according to the step size adjustment coefficient to obtain an adaptive clustering step size. The preset clustering step size includes a preset surface roughness step size and a preset surface curvature step size. The preset surface roughness step size, such as 0.2, means the maximum difference in surface roughness between two grid areas when they are classified as the same type before dynamic adjustment is performed; the preset surface curvature step size, such as 0.1, means the maximum difference in surface curvature between two grid areas when they are classified as the same type before dynamic adjustment is performed.

[0036] Next, the step size adjustment coefficient is multiplied by the preset surface roughness step size and the preset surface curvature step size to obtain the adaptive clustering step size. For example, when the step size adjustment coefficient is 0.5, the adaptive surface roughness step size = 0.2 × 0.5 = 0.1, and the adaptive surface curvature step size = 0.1 × 0.5 = 0.05. In this case, the adaptive step size is smaller than the preset step size, which means that the clustering is finer and can meet higher accuracy requirements.

[0037] Finally, the mesh regions need to be clustered according to the adapted surface roughness step size and the adapted surface radian step size. Specifically, all mesh regions are clustered based on their normalized surface roughness and surface radian: for any two regions, if the difference in surface roughness is ≤ the adapted surface roughness step size, and the difference in radian is ≤ the adapted radian step size, they are classified into the same category. This process is repeated until all mesh regions are classified, ultimately obtaining multiple sets of mesh regions of the same category.

[0038] For example, if the surface roughness step size is 0.1 and the surface curvature step size is 0.05, and the surface roughness difference between region A and region B is 0.05 (≤0.1) and 0.03 (≤0.05), then they are classified into the same set. However, if the surface roughness difference between region C and region A is 0.2 (>0.1), they belong to different sets. Ultimately, multiple sets of similar mesh regions are obtained.

[0039] In step S200 of the embodiment of the present application, it is also necessary to calculate the average of the surface roughness and surface curvature of the multiple grid areas in the multiple similar grid areas, set the average surface roughness of the similar grid areas as the surface roughness identifier, and set the average surface curvature as the surface curvature identifier.

[0040] The core purpose of step S200 in the embodiment of the present application is to generate a unified feature identifier for each set of similar grid areas, namely, a surface roughness identifier and a surface curvature identifier, so as to simplify the feature representation of similar areas and provide standardized input parameters for subsequent contact force prediction and error analysis.

[0041] Then, by calculating the mean roughness and curvature of similar areas as identifiers, it can not only represent the overall surface characteristics of such areas, but also reduce the data dimension. There is no need to process the individual characteristics of each grid, thereby improving the efficiency and accuracy of subsequent model operations, and ensuring that similar areas use consistent analysis standards in the subsequent calibration process.

[0042] For example, a homogeneous mesh region set contains three mesh regions with surface roughnesses of 0.3, 0.35, and 0.4, and surface curvatures of 0.2, 0.22, and 0.25, respectively. You need to calculate the mean surface roughness for the set, such as (0.3 + 0.35 + 0.4) / 3 = 0.35, and set this as the surface roughness identifier for the homogeneous mesh region set. You also need to calculate the mean surface curvature, such as (0.2 + 0.22 + 0.25) / 3 ≈ 0.223, and set this as the surface curvature identifier.

[0043] In step S300 of the embodiment of the present application, based on the material properties of the workpiece, the material properties of the contact head, and the surface features of the contact head, the measured contact force prediction is performed according to the surface roughness identifier and the surface curvature identifier, including: Using the workpiece material properties, contact head material properties, and contact head surface features as retrieval and comparison constraints, a sample workpiece surface roughness set and a sample workpiece surface curvature set are collected. The historical contact force deviation ratios under different sample workpiece surface roughness and sample workpiece surface curvature are obtained and set as the sample contact force deviation coefficients to obtain the sample contact force deviation coefficient set. Using the sample workpiece surface roughness set and the sample workpiece surface radian set as input, using the sample contact force deviation coefficient set as supervision, training the deep learning model until convergence, and obtaining a contact force deviation analyzer; The contact force deviation analyzer obtains a plurality of predicted contact force deviation coefficients according to the surface roughness mark and the surface curvature mark, adjusts the preset contact force of the sensor, and outputs a plurality of predicted contact forces.

[0044] In the present embodiment, the purpose of the above steps is to accurately predict the contact force of a set of similar mesh regions during measurement, providing a basis for subsequent analysis of height measurement errors. By combining key factors such as the material of the workpiece and the contact head, as well as the surface characteristics of the contact head, a deep learning model is used to establish a correlation between surface characteristics and contact force deviations. This allows for targeted prediction of contact force, thereby resolving the issue of contact force fluctuations caused by differences in surface characteristics across different regions and laying the foundation for subsequent error compensation.

[0045] Specifically, constraints can be used, such as workpiece material properties (e.g., metal and plastic), contact head material properties (e.g., ceramic and alloy), and contact head surface characteristics (e.g., smoothness and hardness). Matching sample workpiece data can be filtered from historical measurement data, and the surface roughness and surface curvature sets of these sample workpieces can be collected. For example, a set of constraints could be "aluminum alloy workpiece + ceramic contact head + contact head surface roughness Ra0.1μm" or "stainless steel workpiece + carbide contact head + contact head surface roughness Ra0.2μm."

[0046] At the same time, the historical contact force deviation ratio of the corresponding sample workpiece under different surface roughness and surface curvature is recorded. That is, the deviation ratio between the actual contact force and the preset contact force is set as the sample contact force deviation coefficient, forming a sample contact force deviation coefficient set. Specifically, it is necessary to record the preset contact force of the sensor, such as fixed values ​​such as 5N and 10N. At the same time, the actual contact force when the contact head contacts the sample workpiece surface in real time is collected by the force sensor. The deviation ratio between the actual contact force and the preset contact force is calculated as (actual contact force - preset contact force) / preset contact force × 100%), which is used as the contact force deviation coefficient for the sample.

[0047] For example, when the workpiece is made of aluminum alloy and the contact head is made of ceramic with a smooth surface, the contact force deviation coefficients corresponding to different surface roughnesses such as 0.2 and 0.3, and surface curvatures such as 0.1 and 0.2 under this combination are collected, such as 5%, 3%, etc.

[0048] The sample surface roughness and surface curvature under each set of constraints are then associated and stored with the corresponding sample contact force deviation coefficient to form a structured historical database. For example, under the constraint of "aluminum alloy + ceramic contact head + contact head surface roughness Ra0.1μm", if the surface roughness of a certain sample area is 0.3 and the surface curvature is 0.2, the corresponding contact force deviation coefficient is +3%. In other words, the actual contact force is 3% greater than the preset value. In this case, (0.3, 0.2, 3%) is stored as a data record in the dataset corresponding to this constraint.

[0049] Furthermore, it is necessary to build a contact force deviation analyzer to obtain multiple predicted contact force deviation coefficients based on the surface roughness identifier and the surface curvature identifier under specific constraints.

[0050] Considering the task type of the contact force deviation analyzer, a multilayer perceptron can be chosen for its construction. The contact force deviation analyzer consists of three parts: an input layer, a hidden layer, and an output layer. The input layer consists of two neurons, corresponding to the input surface roughness and surface curvature indicators; the hidden layer consists of three layers, with 64, 32, and 16 neurons in each layer, respectively, all using the ReLU activation function; and the output layer consists of one neuron, which outputs the predicted contact force deviation coefficient.

[0051] For the contact force deviation analyzer, the Adam optimizer was used, with a learning rate of 0.001. The mean squared error (MSE) loss function was used to measure the difference between the predicted contact force deviation coefficient and the sampled contact force deviation coefficient. The batch size was 32, meaning 32 sets of sample data were input for each training run.

[0052] As for the training data, the sample data is obtained using the method in the above steps. 1000 sets of sample data are collected under each set of constraints. The maximum number of training rounds is initially set to 200 rounds. When the validation set loss for 10 consecutive rounds is less than 0.0001, the model is determined to have converged, the training is stopped, and the contact force deviation analyzer is obtained.

[0053] The surface roughness and curvature identifiers for the set of similar mesh regions obtained in the previous step are then input into the contact force deviation analyzer, which outputs the corresponding predicted contact force deviation coefficient, such as 4%. The predicted contact force is then calculated by multiplying the sensor's preset contact force by (1 + predicted deviation coefficient). For example, if the initial preset contact force is 5N, the adjusted predicted contact force is 5N × (1 + 4%) = 5.2N, which is the predicted contact force for this type of region during measurement.

[0054] In step S300 of the embodiment of the present application, a height measurement error analysis is performed based on the multiple predicted contact forces, and multiple predicted height measurement errors are output, including: Using the workpiece material properties, contact head material properties and contact head surface features as retrieval and comparison constraints, a sample measurement contact force set is collected, and the historical height measurement errors under different sample measurement contact forces are obtained to obtain a sample measurement error set. The sample measured contact force set and the sample measurement error set are used to train a deep learning model until convergence, a measurement error predictor is obtained, a height measurement error analysis is performed on the multiple predicted contact forces, and multiple predicted height measurement errors are output.

[0055] In the embodiments of this application, the purpose of the above steps is to establish a correlation between the predicted contact force and height measurement error, thereby accurately obtaining the height measurement error corresponding to a set of similar grid regions, providing a basis for subsequent mapping and compensation of the measured values. By combining constraints such as the materials of the workpiece and the contact head, as well as the surface characteristics of the contact head, a deep learning model is used to predict the contact force to measurement error, resolving the difficulty in quantifying height measurement error due to contact force fluctuations and ensuring the targeted and accurate error compensation.

[0056] First, sample data must be collected. Using the workpiece material properties, contact head material properties, and contact head surface features as search and comparison constraints, matching samples are selected from historical measurement data. The measured contact force data for these samples is collected to form a sample measured contact force set. The historical height measurement errors of the corresponding samples at different contact forces—that is, the deviation between the actual measured value and the true value—are also recorded to form a sample measurement error set. For example, when the workpiece is made of aluminum alloy and the contact head is made of ceramic with a smooth surface, the height measurement errors corresponding to different contact forces for this combination are collected, such as 0.01mm and 0.012mm for 5N and 5.2N, respectively.

[0057] Next, the deep learning model is trained using the sample contact force set as input data and the sample measurement error set as a supervisory signal. The model parameters are iteratively optimized until the difference between the model output measurement error and the actual sample error stabilizes within a preset range. This results in model convergence and a measurement error predictor that maps the relationship between contact force and height measurement error.

[0058] The construction and training methods for this measurement error predictor are similar to those for the contact force deviation analyzer described above. The only requirement is to replace the training data with a sample measurement error set and fine-tune the parameters. For example, the input layer is adjusted to a single neuron corresponding to the input predicted contact force. Therefore, the specific training process of the measurement error predictor is not detailed here.

[0059] Finally, the multiple predicted contact forces obtained in the previous steps, such as 5N, 5.2N, etc., are input into the trained measurement error predictor. The model outputs the height measurement error corresponding to each predicted contact force, that is, multiple predicted height measurement errors are obtained, such as 0.01mm, 0.012mm, etc., which provide a quantitative basis for the subsequent compensation of the height measurement value of the grid area.

[0060] In step S400 of the embodiment of the present application, based on the multiple sets of similar grid regions, a plurality of regional height measurement values ​​are mapped and compensated according to the multiple predicted height measurement errors, and a workpiece height measurement result is output, including: Establishing a compensation mapping relationship between the predicted height measurement error and the grid area based on the multiple sets of similar grid areas and the multiple predicted height measurement errors; According to the compensation mapping relationship, mapping compensation is performed on several area height measurement values ​​according to the multiple predicted height measurement errors, and several compensated area height measurement values ​​are output, which are spliced ​​to obtain a workpiece height measurement result.

[0061] The purpose of step S400 in this embodiment of the present application is to establish a compensation mapping relationship and use the predicted height measurement error to perform targeted corrections on the original height measurement values ​​of each grid area, ultimately obtaining accurate workpiece height measurement results. Furthermore, by associating similar grid area sets with corresponding predicted height measurement errors, differentiated compensation is achieved for regions with different surface features, eliminating measurement deviations caused by contact force fluctuations and ensuring high overall measurement accuracy.

[0062] During implementation, the compensation mapping relationship needs to be established. Specifically, based on the multiple similar grid area sets obtained in step S200 and the multiple predicted height measurement errors obtained in step S300, all grid areas in each similar grid area set are associated with the predicted height measurement errors corresponding to the set, forming a one-to-one compensation mapping relationship. For example, if a similar grid area set includes grids A1, A2, and A3, and the corresponding predicted height measurement error is 0.02mm, then a mapping relationship of "A1 corresponds to 0.02mm, A2 corresponds to 0.02mm, and A3 corresponds to 0.02mm" is established to clarify the compensation error value to be used for each grid area.

[0063] Then, according to the compensation mapping relationship, the height measurement values ​​of several areas are mapped and compensated according to the multiple predicted height measurement errors. Specifically, a high-precision grating encoding contact displacement measurement sensor can be used to measure the height of several grid areas on the surface of the workpiece to obtain the original height measurement value of each area. According to the compensation mapping relationship established above, the original height measurement value of each grid area is compensated and corrected. If the predicted height measurement error is positive, the error is subtracted from the original height measurement value; if the predicted height measurement error is negative, the error is added to the original height measurement value to obtain the compensated height measurement value of each area. For example, the original height measurement value of grid A1 is 5.00mm, and the corresponding predicted height error is 0.02mm. The compensated height measurement value is 5.00-0.02=4.98mm.

[0064] Finally, the compensated height measurement values ​​of all grid areas are spliced ​​according to their actual positions on the workpiece surface to restore the overall height distribution of the workpiece surface. Finally, the complete workpiece height measurement results are output to achieve high-precision measurement of complex surface workpieces.

[0065] It should be noted that, in the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0066] Those skilled in the art will appreciate that embodiments of the present invention may provide methods, systems, or computer program products. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0067] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0068] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0069] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.

[0070] Although preferred embodiments of the present invention have been described, additional changes and modifications to these embodiments may occur to those skilled in the art once the basic inventive concepts become known.

[0071] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the present invention and its equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A high-precision grating-encoded contact displacement measurement sensor calibration method, characterized in that: Methods include: Dividing the workpiece surface into a preset grid size, obtaining a plurality of surface roughnesses of the plurality of grid areas according to workpiece surface image recognition, and obtaining a plurality of surface radians of the plurality of grid areas; Clustering the plurality of grid regions based on the plurality of surface roughnesses and the plurality of surface radians to obtain a plurality of similar grid region sets, wherein each similar grid region set has a surface roughness identifier and a surface radian identifier; Based on the material properties of the workpiece, the material properties of the contact head and the surface characteristics of the contact head, a measurement contact force is predicted according to the surface roughness mark and the surface curvature mark, and a height measurement error analysis is performed based on the multiple predicted contact forces to output multiple predicted height measurement errors; The height of several grid areas on the surface of the workpiece is measured by a high-precision grating-encoded contact displacement measurement sensor. Based on the multiple sets of similar grid areas, the height measurement values ​​of the multiple areas are mapped and compensated according to the multiple predicted height measurement errors, and the workpiece height measurement results are output.

2. A high-precision grating-encoded contact displacement measurement sensor calibration method according to claim 1, characterized in that: The workpiece surface is divided into several grid areas according to the preset grid size, and the surface roughness of several grid areas is obtained based on the workpiece surface image recognition, including: Divide the workpiece surface according to the preset grid size to generate several grid areas; Capturing an image of the workpiece surface using a CCD image sensor, segmenting the image according to the plurality of grid regions to obtain a plurality of regional surface images; After grayscale processing is performed on the surface images of the several regions, the coefficients of variation of the grayscale values ​​of the pixels in the regions are calculated respectively, and the coefficients of variation are normalized to obtain several surface roughness values, wherein the coefficient of variation is the ratio of the standard deviation of the grayscale values ​​of the pixels in the region to the mean.

3. The high-precision grating-encoded contact displacement measurement sensor calibration method according to claim 1, characterized in that: Based on the plurality of surface roughnesses and the plurality of surface curvatures, the plurality of grid regions are clustered to obtain a plurality of similar grid region sets, including: Obtaining an expected error ratio of workpiece height measurement, and setting a ratio of the expected error ratio to a standard error ratio of similar workpieces as a step adjustment coefficient; Adjusting the preset clustering step length according to the step length adjustment coefficient to obtain an adaptive clustering step length, wherein the adaptive clustering step length includes an adaptive surface roughness step length and an adaptive surface radian step length; Based on the plurality of surface roughnesses and the plurality of surface radians, the plurality of grid areas are clustered according to the adapted surface roughness step and the adapted surface radian step to obtain a plurality of similar grid area sets, wherein the surface roughness deviation of the grid areas in the similar grid area sets is less than or equal to the adapted surface roughness step and the surface radian deviation is less than or equal to the adapted surface radian step.

4. The high-precision grating-encoded contact displacement measurement sensor calibration method according to claim 3, characterized in that: The surface roughness and surface curvature of the plurality of grid areas in the plurality of similar grid area sets are averaged, the surface roughness average of the similar grid area sets is set as the surface roughness identifier, and the surface curvature average is set as the surface curvature identifier.

5. The high-precision grating-encoded contact displacement measurement sensor calibration method according to claim 1, characterized in that: Based on the material properties of the workpiece, the material properties of the contact head, and the surface characteristics of the contact head, the measured contact force is predicted according to the surface roughness identifier and the surface curvature identifier, including: Using the workpiece material properties, contact head material properties, and contact head surface features as retrieval and comparison constraints, a sample workpiece surface roughness set and a sample workpiece surface curvature set are collected. The historical contact force deviation ratios under different sample workpiece surface roughness and sample workpiece surface curvature are obtained and set as the sample contact force deviation coefficients to obtain the sample contact force deviation coefficient set. Using the sample workpiece surface roughness set and the sample workpiece surface radian set as input, using the sample contact force deviation coefficient set as supervision, training the deep learning model until convergence, and obtaining a contact force deviation analyzer; The contact force deviation analyzer obtains a plurality of predicted contact force deviation coefficients according to the surface roughness mark and the surface curvature mark, adjusts the preset contact force of the sensor, and outputs a plurality of predicted contact forces.

6. The high-precision grating-encoded contact displacement measurement sensor calibration method according to claim 1, characterized in that: Perform height measurement error analysis based on multiple predicted contact forces and output multiple predicted height measurement errors, including: Using the workpiece material properties, contact head material properties and contact head surface features as retrieval and comparison constraints, a sample measurement contact force set is collected, and the historical height measurement errors under different sample measurement contact forces are obtained to obtain a sample measurement error set. The sample measured contact force set and the sample measurement error set are used to train a deep learning model until convergence, a measurement error predictor is obtained, a height measurement error analysis is performed on the multiple predicted contact forces, and multiple predicted height measurement errors are output.

7. The high-precision grating-encoded contact displacement measurement sensor calibration method according to claim 1, characterized in that: Based on the multiple sets of similar grid regions, mapping and compensating the height measurement values ​​of the multiple regions according to the multiple predicted height measurement errors is performed, and a workpiece height measurement result is output, including: Establishing a compensation mapping relationship between the predicted height measurement error and the grid area based on the multiple sets of similar grid areas and the multiple predicted height measurement errors; According to the compensation mapping relationship, mapping compensation is performed on several area height measurement values ​​according to the multiple predicted height measurement errors, and several compensated area height measurement values ​​are output, which are spliced ​​to obtain a workpiece height measurement result.

Citation Information

Patent Citations

  • 3D rock structural surface roughness intelligent extraction system and method

    CN111709924A

  • Three-dimensional rough surface contact model construction method based on Fourier interpolation

    CN112699508A

  • Workpiece three-coordinate measurement automatic error dynamic compensation method and system

    CN119573634A

  • Measurement device and method for calibration measurement device

    JP2022179165A

  • Device and Method for measuring three-dimensional contact stiffness of spur gear based on rough surface

    US20180128710A1