Method, device and system for detecting inner diameter and deformation of cylindrical workpiece and product

By combining point laser displacement sensor and DBSCAN clustering algorithm, the problem of high accuracy dependence in contactless measurement is solved, and efficient and accurate detection of inner diameter and deformation of cylindrical workpieces is achieved.

CN120252551APending Publication Date: 2025-07-04YANGTZE RIVER DELTA PHYSICS RES CENT CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510322058.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The existing non-contact measurement methods have high dependence on the center accuracy, resulting in large measurement errors and it is difficult to efficiently detect the inner diameter and deformation of cylindrical workpieces.

Method used

Point laser displacement sensor is used to obtain the contour data of the cylindrical workpiece, establish a Cartesian coordinate system, analyze the center coordinate group through the DBSCAN clustering algorithm, and combine simulation optimization parameters to achieve accurate calculation of the center and radius.

Benefits of technology

It improves the accuracy and efficiency of the test, avoids errors caused by inaccurate centers, adapts to the shapes and states of different cylindrical workpieces, has strong flexibility, adjustable test accuracy and wide applicability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0005317701720000111
    Figure BDA0005317701720000111
  • Figure FDA0005317701710000011
    Figure FDA0005317701710000011
  • Figure FDA0005317701710000021
    Figure FDA0005317701710000021
Patent Text Reader

Abstract

The invention provides a method, device, system and product for detecting the inner diameter and deformation of a cylindrical workpiece, and the method comprises the steps: obtaining the distance and angle from any point O in the cylindrical workpiece to the contour of the cylindrical workpiece through a point laser displacement sensor, forming a contour data set, building Cartesian coordinates with the point O as an original point, and obtaining a contour coordinate set; then, dividing the contour coordinate group into at least three subsets, randomly selecting contour point coordinates of any point in the three groups which are not repeated, and calculating to obtain corresponding circle center coordinates; repeating N times, N being a natural number greater than 0, and obtaining a circle center coordinate group including N circle center coordinates; and finally, inputting the circle center coordinate group into a DBSCAN clustering algorithm, judging the state of the cylindrical workpiece, obtaining the accurate circle center coordinate of the cylindrical workpiece, and solving the radius of the cylindrical workpiece. The problems that a traditional non-contact measuring surface has strong dependence on circle center precision and the state of the cylindrical workpiece cannot be judged are solved, and the testing precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of measurement technology, and in particular, to a method, device, system and product for detecting the inner diameter and deformation of a cylindrical workpiece. Background Art

[0002] In industrial production, the cross-sections of many cylindrical workpieces are circular, such as pipes, hubs, and various hole parts. With the continuous complication and precision of mechanical equipment, the detection requirements for cylindrical workpieces have also increased. Especially in the aspect of inner diameter measurement, the accuracy requirement sometimes reaches the millimeter level or higher. In addition, the deformation of the cylindrical workpiece needs to be inspected. Therefore, it is particularly important to perform accurate and efficient inner diameter detection.

[0003] Currently, the commonly used detection methods include manual measurement, contact measurement, and processing using machine vision after taking pictures with an industrial camera. However, manual measurement is not only time-consuming and laborious but also difficult to be widely applied in industrial production. Contact measurement has the risk of damaging the cylindrical workpiece, while the computer vision method performs poorly in the detection of high-precision cylindrical workpieces due to the influence of distortion error. Therefore, non-contact measurement has gradually attracted attention.

[0004] Non-contact measurement uses technologies such as lasers and ultrasonic waves to scan the inner diameter of a circle and calculates the inner diameter and center of the circle by fitting and other methods. This method effectively avoids the damage that may be caused to the cylindrical workpiece during the test, reduces the human measurement error, and improves the work efficiency. However, non-contact measurement also faces a serious problem: when testing a cylindrical workpiece, it is often necessary to determine the precise center in advance, which not only increases the complexity and cost of the measurement system but also reduces the work efficiency. Especially when the center is not precise enough, it may lead to errors in subsequent inner diameter measurement, thus affecting the final measurement result. How to avoid the errors caused by inaccurate center and optimize the test equipment to improve the test efficiency has become the focus and challenge of current research. Summary of the Invention

[0005] Aiming at the problems existing in the prior art, the present invention proposes a method, device, system and product for detecting the inner diameter and deformation of a cylindrical workpiece. First, the contour data of the cylindrical workpiece is scanned by a point laser displacement sensor. Subsequently, by establishing a Cartesian coordinate and constructing a subset, a set of center coordinates with a natural structure is obtained. The set of center coordinates with a natural structure group is input into the DBSCAN clustering algorithm, so as to obtain the center and radius data of the cylindrical workpiece. By combining the set of center coordinates with a natural structure and the DBSCAN clustering algorithm, the problem of high dependence on the center accuracy in traditional non-contact measurement is solved, and the test efficiency and accuracy are improved.

[0006] In the first aspect, the present invention provides a method for detecting the inner diameter and deformation of a cylindrical workpiece, including the following steps:

