Robot energy consumption optimization method based on improved particle swarm optimization
By optimizing the motion paths and parameters of industrial robots through improved particle swarm optimization and differential evolution algorithms, the problem of difficulty in effectively controlling energy consumption in existing technologies has been solved, and energy consumption has been minimized and system efficiency improved.
Patent Information
- Application Number
- CN202411942089.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-01-24
AI Technical Summary
The existing industrial robot path planning methods mainly focus on the shortest path or obstacle avoidance performance, and ignore energy consumption optimization, which makes it difficult to effectively control energy consumption while meeting production needs.
Adopt the improvement of the particle group algorithm to intelligently optimize the movement path and key motion parameters of the robot. By dynamically adjust the inertial weight and learning factors, combine the differential evolution algorithm to enhance the global search capabilities of the algorithm and avoid local optimal solutions.
While ensuring the completion of the quality and energy consumption calculation accuracy, the maximum energy consumption is reduced, the efficiency of the system is improved, the service life of the robot system is prolonged, and the negative effects of operating costs and the environment are reduced.
Smart Images

Figure CN119347852A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of robot energy consumption optimization, and in particular relates to a robot energy consumption optimization method based on an improved particle swarm algorithm. Background Art
[0002] With the rapid development of industrial automation technology, industrial robots are increasingly used in various production and operation environments, such as welding, assembly, material handling, etc. Robots are regarded as an important tool to improve production efficiency, but their energy demand has also increased, which has brought great pressure on operating costs and the environment. At present, most industrial robots are powered by electricity, which makes energy consumption one of the main operating costs. With the increase in the number of robots, the overall energy consumption shows a significant growth trend. Therefore, how to plan the optimal path to reduce energy consumption during operation while meeting various constraints has important theoretical value and practical significance.
[0003] Traditional path planning methods focus more on the shortest path or obstacle avoidance performance, and often ignore energy consumption optimization, which makes it difficult to effectively control energy consumption while meeting production needs. Therefore, reducing energy consumption by optimizing motion trajectories and robot parameters is an important issue that needs to be solved in the current context of industrial automation, which is expected to achieve sustainable development of robot systems, reduce operating costs, and reduce negative impacts on the environment. Summary of the invention
[0004] The technical problem to be solved by the present invention is to address the deficiencies of the above-mentioned prior art and to provide a robot energy consumption optimization method based on an improved particle swarm algorithm. By intelligently optimizing the robot motion path and key motion parameters through the improved particle swarm algorithm, the energy consumption is minimized while ensuring the quality of task completion and the accuracy of energy consumption calculation, thereby improving the system efficiency.
[0005] In order to achieve the above technical objectives, the technical solution adopted by the present invention is: A robot energy consumption optimization method based on an improved particle swarm algorithm, the method specifically comprising the following steps: S10, establishing a spatial rectangular coordinate system with the robot base, constructing a robot kinematic model, obtaining the end effector posture, converting the end effector posture into a joint angle sequence based on an inverse solution algorithm, and interpolating the sequence using a polynomial spline function to generate a robot joint motion trajectory; S20, considering the robot joint friction, inertia and gravity parameters to perform dynamic modeling on the robot, and constructing a robot energy consumption optimization model based on the robot dynamic model; S30, based on the robot joint motion trajectory and the robot energy consumption optimization model, the robot's energy consumption is used as the fitness function of the particle swarm algorithm, and combined with the dynamically adjusted inertia weight and learning factor, the key motion parameters of the robot during motion are used as the particles of the algorithm, and the energy consumption of the robot during motion is reduced by updating the speed and position of the particles; S40. Introduce the differential evolution algorithm to enhance the global search capability of the particle swarm through mutation, crossover and selection operations, avoid the algorithm from falling into the local optimum, and output the optimal motion parameters after multiple iterations to achieve efficient optimization of the robot's energy consumption.
[0006] The above-mentioned step S10 specifically includes: S1001. Establish a spatial rectangular coordinate system with the robot base as the origin, and use the DH parameter method to perform kinematic modeling on each link and joint of the robot to obtain the position and posture of the end effector in the spatial rectangular coordinate system; S1002. Based on the end effector posture obtained from the robot kinematic model, the robot mechanism characteristics are analyzed using the Pieper criterion. In view of the relatively parallel structure of the shoulder, elbow, and wrist joints, a closed inverse solution is implemented to convert the end effector posture into a set of joint angle solutions, i.e., a joint angle sequence, and convert the position coordinate parameters in the spatial rectangular coordinate system into the robot joint angles. ; S1003 , using a polynomial spline function to interpolate the range of the joint angle determined in S1002 to generate a robot joint motion trajectory.
[0007] As mentioned above, in step S1001, the DH parameter method is used to perform kinematic modeling on the links and joints of the robot, and the following is obtained: ; in, Indicates from the connecting rod To connecting rod The transformation matrix, is the connecting rod length, is the connecting rod angle, is the connecting rod offset, is the joint angle, , , .
[0008] In step S1003, the interpolation formula is as follows: ; in, , , For the The time of the first, second and third polynomial interpolation of each joint, The coefficient is The first segment interpolation function of the joint trajectory coefficients, , , Respectively represent The motion trajectory of each joint is obtained by interpolating the polynomial joint angles in the first, second and third segments; and , , The following constraints are met: ; in, Representative is Joints in The joint angular velocity of the segment, Representative is The joints in The joint angular acceleration of the segment, Take one, two, three.
[0009] In step S20, the robot joint friction, inertia and gravity parameters are considered to perform dynamic modeling on the robot, and the following equation is obtained: ; ; ; in, For the The total driving torque of each joint; For the Generalized forces or moments at each joint; For the Friction torque of each joint; and Respectively indicate time Time Angular velocity and acceleration of each joint; and Respectively Coulomb friction coefficient and viscous friction coefficient of each joint; is the inertia matrix of the robot; are the Coriolis force and centrifugal force terms of the robot; is the gravity term of the robot.
[0010] Furthermore, in step S20, a robot energy consumption model is established based on the robot dynamics model, and the robot energy consumption model is: ; in, is the target total energy consumption; is the effective output power of the motor; For the The generalized forces or moments at each joint, For the The friction torque of each joint is obtained using the robot dynamics model; Representative is The angular velocity of each joint.
[0011] Furthermore, in step S20, the constraints of the robot energy consumption optimization model include reachability constraints, kinematic constraints, and dynamic constraints; The kinematic constraints are: ; in, Expressed as time Time The joint angular acceleration, Respectively represent The maximum value allowed for the kinematic parameters corresponding to each joint; The dynamic constraints are: ; in, For the The joints in The maximum torque of the segment trajectory.
[0012] The implementation process of the particle swarm algorithm in step S30 is as follows: The angular velocity and angular acceleration of each joint of the robot at different times on the interpolated trajectory are mapped to the D-dimensional search space. Each particle is represented by a D-dimensional position vector, and a D-dimensional velocity vector is defined at the same time. The D-dimensional individual extreme value is and the D-dimensional global extreme value is. The fitness value of the particle is evaluated by the fitness function with the minimization of the robot energy consumption as the optimization goal. The parameter set represented by the particle is substituted into the robot energy consumption optimization model to obtain the total energy consumption of the parameter scheme in the entire motion cycle. In each iteration, the fitness function is used to evaluate the fitness value of each particle, and the current fitness of the particle is compared with its historical best fitness. If the performance is better, the individual best position of the particle is updated; the fitness is compared with the global best fitness, and if it is better, the global best position is updated; the fitness function is defined as follows: ; in, It represents the total energy consumption of the robot during movement, and the calculation formula is: ; represents the fitness function; is the weight coefficient; Through the above iterative feedback mechanism, each particle continuously adjusts the joint velocity, acceleration and combination parameters it represents in the parameter space: ; ; in, For the Particle No. The flight speed at the iteration Dimensional component, For the Particle No. The flight speed at the iteration Dimensional component, It is Particle No. The position of the iteration Dimensional component, It is a particle Best location No. Dimensional component, For particles Best location No. Dimensional component, and yes Two independent random numbers in the interval, and is the dynamically adjusted learning factor, and is the initial learning factor, and is the final learning factor, is the dynamically adjusted inertia weight, is the initial inertia weight, is the final inertia weight, is the maximum number of iterations, is the current iteration number.
[0013] The differential evolution algorithm in step S40 is specifically as follows: For each particle in S30 , for each iteration , the target vector Generate a mutation vector through differential mutation operation , randomly select three different particles a , b , c ,and a , b , c and nNot the same, generate a mutation vector: ; in, is the scaling factor of the differential variation, is the mutation vector, , and are the position vectors of different particles randomly selected from the three populations; Through the crossover operation, the target vector and mutation vector The components of , according to the crossover probability , ensuring that at least one dimension is crossed, generating a test vector : ; in, , is a uniformly distributed random number. yes A random integer between Represented as a test vector No. Dimensional component, Represented as a mutation vector No. Dimensional component, Represented as the target vector No. Dimensional component; Comparison test vector Compared with the fitness value of the current particle, a vector with better fitness is selected as the position of the next generation particle: ; in, and The test vectors are and the target vector The fitness value of By using dynamically adjusted inertia weights, learning factors and optimized particles, the particle speed and position are updated to balance the particle swarm between exploration and development. After multiple iterations, the particle swarm gradually converges in the high-dimensional parameter space, thereby obtaining the optimal parameter configuration that can significantly reduce the energy consumption of the robot working condition.
[0014] The present invention has the following beneficial effects: The present invention provides a method for optimizing robot motion parameters based on an improved particle swarm algorithm to minimize energy consumption. First, an optimization mathematical model of robot motion energy consumption is constructed according to actual physical scenarios, aiming to minimize the energy consumption required for the robot end effector to move from a starting position to a target position by optimizing the speed, acceleration and combined parameters of each joint of the robot. The friction force in the actual operation of the robot is considered by integrating the product of the joint torque and the speed, and this model is used as the fitness function of the improved particle swarm optimization algorithm. The differential evolution algorithm strategy is adopted to simultaneously optimize the speed, acceleration and combined parameters of each joint of the robot, and the energy consumption is minimized while ensuring the motion accuracy and trajectory smoothness. This design not only ensures the simplicity and effectiveness of the algorithm, but also can quickly and efficiently solve the optimal solution of the energy consumption optimization mathematical model, significantly improving the computational efficiency of the optimization process and the accuracy of the results.
[0015] The motion trajectory optimized by the present invention is strictly constrained by kinematics and dynamics, ensuring the stability and reliability of the robot when performing motion tasks. The smooth motion parameters reduce the vibration and impact of the mechanical system, reduce the wear and failure rate of mechanical components, and extend the service life of the robot system. At the same time, the improved PSO algorithm based on energy minimization designed by the present invention can quickly converge to the optimal solution with the lowest energy consumption under the premise of meeting all constraints. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 Schematic diagram of the kinematic model and coordinate system distribution of the UR5 robot in the present invention; Figure 2 It is a trajectory curve diagram of the robot under different operation tasks in the present invention; Figure 3 This is the energy consumption optimization diagram of the UR5 robot under the square trajectory of the present invention; Figure 4 This is a flow chart of robot energy consumption optimization based on the improved particle swarm algorithm in the present invention. DETAILED DESCRIPTION
[0017] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0018] Although the steps in the present invention are arranged with numbers, they are not used to limit the order of the steps. Unless the order of the steps is clearly stated or the execution of a certain step requires other steps as a basis, the relative order of the steps can be adjusted. It is understood that the term "and / or" used in this article involves and covers any and all possible combinations of one or more of the associated listed items.
[0019] The present invention provides a robot energy consumption optimization method based on an improved particle swarm algorithm to reduce the energy consumption of the robot when performing different tasks, and specifically comprises the following steps: S10, using the six-degree-of-freedom robot UR5 as the research object, constructing a spatial rectangular coordinate system with the robot base, constructing a robot kinematic model, and obtaining the end effector posture. Based on the inverse solution algorithm, the end effector posture is converted into a joint angle sequence, and the polynomial spline function is used to interpolate the sequence to generate the robot joint motion trajectory. The specific process is as follows: S1001. Establish a spatial rectangular coordinate system with the robot base as the origin, and use the DH parameter method to perform kinematic modeling.
[0020] In step S1001, the Denavit-Hartenberg (DH) parameter model is used to perform kinematic modeling on the links and joints of the robot, and the position and posture of the end effector in the base coordinate system are obtained as follows: ; in, Indicates from the connecting rod To connecting rod The transformation matrix, is the connecting rod length, is the connecting rod angle, is the connecting rod offset, is the joint angle, , , ; S1002. Based on the kinematic and dynamic modeling results of the UR5 robot in step S10, the Pieper criterion is used to analyze the mechanical characteristics of the UR5 robot. In view of the relatively parallel structure of the shoulder, elbow, and wrist joints, a closed inverse solution is implemented to convert the end position and posture into a set of joint angle solutions. The position coordinate parameters in the Cartesian space can be converted into the joint angle parameters of the UR5 robot. ; S1003. In order to obtain a smooth and energy-optimized joint motion trajectory, the present invention further performs interpolation planning on the determined joint angle range. Considering the large number of constraints in practical applications, the present invention uses a 3-5-3 spline function for interpolation planning: ; in, , , For the The time of the first, second and third polynomial interpolation of each joint, The coefficient is The first segment interpolation function of the joint trajectory coefficients, , , Respectively represent The motion trajectory of each joint is obtained by interpolating the polynomial joint angles in the first, second and third segments; and , , The following constraints are met: In order to ensure the smoothness of the robot's motion, the following constraints are added: ; in, Representative is Joints in The joint angular velocity of the segment, Representative is The joints in The joint angular acceleration of the segment, Take one, two, three.
[0021] S20, considering the robot joint friction, inertia and gravity parameters to perform dynamic modeling on the robot, and construct a robot energy consumption optimization model based on the robot dynamic model; the specific steps are as follows: S2001. Considering the friction force, inertia force and gravity parameters of the robot joints, dynamic modeling of the robot is performed to obtain the total torque on the robot joints; Specifically, it also includes: N The kinematic and dynamic modeling of a joint robot can be used to obtain the torque required to drive each joint. In practical applications, friction is inevitable in robot joints. In order to accurately describe the influence of joint friction torque on system dynamics, the present invention adopts Coulomb friction ( ) and viscous friction ( ). Friction torque acting on the joints of the UR5 robot It is expressed as: ; ; in, For the Generalized forces or moments at each joint; For the Friction torque of each joint; and Respectively indicate time Time Angular velocity and acceleration of each joint; and Respectively Coulomb friction coefficient and viscous friction coefficient of each joint; is the inertia matrix of the robot; are the Coriolis force and centrifugal force terms of the robot; is the gravity term of the robot; The total torque is It can be expressed as: ; In the above formula, For the The total driving torque of each joint; S2002: Establishing a robot energy consumption model based on the robot dynamics model in S2001. Specifically, it includes the following: Using the dynamic equation and friction model obtained in step S10, the total driving torque of each joint is calculated. The effective output power can be calculated as: ; in, For the The generalized forces or moments at each joint, For the The friction torque of each joint is obtained using the robot dynamics model; Representative is The joint angular velocity of each joint; Then the robot energy consumption model is defined as: ; in, For the target total energy consumption, the kinetic and potential energies of each joint are considered; is the effective output power of the motor. To ensure the long-term stable and reliable operation of the robot, certain operating parameters must meet the following constraints, including reachability constraints, kinematic constraints, and dynamic constraints.
[0022] The kinematic constraints are: ; in, Expressed as time Time The joint angular acceleration, Respectively represent The maximum value allowed for the kinematic parameters corresponding to each joint; The dynamic constraints are: ; in, For the The joints in The maximum torque of the segment trajectory.
[0023] S30, based on the robot joint motion trajectory and the robot energy consumption optimization model, the robot's energy consumption is used as the fitness function of the particle swarm algorithm, and combined with the dynamically adjusted inertia weight and learning factor. The key motion parameters of the robot during motion are used as the particles of the algorithm, and the energy consumption of the robot during motion is reduced by updating the speed and position of the particles.
[0024] In step S30, the key motion parameters of the UR5 robot are globally optimized in the multidimensional parameter space by using the particle swarm algorithm. The key motion parameters here are the control variables that can be adjusted from the joint interpolation planning, such as the speed, acceleration and other combined parameters of each joint at different times.
[0025] The particle swarm algorithm implementation process in step S30 is as follows: The robot's key motion parameters (such as the angular velocity and angular acceleration of each joint at different times on the interpolated trajectory) are mapped to the D-dimensional search space, and each particle is represented by a D-dimensional position vector , and define the velocity vector , the individual extreme value is , the global extreme value is . The robot's motion energy consumption is used as the optimization objective function: ; Calculate the fitness value of the particle, substitute the parameter set represented by the particle into the energy consumption model, and obtain the total energy consumption of the parameter scheme in the entire motion cycle ; The fitness function is defined as follows: ; in, It represents the total energy consumption of the robot during movement, and the calculation formula is: ; represents the fitness function; is the weight coefficient; In each iteration, the robot's motion energy consumption is used as the optimization target to evaluate the fitness value of each particle. The current fitness of the particle is compared with its historical best fitness. If the performance is better, the individual best position of the particle is updated; the fitness is compared with the global best fitness. If it is better, the global best position is updated. Through this feedback mechanism, each particle continuously adjusts the joint speed, acceleration and combination parameters it represents in the parameter space: ; ; in, For the Particle No. The flight speed at the iteration Dimensional component, For the Particle No. The flight speed at the iteration Dimensional component, It is Particle No. The position of the iteration Dimensional component, It is a particle Best location No. Dimensional component, For particles Best location No. Dimensional component, and yes Two independent random numbers in the interval, and is the dynamically adjusted learning factor, and is the initial learning factor, and is the final learning factor, is the dynamically adjusted inertia weight, is the initial inertia weight, is the final inertia weight, is the maximum number of iterations, is the current iteration number.
[0026] S40, introduce the differential evolution algorithm, enhance the global search ability of the particle swarm through mutation, crossover and selection operations, avoid the algorithm from falling into the local optimum, and output the optimal motion parameters after multiple iterations to achieve efficient optimization of the robot's energy consumption. The specific steps are as follows: For each particle in step S30 , for each iteration , the target vector Generate a mutation vector through differential mutation operation , randomly select three different particles a , b , c ,and a , b , c and n Not the same, generate a mutation vector: ; in, is the scaling factor of the differential variation, is the mutation vector, , and are the position vectors of different particles randomly selected from the three populations.
[0027] Through the cross operation, the target vector and mutation vector The components of , according to the crossover probability , ensuring that at least one dimension is crossed, generating a test vector : ; in, , is a uniformly distributed random number. yes A random integer between Represented as a test vector No. Dimensional component, Represented as a mutation vector No. Dimensional component, Represented as the target vector No. Dimensional component.
[0028] Comparison test vector Compared with the fitness value of the current particle, a vector with better fitness is selected as the position of the next generation particle: ; in, and The test vectors are and the target vector The fitness value of By using dynamically adjusted inertia weights, learning factors and optimized particles, the particle speed and position are updated to balance the particle swarm between exploration and development. After multiple iterations, the particle swarm gradually converges in the high-dimensional parameter space, thereby obtaining the optimal parameter configuration that can significantly reduce the energy consumption of the robot working condition.
[0029] The present invention further illustrates the present invention by simulating the robot's handling, welding and grinding tasks with three typical trajectories, initializing the particle swarm parameters and setting the objective function, iteratively optimizing the motion parameters, seeking the parameter configuration with the lowest energy consumption, and outputting the optimized motion trajectory.
[0030] In step S1001, the Denavit-Hartenberg (DH) parameter model is used to model the links and joints of the robot. Taking the UR5 six-degree-of-freedom robot as an example, its kinematic model and link coordinate system distribution are as follows: Figure 1 As shown in the figure, Expressed as a base coordinate system, to are the fixed coordinate systems of the six links of the robot. The relevant DH parameters are shown in Table 1, where is the connecting rod length, is the connecting rod angle, is the connecting rod offset, is the joint angle.
[0031] Table 1 UR5 DH parameter table
[0032] Forward kinematics involves using the known geometric parameters and joint variables of the robot to determine the position and posture of the end effector in the base coordinate system. The above formula can be calculated by matrix multiplication: ; in, , , , .
[0033] In step S1002, the end effector posture is obtained based on the robot kinematic model, and the robot mechanism characteristics are analyzed using the Pieper criterion. In view of the relatively parallel structure of the shoulder, elbow, and wrist joints, a closed inverse solution is implemented to convert the end effector posture into a set of joint angle solutions, i.e., a joint angle sequence, and convert the position coordinate parameters in the spatial rectangular coordinate system into the robot joint angle parameters. ; Therefore, the transformation matrix of the robot end effector corresponding to the base coordinate system can be derived from the parameters in Table 1: ; In the above formula, The matrix represents the posture of the robot end effector coordinate system relative to the base coordinate system. The position vector represents the offset of the robot end position; Finally, the joint angles can be solved: ; Similarly, ; in, Represents the angles of each joint, , They are , Abbreviation of , , , , , .
[0034] In the process of solving step S1002, the robot inverse kinematics may generate multiple solutions, so it is necessary to determine a suitable unique solution. First, according to the motion range limit of each joint, the solution with the smallest distance from the initial position of the joint is selected first and the optimal solution is selected following the strategy of "large joints move less".
[0035] In order to reduce the energy consumption of each joint movement of the UR5 robot and ensure the stability of the operation process in step S1003, it is necessary to use a smooth polynomial function to interpolate the change interval of each joint angle and limit the acceleration of the starting point and the end point of each operation trajectory. Taking into account multiple constraints, including the speed, acceleration and time limit of each joint, the present invention uses a 3-5-3 spline function for interpolation, and its general form is: ; in, , , For the The time of the first, second and third polynomial interpolation of each joint, The coefficient is The first segment interpolation function of the joint trajectory coefficients, , , Respectively represent The motion trajectory of each joint is obtained by interpolating the polynomial joint angles in the first, second and third segments; ; ; ; In the above formula, Indicates The time of the three-segment polynomial interpolation of the joint, the first segment of the trajectory three-segment interpolation function The coefficient trajectory planning constraints are known for each initial point , Waypoints and ,end As well as the velocity and acceleration of the initial and end points (generally taken as 0). Based on the above conditions, the relationship between each coefficient and the interpolation point is derived.
[0036] In step S2001, the friction force, inertia force and gravity parameters are introduced, and the specific process of dynamic modeling of the robot is as follows: ; ; ; In the formula, , , , Respectively represent Generalized forces or moments, angular displacements, angular velocities, and angular accelerations of each joint; It is The inertia matrix of each joint; is the mass of the connecting rod. Indicates connecting rod The centroid coordinates of . , , Indicates connecting rod Moment of inertia; , , Indicates connecting rod The dynamic parameters of the UR5 robot are shown in Table 2.
[0037] Table 2 UR5 robot dynamic parameters
[0038] However, in practical applications, no mechanical system can be completely free of friction, and friction has a significant impact on energy consumption. The friction model used in the present invention also takes into account Coulomb friction ( ) and viscous friction ( ), which is closer to real-world force dynamics. Friction torque acting on the UR5 robot joints It is expressed as: ; in, For time Angular velocity of the joint at time ; is the Coulomb friction coefficient, which indicates a constant friction force that is independent of speed; is the viscous friction coefficient, which is proportional to the angular velocity.
[0039] So the total torque It can be expressed as: ; In this embodiment, the present invention selects three classic trajectories (arc trajectory, circular trajectory and square trajectory) to simulate the energy consumption of the UR5 robot in handling, welding and grinding tasks. The trajectory curves of different operation tasks are as follows: Figure 2 shown.
[0040] In this embodiment, each joint of the robot in step S2002 is driven by a motor. According to the total torque formula obtained in step S10, the motor The effective output power can be calculated as: ; Then the robot energy consumption model is defined as: ; in, The total energy consumption is the target, taking into account the kinetic energy and potential energy of each joint. The total energy consumption is calculated by integrating the power over the trajectory.
[0041] To ensure the long-term stable and reliable operation of the robot, certain operating parameters must meet the following constraints: (1) Reachability constraint: Ensure that the robot end effector can reach the specified target coordinate system, thereby ensuring that the inverse kinematic solution can be obtained.
[0042] (2) Kinematic constraints: These constraints are due to the inherent limitations of industrial robots and are intended to ensure smooth motion; The kinematic constraints are: ; in, Expressed as time Time The joint angular acceleration, Respectively represent The maximum value allowed for the kinematic parameters corresponding to the joints.
[0043] (3) Dynamic constraint: If The joints in The maximum torque of the segment trajectory is , then The dynamic constraints of the joints are: ; In this embodiment, in step S30, the key motion parameters of the UR5 robot are globally optimized in the multidimensional parameter space by using the particle swarm algorithm. The key motion parameters here are the control variables that can be adjusted from the joint interpolation planning, such as the speed, acceleration and other combined parameters of each joint at different times. The present invention adopts an improved particle swarm algorithm optimization strategy to simultaneously reduce the energy consumption of the motion path and maintain the smoothness of the motion trajectory.
[0044] In this embodiment, the particle swarm algorithm implementation process in step S30 is as follows: In the present invention, each particle represents a possible combination of joint motion parameters. Specifically, the particle can be represented in one of the following three forms: 1. Speed parameters: Particles are encoded as speed parameters of each joint .
[0045] 2. Acceleration parameters: Particle encoding is the acceleration parameters of each joint .
[0046] 3. Mixed parameters: Particles are encoded as a combination of velocity and acceleration parameters of each joint .
[0047] The robot's key motion parameters (such as the angular velocity and angular acceleration of each joint at different times on the interpolated trajectory) are mapped to the D-dimensional search space. Each particle is represented by a D-dimensional position vector Indicates that the velocity vector is defined at the same time , individual extreme value , the global extreme value is . The robot's motion energy consumption is used as the optimization objective function: ; Given initial parameters: Set population size 50, the maximum number of iterations is 500, the inertia weight The range of variation is [0.4, 0.9], and the learning factor and The range of variation is [1,2].
[0048] The optimization goal is to minimize the motion energy consumption of the UR5 robot , while maintaining the smoothness of the trajectory. The fitness function is defined as follows: ; in, It represents the total energy consumption of the robot during movement, and the calculation formula is: ; represents the fitness function; is the weight coefficient; Calculate the fitness value of the particle: Calculate the fitness value of the particle, substitute the parameter set represented by the particle into the energy consumption model, and obtain the energy consumption value of the parameter scheme in the entire motion cycle. In each iteration, the fitness function of the robot is used as the optimization target to evaluate the fitness value of each particle. If the current solution of the particle is better than its historical best solution, the optimal value of the particle is updated, otherwise it remains unchanged; if the result is better than the current optimal value of the population, the optimal value of the population is replaced, otherwise it remains unchanged.
[0049] Through this feedback mechanism, each particle continuously adjusts the joint velocity, acceleration, and combination parameters it represents in the parameter space: ; in, For the Particle No. The flight speed at the iteration Dimensional component, For the Particle No. The flight speed at the iteration Dimensional component, It is Particle No. The position of the iteration Dimensional component, It is a particle Best location No. Dimensional component, For particles Best location No. Dimensional component, and yes Two independent random numbers in the interval.
[0050] In this embodiment, the implementation process of introducing the differential evolution algorithm in step S40 is as follows: For each particle in S30 , for each iteration , the target vector Generate a mutation vector through differential mutation operation , randomly select three different particles a , b , c ,and a , b , c and n Not the same, generate a mutation vector: ; in, is the scaling factor of the differential variation, is the mutation vector, , and are the position vectors of different particles randomly selected from the three populations; Through the cross operation, the target vector and mutation vector The components of , according to the crossover probability , ensuring that at least one dimension is crossed, generating a test vector : ; in, , is a uniformly distributed random number. yes A random integer between Represented as a test vector No. Dimensional component, Represented as a mutation vector No. Dimensional component, Represented as the target vector No. Dimensional component; Comparison test vector Compared with the fitness value of the current particle, a vector with better fitness is selected as the position of the next generation particle: ; in, and The test vectors are and the target vector The fitness value of By using dynamically adjusted inertia weights, learning factors and optimized particles, the particle speed and position are updated to balance the particle swarm between exploration and development. After multiple iterations, the particle swarm gradually converges in the high-dimensional parameter space, thereby obtaining the optimal parameter configuration that can significantly reduce the energy consumption of the robot working condition.
[0051] In this embodiment, the square motion trajectory of the present invention is taken as an example to perform simulation analysis. The simulation results are as follows: Figure 2 As shown in (a), the path of the UR5 robot end effector moving along the square trajectory is shown.
[0052] like Figure 3As shown in the figure, the improved particle swarm algorithm is used to optimize the mixed parameters (including speed and acceleration) of the UR5 robot. The results show that as the speed and acceleration increase, the energy consumption of the robot first decreases, and after reaching a certain threshold, the energy consumption begins to increase again. This phenomenon indicates that there is an optimal point for energy consumption, which verifies the effectiveness of the present invention in optimizing motion parameters to reduce energy consumption.
[0053] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
[0054] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. A robot energy consumption optimization method based on improved particle swarm algorithm, characterized in that: The method specifically comprises the following steps: S10, establishing a spatial rectangular coordinate system with the robot base, constructing a robot kinematic model, obtaining the end effector posture, converting the end effector posture into a joint angle sequence based on an inverse solution algorithm, and interpolating the sequence using a polynomial spline function to generate a robot joint motion trajectory; S20, considering the robot joint friction, inertia and gravity parameters to perform dynamic modeling on the robot, and constructing a robot energy consumption optimization model based on the robot dynamic model; S30, based on the robot joint motion trajectory and the robot energy consumption optimization model, the robot's energy consumption is used as the fitness function of the particle swarm algorithm, and combined with the dynamically adjusted inertia weight and learning factor, the key motion parameters of the robot during motion are used as the particles of the algorithm, and the energy consumption of the robot during motion is reduced by updating the speed and position of the particles; S40. Introduce the differential evolution algorithm to enhance the global search capability of the particle swarm through mutation, crossover and selection operations, avoid the algorithm from falling into the local optimum, and output the optimal motion parameters after multiple iterations to achieve efficient optimization of the robot's energy consumption.
2. According to claim 1, a robot energy consumption optimization method based on improved particle swarm algorithm is characterized in that: Step S10 specifically includes: S1001. Establish a spatial rectangular coordinate system with the robot base as the origin, and use the DH parameter method to perform kinematic modeling on each link and joint of the robot to obtain the position and posture of the end effector in the spatial rectangular coordinate system; S1002. Based on the end effector posture obtained from the robot kinematic model, the robot mechanism characteristics are analyzed using the Pieper criterion. In view of the relatively parallel structure of the shoulder, elbow, and wrist joints, a closed inverse solution is implemented to convert the end effector posture into a set of joint angle solutions, i.e., a joint angle sequence, and convert the position coordinate parameters in the spatial rectangular coordinate system into the robot joint angles. ; S1003 , using a polynomial spline function to interpolate the range of the joint angle determined in S1002 to generate a robot joint motion trajectory.
3. The robot energy consumption optimization method based on improved particle swarm algorithm according to claim 2 is characterized in that: In step S1001, the DH parameter method is used to perform kinematic modeling on the links and joints of the robot to obtain: ; in, Indicates from the connecting rod To connecting rod The transformation matrix, is the connecting rod length, is the connecting rod angle, is the connecting rod offset, is the joint angle, , , .
4. The robot energy consumption optimization method based on improved particle swarm algorithm according to claim 3 is characterized in that: In S1003, the interpolation formula is as follows: ; in, , , For the The time of the first, second and third polynomial interpolation of each joint, The coefficient is The first segment interpolation function of the three-segment joint trajectory coefficients, , , Respectively represent The motion trajectory of each joint is obtained by interpolating the polynomial joint angles in the first, second and third segments; and , , The following constraints are met: ; in, Representative is Joints in The joint angular velocity of the segment, Representative is The joints in The joint angular acceleration of the segment, Take one, two, three.
5. The robot energy consumption optimization method based on improved particle swarm algorithm according to claim 2 is characterized in that: In step S20, the robot joint friction, inertia and gravity parameters are considered to perform dynamic modeling on the robot, and the following equation is obtained: ; ; ; in, For the The total driving torque of each joint; For the Generalized forces or moments at each joint; For the Friction torque of each joint; and Respectively indicate time Time Angular velocity and angular acceleration of each joint; and Respectively Coulomb friction coefficient and viscous friction coefficient of each joint; is the inertia matrix of the robot; are the Coriolis force and centrifugal force terms of the robot; is the gravity term of the robot.
6. The robot energy consumption optimization method based on improved particle swarm algorithm according to claim 1 is characterized in that: In step S20, a robot energy consumption model is established based on the robot dynamics model. The robot energy consumption model is: ; in, is the target total energy consumption; is the effective output power of the motor; For the The generalized forces or moments at each joint, For the The friction torque of each joint is obtained using the robot dynamics model; Representative is The angular velocity of each joint.
7. The robot energy consumption optimization method based on improved particle swarm algorithm according to claim 6 is characterized in that: In step S20, the constraints of the robot energy consumption optimization model include reachability constraints, kinematic constraints, and dynamic constraints; The kinematic constraints are: ; in, Expressed as time Time The joint angular acceleration, Respectively represent The maximum value allowed for the kinematic parameters corresponding to each joint; The dynamic constraints are: ; in, For the The joints in The maximum torque of the segment trajectory.
8. The robot energy consumption optimization method based on improved particle swarm algorithm according to claim 1 is characterized in that: The implementation process of the particle swarm algorithm in step S30 is as follows: The angular velocity and angular acceleration of each joint of the robot at different times on the interpolated trajectory are mapped to the D-dimensional search space. Each particle is represented by a D-dimensional position vector, and a D-dimensional velocity vector is defined at the same time. The D-dimensional individual extreme value is and the D-dimensional global extreme value is. The fitness value of the particle is evaluated by the fitness function with the minimization of the robot energy consumption as the optimization goal. The parameter set represented by the particle is substituted into the robot energy consumption optimization model to obtain the total energy consumption of the parameter scheme in the entire motion cycle. In each iteration, the fitness function is used to evaluate the fitness value of each particle, and the current fitness of the particle is compared with its historical best fitness. If the performance is better, the individual best position of the particle is updated; the fitness is compared with the global best fitness, and if it is better, the global best position is updated; the fitness function is defined as follows: ; in, It represents the total energy consumption of the robot during movement, and the calculation formula is: ; represents the fitness function; is the weight coefficient; Through the above iterative feedback mechanism, each particle continuously adjusts the joint velocity, acceleration and combination parameters it represents in the parameter space: ; ; in, For the Particle No. The flight speed at the iteration Dimensional component, For the Particle No. The flight speed at the iteration Dimensional component, It is Particle No. The position of the iteration Dimensional component, It is a particle Best location No. Dimensional component, For particles Best location No. Dimensional component, and yes Two independent random numbers in the interval, and is the dynamically adjusted learning factor, and is the initial learning factor, and is the final learning factor, is the dynamically adjusted inertia weight, is the initial inertia weight, is the final inertia weight, is the maximum number of iterations, is the current iteration number.
9. The robot energy consumption optimization method based on improved particle swarm algorithm according to claim 1 is characterized in that: The differential evolution algorithm in step S40 is specifically: For each particle in S30 , for each iteration , the target vector Generate a mutation vector through differential mutation operation , randomly select three different particles a , b , c ,and a , b , c and n Not the same, generate a mutation vector: ; in, is the scaling factor of the differential variation, is the mutation vector, , and are the position vectors of different particles randomly selected from the three populations; Through the cross operation, the target vector and mutation vector The components of , according to the crossover probability , ensuring that at least one dimension is crossed, generating a test vector : ; in, , is a uniformly distributed random number. yes A random integer between Represented as a test vector No. Dimensional component, Represented as a mutation vector No. Dimensional component, Represented as the target vector No. Dimensional component; Comparison test vector Compared with the fitness value of the current particle, a vector with better fitness is selected as the position of the next generation particle: ; in, and The test vectors are and the target vector The fitness value of By using dynamically adjusted inertia weights, learning factors and optimized particles, the particle speed and position are updated to balance the particle swarm between exploration and development. After multiple iterations, the particle swarm gradually converges in the high-dimensional parameter space, thereby obtaining the optimal parameter configuration that can significantly reduce the energy consumption of the robot working condition.
Citation Information
Patent Citations
Space multi-joint robot path planning method based on differential evolution particle swarm optimization
CN109108963A
Joint module inequality constraint optimal robust control method based on reinforcement learning
CN113703319A
Parallel mechanism trajectory planning method considering joint friction
CN114986514A
Source-containing power distribution network reconstruction method based on improved particle swarm optimization
CN115204045A
Panel mounting robot energy consumption optimal trajectory planning method
CN116214520A
Cited By
Online correction control method and system for track precision of electric spark machining robot
CN121635049A
Multi-target hybrid optimization control method and system for motion trail of industrial robot
CN122401443A
Multi-objective hybrid optimization control method and system for industrial robot motion trajectory
CN122401443B