Workpiece positioning correction method, correction device, correction system and storage medium

The workpiece positioning correction is performed through simulated annealing-particle swarm optimization algorithm, which solves the problem of workpiece positioning accuracy and deformation in three-dimensional laser cutting, and realizes a fast and simple correction process, improving processing efficiency and accuracy.

CN118616924BActive Publication Date: 2024-12-10BYD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411093011.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-12-10
Estimated Expiration
2044-08-09

AI Technical Summary

Technical Problem

During the three-dimensional laser cutting process, it is difficult to achieve accurate positioning correction of the body workpiece, resulting in machining errors and deformation problems. The prior art operations are complex and time-consuming.

Method used

The simulated annealing-particle swarm optimization algorithm is used to obtain workpiece measurement data and model data, determine the objective function and search space, optimize the workpiece positioning, automatically correct the workpiece positioning, and reduce machining errors.

Benefits of technology

It realizes the rapid, simple and accurate workpiece positioning correction, improves processing efficiency, reduces processing errors, and is suitable for workpieces of various materials.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118616924B_ABST
    Figure CN118616924B_ABST
Patent Text Reader

Abstract

The present application discloses a workpiece positioning correction method, a correction device, a correction system and a computer-readable storage medium. The workpiece positioning correction method comprises: obtaining workpiece measurement data and workpiece model data of the workpiece to be positioned; determining the objective function for positioning optimization of the workpiece to be positioned according to the workpiece measurement data and the workpiece model data; determining the search space for positioning optimization of the workpiece to be positioned according to the size of the workpiece to be positioned; in the search space, correcting the workpiece model data based on the simulated annealing-particle swarm optimization algorithm, minimizing the objective function, and determining the workpiece positioning data. In this way, it is not affected by the material of the workpiece to be positioned, and the operation is simple and the correction speed is fast, which can effectively improve the processing efficiency of the workpiece and reduce the processing error.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of mechanical processing technology, and in particular to a workpiece positioning correction method, a correction device, a correction system and a computer-readable storage medium. Background Art

[0002] Three-dimensional laser cutting has the advantages of high efficiency and environmental protection. In recent years, major domestic and foreign automobile manufacturers are gradually using laser cutting to replace some production processes of some body parts in the trial production, development and modification of prototypes. Most body parts are large and thin shell parts, which are prone to positioning deviation and deformation during the clamping process. In order to ensure the processing accuracy of the workpiece, positioning correction of the body workpiece is very necessary. Summary of the invention

[0003] The embodiments of the present application provide a workpiece positioning correction method, a correction device, a correction system and a computer-readable storage medium to solve at least one of the above-mentioned technical problems.

[0004] The workpiece positioning correction method of the embodiment of the present application includes:

[0005] Acquire workpiece measurement data and workpiece model data of the workpiece to be positioned;

[0006] Determine an objective function for optimizing the positioning of the workpiece to be positioned according to the workpiece measurement data and the workpiece model data;

[0007] Determine a search space for optimizing the positioning of the workpiece to be positioned according to the size of the workpiece to be positioned;

[0008] In the search space, the workpiece model data is corrected based on a simulated annealing-particle swarm optimization algorithm to minimize the objective function to determine the workpiece positioning data.

[0009] In some embodiments, the step of obtaining workpiece measurement data and workpiece model data of the workpiece to be positioned includes:

[0010] Measuring the coordinates of a plurality of measuring points on the workpiece to be positioned based on a contact measurement sensor to obtain the workpiece measurement data;

[0011] The model of the workpiece to be positioned is imported into simulation software, and the coordinates of a plurality of model points corresponding to the plurality of measurement points are determined to obtain the workpiece model data.

[0012] In some embodiments, determining a search space for optimizing the positioning of the workpiece to be positioned according to the size of the workpiece to be positioned includes:

[0013] Determining a bounding box of the workpiece to be located;

[0014] Determining the size of the bounding box;

[0015] A space formed by a predetermined ratio of the size of the bounding box is taken as the search space for optimizing the positioning of the workpiece to be positioned.

[0016] In some embodiments, the workpiece model data is corrected based on a simulated annealing-particle swarm optimization algorithm within the search space to minimize the objective function to determine the workpiece positioning data, including:

[0017] Initializing particle swarm information in the search space;

[0018] Calculating the objective function value of each particle in the particle swarm based on the particle swarm information, and determining the optimal solution of each particle according to the particle swarm information and the objective function value of each particle, so as to determine the group optimal solution of the particle swarm;

[0019] Determining a simulation temperature of a simulated annealing algorithm according to the group optimal solution;

[0020] Calculating the annealing fitness of each particle at the simulation temperature, and replacing the group optimal solution based on a predetermined strategy according to the annealing fitness of each particle;

[0021] The particle swarm information is updated according to the replaced swarm optimal solution to obtain updated particle swarm information;