[0007] S1: Use a point laser displacement sensor to obtain the distance and angle from any point O inside the cylindrical workpiece to the contour of the cylindrical workpiece, denoted as the contour data set. Establish a Cartesian coordinate system with point O as the origin, and substitute the contour data set into the Cartesian coordinate system to obtain the contour coordinate set;

[0008] S2: Divide the contour coordinate set into at least three subsets. Arbitrarily select three non-repeating subsets from them and randomly extract one contour point from each subset. According to the coordinates of the three extracted contour points, calculate the corresponding center coordinates. After repeating N times, obtain a set of center coordinates consisting of N center points with known coordinates, where N is a natural number greater than 0;

[0009] S3: Input the set of center coordinates, Threshold, EPS, and Minpts threshold into the DBSCAN clustering algorithm, judge and output the state of the cylindrical workpiece, the accurate center coordinates of the qualified cylindrical workpiece, and calculate and output the radius of the cylindrical workpiece.

[0010] As a further solution, in S1, the distance ρ from point O to the contour of the cylindrical workpiece is measured by rotating the point laser displacement sensor horizontally for one week.

[0011] As a further solution, in S1, the angle is measured by the fixed-angle step rotation of the servo motor and the DD motor.

[0012] As a further solution, the contour coordinate set is obtained by substituting the contour data set into the polar coordinate formula (ρ n cosa n , ρ n sin a n ), to obtain the contour coordinate set, where n represents the nth contour point, a n represents the angle of the nth contour point, and ρ n represents the distance from the nth point O to the contour of the cylindrical workpiece.

[0013] As a further solution, in S2, the subsets are divided in order of angle. Dividing the subsets in order of angle helps to ensure that the subsequently extracted contour points are more evenly distributed, thus improving the test accuracy.

[0014] As a further solution, in S2, the extraction steps of the three-point contour points are as follows: First, randomly extract any contour point, and identify the subset group number to which the contour point belongs. Remove this subset group, and continue to randomly extract any contour point until the coordinates of three contour points A a (x a , y a ) and A b (x b , y b),A c (x c ,y c ), where b and c are arbitrary angles. After extracting the contour points, the subset to which the contour points belong is removed, and the next extraction is performed to avoid the error problem caused by the contour points being too close to each other during the effective random extraction of the contour points, improving the accuracy and precision of the test, and providing a reliable basis for the subsequent judgment of the state of the cylindrical workpiece.

[0015] As a further solution, the calculation steps of the center coordinates of the three-point contour points are as follows: Let the center be (h, k) and the radius be r. Substitute the contour point coordinates into the equation of the circle to obtain a system of linear equations:

[0016] Obtain the center coordinates (h, k).

[0017] As a further solution, the method for solving the equation is not limited, and technicians can select the corresponding solution method according to requirements, such as matrix, graphical method, substitution method, elimination method, completing the square method, Newton method, bisection method, etc.

[0018] As a further solution, in S3, Threshold is obtained through simulation.

[0019] As a further solution, the simulation steps are as follows: According to the simulation data of the inner diameter of the cylindrical workpiece, set the test accuracy and the maximum error; repeat S1 - S2 to obtain the center coordinate group. Initially, set the Minpts threshold to 2 times the dimension of the data set, and the K value to Minpts threshold - 1. Obtain the EPS value through the K-distance graph of the center coordinate group. Input the center coordinate group, EPS, and Minpts threshold into the DBSCAN clustering algorithm to obtain the percentage of the largest cluster in the total number of points, which is Threshold. The K value represents the number of the nearest neighbors considered when calculating the K-distance of each point.

[0020] Obtaining Threshold through simulation can effectively optimize the parameters of the clustering algorithm, making the finally obtained center coordinates and radius more in line with the actual situation; at the same time, the Threshold obtained through simulation can be flexibly adjusted according to the accuracy requirements and different test objects, which helps to fully consider the structural characteristics of different cylindrical workpieces and improve the test accuracy.

[0021] As a further solution, in S3, the steps for obtaining the EPS value through the K-distance graph are as follows: Calculate the distances from all points to their k-th nearest neighbors and sort them, and plot the sorted K-distance graph. The value at the steep change (inflection point) of the curve is the EPS value.

[0022] As a further solution, the test accuracy is not limited, and technicians can select different test accuracies according to requirements, such as 99%, 98%, 97%, 96%, 95%, etc.

[0023] As a further solution, the maximum error is not limited, and technicians can set different maximum errors according to requirements.

[0024] As a further solution, in S3, the center coordinates of the cylindrical workpiece are output through the following steps: Determine whether the percentage of the number of center coordinate points in the largest cluster output by the DBSCAN clustering algorithm in the total number of center coordinate points is greater than Threshold. If it is greater, output the center coordinates at the densest part in the largest cluster as the center coordinates of the cylindrical workpiece.

