Cylinder inner wall detection method and system based on standard jig

By combining a tilted installation line laser sensor with a standard fixture, the problems of difficulty in acquiring three-dimensional point cloud data of the inner wall of a cylinder and insufficient measurement accuracy were solved, achieving high-precision inner wall detection.

CN121576935APending Publication Date: 2026-02-27SUZHOU SAMSON PHOTOELECTRIC TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511957291.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

In existing technologies, it is difficult to effectively acquire three-dimensional point cloud data of the inner wall of cylindrical workpieces. Furthermore, traditional line laser scanning methods suffer from imaging blind spots and insufficient measurement accuracy. In particular, the conversion between the scanning coordinate system and the physical coordinate system of the laser sensor is cumbersome and easily affected by the environment.

Method used

Using a tilted-mounted laser sensor, combined with an XY-axis drive system and a rotation axis, eccentricity correction and laser tilt angle calculation are performed using the known inner diameter of a standard fixture. The deviation sequence is fitted using a least-squares algorithm to generate mapping coefficients and Z-coordinate correction parameters, thereby achieving accurate conversion and segmentation of point cloud data. Finally, circular fitting is performed to output the detection results.

Benefits of technology

This method achieves complete acquisition of the three-dimensional geometry of the inner wall of a cylinder, improves measurement accuracy, overcomes the imaging blind spots and environmental factors of traditional methods, and ensures the accuracy of coordinate transformation and the stability of measurement results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121576935A_ABST
    Figure CN121576935A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of industrial measurement, and discloses a cylinder inner wall detection method and system based on a standard jig. The method comprises the following steps: acquiring scanning point cloud data of a standard circular tube jig; a radial deviation sequence is calculated based on the known inner diameter, cosine function fitting is carried out, and an eccentric parameter is calculated to carry out XY-axis iterative correction; calculating a laser inclination angle based on the corrected jig point cloud; obtaining the mixed point cloud, and segmenting the mixed point cloud into a jig point cloud set and a workpiece point cloud set based on the radial distance; calculating a mapping coefficient and performing coordinate conversion on the workpiece point cloud; and performing circular ring fitting by using a least square algorithm to output an inner diameter detection result. The problem of an inner wall imaging blind area is solved by obliquely installing the line laser sensor, and relative measurement is achieved through the standard jig to eliminate system errors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial measurement technology, and more specifically, to a method and system for detecting the inner wall of a cylinder based on a standard fixture. Background Technology

[0002] In the industrial manufacturing sector, accurate measurement of the inner wall dimensions of cylindrical workpieces is crucial for product quality control. Inner diameter, roundness, and cylindricity are key parameters for evaluating the machining quality of the inner wall of a cylinder, and their measurement accuracy directly affects the product's assembly performance and service life.

[0003] In existing technologies, the detection of the inner wall of cylindrical workpieces mainly employs two methods: camera-based illumination measurement and line laser sensor scanning. Camera-based illumination measurement can only acquire dimensional information of the upper and lower edges of the workpiece, failing to fully reflect the actual geometry of the inner wall. Conventional line laser sensors use a linear scanning detection method perpendicular to the cylinder's axis. Because the laser plane is tangential to the inner wall of the cylinder, the laser beam cannot effectively illuminate the inner wall surface, resulting in an imaging blind zone.

[0004] The aforementioned shortcomings of existing technologies have led to the technical problem of difficulty in effectively acquiring three-dimensional point cloud data of the inner wall of a cylinder. In addition, there is a proportional relationship between the scanning coordinate system of the laser sensor and the actual physical coordinate system. Traditional methods require complex optical parameter calibration of the sensor. The calibration process is cumbersome, and the results are prone to drift due to the influence of ambient temperature and vibration, further exacerbating the problem of insufficient measurement accuracy. Summary of the Invention

[0005] This invention provides a method and system for detecting the inner wall of a cylinder based on a standard fixture, which solves the technical problems in related technologies such as the difficulty in effectively acquiring three-dimensional point cloud data of the inner wall of a cylinder and the insufficient accuracy of the conversion between scan coordinates and physical coordinates.

[0006] This invention discloses a method for detecting the inner wall of a cylinder based on a standard fixture, applicable to a detection device including an inclined line laser sensor, an XY axis drive system, and a rotary axis, comprising the following steps: Acquire scanned point cloud data of a standard circular tube fixture and generate a set of point cloud data of the fixture's inner wall containing rotation angle, radial distance, and axial coordinates; The radial deviation sequence is calculated based on the known inner diameter of a standard circular tube fixture. The least squares algorithm is used to fit the deviation sequence with a cosine function. The eccentricity and eccentricity direction angle are calculated based on the fitting coefficient. The XY axis adjustment is generated and the XY axis is driven to move. The process is iterated until the eccentricity is less than the preset threshold. The corrected jig point cloud data is obtained, and the laser tilt angle is calculated based on the linear relationship between the Z coordinate deviation of each point and the radial distance to generate Z coordinate correction parameters. Acquire mixed point cloud data of workpiece and fixture, set segmentation threshold range based on the known inner diameter of standard round tube fixture, and segment the point cloud into fixture point cloud set and workpiece point cloud set; Using the ratio of the average radius of the jig point cloud scan to the standard inner diameter as a mapping coefficient, the workpiece point cloud is corrected by applying the mapping coefficient and the laser tilt angle to generate the workpiece point cloud in the physical coordinate system. The least squares algorithm is used to perform circular fitting on the workpiece point cloud, and the workpiece inner diameter detection result is output. The calculation of the eccentricity parameter is based on the principle of periodic fluctuation of radial distance caused by eccentricity. The square root of the sum of squares of the fitting coefficients is the eccentricity, and the arctangent of the fitting coefficients is the eccentricity direction angle.

