Robot layout optimization method based on simulated annealing algorithm

Optimizing the robot layout through simulated annealing algorithm solves the problem of insufficient work space coverage in the existing technology, achieves the flexibility and coverage of the robot work space, and improves the production efficiency and quality of complex processing tasks.

CN118569080APending Publication Date: 2024-08-30HEFEI UNIV OF TECH
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202410684458.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing technology cannot ensure that the workspace of industrial robots covers all task points, and it is difficult to adapt to the processing needs of complex components, resulting in poor layout optimization results.

Method used

The robot layout optimization method based on the simulated annealing algorithm is used to solve the robot's reachable workspace and optimal joint angle values ​​through three-dimensional modeling, forward dynamics modeling, model Carlo method and particle swarm algorithm to ensure the flexibility of the workspace. sex and coverage.

Benefits of technology

It achieves the flexibility and coverage of the robot workspace, ensures the needs of complex processing tasks, and improves production efficiency and processing quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118569080A
    Figure CN118569080A
Patent Text Reader

Abstract

The invention discloses a robot layout optimization method based on a simulated annealing algorithm. The robot layout optimization method comprises the following steps of performing three-dimensional modeling and performing positive dynamics modeling based on the three-dimensional modeling; solving the reachable working space of the robot, and determining the working boundary range of the robot; performing inverse solution on the discrete task node set to obtain a joint angle value of each discrete task node; solving an operability value and a flexibility value; establishing a constraint condition model; and establishing a fitness function by taking the flexibility value as an analysis basis, and solving a maximum flexibility value under the constraint of a constraint condition model based on a simulated annealing particle swarm algorithm. According to the method, the maximum flexibility value is obtained through the simulated annealing particle swarm optimization algorithm, optimal layout solving of the laying robot and the external shaft is achieved, in the face of tasks with high machining quality requirements, it can be ensured that the working space of the robot covers all task points, the flexibility of the working space of the robot can be considered, and the working efficiency of the robot is improved. And the requirements of complex processing tasks are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical fields of fiber placement processing and computer off-line programming, and in particular to a robot layout optimization method based on a simulated annealing algorithm. Background Art

[0002] The placement of fiber and other composite materials relies on two forms: machine tool-type equipment laying and single robot modular laying. Machine tool-type equipment laying has the advantages of high forming rate and fast production efficiency, but is limited by the loading platform of the fiber placement head. For irregular curved surface components, it often cannot meet the requirements of trajectory, posture adjustment and parameter control. Single robot modular laying is currently the most widely used, stable and efficient laying form, but when faced with complex components, a single robot cannot meet the needs of complex processing tasks.

[0003] Industrially generated layout optimization mainly relies on the practical experience of engineers to optimize the layout of robots. This method lacks systematic theoretical knowledge support, makes it difficult to evaluate the pros and cons of layout solutions, and may not achieve the best layout effect.

[0004] In order to provide systematic theoretical support and improve the layout effect, the layout optimization of existing industrial production still has a layout method that uses the accessible workspace of industrial robots as an evaluation indicator. However, this layout method cannot ensure that the robot's workspace covers all task points and the flexibility of the robot's workspace, making it difficult to adapt to modern production. Summary of the invention

[0005] To this end, the present invention provides a robot layout optimization method based on a simulated annealing algorithm, which effectively solves the technical problems in the prior art that the robot's workspace cannot cover all task points and the robot's workspace is not flexible.

[0006] In order to solve the above technical problems, the present invention specifically provides the following technical solutions: a robot layout optimization method based on simulated annealing algorithm, comprising the following steps:

[0007] Step 100, performing three-dimensional modeling on the robot and the core mold according to the robot model and the core mold size to obtain a three-dimensional model, and performing positive dynamics modeling on the three-dimensional model to obtain a positive dynamics model;

[0008] Step 200, using the Model Carlo method based on the forward kinematics model of the robot to solve the reachable workspace of the robot, and determining the boundary range of the robot's work according to the reachable workspace;

[0009] Step 300, based on the core mold size, discrete points in the laying trajectory are imported and discretized along the circumferential direction of the core mold with a sampling step length to generate a discrete task node set, and the inverse solution of the discrete task node set is obtained to obtain the joint angle value of each discrete task node;

[0010] Step 400, substituting the joint angle values ​​of all discrete task nodes into the maneuverability formula to obtain the maneuverability value, and defining the average value of all maneuverability values ​​as the flexibility value of the placement robot at this layout position;

[0011] Step 500, establishing a constraint condition model according to the collision condition between the robot body and the core mold, the singularity condition of the robot, and the reachable workspace of the robot;

[0012] Step 600, using the flexibility value as the analysis basis to establish a fitness function, using the flexibility value as the objective function, solving the maximum flexibility value under the constraint of the constraint model based on the simulated annealing particle swarm algorithm to determine the optimal joint angle value, the optimal position, and output the optimal layout.

[0013] Further, according to the robot model and the core mold size, three-dimensional modeling is performed on the robot and the core mold to obtain a three-dimensional model, and positive dynamics modeling is performed on the three models to obtain a positive dynamics model;

[0014] Among them, the forward kinematic model is:

[0015]