[0025] As a further solution, the radius of the cylindrical workpiece is calculated by the formula to obtain a data group of the radius of the cylindrical workpiece, and outliers are removed. Subsequently, the average value of the data group of the radius of the cylindrical workpiece is obtained, which is the radius of the cylindrical workpiece. Among them, r is the radius of the cylindrical workpiece, x a is the abscissa of any contour point, y a is the ordinate of any contour point, x b is the abscissa of the center of the cylindrical workpiece, y b is the ordinate of the center of the cylindrical workpiece.

[0026] As a further solution, the method for detecting the inner diameter and deformation of the cylindrical workpiece can detect planes at different heights. M planes are extracted according to the type of the cylindrical workpiece, where M is a natural number greater than 1. The qualification of the M planes is detected. When the M planes are qualified, the cylindrical workpiece is considered qualified. When any one plane P is unqualified, the plane P is re-detected, and the planes P1 above and P2 below this plane are extracted according to the set accuracy to detect whether they are qualified. If the plane P, the plane P1 above, and the plane P2 below are all qualified, the cylindrical workpiece is considered qualified. If any plane is unqualified, the cylindrical workpiece is considered unqualified.

[0027] Among the unqualified cylindrical workpieces, if both the upper plane P1 and the lower plane P2 are qualified, the cylindrical workpiece is considered a defective cylindrical workpiece.

[0028] If both the upper plane P1 and the lower plane P2 are unqualified, the cylindrical workpiece is considered a deformed cylindrical workpiece.

[0029] If any one of the upper plane P1 and the lower plane P2 is qualified, the planes above and below the unqualified plane are extracted according to the accuracy and the judgment of whether they are qualified is repeated. If both the upper and lower planes are qualified, it is a defective cylindrical workpiece. If any one of the upper and lower planes is unqualified, it is a deformed cylindrical workpiece;

[0030] As a further solution, when outputting the state of the cylindrical workpiece, first check whether the percentage of the number of center coordinate points in the largest cluster among the total number of center coordinate points is greater than the set Threshold. If it is greater, the cylindrical workpiece is considered qualified; otherwise, the cylindrical workpiece is considered to be deformed.

[0031] In a second aspect, the present invention also provides a device for detecting the inner diameter and deformation of a cylindrical workpiece, characterized in that the device for detecting the inner diameter and deformation of the cylindrical workpiece includes an input module, a point laser displacement sensor detection module, a coordinate construction module, a center calculation module, and a cylindrical workpiece state judgment module.

[0032] As a further solution, the input module is used to receive the input test accuracy, Threshold, maximum error, Minpts threshold, and the value of K in the K-distance graph.

[0033] As a further solution, the point laser displacement sensor detection module is used to select the coordinate origin inside the cylindrical workpiece according to the test accuracy and output a set of profile data of the inner diameter of the cylindrical workpiece. The set of profile data includes the distances from the coordinate origin to the profile of the cylindrical workpiece measured according to different accuracies.

[0034] As a further solution, the coordinate construction module is used to establish coordinates based on the coordinate origin and the set of profile data output by the point laser displacement sensor detection module, and output a set of profile coordinates.

[0035] As a further solution, the center calculation module is used to output a set of center coordinates according to the set of profile coordinates.

[0036] As a further solution, the cylindrical workpiece state judgment module is used to output the radius of the cylindrical workpiece, the center coordinates, and the state of the cylindrical workpiece according to the set of center coordinates, Threshold, Minpts threshold, K value, and maximum error.

[0037] In a third aspect, the present invention also provides a system for detecting the inner diameter and deformation of a cylindrical workpiece, characterized in that the system for detecting the inner diameter and deformation of the cylindrical workpiece includes one or more point laser displacement sensors, one or more processors, and a storage device for receiving point laser displacement sensor data and storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the above method and train a data processing module according to this method to output and judge the inner diameter and state of the cylindrical workpiece.

[0038] In a fourth aspect, the present invention also provides a computer program product for detecting the inner diameter and deformation of a cylindrical workpiece, characterized in that it includes a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0039] Compared with the prior art, the present invention has at least the following beneficial effects:

[0040] (1) By constructing a set of center coordinates of the tagless data type and combining with the DBSCAN clustering algorithm based on density analysis, the present invention effectively avoids the problem that traditional non-contact measurement depends on the center of the circle for testing, thus significantly improving the reliability of the test. In addition, the combination of the set of center coordinates of the tagless data type and the DBSCAN clustering algorithm not only improves the accuracy of deformation detection, but also realizes a comprehensive judgment of the state of the cylindrical workpiece, providing an important basis for subsequent processing and quality control.

[0041] (2) The present invention allows researchers or engineers to arbitrarily select point O as the measurement reference during the test, greatly improving the convenience of the test. This design effectively avoids the problem of high requirement for the accuracy of the center of the circle in traditional non-contact measurement methods, enabling smooth measurement under various shapes and states of cylindrical workpieces, and greatly improving work efficiency and flexibility.

[0042] (3) In the present invention, the test accuracy and the maximum error can be independently set according to actual needs, thus enhancing the applicability of the test. In addition, the Threshold value obtained through simulation can be accurately adjusted for different test objects, further improving the accuracy of the test. This flexible setting and adjustment mechanism ensures a high level of test results in various application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention.