[0007] Furthermore, based on the known inner diameter of the standard circular tube fixture, the radial deviation sequence is calculated. The least squares algorithm is used to fit the deviation sequence with a cosine function. The eccentricity and eccentricity direction angle are then calculated based on the fitting coefficients, including: Based on the known inner diameter of the standard circular tube fixture, the difference between the scanning radial distance of each sampling point and the standard inner diameter is calculated to generate a radial deviation sequence. The radial deviation sequence is fitted with a cosine function using the least squares algorithm. The radial deviation is expressed as the product of the first fitting coefficient and the cosine value of the rotation angle, plus the product of the second fitting coefficient and the sine value of the rotation angle. The square root of the sum of the squares of the first and second fitting coefficients is used as the eccentricity. The arctangent of the ratio of the second fitting coefficient to the first fitting coefficient is used as the eccentricity direction angle; The X and Y axis adjustments are calculated based on the eccentricity and the eccentricity direction angle. The X-axis adjustment is the opposite of the product of the eccentricity and the cosine of the eccentricity direction angle, and the Y-axis adjustment is the opposite of the product of the eccentricity and the sine of the eccentricity direction angle.

[0008] Further, the corrected jig point cloud data is acquired, and the laser tilt angle is calculated based on the linear relationship between the Z-coordinate deviation of each point and the radial distance, including: Obtain the point cloud data of the standard circular tube fixture after XY axis correction, and convert the cylindrical coordinates to Cartesian coordinates; Calculate the radial distance of each point, calculate the average Z coordinate of the fixture point cloud, and calculate the difference between the Z coordinate of each point and the average Z coordinate as the Z-axis deviation; The linear least squares algorithm is used to fit the data pairs of radial distance and Z-axis deviation, and the fitting slope is calculated. The fitting slope is equal to the sum of the products of the Z-axis deviation and radial distance of all points divided by the sum of the squares of the radial distances of all points. The arctangent of the fitted slope is calculated as the laser tilt angle.

[0009] Furthermore, based on the known inner diameter of the standard circular tube fixture, a segmentation threshold range is set to segment the point cloud into a fixture point cloud set and a workpiece point cloud set, including: The segmentation threshold range is set based on the known inner diameter of the standard circular tube fixture and the preset radial distance tolerance. Points whose radial distance falls within the segmentation threshold range are marked as fixture point set, and the remaining points are marked as workpiece point set; A transition region is set near the boundary of the segmentation threshold interval. Points within the transition region are classified by K-nearest neighbor voting based on their spatial neighbors, and the voting result is used as the final category of the point.

[0010] Furthermore, based on the ratio of the average radius of the jig point cloud scan to the standard inner diameter as a mapping coefficient, the workpiece point cloud is corrected using the mapping coefficient and laser tilt angle, including: The arithmetic mean of the radial distances of all points in the jig point cloud is calculated as the average scan radius; The ratio of the known inner diameter of the standard circular tube fixture to the average scanning radius is calculated as the mapping coefficient; The actual radial distance is obtained by multiplying the scanned radial distance of each point in the workpiece point cloud by a mapping coefficient. The corrected Z-coordinate is obtained by subtracting the product of the radial distance of the point and the tangent of the laser tilt angle from the Z-coordinate of each point in the workpiece point cloud. Convert the corrected workpiece point cloud from cylindrical coordinates to Cartesian coordinates, and output the workpiece point cloud in the physical coordinate system.

[0011] Furthermore, the least squares algorithm is used to perform circular fitting on the workpiece point cloud, and the output workpiece inner diameter detection results include: The workpiece point cloud is subjected to least squares circular fitting for a two-dimensional projection. The center coordinates and average radius of the circle are then determined to minimize the sum of the squared radial deviations of all points from the fitted circle. Calculate the radial deviation of each point from the fitted circle; The output workpiece inner diameter is twice the average radius, and the output roundness error is the difference between the maximum and minimum radial deviation.

[0012] Furthermore, a residual-based iterative reweighted least squares algorithm is used for ring fitting, including: Initialize the weight of all points to 1; The weighted least squares algorithm is used to solve for the center coordinates and average radius of the circle. Calculate the radial residual from each point to the fitted circle; The weights are updated based on the residuals of each point, and the weights of points with larger residuals are reduced. Determine if the change in weights is less than a preset threshold. If not, return to solve again. If it is, output the final fitting result.