[0016] In the formula, "0" represents the robot base, "6" represents the end flange of the 6-DOF robot, T represents the 4*4 homogeneous transformation matrix, and θ represents the joint angle vector group. represents the homogeneous transformation matrix of the 6-DOF robot end flange relative to the robot base under the joint angle vector group θ, Represents the joint angle vector θ between link j-1 and link j j The homogeneous transformation matrix under θ, j represents the connecting rod, j = 1, 2, ... 6, θ j Represents the joint angle vector of link j.

[0017] Furthermore, the reachable workspace of the robot is solved by using the Model Carlo method based on the forward kinematics model of the robot, and the boundary range of the robot's work is determined according to the reachable workspace, which specifically includes the following steps:

[0018] Step 201, according to the range of motion of each joint angle of the robot, using the Halton random sequence function to generate N 6-dimensional random sequences halton(j, i) with a size between 0 and 1;

[0019] The joint angles are randomly generated based on the 6-dimensional random sequence halton(j, i): (i=1,2,…,6; j=1,2,…,N);

[0020] The randomly generated joint angles are used as random variables and substituted into the following formula to obtain the random values ​​of each joint angle of the robot:

[0021]

[0022] Among them, θ i,j is the angle of the jth point of joint i, represents the lower limit of the variable of joint i, represents the upper limit of the variable of joint i, halton(j, i) represents a set of j*i quasi-random number matrices with j rows and i columns;

[0023] Step 202, substituting the obtained N groups of joint variable groups randomly generated by MATLAB into the forward kinematics model of the robot to obtain the end position of the robot;

[0024] Among them, the N groups of joint variables randomly generated by MATLAB consist of random values ​​of each joint angle of the robot;

[0025] Step 203, all robot end positions are displayed on a computer by printing to display the reachable working range of the robot and obtain the boundary range of the industrial robot.

[0026] Furthermore, the operability formula is:

[0027]

[0028] Where ω is the maneuverability, ω(θ) is the maneuverability corresponding to the joint angle θ, det(·) is the determinant of the matrix, · is the content in the brackets, and λ 1 λ 2 …λ n Both represent the matrix J(θ)J T The eigenvalue of (θ), J represents the Jacobian matrix, J(θ) represents the Jacobian matrix corresponding to the joint angle θ, J T represents the transpose of the Jacobian matrix, σ 1 σ 2 …σ n All represent singular values ​​of J;

[0029] When ω = 0, the robot is at a singular point.

[0030] Furthermore, the average value of all operability values ​​is defined as the flexibility value of the placement robot at this layout position, that is:

[0031]

[0032] In the formula, Indicates the flexibility value of a certain layout position, θ jrepresents the robot joint vector of the jth discrete task node, ω j (θ j ) represents the operability value of the jth discrete task node, and N represents the size of the discrete task point set.

[0033] Furthermore, a constraint condition model is established according to the collision condition between the robot body and the core mold, the singularity condition of the robot, and the reachable workspace of the robot, including the following steps:

[0034] Establish collision constraints based on the collision between the robot body and the core mold:

[0035] cols(R,W)=0

[0036] Where cols() represents the collision function, R represents the robot, and W represents the core model.

[0037] Furthermore, the maximum flexibility value is solved under the constraint of the constraint model based on the simulated annealing particle swarm algorithm, which specifically includes the following steps:

[0038] Step 601, parameter initialization, setting annealing speed λ, acceleration coefficient c 1 and c 2 and the inertia weight ω;

[0039] Step 602, randomly generate a population of size M within a limited range, and randomly obtain the velocity and acceleration of each particle in the initial population;

[0040] Step 603, calculate the fitness value F(x i ), obtain the position P of each particle in the population id , the fitness of the particle F(P id ), the optimal position P of the population in all generations best And the optimal fitness of the population in each generation F(P best );

[0041] Step 604, according to the optimal fitness of the population of all generations, the initial temperature T is solved according to the following formula: 0 ;

[0042] T 0 =F(P best ) / lg(5)

[0043] Where T 0 represents the initial temperature, F(P best ) represents the optimal fitness of the population in all generations;

[0044] Step 605, normalizing the acceptance probability of each particle in the population at the current temperature T through the probability function of the simulated annealing algorithm of each particle;

[0045] The probability function of the simulated annealing algorithm for each particle is:

[0046]

[0047] In the formula, F SA (P id ) represents the position P of the i-th generation particle id The corresponding probability function of the simulated annealing algorithm, ΔF i =F(P id )-F(P best ), ΔF i Indicates the fitness value difference, F(P id ) represents the position P of the i-th generation particle id The corresponding fitness value, F(P best ) represents the optimal position P of the population in each generation best The corresponding fitness value, T represents the current temperature;

[0048] Step 606: Use a proportional selection algorithm to select the position P of each particle in the population. id Select one from the populations to replace the optimal position P of all generations best ;

[0049] Step 607: The optimal position P of the population of all generations best Replaced with the individual position P of the jth particle in the population jd The following formula is then used to update the position and velocity of each particle in the population:

[0050]

[0051] In the formula, k represents the current iteration number, i represents the i-th particle in the population, and d represents the d-th variable of the particle. represents the velocity of the dth variable in the ith particle in the kth generation, ω represents the inertia weight, represents the velocity of the dth variable of the i-th particle in the k-1th generation, c 1 represents the individual learning factor, c 2 represents the social learning factor, r 1 =Rand(), r 2 =Rand(), Rand() represents the random generation function, represents the particle position of the dth variable of the ith particle in the k-1th generation, represents the particle position of the dth variable of the jth particle in the k-1th generation, represents the position of the dth variable in the ith particle in the k-1th generation, represents the position of the dth variable in the ith particle in the kth generation;

