Lockset stamping part cylindricity evaluation method based on quantum bat optimization point cloud target

The improved quantum bat optimization algorithm is used to evaluate the cylindricity error of lock stamping parts, which solves the problems of low detection efficiency and insufficient accuracy in the existing technology, realizes fast and accurate cylindricity evaluation, and improves the automation level of industrial production.

CN114757324BActive Publication Date: 2025-11-18FUZHOU SHENGYU DOOR CONTROL INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210426109.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-22
Publication Date
2025-11-18
Estimated Expiration
2042-04-22

AI Technical Summary

Technical Problem

Existing technologies for evaluating the cylindricity of lock stampings suffer from low detection efficiency, insufficient accuracy, and significant influence of feature selection on the alignment process, making it difficult to meet modern industrial measurement standards.

Method used

An improved quantum bat optimization algorithm is adopted to acquire point cloud data through 3D laser scanning, use bilateral filtering to remove noise, construct the point cloud objective function of the cylindricity error evaluation model, and introduce quantum non-rotating gate to realize the quantum position variation of poor individuals, thereby optimizing the cylindricity error evaluation.

Benefits of technology

It achieves fast and accurate cylindricity evaluation, improves production efficiency and automation, avoids premature convergence of the algorithm, and enhances the ability to search for the global optimum.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114757324B_ABST
    Figure CN114757324B_ABST
Patent Text Reader

Abstract

The application provides a lock stamping part cylindricity evaluation method based on quantum bat optimization of a point cloud target, acquires three-dimensional point cloud data of the lock stamping part, removes point cloud noise by using a bilateral filtering method, constructs a point cloud objective function of a cylindricity error evaluation model according to a minimum region principle, improves a speed and position updating strategy of a quantum bat algorithm, and introduces a quantum non-transformation gate to realize quantum position mutation of a poor individual, applies the improved quantum bat algorithm to optimization of the point cloud objective function, acquires optimal cylindricity error, and evaluates the cylindricity according to a set error threshold value. The application improves the quantum bat optimization algorithm, applies the quantum bat optimization algorithm to optimization of the point cloud objective function of the cylindricity error evaluation model, quickly performs cylindricity error evaluation, realizes relatively accurate and fast cylindricity evaluation, and further improves the efficiency and automation degree of actual production work.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of lock stamping manufacturing technology, and in particular to a method for evaluating the cylindricity of lock stampings based on quantum bat-optimized point cloud targets. Background Technology

[0002] Lock stamping parts are made of metal materials and processed by stamping equipment. After casting, the cylindrical surfaces of these stamping parts are prone to defects such as eccentricity and deformation, resulting in errors in the cylindricity of the cylindrical surfaces. These problems affect subsequent processing and use. Therefore, to further improve the quality of subsequent production and processing of lock stamping parts, it is necessary to first evaluate the cylindricity of the cylindrical surfaces. With the development of artificial intelligence and 3D laser scanning technology, 3D reconstruction technology is gradually replacing manual labor and is widely used in defect detection and error assessment of industrial parts, greatly improving detection accuracy and efficiency. Traditional detection methods rely on manual inspection, using relevant instruments and following a strict engineering sequence for manual measurement. This method is not only easily affected by the subjective judgment of the measuring personnel, but also slow, wastes human resources, and is susceptible to interference from external factors. It is gradually failing to meet the needs of intelligent industrial production systems and increasingly sophisticated parts quality evaluation technologies. With the rapid development of 3D data measurement technology, error detection of stamping parts based on 3D laser scanning technology has become a research focus in intelligent manufacturing.

[0003] With the continuous development of 3D laser scanning technology, the features of parts have become increasingly complex, and traditional methods for evaluating the cylindricity error of parts can no longer meet modern industrial measurement standards. Therefore, many scholars have begun to use 3D scanning technology to evaluate the cylindricity error of parts. These methods first perform 3D laser scanning on the part to obtain its 3D point cloud data. Then, feature alignment is used to align the point cloud model with the CAD model. Finally, methods such as minimum containment, rotational encirclement, and the minimum area principle are used to establish a cylindricity error evaluation model for the part. These methods significantly improve the detection efficiency and accuracy compared to traditional methods. However, the error of the feature alignment method for aligning the point cloud model with the CAD model is greatly affected by feature selection, and the cylindricity evaluation of different parts requires alignment with the original CAD model, reducing the efficiency of real-time on-site inspection. Furthermore, the accuracy of the error evaluation models established using methods such as minimum containment, rotational encirclement, and the minimum area principle needs further improvement. Summary of the Invention