[0013] Furthermore, it also includes the step of calculating the cylindricity of the workpiece based on multi-section data: Obtain the complete 3D point cloud of the workpiece, determine the value range of the Z direction, divide the Z direction into multiple levels, and extract the cross-sectional point cloud corresponding to each level; For each cross-sectional point cloud, the center and radius of the cross-section are fitted using the least squares algorithm; Perform spatial straight-line fitting on the centers of all cross sections and calculate the equation of the cylinder axis. Using the fitted axis as a reference, calculate the radial distance from all points to the axis; The cylindricity value is generated as the difference between the maximum and minimum radial distances, and the cylindricity detection result of the workpiece is output.

[0014] Furthermore, the iterative execution continues until the eccentricity is less than a preset threshold, employing an adaptive step-size iterative correction strategy, including: The adaptive step size factor is calculated based on the ratio of the current eccentricity to the preset eccentricity tolerance threshold. When the eccentricity is greater than or equal to twice the threshold, the step size factor is 1. When the eccentricity is less than twice the threshold, the step size factor decreases proportionally as the eccentricity decreases. The adaptive step size factor is applied to the eccentricity compensation calculation to generate the XY axis adjustment amount; After driving the XY axis to move, the scanned point cloud data is reacquired and the new eccentricity is calculated; The relative rate of change of eccentricity between two adjacent iterations is calculated as the residual gradient; Determine whether the new eccentricity is less than or equal to a preset threshold and the residual gradient is less than a preset stability threshold simultaneously. If both are satisfied, output a correction completion flag; otherwise, continue iterating.

[0015] This invention discloses a cylindrical inner wall inspection system based on a standard fixture, comprising: An inclined line laser sensor is used to scan the inner wall of a cylinder to generate point cloud data; The XY axis drive system is used to adjust the position of the standard round tube fixture according to the eccentricity parameters; A rotary shaft and a rotary encoder are used to drive the workpiece and standard round tube fixture to rotate and output angle information; Vacuum adsorption device is used to fix the workpiece to be tested and the standard round tube fixture; The processing module is used to perform eccentricity correction, laser tilt angle calculation, point cloud segmentation, coordinate transformation, and circular fitting.

[0016] This invention solves the technical problems of traditional vertical line laser scanning having imaging blind spots and difficulty in effectively acquiring three-dimensional point cloud data of the inner wall of a cylinder by tilting the line laser sensor so that the laser beam can irradiate the inner wall surface of the cylinder at a non-tangential angle. It achieves the technical effect of being able to completely acquire three-dimensional geometric shape data of the inner wall of a cylinder.

[0017] This invention introduces a standard circular tube fixture with a known precise inner diameter as a measurement benchmark. By using the ratio of the average scanning radius of the fixture to the standard inner diameter to calculate the mapping coefficient, the complex optical parameter calibration is transformed into a simple proportional coefficient calculation. This solves the technical problem that traditional calibration methods are cumbersome and easily affected by environmental factors, resulting in drift. It achieves the technical effect of accurate conversion from scanning coordinates to physical coordinates.

[0018] This invention solves the technical problem of measurement error caused by fixture installation eccentricity by using a cosine curve fitting-based eccentricity parameter calculation method and a closed-loop iterative correction strategy, and achieves the technical effect of precise alignment between the fixture axis and the rotation axis.

[0019] This invention solves the technical problem of decreased measurement accuracy caused by laser tilt angle drift by using the point cloud data of the fixture that has been eccentrically corrected to invert the laser tilt angle in real time, and achieves the technical effect of effective compensation for Z-coordinate system deviation. Attached Figure Description

[0020] Figure 1 This is a flowchart of the cylindrical inner wall detection method based on a standard fixture according to Embodiment 1 of the present invention; Figure 2 This is a flowchart of the eccentricity adaptive iterative correction method according to Embodiment 2 of the present invention; Figure 3 It involves inspecting the product's external appearance drawing; Figure 4 It is a structural diagram of the jig; Figure 5 This is a magnified view of a part of the fixture; Figure 6 This is the image of the imaging result; Figure 7 It is a point cloud reconstruction diagram. Detailed Implementation

[0021] Implementation Method 1 In the industrial manufacturing sector, accurate measurement of the inner wall dimensions of cylindrical workpieces is crucial for product quality control. Currently, when measuring the inner wall of cylindrical workpieces using camera illumination, only the dimensional information of the upper and lower edges of the workpiece can be obtained. This method cannot fully reflect the actual geometry of the inner wall and fails to meet the comprehensive measurement requirements for key parameters such as inner diameter, roundness, and cylindricity.

[0022] Conventional line laser sensors use a linear scanning detection method perpendicular to the cylinder axis. Since the laser plane is tangential to the inner wall of the cylinder, the laser beam cannot effectively irradiate the inner wall surface. This results in an imaging blind zone when detecting the inner wall of cylindrical workpieces, which severely restricts the application of this method in the three-dimensional measurement of the inner wall of cylinders.