[0052] Among them, ω decreases linearly, that is:

[0053]

[0054] In the formula, k represents the current iteration number, ω(k) represents the inertia weight corresponding to the kth generation, and ω max represents the maximum inertia weight, ω min represents the minimum inertia weight, k max Indicates the total number of iterations;

[0055] Step 608: Substitute the updated optimal positions of the populations of all generations into the fitness function to calculate the fitness value of each particle in the population, and update the position P of each particle in the population. id And the optimal position P of the population in each generation best ;

[0056] Step 609, annealing the temperature using the following formula:

[0057] T=λT

[0058] In the formula, T represents temperature and λ represents annealing rate;

[0059] Step 610, determining whether the current state meets the termination condition;

[0060] If the termination condition is not met, the algorithm will increase the number of iterations and return to step 605 for the next round of iterations. Otherwise, the loop ends and the target optimal solution P is output. best And the optimal fitness value F(P best ).

[0061] In step 300, the outer contour of the core mold is determined based on the size of the core mold, and discrete points in the laying trajectory are introduced into the outer contour of the core mold and discretized along the circumference of the core mold with a sampling step size to generate a discrete task node set. Further, a proportional selection algorithm is used to select the position P of each particle in the population. id Select one from the populations to replace the optimal position P of all generations best The specific method includes the following steps:

[0062] iv. Randomly generate a [0, 1] random number pBet = rand();

[0063] Where pBet is a random number in [0, 1], and rand() is a random number generation function;

[0064] v. Calculate the cumulative probability of the jth particle according to the following formula:

[0065]

[0066] Among them, sumfit(j) represents the cumulative probability of the j-th particle, and F SA (P id ) represents the probability function of the simulated annealing algorithm corresponding to the position P of the i-th generation particles id , where j = 1, 2, …, m represents the j-th particle;

[0067] vi. If sumfit(j - 1) < pBet < sumfit(j), then replace the individual position P of the j-th particle in the population jd with the optimal position P of previous generations of populations best ;

[0068] Among them, sumfit(j - 1) represents the cumulative probability of the (j - 1)-th particle.

[0069] Furthermore, in step 300, based on the core mold size, the outer contour of the core mold is determined, discrete points in the laying trajectory are imported outside the core mold contour, and are discretized along the circumferential direction of the core mold with a sampling step size to generate a set of discrete task nodes.

[0070] The present invention has the following beneficial effects compared with the prior art:

[0071] In the present invention, the maximum flexibility value is obtained by solving with the simulated annealing particle swarm algorithm, and the optimal layout of the laying robot and the external axis is solved. When facing tasks with high processing quality requirements, it can not only ensure that the working space of the robot covers all task points, but also consider the flexibility of the robot's working space to meet the needs of complex processing tasks;

[0072] In the present invention, the optimization of the robot layout can ensure the continuous operation of the robot on the production line by accurately calculating the working range and path of the robot, reducing the idle and waiting time, thereby accelerating the production rhythm and improving the work efficiency;

[0073] In the present invention, the reachable working space of the robot is solved by using the Monte Carlo method based on the forward kinematic model of the robot, and a constraint condition model is established accordingly. During the process of solving the maximum flexibility value based on the simulated annealing particle swarm algorithm, the robot layout is constrained by the constraint condition model to be within the reachable working space and meet other constraint conditions. In addition, a fitness function is established based on the flexibility value as the analysis basis, with the flexibility value as the objective function, and the flexibility of the robot in the working space as the benchmark. Considering the flexibility within the robot's working space, the layout is arranged with the maximum flexibility value under the condition of meeting the constraints, optimizing the robot layout. Description of the Drawings

[0074] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.

[0075] Figure 1 The present invention provides a flowchart of a robot layout optimization method based on a simulated annealing algorithm.

[0076] Figure 2 It is a three-dimensional point diagram of the accessible workspace of the KUKA industrial robot in an embodiment of the present invention.

[0077] Figure 3 A diagram of the flexible workspace of the laying robot in an embodiment of the present invention.

[0078] Figure 4 This is a location diagram of the core mold processing area in an embodiment of the present invention.

[0079] Figure 5 Flow chart of the simulated annealing particle swarm algorithm in an embodiment of the present invention.

[0080] Figure 6 It is the fitness change curve in the embodiment of the present invention.

[0081] Figure 7 It is a schematic diagram of the relative position relationship and the collection points of the processing area when the flexibility is optimal in an embodiment of the present invention. DETAILED DESCRIPTION

[0082] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0083] like Figure 1 As shown, the present invention provides a robot layout optimization method based on simulated annealing algorithm, comprising the following steps:

[0084] Step 100, performing three-dimensional modeling on the robot and the core mold according to the robot model and the core mold size to obtain a three-dimensional model, and performing positive dynamics modeling on the three-dimensional model to obtain a positive dynamics model;

[0085] Step 200, using the Model Carlo method based on the forward kinematics model of the robot to solve the reachable workspace of the robot, and determining the boundary range of the robot's work according to the reachable workspace;

