Trajectory planning method and planning system based on improved ant colony algorithm
By improving the ant colony algorithm, using the raster method to build a three-dimensional environmental model and ant search mechanism, screening elite ants to update pheromones, solving the problem of the standard ant colony algorithm being easily trapped in local optimization and long iteration time, and achieving a more efficient path Planning has improved the working efficiency of industrial robots.
Patent Information
- Application Number
- CN202410988750.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-11-12
AI Technical Summary
Standard ant colony algorithms are prone to fall into local optimization in path planning, and have a long iteration time, making it difficult to effectively improve the working efficiency of industrial robots.
The three-dimensional environment model of robotic arm motion is constructed through the raster method. The ant conducts raster searches, and selects elite ants for local pheromone updates based on the contribution degree, judges whether the target point is reached, updates the minimum path, and completes the path after the maximum number of iterations planning.
It shortens the path planning time, improves work efficiency, reduces the time of useless paths of the robotic arm, improves the work efficiency of the robot, and avoids local optimal problems.
Smart Images

Figure CN118927239A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of path planning, and in particular relates to a trajectory planning method and a planning system based on an improved ant colony algorithm. Background Art
[0002] At present, with the continuous development of enterprises, everyone is looking for ways to improve efficiency while reducing costs. Automated industrial robots are widely used for their high efficiency, high safety and ability to reduce labor costs. How to further improve work efficiency while using robots has become a current problem. Path planning is a key part of robot movement. Planning a good path can not only save the robot's working time but also complete the work more safely. Many enterprise robots use algorithms to optimize the planned path, among which the commonly used ones include: ant colony algorithm, etc.; however, the standard ant colony algorithm is prone to fall into local optimality, and the path optimization iteration time of the standard ant colony algorithm is long.
[0003] Therefore, based on the above technical problems, it is necessary to design a new trajectory planning method and planning system based on the improved ant colony algorithm. Summary of the invention
[0004] The purpose of the present invention is to provide a trajectory planning method and a planning system based on an improved ant colony algorithm.
[0005] In order to solve the above technical problems, the present invention provides a trajectory planning method based on an improved ant colony algorithm, comprising:
[0006] The grid method is used to construct the three-dimensional environment model of the robot arm movement and initialize the parameters;
[0007] Ants conduct grid searches;
[0008] After searching, elite ants are selected based on their contribution to perform local pheromone updates;
[0009] Determine whether the target point has been reached;
[0010] Update the minimum path after reaching the target point;
[0011] Update the global pheromone on the minimum path;
[0012] Path planning is completed after reaching the maximum number of iterations.
[0013] Furthermore, the grid method constructs a three-dimensional environment model of the robot arm movement, and the method for initializing parameters includes:
[0014] The robot arm operating environment is processed and constructed into a three-dimensional environment model by using a grid method;
[0015] Set the number of ants k, the importance of the pheromone heuristic factor α, and the importance of the expected value heuristic factor β;
[0016] τ ij (0) = τ0, i, j∈C g ;
[0017] Place k ants at the initial point S and construct a taboo table tabu k (k=1, 2, ..., m), add the initial point S;
[0018] Set the upper and lower limits of pheromone concentration [τ min , τ max ];
[0019] Set the current number of iterations N c = 0, and the maximum number of iterations N cmax .
[0020] Furthermore, the method for ants to perform grid search includes:
[0021] Based on the current grid g i As the center, select the next path node g from the preset number of adjacent grids i+1 ;
[0022]
[0023] Where η i (t) is the heuristic function; It means that ant k leaves g at time t. i Grid moves to g i+1 The probability of the grid;
[0024]
[0025] Furthermore, the method of selecting elite ants according to contribution after searching to update local pheromones includes:
[0026] After completing a search, the pheromone is adjusted according to the elite ant strategy and then locally updated;
[0027] τ i,j (t+n)=(1-ερ)·τ i,j (t)+Δτ i,j ;
[0028]
[0029] In the formula, Q1 represents the pheromone intensity outside the local area; ρ1 represents the pheromone volatility coefficient outside the local area; ε is the preset weight;
[0030] According to the action range of the ants, τ i,i+1 (t+1) is limited to [τ min , τ max ] interval.
[0031] further,
[0032] Among them, n is the number of ants in this iteration; n i is the ranking of the ants in the current iteration.
[0033] Further, the method for determining whether the target point has been reached includes:
[0034] Every time ant k completes a step, it needs to check the current grid g i+1 Whether the target point has been reached, if so, proceed to the next step, otherwise, restart the grid search.
[0035] Further, the method for updating the minimum path after reaching the target point includes:
[0036] After completing a path search, you can use the taboo table tabu k Get the path path k (S, A), for this path, the length needs to be calculated so that it can be compared with the path lengths obtained by other ant colonies to find the shortest path for this iteration. min (Nc);
[0037] Compare the optimal path of this iteration with the minimum path of previous iterations. If the path of this iteration is shorter, let path min =path min (N c ) and record the taboo table k The order of the grids in .
[0038] Furthermore, the method for updating the global pheromone on the minimum path includes:
[0039] Update the external pheromone concentration on the minimum path:
[0040]
[0041] Where Q2 represents the global external pheromone intensity; ρ2 represents the global external pheromone volatility coefficient; Indicates that you have experienced N c After iterations, path l ij The remaining pheromone size on the fit k (N c ) represents the total length of the complete path searched by ant k.
[0042] Further, the method for completing the path planning after reaching the maximum number of iterations includes:
[0043] Set the iteration counter N c Add 1, if N c +1=N cmax , then the path planning is completed, path min is the global optimal path. The grid numbers that the optimal path passes through are given by the taboo table tabu k get;
[0044] If N c +1≠N cmax This means that the algorithm has not yet completed the iteration, clear the taboo table, and perform the grid search step again.
[0045] On the other hand, the present invention also provides a planning system using the above-mentioned trajectory planning method based on the improved ant colony algorithm, comprising:
[0046] An initialization module, which is configured to construct a three-dimensional environment model using a grid method and initialize parameters;
[0047] A search module, which is configured so that ants conduct grid search;
[0048] A local pheromone update module, which is configured to select elite ants according to their contribution after searching to perform local pheromone update;
[0049] A target point determination module is configured to determine whether the target point has been reached;
[0050] A minimum path update module, which is configured to update the minimum path after reaching the target point;
[0051] A global pheromone update module, which is configured to update the global pheromone on the minimum path;
[0052] The planning completion module is configured to complete the path planning after reaching the maximum number of iterations.
[0053] The beneficial effects of the present invention are as follows: the present invention constructs a three-dimensional environment model of the robot arm movement through a grid method and initializes the parameters; the ants perform a grid search; after the search, elite ants are screened out according to the contribution to perform local pheromone updates; it is determined whether the target point has been reached; after the target point has been reached, the minimum path is updated; the global pheromone on the minimum path is updated; after the maximum number of iterations is reached, the path planning is completed; and the robot arm grasping path is planned according to the improved ant colony algorithm, which solves the problem that the ant colony algorithm has a long retrieval time and is easy to fall into the local optimum, shortens the path planning time, greatly improves the work efficiency, reduces the time spent on some useless paths of the robot arm, and improves the work efficiency of the robot.
[0054] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description and the drawings.
[0055] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0057] Figure 1 is a flow chart of a trajectory planning method based on an improved ant colony algorithm of the present invention;
[0058] Figure 2 It is a schematic diagram of grid selection for ant simulation of the present invention;
[0059] Figure 3 It is a schematic diagram of constructing a three-dimensional environment model using the grid method of the present invention;
[0060] Figure 4 It is the standard ant colony algorithm trajectory planning path;
[0061] Figure 5 It is the planning path of the trajectory planning method based on the improved ant colony algorithm of the present invention;
[0062] Figure 6 is the convergence curve of the standard ant colony algorithm;
[0063] Figure 7 It is the convergence curve of the trajectory planning method based on the improved ant colony algorithm of the present invention. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are 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.
[0065] like Figures 1 to 7As shown, in at least one embodiment, a trajectory planning method based on an improved ant colony algorithm is provided, including: constructing a three-dimensional environment model of the robot arm movement by a grid method, and initializing parameters; ants performing grid search; after the search, elite ants are selected according to contribution to perform local pheromone update; judging whether the target point has been reached; updating the minimum path after reaching the target point; updating the global pheromone on the minimum path; completing the path planning after reaching the maximum number of iterations; and planning the robot arm grasping path according to the improved ant colony algorithm, solving the problems of long retrieval time and easy falling into local optimality of the ant colony algorithm, shortening the path planning time, greatly improving work efficiency, reducing the time spent on some useless paths of the robot arm, and improving the work efficiency of the robot.
[0066] The grid method constructs a three-dimensional environment model of the robot movement and the method for initializing parameters includes: processing the robot operation environment and constructing the robot operation environment into a three-dimensional environment model by the grid method; for example, using the grid model in MATLAB to construct an initial simulation experiment environment; setting the number of ants k, the importance of the pheromone inspiration factor α, and the importance of the expected value inspiration factor β;
[0067] Initialize the algorithm and set τ ij (0) = τ0, i, j∈C g ;
[0068] Place k ants at the initial point S and construct a taboo table tabu k (k=1,2,...,m), add the initial point S; set the upper and lower limits of pheromone concentration [τ min , τ max ]; Set the current number of iterations N c = 0, and the maximum number of iterations N cmax .
[0069] The method for ants to perform grid search includes: using the current grid g i As the center, select the next path node g from the preset number of adjacent grids i+1 ; The preset number of adjacent grids can be the grids at the six positions of up, down, left, right, front and back near the center of the current grid. In order to reduce the difficulty of the ant's search, the movement of the end of the robot arm is transformed into movement in six directions: up, down, left, right, front and back, that is, the six grids around the ant; The selection method is:
[0070]
[0071] Where η i (t) is the heuristic function; It means that ant k leaves g at time t. i Grid moves to gi+1 The probability of the grid;
[0072] Calculate the probability of adjacent grids, and then select random grids; x i is the grid g i The horizontal axis coordinate of i is the grid g i The vertical axis coordinate; z i is the grid g i The vertical axis coordinate of A is the horizontal axis coordinate of the target point A; A is the vertical coordinate of the target point A; z A is the vertical axis coordinate of target point A.
[0073] The method for selecting elite ants according to contribution after searching to update local pheromones includes: in order to improve the efficiency of ants in finding paths, selecting the contribution of ants in finding paths, selecting the top 30% of ants with better performance as elite ants, and the remaining ants become general ants, and in the subsequent iteration process, adjusting the volatility coefficient by preset weights to increase the pheromone concentration of elite ants on the walking path, and general ants will be evenly distributed among the top 30% of ants to expand the search speed and search range of elite ants, thereby preventing ants from falling into a local optimal position during local search;
[0074] After completing a search, the pheromone is adjusted according to the elite ant strategy and then locally updated;
[0075] τ i,j (t+n)=(1-ερ)·τ i,j (t)+Δτ i,j ;
[0076]
[0077] In the formula, Q1 represents the pheromone intensity outside the local area; ρ1 represents the pheromone volatility coefficient outside the local area, with a value range of 0 to 1; ε is the preset weight; The kth ant remains in g during this update calculation. i Grid and g i+1 Pheromone content in the middle of the grid;
[0078] According to the action range of the ants, τ i,i+1 (t+1) is limited to [τ min , τ max ] interval. Since in the grid environment, the distance that the ant moves each time is a unit length, τ i,i+1 The size of (t+1) is equal to Q1;
[0079]
[0080] Among them, n is the number of ants in this iteration; n i is the ranking of the ants in the current iteration;
[0081]
[0082] The weight increases with the ranking of the elite ants. The closer the elite ants are to the optimal path, the smaller the weight. A threshold is set for the pheromone concentration. When the pheromone concentration of the elite ants exceeds the threshold, the concentration will be reduced through self-adjustment. Similarly, the search concentration of ordinary ants also has a threshold. When the pheromone concentration is too low, the algorithm detects that these ants have left the territory of the elite ants, brings them to the vicinity of the elite ants, and adds a value to make them within the threshold range. The specific update strategy is as follows:
[0083]
[0084] Among them, c is a constant. By improving the pheromone concentration threshold, it is ensured that the ants will not deviate from the main search direction or fall into the local optimum due to the influence of weight. Finally, the search of elite ants improves the efficiency of trajectory planning, shortens the planning time, and improves the work efficiency of industrial robots.
[0085] The method for determining whether the target point has been reached includes: each time the ant k completes a step, it needs to check the current grid g i+1 Has the target point A been reached? If so, proceed to the next step; otherwise, perform the grid search again.
[0086] The method for updating the minimum path after reaching the target point includes:
[0087] After completing a path search, you can use the taboo table tabu k Get the path path k (S, A), for this path, the length needs to be calculated so that it can be compared with the path lengths obtained by other ant colonies to find the shortest path for this iteration. min (Nc); Compare the optimal path of this iteration with the minimum path of previous iterations. If the path of this iteration is shorter, let path min =path min (Nc) and record the taboo table tabu k The order of the grids in .
[0088] The method for updating the global pheromone on the minimum path includes: updating the external pheromone concentration on the minimum path:
[0089]
[0090] Where Q2 represents the global external pheromone intensity; ρ2 represents the global external pheromone volatility coefficient; Indicates that you have experienced N c After iterations, path l ij The remaining pheromone size on the fit k (Nc) represents the total length of the complete path searched by ant k; Limit to [τ min , τ max ] interval.
[0091] The method for completing the path planning after reaching the maximum number of iterations includes: c Add 1, if N c +1=N cmax , then the path planning is completed, path min is the global optimal path. The grid numbers that the optimal path passes through are given by the taboo table tabu k Get; if N c +1≠N cmax This means that the algorithm has not yet completed the iteration, so the taboo table is cleared and the grid search step is performed again;
[0092] Specifically, MATLAB was used to complete the simulation data analysis. Assuming that the robot arm is in a 200×200×100cm cubic area, there are three orange obstacles with a width of 25×25×30cm. The rectangular enveloping method is used to simplify them. From the starting point (5, 12, 1) to the terminal (13, 4, 3), we use the grid method to complete the environmental model. The grid block width is 10×10×10cm, and the spatial structure is divided into 20×20×10 blocks. For details, please refer to Figure 3 The parameters are determined as shown in Table 1 below:
[0093] Table 1 Simulation parameters
[0094]
[0095] In order to verify the superiority of the improved algorithm, the ordinary ant colony algorithm was compared in a given planning space. Figure 4 and improved ant colony algorithm Figure 5 ,like Figure 6 , Figure 7The convergence curve is obtained, which shows that the improved algorithm finds the shortest path in the iteration process, while the ordinary ant colony algorithm also finds a path, but the convergence speed is slow and requires more iterations. Therefore, the improved algorithm has stronger timeliness and better path planning ability. By improving the pheromone concentration threshold, it is ensured that the ants will not deviate from the main search direction or fall into the local optimum due to the influence of weight. Finally, the search of elite ants improves the efficiency of trajectory planning, shortens the planning time, and improves the work efficiency of industrial robots.
[0096] Table 2 shows the comparison results of 20 experiments:
[0097] Table 2 Comparison results
[0098]
[0099] Comparison of the two algorithms shows that the improved ant colony algorithm is superior to the standard ant colony algorithm in terms of convergence speed without sacrificing accuracy requirements. It is more useful in three-dimensional space path planning and meets the production efficiency requirements of current factories and enterprises. The trajectory is planned by the improved ant colony algorithm, and the ant colony is divided into elite ants and general ants by contribution value. The elite ants are the leading ones to lead the general ants to find the optimal path. The support of general ants can increase the search range of elite ants, effectively solving the problem of being easily trapped in the local optimum. By improving the pheromone concentration threshold, it is ensured that the ants will not deviate from the main search direction or fall into the local optimum due to the influence of weight. Finally, the search of elite ants improves the efficiency of trajectory planning, shortens the planning time, and improves the work efficiency of industrial robots.
[0100] In at least one other embodiment, a planning system using the above-mentioned trajectory planning method based on the improved ant colony algorithm is also provided, including: an initialization module, which is configured to construct a three-dimensional environment model by a grid method and initialize parameters; a search module, which is configured to perform grid search by ants; a local pheromone update module, which is configured to screen out elite ants according to contribution after the search to perform local pheromone update; a target point judgment module, which is configured to judge whether the target point is reached; a minimum path update module, which is configured to update the minimum path after reaching the target point; a global pheromone update module, which is configured to update the global pheromone on the minimum path; and a planning completion module, which is configured to complete the path planning after reaching the maximum number of iterations.
[0101] In summary, the present invention constructs a three-dimensional environment model of the robot arm movement through a grid method and initializes the parameters; ants perform grid search; after the search, elite ants are screened out according to the contribution to perform local pheromone update; it is determined whether the target point is reached; after reaching the target point, the minimum path is updated; the global pheromone on the minimum path is updated; after the maximum number of iterations is reached, the path planning is completed; and the robot arm grasping path is planned according to the improved ant colony algorithm, which solves the problem that the ant colony algorithm has a long retrieval time and is easy to fall into the local optimum, shortens the path planning time, greatly improves the work efficiency, reduces the time spent on some useless paths of the robot arm, and improves the work efficiency of the robot.
[0102] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0103] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0104] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0105] With the above-mentioned ideal embodiments of the present invention as inspiration, through the above-mentioned description content, relevant personnel can make various changes and modifications without departing from the scope of the technical idea of the present invention.
Claims
1. A trajectory planning method based on an improved ant colony algorithm, characterized in that: include: The grid method is used to construct the three-dimensional environment model of the robot arm movement and initialize the parameters; Ants conduct grid searches; After searching, elite ants are selected based on their contribution to perform local pheromone updates; Determine whether the target point has been reached; Update the minimum path after reaching the target point; Update the global pheromone on the minimum path; Path planning is completed after reaching the maximum number of iterations.
2. The trajectory planning method based on the improved ant colony algorithm according to claim 1, characterized in that: The grid method constructs a three-dimensional environment model of the robot arm movement and the method for initializing parameters includes: The robot arm operating environment is processed and constructed into a three-dimensional environment model by using a grid method; Set the number of ants k, the importance of the pheromone heuristic factor α, and the importance of the expected value heuristic factor β; Set τ ij (0) = τ0, i, j ∈ C g ; Place k ants at the initial point S and construct a taboo table tabu k (k=1, 2, ..., m), add the initial point S; Set the upper and lower limits of pheromone concentration [τ min , τ max ]; Set the current number of iterations N c = 0, and the maximum number of iterations N cmax .
3. The trajectory planning method based on the improved ant colony algorithm as claimed in claim 2, characterized in that: The method for ants to perform grid search includes: Based on the current grid g i As the center, select the next path node g from the preset number of adjacent grids i+1 ; Where η i (t) is the heuristic function; It means that ant k leaves g at time t. i Grid moves to g i+1 The probability of the grid; 4. The trajectory planning method based on the improved ant colony algorithm as claimed in claim 3, characterized in that: The method of selecting elite ants according to contribution after searching to update local pheromones includes: After completing a search, the pheromone is adjusted according to the elite ant strategy and then locally updated; t i,j (t+n)=(1-ερ)·τ i,j (t)+Δτ i,j ; In the formula, Q1 represents the pheromone intensity outside the local area; ρ1 represents the pheromone volatility coefficient outside the local area; ε is the preset weight; According to the action range of the ants, τ i,i+1 (t+1) is limited to [τ min , τ max ] interval.
5. The trajectory planning method based on the improved ant colony algorithm as claimed in claim 4, characterized in that: Among them, n is the number of ants in this iteration; n i is the ranking of the ants in the current iteration.
6. The trajectory planning method based on the improved ant colony algorithm as claimed in claim 5, characterized in that: The method for determining whether the target point has been reached comprises: Every time ant k completes a step, it needs to check the current grid g i+1 Whether the target point has been reached, if so, proceed to the next step, otherwise, perform grid search again.
7. The trajectory planning method based on the improved ant colony algorithm according to claim 6, characterized in that: The method for updating the minimum path after reaching the target point includes: After completing a path search, according to the taboo table tabu k Get the path path k (S, A), for this path, the length needs to be calculated so that it can be compared with the path lengths obtained by other ant colonies to find the shortest path for this iteration. min (N c ); Compare the optimal path of this iteration with the minimum path of previous iterations. If the path of this iteration is shorter, let path min =path min (N c ) and record the taboo table k The order of the grids in .
8. The trajectory planning method based on the improved ant colony algorithm according to claim 7, characterized in that: The method for updating the global pheromone on the minimum path includes: Update the external pheromone concentration on the minimum path: Where Q2 represents the global external pheromone intensity; ρ2 represents the global external pheromone volatility coefficient; Indicates that you have experienced N c After iterations, path l ij The remaining pheromone size on the fit k (N c ) represents the total length of the complete path searched by ant k.
9. The trajectory planning method based on the improved ant colony algorithm as claimed in claim 8, characterized in that: The method for completing the path planning after reaching the maximum number of iterations includes: Set the iteration counter N c Add 1, if N c +1=N cmax , then the path planning is completed, path min is the global optimal path. The grid numbers that the optimal path passes through are given by the taboo table tabu k get; If N c +1≠N cmax This means that the algorithm has not yet completed the iteration, clear the taboo table, and perform the grid search step again.
10. A planning system using the trajectory planning method based on the improved ant colony algorithm as claimed in claim 1, characterized in that: include: An initialization module, which is configured to construct a three-dimensional environment model using a grid method and initialize parameters; A search module, which is configured so that ants conduct grid search; A local pheromone update module, which is configured to select elite ants according to their contribution after searching to perform local pheromone update; A target point determination module is configured to determine whether the target point has been reached; A minimum path update module, which is configured to update the minimum path after reaching the target point; A global pheromone update module, which is configured to update the global pheromone on the minimum path; The planning completion module is configured to complete the path planning after reaching the maximum number of iterations.
Citation Information
Patent Citations
Processing path planning method based on random pheromone optimization elite colony algorithm
CN113703391A
Tower crane path planning method based on improved ant colony algorithm
CN116739196A
Unmanned ship path planning method and system for limited water area
CN116793362A
Automatic hose and harness routing method and system
EP1850252A1
Method for optimal designing clustering using ant algorithm in wireless sensor network
KR1020110071544A
Cited By
Die-casting robot micro-spraying path planning and control method and system
CN120985677A
Die casting robot micro-spraying path planning and control method and system
CN120985677B
Automobile path planning method based on dynamic pheromone penalty coefficient and application
CN121140833A
Automobile path planning method based on dynamic pheromone punishment coefficient and application
CN121140833B
Near-end strategy enhanced ant colony optimization path coverage method
CN121187309A