[0004] This invention addresses the shortcomings and deficiencies of existing technologies by proposing a method for evaluating the cylindricity of lock stamping parts based on quantum bat optimization of point cloud targets. First, the lock stamping parts are subjected to 3D laser scanning to acquire 3D point cloud data, and point cloud noise is removed using a bilateral filtering method. Second, a point cloud objective function for the cylindricity error evaluation model is constructed based on the minimum region principle. Then, a nonlinear adaptive rotation angle quantum rotating door update strategy is constructed to improve the speed and position update of the quantum bat algorithm, and a quantum non-rotating door is introduced to realize the quantum position mutation of poorer individuals. Finally, the improved quantum bat algorithm is applied to optimize the point cloud objective function to obtain the optimal cylindricity error, and the cylindricity is evaluated according to a set error threshold. This invention optimizes the point cloud objective function of the cylindricity error evaluation model using an improved quantum bat optimization algorithm, enabling rapid cylindricity error evaluation and achieving more accurate and faster cylindricity assessment, further improving the efficiency and automation of actual production work.

[0005] The present invention specifically adopts the following technical solution:

[0006] A method for evaluating the cylindricity of lock stamping parts based on quantum bat optimization of point cloud targets is characterized by: using an improved quantum bat algorithm to optimize the parameters a, b, q, p of the point cloud objective function for evaluating the cylindricity error of the lock stamping parts, so that the point cloud objective function f(a,b,p,q) reaches its minimum, at which point the objective value is the cylindricity error of the cylinder of the lock stamping parts, and evaluating the cylindricity of the lock stamping parts according to the set error threshold;

[0007] The improved quantum bat algorithm is specifically as follows:

[0008] (1) Initialize the quantum bat population

[0009] By combining quantum evolution theory and the localization mechanism of the traditional bat algorithm, a quantum encoding method is introduced to initialize the bat population, setting it to n quantum bats. The quantum velocity of the i-th quantum bat in t iterations is:

[0010]

[0011] in, and Let D be the two probability amplitudes of the qubit, and D be the number of qubits; the quantum position of the i-th quantum bat in iteration t is:

[0012]

[0013] in, and Let D be the two probability amplitudes of the qubit, and D be the number of qubits.

[0014] (2) Frequency, speed and position updates of quantum bats

[0015] The bat frequency update formula is:

[0016]

[0017] Among them, f max with f min These are the upper and lower limits of the frequency, u i It is a uniformly distributed random number in the range [-1, 1]; the velocity qubits of individual bats are updated using a quantum rotation gate, and the update formula is:

[0018]

[0019] For the rotation angle updated in this quantum rotation, a nonlinear adaptive rotation angle is used to improve the performance of the quantum bat algorithm, as shown in equation (9):

[0020]

[0021] in, Let f(x) be the probability amplitude corresponding to a certain qubit of the current optimal bat. Let -sgn(H) represent the probability amplitude corresponding to a certain qubit of the current bat. i ) is used to control the direction of rotation, θ0 is the basic rotation angle, θ0 takes the value of 0.1π, λ∈(0,2), and the magnitude of λ is controlled to dynamically and adaptively control the magnitude of the rotation angle; The offset of the rotation angle is Δθ, which takes the value of 0.01π. The offset becomes smaller and smaller as the number of iterations increases.

[0022] Based on the results of updating the velocity qubits of individual bats using a quantum rotation gate, the positions of individual bats are updated as shown in Equation (10), and fitness is calculated:

[0023]

[0024] (3) Local adjustment of quantum bat position

[0025] Then a local search is performed, with a random number rand. <r i If necessary, local position adjustments will be made:

[0026]

[0027]

[0028] In the formula, U is a uniformly random number in the range [-1, 1], and A is the loudness. Fitness is calculated after local position adjustment. The adaptability of the location is better than The fitness is then used replace Otherwise, keep the original constant;

[0029] (4) Poor individual variation

[0030] To increase population diversity, a quantum NOT gate is introduced to perform quantum position mutation on poorer individuals, avoiding premature convergence of the algorithm. Bat individuals with fitness in the bottom third are subjected to the quantum NOT gate mutation operation, which is as follows:

[0031]

[0032] That is, the probability amplitude a of each dimension in a quantum individual. i With b i To exchange, among which The probability amplitude before mutation. The probability amplitude of the mutation;

[0033] (5) Pulse frequency and loudness update

[0034]

[0035]

[0036] in, and Let r represent the echo loudness of the t-th generation and the (t+1)-th generation, respectively. i t+1 r represents the pulse frequency of generation t+1. i 0 Let α be the maximum pulse frequency, and let γ be constants, where α and γ ∈ (0,1). At the beginning of the search, a larger loudness and a lower frequency are used for the search to facilitate large-scale search. After the target is found, a larger pulse rate and a smaller loudness are used to find the accurate location.

[0037] Furthermore, an improved quantum bat algorithm is used to optimize the parameters a, b, q, p of the cylindricity error evaluation model, minimizing the objective function f(a, b, p, q). The objective value at this point represents the cylindricity error of the cylinder. The cylindricity is then evaluated based on a set error threshold, specifically including the following steps:

[0038] Step S1: Use a handheld 3D laser scanner to scan the 3D point cloud data of the lock stamping parts, and use bilateral filtering to smooth the point cloud data;

[0039] Step S2: Establish a cylindricity error assessment model and construct a three-dimensional point cloud objective function f(a,b,p,q) for cylindricity error assessment, where a,b,q,p are input parameters;