[0086] Step 300, based on the core mold size, discrete points in the laying trajectory are imported and discretized along the circumferential direction of the core mold with a sampling step length to generate a discrete task node set, and the inverse solution of the discrete task node set is obtained to obtain the joint angle value of each discrete task node;

[0087] Step 400, substituting the joint angle values ​​of all discrete task nodes into the maneuverability formula to obtain the maneuverability value, and defining the average value of all maneuverability values ​​as the flexibility value of the placement robot at this layout position;

[0088] Step 500, establishing a constraint condition model according to the collision condition between the robot body and the core mold, the singularity condition of the robot, and the reachable workspace of the robot;

[0089] Step 600, using the flexibility value as the analysis basis to establish a fitness function, using the flexibility value as the objective function, solving the maximum flexibility value under the constraint of the constraint model based on the simulated annealing particle swarm algorithm to determine the optimal joint angle value, the optimal position, and output the optimal layout.

[0090] The 3D modeling process is as follows: 3D modeling of the robot and the core mold is performed in SolidWorks software according to the robot model and the core mold size to obtain the .SLDASM file;

[0091] The process of positive dynamics modeling is: using the URDF plug-in to convert the .SLDASM file into a .urdf file, importing the .urdf file into the MATLAB software and using the improved DH method to perform positive dynamics modeling to obtain a positive kinematics model, where the positive kinematics model is:

[0092]

[0093] In the formula, "0" represents the robot base, "6" represents the end flange of the 6-DOF robot, T represents the 4*4 homogeneous transformation matrix, and θ represents the joint angle vector group. represents the homogeneous transformation matrix of the 6-DOF robot end flange relative to the robot base under the joint angle vector group θ, Represents the joint angle vector θ between link j-1 and link j j The homogeneous transformation matrix under θ, j represents the connecting rod, j = 1, 2, ... 6, θ j Represents the joint angle vector of link j.

[0094] In the above embodiment, the positive kinematics model is formed by performing positive dynamics modeling on a 6-DOF robot. Similarly, the present invention mainly provides a solution for performing layout optimization on a 6-DOF robot.

[0095] In step 100, both ends of the core mold are heads of rotating ellipsoids, and the middle is a cylinder.

[0096] The core mold size parameters include:

[0097] Cylinder length L, cylinder radius R;

[0098] The semi-axis length b of the ellipsoidal surfaces at both ends parallel to the rotation axis L and b R ;

[0099] The opening radius of the two end heads is r L and r R .

[0100] The semi-axis length represents the distance from the apex of the ellipsoidal surfaces at both ends to the bottom surface of the cylinder.

[0101] In step 200, the reachable workspace of the robot is solved by using the Mannequin Carlo method based on the forward kinematics model of the robot, and the boundary range of the robot's work is determined according to the reachable workspace.

[0102] Among them, the reachable workspace of the robot is solved by using the model Carlo method based on the forward kinematics of the robot, and the boundary range of the robot's work is determined according to the reachable workspace, which specifically includes the following steps:

[0103] Step 201, according to the range of motion of each joint angle of the robot in Table 1, use the Halton random sequence function to generate N 6-dimensional random sequences halton(j, i) with a size between 0 and 1;

[0104] The joint angles are randomly generated based on the 6-dimensional random sequence halton(j, i): (i=1,2,…,6; j=1,2,…,N);

[0105] The randomly generated joint angles are used as random variables and substituted into the following formula to obtain the random values ​​of each joint angle of the robot:

[0106]

[0107] Among them, θ i,j is the angle of the jth point of joint i, represents the lower limit of the variable of joint i, represents the upper limit of the variable of joint i, halton(j, i) represents a set of j*i quasi-random number matrices with j rows and i columns;

[0108] Table 1 Motion range of industrial robot joint axes

[0109]

[0110] Step 202, substituting the obtained N groups of joint variable groups randomly generated by MATLAB into the forward kinematics model of the robot to obtain the end position of the robot;

[0111] Among them, the N groups of joint variables randomly generated by MATLAB consist of random values ​​of each joint angle of the robot;

[0112] Step 203, all robot end positions are displayed on a computer by printing to display the reachable working range of the robot and obtain the boundary range of the industrial robot.

[0113] In step 300, the outer contour of the core mold is determined based on the size of the core mold, and discrete points in the laying trajectory are introduced into the outer contour of the core mold. All discrete points on the trajectory are discretized along the circumferential direction of the core mold with a certain sampling step length to generate a discrete task node set. The inverse kinematics of the industrial robot is used to inversely solve the discrete task node set to obtain the joint angle value of each discrete task node and save it, such as Figure 4 As shown, P 1 , P 2 , P 3 , P W , P N They all represent discrete task nodes outside the core mold, and the trajectory they form is a placement trajectory formed by the combination of discrete task nodes.

[0114] In the above embodiments, the sampling step length along the circumferential direction of the core mold is Δq, and the sampling range q needs to satisfy q∈[0,2π].

[0115] In step 400, the joint angle values ​​of all discrete task nodes are substituted into the operability formula to obtain the operability value, wherein the operability formula is:

[0116]

[0117] Where ω is the maneuverability, ω(θ) is the maneuverability corresponding to the joint angle θ, det(·) is the determinant of the matrix, · is the content in the brackets, and λ 1 λ 2 …λ n Both represent the matrix J(θ)J T The eigenvalue of (θ), J represents the Jacobian matrix, J(θ) represents the Jacobian matrix corresponding to the joint angle θ, J T represents the transpose of the Jacobian matrix, σ 1 σ 2…σ n They all represent singular values ​​of J.