[0044] In the drawings:

[0045] Figure 1 It is a schematic diagram for detecting a standard cylindrical workpiece in Embodiment 1, where O is the center of the two-dimensional circle of the cylindrical workpiece, r is the inner radius, and α is the selected determination range related to the EPS value. It should be noted that, for a clearer display, the plane α is set larger;

[0046] Figure 2 It is a schematic diagram for detecting a deformed cylindrical workpiece in Embodiment 1;

[0047] Figure 3 It is a schematic diagram of the cylindrical workpiece in Embodiment 2;

[0048] Figure 4 It is a schematic diagram for detecting Plane 1 in Embodiment 2;

[0049] Figure 5 It is a schematic diagram for detecting Plane 2 in Embodiment 2;

[0050] Figure 6 Schematic diagram for the detection of plane 3 in Example 2;

[0051] Figure 7 Schematic diagram of the cylindrical workpiece in Example 3;

[0052] Figure 8 Schematic diagram for the detection of plane 1;

[0053] Figure 9 Schematic diagram for the detection of plane 2;

[0054] Figure 10 Schematic diagram for the detection of plane 3;

[0055] Figure 11 Schematic diagram for the detection of plane 4;

[0056] Figure 12 Schematic diagram for the detection of plane 5. Detailed implementation manners

[0057] For the convenience of understanding, the present invention will be described more comprehensively below, and embodiments of the present invention are given, but the scope of the present invention is not limited thereby.

[0058] In this article, the term "Threshold" used herein refers to the percentage of the largest cluster in the total number of points in the DBSCAN clustering algorithm.

[0059] In a first aspect, the present invention provides a method for detecting the inner diameter and deformation of a cylindrical workpiece, characterized by including the following steps:

[0060] S1: Use a point laser displacement sensor to obtain the distance and angle from any point O inside the cylindrical workpiece to the contour of the cylindrical workpiece, denoted as the contour data group. Establish a Cartesian coordinate system with point O as the origin, and substitute the contour data group into the Cartesian coordinate system to obtain the contour coordinate group;

[0061] S2: Divide the contour coordinate group into at least three subsets, randomly select three non-repeating subsets from them and randomly extract a contour point from each subset. According to the coordinates of the three extracted contour points, calculate the corresponding center coordinates. After repeating N times, obtain a center coordinate group composed of N center points with known coordinates, where N is a natural number greater than 0;

[0062] S3: Input the center coordinate group, Threshold, EPS, and Minpts thresholds into the DBSCAN clustering algorithm, judge and output the state of the cylindrical workpiece, the accurate center coordinates of the qualified cylindrical workpiece, and calculate and output the radius of the cylindrical workpiece.

[0063] In the present invention, we first obtain the contour data of the cylindrical workpiece through a point laser displacement sensor. By means of non-contact measurement, while improving work efficiency, it avoids damage to the workpiece, improves the accuracy and reliability of the contour data of the cylindrical workpiece, and lays a good foundation for subsequent analysis. On this basis, we convert the contour data group into Cartesian coordinates, laying a foundation for subsequent calculations. Furthermore, we classify and calculate the contour coordinate group, construct an unlabeled center coordinate group. Through the DBSCAN clustering algorithm, we can more accurately analyze and explore the internal structure and pattern of the center coordinate group, thereby deriving the center coordinates. First, during the data acquisition process, different from traditional non-contact measurement, the present invention allows any point to be selected inside the cylindrical workpiece for testing, thus greatly improving the convenience of testing and avoiding errors caused by inaccurate center positioning. Secondly, by using the fitting method of combining the center coordinate group with the DBSCAN clustering algorithm, it avoids the problem of high dependence of traditional non-contact measurement on the accuracy of the center coordinates; finally, based on the measurement of the inner diameter of the cylindrical workpiece, the state of the cylindrical workpiece can be further judged, thereby further optimizing the test efficiency.

[0064] As a further solution, in S1, the distance ρ from point O to the contour of the cylindrical workpiece is measured by horizontally rotating the point laser displacement sensor for one week.

[0065] As a further solution, in S1, the angle is measured by the fixed-angle step rotation of the servo motor and the DD motor.

[0066] As some preferred solutions, in S1, when collecting the distance and angle, the servo motor can be combined with the control board card. In the position mode, the sensor can be controlled through pulse signals to obtain the radius and angle simultaneously.

[0067] As a further solution, the contour coordinate group is obtained by substituting the contour data group into the polar coordinate formula (ρ n cos a n , ρ n sin a n ), resulting in the contour coordinate group, where n represents the nth contour point, a n represents the angle of the nth contour point, and ρ n represents the distance from the nth point O to the contour of the cylindrical workpiece.

[0068] As a further solution, in S2, the subsets are divided in order of angle. Dividing the subsets in order of angle helps to ensure that the distribution of the subsequently extracted contour points is more uniform, thereby improving the test accuracy.