[0023] Furthermore, there is a proportional relationship between the scanning coordinate system of the laser sensor and the actual physical coordinate system. Affected by factors such as optical parameters and installation position, directly using the scanning values ​​for size calculation will introduce systematic errors. Traditional methods require complex optical parameter calibration of the sensor, which is cumbersome and the results are prone to drift due to factors such as ambient temperature and vibration.

[0024] According to an embodiment of this invention, a method for detecting the inner wall of a cylinder is provided. This method is applied to a detection device including an inclined line laser sensor, an XY axis drive system, a rotary shaft, a rotary encoder, and a vacuum adsorption device. The workpiece A to be detected is fitted into a standard circular tube fixture B and fixed by bottom vacuum adsorption, wherein the actual inner diameter of the standard circular tube fixture B is... The reference value is known. The line laser sensor is installed at an angle, and its scanning range simultaneously covers the side wall of workpiece A to be inspected and the inner wall of standard round tube fixture B.

[0025] Step 1: Obtain the scanned point cloud data of a standard circular tube fixture and generate a point cloud set of the fixture's inner wall. The rotating shaft drives workpiece A and standard circular tube fixture B to rotate synchronously for one revolution. The line laser sensor scans the inner wall of standard circular tube fixture B and simultaneously reads the angle information output by the rotary encoder to obtain the unfolded plane point cloud dataset of standard circular tube fixture B. ,in For the first The rotation angle corresponding to each sampling point This represents the radial distance scanned from the inner wall of standard round tube fixture B to the axis of rotation. For axial coordinates.

[0026] Step 2: Calculate the eccentricity parameters based on the jig point cloud data and generate the XY axis adjustment amount. Based on standard inner diameter Calculate the radial deviation sequence:

[0027] The bias sequence is fitted with a cosine function using the least squares algorithm:

[0028] in and The fitting coefficients are to be determined. The eccentricity is calculated based on the fitting coefficients. and eccentricity direction angle :

[0029]

[0030] Calculate the XY axis adjustment:

[0031]

[0032] Drive the XY axes to move according to the adjustment amount, repeating steps 1 and 2 until the eccentricity is reached. Less than the preset eccentricity tolerance threshold Output the point cloud data of the fixture after calibration.

[0033] It should be noted that the cosine function fitting of the above deviation sequence is based on the principle of periodic fluctuation of radial distance caused by eccentricity. When the axis of the standard circular tube fixture B is eccentric to the axis of rotation, the radial distance measured during rotation will exhibit a cosine law change with the eccentricity as the amplitude and the eccentricity direction angle as the phase. Therefore, the eccentricity parameter can be solved inversely through cosine fitting.

[0034] Step 3: Based on the corrected fixture point cloud laser tilt angle, generate Z-coordinate correction parameters. Obtain the point cloud data of the standard circular tube fixture B after XY axis correction, and convert the cylindrical coordinates to Cartesian coordinates:

[0035]

[0036] Calculate the radial distance of each point Calculate the average Z coordinate of the jig point cloud. Calculate the Z-axis deviation at each point. .

[0037] Using the linear least squares algorithm Fit the data pairs and calculate the fitting slope:

[0038] Calculate the laser tilt angle based on the slope:

[0039] Output laser tilt angle As a parameter for subsequent Z-coordinate correction.

[0040] It should be noted that the above calculation of the laser tilt angle uses a standard circular tube fixture B as a reference. Since the radial distances of all points on the inner wall of the fixture are approximately equal after eccentric correction, theoretically, the Z-coordinates of all points should also be consistent. In actual measurement, the systematic deviation of the Z-coordinate and the linear relationship with the radial distance reflect the degree of tilt of the laser scanning plane relative to the radial plane of the cylinder.

[0041] Step 4: Acquire the mixed point cloud data of the workpiece and the fixture, perform point cloud segmentation based on radial distance, and generate a workpiece point cloud set. A rotating shaft drives workpiece A and standard round tube fixture B to rotate one revolution. A line laser sensor simultaneously scans the inner walls of workpiece A and standard round tube fixture B to acquire a hybrid point cloud dataset. .

[0042] Based on the known inner diameter of standard circular tube fixture B Set the segmentation threshold range ,in This is a preset radial distance tolerance. Points whose radial distance falls within this interval are marked as jig point B. Mark the remaining points as the workpiece A point set. .

[0043] In this embodiment of the application, in order to improve the accuracy of point cloud segmentation when the radial distance is close, a transition region is set near the boundary of the segmentation threshold interval. Points in the transition region are classified by K-nearest neighbor voting based on the attribution of their spatial neighbors, and the voting result is used as the final attribution category of the point.

[0044] Step 5: Based on the jig point cloud cloud mapping coefficients, perform coordinate transformation on the workpiece point cloud to generate the workpiece point cloud in the physical coordinate system. Calculate the average scanning radius of fixture B:

[0045] Calculate the mapping coefficients:

[0046] in The standard inner diameter reference value for fixture B is... The average radial distance of the fixture in the scanning coordinate system, the mapping coefficient. A scaling factor that represents the ratio of scanned values ​​to actual physical dimensions.

[0047] Applying a mapping coefficient to the scanned radial distance of workpiece A, calculate the actual radial distance:

[0048] Apply laser tilt angle correction to the Z coordinate of workpiece A:

[0049] Convert the cylindrical coordinates of workpiece A to Cartesian coordinates:

[0050]

[0051] Output the point cloud data of workpiece A in the physical coordinate system. .

[0052] Step 6: Use the least squares algorithm to perform circular fitting on the workpiece point cloud and output the workpiece inner diameter detection result. Two-dimensional point cloud of workpiece A Perform least-squares circular fitting to solve for the coordinates of the circle's center. and average radius Minimize the objective function:

[0053] Calculate the radial deviation of each point from the fitted circle. Output the inner diameter value of workpiece A. The output roundness error is the difference between the maximum and minimum values ​​of the radial deviation.

[0054] In this embodiment, to improve the fitting accuracy of workpieces with surface defects, an iterative reweighted least squares algorithm based on residuals is used for circular fitting. All point weights are initialized to 1. After each iteration, the weights are updated based on the residuals of each point. Outliers with large residuals have their weights automatically reduced. This iteration is repeated until the weight change is less than a preset threshold, at which point the final fitting result is output.

[0055] In addition to step 6, the following steps are also included: Step 7: Calculate the cylindricity of the workpiece based on multi-section data and output the cylindricity inspection results. Obtain the complete 3D point cloud of workpiece A Determine the range of values ​​in the Z direction. Divide the Z direction into equal parts Each level has a specific number of levels; extract each level. Corresponding cross-sectional point cloud .

[0056] For each cross-sectional point cloud Fitting the center of the cross section using the least squares algorithm and cross-sectional radius For the center of all cross sections Perform spatial straight line fitting and calculate the equation of the cylinder axis.

[0057] Using the fitted axis as a reference, calculate the radial distance from all points to the axis, generate the cylindricity value as the difference between the maximum and minimum radial distances, and output the cylindricity detection result of workpiece A.

[0058] This embodiment overcomes the limitation of traditional vertical line laser scanning in effectively imaging the inner wall of a cylinder by tilting the line laser sensor, thus solving the technical problem of obtaining three-dimensional point clouds of the inner wall of a cylinder.

[0059] This embodiment introduces a standard circular tube fixture with a known precise inner diameter as a measurement reference. The mapping coefficient is calculated using the ratio of the fixture's average scanning radius to the standard inner diameter, transforming complex optical parameter calibration into a simple proportionality coefficient calculation. This overcomes the problems of traditional calibration methods being cumbersome and susceptible to drift due to environmental factors. Since the mapping coefficient is calculated in real-time based on the current scan data for each measurement, the proportionality system error of the optical system is automatically eliminated, thus solving the technical problem of accurate conversion from scan coordinates to physical coordinates.

[0060] This implementation method uses a cosine curve fitting-based eccentricity parameter calculation method to inversely solve for the eccentricity and eccentricity direction angle by utilizing the periodic fluctuation law of radial distance caused by eccentricity, thus achieving precise alignment between the fixture axis and the rotation axis. Because the eccentricity correction adopts a closed-loop iterative approach, rescanning and verifying after each adjustment overcomes the problem that a one-time calibration cannot guarantee correction accuracy, thereby solving the measurement error problem caused by fixture installation eccentricity.

[0061] This embodiment utilizes the point cloud data of a fixture that has undergone eccentricity correction to invert the laser tilt angle. Based on the linear relationship between the Z-coordinate deviation of each point on the inner wall of the fixture and the radial distance, the tilt angle parameter is calculated, overcoming the problem that relying on the calibration angle during installation cannot adapt to angle drift. Since the tilt angle is recalculated based on the current scanning data in each measurement, the Z-axis system deviation caused by the angle between the laser scanning plane and the radial plane is effectively compensated, thus solving the technical problem of decreased measurement accuracy due to laser tilt angle drift.

[0062] The core innovation of this invention is that by using inclined line laser, it can scan the inner wall of a cylinder that cannot be imaged by vertical scanning. A high-precision standard round tube fixture is introduced as a "reference ruler". The fixture axis is calibrated by using the XY axis in conjunction with the rotation axis. By synchronously registering the scanning data of the workpiece and the standard round tube fixture in three-dimensional space, absolute measurement is transformed into relative measurement, thereby automatically eliminating all systematic errors.

[0063] Inspect product appearance as Figure 3 As shown.

[0064] Inspection content: Relevant dimensions of the inner wall of the circle—diameter, roundness, cylindricity, etc.; Fixture structure such as Figure 4 and 5 As shown; Testing process: Product A is placed in the round tube fixture B and fixed by bottom vacuum adsorption. The line laser is installed and fixed at an angle, with its working range covering the sidewalls of the product to be inspected and the inner wall of the round tube fixture. The rotation of the fixture drives the rotation of the product, and the laser performs a complete image of the product and the sidewall of the fixture, resulting in two unfolded planes.