[0022] Recalculating the objective function value of each particle based on the updated particle swarm information, and updating the optimal solution of each particle itself and the group optimal solution of the particle swarm;

[0023] The simulation temperature is lowered, and when the maximum number of iterations is not reached, the step of returning to the step of calculating the annealing fitness of each particle at the simulation temperature, and replacing the group optimal solution based on a predetermined strategy according to the annealing fitness of each particle.

[0024] In some embodiments, the initializing particle swarm information in the search space includes:

[0025] Determine the population size of the particle swarm and the maximum number of iterations;

[0026] Based on the population size, particle swarm information is randomly generated in the search space, where the particle swarm information includes an initial position and an initial velocity of each particle.

[0027] In some embodiments, after lowering the simulation temperature, correcting the workpiece model data based on a simulated annealing-particle swarm optimization algorithm in the search space to minimize the objective function to determine the workpiece positioning data further includes:

[0028] When the maximum number of iterations is reached, the iteration is ended;

[0029] The corrected workpiece model data is determined according to the updated particle swarm information to obtain the workpiece positioning data.

[0030] In certain embodiments, the predetermined strategy comprises a roulette strategy.

[0031] The workpiece positioning and correction device of the embodiment of the present application includes:

[0032] An acquisition module, used for acquiring workpiece measurement data and workpiece model data of the workpiece to be positioned;

[0033] A first determination module, used to determine an objective function for positioning optimization of the workpiece to be positioned according to the workpiece measurement data and the workpiece model data;

[0034] A second determination module is used to determine a search space for optimizing the positioning of the workpiece to be positioned according to the size of the workpiece to be positioned;

[0035] The correction module is used to correct the workpiece model data within the search space based on a simulated annealing-particle swarm optimization algorithm to minimize the objective function to determine the workpiece positioning data.

[0036] The workpiece positioning correction system of the embodiment of the present application includes one or more processors and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the workpiece positioning correction method of any of the above embodiments is implemented.

[0037] The computer-readable storage medium of the embodiment of the present application stores a computer program thereon, and when the program is executed by a processor, the workpiece positioning correction method of any of the above-mentioned embodiments is implemented.

[0038] In the workpiece positioning correction method, correction device, correction system and computer-readable storage medium of the embodiment of the present application, the workpiece measurement data and workpiece model data of the workpiece to be positioned are obtained, and the workpiece model data is corrected based on the simulated annealing-particle swarm optimization algorithm within a determined search space to minimize the objective function to determine the workpiece positioning data. In this way, it is not affected by the material of the workpiece to be positioned, and the operation is simple and the correction speed is fast, which can effectively improve the processing efficiency of the workpiece and reduce the processing error.

[0039] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0041] Figure 1 is a schematic flow chart of a workpiece positioning correction method in certain embodiments of the present application;

[0042] Figure 2 is a schematic diagram of deviations between a plurality of model points of a workpiece to be positioned and a plurality of corresponding measurement points in a CAM software of certain embodiments of the present application;

[0043] Figure 3 is a schematic flow chart of a workpiece positioning correction method in certain embodiments of the present application;

[0044] Figure 4 is a schematic diagram of deviations between a plurality of model points of a workpiece to be positioned and a plurality of corresponding measurement points in certain embodiments of the present application;

[0045] Figure 5 is a schematic flow chart of a workpiece positioning correction method in certain embodiments of the present application;

[0046] Figure 6 is a schematic flow chart of a workpiece positioning correction method in certain embodiments of the present application;

[0047] Figure 7 is a schematic flow chart of a simulated annealing-particle swarm optimization algorithm in certain embodiments of the present application;

[0048] Figure 8 is a schematic flow chart of a workpiece positioning correction method in certain embodiments of the present application;

[0049] Fig. 9 is a schematic flow chart of a workpiece positioning correction method in certain embodiments of the present application;

[0050] Fig.10 is a schematic diagram of a module of a workpiece positioning correction device according to certain embodiments of the present application;

[0051] Fig.11 is a schematic diagram of a module of a workpiece positioning and correction system according to certain embodiments of the present application;

[0052] Fig.12 It is a schematic diagram of the connection status between a computer-readable storage medium and a processor in certain embodiments of the present application. DETAILED DESCRIPTION

[0053] The following is a further description of the embodiments of the present application in conjunction with the accompanying drawings. The same or similar reference numerals in the accompanying drawings represent the same or similar elements or elements with the same or similar functions from beginning to end. In addition, the embodiments of the present application described below in conjunction with the accompanying drawings are exemplary and are only used to explain the embodiments of the present application, and cannot be understood as limiting the present application.

[0054] See also Figure 1 The embodiment of the present application provides a workpiece positioning correction method. The workpiece positioning correction method includes:

[0055] 010: Acquire workpiece measurement data and workpiece model data of the workpiece to be positioned;