[0040] Step S3: Encode a, b, q, p using the improved quantum bat algorithm, and initialize the quantum bat population and parameters: n, D, f. max f min u i ,θ0,Δθ,λ,r i 0 α, γ, A0, maximum number of iterations T, and calculate the fitness of initial cylindricity error;

[0041] Step S4: First, update the frequency of the quantum bat using Equation (7), then update the velocity qubit of the individual bat using the nonlinear adaptive rotation angle of Equation (8) and the quantum rotation gate of Equation (9). Update the position of the individual bat according to the update result of the velocity qubit, as shown in Equation (10), and calculate the fitness.

[0042] Step S5: Then perform a local search, setting a random number rand, and when rand... <r i If the local position is adjusted according to equations (11) and (12), then the fitness is calculated after the local position adjustment. The adaptability of the location is better than The fitness is then used replace Otherwise, keep the original constant;

[0043] Step S6: Introduce a quantum NOT gate to achieve quantum position mutation of poor individuals. Perform quantum NOT gate mutation operation on bat individuals with fitness in the second-to-last third through equation (13);

[0044] Step S7: Update the pulse frequency and response using equations (14) and (15);

[0045] Step S8: Determine if the maximum number of iterations has been reached. If it has, proceed to step S9; otherwise, proceed to step S4 and continue the loop.

[0046] Step S9: The optimal fitness value of the point cloud objective function, which is the cylindricity error;

[0047] Step S10: Evaluate cylindricity by comparing the cylindricity error with the set error threshold. Cylindricity values ​​less than the threshold are considered acceptable.

[0048] Furthermore, the process of establishing the objective function for the point cloud of cylindricity error evaluation is as follows:

[0049] Cylindricity error is the variable value between the actual cylindrical surface of the lock under test and the ideal standard cylindrical surface. A three-dimensional spatial model is established based on the point cloud data of the cylindrical surface of the lock under test. L is set as the rotation axis of the ideal cylindrical surface. The position of axis L is determined by parameters a and b, and the direction is determined by parameters p and q. At this time, the three-dimensional rectangular coordinate expression of L is as shown in formula (1):

[0050]