[0118] When ω=0, the robot is at a singular point and has the worst motion flexibility.

[0119] The average value of all operability values ​​is defined as the flexibility value of the placement robot at this layout position, that is:

[0120]

[0121] In the formula, Indicates the flexibility value of a certain layout position, θ j represents the robot joint vector of the jth discrete task node, ω j (θ j ) represents the operability value of the jth discrete task node, and N represents the size of the discrete task point set.

[0122] Among them, the more discrete task nodes there are in the core mold surface processing area, the higher the reliability of the industrial robot industrial area flexibility value obtained by the above formula.

[0123] In step 500, a constraint condition model is established according to the collision condition between the robot body and the core mold, the singularity condition of the robot, and the reachable workspace of the robot, including the following steps:

[0124] Establish collision constraints based on the collision between the robot body and the core mold:

[0125] cols(R,W)=0

[0126] Where cols() represents the collision function, R represents the robot, and W represents the core model.

[0127] The collision constraint is based on the collision situation between the robot body and the core mold, wherein the robot body also includes its own end wire nozzle, and the core mold also includes a core shaft installed thereon.

[0128] The above embodiment illustrates the collision constraint. In addition, there are also reachable space constraints and singular point constraints. The reachable space constraint refers to limiting the robot within the boundary range according to the reachable workspace and boundary range obtained in step 200.

[0129] When ω=0, the robot is at a singular point and has the worst motion flexibility.

[0130] In actual application, when the robot is at a singularity point, the system will automatically report an error, and the corresponding constraint condition is: avoid this point during operation based on the robot's singularity point situation.

[0131] In step 600, based on the simulated annealing particle swarm algorithm, the maximum flexibility value is solved with the flexibility of the working area of ​​the placement robot as the objective function under the constraints of component interference, robot accessibility and singularity, so as to achieve the optimal layout solution of the placement robot and the external axis.

[0132] Among them, the maximum flexibility value is solved under the constraint of the constraint model based on the simulated annealing particle swarm algorithm, which specifically includes the following steps:

[0133] Step 601, parameter initialization, setting annealing speed λ, acceleration coefficient c 1 and c 2 and the inertia weight ω;

[0134] Step 602, randomly generate a population of size M within a limited range, and randomly obtain the velocity and acceleration of each particle in the initial population;

[0135] Step 603, calculate the fitness value F(x i ), obtain the position P of each particle in the population id , the fitness of the particle F(P id ), the optimal position P of the population in all generations best And the optimal fitness of the population in each generation F(P best );

[0136] Step 604, according to the optimal fitness of the population of all generations, the initial temperature T is solved according to the following formula: 0 ;

[0137] T 0 =F(P best ) / lg(5)

[0138] Where T 0 represents the initial temperature, F(P best ) represents the optimal fitness of the population in all generations;

[0139] Step 605, normalizing the acceptance probability of each particle in the population at the current temperature T through the probability function of the simulated annealing algorithm of each particle;

[0140] The probability function of the simulated annealing algorithm for each particle is:

[0141]

[0142] In the formula, F SA (P id ) represents the position P of the i-th generation particle id The corresponding probability function of the simulated annealing algorithm, ΔF i =F(P id )-F(P best), ΔF i Indicates the fitness value difference, F(P id ) represents the position P of the i-th generation particle id The corresponding fitness value, F(P best ) represents the optimal position P of the population in each generation best The corresponding fitness value, T represents the current temperature;

[0143] Step 606: Use a proportional selection algorithm to select the position P of each particle in the population. id Select one from the populations to replace the optimal position P of all generations best ;

[0144] Step 607: The optimal position P of the population of all generations best Replaced with the individual position P of the jth particle in the population jd The following formula is then used to update the position and velocity of each particle in the population:

[0145]

[0146] In the formula, k represents the current iteration number, i represents the i-th particle in the population, and d represents the d-th variable of the particle. represents the velocity of the dth variable in the ith particle in the kth generation, ω represents the inertia weight, represents the velocity of the dth variable of the i-th particle in the k-1th generation, c 1 represents the individual learning factor, c 2 represents the social learning factor, r 1 =Rand(), r 2 =Rand(), Rand() represents the random generation function, represents the particle position of the dth variable of the ith particle in the k-1th generation, represents the particle position of the dth variable of the jth particle in the k-1th generation, represents the position of the dth variable in the ith particle in the k-1th generation, represents the position of the dth variable in the ith particle in the kth generation;

[0147] Among them, ω decreases linearly, that is:

[0148]

[0149] In the formula, k represents the current iteration number, ω(k) represents the inertia weight corresponding to the kth generation, and ω max represents the maximum inertia weight, ω min represents the minimum inertia weight, k max Indicates the total number of iterations;

[0150] Step 608: Substitute the updated optimal positions of the populations of all generations into the fitness function to calculate the fitness value of each particle in the population, and update the position P of each particle in the population. id And the optimal position P of the population in each generation best ;

[0151] Step 609, annealing the temperature using the following formula:

[0152] T=λT

[0153] In the formula, T represents temperature and λ represents annealing rate;

[0154] Step 610, determining whether the current state meets the termination condition;

