A collision-free laser cutting path optimization method and system based on potential field ant colony algorithm
By optimizing the laser cutting path based on the potential field ant colony algorithm, the low efficiency and collision risk caused by too many paths in the laser cutting process are solved, and a more efficient and safe cutting process is achieved.
Patent Information
- Application Number
- CN202411199442.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-08-29
AI Technical Summary
Existing laser cutting technology has many paths when passing through the cut area, resulting in low processing efficiency and the risk of cutting head collision, affecting production efficiency and safety.
The potential field-based ant colony algorithm is used to optimize the laser cutting path. Gravity is used to guide the path search and repulsion is used to eliminate obstacles. Combined with forward detection and backtracking search, the cutting sequence is optimized to reduce the path passing through the already cut area.
It improves the laser cutting speed, reduces unnecessary paths, ensures cutting quality and improves overall processing efficiency, avoids cutting head collisions, and improves production safety.
Smart Images

Figure CN119077148B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field related to path optimization, and more specifically, relates to a collision-proof laser cutting path optimization method and system based on a potential field ant colony algorithm. Background Art
[0002] Laser cutting technology offers advantages such as high cutting speed, high cutting precision, and excellent cutting quality. Its non-contact processing minimizes impact on workpiece quality and offers strong processing adaptability. Consequently, it has been widely used in sheet metal cutting, while simultaneously increasing the demand for laser cutting efficiency. To improve cutting efficiency, it is necessary to reduce the number of times the laser cutting head uses a low-speed "frog jump" motion to avoid the already cut area, ensuring continuous high-speed movement of the cutting head.
[0003] Currently, the Z-axis servo system of most laser cutting machines uses a capacitive height sensor. In the actual cutting process, when the laser cuts a part, the part will fall into the blanking chute below due to gravity, leaving a cavity. The existence of the cavity causes the capacitance to change, and the cutting head will move closer to the plate under the action of the Z-axis servo system and fall into the cavity. At this time, if the cutting head moves according to the original path, it will collide with the plate outside the cavity. At the very least, it will damage the laser cutting head, causing machine failure and affecting production efficiency. At worst, fragments will fly and cause injuries to workers. In order to avoid this situation, the factory currently uses the "frog jump" method to avoid the already cut area. The specific explanation is as follows:
[0004] Starting from the coordinate origin, the laser cutting head maintains a safe distance from the sheet surface and moves through the first idle stroke to the starting point of the first part to be cut. Once there, the cutting head descends to the appropriate cutting height and begins cutting. After completing the contour cutting of the first part, if the next cutting path passes through the cavity of the currently cut part, the cutting head turns off the laser and raises to a safe height. It then moves to the safe cutting starting point of the next part and repeats the same cutting process. This process continues until all parts have been cut.
[0005] When passing through an already cut area, the laser cutting head will not be able to maintain a high laser cutting rate, but must slow down and raise it to a safe height before continuing to cut. Obviously, if too many cavity areas are passed through, the overall cutting speed will be greatly affected. Therefore, in order to ensure cutting efficiency, a path optimization method is urgently needed to reduce the number of laser cutting paths passing through the already cut area, reduce the impact of cutting head collisions on laser cutting efficiency, and improve overall processing efficiency. Summary of the Invention
[0006] In response to the above defects or improvement needs of the prior art, the present invention provides a collision-proof laser cutting path optimization method and system based on the potential field ant colony algorithm, which aims to solve the problem of low processing efficiency caused by too many laser cutting paths passing through the cut area.
[0007] To achieve the above objectives, according to one aspect of the present invention, a collision-free laser cutting path optimization method based on a potential field ant colony algorithm is provided, the method comprising the following steps:
[0008] Step 1: With the goal of minimizing the tool movement distance, an initial cutting sequence of the parts is determined; the initial cutting sequence is obtained by solving the traveling salesman problem using an ant colony algorithm;
[0009] Step 2: Based on the anti-collision constraint, the potential field ant colony algorithm is used to optimize the cutting sequence to obtain the optimal path; wherein, the potential field ant colony algorithm adds an attraction factor and a repulsion factor based on the artificial potential field method to improve the potential field ant colony algorithm heuristic function.
[0010] Furthermore, the rules for determining the initial cutting sequence include: intersection priority criterion, avoiding missing any parts during cutting, and using ant colony algorithm to solve the cutting sequence.
[0011] Furthermore, the intersection priority criterion is specifically as follows: when part V1 and part V2 have a point intersection or edge intersection, the common point or common edge is used as the cutting point of part V1 and part V2;
[0012] When an edge of part V1 intersects a vertex of part V2, the corresponding intersection point is taken as an alternative and added to the set of vertices to be selected of part V1.
[0013] Furthermore, determining the initial cutting order specifically includes the following steps:
[0014] Step 1: Mathematically model the problem as a GTSP problem. The objective function is to minimize the total cutting distance. The constraints are: each part is visited at least once; the out-degree and in-degree of each vertex of the part are equal and are 1; and sub-cyclic paths are eliminated.
[0015] Step 2: Initialize the ant colony algorithm parameters;
[0016] Step 3: Convert the positions of the part graphics and the layout diagram into two-dimensional coordinate information and store it in the ant colony algorithm path information matrix. Then, according to the intersection priority criterion, determine the intersection point of the part as the cutting point of the part.
[0017] Step 4: Start iteration. m ants randomly select n parts according to the roulette algorithm, add them to the taboo table, and update the path distance matrix.
[0018] Step 5: Starting from the first ant, calculate the transfer probability and select the next path part, add it to the taboo table and update the path distance until all m ants have completed this operation;
[0019] Step 6: Save the shortest path distance and shortest path order in this iteration;
[0020] Step 7: If the shortest path distance of this iteration is less than the global shortest path distance, then use this result to replace the global shortest path distance and shortest path order;
[0021] Step 8: Update the global pheromone and determine whether the maximum number of iterations has been reached. If not, return to Step 4; otherwise, go to Step 9.
[0022] Step 9: Output the global shortest path distance and shortest path order.
[0023] Furthermore, during the optimization process, forward detection and backtracking search are used. The forward detection is to predict the subsequent path of the current target when planning the path; the backtracking search is that once a future path is predicted to pass through the cut cavity, it is necessary to return to the previous decision point for replanning.
[0024] Furthermore, the heuristic function of the potential field ant colony algorithm takes into account the gravitational force A(d ij ) and repulsive force R(e ij ,θ), the corresponding formula is:
[0025] H(i,j)=α·A(d ij )-β·max θ∈{上,下,左,右} R(e ij ,θ)
[0026] Where α and β are weight coefficients used to adjust the relative importance of attraction and repulsion in the heuristic scoring; max θ∈{上,下,左,右} R(e ij ,θ) is the maximum repulsive force of the current position on the obstacle in the four directions.
[0027] Furthermore, according to the forward detection and backtracking search, a forward scoring is added, and the heuristic function is expanded. The corresponding formula is:
[0028] H′(i,j,k)=α·A(d ij )-β·max θ∈{上,下,左,右} R(e ij ,θ)-γ·L(j,k)
[0029] Among them, L(j,k) represents the forward score from j to future target k, γ is the influence weight coefficient of the forward score in the total heuristic score, among which,
[0030] L(j,k)=σ j (minD(j,k)+ε)
[0031]
[0032] Where minD(j,k) is the shortest distance from j to k; ε is a non-zero number used to prevent the target points from being the same.
[0033] Furthermore, a potential field ant colony algorithm based on forward detection and backtracking search is used to optimize the part cutting sequence, which specifically includes the following steps:
[0034] Step 1: Initialize the potential field ant colony algorithm parameters;
[0035] Step 2: Convert the position of the part graphics and the layout diagram into two-dimensional coordinate information and store it in the potential field-ant colony algorithm path information matrix;
[0036] Step 3: Define the node data structure, set the root node to the current position i, and create a node list. The initial node list only contains the root node.
[0037] Step 4: Determine whether the node list is empty. If it is empty, execute Step 8; if it is not empty, calculate the repulsion around each node j in the node list and update the repulsion influence factor σ j , once σ j =0, then remove node j from the list;
[0038] Step 5: Under the current node, calculate the shortest distance, forward score, and total heuristic function of each possible target location k. Once the forward score L(j,k)>0, add k as a new potential node to the node list and update the cumulative path length and coordinate position of k.
[0039] Step 6: Determine whether all nodes have been removed. If so, backtrack to the nearest feasible node; otherwise, go to Step 7;
[0040] Step 7: Determine whether a satisfactory path is found. If so, determine the path, end the loop and output the final determined path. Otherwise, jump to Step 4.
[0041] The present invention also provides an anti-collision laser cutting path optimization system based on a potential field ant colony algorithm. The system includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, it executes the anti-collision laser cutting path optimization method based on the potential field ant colony algorithm as described above.
[0042] The present invention also provides a computer-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the anti-collision laser cutting path optimization method based on the potential field ant colony algorithm as described above.
[0043] In general, compared with the prior art, the above technical solutions conceived by the present invention have the following beneficial effects:
[0044] 1. After determining the initial cutting order of the parts, the present invention optimizes the cutting path according to the potential field ant colony algorithm, achieves anti-collision optimization effect by guiding path search through gravity and removing obstacles through repulsion, reduces the number of paths passing through the cut area, improves the laser cutting speed, completes the entire planning of the part cutting path while ensuring cutting quality, and improves processing efficiency.
[0045] 2. The present invention takes into account the overall cutting path planning efficiency. The use of forward detection and backtracking search can effectively prune unnecessary paths, accelerate the search, promote algorithm convergence, and help improve the overall processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 The embodiment of the present invention updates the vertex diagram based on the "intersection priority" criterion;
[0047] Figure 2 Schematic diagram of the process of the anti-collision laser cutting path optimization method based on the potential field ant colony algorithm provided by the present invention;
[0048] Figure 3 is an example diagram of the initial cutting path according to an embodiment of the present invention;
[0049] Figure 4 3 is an example diagram of the anti-collision cutting path optimized by the proposed method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
[0051] The present invention provides a collision-proof laser cutting path optimization method based on a potential field ant colony algorithm, the method mainly comprising the following steps:
[0052] Step 1: With the shortest tool movement distance as the goal, an initial cutting sequence of the parts is formulated; the initial cutting sequence is obtained by solving the traveling salesman problem using an ant colony algorithm.
[0053] The rules for determining the initial cutting sequence include the "intersection priority" principle, avoiding missing any parts during cutting, and using the ant colony algorithm to solve the cutting sequence.
[0054] The “intersection priority” principle is as follows:
[0055] When part V1 and part V2 intersect at a point or edge, the common point or edge is used as the cutting point of part V1 and part V2;
[0056] When an edge of part V1 intersects a vertex of part V2, the intersection point is taken as a candidate and added to the set of vertices to be selected of part V1.
[0057] The determination of the initial cutting sequence specifically includes the following steps:
[0058] Step 1: Mathematically model the problem as a GTSP problem. The objective function is to minimize the total cutting distance. The constraints are: each part is visited at least once; the out-degree and in-degree of each vertex of the part are equal and are 1; and sub-cyclic paths are eliminated.
[0059] Step 2: Initialize the ant colony algorithm parameters, such as the number of ants m, the number of target parts n, the maximum number of iterations, the pheromone volatility factor, the pheromone importance factor, etc.
[0060] Step 3: Convert the positions of the part graphics and the layout diagram into two-dimensional coordinate information and store it in the ant colony algorithm path information matrix. Then, according to the intersection priority criterion, determine the intersection point of the part as the cutting point of the part.
[0061] Step 4: Start iteration. m ants randomly select n parts according to the roulette algorithm, add them to the taboo table, and update the path distance matrix.
[0062] Step 5: Starting from the first ant, the next path part is selected according to the transfer probability calculated by the formula, added to the taboo table and updated the path distance until all m ants have completed this operation;
[0063] Step 6: Save the shortest path distance and shortest path order in this iteration;
[0064] Step 7: If the shortest path distance of this iteration is less than the global shortest path distance, then use this result to replace the global shortest path distance and shortest path order;
[0065] Step 8: Update the global pheromone and determine whether the maximum number of iterations has been reached. If not, return to Step 4; otherwise, go to Step 9.
[0066] Step 9: Output the global shortest path distance and shortest path order.
[0067] Step 2: Based on the anti-collision constraint, the potential field ant colony algorithm is used to optimize the cutting sequence to reduce the number of times the cutting path passes through the cut area; the potential field ant colony algorithm adds an attraction factor and a repulsion factor based on the artificial potential field method to improve the potential field ant colony algorithm heuristic function.
[0068] During the optimization process, forward detection and backtracking search are used. The forward detection is to predict the subsequent path of the current target when planning the path; the backtracking search is to return to the previous decision point for replanning once it is predicted that a future path will pass through the cut cavity.
[0069] The heuristic function of the potential field ant colony algorithm takes into account the gravitational force A(d ij ) and repulsive force R(e ij ,θ), the corresponding formula is:
[0070] H(i,j)=α·A(d ij )-β·max θ∈{上,下,左,右} R(e ij ,θ)
[0071] Where α and β are weight coefficients used to adjust the relative importance of attraction and repulsion in heuristic scoring; max θ∈{上,下,左,右} R(e ij ,θ) is the maximum repulsive force of the current position on the obstacle in the four directions.
[0072] According to the forward detection and backtracking search, the forward scoring is added and the heuristic function is expanded. The corresponding formula is:
[0073] H′(i,j,k)=α·A(d ij )-β·maxθ∈{上,下,左,右} R(e ij ,θ)-γ·L(j,k)
[0074] Among them, L(j,k) represents the forward score from j to future target k, γ is the influence weight coefficient of the forward score in the total heuristic score, among which,
[0075] L(j,k)=σ j (minD(j,k)+ε)
[0076]
[0077] The potential field ant colony algorithm based on forward detection and backtracking search is used to optimize the part cutting sequence, which includes the following steps:
[0078] Step 1: Initialize the potential field ant colony algorithm parameters, such as the attraction weight coefficient, repulsion weight coefficient, repulsion influence factor, number of ants m, number of target parts n, maximum number of iterations, pheromone volatilization factor, pheromone importance factor, etc.
[0079] Step 2: Convert the position of the part graphics and the layout diagram into two-dimensional coordinate information and store it in the potential field-ant colony algorithm path information matrix;
[0080] Step 3: Define the node data structure, set the root node to the current position i, and create a node list. The initial node list only contains the root node.
[0081] Step 4: Determine whether the node list is empty. If it is empty, execute Step 8; if it is not empty, calculate the repulsion around each node j in the node list and update the repulsion influence factor σ j , once σ j =0, then remove node j from the list;
[0082] Step 5: Under the current node, calculate the shortest distance, forward score, and total heuristic function of each possible target location k. Once the forward score L(j,k)>0, add k as a new potential node to the node list and update the cumulative path length and coordinate position of k.
[0083] Step 6: Determine whether all nodes have been removed. If so, backtrack to the nearest feasible node; otherwise, go to Step 7;
[0084] Step 7: Determine whether a satisfactory path is found. If so, determine the path, end the loop and output the final determined path. Otherwise, jump to Step 4.
[0085] The present invention also provides an anti-collision laser cutting path optimization system based on a potential field ant colony algorithm. The system includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, it executes the anti-collision laser cutting path optimization method based on the potential field ant colony algorithm as described above.
[0086] The present invention also provides a computer-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the anti-collision laser cutting path optimization method based on the potential field ant colony algorithm as described above.
[0087] The present invention is further described in detail below with reference to specific embodiments.
[0088] An embodiment of the present invention provides a collision-avoiding laser cutting path optimization method based on a potential field-ant colony algorithm, comprising the following steps:
[0089] (1) With the shortest tool movement distance as the goal, the initial cutting sequence of parts on the steel plate is formulated according to the basic cutting rules;
[0090] (2) Based on mathematical modeling knowledge, the cutting path optimization problem is modeled as a GTSP problem, and the objective function and constraints are obtained;
[0091] (3) Based on the model of step (2), the ant colony algorithm is used to solve the problem and obtain the initial cutting sequence;
[0092] (4) The potential field-ant colony algorithm is used to perform anti-collision optimization on the initial cutting sequence planned in step (3), and finally a complete anti-collision laser cutting path optimization path is obtained.
[0093] Preferably, in step (1), the basic cutting rule is specifically described as:
[0094] First: the "intersection priority" principle;
[0095] Second: Avoid missing any parts when cutting;
[0096] Third: Use ant colony algorithm to solve the cutting order.
[0097] The specific expression of the “intersection priority” principle is as follows:
[0098] When part V1 and part V2 intersect at a point or at an edge, the common point or edge is used as the cutting point of part V1 and part V2;
[0099] When the edge of part V1 intersects with the vertex of part V2, the intersection point is taken as a candidate and added to the vertex set to be selected of part V1;
[0100] For the second case, the formal description is as follows: For any given two vertex sets P u and P w , and P w Each vertex P in wk , if there exists a pair of vertices P ui and P uj (P ui ,P uj ∈P u ), so that lie in and On the line segment between, then perform the update operation:
[0101] like Figure 1 As shown in the figure, according to the original model, the part outline V1 only has vertices from P1 to P77, but since V2 and V1 have an intersection (that is, the vertex of the other part is on the edge of the part), considering the intersection priority constraint, the vertices of V2 can also be added to the vertex set of V1. At this time, the number of vertices of V1 changes from 7 to 8, and the intersection P8 is added.
[0102] Preferably, in step (2), by abstracting the cutting path optimization problem, a mathematical model of the traveling salesman problem is established, and the objective function and constraints are obtained as follows:
[0103] Let x ij is a decision variable. If edge (i, j) is selected as part of the cutting path, then x ij =1; otherwise x ij =0.
[0104] Objective function: Minimize the total cost (i.e., total path distance):
[0105] Constraint 1: Visit each group at least once:
[0106] Constraint 2: For each vertex i in the graph, its out-degree and in-degree should be equal and both equal to 1:
[0107]
[0108] Constraint 3: Ensure that there is no sub-circular path between vertex i and vertex j:
[0109] and i,j>1
[0110] Preferably, in step (3), according to the model of step (2), an ant colony algorithm is used to solve and obtain the initial cutting sequence. The specific model of the ant colony algorithm is as follows:
[0111] Suppose there is a set of n parts C = {c1, c2, ..., c n}, m ants, use d ij (i,j=1,2,…,n) represents the distance between part i and part j, τ ij (t) represents the residual pheromone intensity on the path connecting part i and part j at time t.
[0112] Ant k (k = 1, 2, ..., m) determines the part it will choose next when it is foraging based on the pheromone concentration along the path. The parts that ant k has walked through before are represented by the taboo table u. k (k=1,2,…,n) records are recorded and the set is adjusted at any time during the optimization process. During the foraging process, ant k calculates the transition probability according to the formula and then selects the next target part according to the calculated probability. It represents the state transition probability of the ant moving from part i to part j at time t, and its expression is:
[0113]
[0114] Where, d k = {Cu k} is the set of parts that the ant can choose next, α is the pheromone importance factor, β is the heuristic function importance factor, η ij (t) is the heuristic function, which represents the heuristic information from part i to part j. Here, it is usually the inverse of the path length:
[0115]
[0116] Excessive accumulation of pheromones along a path can cause the algorithm to converge prematurely, leading to premature search termination. To avoid this, the ants need to update the remaining pheromones during the search process. Whenever an ant passes through the path from part i to part j, it updates the pheromones along that path according to the following formula to ensure that pheromones do not accumulate excessively. This is called a local update.
[0117] τ ij (t+1)=(1-ρ)τ ij (t)+Δτ ij (t)
[0118]
[0119] Where, It is the pheromone volatilization factor, preventing excessive accumulation of pheromones. ij (t) represents the pheromone increment from part i to part j in this cycle, Δτ ij (0)=0, represents the pheromone concentration of ant k on path (i, j) at time t. After all ants complete a round of traversal, a global update of the pheromone distribution in the entire system is performed to guide the ants to search the solution space more efficiently. Defined as:
[0120]
[0121] Where Q is a constant, which represents the total amount of pheromone released by the ant after completing this path search. k Represents the total distance traveled by ant k in this cycle.
[0122] Preferably, determining the initial cutting sequence specifically includes the following steps:
[0123] Step 1: Mathematically model the problem as a GTSP problem. The objective function is to minimize the total cutting distance. The constraints are: each part is visited at least once; the out-degree and in-degree of each vertex of the part are equal and are 1; and sub-cyclic paths are eliminated.
[0124] Step 2: Initialize the ant colony algorithm parameters, such as the number of ants m, the number of target parts n, the maximum number of iterations, the pheromone volatility factor, the pheromone importance factor, etc.
[0125] Step 3: Convert the positions of the part graphics and the layout diagram into two-dimensional coordinate information and store it in the ant colony algorithm path information matrix. According to the intersection priority criterion, the intersection point of the part is determined as the cutting point of the part.
[0126] Step 4: Start iteration. m ants randomly select n parts according to the roulette algorithm, add them to the taboo table, and update the path distance matrix.
[0127] Step 5: Starting from the first ant, the next path part is selected according to the transfer probability calculated by the formula, added to the taboo table and updated the path distance until all m ants have completed this operation.
[0128] Step 6: Save the shortest path distance and shortest path order in this iteration.
[0129] Step 7: If the shortest path distance of this iteration is less than the global shortest path distance, the global shortest path distance and shortest path order are replaced by this result.
[0130] Step 8: Update the global pheromone according to the formula and determine whether the maximum number of iterations has been reached. If not, return to Step 4. Otherwise, end the iteration and output the global shortest path distance and shortest path order.
[0131] Preferably, in step (4), the potential field-ant colony algorithm is used to improve the ant colony algorithm heuristic function, which takes into account the gravitational force A (d ij ) and repulsive force R(e ij ,θ), the corresponding formula is:
[0132] H(i,j)=α·A(d ij )-β·max θ∈{上,下,左,右} R(e ij ,θ)
[0133] Based on the forward detection and backtracking ideas, the forward scoring is added and the heuristic function is expanded:
[0134] H′(i,j,k)=α·A(d ij )-β·max θ∈{上,下,左,右} R(e ij ,θ)-γ·L(j,k)
[0135] Where L(j,k) represents the forward score from j to future target k, and γ is the influence weight coefficient of the forward score in the total heuristic score:
[0136] L(j,k)=σ j (minD(j,k)+ε)
[0137]
[0138] Preferably, the potential field-ant colony algorithm of forward detection and backtracking search is used to optimize the part cutting sequence, which specifically includes the following steps:
[0139] Step 1: Initialize the potential field-ant colony algorithm parameters, such as the attraction weight coefficient, repulsion weight coefficient, repulsion influence factor, number of ants m, number of target parts n, maximum number of iterations, pheromone volatilization factor, pheromone importance factor, etc.
[0140] Step 2: Convert the position of the part graphics and the layout diagram into two-dimensional coordinate information and store it in the potential field-ant colony algorithm path information matrix;
[0141] Step 3: Define the node data structure, set the root node to the current position i, and create a node list. The initial node list only contains the root node.
[0142] Step 4: Determine whether the node list is empty. If it is empty, execute Step 8; if it is not empty, calculate the repulsion around each node j in the node list and update the repulsion influence factor σ j , once σ j =0, then remove node j from the list;
[0143] Step 5: Under the current node, calculate the shortest distance, forward score, and total heuristic function of each possible target location k. Once the forward score L(j,k)>0, add k as a new potential node to the node list and update the cumulative path length and coordinate position of k.
[0144] Step 6: Determine whether all nodes have been removed. If so, backtrack to the nearest feasible node.
[0145] Step 7: Determine whether a satisfactory path is found. If so, determine the path, end the loop and output the final determined path. Otherwise, jump to Step 4.
[0146] In order to make the present invention clearer, the method of the present invention is described with a specific embodiment:
[0147] like Figure 3 As shown in the figure, the initial cutting path of the layout diagram example obtained through step (3) is shown, where the red line is the idle travel trajectory of the laser cutting head, and the distance of the initial path back to the origin is 88.2119. Since the cutting method is whole-piece cutting, the idle travel section from part 3 to part 4 will pass through the cavity area of the already cut part 2, and such a path has a "frog leap" behavior; and after the optimization analysis of this method, it is found that although the cutting path of part 3→4 will pass through the cavity of 2 and cause a collision, the path of 3→4 needs to be replanned, but due to the continuity of the cutting, the path of part 2→3 must also be replanned, so it is necessary to use forward detection and backtracking search. The final path optimization effect is as follows Figure 4 As shown in the figure, part 3 and part 4 have a common point. Based on the intersection priority criterion in step (1), the intersection point is used as the common cutting point of the two parts. After the laser cutting head moves from the cutting point of part 2 to the common cutting point of part 3 and part 4, it moves to the cutting point of part 5 for cutting. It can be seen intuitively in the figure that the yellow moving path does not pass through the cut area. After anti-collision optimization, the return distance to the origin is 88.5283. Although the path distance is 0.36% longer than the initial path, the path after anti-collision optimization does not pass through the cut part area, which can better ensure production efficiency.
[0148] It will be easily understood by those skilled in the art that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A collision-free laser cutting path optimization method based on potential field ant colony algorithm, characterized by: The method comprises the following steps: Step 1: With the goal of minimizing the tool movement distance, an initial cutting sequence of the parts is determined; the initial cutting sequence is obtained by solving the traveling salesman problem using an ant colony algorithm; Step 2: Based on the anti-collision constraint, the potential field ant colony algorithm is used to optimize the cutting sequence to obtain the optimal path; wherein the potential field ant colony algorithm adds an attraction factor and a repulsion factor based on the artificial potential field method to improve the potential field ant colony algorithm heuristic function; The heuristic function of the potential field ant colony algorithm takes into account the gravitational force A(d ij ) and repulsive force R(e ij ,θ), the corresponding formula is: H(i,j)=α·A(d ij )-β·max θ∈{上,下,左,右} R(e ij ,i) Where α and β are weight coefficients used to adjust the relative importance of attraction and repulsion in the heuristic scoring; max θ∈{上,下,左,右} R(e ij ,θ) is the maximum repulsive force of the current position on the obstacle in the four directions.
2. The anti-collision laser cutting path optimization method based on potential field ant colony algorithm according to claim 1, characterized in that: The rules for determining the initial cutting sequence include: intersection priority criterion, avoiding missing any parts during cutting, and using ant colony algorithm to solve the cutting sequence.
3. The anti-collision laser cutting path optimization method based on potential field ant colony algorithm according to claim 2, characterized in that: The intersection priority criterion is as follows: when part V1 and part V2 have a point intersection or edge intersection, the common point or common edge is used as the cutting point of part V1 and part V2; When an edge of part V1 intersects a vertex of part V2, the corresponding intersection point is taken as an alternative and added to the set of vertices to be selected of part V1.
4. The anti-collision laser cutting path optimization method based on potential field ant colony algorithm according to claim 1, characterized in that: The determination of the initial cutting sequence specifically includes the following steps: Step 1: Mathematically model the problem as a GTSP problem. The objective function is to minimize the total cutting distance. The constraints are: each part is visited at least once; the out-degree and in-degree of each vertex of the part are equal and are 1; and sub-cyclic paths are eliminated. Step 2: Initialize the ant colony algorithm parameters; Step 3: Convert the positions of the part graphics and the layout diagram into two-dimensional coordinate information and store it in the ant colony algorithm path information matrix. Then, according to the intersection priority criterion, determine the intersection point of the part as the cutting point of the part. Step 4: Start iteration. m ants randomly select n parts according to the roulette algorithm, add them to the taboo table, and update the path distance matrix. Step 5: Starting from the first ant, calculate the transfer probability and select the next path part, add it to the taboo table and update the path distance until all m ants have completed this operation; Step 6: Save the shortest path distance and shortest path order in this iteration; Step 7: If the shortest path distance of this iteration is less than the global shortest path distance, then use this result to replace the global shortest path distance and shortest path order; Step 8: Update the global pheromone and determine whether the maximum number of iterations has been reached. If not, return to Step 4; otherwise, go to Step 9. Step 9: Output the global shortest path distance and shortest path order.
5. The anti-collision laser cutting path optimization method based on potential field ant colony algorithm according to any one of claims 1 to 4, characterized in that: During the optimization process, forward detection and backtracking search are used. The forward detection is to predict the subsequent path of the current target when planning the path; the backtracking search is to return to the previous decision point for replanning once it is predicted that a future path will pass through the cut cavity.
6. The anti-collision laser cutting path optimization method based on potential field ant colony algorithm according to claim 5, characterized in that: According to the forward detection and backtracking search, the forward scoring is added and the heuristic function is expanded. The corresponding formula is: H′(i,j,k)=α·A(d ij )-β·max θ∈{上,下,左,右} R(e ij ,θ)-γ·L(j,k) Among them, L(j,k) represents the forward score from j to future target k, γ is the influence weight coefficient of the forward score in the total heuristic score, among which, L(j,k)=σ j ·(minD(j,k)+ε) Where minD(j,k) is the shortest distance from j to k; ε is a non-zero number used to prevent the target points from being the same.
7. The anti-collision laser cutting path optimization method based on potential field ant colony algorithm according to claim 6, characterized in that: The potential field ant colony algorithm based on forward detection and backtracking search is used to optimize the part cutting sequence, which includes the following steps: Step 1: Initialize the potential field ant colony algorithm parameters; Step 2: Convert the position of the part graphics and the layout diagram into two-dimensional coordinate information and store it in the potential field-ant colony algorithm path information matrix; Step 3: Define the node data structure, set the root node to the current position i, and create a node list. The initial node list only contains the root node. Step 4: Determine whether the node list is empty. If it is empty, execute Step 8; If it is not empty, calculate the repulsion around each node j in the node list and update the repulsion influence factor σ j , once σ j =0, then remove node j from the list; Step 5: Under the current node, calculate the shortest distance, forward score, and total heuristic function of each possible target location k. Once the forward score L(j,k)>0, add k as a new potential node to the node list and update the cumulative path length and coordinate position of k. Step 6: Determine whether all nodes have been removed. If so, backtrack to the nearest feasible node; otherwise, go to Step 7; Step 7: Determine whether a satisfactory path is found. If so, determine the path, end the loop and output the final determined path. Otherwise, jump to Step 4.
8. A collision-free laser cutting path optimization system based on a potential field ant colony algorithm, characterized by: The system includes a memory and a processor, the memory stores a computer program, and the processor executes the anti-collision laser cutting path optimization method based on the potential field ant colony algorithm according to any one of claims 1 to 7 when executing the computer program.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions prompt the processor to implement the anti-collision laser cutting path optimization method based on the potential field ant colony algorithm according to any one of claims 1 to 7.
Citation Information
Patent Citations
Laser processing method
CN101077549A
Mobile robot traveling salesman optimization method based on improved ant colony algorithm
CN105717926A