[0069] As a further solution, in S2, the three-point contour point extraction steps are as follows: First, randomly extract any contour point, identify the subset group number to which the contour point belongs, remove the subset of this group, and continue to randomly extract any contour point until the coordinates of three contour points A a (x a , y a ) are obtained, where A b (x b , y b ) and A c (x c , y c ). Here, a, b, and c are arbitrary angles. By using the method of immediately removing the subset to which the contour point belongs after extracting the contour point and then performing the next extraction, the error problem caused by the too-close distance between contour points during the random extraction of valid contour points is effectively avoided, the accuracy and precision of the test are improved, and a reliable basis is provided for the subsequent judgment of the state of the cylindrical workpiece.

[0070] As a further solution, the method for solving the center of the circle is not limited in principle. As some examples, by setting the center of the circle as (h, k) and the radius as r, substituting the contour point coordinates into the equation of the circle respectively to obtain a system of linear equations:

[0071] The coordinates (h, k) of the center of the circle are obtained.

[0072] As a further solution, the method for solving the equation is not limited, and technicians can select the corresponding solution method according to requirements, such as matrix, graphical method, substitution method, elimination method, completing the square method, etc.

[0073] As a further solution, in S3, the Threshold value is obtained through simulation.

[0074] As a further solution, the simulation steps are as follows: According to the simulation data of the inner diameter of the cylindrical workpiece, set the test accuracy and the maximum error; repeat S1 - S2 to obtain the group of center coordinates. First, set the Minpts threshold to 2 times the dimension of the data set, the K value to Minpts threshold - 1, obtain the EPS value through the K-distance graph, and input the group of center coordinates, EPS, and Minpts threshold into the DBSCAN clustering algorithm to obtain the percentage of the largest cluster in the total number of points, which is Threshold.

[0075] Among them, the value of K represents the number of nearest neighbors considered when calculating the K-distance of each point. By adjusting Threshold through simulation, the parameters of the clustering algorithm can be effectively optimized, making the finally obtained center coordinates and radius more in line with the actual situation. At the same time, the Threshold obtained through simulation can be flexibly adjusted according to the test accuracy requirements and the test object, which helps to fully consider the structural characteristics of different cylindrical workpieces and improve the test accuracy.

[0076] As a further solution, in step S3, the steps to obtain the EPS value from the K-distance graph are as follows: Calculate the distances from all points to their k-th nearest neighbors and sort them, draw the sorted K-distance graph, and the value at the steep change (inflection point) of the curve is the EPS value.

[0077] As a further solution, the test accuracy is not limited, and technicians can select different test accuracies according to requirements, such as 99%, 98%, 97%, 96%, 95%, etc.

[0078] As a further solution, the maximum error is not limited, and technicians can set different maximum errors according to requirements.

[0079] As a further solution, in step S3, the center coordinates of the cylindrical workpiece are output through the following steps: Determine whether the percentage of the number of center coordinate points in the largest cluster output by the DBSCAN clustering algorithm in the total number of center coordinate points is greater than Threshold. If it is greater, output the center coordinates at the densest part in the largest cluster as the center coordinates of the cylindrical workpiece.

[0080] As a further solution, since the distribution of the center coordinate points in the largest cluster according to density basically follows a two-dimensional normal distribution, the center coordinates corresponding to the peak value at this time are the center coordinates at the densest part.

[0081] As a further solution, the radius of the cylindrical workpiece is calculated by the formula to obtain a data set of the radii of the cylindrical workpiece, and outliers are removed. Subsequently, the average value of the data set of the radii of the cylindrical workpiece is obtained, which is the radius of the cylindrical workpiece. Among them, r is the radius of the cylindrical workpiece, x a is the abscissa of any contour point, y a is the ordinate of any contour point, x b is the abscissa of the center of the cylindrical workpiece, and y b is the ordinate of the center of the cylindrical workpiece.

[0082] As a further solution, when outputting the state of the cylindrical workpiece, first determine whether the percentage of the number of contour points in the largest cluster in the total number of contour points is greater than Threshold. If it is greater, it is considered that the cylindrical workpiece is qualified; otherwise, it is considered that the cylindrical workpiece is deformed ( Figure 2 ).

[0083] As a further solution, the method for detecting the inner diameter of a cylindrical workpiece based on a point laser displacement sensor can detect planes at different heights. The method for detecting the inner diameter of a cylindrical workpiece based on a point laser displacement sensor can detect planes at different heights. Extract M planes according to the type of cylindrical workpiece, where M is a natural number greater than 1. Detect the qualification status of the M planes. When the M planes are qualified, the cylindrical workpiece is considered qualified. When any one plane P is unqualified, re-detect the plane P and extract the upper plane P1 and the lower plane P2 above and below this plane according to the set precision to detect whether they are qualified. If the plane P, the upper plane P1, and the lower plane P2 are all qualified, the cylindrical workpiece is considered qualified. If any plane is unqualified, the cylindrical workpiece is considered unqualified.

[0084] Among the unqualified cylindrical workpieces, if both the upper plane P1 and the lower plane P2 are qualified, the cylindrical workpiece is considered a defective cylindrical workpiece.