[0155] If the termination condition is not met, the algorithm will increase the number of iterations and return to step 605 for the next round of iterations. Otherwise, the loop ends and the target optimal solution P is output. best And the optimal fitness value F(P best ).

[0156] In step 607, generally, ω min =0.4,ω max =0.9.

[0157] In step 609, when the current state reaches the number of cycles, it is considered to meet the termination condition.

[0158] In step 606, the idea of ​​the proportional selection algorithm is similar to selecting numbers on a roulette wheel. The selection probability of each number is proportional to its proportion on the roulette wheel, that is, the larger the fitness value of each particle, the higher the probability of being selected as the optimal solution of the population in all generations.

[0159] The proportional selection algorithm is used to select the position P of each particle in the population. id Select one from the populations to replace the optimal position P of all generations best The specific method includes the following steps:

[0160] vii. Randomly generate a [0, 1] random number pBet = rand();

[0161] Where pBet is a random number in [0, 1], and rand() is a random number generation function;

[0162] viii. Calculate the cumulative probability of the jth particle according to the following formula:

[0163]

[0164] Among them, sumfit(j) represents the cumulative probability of the jth particle, F SA (Pid ) represents the position of the i-th generation of particles, P id The probability function of the corresponding simulated annealing algorithm, where j = 1, 2, … m represents the j-th particle;

[0165] ix. If sumfit(j - 1) < pBet < sumfit(j), then the individual position P of the j-th particle in the population jd replaces the optimal position P of all previous generations of the population best ;

[0166] Among them, sumfit(j - 1) represents the cumulative probability of the (j - 1)-th particle.

[0167] In the present invention, the maximum flexibility value is obtained by solving with the simulated annealing particle swarm algorithm, and then the corresponding optimal coordinate position and joint angle of the robot (optimal position, optimal joint angle value) are determined.

[0168] Such as Figure 4 shown, this embodiment also includes a geodetic coordinate system and a mandrel coordinate system. Among them, the geodetic coordinate system corresponds to the center point of the robot base, and the mandrel coordinate system corresponds to the center of the mandrel. The geodetic coordinate system and the mandrel coordinate system are used to determine the pose relationship between the robot and the mandrel according to the final solution result during actual application: the relative position between the robot and the mandrel is determined by the optimal position coordinates, and the pose of the robot is determined by the angle θ of rotation around the z-axis.

[0169] In actual application, the pose includes the states of rotation around the x-axis, rotation around the y-axis, and rotation around the z-axis. In this embodiment, the layout result only considers the pose layout in the direction of the Z-axis of the mandrel coordinate system.

[0170] Taking a robot with the model of KUKA robot KR 210R2700 - 2 as an example for layout optimization:

[0171] The mandrel parameters are:

[0172] The semi-major axis length b of the left and right elliptical surfaces L , b R = 100 mm, the opening radius r of the left and right end heads L , r R = 27 mm, the length L of the cylinder is 650 mm, and the radius R of the cylinder is 167.5 mm.

[0173] The maximum number of iterations k in the simulated annealing particle swarm algorithm max = 50, the population size of the boundary limit condition is N = 20, the dimension D of the particle is 4, the individual learning factor c 1 = 1.495, and the social learning factor c 2=1.495, the boundary constraint is Ω={(x,y,z)|x∈(0,3),y∈(-2.5,2.5),z∈(-180,180)}, the annealing rate is λ=0.8, and the boundary constraint means that the robot is within the boundary range.

[0174] After step 100, three-dimensional modeling and positive dynamics modeling are performed on the robot and the core mold according to the robot model and the core mold size;

[0175] like Figure 2 As shown, after step 200, the reachable workspace of the robot is solved by using the Model Carlo method based on the forward kinematics of the robot, and the boundary range of the robot's work is determined according to the reachable workspace, so as to obtain a three-dimensional point diagram of the reachable workspace of the KUKA industrial robot;

[0176] like Figure 3 As shown, after step 300 and step 400, the inverse solution of the discrete task node set is obtained to obtain the joint angle value of each discrete task node, the joint angle values ​​of all discrete task nodes are substituted into the operability formula and the operability value is obtained, and the average value of all operability values ​​is defined as the flexibility value of the placement robot at this layout position, and the placement robot flexible workspace diagram is obtained;

[0177] After step 500, a constraint condition model is established according to the collision conditions between the robot body and its end wire nozzle and the core mold and its core shaft, the singular point conditions of the robot, and the reachable workspace of the robot;

[0178] like Figure 5 As shown, after step 600, a fitness function is established with the flexibility value as the analysis basis, and the flexibility value is used as the objective function. The maximum flexibility value is solved under the constraint of the constraint model based on the simulated annealing particle swarm algorithm to achieve the optimal layout.

[0179] like Figure 6 The figure shows the fitness change curve in step 600. The curve shows that the convergence iteration number is the 37th. At this time, the mean flexibility of the processing area reaches the maximum value of 0.744, and the corresponding processing position is (0.9568m, 1.6154m, 1.0175m, -25.25°). The relative position relationship when the flexibility is optimal and the processing area collection points are as follows: Figure 7 shown.

[0180] In the present invention, the maximum flexibility value is obtained by solving the simulated annealing particle swarm algorithm, and the optimal layout of the laying robot and the external axis is solved. When facing tasks with high processing quality requirements, it can not only ensure that the robot's workspace covers all task points, but also consider the flexibility of the robot's workspace to meet the needs of complex processing tasks;