[0065] Imaging results as follows Figure 6 As shown: The laser scanning imaging result is a point cloud set, with each point having XYZ coordinates. Point cloud reconstruction, such as Figure 7 As shown.

[0066] Implementation Method 2 In the cylindrical inner wall inspection system, the workpiece is fitted into a standard cylindrical fixture and rotated by a rotating shaft. A line laser scans the inner wall of the fixture to acquire point cloud data. Due to positional deviations in the fixture installation, there is an eccentricity between the fixture axis and the rotating shaft, causing the radial distance acquired by the scan to fluctuate periodically, directly affecting the measurement accuracy of subsequent parameters such as inner diameter and roundness.

[0067] Existing eccentricity correction methods use a fixed step size to iteratively adjust the X and Y axis positions. When the eccentricity is large, the convergence speed is slow. When the eccentricity approaches the target threshold, the adjustment amount oscillates repeatedly around the threshold due to the excessively large step size, making stable convergence difficult. In addition, existing methods usually use whether the eccentricity is less than the threshold as the sole termination criterion. When measurement noise exists in the system, the method may terminate prematurely due to accidental fulfillment of the condition, leading to false convergence.

[0068] According to an embodiment of this invention, an adaptive iterative correction method for eccentricity is provided. This method is applied to a cylindrical inner wall inspection device including a line laser sensor, an XY axis drive system, a rotary shaft, and a rotary encoder. The workpiece to be inspected is fitted into a standard circular tube fixture, and the actual inner diameter of the standard circular tube fixture is... Given a known baseline value, a preset eccentricity tolerance threshold is established. .

[0069] Step 201: Acquire the scanned point cloud data synchronized with the rotary encoder and generate a point cloud set for the inner wall of the fixture. The rotating shaft drives the standard circular tube fixture to rotate one revolution. The line laser sensor scans the inner wall of the fixture and simultaneously reads the angle information output by the rotary encoder to obtain the scanned point cloud dataset. ,in For the first The rotation angle corresponding to each sampling point This is the scanned value of the radial distance from the inner wall of the fixture to the axis of rotation. For axial coordinates.

[0070] Step 202: Calculate the radial deviation sequence based on the standard inner diameter and generate deviation curve data. Known standard inner diameter based on standard circular tube fixture Calculate the radial deviation at each sampling point:

[0071] Output radial deviation sequence As input data for cosine fitting.

[0072] Step 203: Use the least squares algorithm to fit the deviation sequence with a cosine function to generate the eccentricity parameters. The bias sequence is fitted with a cosine function using the least squares algorithm:

[0073] in and The fitting coefficients are to be determined. The eccentricity is calculated based on the fitting coefficients. and eccentricity direction angle :

[0074]

[0075] Subscript Indicates the current iteration round.

[0076] Step 204: Calculate the adaptive step size factor based on the ratio of eccentricity to threshold, and generate the adjustment step size coefficient. Based on the current eccentricity With preset eccentricity tolerance threshold Calculate the adaptive step size factor using the ratio:

[0077] When eccentricity Greater than or equal to At that time, step size factor The value is set to 1, keeping the adjustment amount equal to the eccentricity to achieve rapid approximation; when the eccentricity... Less than At that time, step size factor The size decreases proportionally as the eccentricity decreases, to avoid excessive adjustment that could cause oscillations.

[0078] Step 205: Calculate the XY axis adjustment based on the adaptive step size factor and output the displacement control command. The adaptive step size factor is applied to the eccentricity compensation calculation to generate the XY axis adjustment:

[0079]

[0080] Output displacement control commands to the XY axis drive system to perform position adjustment.

[0081] Step 206: Obtain the adjusted scanned point cloud data, calculate the new eccentricity and residual gradient, and determine the iteration termination. After driving the XY axes to move according to the adjustment amount, repeat steps 201 to 203 to acquire a new round of scanned point cloud data and calculate a new eccentricity. .

[0082] Calculate the residual gradient:

[0083] The residual gradient It represents the relative rate of change of eccentricity between two adjacent iterations.

[0084] judge and Does it satisfy both conditions simultaneously? If it does, output a correction completion flag, terminate the iteration, and use the current fixture position as the corrected reference position; if it does not satisfy both conditions, return to step 204 to continue the iteration.

[0085] It should be noted that the residual gradient threshold of 0.1 indicates that the rate of change of eccentricity between two adjacent iterations should be less than 10%. The purpose of this dual termination condition is to allow for a single threshold judgment. Premature termination may occur due to accidental satisfaction caused by measurement noise; therefore, a residual gradient condition is introduced. As an auxiliary criterion, it ensures that the eccentricity not only meets the threshold requirement, but has also tended to a stable convergence state.

[0086] In this embodiment of the application, to avoid infinite loops caused by abnormal situations during the iteration process, a maximum limit on the number of iterations is set. When the number of iterations reaches the upper limit but the termination condition is not met, a correction failure flag is output and the current eccentricity is recorded for manual intervention by the operator.