[0056] 020: Determine the objective function for positioning optimization of the workpiece to be positioned according to the workpiece measurement data and the workpiece model data;

[0057] 030: Determine a search space for optimizing the positioning of the workpiece to be positioned according to the size of the workpiece to be positioned;

[0058] 040: In the search space, the workpiece model data is corrected based on the simulated annealing-particle swarm optimization algorithm to minimize the objective function to determine the workpiece positioning data.

[0059] In the workpiece positioning correction method of the embodiment of the present application, the workpiece measurement data and workpiece model data of the workpiece to be positioned are obtained, and the workpiece model data is corrected based on the simulated annealing-particle swarm optimization algorithm within a determined search space to minimize the objective function to determine the workpiece positioning data. In this way, it is not affected by the material of the workpiece to be positioned, and the operation is simple and the correction speed is fast, which can effectively improve the processing efficiency of the workpiece and reduce the processing error.

[0060] Specifically, the workpiece to be positioned can be any workpiece that needs to be three-dimensionally laser cut. In the embodiment of the present application, a battery pack shell workpiece (such as Figure 2 The workpiece measurement data and workpiece model data of the workpiece to be positioned are obtained. The workpiece measurement data includes the coordinates of multiple measurement points of the workpiece to be positioned, and the workpiece model data includes the coordinates of model points corresponding to the multiple measurement points. The workpiece measurement data represents the actual posture of the workpiece to be positioned when it is clamped on the machine tool. The workpiece model data is the model posture of the workpiece to be positioned in the processing software. The workpiece to be positioned is in an unclamped state, and the processing software can be computer-aided manufacturing (CAM) software.

[0061] It should be noted that when the workpiece to be positioned is clamped on the machine tool, the position and posture will shift due to the clamping error; and under the action of the clamping force of the tooling, the workpiece may bend and deform, especially the thin shell workpiece. Therefore, there will be a deviation between the model posture and the actual posture. In order to minimize the error of the workpiece after processing, it is necessary to use the actual posture as a reference to make the model posture in the processing software as close to the actual posture as possible, so as to accurately plan the processing path of the workpiece to be positioned on the machine tool in the processing software.

[0062] The workpiece measurement data is used as the reference pose, and the workpiece model data is used as the pose to be corrected. The objective function for positioning optimization of the workpiece to be positioned is determined based on the workpiece measurement data and the workpiece model data. The goal is to minimize the error between the workpiece measurement data and the workpiece model data. Afterwards, in order to ensure the efficiency of the positioning optimization solution and avoid invalid solutions, the search space for positioning optimization of the workpiece to be positioned can be determined based on the size of the workpiece to be positioned. In the search space, the workpiece model data is corrected based on the simulated annealing-particle swarm optimization algorithm. The correction goal is to minimize the objective function. The corrected workpiece model data is the workpiece positioning data.

[0063] In related technologies, the three-dimensional model of the workpiece is reconstructed through visual methods, and then graphic matching is performed to determine the actual position and posture of the workpiece. However, the light source used in the visual method is more sensitive to the material of the workpiece surface. For strongly reflective materials, it is difficult for the camera to identify, resulting in large reconstruction errors. In addition, the visual method is more suitable for planar two-dimensional reconstruction. When performing three-dimensional reconstruction of large-sized complex parts, multiple back-and-forth scans are required, and then image stitching is performed. The operation is complicated and time-consuming. In other related technologies, flexible tooling is used to position and clamp the workpiece to prevent the workpiece from bending and deforming, but the installation process of flexible tooling is complicated, requires high skills and quality of the operator, and has poor reliability in long-term use.

[0064] In the implementation mode of the present application, the workpiece measurement data and workpiece model data of the workpiece to be positioned are obtained, the workpiece measurement data is used as the reference posture, the workpiece model data is used as the posture to be corrected, and within a determined search space, the minimization objective function is used as the correction target, and the workpiece model data is corrected based on the simulated annealing-particle swarm optimization algorithm to determine the workpiece positioning data. In practical applications, after obtaining the workpiece measurement data and the workpiece model data, the correction of the posture of the workpiece to be positioned can be automatically completed in the processing software. In this way, it is not affected by the material of the workpiece to be positioned, and the operation is simple, the correction speed is fast, and the processing efficiency of the workpiece can be effectively improved and the processing error can be reduced.

[0065] See also Figure 3 In some embodiments, obtaining workpiece measurement data and workpiece model data (ie, 010) of the workpiece to be positioned includes:

[0066] 011: Measuring the coordinates of multiple measuring points on the workpiece to be positioned based on a contact measurement sensor to obtain workpiece measurement data;

[0067] 012: Import the model of the workpiece to be positioned into the simulation software, determine the coordinates of multiple model points corresponding to the multiple measurement points, and obtain the workpiece model data.

[0068] Specifically, the process of obtaining workpiece measurement data is as follows: the workpiece to be positioned is mounted on a processing machine tool, and the coordinates of multiple measurement points on the workpiece to be positioned are measured using a contact measurement sensor, and the workpiece measurement data includes the coordinates of the multiple measurement points. The position and posture of the workpiece to be positioned in space can be determined based on the coordinates of the multiple measurement points.

[0069] The contact measurement sensor has high measurement accuracy, so that high-precision workpiece measurement data can be obtained. The contact measurement sensor can be a Renishaw probe on a CNC machine tool, and of course, it can also be other contact measurement sensors, which are not limited here.

[0070] It can be understood that the coordinates of three points of an object can determine the position of the object in space. Therefore, the number of measurement points is at least 3. Of course, the number of measurement points can be 4, 5, 6 or more. Taking the number of measurement points as 3 as an example, let the coordinates of the 3 measurement points be , , , stored in the form of a matrix, as shown below:

[0071]

[0072] in, , , The measuring points The X-axis, Y-axis, and Z-axis coordinates. , , The measuring points The X-axis, Y-axis, and Z-axis coordinates. , , The measuring points The X-axis, Y-axis, and Z-axis coordinates.

[0073] Taking CAM software as an example, the process of obtaining workpiece model data is as follows: import the digital model of the workpiece to be positioned into the CAM software, so that the model of the workpiece to be positioned is located at the position set in the CAM software to simulate the position of the workpiece to be positioned on the machine tool. And determine the coordinates of multiple model points corresponding to multiple measurement points in the CAM software. One measurement point corresponds to one model point. Taking the number of measurement points as 3 as an example, the coordinates of the three model points are respectively , , , stored in the form of a matrix, as shown below:

[0074]

[0075] in, , , Model points The X-axis, Y-axis, and Z-axis coordinates. , , Model points The X-axis, Y-axis, and Z-axis coordinates. , , Model points The X-axis, Y-axis, and Z-axis coordinates.

[0076] It is understandable that Figure 4 As shown in FIG. 1 , due to the clamping error of the tooling and the bending deformation of the workpiece to be positioned, there is an error between the workpiece test data and the workpiece model data, and Therefore, it is necessary to correct the pose of the model of the workpiece to be positioned in the CAM software. In order to minimize the processing error, the pose of the model of the workpiece to be positioned in the CAM software must be as close as possible to the pose of the workpiece to be positioned in the actual measurement. Then the objective function can be set as:

[0077]

[0078] like Figure 4 As shown in the figure, the positioning optimization of the workpiece to be positioned can be regarded as As a benchmark, move , so that the distance between the corresponding points of the two triangles is the shortest. In three-dimensional space, the rotation and translation transformation of an object can be described by a homogeneous transformation matrix. It can be expressed as , The position can be expressed as:

[0079]

[0080] Among them, M is the secondary transformation matrix, which can be expressed as:

[0081]

[0082] Where R is the rotation matrix and T is the translation vector. The rotation matrix R can be expressed by the Euler angle with the rotation order of "ZYX", as follows:

[0083]

[0084] in, , , They are The angle of rotation around the Z axis, Y axis, and X axis.

[0085] The translation vector T can be expressed as:

[0086]

[0087] in, , , They are The distance to translate along the X, Y, and Z axes.

[0088] Then we can calculate With the measured The position deviation between them is shown in the following formula:

[0089]

[0090] in, , , Model points The X-axis, Y-axis, and Z-axis coordinates. , , Model points The X-axis, Y-axis, and Z-axis coordinates. , , Model points The X-axis, Y-axis, and Z-axis coordinates.

[0091] Then the objective function can be expressed as:

[0092]

[0093] The problem of optimizing the positioning of the workpiece to be positioned is transformed into finding a set of The problem of minimizing the objective function.

[0094] See also Figure 5In some embodiments, determining a search space (i.e., 030) for optimizing the positioning of the workpiece to be positioned according to the size of the workpiece to be positioned includes:

[0095] 031: Determine the bounding box of the workpiece to be located;

[0096] 032: Determine the size of the bounding box;

[0097] 033: Take a space formed by a predetermined ratio of the size of the bounding box as a search space for positioning optimization of the workpiece to be positioned.

[0098] Specifically, the embodiment of the present application is based on the simulated annealing-particle swarm optimization algorithm to solve the problem of minimizing the objective function. A search space can be determined to optimize the positioning of the workpiece to be positioned within the search space. First, the bounding box of the workpiece to be positioned is determined. The bounding box refers to a minimum cuboid that completely encloses the workpiece to be positioned.

[0099] Then determine the size of the bounding box. It should be noted that in order to ensure that there is enough search space in the optimization process and avoid missing the optimal solution, there is no restriction on the posture of the workpiece to be positioned, that is, the value range of the Euler angle is maintained. After that, the space formed by the predetermined ratio of the size of the bounding box is taken as the search space for positioning optimization of the workpiece to be positioned.

[0100] The predetermined ratio can be determined based on the actual installation conditions of the workpiece to be positioned and the efficiency requirements of the algorithm. In one example, the predetermined ratio can be 10%. For example, the bounding box size of a battery pack shell part is 1000mm*600mm*300mm. Based on the model pose of the workpiece to be positioned, the search space can be , , , , , .

[0101] See also Figure 6 and Figure 7 In some embodiments, within the search space, the workpiece model data is corrected based on a simulated annealing-particle swarm optimization algorithm to minimize the objective function to determine the workpiece positioning data (ie, 040), including:

[0102] 041: Initialize particle swarm information in the search space;

[0103] 042: Calculate the objective function value of each particle in the particle swarm based on the particle swarm information, and determine the optimal solution of each particle based on the particle swarm information and the objective function value of each particle to determine the group optimal solution of the particle swarm;

[0104] 043: Determine the simulation temperature of the simulated annealing algorithm based on the group optimal solution;

[0105] 044: Calculate the annealing fitness of each particle at the simulated temperature, and replace the optimal solution of the group based on the predetermined strategy according to the annealing fitness of each particle;

[0106] 045: Update the particle swarm information according to the replaced swarm optimal solution to obtain updated particle swarm information;

[0107] 046: Recalculate the objective function value of each particle based on the updated particle swarm information, and update the optimal solution of each particle and the group optimal solution of the particle swarm;

[0108] 047: Lower the simulation temperature, and when the maximum number of iterations is not reached, return to calculate the annealing fitness of each particle at the simulation temperature, and replace the step of the group optimal solution based on the predetermined strategy according to the annealing fitness of each particle.

[0109] Specifically, in the search space, the particle swarm information is initialized, and the generated particles can be expressed in the search space as Based on the particle swarm information, the objective function value (i.e., f) of each particle in the particle swarm can be calculated. The objective function value represents the population fitness of the particle. Based on the particle swarm information and the objective function value of each particle, the optimal solution of each particle can be determined, represented by pBest. The optimal solution of the optimal particle in the particle swarm is selected as the optimal solution of the group, represented by gBest.

[0110] Based on the group optimal solution gBest, the simulation temperature of the simulated annealing algorithm can be determined , as follows:

[0111]

[0112] in, is a positive number less than 1, the larger the simulated temperature This is useful for global searches.

[0113] After that, the annealing fitness of each particle at the simulated temperature is calculated. The calculation formula is as follows:

[0114] in, represents the objective function value of each particle, is the optimal solution of the corresponding particle itself, is the position of the particle, including , i represents the i-th particle, and n represents the population size of the particle swarm.

[0115] Afterwards, according to the annealing fitness of each particle, the optimal solution of the group can be replaced based on a predetermined strategy, and the predetermined strategy can adopt any selection strategy. In some embodiments, the predetermined strategy includes a roulette strategy. The roulette strategy selects the optimal solution of a particle itself to replace the optimal solution of the group according to the cumulative probability. The higher the fitness of the particle, the greater the probability of being selected.

[0116] The particle swarm information can be updated according to the optimal solution of the replaced group to obtain the updated particle swarm information. The updated particle swarm information is as follows:

[0117] in, is the velocity of the particle after update, is the velocity of the particle before updating. and is the learning factor, . rand is a random number between (0, 1), is the objective function value of the global optimal solution after the predetermined strategy is replaced. is the updated particle position, is the position of the particle before updating. w is the inertia weight, as shown in the following formula:

[0118]

[0119] in, is the initial inertia weight, is the inertia weight when iterating to the maximum number of iterations, is the current iteration number, is the maximum number of iterations. The inertia weight gradually decreases over time and is updated linearly to ensure that the particle has a good global search capability in the early stage of exploration and can converge quickly in the later stage of exploration.

[0120] After obtaining the updated particle swarm information, the objective function value of each particle can be recalculated, and the optimal solution of each particle itself and the optimal solution of the particle swarm can be updated. After the update, the simulation temperature is lowered to determine whether the current number of iterations has reached the maximum number of iterations. When the current number of iterations has not reached the maximum number of iterations, the annealing fitness of each particle at the simulation temperature is calculated, and the step of replacing the optimal solution of the swarm based on the predetermined strategy according to the annealing fitness of each particle is continued to iterate.

[0121] See also Figure 8 In some embodiments, initializing particle swarm information (ie, 041) in the search space includes:

[0122] 0411: Determine the population size of the particle swarm and the maximum number of iterations;

[0123] 0412: Based on the population size, particle swarm information is randomly generated in the search space. The particle swarm information includes the initial position and initial velocity of each particle.

[0124] Specifically, the population size of the particle swarm is set manually, and any size can be set. For example, the population size of the particle swarm can be set to 500, that is, the particle swarm includes 500 particles. Based on the population size of the particle swarm, particles of the corresponding population size, as well as the initial position and initial velocity of each particle are randomly generated in the search space, and the particle swarm information includes the initial position and initial velocity of each particle. The maximum number of iterations is set manually, and any number can be set. For example, the maximum number of iterations can be set to 500 times, 1000 times, 1500 times or more times.

[0125] See also Fig. 9 In some embodiments, after lowering the simulation temperature, in the search space, the workpiece model data is corrected based on the simulated annealing-particle swarm optimization algorithm to minimize the objective function to determine the workpiece positioning data (ie, 040), further comprising:

[0126] 080: When the maximum number of iterations is reached, the iteration ends;

[0127] 090: Determine the corrected workpiece model data according to the updated particle swarm information to obtain the workpiece positioning data.

[0128] Specifically, when the current number of iterations reaches the maximum number of iterations, the iteration ends. When the iteration ends, the particle swarm information is updated as the iteration result output. The updated particle swarm information includes the optimized position of each particle, that is, , based on multiple particles optimized , the optimal posture of the workpiece to be positioned can be determined.

[0129] Based on the optimized posture of the workpiece to be positioned, multiple positioning points corresponding to the above-mentioned multiple model points can be determined, and the workpiece positioning data includes the coordinates of the multiple positioning points. According to the workpiece positioning data, the posture of the workpiece to be positioned in the CAM software can be corrected. In one example, according to the optimized posture of the workpiece to be positioned, the posture of the workpiece to be positioned in the CAM software can also be corrected.

[0130] See also Fig.10, the embodiment of the present application also provides a workpiece positioning and correction device 100. The workpiece positioning and correction device 100 includes an acquisition module 10, a first determination module 20, a second determination module 30 and a correction module 40. The acquisition module 10 is used to acquire workpiece measurement data and workpiece model data of the workpiece to be positioned. The first determination module 20 is used to determine the objective function for positioning optimization of the workpiece to be positioned according to the workpiece measurement data and the workpiece model data. The second determination module 30 is used to determine the search space for positioning optimization of the workpiece to be positioned according to the size of the workpiece to be positioned. The correction module 40 is used to correct the workpiece model data within the search space based on the simulated annealing-particle swarm optimization algorithm, minimize the objective function, and determine the workpiece positioning data.

[0131] In some embodiments, the acquisition module 10 is specifically used to measure the coordinates of multiple measurement points on the workpiece to be positioned based on a contact measurement sensor to obtain workpiece measurement data; import the model of the workpiece to be positioned into the simulation software, determine the coordinates of multiple model points corresponding to the multiple measurement points, and obtain workpiece model data.

[0132] In some embodiments, the second determination module 30 is specifically used to determine the bounding box of the workpiece to be located; determine the size of the bounding box; and take a space formed by a predetermined ratio of the size of the bounding box as a search space for optimizing the positioning of the workpiece to be located.

[0133] In some embodiments, the correction module 40 is specifically used to initialize particle swarm information in the search space; calculate the objective function value of each particle in the particle swarm based on the particle swarm information, and determine the optimal solution of each particle based on the particle swarm information and the objective function value of each particle to determine the group optimal solution of the particle swarm; determine the simulation temperature of the simulated annealing algorithm based on the group optimal solution; calculate the annealing fitness of each particle at the simulation temperature, and replace the group optimal solution based on the annealing fitness of each particle based on a predetermined strategy; update the particle swarm information based on the replaced group optimal solution to obtain updated particle swarm information; recalculate the objective function value of each particle based on the updated particle swarm information, and update the optimal solution of each particle based on the updated particle swarm information, and update the optimal solution of each particle and the group optimal solution of the particle swarm; reduce the simulation temperature, and when the maximum number of iterations is not reached, return to the step of calculating the annealing fitness of each particle at the simulation temperature, and replace the group optimal solution based on the predetermined strategy based on the annealing fitness of each particle.

[0134] In some embodiments, the correction module 40 is specifically used to determine the population size of the particle swarm and the maximum number of iterations; based on the population size, the particle swarm information is randomly generated in the search space, and the particle swarm information includes the initial position and initial velocity of each particle.

[0135] In some implementations, after lowering the simulation temperature, the correction module 40 is specifically configured to end the iteration when the maximum number of iterations is reached; determine the corrected workpiece model data according to the updated particle swarm information, and obtain the workpiece positioning data.

[0136] In certain embodiments, the predetermined strategy comprises a roulette strategy.

[0137] It should be pointed out that the explanation of the workpiece positioning correction method in the aforementioned embodiment is also applicable to the workpiece positioning correction device 100 in the embodiment of the present application, and will not be elaborated here.

[0138] See also Fig.11 The embodiment of the present application further provides a workpiece positioning correction system 200. The workpiece positioning correction system 200 includes one or more processors 210 and a memory 220. The memory 220 stores a computer program. When the computer program is executed by the processor 210, the workpiece positioning correction method of any of the above embodiments is implemented.

[0139] For example, when the computer program is executed by the processor 210, the following workpiece positioning correction method is implemented:

[0140] 010: Acquire workpiece measurement data and workpiece model data of the workpiece to be positioned;

[0141] 020: Determine the objective function for positioning optimization of the workpiece to be positioned according to the workpiece measurement data and the workpiece model data;

[0142] 030: Determine a search space for optimizing the positioning of the workpiece to be positioned according to the size of the workpiece to be positioned;

[0143] 040: In the search space, the workpiece model data is corrected based on the simulated annealing-particle swarm optimization algorithm to minimize the objective function to determine the workpiece positioning data.

[0144] For another example, when the computer program is executed by the processor 210, the following workpiece positioning correction method is implemented:

[0145] 011: Measuring the coordinates of multiple measuring points on the workpiece to be positioned based on a contact measurement sensor to obtain workpiece measurement data;

[0146] 012: Import the model of the workpiece to be positioned into the simulation software, determine the coordinates of multiple model points corresponding to the multiple measurement points, and obtain the workpiece model data.

[0147] It should be pointed out that the explanations and descriptions of the workpiece positioning correction method and the workpiece positioning correction device 100 in the aforementioned embodiments are also applicable to the workpiece positioning correction system 200 in the embodiments of the present application, and will not be elaborated here.

[0148] See also Fig.12 The embodiment of the present application further provides a computer-readable storage medium 300 on which a computer program 310 is stored. When the program is executed by a processor 320, the workpiece positioning correction method of any of the above embodiments is implemented.

[0149] For example, when the program is executed by the processor 320, the following workpiece positioning correction method is implemented:

[0150] 010: Acquire workpiece measurement data and workpiece model data of the workpiece to be positioned;

[0151] 020: Determine the objective function for positioning optimization of the workpiece to be positioned according to the workpiece measurement data and the workpiece model data;

[0152] 030: Determine a search space for optimizing the positioning of the workpiece to be positioned according to the size of the workpiece to be positioned;

[0153] 040: In the search space, the workpiece model data is corrected based on the simulated annealing-particle swarm optimization algorithm to minimize the objective function to determine the workpiece positioning data.

[0154] For another example, when the program is executed by the processor 320, the following workpiece positioning correction method is implemented:

[0155] 011: Measuring the coordinates of multiple measuring points on the workpiece to be positioned based on a contact measurement sensor to obtain workpiece measurement data;

[0156] 012: Import the model of the workpiece to be positioned into the simulation software, determine the coordinates of multiple model points corresponding to the multiple measurement points, and obtain the workpiece model data.

[0157] In summary, in the workpiece positioning correction method, correction device 100, correction system 200 and computer-readable storage medium 300 of the embodiment of the present application, the workpiece measurement data and workpiece model data of the workpiece to be positioned are obtained, and the workpiece model data is corrected based on the simulated annealing-particle swarm optimization algorithm within a determined search space to minimize the objective function to determine the workpiece positioning data. In this way, it is not affected by the material of the workpiece to be positioned, and the operation is simple, the correction speed is fast, and the processing efficiency of the workpiece can be effectively improved and the processing error can be reduced.

[0158] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0159] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0160] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable storage medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, a computer-readable storage medium can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable storage media include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable storage medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0161] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0162] A person of ordinary skill in the art will appreciate that all or part of the steps carried by the method for implementing the above-mentioned embodiment can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment. In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a disk or an optical disk, etc.

