Mechanical arm path optimization method based on reverse dynamic programming and hybrid algorithm
By optimizing the robotic arm path through inverse dynamic programming and hybrid algorithms, the problems of insufficient positioning accuracy and excessive energy consumption in traditional methods are solved, achieving high-precision and high-efficiency robotic arm motion control, which is suitable for intelligent manufacturing and precision assembly scenarios.
Patent Information
- Application Number
- CN202511174829.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2025-11-14
AI Technical Summary
Traditional robotic arm path planning methods result in insufficient positioning accuracy in mobile base systems, making it difficult to effectively optimize multi-target point tasks. Furthermore, they lack adaptability in dynamic environments, making it difficult to meet the real-time requirements of high-cycle production.
A hybrid algorithm combining inverse dynamic programming, A* algorithm, Monte Carlo algorithm and particle swarm optimization is used to optimize the movement path of the robotic arm base and the joint angle path. Through inverse search and adaptive optimization mechanism, global and local collaborative optimization is achieved.
It significantly improves the positioning accuracy and energy efficiency of the robotic arm, with the positioning error of the end effector controlled within ±1.5mm. The energy consumption per work cycle is reduced to 15.3J, and the energy efficiency reaches 46.3%, meeting the industrial requirements of high precision and high efficiency.
Smart Images