[0087] This implementation introduces an adaptive step size factor calculation method based on the ratio of eccentricity to a threshold, enabling the adjustment step size to dynamically change according to the current eccentricity. When the eccentricity is large, the step size factor is close to 1, and the adjustment amount is equivalent to the eccentricity, achieving rapid approximation to the target position. When the eccentricity approaches the threshold, the step size factor automatically decreases, and the adjustment amount decreases accordingly. Since the adjustment amplitude is proportional to the relative magnitude of the eccentricity, it overcomes the problems of slow convergence with large eccentricities and oscillation with small eccentricities when using a fixed step size, thus solving the technical problem of difficulty in balancing iterative correction efficiency and accuracy.

[0088] This implementation introduces the residual gradient as an auxiliary termination criterion, forming a dual termination condition together with the eccentricity threshold judgment. The residual gradient reflects the relative change trend of the eccentricity in adjacent iterations; when the residual gradient is less than a set threshold, it indicates that the iteration process has stabilized. Since the eccentricity must meet the threshold while the residual gradient also meets the stability requirement, this overcomes the problem of false convergence caused by accidental fulfillment of the condition when a single threshold judgment is used in the presence of measurement noise, thus improving the reliability of the correction results.

Claims

1. A method for detecting the inner wall of a cylinder based on a standard fixture, applied in a detection device including an inclined-mounted line laser sensor, an XY-axis drive system, and a rotary axis, characterized in that, Includes the following steps: Acquire scanned point cloud data of a standard circular tube fixture and generate a set of point cloud data of the fixture's inner wall containing rotation angle, radial distance, and axial coordinates; The radial deviation sequence is calculated based on the known inner diameter of a standard circular tube fixture. The least squares algorithm is used to fit the deviation sequence with a cosine function. The eccentricity and eccentricity direction angle are calculated based on the fitting coefficient. The XY axis adjustment is generated and the XY axis is driven to move. The process is iterated until the eccentricity is less than the preset threshold. The corrected jig point cloud data is obtained, and the laser tilt angle is calculated based on the linear relationship between the Z coordinate deviation of each point and the radial distance to generate Z coordinate correction parameters. Acquire mixed point cloud data of workpiece and fixture, set segmentation threshold range based on the known inner diameter of standard round tube fixture, and segment the point cloud into fixture point cloud set and workpiece point cloud set; Using the ratio of the average radius of the jig point cloud scan to the standard inner diameter as a mapping coefficient, the workpiece point cloud is corrected by applying the mapping coefficient and the laser tilt angle to generate the workpiece point cloud in the physical coordinate system. The least squares algorithm is used to perform circular fitting on the workpiece point cloud, and the workpiece inner diameter detection result is output. The calculation of the eccentricity parameter is based on the principle of periodic fluctuation of radial distance caused by eccentricity. The square root of the sum of squares of the fitting coefficients is the eccentricity, and the arctangent of the fitting coefficients is the eccentricity direction angle.

2. The method according to claim 1, characterized in that, The radial deviation sequence is calculated based on the known inner diameter of a standard circular tube fixture. The deviation sequence is then fitted with a cosine function using the least squares algorithm. Based on the fitting coefficients, the eccentricity and eccentricity direction angle are calculated, including: Based on the known inner diameter of the standard circular tube fixture, the difference between the scanning radial distance of each sampling point and the standard inner diameter is calculated to generate a radial deviation sequence. The radial deviation sequence is fitted with a cosine function using the least squares algorithm. The radial deviation is expressed as the product of the first fitting coefficient and the cosine value of the rotation angle, plus the product of the second fitting coefficient and the sine value of the rotation angle. The square root of the sum of the squares of the first and second fitting coefficients is used as the eccentricity. The arctangent of the ratio of the second fitting coefficient to the first fitting coefficient is used as the eccentricity direction angle; The X and Y axis adjustments are calculated based on the eccentricity and the eccentricity direction angle. The X-axis adjustment is the opposite of the product of the eccentricity and the cosine of the eccentricity direction angle, and the Y-axis adjustment is the opposite of the product of the eccentricity and the sine of the eccentricity direction angle.

3. The method according to claim 1, characterized in that, The process involves acquiring the corrected jig point cloud data and calculating the laser tilt angle based on the linear relationship between the Z-coordinate deviation and the radial distance at each point, including: Obtain the point cloud data of the standard circular tube fixture after XY axis correction, and convert the cylindrical coordinates to Cartesian coordinates; Calculate the radial distance of each point, calculate the average Z coordinate of the fixture point cloud, and calculate the difference between the Z coordinate of each point and the average Z coordinate as the Z-axis deviation; The linear least squares algorithm is used to fit the data pairs of radial distance and Z-axis deviation, and the fitting slope is calculated. The fitting slope is equal to the sum of the products of the Z-axis deviation and radial distance of all points divided by the sum of the squares of the radial distances of all points. The arctangent of the fitted slope is calculated as the laser tilt angle.