[0163] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application. The scope of the present application is defined by the claims and their equivalents.

Claims

1. A workpiece positioning correction method, It is characterized in that include: Acquire workpiece measurement data and workpiece model data of the workpiece to be positioned; Determine an objective function for optimizing the positioning of the workpiece to be positioned according to the workpiece measurement data and the workpiece model data; Determine a search space for optimizing the positioning of the workpiece to be positioned according to the size of the workpiece to be positioned; In the search space, the workpiece model data is corrected based on a simulated annealing-particle swarm optimization algorithm to minimize the objective function to determine the workpiece positioning data; The step of obtaining workpiece measurement data and workpiece model data of the workpiece to be positioned includes: Measuring the coordinates of a plurality of measuring points on the workpiece to be positioned based on a contact measurement sensor to obtain the workpiece measurement data; Importing the model of the workpiece to be positioned into simulation software, determining the coordinates of a plurality of model points corresponding to the plurality of measurement points, so as to obtain the workpiece model data; The method of correcting the workpiece model data within the search space based on a simulated annealing-particle swarm optimization algorithm and minimizing the objective function to determine the workpiece positioning data includes: Initializing particle swarm information in the search space; Calculating the objective function value of each particle in the particle swarm based on the particle swarm information, and determining the optimal solution of each particle according to the particle swarm information and the objective function value of each particle, so as to determine the group optimal solution of the particle swarm; Determining a simulation temperature of a simulated annealing algorithm according to the group optimal solution; Calculate the annealing fitness of each particle at the simulation temperature, and replace the optimal solution of the group based on a predetermined strategy according to the annealing fitness of each particle. The calculation formula is as follows: in, represents the objective function value of each particle, is the optimal solution of the corresponding particle itself, To simulate temperature, is the position of the particle, i represents the i-th particle, and n represents the population size of the particle swarm; The particle swarm information is updated according to the replaced swarm optimal solution to obtain updated particle swarm information; Recalculating the objective function value of each particle based on the updated particle swarm information, and updating the optimal solution of each particle itself and the group optimal solution of the particle swarm; Lowering the simulation temperature, and when the maximum number of iterations is not reached, returning to the step of calculating the annealing fitness of each particle at the simulation temperature, and replacing the group optimal solution based on a predetermined strategy according to the annealing fitness of each particle; After lowering the simulation temperature, in the search space, correcting the workpiece model data based on a simulated annealing-particle swarm optimization algorithm to minimize the objective function to determine the workpiece positioning data, further comprising: When the maximum number of iterations is reached, the iteration is ended; The corrected workpiece model data is determined according to the updated particle swarm information to obtain the workpiece positioning data.