[0085] If both the upper plane P1 and the lower plane P2 are unqualified, the cylindrical workpiece is considered a deformed cylindrical workpiece.

[0086] If any one of the upper plane P1 and the lower plane P2 is qualified, extract the upper and lower planes of the unqualified plane according to the precision and repeat the judgment of whether they are qualified. If both the upper and lower planes are qualified, it is a defective cylindrical workpiece. If any one of the upper and lower planes is unqualified, it is a deformed cylindrical workpiece. By comprehensively considering the data characteristics at different heights, it helps to comprehensively consider whether the cylindrical workpiece is qualified, simplifies the test process, improves the test efficiency, and also helps to improve the test accuracy, thus providing a reliable basis for quality control in the production process.

[0087] In a second aspect, the present invention also provides a device for detecting the inner diameter and deformation of a cylindrical workpiece, characterized in that the device for detecting the inner diameter of the cylindrical workpiece includes an input module, a point laser displacement sensor detection module, a coordinate construction module, a center calculation module, and a cylindrical workpiece status judgment module.

[0088] As a further solution, the input module is used to receive the input test precision, Threshold, maximum error, Minpts threshold, and the value of K in the K-distance graph.

[0089] As a further solution, the point laser displacement sensor detection module is used to select the coordinate origin inside the cylindrical workpiece according to the test precision and output a set of contour data of the inner diameter of the cylindrical workpiece. The set of contour data includes the distances from the coordinate origin to the contour of the cylindrical workpiece measured according to different precisions.

[0090] As a further solution, the coordinate construction module is used to establish a Cartesian coordinate according to the coordinate origin and the set of contour data output by the point laser displacement sensor detection module and output a set of contour coordinates.

[0091] As a further solution, the center calculation module is used to output a set of center coordinates according to the set of contour coordinates.

[0092] As a further solution, the cylindrical workpiece state judgment module is used to output the radius of the cylindrical workpiece, the center coordinates, and the state of the cylindrical workpiece according to the set of center coordinates, Threshold, Minpts threshold, K value, and maximum error.

[0093] As a further solution, each module in the cylindrical workpiece inner diameter detection device can be implemented in whole or in part by software, hardware, and their combination. The above-mentioned modules can be embedded in the processor in the computer device in hardware form or independent of it, or stored in the memory in the computer device in software form, so that the processor can call and execute the operations corresponding to the above-mentioned modules.

[0094] In a third aspect, the present invention also provides a cylindrical workpiece inner diameter and deformation detection system, which is characterized in that the cylindrical workpiece inner diameter detection system includes one or more point laser displacement sensors, one or more processors, and a storage device, which is used to receive the data of the point laser displacement sensors and store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the above method, and train the data processing module according to the method to output and judge the inner diameter and state of the cylindrical workpiece.

[0095] In a fourth aspect, the present invention also provides a computer program product for detecting the inner diameter and deformation of a cylindrical workpiece, which is characterized in that it includes a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0096] Next, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.

[0097] Embodiment 1

[0098] As Figure 1 , the test accuracy is set to 95% for a standard cylindrical workpiece by this method, the maximum error is set to 0.1 mm, the model of the point laser displacement sensor is Keyence LK-G5000 series, and the sensor head is LK-H150.