4. The method according to claim 1, characterized in that, Based on the known inner diameter of a standard circular tube fixture, a segmentation threshold range is set to divide the point cloud into a fixture point cloud set and a workpiece point cloud set, including: The segmentation threshold range is set based on the known inner diameter of the standard circular tube fixture and the preset radial distance tolerance. Points whose radial distance falls within the segmentation threshold range are marked as fixture point set, and the remaining points are marked as workpiece point set; A transition region is set near the boundary of the segmentation threshold interval. Points within the transition region are classified by K-nearest neighbor voting based on their spatial neighbors, and the voting result is used as the final category of the point.

5. The method according to claim 1, characterized in that, Using the ratio of the average radius of the jig point cloud scan to the standard inner diameter as a mapping coefficient, the workpiece point cloud is corrected by applying the mapping coefficient and laser tilt angle, including: The arithmetic mean of the radial distances of all points in the jig point cloud is calculated as the average scan radius; The ratio of the known inner diameter of the standard circular tube fixture to the average scanning radius is calculated as the mapping coefficient; The actual radial distance is obtained by multiplying the scanned radial distance of each point in the workpiece point cloud by a mapping coefficient. The corrected Z-coordinate is obtained by subtracting the product of the radial distance of the point and the tangent of the laser tilt angle from the Z-coordinate of each point in the workpiece point cloud. Convert the corrected workpiece point cloud from cylindrical coordinates to Cartesian coordinates, and output the workpiece point cloud in the physical coordinate system.

6. The method according to claim 1, characterized in that, The workpiece point cloud is fitted with a circle using the least squares algorithm, and the output of the workpiece inner diameter detection results includes: The workpiece point cloud is subjected to least squares circular fitting for a two-dimensional projection. The center coordinates and average radius of the circle are then determined to minimize the sum of the squared radial deviations of all points from the fitted circle. Calculate the radial deviation of each point from the fitted circle; The output workpiece inner diameter is twice the average radius, and the output roundness error is the difference between the maximum and minimum radial deviation.

7. The method according to claim 6, characterized in that, A residual-based iterative reweighted least squares algorithm is used for ring fitting, including: Initialize the weight of all points to 1; The weighted least squares algorithm is used to solve for the center coordinates and average radius of the circle. Calculate the radial residual from each point to the fitted circle; The weights are updated based on the residuals of each point, and the weights of points with larger residuals are reduced. Determine if the change in weights is less than a preset threshold. If not, return to solve again. If it is, output the final fitting result.

8. The method according to claim 1, characterized in that, It also includes the step of calculating the cylindricity of the workpiece based on multi-section data: Obtain the complete 3D point cloud of the workpiece, determine the value range of the Z direction, divide the Z direction into multiple levels, and extract the cross-sectional point cloud corresponding to each level; For each cross-sectional point cloud, the center and radius of the cross-section are fitted using the least squares algorithm; Perform spatial straight-line fitting on the centers of all cross sections and calculate the equation of the cylinder axis. Using the fitted axis as a reference, calculate the radial distance from all points to the axis; The cylindricity value is generated as the difference between the maximum and minimum radial distances, and the cylindricity detection result of the workpiece is output.

9. The method according to claim 1, characterized in that, Iterative execution continues until the eccentricity is less than a preset threshold, employing an adaptive step-size iterative correction strategy, including: The adaptive step size factor is calculated based on the ratio of the current eccentricity to the preset eccentricity tolerance threshold. When the eccentricity is greater than or equal to twice the threshold, the step size factor is 1. When the eccentricity is less than twice the threshold, the step size factor decreases proportionally as the eccentricity decreases. The adaptive step size factor is applied to the eccentricity compensation calculation to generate the XY axis adjustment amount; After driving the XY axis to move, the scanned point cloud data is reacquired and the new eccentricity is calculated; The relative rate of change of eccentricity between two adjacent iterations is calculated as the residual gradient; Determine whether the new eccentricity is less than or equal to a preset threshold and the residual gradient is less than a preset stability threshold simultaneously. If both are satisfied, output a correction completion flag; otherwise, continue iterating.

10. A cylindrical inner wall detection system based on a standard fixture, used to perform the cylindrical inner wall detection method based on a standard fixture as described in any one of claims 1-9, characterized in that, include: An inclined line laser sensor is used to scan the inner wall of a cylinder to generate point cloud data; The XY axis drive system is used to adjust the position of the standard round tube fixture according to the eccentricity parameters; A rotary shaft and a rotary encoder are used to drive the workpiece and standard round tube fixture to rotate and output angle information; Vacuum adsorption device is used to fix the workpiece to be tested and the standard round tube fixture; The processing module is used to perform eccentricity correction, laser tilt angle calculation, point cloud segmentation, coordinate transformation, and circular fitting.

Citation Information

Cited By

  • Geometric deviation detection system based on pipe fitting

    CN121953815A

  • A pipe fitting geometry deviation based detection system

    CN121953815B