[0181] Optimization of robot layout can ensure the continuous operation of robots on the production line by accurately calculating the working range and path of robots, reducing idle and waiting time, thereby speeding up production and improving work efficiency;

[0182] In addition, based on the forward kinematics model of the robot, the Model Carlo method is used to solve the reachable workspace of the robot, and a constraint model is established based on this. In the process of solving the maximum flexibility value based on the simulated annealing particle swarm algorithm, the robot layout is constrained by the constraint model to be within the reachable workspace and meet other constraints. In addition, a fitness function is established based on the flexibility value as the analysis basis, the flexibility value is used as the objective function, and the flexibility of the robot in the workspace is used as the benchmark. Taking into account the flexibility of the robot in the workspace, the layout is arranged with the maximum flexibility value under the condition of satisfying the constraints, thereby optimizing the robot layout.

[0183] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.

Claims

1. A robot layout optimization method based on simulated annealing algorithm, characterized in that: The following steps are involved: Step 100, performing three-dimensional modeling on the robot and the core mold according to the robot model and the core mold size to obtain a three-dimensional model, and performing positive dynamics modeling on the three-dimensional model to obtain a positive dynamics model; Step 200, using the Model Carlo method based on the forward kinematics model of the robot to solve the reachable workspace of the robot, and determining the boundary range of the robot's work according to the reachable workspace; Step 300, based on the core mold size, discrete points in the laying trajectory are imported and discretized along the circumferential direction of the core mold with a sampling step length to generate a discrete task node set, and the inverse solution of the discrete task node set is obtained to obtain the joint angle value of each discrete task node; Step 400, substituting the joint angle values ​​of all discrete task nodes into the maneuverability formula to obtain the maneuverability value, and defining the average value of all maneuverability values ​​as the flexibility value of the placement robot at this layout position; Step 500, establishing a constraint condition model according to the collision condition between the robot body and the core mold, the singularity condition of the robot, and the reachable workspace of the robot; Step 600, using the flexibility value as the analysis basis to establish a fitness function, using the flexibility value as the objective function, solving the maximum flexibility value under the constraint of the constraint model based on the simulated annealing particle swarm algorithm to determine the optimal joint angle value, the optimal position, and output the optimal layout.

2. The robot layout optimization method based on simulated annealing algorithm according to claim 1, characterized in that: According to the robot model and the core mold size, three-dimensional modeling is performed on the robot and the core mold to obtain a three-dimensional model, and positive dynamics modeling is performed on the three models to obtain a positive dynamics model; Among them, the forward kinematic model is: In the formula, "0" represents the robot base, "6" represents the end flange of the 6-DOF robot, T represents the 4*4 homogeneous transformation matrix, θ represents the joint angle vector group, represents the homogeneous transformation matrix of the 6-DOF robot end flange relative to the robot base under the joint angle vector group θ, Represents the joint angle vector θ between link j-1 and link j j The homogeneous transformation matrix under θ, j represents the connecting rod, j = 1, 2, ... 6, θ j Represents the joint angle vector of link j.

3. The robot layout optimization method based on simulated annealing algorithm according to claim 2 is characterized in that: Based on the robot's forward kinematics model, the model Carlo method is used to solve the robot's reachable workspace, and the boundary range of the robot's work is determined according to the reachable workspace. The specific steps include: Step 201, according to the range of motion of each joint angle of the robot, using the Halton random sequence function to generate N 6-dimensional random sequences halton(j, i) with a size between 0 and 1; The joint angles are randomly generated based on the 6-dimensional random sequence halton(j, i): (i=1,2,…,6;j=1,2,…,N); The randomly generated joint angles are used as random variables and substituted into the following formula to obtain the random values ​​of each joint angle of the robot: Among them, θ i,j is the angle of the jth point of joint i, represents the lower limit of the variable of joint i, represents the upper limit of the variable of joint i, halton(j, i) represents a set of j*i quasi-random number matrices with j rows and i columns; Step 202, substituting the obtained N groups of joint variable groups randomly generated by MATLAB into the forward kinematics model of the robot to obtain the end position of the robot; Among them, the N groups of joint variables randomly generated by MATLAB consist of random values ​​of each joint angle of the robot; Step 203, all robot end positions are displayed on a computer by printing to display the reachable working range of the robot and obtain the boundary range of the industrial robot.

4. The robot layout optimization method based on simulated annealing algorithm according to claim 3 is characterized in that: The operability formula is: Where ω is the maneuverability, ω(θ) is the maneuverability corresponding to the joint angle θ, det(·) is the determinant of the matrix, · is the content in the brackets, λ1λ2…λ n Both represent the matrix J(θ)J T The eigenvalue of (θ), J represents the Jacobian matrix, J(θ) represents the Jacobian matrix corresponding to the joint angle θ, J T represents the transpose of the Jacobian matrix, σ1σ2…σ n All represent singular values ​​of J; When ω = 0, the robot is at a singular point.

5. The robot layout optimization method based on simulated annealing algorithm according to claim 4 is characterized in that: The average value of all operability values ​​is defined as the flexibility value of the placement robot at this layout position, that is: In the formula, Indicates the flexibility value of a certain layout position, θ j represents the robot joint vector of the jth discrete task node, ω j (θ j ) represents the operability value of the jth discrete task node, and N represents the size of the discrete task point set.