[0099] Arbitrarily select a point inside the cylindrical workpiece and denote it as point O. The point laser displacement sensor measures the distance from point O to the contour every time it rotates by one degree. After one full rotation, a total of 360 distances ρ from point O to the contour of the cylindrical workpiece are obtained, which are denoted as the contour data set [ρ1, ρ2, ··· ρ 360 . Import the contour data set and point O into the computer, and establish a Cartesian coordinate system with point O as the origin. Substitute the contour data set into the polar coordinate formula (ρncos a, ρnsin a) to obtain the contour coordinate set [A1(ρ1cos1°, ρ2sin1°), A2(ρ2cos2°, ρ2sin2°), ··· A 360 (ρ 360 cos360°, ρ 360 sin360°)];

[0100] Divide the contour coordinate set into twelve subsets at intervals of 30°, denoted as group 1, group 2 ··· group 12. Randomly select a contour point A 57 ((ρ 57 cos57°, ρ 57 sin57°)), identify the group number as 2, and select the next contour point A 129 ((ρ 129 cos129°, ρ 129 sin129°)) from the remaining groups 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12. Identify the group number as group 5, and select the third contour point A 243 ((ρ 243 cos243°, ρ 243 sin243°)). Substitute A 57 ((ρ 57 cos57°, ρ 57 sin57°)), A 129 ((ρ 129 cos129°, ρ 129 sin129°)), A 243 ((ρ 243 cos243°, ρ 243 sin243°)) into the equation of a circle, and assume the center of the circle is B1(h1, k1) and the radius is r1 to obtain the system of equations:

[0101]

[0102] The center coordinates B1(h1, k1) are obtained using a matrix. 1000 groups of three sets of contour points are repeatedly extracted to obtain a set of center coordinates composed of 1000 center points with known coordinates [B1(h1, k1), B2(h2, k2) ````` B 1000 (h 1000 ,k 1000 )];

[0103] Set K to 3, set Minpts to 4, and Threshold to 95%. Draw the K-distance graph of the set of center coordinates to obtain EPS. Use the DBSCAN clustering algorithm to process the set of center coordinates [B1(h1, k1), B2(h2, k2) ````` B 1000 (h 1000 ,k 1000 )], and obtain the largest cluster. Calculate the ratio of the number of points in the largest cluster to the total number of points.

[0104] When the ratio is greater than 95%, output the center coordinates (x 心 ,y 心 ). Substitute the center coordinates (x 心 ,y 心 ) and the set of contour coordinates [A1(ρ1cos1°, ρ2sin1°), A2(ρ2cos2°, ρ2sin2°), ··· A 360 (ρ 360 cos360°, ρ 360 sin360°)] into the formula to obtain the set of radius data of the cylindrical workpiece (r1, r2, r3 ······, r 360 ). Remove z outlier points, and output the radius r of the cylindrical workpiece.

[0105] Example 2

[0106] Use this method to detect a cylindrical workpiece with a height of 300 mm, and the detection accuracy is 0.1 mm.

[0107] As Figure 3 , extract 3 planes at intervals of 100 mm to obtain Plane 1, Plane 2, and Plane 3. As in Example 1, detect Plane 1, Plane 2, and Plane 3 in sequence. If Plane 1, Plane 2, and Plane 3 are all qualified, output that the cylindrical workpiece is qualified.

[0108] Example 3

[0109] Detect the cylindrical workpiece as Figure 4, the height of the cylindrical workpiece is 300 mm, the detection accuracy is 0.1 mm, and the detection method is the same as that in Embodiment 2. Among them, Plane 1 is unqualified, and Planes 2 and 3 are qualified. Plane 1 is re-detected, and the plane 20 mm above Plane 1 is extracted and denoted as Plane 4, and the plane 20 mm below Plane 1 is extracted and denoted as Plane 5. Planes 4 and 5 are detected by the method in Embodiment 1. Planes 1, 4, and 5 are all unqualified, and the cylindrical workpiece is output as a deformed workpiece.

[0110] The technical features of the above-described embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and deformations to the above embodiments within the scope of the present invention. In addition, without contradiction, those skilled in the art can combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples.

Claims

1. A method for detecting the inner diameter and deformation of a cylindrical workpiece, characterized in that, It includes the following steps: S1: Use a point laser displacement sensor to obtain the distance and angle from any point O inside the cylindrical workpiece to the contour of the cylindrical workpiece, denoted as the contour data set. Establish a Cartesian coordinate system with point O as the origin, and substitute the contour data set into the Cartesian coordinate system to obtain the contour coordinate set; S2: Divide the contour coordinate set into at least three subsets. Arbitrarily select three non-repeating subsets and randomly extract one contour point from each of them. According to the coordinates of the three extracted contour points, calculate the corresponding center coordinates. After repeating N times, obtain a set of center coordinates consisting of N center points with known coordinates, where N is a natural number greater than 0; S3: Input the set of center coordinates, Threshold, EPS, and Minpts threshold into the DBSCAN clustering algorithm, judge and output the state of the cylindrical workpiece and whether it is qualified. If it is qualified, output the accurate center coordinates of the cylindrical workpiece and calculate and output the radius of the cylindrical workpiece.

2. The method for detecting the inner diameter and deformation of a cylindrical workpiece according to claim 1, characterized in that, In S1, the distance from point O to the contour of the cylindrical workpiece is measured by rotating the point laser displacement sensor horizontally for one week; In S1, the angle is measured by the fixed-angle step rotation of the servo motor and the DD motor; The contour coordinate group is obtained by substituting the contour data group into the polar coordinate formula (ρ n cos a n , ρ n sin a n ), where n represents the nth contour point, a n represents the angle of the nth contour point, and ρ n represents the distance from the nth O point to the contour of the cylindrical workpiece.

3. The method for detecting the inner diameter and deformation of a cylindrical workpiece according to claim 1, wherein, In S2, the subsets are divided in order of angle; In the above S2, the steps for extracting three contour points are as follows: First, randomly extract any contour point, identify the subset group number to which the contour point belongs, remove the subset of this group, and continue to randomly extract any contour point until the coordinates of three contour points A a (x a , y a ), A b (x b , y b ), A c (x c , y c ), where a, b, and c are arbitrary angles; The calculation steps for the center coordinates of the three contour points are as follows: Let the center be (h, k) and the radius be r. Substitute the coordinates of the contour points into the equation of the circle to obtain a system of linear equations: Find the center coordinates (h, k).

4. The method for detecting the inner diameter and deformation of a cylindrical workpiece according to claim 1, wherein, In S3, Threshold is obtained through simulation; The simulation steps are as follows: According to the simulation data of the inner diameter of the cylindrical workpiece, set the test accuracy and the maximum error; repeat S1 - S2 to obtain the set of center coordinates. First, set the Minpts threshold to 2 times the dimension of the data set, and the K value to Minpts threshold - 1. Obtain the EPS value through the K-distance graph of the set of center coordinates. Input the set of center coordinates, EPS, and Minpts threshold into the DBSCAN clustering algorithm to obtain the number of points in the largest cluster, and further obtain the percentage of it in the total number of points, which is Threshold. Where the K value represents the number of nearest neighbors considered when calculating the K-distance of each point; In S3, the steps to obtain the EPS value through the K-distance graph are as follows: Calculate the distances from all points to their k-th nearest neighbors and sort them, and draw the sorted K-distance graph. The value at the inflection point of the curve is the EPS value.

5. The method for detecting the inner diameter and deformation of a cylindrical workpiece according to claim 1, characterized in that, In S3, the center coordinates of the cylindrical workpiece are output through the following steps: Judge whether the percentage of the number of center coordinate points in the largest cluster output by the DBSCAN clustering algorithm in the total number of center coordinate points is greater than Threshold. If it is greater, output the center coordinates at the densest part in the largest cluster as the center coordinates of the cylindrical workpiece; The radius of the cylindrical workpiece is calculated by the formula to obtain a data set of the radii of the cylindrical workpiece, and outliers are removed. Subsequently, the average value of the data set of the radii of the cylindrical workpiece is obtained, which is the radius of the cylindrical workpiece. Here, r is the radius of the cylindrical workpiece, x a is the abscissa of any contour point, y a is the ordinate of any contour point, x b is the abscissa of the center of the cylindrical workpiece, and y b is the ordinate of the center of the cylindrical workpiece.

6. The method for detecting the inner diameter and deformation of a cylindrical workpiece according to claim 1, characterized in that, When outputting the state of the cylindrical workpiece, first judge whether the percentage of the number of center coordinate points in the largest cluster in the total number of center coordinate points is greater than Threshold. If it is greater, it is considered that the cylindrical workpiece is qualified, otherwise it is considered that the cylindrical workpiece is deformed.

7. The method for detecting the inner diameter and deformation of a cylindrical workpiece according to claim 1, wherein The method for detecting the inner diameter of a cylindrical workpiece based on a point laser displacement sensor detects planes at different heights. M planes are extracted according to the type of the cylindrical workpiece, where M is a natural number greater than 1. The qualification of the M planes is detected. When the M planes are qualified, the cylindrical workpiece is considered qualified. When any one plane P is unqualified, the plane P is re-detected, and the planes P1 above and P2 below this plane are extracted according to the set precision to detect whether they are qualified. If the plane P, the plane P1 above, and the plane P2 below are all qualified, the cylindrical workpiece is considered qualified. If any plane is unqualified, the cylindrical workpiece is considered unqualified; Among the unqualified cylindrical workpieces, if both the upper plane P1 and the lower plane P2 are qualified, the cylindrical workpiece is considered a defective cylindrical workpiece; If both the upper plane P1 and the lower plane P2 are unqualified, the cylindrical workpiece is considered a deformed cylindrical workpiece; If any one of the upper plane P1 and the lower plane P2 is qualified, the planes above and below the unqualified plane are extracted according to the precision and the judgment of whether they are qualified is repeated. If both the upper and lower planes are qualified, it is a defective cylindrical workpiece. If any one of the upper and lower planes is unqualified, it is a deformed cylindrical workpiece.

8. A device for detecting the inner diameter and deformation of a cylindrical workpiece, characterized in that, The device for detecting the inner diameter and deformation of the cylindrical workpiece includes an input module, a point laser displacement sensor detection module, a coordinate construction module, a center calculation module, and a cylindrical workpiece state judgment module; The input module is used to receive the input test precision, Threshold, maximum error, Minpts threshold, and the value of K in the K-distance graph; The point laser displacement sensor detection module is used to select the coordinate origin inside the cylindrical workpiece according to the test precision and output a contour data group of the inner diameter of the cylindrical workpiece. The contour data group includes the distances from the coordinate origin to the contour of the cylindrical workpiece measured according to different precisions; The coordinate construction module is used to establish a coordinate system according to the coordinate origin and the contour data group output by the point laser displacement sensor detection module and output a contour coordinate group; The center calculation module is used to output a center coordinate group according to the contour coordinate group; The cylindrical workpiece state judgment module is used to output the radius of the cylindrical workpiece, the center coordinates, and the state of the cylindrical workpiece according to the center coordinate group, Threshold, Minpts threshold, K value, and maximum error.

9. A cylindrical workpiece inner diameter and deformation detection system, characterized in that, The system for detecting the inner diameter and deformation of the cylindrical workpiece includes one or more point laser displacement sensors, one or more processors, and a storage device, which is used to receive the data of the point laser displacement sensors and store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1-7, and train the data processing module according to this method to output and judge the inner diameter and state of the cylindrical workpiece.

10. A computer program product for detecting the inner diameter and deformation of a cylindrical workpiece, characterized in that, It includes a computer program, which when executed by a processor, implements the method according to claims 1-7.