2. The workpiece positioning correction method according to claim 1, It is characterized in that The step of determining a search space for optimizing the positioning of the workpiece to be positioned according to the size of the workpiece to be positioned includes: Determining a bounding box of the workpiece to be located; Determining the size of the bounding box; A space formed by a predetermined ratio of the sizes of the bounding box is taken as the search space for optimizing the positioning of the workpiece to be positioned.

3. The workpiece positioning correction method according to claim 1, It is characterized in that Initializing particle swarm information in the search space includes: Determine the population size of the particle swarm and the maximum number of iterations; Based on the population size, particle swarm information is randomly generated in the search space, and the particle swarm information includes an initial position and an initial velocity of each particle.

4. The workpiece positioning correction method according to claim 1, It is characterized in that The predetermined strategy includes a roulette strategy.

5. A workpiece positioning and correction device, It is characterized in that include; An acquisition module, used for acquiring workpiece measurement data and workpiece model data of the workpiece to be positioned; A first determination module, used to determine an optimization objective function for positioning optimization of the workpiece to be positioned according to the workpiece measurement data and the workpiece model data; A second determination module is used to determine a search space for optimizing the positioning of the workpiece to be positioned according to the size of the workpiece to be positioned; A correction module, used for correcting the workpiece model data in the search space based on a simulated annealing-particle swarm optimization algorithm to minimize the objective function to determine the workpiece positioning data; The acquisition module is specifically used for: Measuring the coordinates of a plurality of measuring points on the workpiece to be positioned based on a contact measurement sensor to obtain the workpiece measurement data; Importing the model of the workpiece to be positioned into simulation software, determining the coordinates of a plurality of model points corresponding to the plurality of measurement points, so as to obtain the workpiece model data; The correction module is specifically used for: Initializing particle swarm information in the search space; Calculating the objective function value of each particle in the particle swarm based on the particle swarm information, and determining the optimal solution of each particle according to the particle swarm information and the objective function value of each particle, so as to determine the group optimal solution of the particle swarm; Determining a simulation temperature of a simulated annealing algorithm according to the group optimal solution; Calculate the annealing fitness of each particle at the simulation temperature, and replace the optimal solution of the group based on a predetermined strategy according to the annealing fitness of each particle. The calculation formula is as follows: in, represents the objective function value of each particle, is the optimal solution of the corresponding particle itself, To simulate temperature, is the position of the particle, i represents the i-th particle, and n represents the population size of the particle swarm; The particle swarm information is updated according to the replaced swarm optimal solution to obtain updated particle swarm information; Recalculating the objective function value of each particle based on the updated particle swarm information, and updating the optimal solution of each particle itself and the group optimal solution of the particle swarm; Lowering the simulation temperature, and when the maximum number of iterations is not reached, returning to the step of calculating the annealing fitness of each particle at the simulation temperature, and replacing the group optimal solution based on a predetermined strategy according to the annealing fitness of each particle; After lowering the simulated temperature, the correction module is further used for: When the maximum number of iterations is reached, the iteration is ended; The corrected workpiece model data is determined according to the updated particle swarm information to obtain the workpiece positioning data.

6. A workpiece positioning and correction system, It is characterized in that The workpiece positioning and correction system includes one or more processors and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the workpiece positioning and correction method according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the workpiece positioning correction method described in any one of claims 1 to 4 is implemented.