6. The robot layout optimization method based on simulated annealing algorithm according to claim 1, characterized in that: A constraint condition model is established based on the collision condition between the robot body and the core mold, the singularity condition of the robot, and the reachable workspace of the robot, including the following steps: Establish collision constraints based on the collision between the robot body and the core mold: cols(R,W)=0 Where cols() represents the collision function, R represents the robot, and W represents the core model.

7. The robot layout optimization method based on simulated annealing algorithm according to claim 1, characterized in that: Based on the simulated annealing particle swarm algorithm, the maximum flexibility value is solved under the constraint model, which specifically includes the following steps: Step 601, parameter initialization, setting the annealing speed λ, acceleration coefficients c1 and c2, and inertia weight ω; Step 602, randomly generate a population of size M within a limited range, and randomly obtain the velocity and acceleration of each particle in the initial population; Step 603, calculate the fitness value F(x i ), obtain the position P of each particle in the population id , the fitness of the particle F(P id ), the optimal position P of the population in all generations best And the optimal fitness of the population in each generation F(P best ); Step 604, solving the initial temperature T0 according to the optimal fitness of the population in previous generations according to the following formula; T0=F(P best ) / lg(5) Where T0 represents the initial temperature, F(P best ) represents the optimal fitness of the population in all generations; Step 605, normalizing the acceptance probability of each particle in the population at the current temperature T through the probability function of the simulated annealing algorithm of each particle; The probability function of the simulated annealing algorithm for each particle is: In the formula, F SA (P id ) represents the position P of the i-th generation particle id The corresponding probability function of the simulated annealing algorithm, ΔF i =F(P id )-F(P best ), ΔF i Indicates the fitness value difference, F(P id ) represents the position P of the i-th generation particle id The corresponding fitness value, F(P best ) represents the optimal position P of the population in each generation best The corresponding fitness value, T represents the current temperature; Step 606: Use a proportional selection algorithm to select the position P of each particle in the population. id Select one from the populations to replace the optimal position P of all generations best ; Step 607: The optimal position P of the population of each generation best Replaced with the individual position P of the jth particle in the population jd The following formula is then used to update the position and velocity of each particle in the population: In the formula, k represents the current iteration number, i represents the i-th particle in the population, and d represents the d-th variable of the particle. represents the velocity of the dth variable in the ith particle in the kth generation, ω represents the inertia weight, represents the speed of the dth variable of the ith particle in the k-1th generation, c1 represents the individual learning factor, c2 represents the social learning factor, r1=Rand(), r2=Rand(), Rand() represents the random generation function, represents the particle position of the dth variable of the ith particle in the k-1th generation, represents the particle position of the dth variable of the jth particle in the k-1th generation, represents the position of the dth variable in the ith particle in the k-1th generation, represents the position of the dth variable in the ith particle in the kth generation; Among them, ω decreases linearly, that is: In the formula, k represents the current iteration number, ω(k) represents the inertia weight corresponding to the kth generation, and ω max represents the maximum inertia weight, ω min represents the minimum inertia weight, k max Indicates the total number of iterations; Step 608: Substitute the updated optimal positions of the populations of all generations into the fitness function to calculate the fitness value of each particle in the population, and update the position P of each particle in the population. id And the optimal position P of the population in each generation best ; Step 609, annealing the temperature using the following formula: T=λT In the formula, T represents temperature and λ represents annealing rate; Step 610, determining whether the current state meets the termination condition; If the termination condition is not met, the algorithm will increase the number of iterations and return to step 605 for the next round of iterations. Otherwise, the loop ends and the target optimal solution P is output. best And the optimal fitness value F(P best ).

8. The robot layout optimization method based on simulated annealing algorithm according to claim 7, characterized in that: The proportional selection algorithm is used to select the position P of each particle in the population. id Select one from the populations to replace the optimal position P of all generations best The specific method includes the following steps: i. Randomly generate a [0, 1] random number pBet = rand(); Where pBet is a random number in [0, 1], and rand() is a random number generation function; ii. Calculate the cumulative probability of the jth particle according to the following formula: Among them, sumfit(j) represents the cumulative probability of the jth particle, F SA (P id ) represents the position P of the i-th generation particle id The corresponding probability function of the simulated annealing algorithm, j = 1, 2, ... m, represents the jth particle; iii. If sumfit(j - 1) < pBet < sumfit(j), then replace the individual position P of the j-th particle in the population with the historical population optimal position P jd ; best ; Where sumfit(j-1) represents the cumulative probability of the j-1th particle.

9. The robot layout optimization method based on simulated annealing algorithm according to claim 1, characterized in that: In step 300, the outer contour of the mandrel is determined based on the size of the mandrel, discrete points in the placement trajectory are introduced into the outer contour of the mandrel, and discretized along the circumference of the mandrel with a sampling step size to generate a discrete task node set.

Citation Information

Cited By

  • Robot machining feasibility judgment method and device

    CN119115947A

  • Closed-loop optimization method for cerebral apoplexy electrical stimulation treatment

    CN119987191A

  • A PID control optimization method based on improved sled dog algorithm

    CN119987191B

  • Armored vehicle power system spatial layout optimization method considering dismounting operation influence

    CN120850468A

  • Optimization method for spatial layout of armored vehicle power system considering disassembly and assembly operation influence

    CN120850468B