A method and system for analyzing parts precision assembly errors based on multi-constraint surface matching
By introducing a multi-constrained surface matching method and an improved particle swarm algorithm in the precision assembly process of parts, the problem of insufficient accuracy of part assembly error analysis in the prior art is solved, and higher reliability and accuracy of error analysis are achieved.
Patent Information
- Application Number
- CN202411328069.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2044-09-24
AI Technical Summary
The prior art is difficult to accurately reflect real geometric contact during precision assembly of parts, and cannot effectively consider engineering constraints during assembly, resulting in insufficient accuracy of assembly error analysis.
Using a method based on multi-constraint surface matching, non-interference constraints and force stability constraints are introduced in the surface matching process to improve the elementary particle swarm algorithm. Through nonlinear control methods and improved particle swarm algorithm, the surface matching process is optimized to improve the accuracy of error analysis.
It achieves faster and more accurate surface matching, improves the reliability of the precision assembly error analysis results of parts, and can more accurately reflect real geometric contact and engineering constraints during assembly.
Smart Images

Figure CN119397882B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of parts assembly, and in particular relates to a method and system for analyzing errors in parts precision assembly based on multi-constraint surface matching. Background Art
[0002] Parts assembly is an important part of the manufacturing process, which involves combining multiple parts into a complete product or component according to design requirements and technical specifications. In the fields of aerospace, precision instruments and high-end equipment manufacturing, the precision assembly of parts has become a key link to ensure product quality and performance. Precision assembly of parts is the process of assembling many finely machined parts together according to process specifications to form an assembly. Its realization depends on establishing a matching constraint relationship between the surfaces of different parts.
[0003] However, due to the existence of machining errors, the surface of the parts has an uneven geometric morphology at the microscopic scale, which will cause the two mating surfaces to deviate from their ideal state and produce assembly errors; at the same time, the above-mentioned assembly errors will also be transmitted and accumulated through multiple mating constraints in the assembly, affecting the results of assembly error analysis. At present, assembly error analysis methods can be mainly summarized into two categories: assembly error analysis based on unconstrained surface matching and assembly error analysis based on constrained surface matching.
[0004] The error analysis method based on unconstrained surface matching mainly converts the surfaces of two parts with a matching relationship into two point sets for matching and error analysis, without considering some engineering constraints in the assembly process. For example, the invention patent with application number 201310240210.3 uses the iterative closest point (ICP) algorithm proposed by Besl and Mckay to solve the correspondence relationship and transformation matrix of the two point sets, complete the surface matching process, and perform assembly error analysis. Although the surface matching model proposed in the above invention patent is simple and versatile, the invention patent only considers the Euclidean distance between the two surfaces, which is too ideal, ignores the engineering constraints in the assembly process, and cannot truly and accurately reflect the precision assembly process of parts.
[0005] In order to solve the problem of integrating non-interference constraints into the surface matching process and improve the accuracy of error analysis, the open document "Zhang Qiushuang, Jin Xin, Zhang Zhongqing, et al. Assembly simulation positioning method based on surface constraint matching algorithm [J]. Journal of Mechanical Engineering, 2018, 54(11): 70-76." uses two surfaces to replace the part surface and integrates non-interference constraints into the surface matching process. The verification results show that considering non-interference constraints is more in line with the actual situation.
[0006] Although this public document further improves the accuracy of error analysis, the current research is not sufficient and cannot accurately reflect the actual geometric contact. At the same time, it is not suitable for more extensive and more complex surface-to-surface matching situations. The accuracy of existing surface matching methods still has room for further improvement. Summary of the invention
[0007] The purpose of the present invention is to solve the deficiencies of the prior art in improving the accuracy of surface matching, and to provide a method and system for analyzing the error of parts precision assembly based on multi-constraint surface matching. By introducing non-interference constraints and force stability constraints in the surface matching process and improving the basic particle swarm algorithm, surface matching can be achieved more quickly and accurately, further improving the reliability of the error analysis results.
[0008] To achieve the above purpose, the technical solution provided by the present invention is:
[0009] A method for analyzing the error of precision assembly of parts based on multi-constraint surface matching, comprising:
[0010] Step 1: Obtain a target surface and a surface to be matched based on multiple constraints, convert the target surface into a triangular mesh model, and convert the surface to be matched into three-dimensional point cloud data;
[0011] Step 2: Initialize the triangular mesh model and the three-dimensional point cloud data;
[0012] Step 3: Using a nonlinear control method to adjust the target surface and the surface to be matched, and optimizing the surface matching process until a termination matching condition is met;
[0013] Step 4: Perform part precision assembly error analysis based on the final contact points between the target surface in step 3 and the surface to be matched.
[0014] As a further limitation of the present invention, the step 1 comprises:
[0015] Obtain the target surface S based on non-interference constraints and force stability constraints 1 and the surface to be matched S 2 , target surface S 1 and the surface to be matched S 2 The curved surface is matched with the machining error;
[0016] The target surface S 1 Transformed into a triangular mesh model M, M = {M 1 ,M 2 ,...,M i ,...,M n-1 ,M n}, where M irepresents the i-th triangle mesh, and n represents the total number of triangle meshes;
[0017] The surface to be matched S 2 The three-dimensional point cloud data P is obtained by sampling, P = {P 1 ,P 2 ,...,P i ,...,P m-1 ,P m}, where P i represents the i-th point cloud data, and m represents the total number of 3D point cloud data.
[0018] As a further limitation of the present invention, the step 2 comprises:
[0019] Calculating the shortest distance between each point cloud in the three-dimensional point cloud data and a triangular mesh in the triangular mesh model;
[0020] Establish the target surface S based on the closest distance 1 and the surface to be matched S 2 The corresponding target point set M i,0 and source point set P i,0 , where the target point set M i,0 Represents the target surface S 1 The corresponding point set at the initial position, the source point set P i,0 Represents the surface to be matched S 2 The corresponding point set at the initial position.
[0021] As a further limitation of the present invention, the step three comprises:
[0022] Calculating the homogeneous transformation matrix of the three-dimensional point cloud data in step 2 so that the target surface and the surface to be matched satisfy the objective function under non-interference constraints and force stability constraints;
[0023] The source point set P is controlled by nonlinear control method. i,0 Form a new point set through coordinate transformation and update the surface S to be matched 2 The position of the 3D point cloud data is obtained, and the value of the objective function is solved based on the updated position;
[0024] If the value is greater than the given threshold, the iteration continues until the maximum number of iterations is reached or the value is less than the given threshold and the iteration stops.
[0025] As a further limitation of the present invention, the expression of the objective function is:
[0026]
[0027] In formula (1), F(T k ,R k) represents the average distance from all 3D point cloud data to the nearest triangular mesh after the 3D point cloud data P is translated and rotated; T k represents the optimal translation matrix, R k represents the optimal rotation matrix, P i,k-1 represents the source point set, M i,k represents the closest point, m represents the total number of 3D point cloud data, α represents the angle of rotation of the point set around the x-axis, β represents the angle of rotation of the point set around the y-axis, γ represents the angle of rotation of the point set around the z-axis, and t x Indicates the distance that the point set is translated along the x-axis, t y Indicates the distance that the point set is translated along the y-axis, t z Indicates the distance the point set is translated along the z-axis.
[0028] As a further limitation of the present invention, the numerical expression for solving the objective function is:
[0029]
[0030] In formula (2), F k represents the objective function value after the kth iteration, m represents the total number of 3D point cloud data, P i,k Represents point cloud, M i,k Represents the closest distance point from the point cloud to each triangle mesh, ||P i,k -M i,k || indicates P after the kth iteration i,k and M i,k The Euclidean distance between two point sets.
[0031] As a further limitation of the present invention, in step 3:
[0032] The non-interference constraint is the target surface S 1 and the surface to be matched S 2 No interference should occur during the matching process, where d i ≥0,d i Indicates the distance from the point to the triangular mesh; the judgment method includes: when the i-th point cloud data P i When it is on the side pointed by the normal vector of the triangle mesh, it means that the distance from the point to the triangle mesh is positive. At this time, d i ≥0, otherwise d i <0;
[0033] The force stability constraint is the target surface S 1 and the surface to be matched S 2 Ability to maintain a stable state, analyze the target surface S 1 and the surface to be matched S 2 The contact state; the judgment method includes: assuming that the position of the applied force is on the surface to be matched S 2At a point Q on the surface, project the point onto the convex hull formed by the contact points, and the projection point is recorded as Q′; if Q′ is in the convex hull formed by the contact points, the force stability requirement is met, otherwise it does not meet the force stability requirement.
[0034] As a further limitation of the present invention, in solving the value of the objective function based on the updated position, an improved particle swarm algorithm is used to solve the objective function, wherein the improved particle swarm algorithm includes:
[0035] Step (31) initializes parameters, which include population size N, number of dimensions of variables to be optimized D, maximum inertia weight coefficient ω max , minimum inertia weight coefficient ω min , maximum social learning factor c 1max , minimum social learning factor c 1min , maximum self-learning factor c 2max , minimum self-learning factor c 2min , maximum number of iterations k max , simulated annealing factor β;
[0036] Step (32) initializes the positions and velocities of all particles in the population, expressed as:
[0037]
[0038] In formula (3), x(i) represents the position of all particles in the population, X i =(x i1 ,x i2 ,x i3 ,x i4 ,x i5 ,x i6 ), τ represents the proportional coefficient, μ represents the modulation coefficient, π represents the circumference, and r represents a random number in the interval [0,1]; when τ∈(0,1) and μ∈(0,1), equation (3) processes the chaotic state and transforms the chaotic value into the search space of the population. The new population position X is obtained by using equations (4) and (5) i ' and initial speed value V i ′;
[0039] X′ i =X min +X i (X max -X min ) Formula (4)
[0040] V′ i =V min +V i (V max -V min ) Formula (5)
[0041] In formula (4) and formula (5), X min Indicates the minimum value of the position, X max Indicates the maximum value of the position, V min Indicates the minimum value of speed, V max Indicates the maximum value of speed;
[0042] Step (33) calculates the fitness function value of each particle based on step (32), finds the individual optimal and global optimal solutions according to the fitness value, uses the improved objective function formula (6) as the fitness function, and uses formula (7) to set the initial temperature of simulated annealing, which is expressed as:
[0043] Fit=F(T k ,R k ) Formula (6)
[0044]
[0045] In formula (6) and formula (7), t 0 is the initial temperature, is the global optimal fitness value, β is the simulated annealing factor, and k is the current number of iterations;
[0046] Step (34) updates the velocity of the particle swarm, adjusts the position of the particle swarm, and adaptively changes the inertia weight ω and the learning factor c 1 and c 2 , the expression is:
[0047]
[0048] In the formula, represents the velocity of particle i at the k+1th iteration in the dth dimension, ω represents the inertia weight coefficient, represents the velocity of particle i at the kth iteration in the dth dimension, c 1 represents the social learning factor, represents the individual optimal solution of particle i in the k+1th iteration in the dth dimension, represents the position of particle i at the kth iteration in the dth dimension, c 2 represents the self-learning factor, represents the global optimal solution of particle i in the k+1th iteration in the dth dimension, ω max represents the maximum value of the inertia weight, ω min represents the minimum value of inertia weight, k max represents the maximum number of iterations, c 1max represents the maximum value of the social learning factor, c 1min represents the minimum value of the social learning factor, k represents the current number of iterations, and c 2 represents the self-learning factor, c2max represents the maximum value of the self-learning factor, c 2min represents the minimum value of the self-learning factor; rand represents a random number between 0 and 1. represents the individual optimal solution, represents the global optimal solution;
[0049] Step (35) calculates the fitness value of the updated particle in step (34), and determines whether it is better than the previous generation according to the fitness value. If the current position of a particle after the update shows a higher fitness than its historical optimal position, the historical optimal position record of this particle is updated; otherwise, the position is accepted with a certain probability; after evaluating all particles, the global optimal value of the entire particle group is compared and updated;
[0050] Step (36) Calculate the probability p of accepting the new solution according to the Metropolis criterion i (k), the calculation formula is:
[0051]
[0052] In formula (8), Fit i (k) represents the fitness value of the i-th particle at the k-th iteration; k represents the fitness value of the optimal point of the current population, and t(k) represents the temperature at the kth iteration;
[0053] Step (37) Compare the probability p i (k) and rand(0,1), determine whether the generated new solution replaces the global optimal solution for simulated annealing operation, if so, perform cooling process and update temperature; otherwise, return to step (34);
[0054] Step (38) determines whether the algorithm has reached the iteration termination condition. If not, it returns to step (34) to continue the next iteration. Otherwise, it outputs the current optimal particle, including the parameter vector (α, β, γ, t x , t y , t z ) is the optimal solution.
[0055] As a further limitation of the present invention, the step 4 comprises:
[0056] When the iteration stops according to step 3, the target surface S 1 and the surface to be matched S 2 The final contact point of the parts is analyzed to determine the precision assembly error of the parts.
[0057] The present invention also provides a system for analyzing the error of parts precision assembly based on multi-constrained surface matching. Based on the above-mentioned method for analyzing the error of parts precision assembly based on multi-constrained surface matching, the system for analyzing the error of parts precision assembly includes:
[0058] An acquisition unit, which acquires a target surface and a surface to be matched based on multiple constraints, converts the target surface into a triangular mesh model, and converts the surface to be matched into three-dimensional point cloud data;
[0059] A processing unit is configured to initialize the triangular mesh model and the three-dimensional point cloud data; use a nonlinear control method to adjust the target surface and the surface to be matched, and optimize the surface matching process until a termination matching condition is met;
[0060] The analysis unit performs part precision assembly error analysis according to the final contact point between the target curved surface of the processing unit and the curved surface to be matched.
[0061] The advantages of the present invention are:
[0062] 1. The present invention improves the basic particle swarm algorithm by introducing non-interference constraints and force stability constraints in the surface matching process, which can achieve surface matching more quickly and accurately and further improve the reliability of error analysis results.
[0063] 2. The present invention adopts an improved particle swarm algorithm to solve the objective function. In the improved particle swarm algorithm, a spatial pyramid matching chaotic mapping is used to initialize the population to improve the population diversity, a nonlinear control method is introduced to dynamically adjust the inertia weight, and a simulated annealing mechanism is integrated into the particle swarm algorithm to improve the algorithm performance, calculate the final contact point between the target surface and the surface to be matched, and perform precision assembly error analysis of parts. The present invention realizes the precise matching of multi-constrained surfaces and improves the reliability of assembly error analysis results.
[0064] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0066] Figure 1 : A flow chart of a method for analyzing the error of precision assembly of parts based on multi-constrained surface matching provided by the present invention;
[0067] Figure 2 : Assembly positioning flow chart provided by the present invention;
[0068] Figure 3: The non-interference schematic diagram provided by the present invention;
[0069] Figure 4 : Schematic diagram of the stability of the satisfying force provided by the present invention;
[0070] Figure 5 : Schematic diagram of stability of unsatisfied force provided by the present invention;
[0071] Figure 6 : Flow chart of the improved particle swarm algorithm provided by the present invention;
[0072] Figure 7 : Assembly diagram of the precision machined vibration plate provided by the present invention;
[0073] Figure 8 : The transformation parameters solved under three different conditions provided by the present invention;
[0074] Fig. 9 : Comparison of transformation parameters provided by the present invention;
[0075] Fig.10 : Algorithm iteration curve diagrams under three different conditions provided by the present invention;
[0076] Fig.11 : The interference conditions under three different conditions provided by the present invention;
[0077] Fig.12 : The contact point coordinates under three different conditions provided by the present invention;
[0078] Fig.13 : The unconstrained-PSO assembly positioning result diagram provided by the present invention;
[0079] Fig.14 : The unconstrained-improved PSO assembly positioning result diagram provided by the present invention;
[0080] Fig.15 : The multi-constraint-improved PSO assembly positioning result diagram provided by the present invention. DETAILED DESCRIPTION
[0081] Embodiments of the present invention are described in detail below. The embodiments are exemplary and intended to be used to explain the present invention, but should not be construed as limiting the present invention.
[0082] See also Figure 1 The embodiment of the present invention provides a method for analyzing the error of precision assembly of parts based on multi-constrained surface matching, comprising the following steps:
[0083] Step 1: Obtain a target surface and a surface to be matched based on multiple constraints, convert the target surface into a triangular mesh model, and convert the surface to be matched into three-dimensional point cloud data.
[0084] The above step 1 includes: obtaining the target surface S based on the non-interference constraint and the force stability constraint 1 and the surface to be matched S 2 , target surface S 1 and the surface to be matched S 2 The target surface S 1 Transformed into a triangular mesh model M, M = {M 1 ,M 2 ,...,M i ,...,M n-1 ,M n}, where M i represents the i-th triangle mesh, n represents the total number of triangle meshes; the surface to be matched S 2 The three-dimensional point cloud data P is obtained by sampling, P = {P 1 ,P 2 ,...,P i ,...,P m-1 ,P m}, where P i represents the i-th point cloud data, and m represents the total number of 3D point cloud data.
[0085] Step 2: Initialize the triangular mesh model and 3D point cloud data.
[0086] The above step 2 includes: calculating the shortest distance between each point cloud in the 3D point cloud data and the triangular mesh in the triangular mesh model; establishing the target surface S based on the shortest distance 1 and the surface to be matched S 2 The corresponding target point set M i,0 and source point set P i,0 , where the target point set M i,0 Represents the target surface S 1 The corresponding point set at the initial position, the source point set P i,0 Represents the surface to be matched S 2 The corresponding point set at the initial position.
[0087] Step 3: Use nonlinear control methods to adjust the target surface and the surface to be matched, and optimize the surface matching process until the termination matching condition is met.
[0088] The above step three specifically includes:
[0089] Calculate the homogeneous transformation matrix of the three-dimensional point cloud data in step 2 so that the target surface and the surface to be matched satisfy the objective function under the non-interference constraint and the force stability constraint;
[0090] The source point set P is controlled by nonlinear control method. i,0Form a new point set through coordinate transformation and update the surface S to be matched 2 The position of the 3D point cloud data is obtained, and the value of the objective function is solved based on the updated position;
[0091] If the value is greater than the given threshold, the iteration continues until the maximum number of iterations is reached or the value is less than the given threshold and the iteration stops.
[0092] The expression of the objective function is:
[0093]
[0094] In formula (1), F(T k ,R k ) represents the average distance from all 3D point cloud data to the nearest triangular mesh after the 3D point cloud data P is translated and rotated; T k represents the optimal translation matrix, R k represents the optimal rotation matrix, P i,k-1 represents the source point set, M i,k represents the closest point, m represents the total number of 3D point cloud data, α represents the angle of rotation of the point set around the x-axis, β represents the angle of rotation of the point set around the y-axis, γ represents the angle of rotation of the point set around the z-axis, and t x Indicates the distance that the point set is translated along the x-axis, t y Indicates the distance that the point set is translated along the y-axis, t z Indicates the distance the point set is translated along the z-axis.
[0095] In the above step 3, the numerical expression for solving the objective function is:
[0096]
[0097] In formula (2), F k represents the objective function value after the kth iteration, m represents the total number of 3D point cloud data, P i,k represents the point cloud, M i,k Represents the closest distance point from the point cloud to each triangle mesh, ||P i,k -M i,k || indicates P after the kth iteration i,k and M i,k The Euclidean distance between two point sets.
[0098] In the above step 3, the non-interference constraint is the target surface S 1 and the surface to be matched S 2 No interference should occur during the matching process, where d i ≥0,d i Indicates the distance from the point to the triangular mesh; the judgment method includes: when the i-th point cloud data P iWhen it is on the side pointed by the normal vector of the triangle mesh, it means that the distance from the point to the triangle mesh is positive. At this time, d i ≥0, otherwise d i <0; under the condition of non-interference constraint, point cloud data is used to point to surface S 1 The absolute value of the nearest distance is used as the penalty term, and the constructed expression is:
[0099]
[0100] Among them, |min(distances1)| represents the distance from the point cloud data point to the target surface S 1 The absolute value of the closest signed distance. i ≥0, it means that there is no interference between the two surfaces, penalty1=0; if d i <0, it means that the two surfaces interfere with each other, penalty1=|min(distances1)|.
[0101] The force stability requirement needs to be met during the assembly and positioning process. The force stability constraint is the target surface S 1 and the surface to be matched S 2 Ability to maintain a stable state, analyze the target surface S 1 and the surface to be matched S 2 The contact state; the judgment method includes: assuming that the position of the applied force is on the surface to be matched S 2 Take a point Q on the contact point and project it to the convex hull formed by the contact points. The projection point is recorded as Q′. If Q′ is in the convex hull formed by the contact points, the force stability requirement is met. Otherwise, the force stability requirement is not met. The minimum Euclidean distance from the position where the force Force is applied to the convex hull boundary is used as the penalty term. The penalty term expression is constructed as follows:
[0102]
[0103] Where min(distances2) represents the minimum value of the Euclidean distance from the position where the force Force is applied to all vertices of the convex hull, and CH represents the convex hull formed by the contact points. If Q′∈CH, it means that Q′ is in the convex hull formed by the contact points, that is, it meets the force stability requirement, and penalty2=0; otherwise, Q′ is not in the convex hull formed by the contact points, and does not meet the force stability requirement. In this case, penalty2=min(distances2).
[0104] In the above step 3, in solving the value of the objective function based on the updated position, an improved particle swarm algorithm is used to solve the objective function, wherein the improved particle swarm algorithm includes:
[0105] Step (31) initializes parameters, including population size N, number of dimensions of variables to be optimized D, maximum inertia weight coefficient ω max , minimum inertia weight coefficient ω min , maximum social learning factor c 1max , minimum social learning factor c 1min , maximum self-learning factor c 2max , minimum self-learning factor c 2min , maximum number of iterations k max , simulated annealing factor β;
[0106] Step (32) initializes the positions and velocities of all particles in the population, expressed as:
[0107]
[0108] In formula (3), x(i) represents the position of all particles in the population, X i =(x i1 ,x i2 ,x i3 ,x i4 ,x i5 ,x i6 ), τ represents the proportional coefficient, μ represents the modulation coefficient, π represents the circumference, and r represents a random number in the interval [0,1]; when τ∈(0,1) and μ∈(0,1), equation (3) processes the chaotic state and transforms the chaotic value into the search space of the population. The new population position X is obtained by using equations (4) and (5) i ' and initial speed value V i ′ ;
[0109] X i ′=X min +X i (X max -X min ) Formula (4)
[0110] V i ′=V min +V i (V max -V min ) Formula (5)
[0111] In formula (4) and formula (5), X min Indicates the minimum value of the position, X max Indicates the maximum value of the position, V min Indicates the minimum value of speed, V max Indicates the maximum value of speed;
[0112] Step (33) calculates the fitness function value of each particle based on step (32), finds the individual optimal and global optimal solutions according to the fitness value, uses the improved objective function formula (6) as the fitness function, and uses formula (7) to set the initial temperature of simulated annealing, which is expressed as:
[0113] Fit=F(T k ,R k ) Formula (6)
[0114]
[0115] In formula (6) and formula (7), t 0 is the initial temperature, is the global optimal fitness value, β is the simulated annealing factor, and k is the current number of iterations;
[0116] Step (34) updates the velocity of the particle swarm, adjusts the position of the particle swarm, and adaptively changes the inertia weight ω and the learning factor c 1 and c 2 , the expression is:
[0117]
[0118] In the formula, represents the velocity of particle i at the k+1th iteration in the dth dimension, ω represents the inertia weight coefficient, represents the velocity of particle i at the kth iteration in the dth dimension, c 1 represents the social learning factor, represents the individual optimal solution of particle i in the k+1th iteration in the dth dimension, represents the position of particle i at the kth iteration in the dth dimension, c 2 represents the self-learning factor, represents the global optimal solution of particle i in the k+1th iteration in the dth dimension, ω max represents the maximum value of the inertia weight, ω min represents the minimum value of inertia weight, k max represents the maximum number of iterations, c 1max represents the maximum value of the social learning factor, c 1min represents the minimum value of the social learning factor, k represents the current number of iterations, and c 2 represents the self-learning factor, c 2max represents the maximum value of the self-learning factor, c 2min represents the minimum value of the self-learning factor; rand represents a random number between 0 and 1. represents the individual optimal solution, represents the global optimal solution;
[0119] Step (35) calculates the fitness value of the updated particle in step (34), and determines whether it is better than the previous generation according to the fitness value. If the current position of a particle after the update shows a higher fitness than its historical optimal position, the historical optimal position record of this particle is updated; otherwise, the position is accepted with a certain probability; after evaluating all particles, the global optimal value of the entire particle group is compared and updated;
[0120] Step (36) Calculate the probability p of accepting the new solution according to the Metropolis criterion i (k), the calculation formula is:
[0121]
[0122] In formula (8), Fit i (k) represents the fitness value of the i-th particle at the k-th iteration; k represents the fitness value of the optimal point of the current population, and t(k) represents the temperature at the kth iteration;
[0123] Step (37) Compare the probability p i (k) and rand(0,1), determine whether the generated new solution replaces the global optimal solution for simulated annealing operation, if so, perform cooling process and update temperature; otherwise, return to step (34);
[0124] Step (38) determines whether the algorithm has reached the iteration termination condition. If not, it returns to step (34) to continue the next iteration. Otherwise, it outputs the current optimal particle, including the parameter vector (α, β, γ, t x , t y , t z ) is the optimal solution.
[0125] Step 4: According to the final contact point between the target surface in step 3 and the surface to be matched, perform precision assembly error analysis on the parts.
[0126] A system for analyzing errors in precise assembly of parts based on multi-constrained surface matching according to an embodiment of the present invention is based on the above-mentioned method for analyzing errors in precise assembly of parts based on multi-constrained surface matching.
[0127] See also Figure 2-Figure 7, taking the precision machined vibration plate as the object, the assembly error is analyzed. The precision machined vibration plate is mainly composed of parts such as a hopper and a chassis, and the quality of its assembly will directly affect the accuracy of the precision product. The various parts in the precision machined vibration plate are matched through two surfaces that cooperate with each other. The analysis is conducted around two key parts, Part 1 and Part 2. Both Part 1 and Part 2 are rotating body structures, and their contact interface is an annular plane. The embodiment of the present invention samples the lower surface of Part 2 to obtain 1152 three-dimensional point cloud data points, denoted as P={P 1 ,P 2 ,...,P 1152}, that is, the source point set; after triangular mesh division, there are 1279 triangular meshes on the upper surface of part 1, denoted as M = {M 1 ,M 2 ,...,M 1279 By searching the point cloud to the triangle mesh, the closest point is taken as the target point set P′, denoted as P′={P 1 ′,P 2 ′,...,P 1152 ′}. Therefore, the source point set and the target point set are the closest corresponding point pairs. The optimal homogeneous transformation matrix is obtained through continuous algorithm iteration, that is, the output parameter vector (α, β, γ, t x , t y , t z ). In this embodiment, in addition to using the above-mentioned error analysis method to perform assembly error analysis of two key parts, a particle swarm algorithm is also used to solve the unconstrained positioning model, and an improved particle swarm algorithm is used to solve the unconstrained positioning model.
[0128] In the process of model solving, the basic parameters of the particle swarm algorithm are N = 50, D = 6, ω max =0.9,ω min =0.4, c 1 =1.3, c 2 =1.7, k max =50. Using the linear inertia weight coefficient, the expression is:
[0129]
[0130] The transformation parameters for matching two key parts can be found in Figure 8 For parameter comparison, please refer to Fig. 9For parameter α, the error of the unconstrained positioning model solved by the particle swarm algorithm is the largest, which is 0.5000; for parameter β, the error of the unconstrained positioning model solved by the particle swarm algorithm is close to 0, which has a large error with the other two methods; for parameter γ, the error of the unconstrained positioning model solved by the particle swarm algorithm is close to that of the improved particle swarm algorithm, and the error of the embodiment of the present invention and the other two methods is 0.1664 and 0.1194 respectively; for parameter t x The particle swarm algorithm is closer to the proposed method in solving the unconstrained positioning model. The error between the improved particle swarm algorithm and the other two methods is 0.0118 and 0.1515 respectively. y The error between the unconstrained positioning model solved by the particle swarm algorithm and the unconstrained positioning model solved by the improved particle swarm algorithm is the largest, and the error is 0.2523; for the parameter t z , and the value of solving the unconstrained positioning model using the improved particle swarm algorithm is the largest.
[0131] For the curve of optimal fitness value changing with the number of iterations, please refer to Fig.10 It can be seen that when no constraint is added, the fitness function value of the improved particle swarm algorithm in the initial stage is greater than that of the basic particle swarm algorithm; while in the final stage of the search, the fitness function value of the improved particle swarm algorithm is less than that of the basic particle swarm algorithm, which has higher accuracy, verifying the effectiveness of the algorithm improvement strategy of the embodiment of the present invention. After the iteration is completed, the objective function values under the three different conditions are 1.5375x10 3 mm, 1.0914x10 3 mm, 2.4345x10 3 mm. The results show that the improved particle swarm algorithm has a 29% higher accuracy than the basic particle swarm algorithm in solving the unconstrained positioning model, which verifies that the improved algorithm has good robustness. When the improved particle swarm algorithm is used to solve the multi-constrained positioning model in the embodiment of the present invention, the objective function value is almost 1.6 times that of the particle swarm algorithm when solving the unconstrained positioning model, and 2.2 times that of the improved particle swarm algorithm when solving the unconstrained positioning model. The objective function value when the improved particle swarm algorithm is used to solve the multi-constrained positioning model is larger than the other two because the embodiment of the present invention takes into account the non-interference constraint.
[0132] Please refer to the interference under three different conditions. Fig.11, including the number of interference points and the percentage of interference points to the total number of points. When the particle swarm algorithm is used to solve the unconstrained positioning model, 34.64% of the points interfere. When the improved particle swarm algorithm is used to solve the unconstrained positioning model, 43.66% of the points interfere. There is no interference in the embodiment of the present invention. Therefore, it is reasonable for the embodiment of the present invention to consider the constraint condition that there is no interference between the two surfaces. The extreme pursuit of the shortest distance cannot accurately reflect the actual assembly process. At the same time, it also verifies that it is reasonable for the embodiment of the present invention to have the maximum objective function value at the end of the iteration.
[0133] After the surface matching is completed, the contact points of the two surfaces are calculated. The contact point coordinates obtained under three different conditions can be found in Fig.12 To visualize the convex hull of the contact points, see Fig.13 , Fig.14 , Fig.15 Since the hopper will exert a certain pressure on the lower parts after loading the material, the position of the force in the figure is the position of equivalent force. The results show that Fig.13 The projection point of the neutral force cannot fall within the convex hull formed by the contact points, which does not meet the stability requirements of the force. Fig.14 and Fig.15 The projection points of the neutral force can all fall within the convex hull formed by the contact points, that is, they meet the force stability requirements. These three methods verify that it is necessary to consider the force stability requirements in the embodiments of the present invention.
[0134] The embodiments of the present invention significantly improve the accuracy and authenticity of the parts precision assembly process by introducing two types of constraints, namely non-interference and force stability, and improving the basic particle swarm algorithm. It can be used in various assembly error analysis scenarios in the field of precision assembly and has wide practical application value.
[0135] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should be included in the protection scope of the present invention.
Claims
1. A method for analyzing the error of precision assembly of parts based on multi-constrained surface matching, characterized in that: include: Step 1: Obtain a target surface and a surface to be matched based on multiple constraints, convert the target surface into a triangular mesh model, and convert the surface to be matched into three-dimensional point cloud data; Step 2: Initialize the triangular mesh model and the three-dimensional point cloud data; Step 3: Using a nonlinear control method to adjust the target surface and the surface to be matched, and optimizing the surface matching process until a termination matching condition is met; Step 4: performing precision assembly error analysis of parts according to the final contact point between the target curved surface and the curved surface to be matched in step 3; The step three comprises: calculating the homogeneous transformation matrix of the three-dimensional point cloud data in the step two, so that the target surface and the surface to be matched satisfy the objective function under the non-interference constraint and the force stability constraint; wherein: The non-interference constraint is that the target surface S1 and the surface to be matched S2 cannot interfere with each other during the matching process, where d i ≥0,d i Indicates the distance from the point to the triangular mesh; the judgment method includes: when the i-th point cloud data P i When it is on the side pointed by the normal vector of the triangle mesh, it means that the distance from the point to the triangle mesh is positive. At this time, d i ≥0, otherwise d i <0; The force stability constraint refers to the ability of the target surface S1 and the surface to be matched S2 to maintain a stable state, and the contact state of the target surface S1 and the surface to be matched S2 is analyzed; the judgment method includes: assuming that the position of the applied force is at a point Q on the surface to be matched S2, and projecting the point to the convex hull formed by the contact points, and the projection point is recorded as Q′; if Q′ is in the convex hull formed by the contact points, the force stability requirement is met, otherwise the force stability requirement is not met.
2. The method for analyzing the error of parts precision assembly based on multi-constraint surface matching according to claim 1 is characterized in that: The step one comprises: Obtaining a target surface S1 and a surface to be matched S2 based on a non-interference constraint and a force stability constraint, wherein the target surface S1 matches the surface to be matched S2 and has a processing error; Convert the target surface S1 into a triangular mesh model M, where M = {M1, M2, ..., M i ,...,M n-1 ,M n }, where M i represents the i-th triangle mesh, and n represents the total number of triangle meshes; The surface to be matched S2 is sampled to obtain the three-dimensional point cloud data P, P = {P1, P2, ..., P i ,...,P m-1 ,P m }, where P i represents the i-th point cloud data, and m represents the total number of 3D point cloud data.
3. The method for analyzing the error of parts precision assembly based on multi-constraint surface matching according to claim 1 is characterized in that: The second step comprises: Calculating the shortest distance between each point cloud in the three-dimensional point cloud data and a triangular mesh in the triangular mesh model; Based on the shortest distance, a corresponding target point set M is established between the target surface S1 and the surface to be matched S2. i,0 and source point set P i,0 , where the target point set M i,0 Represents the corresponding point set at the initial position of the target surface S1, the source point set P i,0 Represents the corresponding point set at the initial position of the surface S2 to be matched.
4. The method for analyzing the error of parts precision assembly based on multi-constrained surface matching according to claim 3 is characterized in that: The step three also includes: The source point set P is controlled by nonlinear control method. i,0 A new point set is formed by coordinate transformation, the position of the three-dimensional point cloud data on the surface S2 to be matched is updated, and the value of the objective function is solved based on the updated position; If the value is greater than the given threshold, the iteration continues until the maximum number of iterations is reached or the value is less than the given threshold and the iteration stops.
5. The method for analyzing the error of parts precision assembly based on multi-constrained surface matching according to claim 4 is characterized in that: The expression of the objective function is: In formula (1), F(T k ,R k ) represents the average distance from all 3D point cloud data to the nearest triangular mesh after the 3D point cloud data P is translated and rotated; T k represents the optimal translation matrix, R k represents the optimal rotation matrix, P i,k-1 represents the source point set, M i,k represents the closest point, m represents the total number of 3D point cloud data, α represents the angle of rotation of the point set around the x-axis, β represents the angle of rotation of the point set around the y-axis, γ represents the angle of rotation of the point set around the z-axis, and t x Indicates the distance that the point set is translated along the x-axis, t y Indicates the distance that the point set is translated along the y-axis, t z Indicates the distance the point set is translated along the z-axis.
6. The method for analyzing the error of parts precision assembly based on multi-constrained surface matching according to claim 3 is characterized in that: The numerical expression for solving the objective function is: In formula (2), F k represents the objective function value after the kth iteration, m represents the total number of 3D point cloud data, P i,k Represents point cloud, M i,k Represents the closest distance point from the point cloud to each triangle mesh, ||P i,k -M i,k || indicates P after the kth iteration i,k and M i,k The Euclidean distance between two point sets.
7. The method for analyzing the error of parts precision assembly based on multi-constraint surface matching according to claim 3 is characterized in that: In solving the value of the objective function based on the updated position, an improved particle swarm algorithm is used to solve the objective function, wherein the improved particle swarm algorithm includes: Step (31) initializes parameters, which include population size N, number of dimensions of variables to be optimized D, maximum inertia weight coefficient ω max , minimum inertia weight coefficient ω min , maximum social learning factor c 1max , minimum social learning factor c 1min , maximum self-learning factor c 2max , minimum self-learning factor c 2min , maximum number of iterations k max , simulated annealing factor β; Step (32) initializes the positions and velocities of all particles in the population, expressed as: In formula (3), x(i) represents the position of all particles in the population, X i =(x i1 ,x i2 ,x i3 ,x i4 ,x i5 ,x i6 ), τ represents the proportional coefficient, μ represents the modulation coefficient, π represents the circumference, and r represents a random number in the interval [0,1]; when τ∈(0,1) and μ∈(0,1), equation (3) processes the chaotic state and transforms the chaotic value into the search space of the population. The new population position X is obtained by using equations (4) and (5) i ' and initial speed value V i ′; X i ′=X min +X i (X max -X min ) Formula (4) V i ′ = V min + V i (V max - V min ) Equation (5) In formula (4) and formula (5), X min Indicates the minimum value of the position, X max Indicates the maximum value of the position, V min Indicates the minimum value of speed, V max Indicates the maximum value of speed; Step (33) calculates the fitness function value of each particle based on step (32), finds the individual optimal and global optimal solutions according to the fitness value, uses the improved objective function formula (6) as the fitness function, and uses formula (7) to set the initial temperature of simulated annealing, which is expressed as: Fit=F(T k ,R k ) Formula (6) In equations (6) and (7), t0 is the initial temperature, is the global optimal fitness value, β is the simulated annealing factor, and k is the current number of iterations; Step (34) updates the velocity of the particle swarm, adjusts the position of the particle swarm, and adaptively changes the inertia weight ω, learning factors c1 and c2. The expression is: In the formula, represents the velocity of particle i at the k+1th iteration in the dth dimension, ω represents the inertia weight coefficient, represents the speed of particle i in the kth iteration in the dth dimension, c1 represents the social learning factor, represents the individual optimal solution of particle i in the k+1th iteration in the dth dimension, represents the position of particle i at the kth iteration in the dth dimension, c2 represents the self-learning factor, represents the global optimal solution of particle i in the k+1th iteration in the dth dimension, ω max represents the maximum value of the inertia weight, ω min represents the minimum value of the inertia weight, k max represents the maximum number of iterations, c 1max represents the maximum value of the social learning factor, c 1min represents the minimum value of the social learning factor, k represents the current number of iterations, c2 represents the self-learning factor, c 2max represents the maximum value of the self-learning factor, c 2min represents the minimum value of the self-learning factor; rand represents a random number between 0 and 1. represents the individual optimal solution, represents the global optimal solution; Step (35) calculates the fitness value of the updated particle in step (34), and determines whether it is better than the previous generation according to the fitness value. If the current position of a particle after the update shows a higher fitness than its historical optimal position, the historical optimal position record of this particle is updated; otherwise, the position is accepted with a certain probability; after evaluating all particles, the global optimal value of the entire particle group is compared and updated; Step (36) Calculate the probability p of accepting the new solution according to the Metropolis criterion i (k), the calculation formula is: In formula (8), Fit i (k) represents the fitness value of the i-th particle at the k-th iteration; k represents the fitness value of the optimal point of the current population, and t(k) represents the temperature at the kth iteration; Step (37) Compare the probability p i (k) and rand(0,1), determine whether the generated new solution replaces the global optimal solution for simulated annealing operation, if so, perform cooling process and update temperature; otherwise, return to step (34); Step (38) determines whether the algorithm has reached the iteration termination condition. If not, it returns to step (34) to continue the next iteration. Otherwise, it outputs the current optimal particle, including the parameter vector (α, β, γ, t x , t y , t z ) is the optimal solution.
8. The method for analyzing the error of parts precision assembly based on multi-constraint surface matching according to claim 1 is characterized in that: The fourth step comprises: According to the final contact point between the target surface S1 and the surface to be matched S2 when the iteration is stopped in step 3, the precision assembly error of the parts is analyzed.
9. A parts precision assembly error analysis system based on multi-constraint surface matching, characterized in that: Based on the above-mentioned method for analyzing the error of precision assembly of parts based on multi-constrained surface matching, the system for analyzing the error of precision assembly of parts includes: An acquisition unit, which acquires a target surface and a surface to be matched based on multiple constraints, converts the target surface into a triangular mesh model, and converts the surface to be matched into three-dimensional point cloud data; A processing unit is configured to initialize the triangular mesh model and the three-dimensional point cloud data; use a nonlinear control method to adjust the target surface and the surface to be matched, and optimize the surface matching process until a termination matching condition is met; The analysis unit performs part precision assembly error analysis according to the final contact point between the target curved surface of the processing unit and the curved surface to be matched.
Citation Information
Patent Citations
Thin-wall blade error analytical method
CN103292760A
Prefabricated part assembling and matching method based on picture analysis
CN111369607A
Calculation method for solving curved surface and curved surface assembly pose
CN118094062A