Figure CN120941388A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial robot motion control technology, and in particular relates to a method for optimizing the path of a robotic arm based on inverse dynamic programming and a hybrid algorithm. Background Technology
[0002] Robotic arm path planning is a core research direction in the field of industrial robotics. Its goal is to provide optimal trajectory schemes for robotic arm movements to meet multiple requirements such as accuracy, efficiency, and energy consumption. With the development of intelligent manufacturing, robotic arms are widely used in industrial scenarios such as assembly, welding, and material handling, which places higher demands on path planning technology. Traditional path planning methods typically employ single algorithmic strategies, such as global path search based on the A* algorithm or joint space planning based on particle swarm optimization, which struggle to simultaneously achieve both motion accuracy and energy efficiency optimization.
[0003] Current robotic arm path planning technologies face several key challenges: First, in robotic arm systems with movable bases, traditional methods often separate base positioning from end-effector motion planning, leading to a "dead zone effect" due to link length limitations when the robotic arm approaches the target area, severely impacting positioning accuracy. Second, existing algorithms lack effective global optimization capabilities when handling multi-target tasks, often resulting in path redundancy and excessive energy consumption. Third, conventional hybrid algorithm strategies are insufficient in adapting to dynamic environments, failing to adjust optimization strategies based on real-time conditions. Furthermore, with increasing complexity in industrial scenarios, existing methods face significant challenges in computational efficiency, struggling to meet the stringent real-time requirements of high-paced production. These technical bottlenecks severely restrict the application of robotic arms in high-end manufacturing, necessitating a novel path planning method that can collaboratively optimize base motion and joint trajectories, considering both global and local optimization. Summary of the Invention
[0004] Purpose of the Invention: The purpose of this invention is to provide a robotic arm path optimization method based on inverse dynamic programming and a hybrid algorithm. This method is applicable to motion planning of multi-degree-of-freedom robotic arms in complex environments. By integrating an inverse path backtracking mechanism with multi-algorithm collaborative optimization, this method solves the problem of balancing positioning accuracy and energy efficiency for robotic arms in confined workspaces. It can be widely applied in industrial scenarios requiring high-precision path planning, such as intelligent manufacturing, warehousing and logistics, and precision assembly. In particular, it provides a solution that balances real-time performance and optimality for composite motion systems involving the coordinated movement of the robotic arm base and the end effector.
[0005] Technical solution: The present invention provides a robotic arm path optimization method based on inverse dynamic programming and hybrid algorithms, comprising the following steps:
[0006] Step 1: Based on the obstacle location information, use the A* algorithm to generate the initial movement path of the robotic arm base;
[0007] Step 2: Use the Monte Carlo algorithm to simulate the joint space range of the robotic arm and construct its Cartesian workspace cloud map;
[0008] Step 3: Based on the workspace cloud map, perform a reverse search along the initial movement path, and determine the optimal stopping point of the robotic arm base with the allowable range of end-effector error as a constraint;
[0009] Step 4: Optimize the joint angle path of the robotic arm using a particle swarm optimization algorithm with a penalty term, with the goal of minimizing energy consumption and end-effector error.
[0010] Step 5: For multi-target point scenarios, traverse all permutations and combinations of target points, use the improved A* algorithm to generate the globally optimal movement path, and repeat steps 2-4 to optimize the joint angle paths of each target point.
[0011] Further, step 1 specifically involves: finding the shortest path from the starting node to the target node in the graph structure using the A* algorithm. The A* algorithm uses a heuristic function to accelerate the search and find the optimal solution; the Manhattan distance is used as the heuristic function to calculate the shortest path from the starting node to the target node. i y i Distance from (x0, y0) to the target point:
[0012] h(i) = |x i -x0|+|y i -y0|
[0013] Actual cost function
[0014] g(i) = the actual distance of the current node i from the starting point
[0015] The evaluation function is
[0016] f(i) = h(i) + g(i)
[0017] That is, h(i) is the current node (x) i y i The distance from node i to the target point (x0, y0), g(i) is the actual distance from the current node i to the starting point, and f(i) is the evaluation function;
[0018] The specific steps are as follows:
[0019] Step 1: Initialize the algorithm: Create open and closed sets; add the starting point to the open set and set its g(start) = 0, h(start) = D, f(start) = g(start) + h(start);
[0020] Step 2: Stop the search if the open set becomes empty or the destination is reached; otherwise, continue to Step 3.
[0021] Step 3: Traverse the open set, find the node with the smallest f value, and use it as the current node to be processed;
[0022] Step 4: Move the current node to the closed set;
[0023] Step 5: For the four squares above, below, left, and right of the current node: if the square is in the closed set, ignore the square;
[0024] If a square is not in the open set or the new path is shorter than the known path, update the g value, f value, and parent node, and add or update it in the open set.
[0025] Step 6: Path Construction: Starting from the end point, each square moves to the starting point through the parent node pointer to construct the shortest path.
[0026] Furthermore, in step 2, the Monte Carlo algorithm estimates the solution to the mathematical problem by sampling random samples and using probability statistics; based on the joint space range limitation of the robotic arm, it is mapped to Cartesian space, and the Monte Carlo algorithm is used to construct the workspace cloud map of the robotic arm.
[0027] Furthermore, in step 3, the reverse search along the initial movement path specifically involves:
[0028] The robot arm's end effector reaches each backtracking point by tracing back along the initial path from the target point. The reverse search includes a dynamic step size adjustment mechanism.
[0029] ΔL=η·L_max·(1-P_reach)
[0030] Where η is the adaptive coefficient, P_reach is the probability of reaching the current position, and L_max is the maximum backtracking step size allowed for the robotic arm base in a single reverse search; the first backtracking point that meets the end-effector error threshold and has the lowest energy consumption is selected as the optimal stopping point.
[0031] Furthermore, step 4 specifically includes the following steps:
[0032] Step 4.1: Within the allowable range of end-effector error, minimize end-effector error and energy consumption, and optimize the joint angle path of the robotic arm. There are two optimization objectives:
[0033]
[0034] The coordinates of the robotic arm's end effector are (x1, y1, z1) = (p x p y pz Let the target point be (x2, y2, z2) = (p x2 p y2 p z2 ); E total The total energy consumption of the robotic arm for grasping a single item, where d is the Euclidean distance between the target point coordinates and the robotic arm end-effector coordinates, (x1, y1, z1) are the end-effector coordinates, (x2, y2, z2) are the target point position, and J is the total energy consumption of the robotic arm for grasping a single item. i Let ω be the rotational inertia of the i-th joint. i Let z be the average angular velocity of the i-th joint. end The height of the robotic arm reaching the target point is the height of the target point, z. inital is the height of the robotic arm in its zero-position state, and mg is the weight of the robotic arm.
[0035] Step 4.2: Use the linear weighting method to transform the energy consumption optimization problem into a multi-objective optimization problem;
[0036] Step 4.3: Determine the constraints as the allowable range of end-effector error and the range of variation of each joint angle;
[0037] Step 4.4: Solve using an adaptive optimization algorithm to obtain the optimized path for the robot arm joint angles.
[0038] Furthermore, step 4.2 specifically involves: first, E total The dimensionless nature of d and its weights are used to construct an optimization model, thereby integrating multiple objective functions into a single objective function;
[0039] The robotic arm's movement process includes min d and max d.
[0040] The optimization objective is then transformed into
[0041]
[0042] Where F is the objective function, d is the Euclidean distance between the target point coordinates and the robot arm end coordinates, max d is the maximum value of the distance between the target point coordinates and the robot arm end coordinates, min d is the minimum value of the distance between the target point coordinates and the robot arm end coordinates, and E total Min E represents the total energy consumption during the movement of the robotic arm. total Max E represents the minimum total energy consumption during the movement of the robotic arm. total Let w1 be the maximum total energy consumption during the movement of the robotic arm, and w2 be the weighting coefficients for minimizing the end effector error and energy consumption, respectively, and w1 + w2 = 1.
[0043] Furthermore, step 4.3 specifically involves the following constraints: the allowable range of end-effector error and the range of variation of each joint angle.
[0044]
[0045] Where, θ i Let θ be the angle between adjacent links of the i-th joint. imin θ is the minimum included angle between adjacent links of the i-th joint. imax It represents the maximum included angle between adjacent links of the i-th joint.
[0046] Furthermore, step 4.4 specifically involves employing a particle swarm optimization algorithm with a penalty term, the specific process of which is as follows:
[0047] Step 4.4.1: Initialize the particle swarm and specify the values of the parameters, including the swarm size N and the particle position x. i and speed v i ;
[0048] Step 4.4.2: Calculate the fitness value f(t) for each particle;
[0049] Step 4.4.3: Combine the fitness value f(t) and the individual extreme value p. best (i) Compare if f(t) > p best (i), then replace p with f(t). best (i);
[0050] Step 4.4.4: Combine the fitness value f(t) and the global extremum g. best Comparison, if f(t) > g best Then replace g with f(t). best ;
[0051] Step 4.4.5: Determine if a particle has gone out of bounds: If a particle violates the constraints, adjust its fitness using a penalty term;
[0052] Step 4.4.6: Iteratively update the particle velocity v i and position x i ;
[0053] Step 4.4.7: Perform boundary condition processing;
[0054] Step 4.4.8: Determine if the algorithm termination condition is met: if yes, end the algorithm and output the optimization result; otherwise, return to step 4.4.2.
[0055] Furthermore, step 5 specifically involves:
[0056] For multi-target point scenarios, all permutations and combinations of target points are traversed, and the improved A* algorithm is used to generate the globally optimal movement path. Steps 2-4 are repeated to optimize the joint angle path of each target point. This includes: for the shortest path problem of multi-target points, the arrival order of each target point is first determined by iterative loop, and then the improved A* algorithm is used to obtain the optimal base movement path through MATLAB programming, and the path is visualized using a grid map.
[0057] The improved A* algorithm is as follows: determine the order in which the base passes through the target points when it moves, use a brute-force search algorithm to traverse all paths, use the A* algorithm to update the positions of the starting point and the ending point in real time, find the shortest path that passes through all target points, and obtain the optimal base movement path.
[0058] The present invention also discloses a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method of the present invention.
[0059] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages:
[0060] 1. Positioning accuracy is significantly improved
[0061] By organically combining an innovative reverse dynamic backtracking mechanism with Monte Carlo workspace modeling technology, this method effectively overcomes the technical bottleneck of the "dead zone effect" caused by the kinematic constraints of the robotic arm in traditional methods. Rigorous testing and verification have shown that on a standard six-DOF industrial robotic arm platform, the positioning error of the end effector optimized using this method can be controlled within ±1.5mm, while maintaining low energy consumption. This technological breakthrough significantly improves the positioning performance of the robotic arm in near-field precision operations, providing reliable technical support for industrial applications such as high-precision assembly and precision welding.
[0062] 2. Significant results have been achieved in energy efficiency optimization.
[0063] This invention creatively proposes a two-level optimization architecture, which achieves outstanding energy-saving effects through an improved collaborative optimization mechanism of the A* algorithm and the adaptive particle swarm optimization algorithm. The energy consumption per operation cycle is reduced from 28.5 J in the traditional method to 15.3 J, achieving an energy-saving efficiency of 46.3%. This optimization effect can be translated into significant economic benefits in practical industrial applications.
[0064] 3. The core innovations of this invention are as follows: First, a dynamic backtracking mechanism for the robotic arm's workspace is established. By combining Monte Carlo simulation with reverse path search, the optimal stopping posture of the base is intelligently determined, fundamentally avoiding the "dead zone effect" caused by the limitation of the length of the robotic arm's links in traditional methods. Second, a two-level optimization architecture is constructed. The improved A* algorithm is used in the upper level to realize global path planning, and the adaptive particle swarm optimization algorithm is used in the lower level to optimize the joint angle trajectory, achieving a synergistic unity of global and local optimization. Third, an energy consumption-precision balance model is developed, which quantitatively integrates joint dynamic parameters and kinematic constraints, providing a scientific evaluation standard for path optimization. Attached Figure Description
[0065] Figure 1 Here is a flowchart of the particle swarm optimization algorithm;
[0066] Figure 2 The initial Denavit-Hartenberg (DH) parameters for the robotic arm;
[0067] Figure 3 These are parameters related to the energy consumption of joint rotation.
[0068] Figure 4 The image shows the workspace cloud map of the robotic arm obtained using the Monte Carlo algorithm.
[0069] Figure 5 The example shows the optimal movement path map for a single target obtained by solving the problem using the A* algorithm. Detailed Implementation
[0070] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0071] Example: A six-DOF robotic arm receives a cargo-grabbing task, requiring it to grab a cargo while navigating around an obstacle. Upon receiving the instruction, the robotic arm's base (considered a point mass during movement; for simplicity, energy consumption during movement is ignored, only energy consumption during the grabbing process is considered) first moves to the vicinity of the target point before performing the grabbing action. The robotic arm's base cannot move along diagonal lines by default in the grid diagram; it must return to its starting point. The robotic arm starts in a zero-position state. None of the robotic arm's joints can pass over obstacles to grab the object. The combined mass of the robotic arm and its end effector is 5 kg. The moments of inertia and average angular velocities of each joint are as follows: Figure 3 As shown, the range of angle changes for each joint is as follows: Figure 2 As shown in the figure. Assuming the end-effector error (the Euclidean distance between the target point coordinates and the robot arm end coordinates) is within the allowable range of ±200mm, design the optimal base movement path and the optimal joint angle path with the goal of minimizing end-effector error and energy consumption.
[0072] The constructed model is specifically as follows
[0073]
[0074] The weights of each objective function are:
[0075] Using the Monte Carlo algorithm, a cloud map of the robotic arm's workspace is constructed as follows: Figure 4 As shown
[0076] Solution results: The optimal base movement path obtained using the A* algorithm is as follows: Figure 5 As shown
[0077] The large dot in the diagram represents the optimal stopping point for the robotic arm's base.
[0078] When the robotic arm base moves to the target position before performing the grasping action, the end effector error calculated through programming is relatively large (average 2.3175 × 10⁻⁶). 3 The analysis shows that because the robotic arm itself has a certain length, if the base of the robotic arm is too close to the target position, a dead zone will be created. Therefore, it is unreasonable to move the base to the target position, and it is necessary to reselect the stopping point of the base.
[0079] Based on the obtained optimal movement path, the base backtracks from the target point to find the best stopping point, calculates the end error of the positions traversed, and records the first position within the allowable range of end error as the best stopping point.
[0080] The optimal stopping point obtained through programming and iterative solving is (800, 1400, 200), the minimum energy consumption is 15.2515J, and the minimum end effector error is 21.1449mm. The joint angles under these results are...
[0081]
[0082] This invention is not limited to the embodiments described above. The above description of specific embodiments is intended to illustrate and explain the technical solutions of this invention. The specific embodiments described above are merely illustrative and not restrictive. Without departing from the spirit and scope of the claims, those skilled in the art can make many specific modifications based on the teachings of this invention, and these modifications all fall within the scope of protection of this invention.
Claims
1. A method for optimizing the path of a robotic arm based on inverse dynamic programming and a hybrid algorithm, characterized in that, Includes the following steps: Step 1: Based on the obstacle location information, use the A* algorithm to generate the initial movement path of the robotic arm base; Step 2: Use the Monte Carlo algorithm to simulate the joint space range of the robotic arm and construct its Cartesian workspace cloud map; Step 3: Based on the workspace cloud map, perform a reverse search along the initial movement path, and determine the optimal stopping point of the robotic arm base with the allowable range of end-effector error as a constraint; Step 4: Optimize the joint angle path of the robotic arm using a particle swarm optimization algorithm with a penalty term, with the goal of minimizing energy consumption and end-effector error. Step 5: For multi-target point scenarios, traverse all permutations and combinations of target points, use the improved A* algorithm to generate the globally optimal movement path, and repeat steps 2-4 to optimize the joint angle paths of each target point.
2. The robotic arm path optimization method based on inverse dynamic programming and hybrid algorithm according to claim 1, characterized in that, Step 1 specifically involves: finding the shortest path from the starting node to the target node in the graph structure using the A* algorithm. The A* algorithm uses a heuristic function to speed up the search and find the optimal solution; the Manhattan distance is used as the heuristic function to calculate the shortest path from the starting node (x) to the target node. i y i Distance from (x0, y0) to the target point: h(i)=|x i -x0|+|y i -y0| Actual cost function g(i) = the actual distance of the current node i from the starting point The evaluation function is f(i) = h(i) + g(i) That is, h(i) is the current node (x) i y i The distance from node i to the target point (x0, y0), g(i) is the actual distance from the current node i to the starting point, and f(i) is the evaluation function; The specific steps are as follows: Step 1: Initialize the algorithm: Create open and closed sets; add the starting point to the open set and set its g(start) = 0, h(start) = D, f(start) = g(start) + h(start); Step 2: Stop the search if the open set becomes empty or the destination is reached; otherwise, continue to Step 3. Step 3: Traverse the open set, find the node with the smallest f value, and use it as the current node to be processed; Step 4: Move the current node to the closed set; Step 5: For the four squares above, below, left, and right of the current node: if the square is in the closed set, ignore the square; If a square is not in the open set or the new path is shorter than the known path, update the g value, f value, and parent node, and add or update it in the open set. Step 6: Path Construction: Starting from the end point, each square moves to the starting point through the parent node pointer to construct the shortest path.
3. The robotic arm path optimization method based on inverse dynamic programming and hybrid algorithm according to claim 1, characterized in that, In step 2, the Monte Carlo algorithm estimates the solution to the mathematical problem by sampling random samples and using probability statistics; based on the joint space range limitation of the robotic arm, it is mapped to Cartesian space, and the Monte Carlo algorithm is used to construct the workspace cloud map of the robotic arm.
4. The robotic arm path optimization method based on inverse dynamic programming and hybrid algorithm according to claim 1, characterized in that, In step 3, the reverse search along the initial movement path specifically involves: The robot arm's end effector reaches each backtracking point by tracing back along the initial path from the target point. The reverse search includes a dynamic step size adjustment mechanism. ΔL=η·L_max·(1-P_reach) Where η is the adaptive coefficient, P_reach is the probability of reaching the current position, and L_max is the maximum backtracking step size allowed for the robotic arm base in a single reverse search; the first backtracking point that meets the end-effector error threshold and has the lowest energy consumption is selected as the optimal stopping point.
5. The robotic arm path optimization method based on inverse dynamic programming and hybrid algorithm according to claim 1, characterized in that, Step 4 specifically includes the following steps: Step 4.1: Within the allowable range of end-effector error, minimize end-effector error and energy consumption, and optimize the joint angle path of the robotic arm. There are two optimization objectives: The coordinates of the robotic arm's end effector are (x1, y1, z1) = (p x p y p z Let the target point be (x2, y2, z2) = (p x2 p y2 p z2 ); E total The total energy consumption of the robotic arm for grasping a single item, where d is the Euclidean distance between the target point coordinates and the robotic arm end-effector coordinates, (x1, y1, z1) are the end-effector coordinates, (x2, y2, z2) are the target point position, and J is the total energy consumption of the robotic arm for grasping a single item. i Let ω be the rotational inertia of the i-th joint. i Let z be the average angular velocity of the i-th joint. end The height of the robotic arm reaching the target point is the height of the target point, z. inital is the height of the robotic arm in its zero-position state, and mg is the weight of the robotic arm. Step 4.2: Use the linear weighting method to transform the energy consumption optimization problem into a multi-objective optimization problem; Step 4.3: Determine the constraints as the allowable range of end-effector error and the range of variation of each joint angle; Step 4.4: Solve using an adaptive optimization algorithm to obtain the optimized path for the robot arm joint angles.
6. The robotic arm path optimization method based on inverse dynamic programming and hybrid algorithm according to claim 5, characterized in that, Step 4.2 specifically involves: First, E total The dimensionless nature of d and its weights are used to construct an optimization model, thereby integrating multiple objective functions into a single objective function; The robotic arm's movement process includes min d and max d. The optimization objective is then transformed into Where F is the objective function, d is the Euclidean distance between the target point coordinates and the robot arm end coordinates, max d is the maximum value of the distance between the target point coordinates and the robot arm end coordinates, min d is the minimum value of the distance between the target point coordinates and the robot arm end coordinates, and E total Min E represents the total energy consumption during the movement of the robotic arm. total Max E represents the minimum total energy consumption during the movement of the robotic arm. total Let w1 be the maximum total energy consumption during the movement of the robotic arm, and w2 be the weighting coefficients for minimizing the end effector error and energy consumption, respectively, and w1 + w2 = 1.
7. The robotic arm path optimization method based on inverse dynamic programming and hybrid algorithm according to claim 5, characterized in that, Step 4.3 specifically involves the following constraints: the allowable range of end-effector error and the range of variation of each joint angle. Where, θ i Let θ be the angle between adjacent links of the i-th joint. i min θ is the minimum included angle between adjacent links of the i-th joint. i max It represents the maximum included angle between adjacent links of the i-th joint.
8. The robotic arm path optimization method based on inverse dynamic programming and hybrid algorithm according to claim 5, characterized in that, Step 4.4 specifically involves using a particle swarm optimization algorithm with a penalty term. The specific process is as follows: Step 4.4.1: Initialize the particle swarm and specify the values of the parameters, including the swarm size N and the particle position x. i and speed v i ; Step 4.4.2: Calculate the fitness value f(t) for each particle; Step 4.4.3: Combine the fitness value f(t) and the individual extreme value p. best (i) Compare if f(t) > p best (i), then replace p with f(t). best (i); Step 4.4.4: Combine the fitness value f(t) and the global extremum g. best Comparison, if f(t) > g best Then replace g with f(t). best ; Step 4.4.5: Determine if a particle has gone out of bounds: If a particle violates the constraints, adjust its fitness using a penalty term; Step 4.4.6: Iteratively update the particle velocity v i and position x i ; Step 4.4.7: Perform boundary condition processing; Step 4.4.8: Determine if the algorithm termination condition is met: if yes, end the algorithm and output the optimization result; otherwise, return to step 4.4.
2.
9. The robotic arm path optimization method based on inverse dynamic programming and hybrid algorithm according to claim 1, characterized in that, Step 5 specifically involves: For multi-target point scenarios, all permutations and combinations of target points are traversed, and the improved A* algorithm is used to generate the globally optimal movement path. Steps 2-4 are repeated to optimize the joint angle path of each target point. This includes: for the shortest path problem of multi-target points, the arrival order of each target point is first determined by iterative loop, and then the improved A* algorithm is used to obtain the optimal base movement path through MATLAB programming, and the path is visualized using a grid map. The improved A* algorithm is as follows: determine the order in which the base passes through the target points when it moves, use a brute-force search algorithm to traverse all paths, use the A* algorithm to update the positions of the starting point and the ending point in real time, find the shortest path that passes through all target points, and obtain the optimal base movement path.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method of claim 1.