[0051] M e (x e ,y e ,z e e = 1, 2, ..., n are considered as the point cloud coordinates on the cylindrical surface of the lock being measured, where n represents the number of point clouds on the cylindrical surface. At this point, the measured point M... e The shortest distance r between the axis of rotation L and the axis of rotation e Calculated by equation (2);

[0052]

[0053] As shown in the above formula, when evaluating the cylindricity of a cylinder, according to the principle of minimum area, the cylinder to be measured is enclosed by two ideal cylindrical surfaces. The minimum enclosed area is then denoted as Z. e The difference radii t between two ideal cylindrical surfaces is the cylindricity error; at this point, the point cloud objective function f(a,b,p,q) is changed from r e and r i To represent, as shown in equation (3):

[0054] f(a,b,p,q)=maxr e -minr i (3)

[0055] Then, substituting formula (2) into (3), we obtain the expression for the point cloud objective function, as shown in (4):

[0056]

[0057] Finally, the optimization parameters a, b, q, p are solved to minimize the point cloud objective function f(a, b, p, q), which is the cylindricity error of the cylinder.

[0058] Compared to existing technologies, this invention and its preferred embodiment acquire three-dimensional point cloud data of lock stamping parts and remove point cloud noise using a bilateral filtering method. Based on the principle of minimum region, a point cloud objective function for a cylindricity error evaluation model is constructed. The speed and position update strategies of the quantum bat algorithm are improved, and a quantum non-rotating gate is introduced to realize the quantum position mutation of poorer individuals. The improved quantum bat algorithm is applied to optimize the point cloud objective function to obtain the optimal cylindricity error, and the cylindricity is evaluated according to a set error threshold. This invention improves the quantum bat optimization algorithm and applies it to optimize the point cloud objective function of the cylindricity error evaluation model, enabling rapid cylindricity error evaluation and achieving more accurate and faster cylindricity assessment, further improving the efficiency and automation of actual production work.

[0059] First, a three-dimensional laser scan is performed on the stamped parts of the lock to acquire three-dimensional point cloud data, and a bilateral filtering method is used to remove point cloud noise. Second, a point cloud objective function for the cylindricity error evaluation model is constructed based on the minimum region principle. Then, a quantum rotating door update strategy with nonlinear adaptive rotation angle is constructed to improve the speed and position update of the quantum bat algorithm, and a quantum non-rotating door is introduced to realize the quantum position mutation of poor individuals. Finally, the improved quantum bat algorithm is applied to optimize the point cloud objective function to obtain the optimal cylindricity error, and the cylindricity is evaluated according to the set error threshold. The improved quantum bat optimization algorithm of this invention improves the global optimal search capability, ensures the convergence speed, avoids getting trapped in local optima, and is applied to optimize the point cloud objective function of the cylindricity error evaluation model, quickly evaluating the cylindricity error and achieving a more accurate and faster cylindricity evaluation, further improving the efficiency and automation of actual production work. Attached Figure Description

[0060] Figure 1 This is a schematic diagram of the cylindricity error evaluation model according to an embodiment of the present invention.

[0061] Figure 2 This is a schematic diagram illustrating the principle of the bat algorithm in an embodiment of the present invention.

[0062] Figure 3 This is a schematic diagram of the cylindricity evaluation process in an embodiment of the present invention.

[0063] Figure 4 This is a schematic diagram comparing the evolution process of various bat algorithms in embodiments of the present invention.

[0064] Figure 5 This is a schematic diagram of the circular lock stamping part and the three-dimensional point cloud model according to an embodiment of the present invention.

[0065] Figure 6 This is a schematic diagram of the three-dimensional point cloud model and cylindricity error detection results of an embodiment of the present invention. Detailed Implementation

[0066] In the following, specific embodiments of this application will be described in detail with reference to the accompanying drawings. Based on these detailed descriptions, those skilled in the art will be able to clearly understand and implement this application. Without departing from the principles of this application, features from various embodiments can be combined to obtain new implementations, or certain features from some embodiments can be substituted to obtain other preferred implementations.

[0067] To make the features and advantages of this patent more apparent and understandable, specific embodiments are provided below for detailed explanation:

[0068] 1. 3D point cloud scanning and noise reduction

[0069] This embodiment uses a handheld 3D laser scanner to scan the 3D point cloud data of the lock stamping part. The handheld 3D laser scanner has advantages such as high scanning accuracy, an integrated point cloud data processing module, and self-positioning, offering significant advantages in reverse modeling and 3D inspection. While the 3D laser scanner can obtain the part's point cloud data, noise interference can occur during the acquisition process due to factors such as the instrument itself, the scanning environment, and the surface medium of the part. This noise will significantly affect the accuracy of subsequent cylindricity error detection; therefore, noise reduction is an indispensable step.

[0070] This embodiment employs bilateral filtering to smooth point cloud data. The bilateral filtering algorithm is primarily used to smooth out small-scale undulations and noise in point cloud data. When applied to denoising 3D point cloud data, bilateral filtering effectively reduces noise on the surface of the 3D spatial model while preserving the geometric features of the point cloud data, preventing it from becoming excessively smoothed.

[0071] 2. Cylindricity Error Evaluation Model Based on Point Cloud Objective Function

[0072] According to the International Organization for Standardization (ISO), cylindricity error is the variable value between the actual cylindrical surface of the component being measured and the ideal standard cylindrical surface.

[0073] like Figure 1 As shown, a three-dimensional rectangular coordinate system is established based on the cylindrical surface of the stamped part of the lock being tested. L is set as the axis of rotation of the ideal cylindrical surface, where the position of axis L is determined by parameters a and b, and the direction of axis L is determined by parameters p and q. At this time, the mathematical expression of axis of rotation L is shown in formula (1).

[0074]

[0075] M e (x e ,ye ,z e e = 1, 2, ..., n are considered as coordinate information points on the measured cylindrical surface, where n represents the number of measured points on the cylindrical surface. In this case, the measured point M... e The shortest distance r between the axis of rotation L and the axis of rotation e Calculated by equation (2).

[0076]

[0077] As shown in the above formula, when evaluating the cylindricity of a cylinder, according to the principle of minimum area, the cylinder to be measured is enclosed by two ideal cylindrical surfaces. The minimum enclosed area is then denoted as Z. e The difference radii t between two ideal cylindrical surfaces is the cylindricity error. At this point, the point cloud objective function f(a,b,p,q) is transformed from r... e and r i It can be represented as shown in equation (3).

[0078] f(a,b,p,q)=max r e -min r i (3)

[0079] Then, substitute formula (2) into (3) to obtain the mathematical expression of the objective function, as shown in (4).

[0080]

[0081] Finally, the optimization parameters a, b, q, p are solved to minimize the objective function f(a, b, p, q), which represents the cylindricity error of the cylinder. This patent improves the quantum bat optimization algorithm and then uses it to optimize the model parameters a, b, q, p to minimize the objective function f(a, b, p, q).

[0082] 3. Improvements to the Quantum Bat Algorithm

[0083] 3.1 Quantum Bat Algorithm

[0084] The main principle of existing bat algorithms is to use echolocation methods, such as... Figure 2 As shown, the bat algorithm utilizes individual bat flight while the entire population searches for the optimal fitness value, adjusting the individual bats' flight and search abilities using impulse rate and loudness. After multiple iterations, it approximates the optimal fitness value. Since the bat algorithm itself does not fix any specific values, there are many ways to improve it.

[0085] To better optimize parameters, existing technologies have proposed a quantum bat algorithm. This algorithm combines quantum evolution theory with the localization mechanism of traditional bat algorithms, introducing quantum encoding. It directly uses the probability amplitude of qubits as the encoding of the bat's current position, transforming the update of the bat's position into an update of the quantum rotation gate. The quantum bat algorithm simulates the pulse emission rate, frequency, and loudness of quantum bats in their foraging behavior. By adjusting the frequency and using the designed quantum rotation gate localization strategy, it enables each quantum bat in the entire swarm to update its own quantum position and evolve towards the optimal foraging position, thus locating the target.

[0086] 3.2 Improvement of the Quantum Bat Algorithm

[0087] This embodiment aims to enhance the overall search capability of the quantum bat algorithm, prevent it from getting trapped in local optima, and improve overall optimization efficiency. It refines the speed and position update strategy of the quantum bat algorithm. Furthermore, to increase population diversity, a quantum non-rotating gate is introduced to implement quantum position mutation for weaker individuals, preventing premature convergence. The algorithm improvements are as follows:

[0088] (1) Initialize the quantum bat population

[0089] By combining quantum evolution theory and the localization mechanism of the traditional bat algorithm, a quantum encoding method is introduced to initialize the bat population as n quantum bats. The quantum velocity of the i-th quantum bat in t iterations is:

[0090]

[0091] in, and Let be the two probability amplitudes of the qubit, and D be the number of qubits. The quantum position of the i-th quantum bat in iteration t is:

[0092]

[0093] in, and Let be the two probability amplitudes of the qubit, and D be the number of qubits.

[0094] (2) Frequency, speed and position updates of quantum bats

[0095] The bat frequency update formula is:

[0096] f i t+1 =f min +(f max -f min )u i (7)

[0097] Where f max with fmin These are the upper and lower limits of the frequency, u i It is a uniformly distributed random number in the range [-1, 1]. The velocity qubits of individual bats are updated using a quantum rotation gate, with the update formula as follows:

[0098]

[0099] For this quantum rotation update, different rotation angles have a significant impact on the algorithm's convergence speed and optimization ability. This embodiment proposes a novel nonlinear adaptive rotation angle to improve this.

[0100] The performance of the quantum bat algorithm is shown in equation (9):

[0101]

[0102] Let f(x) be the probability amplitude corresponding to a certain qubit of the current optimal bat. Let -sgn(H) represent the probability amplitude corresponding to a certain qubit of the current bat. i ) is used to control the direction of rotation, θ0 is the basic rotation angle, θ0 takes the value of 0.1π, λ∈(0,2), and controlling the size of λ can dynamically and adaptively control the size of the rotation angle. The offset of the rotation angle is Δθ, which takes the value of 0.01π. The offset becomes smaller and smaller as the number of iterations increases.

[0103] Based on the result of updating the velocity qubits of individual bats using a quantum rotation gate, the position of individual bats is updated as shown in Equation (10), and fitness is calculated.

[0104]

[0105] (3) Local adjustment of quantum bat position

[0106] Then a local search is performed, with a random number rand. <r i If necessary, local position adjustments will be made:

[0107]

[0108]

[0109] In the formula, U is a uniformly random number in the range [-1, 1], and A is the loudness. Fitness is calculated after local position adjustment. The adaptability of the location is better than The fitness is then used replace Otherwise, keep the original constant.

[0110] (4) Poor individual variation

[0111] To increase population diversity, a quantum NOT gate is introduced to perform quantum position mutations on poorer individuals, preventing premature convergence of the algorithm. Bats with fitness in the bottom third are subjected to the quantum NOT gate mutation operation, which is as follows:

[0112]

[0113] The probability amplitude 'a' of each dimension in a quantum individual i With b i To exchange, among which The probability amplitude before mutation. Let be the probability amplitude of mutation. A quantum rotation gate is used to mutate weaker individuals, improving the algorithm's global optimum search capability and ensuring convergence speed.

[0114] (5) Pulse frequency and loudness update

[0115]

[0116]

[0117] in, and Let r represent the echo loudness of the t-th generation and the (t+1)-th generation, respectively. i t+1 r represents the pulse frequency of generation t+1. i 0 Let α and γ be the maximum pulse frequency, and α and γ be constants, where α and γ ∈ (0,1). At the start of the search, a larger loudness and a lower frequency are used for the search to facilitate large-scale operation.

[0118] The search process involves using a higher impulse rate and lower loudness to pinpoint the exact location of the target after it has been found. 4. Lock cylindricity evaluation based on improved quantum bat optimization of point cloud targets.

[0119] This patent employs an improved quantum bat algorithm to optimize the parameters a, b, q, and p of the cylindricity error assessment model, minimizing the objective function f(a, b, p, q). The target value at this point represents the cylindricity error of the cylinder. Cylindricity is then evaluated based on a set error threshold. The implementation process is as follows: Figure 3 As shown, the specific implementation steps are as follows:

[0120] Step 1: Use a handheld 3D laser scanner to scan the 3D point cloud data of the lock stamping parts, and use bilateral filtering to smooth the point cloud data.

[0121] Step 2: Establish a cylindricity error assessment model and construct a three-dimensional point cloud objective function f(a,b,p,q) for cylindricity error assessment, where a,b,q,p are the input parameters.

[0122] Step 3: Combining quantum evolution theory and the localization mechanism of the traditional bat algorithm, quantum computing is introduced to encode a, b, q, p, and initialize the quantum bat population and parameters: n, D, f. max f min u i ,θ0,Δθ,λ,r i 0 α, γ, A0, maximum number of iterations T, and calculate the fitness of the initial cylindricity error.

[0123] Step 4: First, update the frequency of the quantum bat using Equation (7). Then, update the velocity qubit of the individual bat using the nonlinear adaptive rotation angle of Equation (8) and the quantum rotation gate of Equation (9). Update the position of the individual bat based on the update result of the velocity qubit, as shown in Equation (10), and calculate the fitness.

[0124] Step 5: Then perform a local search, setting a random number rand. When rand... <r i If the local position is adjusted according to equations (11) and (12), then the fitness is calculated after the local position adjustment. The adaptability of the location is better than The fitness is then used replace Otherwise, keep the original constant.

[0125] Step 6: Introduce a quantum NOT gate to achieve quantum position mutation of poor individuals. Perform quantum NOT gate mutation operation on bat individuals with fitness in the second-to-last third through equation (13).

[0126] Step 7: Update the pulse frequency and response using equations (14) and (15).

[0127] Step 8: Determine if the maximum number of iterations has been reached. If it has, proceed to step 9; otherwise, proceed to step 4 and continue the loop.

[0128] Step 9: The optimal fitness value of the point cloud objective function is the cylindricity error.

[0129] Step 10: Evaluate the cylindricity. Compare the cylindricity error with the set error threshold. Cylindricity values ​​less than the threshold are considered acceptable.

[0130] 5. Specific implementation methods and descriptions

[0131] 5.1 Performance Testing of the Improved Quantum Bat Algorithm

[0132] The performance of the improved quantum bat algorithm was tested by finding the extrema of the complex bivariate function of equation (16):

[0133] z=x.^2+y.^2-10*cos(2*pi*x)-10*cos(2*pi*y)+20 (16)

[0134] The search capabilities of each algorithm are evaluated from several aspects, including the number of iterations and the ability to escape local optima. The performance of the Bat Algorithm, the Quantum Bat Algorithm, and the improved Quantum Gate Bat Algorithm of this patent are compared. The quantum bat population and parameters are initialized as follows: n = 20, D = 4, f... max =1, f min =0, λ=1.2, r i 0 =0.6, α=γ=0.8, A0=0.25, maximum number of iterations T=100, Figure 4 Table 1 shows the statistics of the average convergence algebra, average running time, and number of times the user got trapped in a local optimum, which are part of the fitness iteration graph for the optimization process.

[0135] Table 1 Results and performance of each bat algorithm

[0136]

[0137] Based on the test results, the Bat Algorithm has an advantage in function computation time; however, it is very prone to getting trapped in local optima. The Quantum Gate Bat Algorithm has a certain advantage in convergence speed compared to the Bat Algorithm. The Quantum Gate Bat Algorithm in this embodiment has high convergence efficiency, strong global optimization ability, and avoids getting trapped in local optima. In terms of overall performance, the Quantum Gate Bat Algorithm in this embodiment is superior and is an ideal optimization algorithm.

[0138] 5.2 Calculation and Evaluation of Lock Cylindricity Error

[0139] Taking the inspection results of circular lock stampings as an example, circular lock stampings, such as Figure 5 As shown in (a), the 3D point cloud data of the lock stamping part was obtained using a REVscan handheld 3D laser scanner. The 3D point cloud model is as follows: Figure 5 As shown in (b), the point cloud data is smoothed using bilateral filtering. Partial point cloud data of the cylindrical surface is shown in Table 2. Based on the point cloud data of the cylindrical surface, a three-dimensional point cloud objective function f(a,b,p,q) for error evaluation is constructed. a,b,q,p are quantum-encoded, and the quantum bat population and parameters are initialized as follows: n=20, D=4, f... max =1, f min =0, λ=1.2, r i 0=0.6, α=γ=0.8, A0=0.25, maximum number of iterations T=200. An improved quantum bat algorithm is used to optimize the parameters a,b,q,p of the cylindricity error evaluation model, so that the objective function f(a,b,p,q) is minimized. After the cyclic iteration, the optimal fitness value of the point cloud objective function is 0.3280, and the cylindricity error is set to 0.3. The error threshold is set to 0.3, and the cylindricity of the lock is unqualified.

[0140] Table 2 shows partial point cloud data for cylindrical surfaces.

[0141] No. X Y Z 1 24.754 49.418 -5.078 2 26.963 44.247 -3.522 3 23.519 53.477 -5.400 4 22.840 57.589 -5.823 5 22.598 60.407 -5.612 6 22.637 65.117 -6.895 7 24.182 73.870 -7.628 8 28.293 83.239 -10.288 9 31.128 87.277 -3.913 10 32.710 89.190 -6.323 11 37.517 93.710 -9.188 12 41.372 96.488 -6.890 13 45.894 98.922 -8.564 14 57.243 102.224 -6.991 15 61.912 102.555 -6.000 16 69.368 101.981 -5.340 17 80.189 98.465 -7.900 18 87.849 93.564 -8.347 19 95.912 84.593 -6.683 20 99.404 78.119 -9.974 21 100.982 73.736 -8.007 22 102.581 63.126 -9.416 23 95.835 40.270 -8.174 24 91.067 34.425 -7.730 25 84.750 29.223 -5.962

[0142] To verify the advantages of the method in this embodiment, cylindricity error was detected and evaluated on multiple circular lock stamping parts, and compared and analyzed with existing methods such as the minimum containment method, rotational encirclement method, and minimum region principle. The 3D point cloud models and detection results of multiple circular lock stamping parts are shown below. Figure 6 As shown in Table 3, the average detection error and detection time of the method in this embodiment are compared with those of existing methods such as the minimum containment method, rotational encirclement method, and minimum area principle. The method in this embodiment has higher detection accuracy. Existing methods such as the minimum containment method, rotational encirclement method, and minimum area principle require alignment with the original CAD model for the evaluation of cylindricity of different parts, which reduces the efficiency of real-time on-site detection. This patented method eliminates the step of aligning with the original CAD model, reduces manual intervention, and has high detection efficiency, meeting the requirements of online detection in product manufacturing.

[0143] Table 3 Detection results of different methods

[0144] method Average detection error / mm Average detection time / s Least Enclosure Method 0.0102 6.96 Rotational Encirclement Method 0.0096 9.42 Minimum area principle 0.0087 6.41 This patented method 0.0063 5.32

[0145] 8. Advantages and applications of this embodiment

[0146] This embodiment proposes a method for evaluating the cylindricity of lock stamping parts based on quantum bat optimization of point cloud targets. First, a three-dimensional laser scan is performed on the lock stamping parts to acquire three-dimensional point cloud data, and a bilateral filtering method is used to remove point cloud noise. Second, a point cloud objective function for the cylindricity error evaluation model is constructed based on the minimum region principle. Then, a quantum rotating door update strategy with nonlinear adaptive rotation angle is constructed to improve the speed and position update of the quantum bat algorithm, and a quantum non-rotating door is introduced to realize the quantum position mutation of poorer individuals. Finally, the improved quantum bat algorithm is applied to optimize the point cloud objective function to obtain the optimal cylindricity error, and the cylindricity is evaluated according to a set error threshold. The improved quantum bat optimization algorithm in this embodiment enhances the global optimal search capability, ensures convergence speed, avoids getting trapped in local optima, and is applied to optimize the point cloud objective function of the cylindricity error evaluation model, enabling rapid cylindricity error evaluation and achieving more accurate and faster cylindricity evaluation, further improving the efficiency and automation of actual production work.

[0147] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

[0148] This patent is not limited to the above-described preferred embodiment. Anyone can derive other various forms of methods for evaluating the cylindricity of lock stamping parts based on quantum bat optimized point cloud targets under the guidance of this patent. All equivalent changes and modifications made within the scope of this patent application shall fall within the scope of this patent.

Claims

1. A method for evaluating the cylindricity of lock stamping parts based on quantum bat-optimized point cloud targets, characterized in that: An improved quantum bat algorithm is used to optimize the parameters a, b, q, p of the point cloud objective function for evaluating the cylindricity error of the lock stamping part, so that the point cloud objective function f(a,b,p,q) reaches the minimum. At this time, the objective value is the cylindricity error of the cylinder of the lock stamping part. The cylindricity of the lock stamping part is evaluated according to the set error threshold. The process of establishing the objective function for the point cloud of cylindricity error evaluation is as follows: Cylindricity error is the variable value between the actual cylindrical surface of the lock under test and the ideal standard cylindrical surface. A three-dimensional spatial model is established based on the point cloud data of the cylindrical surface of the lock under test. L is set as the rotation axis of the ideal cylindrical surface. The position of axis L is determined by parameters a and b, and the direction is determined by parameters p and q. At this time, the three-dimensional rectangular coordinate expression of L is as shown in formula (1): M e (x e ,y e ,z e e = 1, 2, ..., n are considered as the point cloud coordinates on the cylindrical surface of the lock being measured, where n represents the number of point clouds on the cylindrical surface. At this point, the measured point M... e The shortest distance r between the axis of rotation L and the axis of rotation e Calculated by equation (2); As shown in the above formula, when evaluating the cylindricity of a cylinder, according to the principle of minimum area, the cylinder to be measured is enclosed by two ideal cylindrical surfaces. The minimum enclosed area is then denoted as Z. e The difference radii t between two ideal cylindrical surfaces is the cylindricity error; at this point, the point cloud objective function f(a,b,p,q) is changed from r e and r i To represent, as shown in equation (3): f(a,b,p,q)=maxr e -minr i (3) Then, substituting formula (2) into (3), we obtain the expression for the point cloud objective function, as shown in (4): Finally, we solve for the optimization parameters a, b, q, p, so that the objective function f(a, b, p, q) of the point cloud is minimized. This is the cylindricity error of the cylinder. The improved quantum bat algorithm is specifically as follows: (1) Initialize the quantum bat population By combining quantum evolution theory and the localization mechanism of the traditional bat algorithm, a quantum encoding method is introduced to initialize the bat population, setting it to n quantum bats. The quantum velocity of the i-th quantum bat in t iterations is: in, and Let D be the two probability amplitudes of the qubit, and D be the number of qubits; the quantum position of the i-th quantum bat in iteration t is: in, and Let D be the two probability amplitudes of the qubit, and D be the number of qubits. (2) Frequency, speed and position updates of quantum bats The bat frequency update formula is: f i t+1 =f min +(f max -f min )u i (7) Among them, f max with f min These are the upper and lower limits of the frequency, u i It is a uniformly distributed random number in the range [-1, 1]; the velocity qubits of individual bats are updated using a quantum rotation gate, and the update formula is: For the rotation angle updated in this quantum rotation, a nonlinear adaptive rotation angle is used to improve the performance of the quantum bat algorithm, as shown in equation (9): in, Let f(x) be the probability amplitude corresponding to a certain qubit of the current optimal bat. Let -sgn(H) represent the probability amplitude corresponding to a certain qubit of the current bat. i The rotation direction is controlled by θ0, which is the basic rotation angle and takes a value of 0.1π. λ∈(0,2), and the magnitude of λ is controlled to dynamically and adaptively control the rotation angle. The initial offset Δθ of the rotation angle takes a value of 0.01π, and the actual offset increases with the iteration number t by Δθ / (t). 2 +1) gradually decreases; Based on the results of updating the velocity qubits of individual bats using a quantum rotation gate, the positions of individual bats are updated as shown in Equation (10), and fitness is calculated: (3) Local adjustment of quantum bat position Then a local search is performed, with a random number rand. <r i If necessary, local position adjustments will be made: In the formula, U is a uniformly random number in the range [-1, 1], and A is the loudness. Fitness is calculated after local position adjustment. The adaptability of the location is better than The fitness is then used replace Otherwise, keep the original constant; (4) Poor individual variation To increase population diversity, a quantum NOT gate is introduced to perform quantum position mutation on poorer individuals, avoiding premature convergence of the algorithm. Bat individuals with fitness in the bottom third are subjected to the quantum NOT gate mutation operation, which is as follows: That is, the probability amplitude a of each dimension in a quantum individual. i With b i To exchange, among which The probability amplitude before mutation. The probability amplitude of the mutation; (5) Pulse frequency and loudness update in, and Let r represent the echo loudness of the t-th generation and the (t+1)-th generation, respectively. i t+1 r represents the pulse frequency of generation t+1. i 0 Let α be the maximum pulse frequency, and let γ be constants, where α and γ ∈ (0,1). At the beginning of the search, a larger loudness and a lower frequency are used for the search to facilitate large-scale search. After the target is found, a larger pulse rate and a lower loudness are used to find the accurate location.

2. The method for evaluating the cylindricity of lock stamping parts based on quantum bat-optimized point cloud targets according to claim 1, characterized in that: An improved quantum bat algorithm is used to optimize the parameters a, b, q, p of the cylindricity error assessment model, minimizing the objective function f(a, b, p, q). The objective value at this point represents the cylindricity error of the cylinder. The cylindricity is then evaluated based on a set error threshold, specifically including the following steps: Step S1: Use a handheld 3D laser scanner to scan the 3D point cloud data of the lock stamping parts, and use bilateral filtering to smooth the point cloud data; Step S2: Establish a cylindricity error assessment model and construct a three-dimensional point cloud objective function f(a,b,p,q) for cylindricity error assessment, where a,b,q,p are input parameters; Step S3: Encode a, b, q, p using the improved quantum bat algorithm, and initialize the quantum bat population and parameters: n, D, f. max f min u i ,θ0,Δθ,λ,r i 0 α, γ, A0, maximum number of iterations T, and calculate the fitness of initial cylindricity error; Step S4: First, update the frequency of the quantum bat using Equation (7), then update the velocity qubit of the individual bat using the nonlinear adaptive rotation angle of Equation (8) and the quantum rotation gate of Equation (9). Update the position of the individual bat according to the update result of the velocity qubit, as shown in Equation (10), and calculate the fitness. Step S5: Then perform a local search, setting a random number rand, and when rand... <r i If the local position is adjusted according to equations (11) and (12), then the fitness is calculated after the local position adjustment. The adaptability of the location is better than The fitness is then used replace Otherwise, keep the original constant; Step S6: Introduce a quantum NOT gate to achieve quantum position mutation of poor individuals. Perform quantum NOT gate mutation operation on bat individuals with fitness in the second-to-last third through equation (13); Step S7: Update the pulse frequency and response using equations (14) and (15); Step S8: Determine if the maximum number of iterations has been reached. If it has, proceed to step S9; otherwise, proceed to step S4 and continue the loop. Step S9: The optimal fitness value of the point cloud objective function, which is the cylindricity error; Step S10: Evaluate cylindricity by comparing the cylindricity error with the set error threshold. Cylindricity values ​​less than the threshold are considered acceptable.

Citation Information

Patent Citations

  • Method for assessing composite space type face geometric error

    CN101413793A

  • Antenna array sparse construction and directional diagram comprehensive method based on quantum bat searching

    CN104537185A