Shaft diameter measurement method
Through the shaft diameter contour point measurement device and the improved bat algorithm, the problem of insufficient point cloud data of the arc part of the measured shaft was solved, high-precision shaft diameter measurement was achieved, and the reliability and accuracy of detection were improved.
Patent Information
- Application Number
- CN202511108205.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-08
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2045-08-08
AI Technical Summary
When measuring the arc part of the measured shaft using existing non-contact measurement technology, there is less effective point cloud data, which makes detection difficult. The existing circle fitting method has problems with sampling point sensitivity and non-real data points, which affects detection accuracy.
The bat algorithm with boundary rules to limit the bat position is used to perform optimal circle fitting on the point cloud data. The point cloud data is obtained through the shaft diameter contour point measurement device. Combined with denoising processing and improvement of the bat algorithm, accurate measurement of the measured shaft diameter is achieved.
It improves the accuracy and efficiency of measuring the diameter of the measured shaft, can effectively handle the measurement difficulties of incomplete small arcs, and meet the needs of high-precision detection.
Smart Images

Figure CN120593687B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of shaft diameter measurement, in particular to a shaft diameter measurement method. BACKGROUND
[0002] With the rapid development of rail transportation industry in China, the processing quality requirements of the measured shaft of the motor train are increasingly improved, not only to ensure the reliability of the internal structure, but also to strictly control the shape, size and appearance precision. The measured shaft processing precision (especially the shape and position tolerance and length error) is a key indicator to measure the production process level, which directly affects the assembly quality and operation safety.
[0003] In recent years, non-contact measurement technology (such as laser scanning, light curtain visual detection and laser ranging sensor) has been gradually applied to the measured shaft detection field, and the automatic measurement of cross-sectional shape and size has been realized. However, due to the limitation of the measurement range of the sensor, the effective point cloud data of the measured shaft cross-sectional profile is often less (30°<central angle<90°), and such non-complete small arc becomes a detection difficulty due to the lack of available information and high measurement difficulty.
[0004] Although the existing circle fitting method (such as Kasa algorithm, point cloud prediction algorithm and improved algorithm based on least square method) can realize short arc fitting, there are still limitations in practical application due to the sensitivity of sampling points or the introduction of non-real data points. SUMMARY
[0005] Therefore, the present application aims to provide a shaft diameter measurement method, which uses a bat algorithm with a boundary rule limiting the position of the bat to fit the cross-sectional information of the measured shaft and complete the measurement of the diameter of the measured shaft.
[0006] To achieve the above purpose, the technical scheme of the present application is as follows: a shaft diameter measurement method, comprising the following steps:
[0007] S1: using a shaft diameter profile point measurement device to measure the measured shaft to obtain point cloud data of the cross-sectional profile of the measured shaft.
[0008] S2: denoising the obtained point cloud data.
[0009] S3: using an improved bat algorithm with a boundary rule limiting the position of the bat to perform optimal circle fitting on the denoised point cloud data of step S2 to realize the measurement of the diameter of the measured shaft.
[0010] Further, step S3 comprises the following steps:
[0011] S31: initializing the parameters of the bat algorithm, including: population size, maximum iteration number, objective function F(X i) , and the initial position of each bat individual X i , initial position change V i , initial sound loudness A i and initial frequency f i .
[0012] S32: By introducing the variable speed inertia weight factor correction coefficient, the frequency, position change and position of the individual bat.
[0013] S33: Setting boundary rules for the updated bat positions to ensure that the bat positions are within the set boundary range.
[0014] S34: Based on the boundary range of step S33, a global search is performed on all bats, and multiple solutions are obtained using the objective function of step S31. All solutions are then compared to obtain the optimal solution.
[0015] S35: Update the bat to the next iteration state and repeat steps S32 to S34 until the termination condition is met, and output the optimal circle parameter solution.
[0016] Furthermore, the objective function of step S32 is:
[0017] ;
[0018] in, and is the coordinate of the i-th collected point cloud; 、 To find the coordinates of the center of the circle, is the substitution radius.
[0019] Furthermore, the calculation formula of the speed change inertia weight factor in step S33 is:
[0020] ;
[0021] in, is the speed change inertia weight factor, w max and w min are the maximum speed change inertia weight factor and the minimum speed change inertia weight factor respectively; t is the current iteration number; Tmax is the maximum iteration number; is the coefficient of the rate of change of the speed-changing inertia weight, .
[0022] The frequency update formula of individual bats is:
[0023] ;
[0024] in, f(i) is the updated frequency, f(i) max is the maximum frequency of the sound emitted by an individual bat, f(i) min The minimum frequency of the sound, β is a random variable, .
[0025] Introducing the variable speed inertia weight factor, the bat's position change formula is as follows:
[0026] ;
[0027] in, represents the change in the flight position of the i-th bat in the current iteration, f(i) is the current sound loudness of the i-th bat, is the last flight position of the i-th bat, is the last position of the i-th bat, It represents the optimal position of the current bat.
[0028] The position update formula of individual bats:
[0029] = + ; in, Indicates the current position of the i-th bat.
[0030] Furthermore, the shaft diameter contour point measuring device includes a mobile detection mechanism and a measuring system; the mobile detection mechanism includes three first sensors, a second sensor and a third sensor for obtaining the cross-sectional contour point cloud data of the measured shaft, and the second sensor is located between the first sensor and the third sensor; the measuring system processes the shaft diameter contour point cloud data and calculates the diameter of the measured shaft based on the point cloud fitting algorithm.
[0031] Furthermore, the boundary rules are set as follows:
[0032] ;
[0033] ;
[0034] ;
[0035] in, is the horizontal coordinate value of the boundary, is the vertical coordinate of the boundary, is the diameter of the boundary; is the abscissa value generated when the first sensor measures the axis profile, It is the abscissa value generated when the third sensor measures the shaft profile; is the ordinate value generated when the first sensor measures the axis profile, The ordinate value generated when the third sensor measures the shaft profile; It is the theoretical machining tolerance value of the measured section.
[0036] Furthermore, step S35 includes, based on the reasonable range of step S34, performing a global search on all bats, placing bats outside the boundary range into the boundary range, and making all bats fly within the boundary range; using the objective function to calculate the position of all bats after flight. Solve and get corresponding multiple new solutions ; Compare all new solutions with each other, and the maximum value among all new solutions is recorded as the optimal solution.
[0037] Furthermore, step S2 includes the following steps:
[0038] S21: For any sampling point in the point cloud data, a k-neighborhood is established through KD-tree, and the average distance between the sampling point and the k neighboring points is calculated. If the distance is within the preset range, the point is retained; otherwise, it is determined to be an outlier noise point and removed;
[0039] ;
[0040] in, represents the average distance between the sampling point and its k neighboring points, d i represents the distance from the sampling point to the i-th neighboring point, and k represents the number of neighboring points.
[0041] S23: Calculate the standard deviation of the distances between k neighboring points;
[0042] ;
[0043] Among them, σ represents the standard deviation of the distance between k neighboring points, μ is the number of point clouds, and d j Represents the distance from the jth point to its neighboring points.
[0044] S24: Set the threshold value n of the standard deviation multiple and calculate the standard range;
[0045] ;
[0046] in, For the standard range.
[0047] S25: Determine the average distance between each point and its neighboring points and the size of the standard range. If it is greater than the threshold, it is considered an outlier and removed, otherwise it is retained.
[0048] Furthermore, the shaft diameter contour point measuring device also includes: a shell, a driving mechanism, a transmission mechanism, a positioning mechanism and a display mechanism; an opening is provided at the bottom of the shell; the transmission mechanism and the mobile detection mechanism are arranged inside the shell; the driving mechanism includes a driving part provided outside the shell and a transmission part extending into the shell, and the transmission part is connected to the input end of the transmission mechanism; the output end of the transmission mechanism is connected to the mobile detection mechanism; the positioning mechanism is connected to the shell and is located on the opening side of the shell, and is used to guide the measured shaft to achieve radial positioning; the display mechanism is arranged on the upper surface of the shell and is electrically connected to the mobile detection mechanism; the driving part drives the transmission mechanism to rotate through the transmission part, driving the mobile detection mechanism to perform reciprocating motion, and the mobile detection mechanism obtains the diameter contour point cloud data of the measured shaft in real time; the measurement system denoises the cross-sectional contour point cloud data of the measured shaft, and calculates the diameter of the measured shaft based on the point cloud fitting algorithm; and finally the display mechanism outputs the measurement result of the diameter of the measured shaft.
[0049] The invention can achieve the following beneficial effects: a measuring device is used to measure the contour points of the measured shaft diameter, denoising is performed through filtering, and then an optimal circle fitting is performed on the point cloud data by using a bat algorithm with added boundary rules for limiting the bat position, thereby realizing the measurement of the measured shaft diameter. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings, which constitute part of the present invention, are intended to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are intended to explain the present invention and do not constitute an undue limitation of the present invention. In the accompanying drawings:
[0051] Ai is a flow chart of a shaft diameter measurement method provided by an embodiment of the present invention;
[0052] Figure 1 2. It is a schematic structural diagram of a portable shaft diameter profile point measuring device and a shaft to be measured provided in accordance with an embodiment of the present invention;
[0053] Figure 2 This is a schematic structural diagram of a portable shaft diameter profile point measuring device provided by an embodiment of the present invention with one side of the housing removed;
[0054] Figure 3 2 is a schematic diagram of a structure in which a driving mechanism and a transmission mechanism provided in an embodiment of the present invention are respectively installed on a first mounting plate and a second mounting plate;
[0055] Figure 4 is a structural schematic diagram of a driving mechanism and a transmission mechanism provided according to an embodiment of the present invention;
[0056] Figure 5 is a structural schematic diagram of a movement detection mechanism provided according to an embodiment of the present application;
[0057] Figure 6 is a structural schematic diagram of a positioning mechanism provided according to an embodiment of the present application;
[0058] Figure 7 is a structural schematic diagram of a cross-sectional profile of a measured shaft provided according to an embodiment of the present application;
[0059] Figure 8 is a point cloud schematic diagram of a measured shaft profile wave front provided according to an embodiment of the present application;
[0060] Figure 9 is a point cloud schematic diagram of a measured shaft profile wave front provided according to an embodiment of the present application;
[0061] Figure 10 is a schematic diagram of initializing the position of a bat provided according to an embodiment of the present application;
[0062] Figure 11 is a schematic diagram of an optimal solution after global search provided according to an embodiment of the present application.
[0063] The reference signs include: 1, a housing; 11, a first mounting plate; 12, a second mounting plate; 2, a driving mechanism; 21, a motor; 22, a worm; 3, a transmission mechanism; 31, a worm wheel; 32, a first gear; 33, a second gear; 34, a rack; 35, a first connecting shaft; 36, a first sector gear; 37, a second sector gear; 38, a second connecting shaft; 4, a movement detection mechanism; 41, a linear guide rail; 42, a connecting plate; 43, a sensor; 5, a positioning mechanism; 51, a positioning mounting plate; 52, a positioning plate; 6, a display mechanism; 61, a mounting frame; 62, a display screen; 63, a handle; 7, a measured shaft. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application is further described in detail below with reference to the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and do not constitute a limitation on the present application.
[0065] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0066] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second" and the like are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, features defined as "first", "second" and the like may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0067] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "installed," "connected," and "connected" should be understood in a broad sense. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to internal connections between two components. Those skilled in the art can understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0068] The present invention will be described in detail below with reference to the embodiments.
[0069] like Figure 12 As shown, an embodiment of the present invention provides a shaft diameter measurement method, comprising the following steps:
[0070] S1: Use the shaft diameter contour point measuring device to measure the shaft to be measured and obtain the point cloud data of the cross-sectional contour of the shaft to be measured, such as Figures 1 to 12 shown.
[0071] Specifically, such as Figure 9 As shown, the shaft diameter profile point measuring device includes: a housing 1, a driving mechanism 2, a transmission mechanism 3, a movement detection mechanism 4, a positioning mechanism 5, a display mechanism 6 and a control system.
[0072] The housing 1 is used to install the driving mechanism 2, the transmission mechanism 3, the movement detection mechanism 4, the positioning mechanism 5 and the display mechanism 6. The bottom of the housing 1 is provided with an opening, and a first mounting plate 11 and a second mounting plate 12 are provided in the housing 1 at intervals.
[0073] The transmission mechanism 3 and the movement detection mechanism 4 are arranged inside the housing 1. The transmission mechanism 3 is connected to the first mounting plate 11 and the second mounting plate 12, and the movement detection mechanism 4 is connected to the second mounting plate 12. The housing 1 protects the transmission mechanism 3 and the movement detection mechanism 4.
[0074] Drive mechanism 2 includes a drive portion located outside housing 1 and a transmission portion extending into housing 1. The transmission portion is connected to the input of transmission mechanism 3. The output of transmission mechanism 3 is connected to movement detection mechanism 4. Positioning mechanism 5 is connected to housing 1 and located on the open side of housing 1. It is used to guide the measured shaft 7 for radial positioning. Display mechanism 6 is provided on the upper surface of housing 1 and is electrically connected to movement detection mechanism 4.
[0075] The drive unit rotates the transmission mechanism 3 through the transmission unit, driving the mobile detection mechanism 4 in reciprocating motion. The mobile detection mechanism 4 acquires real-time point cloud data of the cross-sectional profile of the measured shaft 7. The measurement system denoises this point cloud data and calculates the shaft's diameter using a point cloud fitting algorithm. The display mechanism 6 ultimately outputs the shaft's diameter measurement result.
[0076] The drive mechanism 2 comprises a motor 21 as the driving portion and a worm 22 as the transmission portion. The output shaft of the motor 21 is connected to one end of the worm 22 via a coupling. The other end of the worm 22 is rotatably connected to the first mounting plate 11 via a bearing and a fixed block. The fixed end of the motor 21 is connected to the housing 1 via a mounting base.
[0077] The transmission mechanism 3 includes a worm gear 31, a first gear 32, a second gear 33, and a rack 34. The worm gear 31, serving as the input of the transmission mechanism 3, meshes with the worm 22. The first gear 32 and the worm gear 31 are connected via a first connecting shaft 35, and the first gear 32 and the second gear 33 mesh with each other. A first sector gear 36 is provided on the first gear 32, and a second sector gear 37 is provided on the second gear 33. The first sector gear 36 and the second sector gear 37 are arranged opposite each other, and the rack 34 meshes with either the first sector gear 36 or the second sector gear 37. The first sector gear 36 and the second sector gear 37 constitute the output of the transmission mechanism 3. Through meshing with the rack 34, they drive the mobile detection mechanism 4 to achieve reciprocating linear motion.
[0078] Specifically, the worm 22 and worm wheel 31 are disposed between the first mounting plate 11 and the second mounting plate 12. The first gear 32, the second gear 33, and the rack 34 are disposed outside the second mounting plate, with the rack 34 mounted on the second mounting plate 12. One end of a first connecting shaft 35 passes through the worm wheel 31 and is rotatably connected to the first mounting plate 11 via a bearing. The other end of the first connecting shaft 35 passes through the second mounting plate 12 and is connected to the first gear 32, and is rotatably connected to the second mounting plate 12 via a bearing.
[0079] The second gear 33 is rotatably connected to the second connecting shaft 38 via a bearing. The second connecting shaft 38 is connected to the first mounting plate 11 and the second mounting plate 12 respectively.
[0080] The transmission mechanism 3 is integrated into a compact space and rationally arranged using the first mounting plate 11 and the second mounting plate 12, making the entire transmission mechanism 3 small and compact, suitable for use in limited spaces. The multi-stage reduction of the worm gear and gear drive enables a large reduction ratio, thereby outputting a large torque with a small input torque, meeting application scenarios with high torque requirements. The first sector gear 36 and the second sector gear 37 are arranged in opposite directions, and the rack 34 can mesh with the first sector gear 36 or the second sector gear 37. This design provides flexible motion control. Different motion directions can be achieved by selecting different sector gears.
[0081] The motion detection mechanism 4 includes a linear guide 41, a connecting plate 42, and multiple sensors 43. The linear guide 41 is connected to the second mounting plate 12 and is located below the rack 34. The connecting plate 42 is connected to the slider of the linear guide 41 and the rack 34. Multiple sensors 43 are mounted on the connecting plate 42 to obtain point cloud data of the measured axis interface contour.
[0082] There are three sensors 43: a first sensor, a second sensor, and a third sensor. These sensors 43 are not aligned in a straight line. The second sensor is located between the first and third sensors. This layout enables the three sensors 43 to collect data at different ranges, thus covering a wider area. This allows for comprehensive acquisition of 180° cross-sectional data, significantly improving detection accuracy.
[0083] In this embodiment, the first, second, and third sensors are arranged in a herringbone configuration. This arrangement enables the sensors 43, driven by the transmission mechanism 3, to acquire contour point cloud data for half of the circle of the measured shaft 7, thereby satisfying the contour point acquisition requirement. In another embodiment, the measured shaft 7 is flipped 180°, and the contour point cloud data for the other half of the circle is measured, thereby acquiring contour point cloud data for the entire cross-section of the measured shaft 7.
[0084] The positioning mechanism 5 includes a positioning mounting plate 51 and two positioning plates 52 mounted on it. The positioning mounting plate 51 is attached to the bottom surfaces of the first mounting plate 11 and the second mounting plate 12, and is connected to each other. The two positioning plates 52 have inclined surfaces on their opposing sides, forming a tapered space that guides the measured shaft 7 for automatic centering. This tapered space accommodates measured shafts 7 of varying diameters, enabling precise positioning.
[0085] The display mechanism 6 includes a mounting frame 61, a display screen 62, and two handles 63. The mounting frame 61 is connected to the upper surface of the housing 1. The display screen 62 and the handles 63 are both arranged on the mounting frame 61. The two handles 63 are located on both sides of the display screen 62. The handles 63 are convenient for staff to operate.
[0086] S2: The measurement system performs denoising on the acquired point cloud data. Figures 2 to 7 The denoising process includes the following steps:
[0087] S21: The measurement system establishes a k-neighborhood for any sampling point in the point cloud data through a KD-tree (k-dimensional tree), and calculates the average distance between the sampling point and the k neighboring points. If the distance is within a preset range, the point is retained; otherwise, it is determined to be an outlier noise point and removed. In this embodiment, the preset range is 1 / 2 of the accuracy error of the sensor 43.
[0088] ;
[0089] in, represents the average distance between the sampling point and its k neighboring points, d i represents the distance from the sampling point to the i-th neighboring point, and k represents the number of neighboring points. The larger the k value, the more distances need to be calculated for each point cloud. k is set according to the actual situation. In this embodiment, k=10.
[0090] S23: Calculate the standard deviation of the distances between k neighboring points;
[0091] ;
[0092] Among them, σ represents the standard deviation of the distance between k neighboring points, μ is the number of point clouds, and d j Represents the distance from the jth point to its neighboring points;
[0093] S24: Set the threshold value n of the standard deviation multiple and calculate the standard range;
[0094] ;
[0095] in, is the maximum value of the standard range; n is the threshold value, which can be set by yourself. The larger the setting, the more points are left. In this embodiment, n=2.
[0096] S25: Determine the average distance between each point and its neighboring points and the size of the standard range. If the average distance is greater than , it is considered to be an outlier and removed, otherwise it is retained.
[0097] S3: Use the bat algorithm with added boundary rules to limit the bat position to perform optimal circle fitting on the point cloud data after denoising in step S2 to measure the diameter of the measured shaft. Figure 10 、 Figure 11 The measurement of the shaft diameter includes the following steps:
[0098] S31: Initialize bat algorithm parameters, including: population size, maximum number of iterations, objective function Figure 12 i ) , and the location of each bat individual X i , position change V i , sound loudness A i and frequency f i ;
[0099] ;
[0100] in, and is the coordinate of the i-th collected point cloud; 、 To find the coordinates of the center of the circle, is the substitution radius.
[0101] S32: By introducing the variable speed inertia weight factor correction coefficient, the frequency, position change and position of the individual bat, the global search capability and convergence speed of the algorithm are improved.
[0102] Specifically, the position and position change of bat i at time t-1 are expressed as and , the optimal position currently found by the group is The bat then searches for prey based on the different sounds it makes, and adjusts its position and flight speed by receiving feedback information.
[0103] In order to prevent the bat algorithm from falling into the local extreme value moment at the end of the optimization stage, the variable speed inertia weight factor correction coefficient is used to avoid the dilemma of local extreme value as much as possible, thereby achieving the effect of global optimization.
[0104] The calculation formula of the speed change inertia weight factor is:
[0105] ;
[0106] in, is the speed change inertia weight factor. max and w minare the maximum speed change inertia weight factor and the minimum speed change inertia weight factor, respectively. t is the current iteration number. Tmax is the maximum iteration number. is the coefficient of the rate of change of the speed-changing inertia weight, .
[0107] The frequency update formula of individual bats is:
[0108] ;
[0109] in, F(X is the updated frequency, f(i) max is the maximum frequency of the sound emitted by an individual bat, f(i) f(i) f(i) min The minimum frequency of the sound, β is a random variable, .
[0110] The formula for the bat's position change after introducing the speed-varying inertia weight factor is as follows:
[0111] ;
[0112] in, represents the speed of the i-th bat in the current iteration, Ai is the loudness of the i-th bat's sound at the current iteration, is the last flight speed of the i-th bat, is the last position of the i-th bat, is the optimal position of the bat.
[0113] When the operation starts, the bat individual Random frequency allocation, its position update formula is:
[0114] = + ; in, Indicates the current position of the i-th bat.
[0115] S34: setting boundary rules based on the bat positions updated in step S33 so that the bat positions are within the boundary range;
[0116] Set the boundary rules to:
[0117] ;
[0118] ;
[0119] ;
[0120] in, is the horizontal coordinate value of the boundary, is the vertical coordinate of the boundary, is the diameter of the boundary; is the abscissa value generated when the first sensor measures the axis profile, It is the abscissa value generated when the third sensor measures the shaft profile; is the ordinate value generated when the first sensor measures the axis profile, The ordinate value generated when the third sensor measures the shaft profile; is the theoretical machining tolerance value of the measured section.
[0121] S35: Based on the boundary range of step S34, a global search is performed on all bats, multiple solutions are obtained using the objective function of step S32, and then all solutions are searched to obtain the optimal solution.
[0122] Specifically, based on the reasonable range of step S34, a global search is performed on all bats, and bats outside the boundary range are placed within the boundary range so that all bats fly within the boundary range; the position of all bats after flight is calculated using the objective function. Solve and get corresponding multiple new solutions ; Compare all new solutions with each other, and the maximum value among all new solutions is recorded as the optimal solution.
[0123] S36: All bats move toward the next moment and repeat steps S33 to S35 until the termination condition is met, and the optimal circle parameter solution is output.
[0124] The termination condition is: when a certain number of iterations is reached or the optimal solution converges. In this embodiment, the number of iterations is 1000. After completing 1000 iterations, the bat stops flying and the current optimal solution is the optimal circle parameter solution.
[0125] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A method for measuring shaft diameter, characterized in that: The steps include: S1: Use the shaft diameter profile point measuring device to measure the shaft to be measured and obtain point cloud data of the cross-sectional profile of the shaft to be measured; S2: De-noising of the acquired point cloud data; S3: Using the improved bat algorithm with added boundary rules to restrict the bat position, the point cloud data after denoising in step S2 is subjected to optimal circle fitting to measure the diameter of the measured shaft; S31: Initialize bat algorithm parameters, including: population size, maximum number of iterations, objective function F(X i ) , and the initial position of each bat individual X i , initial position change V i , initial sound loudness A i and initial frequency f i ; S32: Dynamically update the frequency, position change, and position of the individual bat by introducing a speed-varying inertia weight factor correction coefficient; the speed-varying inertia weight factor is calculated as follows: ; in, is the speed change inertia weight factor, w max and w min are the maximum speed change inertia weight factor and the minimum speed change inertia weight factor respectively; t is the current iteration number; Tmax is the maximum iteration number; is the coefficient of the rate of change of the speed-changing inertia weight, ; The frequency update formula of individual bats is: ; in, f(i) is the updated frequency, f(i) max is the maximum frequency of the sound emitted by an individual bat, f(i) min The minimum frequency of the sound, β is a random variable, ; Introducing the variable speed inertia weight factor, the bat's position change formula is as follows: ; in, represents the change in the flight position of the i-th bat in the current iteration, Ai is the current sound loudness of the i-th bat, is the last flight position of the i-th bat, is the last position of the i-th bat, It represents the optimal position of the current bat; The position update formula of individual bats: = + ; in, Indicates the current position of the i-th bat; S33: setting boundary rules for the updated bat positions to ensure that the bat positions are within the set boundary range; S34: Based on the boundary range of step S33, a global search is performed on all bats, multiple solutions are obtained using the objective function of step S31, and then all solutions are compared to obtain the optimal solution; S35: Update the bat to the next iteration state and repeat steps S32 to S34 until the termination condition is met, and output the optimal circle parameter solution.
2. The shaft diameter measuring method according to claim 1, characterized in that: The objective function of step S31 is: ; in, and is the coordinate of the i-th collected point cloud; 、 To find the coordinates of the center of the circle, is the substitution radius.
3. The shaft diameter measuring method according to claim 1, characterized in that: The shaft diameter contour point measuring device includes a mobile detection mechanism and a measuring system; the mobile detection mechanism includes three first sensors, a second sensor and a third sensor for obtaining the cross-sectional contour point cloud data of the measured shaft, and the second sensor is located between the first sensor and the third sensor; the measuring system uses an improved bat algorithm to process the shaft diameter contour point cloud data to obtain the diameter of the measured shaft.
4. The shaft diameter measuring method according to claim 3, characterized in that: Set the boundary rules to: ; ; ; in, is the horizontal coordinate value of the boundary, is the vertical coordinate of the boundary, is the diameter of the boundary; To improve the horizontal coordinate value generated by the bat algorithm when measuring the axis contour, It is the abscissa value generated when the third sensor measures the shaft profile; is the ordinate value generated when the first sensor measures the axis profile, The ordinate value generated when the third sensor measures the shaft profile; It is the theoretical machining tolerance value of the measured section.
5. The shaft diameter measuring method according to claim 1, characterized in that: Step S35 includes, based on the boundary range of step S34, performing a global search on all bats, placing bats outside the boundary range into the boundary range, and making all bats fly within the boundary range; using the objective function to calculate the position of all bats after flight. Solve and get corresponding multiple new solutions ; Compare all new solutions with each other, and the maximum value among all new solutions is recorded as the optimal solution.
6. The shaft diameter measuring method according to claim 1, characterized in that: Step S2 includes the following steps: S21: For any sampling point in the point cloud data, a k-neighborhood is established through KD-tree, and the average distance between the sampling point and the k neighboring points is calculated. If the distance is within the preset range, the point is retained; otherwise, it is determined to be an outlier noise point and removed; ; in, represents the average distance between the sampling point and its k neighboring points, d i represents the distance from the sampling point to the i-th neighboring point, and k represents the number of neighboring points; S23: Calculate the standard deviation of the distances between k neighboring points; ; Among them, σ represents the standard deviation of the distance between k neighboring points, μ is the number of point clouds, and d j Represents the distance from the jth point to its neighboring points; S24: Set the threshold value n of the standard deviation multiple and calculate the standard range; ; in, is the standard range; S25: Determine the average distance between each point and its neighboring points and the size of the standard range. If it is greater than the threshold, it is considered an outlier and removed. Otherwise, it is retained.
7. The shaft diameter measuring method according to claim 3, characterized in that: The shaft diameter profile point measuring device further comprises: a housing, a driving mechanism, a transmission mechanism, a positioning mechanism and a display mechanism; The bottom of the housing is provided with an opening; the transmission mechanism and the movement detection mechanism are provided inside the housing; The driving mechanism includes a driving portion provided outside the housing and a transmission portion extending into the housing, wherein the transmission portion is connected to an input end of the transmission mechanism; and an output end of the transmission mechanism is connected to the movement detection mechanism; The positioning mechanism is connected to the housing and is located on the opening side of the housing, and is used to guide the measured shaft to achieve radial positioning; The display mechanism is arranged on the upper surface of the housing and is electrically connected to the movement detection mechanism; The driving unit drives the transmission mechanism to rotate through the transmission unit, driving the mobile detection mechanism to perform reciprocating motion, and the mobile detection mechanism obtains the cross-sectional profile point cloud data of the measured shaft in real time; the measurement system denoises the cross-sectional profile point cloud data of the measured shaft, and calculates the diameter of the measured shaft based on the point cloud fitting algorithm; and finally, the display mechanism outputs the measurement result of the diameter of the measured shaft.
Citation Information
Patent Citations
Complex twisted blade profile self-adaptive reconstruction method
CN112446102A
Lockset stamping part cylindricity evaluation method based on quantum bat optimization point cloud target
CN114757324A