A cantilevered tunneling machine cutting trajectory planning method based on an improved ant colony algorithm
Patent Information
- Application Number
- CN202611131623.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-16
AI Technical Summary
传统蚁群算法在蚁群陷入死锁或遍历停滞状态时,缺少主动终止退出机制,蚂蚁可能在局部区域内无限循环或长时间无效搜索,造成计算资源浪费与规划延迟,难以满足井下作业对实时性的严格要求
[0031] By constructing a comprehensive cost function with the goal of minimizing cutting energy consumption and using trajectory length and number of turns as decision variables, the evaluation criteria are aligned with the actual engineering practice of tunneling machines. This achieves multi-objective collaborative optimization of cutting energy consumption, number of turns, under-excavation area, trajectory length, and number of repeated cutting operations, effectively reducing cutting energy consumption and under-excavation area, and improving the quality of cross-section formation.
Smart Images

Figure CN122924218A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent tunneling machine technology, and in particular to a method for planning the cutting trajectory of a cantilever tunneling machine based on an improved ant colony algorithm. Background Technology
[0002] Cutting trajectory planning for cantilever roadheaders is a core component for achieving precise roadway cross-section shaping and intelligent cutting control, and it is of great significance for improving the automation level of non-full-face roadheading equipment. In recent years, my country has formed a highly efficient roadheading technology system represented by full-face roadheader-anchor integrated machines in the field of rapid coal mine roadway excavation, achieving significant engineering progress. However, for cantilever roadheaders widely used in soft rock and semi-coal-rock conditions, the degree of freedom of movement during cutting is higher, and the relative roadway position changes more significantly, leading to a significant increase in the difficulty of cutting trajectory planning and control, resulting in problems such as poor cross-section shaping consistency, which cannot meet the urgent needs of intelligent coal mine development. The key to intelligent cutting of cantilever roadheaders lies in solving the problem of cutting head trajectory planning and tracking control under complex working conditions, requiring the development of intelligent decision-making cutting trajectory planning methods. Therefore, developing an independent and efficient cross-section shaping cutting trajectory planning method is of great significance for improving cross-section shaping quality, reducing cutting energy consumption, and reducing cutting tooth wear.
[0003] In recent years, many scholars have conducted in-depth research on the cross-section forming trajectory planning of cantilever tunneling machines under different roadways. The cross-section forming and cutting trajectory planning methods for tunneling machines can be summarized into two main categories: one is the reproducible cutting method based on manual teaching. Although this method has made some progress in memorizing cutting, it only reproduces fixed demonstration trajectories and lacks autonomous optimization capabilities. It cannot adaptively adjust to sudden changes in rockfill conditions, resulting in poor cross-section forming consistency. The other category is the autonomous trajectory planning method based on metaheuristic optimization. Due to the complex distribution of rockfill in the roadway cross-section, this method still suffers from drawbacks such as high cutting energy consumption, poor cross-section forming quality, and a single optimization dimension in cross-section forming and cutting trajectory planning for tunneling machines.
[0004] To overcome these limitations, intelligent algorithms such as ant colony optimization (ACO) have gained attention. The basic idea behind ACO's truncation trajectory planning is to discretize the tunnel cross-section into a series of nodes to be cut, and then have the ants start from a pre-set starting point. During trajectory construction, each ant, based on pheromone concentration and heuristic guidance, gradually and systematically selects the next node to be cut. Through this continuous node visit, the current trajectory is extended until the set of nodes it has traversed completely covers the entire cross-section, and finally, it reaches the designated endpoint.
[0005] However, in practical applications, the ant colony algorithm faces four main problems:
[0006] First, the optimization objective is singular and does not align with the realities of tunneling machine engineering. Traditional ant colony optimization algorithms typically use "shortest trajectory length" as the sole optimization objective, neglecting crucial performance indicators in practical engineering, such as tunneling machine cutting energy consumption, number of turns, and under-excavation area. During tunneling machine cutting operations, cutting energy consumption directly affects equipment operating costs and energy efficiency; the number of turns impacts the stability of the cutting head and the lifespan of the cutting teeth; and the under-excavation area determines the quality of the tunnel cross-section. A single-objective optimization cannot simultaneously address these multiple requirements, resulting in a planned trajectory that, while optimal in length, may not be optimal or even feasible in actual engineering practice.
[0007] Secondly, the fixed pheromone evaporation factor restricts the algorithm's search efficiency and convergence performance. Traditional ant colony optimization (ACO) algorithms use a constant evaporation factor ρ, which cannot adapt to the varying needs of pheromone update intensity during iteration. In the early stages of iteration, the algorithm needs to maintain high exploration diversity to broadly search the solution space, but a fixed ρ (especially a small ρ) causes pheromone dissipation from inferior trajectories to be too slow, interfering with the ant colony's exploration direction and reducing search efficiency. In the later stages of iteration, the algorithm needs to strengthen positive feedback to accelerate convergence to the optimal solution, but a fixed ρ (especially a large ρ) results in insufficient accumulation of effective pheromone, weakening the positive feedback acceleration effect and restricting convergence accuracy. Setting a constant evaporation factor often requires a trade-off between exploration and development, making it difficult to simultaneously meet the performance requirements of the algorithm throughout its entire iteration cycle.
[0008] Third, the heuristic function lacks sufficient information dimension, resulting in poor trajectory smoothness and severe redundant truncation. In traditional ant colony algorithms, the heuristic function typically uses only the reciprocal of the distance from the current node to the target node as the guiding principle (i.e., η_ij = 1 / d_ij), lacking the ability to perceive the continuity of movement direction and the node visit status. Due to the lack of directional consistency guidance, the ant colony frequently makes large-angle turns or even backtracks during trajectory construction, leading to poor trajectory smoothness and a large number of redundant turns. At the same time, due to the lack of a suppression mechanism for visited nodes, the ant colony easily traverses already truncated areas repeatedly, resulting in severe redundant truncation. These problems not only reduce truncation efficiency but also exacerbate wear on the cutting teeth and equipment fatigue.
[0009] Fourth, the lack of a deadlock exit mechanism poses a bottleneck to real-time downhole computing. Traditional ant colony algorithms lack an active termination and exit mechanism when the ant colony gets stuck in a deadlock or traversal stalls. Ants may loop infinitely in a local area or conduct ineffective searches for a long time, resulting in wasted computing resources and planning delays, making it difficult to meet the strict real-time requirements of downhole operations.
[0010] To address the aforementioned problems, this invention proposes a cutting trajectory planning method for cantilever tunneling machines based on an improved ant colony algorithm. By constructing a multi-objective comprehensive cost function, designing a directional heuristic function, introducing an adaptive adjustment strategy for volatile factors, and setting a deadlock exit criterion, efficient and autonomous cutting trajectory planning for cantilever tunneling machines in complex rock-filled roadway cross-sections is achieved. Summary of the Invention
[0011] The purpose of this invention is to address the problems existing in the background technology by proposing a cutting trajectory planning method for cantilever tunneling machines based on an improved ant colony algorithm.
[0012] The technical solution of this invention: A method for planning the cutting trajectory of a cantilever tunneling machine based on an improved ant colony algorithm, comprising the following steps:
[0013] Environmental modeling is used to obtain environmental information of the tunnel cross-section, establish an environmental model of the planning space, discretize the tunnel cross-section into several optional nodes, and set the start point and end point.
[0014] Parameter initialization: Initialize ant colony algorithm parameters, including ant count, maximum number of iterations, initial pheromone value, pheromone evaporation factor, pheromone factor, and heuristic factor; Define the tunneling machine cutting energy consumption evaluation index;
[0015] The trajectory search involves each ant starting from its starting point, acquiring neighboring nodes at the current node, and eliminating obstacle nodes to obtain a candidate node set. Heuristic information for the candidate nodes is calculated, determined by a base heuristic value, a directional consistency reward, and a penalty factor for visited nodes. The transition probability is calculated based on pheromone concentration and heuristic information, and the next node is selected using a roulette wheel method, updating the visited node record. Finally, a termination condition is determined; if met, the current ant's search is terminated.
[0016] Pheromones are updated after all ants have completed one trajectory construction. The pheromone increment is calculated based on the energy consumption evaluation results of each ant's trajectory truncation, and the pheromone is updated globally using a volatile factor that is dynamically adjusted with the iteration process.
[0017] The optimal trajectory is output, and the trajectory search and pheromone update steps are repeated until the maximum number of iterations is reached. The historical optimal trajectory is output, and the continuous motion commands of the tunneling machine cutting arm are generated by solving inverse kinematics and interpolation programming.
[0018] Optionally, the cutting energy consumption evaluation index includes at least the cutting head rotation energy consumption, cutting arm swing energy consumption, and additional turning energy consumption; the additional turning energy consumption is calculated based on the number of trajectory turns, and the under-dug area is calculated based on the number of turns.
[0019] Optionally, the directional consistency reward is determined based on the angle between the previous movement direction and the current candidate direction: a reward is given when moving straight, a smaller reward is given when turning, and a penalty is given when turning back.
[0020] Optionally, the straight-ahead reward coefficient is greater than 1, the turning reward coefficient is between 0 and 1, and the turnaround penalty coefficient is between 0 and the turning reward coefficient.
[0021] Optionally, the penalty factor for visited nodes decreases as the number of times a node is visited increases, and its value is limited to above a preset penalty lower limit.
[0022] Optionally, the volatile factor has a larger value in the early stage of the iteration and a smaller value in the later stage of the iteration, and is adaptively adjusted with the number of iterations according to the exponential decay law.
[0023] Optionally, the termination condition is: if the ant does not visit any new nodes within a preset number of consecutive steps and has not yet covered all nodes, then the ant's search is terminated and the trajectory is determined to be an invalid trajectory.
[0024] Optionally, in the pheromone update step:
[0025] The pheromone concentration on each road segment is limited to the preset upper and lower limits;
[0026] In this iteration, the trajectory with the lowest energy consumption was used to update the historical best trajectory.
[0027] Optionally, in the environmental modeling step, the tunnel cross-section is divided into several grids using a grid method, obstacle grids are marked according to the distribution of the coal seam area, and the center point of the passable area grid is extracted as an optional node.
[0028] Optionally, in the trajectory search step, ants are allowed to repeatedly visit nodes they have already visited, and the number of times each road segment is repeatedly traversed is counted as an evaluation index of the number of repeated cuts.
[0029] The interpolation planning employs polynomial interpolation or curve interpolation methods to perform trajectory smoothing in joint space.
[0030] Compared with the prior art, this application includes at least one of the following beneficial technical effects:
[0031] By constructing a comprehensive cost function with the goal of minimizing cutting energy consumption and using trajectory length and number of turns as decision variables, the evaluation criteria are aligned with the actual engineering practice of tunneling machines. This achieves multi-objective collaborative optimization of cutting energy consumption, number of turns, under-excavation area, trajectory length, and number of repeated cutting operations, effectively reducing cutting energy consumption and under-excavation area, and improving the quality of cross-section formation.
[0032] By introducing an adaptive parameter adjustment strategy that allows the volatile factor ρ to decay exponentially, non-optimal trajectory pheromones are rapidly evaporated in the early stages of iteration to maintain the breadth of exploration, while evaporation is slowed down in the later stages of iteration to accumulate high-quality trajectory pheromones and strengthen positive feedback to accelerate convergence. This approach balances the algorithm's exploration and development capabilities, improving convergence accuracy and search efficiency.
[0033] By introducing a direction-preserving factor and a visited-inhibition factor into the heuristic function, a hierarchical reward for the continuity of the movement direction and a penalty for visiting covered nodes are achieved, which significantly improves the trajectory smoothness, reduces redundant turning and repeated cutting, and reduces the wear of the cutting teeth.
[0034] By setting a termination criterion based on the number of consecutive steps without improvement, deadlock trajectories can be eliminated in a timely manner, avoiding waste of computational resources and meeting the real-time requirements of downhole operations.
[0035] In summary, the algorithm proposed in this invention can plan a cross-section forming and cutting trajectory that meets the requirements of full coverage. Moreover, it can comprehensively reduce cutting energy consumption, number of turning times, trajectory length, under-excavation area, and number of repeated cutting times while ensuring cutting safety. This provides a brand-new theoretical and engineering technical solution for unmanned autonomous and precise cutting of tunnel boring machines in deep and complex geological tunnels. Attached Figure Description
[0036] Figure 1 This is a flowchart of the algorithm for a cutting trajectory planning method for a cantilever tunneling machine based on an improved ant colony algorithm, according to the present invention.
[0037] Figure 2 A trajectory planning diagram for a rectangular alleyway using a traditional ant colony algorithm.
[0038] Figure 3 Convergence curve of traditional ant colony algorithm trajectory planning for rectangular alleyways;
[0039] Figure 4 This invention provides an improved ant colony algorithm trajectory planning diagram for rectangular alleyways.
[0040] Figure 5 The improved ant colony algorithm trajectory planning convergence curve of this invention is shown for rectangular alleyways;
[0041] Figure 6 A trajectory planning diagram for a traditional ant colony algorithm in an arched tunnel;
[0042] Figure 7 This invention provides an improved ant colony algorithm trajectory planning diagram for arched tunnels. Detailed Implementation
[0043] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.
[0044] Example: Figure 1 As shown in the figure, this invention proposes a cutting trajectory planning method for cantilever tunneling machines based on an improved ant colony algorithm. The method will be described in detail below.
[0045] I. Environmental Modeling. In the environmental modeling steps of this invention, the environmental information of the tunnel cross-section is first obtained. The tunnel cross-section shape can be rectangular, arched, or circular, with the specific shape determined according to actual engineering needs. This invention uses a rectangular cross-section as an example for illustration, but those skilled in the art should understand that the method of this invention is also applicable to cross-sections of other shapes.
[0046] A grid-based method is used to establish the environmental model of the planning space. Specifically, the tunnel cross-section is divided into several uniformly sized grids on a two-dimensional plane. In this embodiment, the grid side length is set to 0.5m. This size selection comprehensively considers planning accuracy and computational efficiency: too small a grid size will lead to a sharp increase in the number of nodes, reducing search efficiency; too large a grid size will result in insufficient planning accuracy, affecting the quality of cross-section formation. Depending on actual engineering needs and computational resource conditions, the grid side length can be adjusted within the range of 0.3m to 1.0m.
[0047] Based on the distribution of the interbedded areas, they are marked as obstacle grids. The specific marking method is as follows: for the first... line, number A column of grid cells is marked if it is located within a coal-bearing area. This indicates that the grid cell is an obstacle grid, and ants cannot pass through it; otherwise, it is marked as an obstacle grid. This indicates that the grid is a passable grid.
[0048] After obstacle marking is completed, the passable area is divided into 1 m × 1 m blocks. For each 1 m × 1 m block, its center point is extracted as a potential node for trajectory planning. The coordinates of all potential nodes are stored in the node coordinate set `points`, and the total number of nodes is denoted as N. It should be noted that the 1 m × 1 m block size is only an example, and those skilled in the art can choose an appropriate block size according to actual accuracy requirements.
[0049] Set the coordinates of the starting point A and the ending point Z. The starting point is typically set as the initial working position of the tunneling machine's cutting head, and the ending point is set as the desired stopping position after the cutting operation is completed. Based on the coordinates of the starting point A and the ending point Z, determine the corresponding node index in the node coordinate set `points`. and .
[0050] II. Parameter Initialization and Energy Consumption Model Definition. After completing the environmental modeling, the algorithm parameters are initialized. Specific parameter settings are as follows:
[0051] The value of the number of ants, m, affects the search breadth and computational complexity of the algorithm. In a preferred embodiment of the present invention, the number of ants, m = 50. Depending on the actual cross-sectional size and computational resources, the value of m can range from 20 to 100.
[0052] Maximum number of iterations The value of determines the termination condition of the algorithm. In the embodiments of the present invention, the maximum number of iterations... For large-scale cross-sections or applications requiring higher precision, the number of iterations can be increased appropriately.
[0053] The maximum number of steps a single ant can move, `maxSteps`, is used to limit the maximum search step size of each ant, preventing a single ant from searching indefinitely. In this embodiment of the invention, `maxSteps` = 1000. This value should be greater than the theoretical minimum number of steps required to complete the full coverage task.
[0054] The maximum number of consecutive steps without visiting a new node, `maxNoImprove`, is the deadlock exit criterion parameter proposed in this invention. In this embodiment, `maxNoImprove` = 20. This parameter means that if an ant fails to visit any new node for 20 consecutive steps and has not yet covered all nodes, the ant is considered to be in a deadlock state, and its search is terminated. The setting of this parameter is related to the total number of nodes in the cross-section, and is generally taken as 5% to 10% of the total number of nodes.
[0055] Initial value of pheromones Set as Pheromones upper and lower limits and This is used to limit pheromone concentration within a reasonable range, preventing excessive concentration or complete dissipation of pheromones. In this embodiment, , Those skilled in the art can adjust the above values according to the specific scale of the problem.
[0056] The pheromone factor α and the heuristic factor β are key parameters in ant colony optimization (ACO) that control the relative importance of pheromone and heuristic information. In this embodiment, α = 1.0 and β = 2.5. A larger α value indicates that ants are more likely to choose paths with high pheromone concentrations, accelerating the algorithm's convergence speed but making it prone to getting trapped in local optima. A larger β value indicates that ants are more likely to choose paths with high heuristic values, enhancing the algorithm's exploratory nature but slowing down the convergence speed. Those skilled in the art can adjust α ∈ [0.5, 2.0] and β ∈ [1.0, 4.0] according to actual needs.
[0057] The directional reward coefficient is an important parameter introduced into the heuristic function in this invention. In a preferred embodiment of this invention, the straight-line direction reward S = 1.5, the turning direction reward E = 0.8, and the reversal direction penalty B = 0.2. The three coefficients must satisfy the relationship S > 1 > E > B > 0. Specifically, a straight-line reward S greater than 1 enhances the heuristic value of the straight-line direction, guiding ants to travel in a straight line as much as possible; a turning reward E less than 1 but greater than the reversal penalty B moderately weakens the heuristic value of the turning direction, but it is still better than the reversal direction; a reversal penalty B much less than 1 significantly weakens the heuristic value of the reversal direction, effectively suppressing reversal behavior. Those skilled in the art can adjust the specific values appropriately while maintaining the above-mentioned magnitude relationships, for example, S ∈ [1.2, 2.0], E ∈ [0.5, 0.9], and B ∈ [0.05, 0.3].
[0058] The penalty strength coefficient λ for visited nodes and the penalty lower limit δ are another important parameter introduced into the heuristic function in this invention. In this embodiment, λ=0.5 and δ=0.1. λ controls the degree to which the number of visits weakens the heuristic value; the larger λ is, the faster the heuristic value of visited nodes decreases, and the more inclined ants are to explore unvisited areas. δ ensures that even if a node is visited multiple times, its heuristic value will not decrease to zero, thus preserving the possibility of visiting a visited node when no unvisited nodes are available. Those skilled in the art can adjust λ ∈ [0.2, 1.0] and δ ∈ [0.05, 0.3].
[0059] The small constant ε in the distance calculation is used to prevent the denominator from being zero. In this embodiment, ε = 0.001.
[0060] Pheromones volatile factors The initial value does not need to be set separately in this invention because an adaptive update strategy is used during the iteration process. However, it should be noted that the adaptive formula is as follows:
[0061]
[0062] in, The evaporation factor for the current iteration number. The constants 0.1 and 0.5 for the current iteration number correspond to the minimum value and the range of change of the volatile factor, respectively. The maximum number of iterations, The attenuation rate control coefficient can be adjusted by those skilled in the art according to actual needs, for example, the formula can be generalized as follows:
[0063]
[0064] in, , Attenuation rate control coefficient The rate at which the volatile factor decays from a high value to a low value is controlled. In this embodiment, . The larger the value, the faster the volatile factor decays, and the earlier the algorithm enters the development stage; The smaller the value, the slower the volatile factor decays, and the longer the algorithm exploration phase lasts. Those skilled in the art can... Adjustments will be made within the specified range.
[0065] Regarding the energy consumption model for throttling, the specific implementation of this invention is as follows:
[0066] Design cross-sectional area The dimensions are calculated based on the actual cross-sectional dimensions of the tunnel. Taking a rectangular cross-section as an example, if the tunnel width is... meters, height is Rice, then .
[0067] The cutting head radius R is a physical parameter of the tunneling machine's cutting head; in this embodiment, R = 0.5m. In practical applications, this parameter should be determined based on the specific tunneling machine model.
[0068] Unit under-excavation area The calculation formula is:
[0069] ;
[0070] The physical meaning of this formula is: in the boundary area where the circular motion and linear motion of the cutting head alternate, since the cutting head is circular and the cutting trajectory is a straight line segment, an under-cut area will inevitably be generated. The unit under-cut area is the circular missing area corresponding to one cutting head radius.
[0071] Cutting specific energy consumption These are physical parameters of coal and rock materials, representing the energy required to cut a unit volume of coal or rock. Different types of coal and rock... The values differ, and those skilled in the art can obtain them through experimental determination or by consulting relevant geological data. Generally, soft rock... Approximately 0.1–0.3 kW·h / m 3 , medium hard rock Approximately 0.3–0.8 kW·h / m 3 Hard rock Approximately 0.8–1.5 kW·h / m 3 .
[0072] Cutting head drilling depth This is the depth to which the cutting head penetrates the coal and rock in each cutting cycle. This parameter is set according to the working parameters of the tunneling machine and can generally be taken as 0.05 to 0.15 m.
[0073] Swing energy consumption coefficient This represents the energy consumed by the cutting arm per unit length of swing. This parameter is related to the hydraulic system and mechanical structure of the tunneling machine and can be obtained through experimental measurement. In this embodiment, .
[0074] Area of interbedded coal The area of the interbedded rock zone within the cross-section is obtained by extracting the distribution information of the interbedded rock zone from the environmental modeling step.
[0075] Energy consumption coefficient per turn This represents the additional energy consumed by the cutting arm to complete one turning operation. In this embodiment, Those skilled in the art can adjust this value based on the actual operating parameters of the tunneling machine.
[0076] Area under excavation According to the formula calculate, This refers to the number of turns. The constant 4 in the formula means that even without considering the turning operation, the cutting trajectory requires at least 4 units of undercut correction in the boundary area between the start and end points to compensate for the geometric characteristics of the cutting head.
[0077] Effective cut volume The calculation formula is: That is, the total cross-sectional area minus the under-excavated area and the area of interbedded rock, multiplied by the drilling depth of the cutting head. Design cross-sectional area.
[0078] Energy consumption of cutting head rotation That is, the effective cutting volume multiplied by the cutting ratio energy consumption.
[0079] Energy consumption of cutting arm swing in For the trajectory length, Additional energy consumption for steering.
[0080] Steering additional energy consumption ; It refers to the number of turns.
[0081] Total cutting energy consumption After completing the above parameter initialization, construct the visited node record table. This table is a Boolean array of length N, initially set to the index corresponding to the starting point A. Marked as visited All others are marked as false.
[0082] Construct a road segment repetition count matrix edgeCount, which is an N×N integer matrix, initially all of which are zero. The value is taken from the node To the node (Or in the opposite direction, because this invention processes road segments symmetrically) the number of times the ant has traversed the road segment, which is used to count the number of times each road segment has been traversed by the same ant.
[0083] III. Trajectory Search and Construction. Trajectory search and construction is the core step of the method of this invention. Each ant independently executes a complete trajectory construction process once. The specific implementation method of this step is described in detail below using a single ant as an example.
[0084] First, the ant starts from point A. Before setting off, the ant creates a separate table of visited nodes (visited) and a matrix of repeated path counts (edgeCount, an all-zero matrix). It copies the initial state of the global `visited` table, containing only the starting point. The current node is set to the starting point A, and the step counter is set to 1.
[0085] At the current node, the ant needs to determine the set of nodes that can be selected for the next step. Specifically, it obtains neighboring nodes based on Manhattan distance, that is, it calculates the Manhattan distance between all nodes and the current node, and selects the node with a distance of 1 as the neighboring node. The node with a distance of 1 is the center point of the adjacent grid in the four directions of up, down, left, and right. Let the current node be... The coordinates are ,node The coordinates are Then Manhattan is far for:
[0086]
[0087] After obtaining neighboring nodes, it is necessary to use the pre-calculated collision matrix. Eliminate road segments that intersect with obstacles. Collision matrix. It is an N×N Boolean matrix. Indicates from node To the node The section of road that passes through a grid of obstacles is impassable; This indicates that the road segment is passable. The collision matrix is pre-calculated after environment modeling is completed to avoid repeated collision detection during trajectory search.
[0088] After eliminating impassable road sections, the next step is to obtain the candidate node set. .like If the value is empty, the ant's search fails, and the trajectory construction for that ant is terminated.
[0089] After the candidate node set is determined, the heuristic information for each candidate node needs to be calculated. The heuristic information of this invention consists of three parts: a basic heuristic value, a directional consistency reward, and a visited node penalty factor.
[0090] Basic heuristic value According to the formula:
[0091]
[0092] Calculation. Among them... For the current node to candidate node The Manhattan distance, since the candidate node is a neighboring node, . It is a small constant to prevent the denominator from being zero.
[0093] Directional Consistency Reward The calculation method is as follows: If the current step number is 1, meaning the ant is in its first step and there is no previous movement direction, then dir = 1. If step > 1, let the unit direction vector of the previous movement be... The candidate direction vector for the current step is Calculate the dot product of the two. The range of values for the dot product is [−1, 1], where 1 represents the same direction (straight), 0 represents the perpendicular direction (turning), and -1 represents the completely opposite direction (returning).
[0094] Specifically:
[0095]
[0096] in This is the reward coefficient for the straight-ahead direction. This enhances the inspiration for the straight-line direction.
[0097] This is the steering direction reward coefficient. This moderately weakens the heuristic value for the turning direction.
[0098] The penalty coefficient for the reversal direction. This significantly weakens the heuristic value of the reversal direction.
[0099] It should be noted that the thresholds of 0.5 and -0.5 are merely exemplary values. Those skilled in the art can adjust these thresholds according to actual needs, for example, by setting the straight-going threshold to 0.7 and the turning-back threshold to -0.7, to adjust the strictness of the direction determination.
[0100] Visited node penalty factor According to the formula Calculation, where Candidate nodes The number of times it has been visited by the current ant, initially set to 0; The penalty intensity coefficient, This serves as the lower bound for the penalty. The purpose of this penalty factor is to weaken the heuristic value of a node the more times it is visited, thus guiding ants to prioritize visiting unvisited or less-visited nodes. When a node is unvisited, No penalty; when a node is visited once, When a node is visited multiple times, But not lower than This preserves the possibility of accessing already visited nodes in extreme cases.
[0101] Final Heuristic According to the formula calculate.
[0102] After calculating the heuristic information for each candidate node, the transition probability is calculated based on the pheromone concentration. Current node to candidate node The transition probability is calculated using the following formula:
[0103]
[0104] in For the current node to candidate node pheromone concentration, For pheromone factors, As a heuristic factor, It is not a fixed node, but a temporary variable that sequentially represents the candidate set. Each candidate node in the dataset. The meaning of this probability formula is: candidate nodes... The higher the pheromone concentration and the higher the heuristic value, the greater the probability of being selected.
[0105] Then, the next node is selected using a roulette wheel selection method. The specific implementation of the roulette wheel selection is as follows: calculate the cumulative probability distribution of all candidate nodes, generate a random number in the interval [0,1], and determine the selected node based on the position of the random number falling in the cumulative probability distribution.
[0106] After selecting the next node, the ants count the repetitions of each segment. Specifically, let a = min(current, next) and b = max(current, next), and check the value of edgeCount(a, b). If edgeCount(a, b) > 0, it means that the segment has been traversed by the current ant, so the repetition count repeatCount is incremented by 1, and then edgeCount(a, b) is incremented by 1; if edgeCount(a, b) = 0, it means that the segment has not been traversed, so edgeCount(a, b) is incremented by 1 directly.
[0107] Add the selected next node (next) to the trajectory sequence path, update the current node (current=next), and update the previous direction vector. Given the unit direction vector from the original current node to the new current node, increment the step counter by 1 and mark next as visited in visited.
[0108] After each move, the ant needs to determine whether the early termination condition or the success condition is met. The early termination condition is: if no new nodes are visited within `maxNoImprove` consecutive steps (i.e., the number of newly added nodes in `visited` is 0), and not all nodes have been visited yet, then the ant's search terminates, and the trajectory is considered invalid. This mechanism is the deadlock exit mechanism proposed in this invention, used to prevent ants from infinitely looping in local areas and wasting computational resources.
[0109] The success condition is: if all nodes have been visited, that is, all elements in visited are true, and the current node is the destination Z, then the search is successful and the ant's trajectory is completed.
[0110] If none of the above conditions are met, the ant continues to perform node selection, movement, and state update operations in a loop until the number of steps exceeds maxSteps, or the early termination condition is met, or the success condition is met.
[0111] IV. Energy Consumption Evaluation and Global Pheromone Update. After all m ants have completed trajectory construction only once, the algorithm enters the global pheromone update phase.
[0112] First, for each ant k, the trajectory is obtained according to the order of the nodes it records. Then, calculate the various evaluation indicators for this trajectory:
[0113] trajectory length Calculated by summing the Manhattan distances between adjacent nodes in the trajectory. For adjacent nodes... The distance is Since the Manhattan distance between adjacent nodes is 1, the trajectory length is the number of road segments contained in the trajectory.
[0114] No. Number of turns of an ant This refers to the number of directional changes formed by three adjacent nodes in a statistical trajectory. Specifically, it involves counting the number of directional changes formed by three consecutive nodes in the trajectory. Calculate from arrive The direction vector and from arrive The angle between the direction vectors is used to determine a turn. If the angle is greater than a preset threshold, such as 30°, it is considered a turn. A simpler calculation method is: if the dot product of the unit direction vectors of two consecutive road segments is less than a threshold, such as 0.866, corresponding to 30°, then the number of turns is increased by 1.
[0115] Number of repeated cuts : Directly read the data maintained during the ant search process The value of the counter.
[0116] Area under excavation According to the formula calculate.
[0117] Cutting energy consumption According to the aforementioned energy consumption model:
[0118]
[0119] in, Indicates the first The pheromone update is performed after calculating the interception energy consumption of each ant, based on the trajectory length of the individual ant. The pheromone update formula is:
[0120]
[0121] in This represents the current iteration number (counting from 0). The evaporation factor for the current iteration number. This represents the number of ants.
[0122] Ants The amount of pheromone added at each point along its path. Specifically, for ants... Each segment in the trajectory In its corresponding pheromone matrix elements Add to . Q is the total pheromone constant; in this embodiment, Q = 100. Those skilled in the art can adjust the value of Q within the range of 50 to 500 according to actual needs.
[0123] The pheromone update formula shows that: cutoff energy consumption Smaller ants have better trajectories. The larger the pheromone level, the stronger the pheromone enhancement on the road segments it passes through, thus achieving positive feedback.
[0124] To prevent pheromones from becoming overly concentrated or completely dissipating, the updated... Limited to Within the interval. Specifically, if ,but ;like ,but .
[0125] After completing the pheromone update, the optimal trajectory for this iteration is recorded. The cutoff energy consumption of all ants in the current iteration is compared to obtain the optimal cutoff energy consumption for this iteration. And the corresponding trajectory, trajectory length, number of turns, number of repeated cuts, under-excavation area and other indicators.
[0126] Then, Optimal cutoff energy consumption compared to historical trajectory Comparison. Historical best cutoff energy consumption. The initial value is infinity. If Then update It also records the corresponding trajectory bestPath, trajectory length, number of turns, number of repeated cuts, under-cut area, and cut energy consumption.
[0127] At the same time, volatile factors are processed. Adaptive update. The update formula is:
[0128]
[0129] in This represents the current iteration number (starting from 0). The maximum number of iterations, This is the attenuation rate control coefficient.
[0130] The physical meaning of this formula is: in the initial stage of iteration, i.e. When smaller, Approaching 1, A value close to 0.60 indicates a relatively high volatile factor, causing the pheromone from suboptimal trajectories to dissipate rapidly, thus maintaining the breadth of the search; this is particularly relevant in the later stages of iteration. near hour, Approaching 0 With a value close to 0.1, the volatile factor is relatively small, allowing pheromones of high-quality trajectories to accumulate, strengthening positive feedback and accelerating convergence.
[0131] It should be noted that the constants 0.1 and 0.5 in the formula represent the minimum value and the range of variation of the volatile factor, respectively. In other embodiments of the present invention, a more generalized form can be adopted:
[0132]
[0133] in This represents the minimum volatility factor. For the maximum volatility factor, satisfying .
[0134] V. Optimal Trajectory Output. Repeat the trajectory search and construction phase (Phase 3) and the energy consumption evaluation and pheromone global update phase (Phase 4) until the preset maximum number of iterations is reached. .
[0135] After the iteration, the node order corresponding to the historical best trajectory (bestPath) is the globally optimal cutting trajectory. This trajectory is the optimal solution after comprehensively considering multiple objectives such as cutting energy consumption, number of turns, undercut area, trajectory length, and number of repeated cuttings.
[0136] Extract the coordinates of all nodes from the node sequence of bestPath to obtain a series of discrete feature points.
[0137] Then, several feature points are selected, including the starting point A, the ending point Z, and key intermediate nodes. Key nodes are selected by either selecting nodes at equal intervals from the node sequence of bestPath, or selecting turning points (nodes where the direction changes) in the trajectory. In a preferred embodiment of the invention, the starting point, the ending point, and all turning points in the trajectory are selected as feature points.
[0138] Inverse kinematics is used to transform the selected feature points from workspace coordinates into joint space variables of the tunnel boring machine's cutting head. The specific method for inverse kinematics is as follows: based on the kinematic model of the tunnel boring machine, the rotation angle or displacement of each joint is deduced from the end position of the cutting head. Since the inverse kinematics method is a well-known technique in this field, it will not be elaborated upon here.
[0139] After obtaining a series of discrete points in the joint space, an interpolation method is used to perform trajectory smoothing planning in the joint space. In a preferred embodiment of the invention, a cubic polynomial interpolation method is used to ensure the continuity of displacement, velocity, and acceleration of each joint. In other embodiments of the invention, fifth-order polynomial interpolation, B-spline curve interpolation, or cubic spline interpolation methods may also be used.
[0140] Interpolation programming generates continuous motion commands for each joint of the tunnel boring machine's cutting arm. These motion commands are sent to the tunnel boring machine's control system, driving the cutting arm to perform cutting operations according to the planned optimal trajectory.
[0141] Based on the specific implementation methods of each stage described above, the complete execution flow of the method of the present invention is as follows: Figure 1 As shown, the main steps include:
[0142] Step S1: Environment Modeling. Obtain tunnel cross-sectional information, build an environment model using the grid method, mark obstacles, extract optional nodes, and set the start and end points.
[0143] Step S2: Parameter Initialization. Initialize the parameters of the ant colony algorithm, define the truncation energy consumption model, and construct the visited node record table and the segment repetition count matrix.
[0144] Step S3: Trajectory Search. Each ant starts from the starting point, selects candidate nodes in each step, calculates comprehensive heuristic information including basic heuristic value, directional consistency reward and visited node penalty, selects the next node by roulette wheel, updates the visit status and path repetition count, and determines deadlock or completion conditions.
[0145] Step S4: Energy Consumption Evaluation and Pheromone Update. Calculate the truncation energy consumption of each ant trajectory, perform a global pheromone update based on the energy consumption, and update the historical best trajectory using an adaptive evaporation factor.
[0146] Step S5: Determine if the maximum number of iterations has been reached. If not, return to step S3; if reached, proceed to step S6.
[0147] Step S6: Optimal Trajectory Output. Extract the historical best trajectory and generate continuous motion instructions through inverse kinematics solution and interpolation programming.
[0148] To verify the technical effect of the present invention, a comparative experiment was conducted between the improved ant colony algorithm of the present invention and the traditional ant colony algorithm under the same tunnel cross-section conditions.
[0149] Figure 2 This diagram illustrates the traditional ant colony algorithm for truncation trajectory planning in rectangular alleyways. From... Figure 2 It can be seen that the trajectory planned by the traditional ant colony algorithm has many back-and-forth and intersection phenomena, poor trajectory smoothness, and many turning times. Figure 3 It can be concluded that the traditional ant colony algorithm has the following drawbacks in tunneling machine cutting trajectory planning: slow convergence, high cutting energy consumption, many turning times, and large under-dug area.
[0150] Figure 4 A schematic diagram illustrating the truncation trajectory planning using the improved ant colony algorithm of this invention for rectangular alleyways is shown. From Figure 4 As can be seen, the improved ant colony algorithm of this invention produces a smooth and fluid trajectory, significantly reduces backtracking and crossing phenomena, noticeably reduces the number of turns, and achieves uniform cross-sectional coverage. Figure 5 It can be concluded that the improved ant colony algorithm of this invention converges faster, consumes less cutting energy, requires fewer turning times, and has a smaller under-dug area in terms of tunneling machine cutting trajectory planning.
[0151] from Figure 6 It can be seen that the trajectory planned by the traditional ant colony algorithm has many back-and-forth and intersection phenomena, resulting in poor trajectory quality and a large number of turns.
[0152] from Figure 7 It can be seen that the improved ant colony algorithm of this invention plans a trajectory with better quality, significantly fewer turning times, and more uniform cross-sectional coverage.
[0153] Experimental results show that the improved ant colony algorithm proposed in this invention outperforms the traditional ant colony algorithm in terms of cutting energy consumption, number of turns, trajectory length, under-dug area, and number of repeated cuttings. It can comprehensively reduce cutting energy consumption and under-dug area, improve cross-section forming quality, and enhance tunneling efficiency.
[0154] The method of this invention is applicable to various tunnel cross-sectional shapes (rectangular, arched, circular, etc.) and different geological conditions (soft rock, medium-hard rock, hard rock, interbedded rock, etc.), and has good versatility and engineering applicability.
[0155] Those skilled in the art can select and adjust the algorithm parameters according to specific engineering conditions when implementing this invention. The following are guiding suggestions for parameter selection:
[0156] For cross-sectional areas with a large size >20 m² 2 For the tunnel, it is recommended to appropriately increase the number of ants m, such as 80-100, and the maximum number of iterations. For example, 150-200, to ensure sufficient search capability. For smaller cross-sectional areas, <10 m². 2 For tunnels, the length can be appropriately reduced by 20-30 m. For example, 50-80, to improve computational efficiency.
[0157] For cross-sections with complex rock-clamping distribution and numerous obstacles, it is recommended to increase the penalty strength coefficient λ for visited nodes, such as 0.6–0.8, to more strongly guide ants to explore unvisited areas and avoid stagnation in local areas. Simultaneously, the termination step count for consecutive unvisited new nodes, maxNoImprove, can be appropriately increased, such as 30–40, to prevent ants from being prematurely identified as deadlocked due to rock-clamping obstacles.
[0158] For hard rock conditions, the cutting energy consumption is... The energy consumption during cutting is relatively large, especially the rotational energy consumption. When the dominant phase is in play, the oscillation energy consumption coefficient can be appropriately increased. and steering energy consumption coefficient The relative weights are adjusted by modifying the energy consumption model parameters, making the algorithm more inclined to plan paths with fewer turns and smoother trajectories.
[0159] For soft rock conditions, the cutting energy consumption is... When the energy consumption is relatively low, the relative importance of steering energy consumption increases, and more attention should be paid to reducing the number of steering turns.
[0160] It should be noted that, in this invention, the formula for calculating the Manhattan distance is:
[0161]
[0162] In other embodiments of the present invention, Euclidean distance may also be used:
[0163]
[0164] It can replace Manhattan distance, but Manhattan distance is easier to calculate in raster maps and has a more direct relationship with path length.
[0165] In this invention, the roulette wheel selection method is a well-known random selection method in the art. Its specific implementation involves: calculating the cumulative probability distribution of all candidate nodes, generating a uniform random number within the interval [0,1], and selecting the node whose cumulative probability first exceeds that random number. The specific implementation methods for inverse kinematics solving and interpolation programming are well-known techniques in the art, and those skilled in the art can select appropriate methods based on the specific kinematic model and control requirements of the tunneling machine. The "unit direction vector" is the unit vector obtained by dividing the vector by the common modulus length. In a grid map, since the Manhattan distance between adjacent nodes is 1, from the node... To the node The direction vector is the unit direction vector. The selection method for the "key nodes" is not limited to turning points, but can also include equally spaced sampling points in the trajectory. The specific selection method should be determined according to the control accuracy of the tunneling machine and the requirements of the interpolation method.
[0166] The above specific embodiments are merely several optional embodiments of the present invention. Based on the technical solutions of the present invention and the relevant teachings of the above embodiments, those skilled in the art can make various alternative improvements and combinations to the above specific embodiments.
Claims
1. A method for planning the cutting trajectory of a cantilever tunneling machine based on an improved ant colony algorithm, characterized in that, Includes the following steps: Environmental modeling is used to obtain environmental information of the tunnel cross-section, establish an environmental model of the planning space, discretize the tunnel cross-section into several optional nodes, and set the start point and end point. Parameter initialization: Initialize ant colony algorithm parameters, including ant count, maximum number of iterations, initial pheromone value, pheromone evaporation factor, pheromone factor, and heuristic factor; Define the tunneling machine cutting energy consumption evaluation index; The trajectory search involves each ant starting from its starting point, acquiring neighboring nodes at the current node, and eliminating obstacle nodes to obtain a candidate node set. Heuristic information for the candidate nodes is calculated, determined by a base heuristic value, a directional consistency reward, and a penalty factor for visited nodes. The transition probability is calculated based on pheromone concentration and heuristic information, and the next node is selected using a roulette wheel method, updating the visited node record. Finally, a termination condition is determined; if met, the current ant's search is terminated. Pheromones are updated after all ants have completed one trajectory construction. The pheromone increment is calculated based on the energy consumption evaluation results of each ant's trajectory truncation, and the pheromone is updated globally using a volatile factor that is dynamically adjusted with the iteration process. The optimal trajectory is output, and the trajectory search and pheromone update steps are repeated until the maximum number of iterations is reached. The historical optimal trajectory is output, and the continuous motion commands of the tunneling machine cutting arm are generated by solving inverse kinematics and interpolation programming.
2. The method for planning the cutting trajectory of a cantilever tunneling machine based on an improved ant colony algorithm according to claim 1, characterized in that, The cutting energy consumption evaluation index includes at least the cutting head rotation energy consumption, cutting arm swing energy consumption, and additional energy consumption for turning; The additional energy consumption for turning is calculated based on the number of trajectory turns, and the under-excavated area is calculated based on the number of turns.
3. The method for planning the cutting trajectory of a cantilever tunneling machine based on an improved ant colony algorithm according to claim 1, characterized in that, The directional consistency reward is determined based on the angle between the previous movement direction and the current candidate direction: a reward is given when moving straight, a smaller reward is given when turning, and a penalty is given when turning back.
4. The method for planning the cutting trajectory of a cantilever tunneling machine based on an improved ant colony algorithm according to claim 1, characterized in that, The straight-ahead reward coefficient is greater than 1, the turning reward coefficient is between 0 and 1, and the turnaround penalty coefficient is between 0 and the turning reward coefficient.
5. The method for planning the cutting trajectory of a cantilever tunneling machine based on an improved ant colony algorithm according to claim 1, characterized in that, The penalty factor for visited nodes decreases as the number of times a node is visited increases, and its value is limited to above a preset penalty lower limit.
6. The method for planning the cutting trajectory of a cantilever tunneling machine based on an improved ant colony algorithm according to claim 1, characterized in that, The volatile factor has a larger value in the early stage of the iteration and a smaller value in the later stage of the iteration, and is adaptively adjusted with the number of iterations according to the exponential decay law.
7. The method for planning the cutting trajectory of a cantilever tunneling machine based on an improved ant colony algorithm according to claim 1, characterized in that, The termination condition is as follows: if an ant does not visit any new nodes within a preset number of consecutive steps and has not yet covered all nodes, then the ant's search is terminated and the trajectory is determined to be an invalid trajectory.
8. The method for planning the cutting trajectory of a cantilever tunneling machine based on an improved ant colony algorithm according to claim 1, characterized in that, In the pheromone update step: The pheromone concentration on each road segment is limited to the preset upper and lower limits; In this iteration, the trajectory with the lowest energy consumption was used to update the historical best trajectory.
9. The method for planning the cutting trajectory of a cantilever tunneling machine based on an improved ant colony algorithm according to claim 1, characterized in that, In the environmental modeling step, the tunnel cross-section is divided into several grids using the grid method. Obstacle grids are marked according to the distribution of the coal seam area, and the center point of the passable area grid is extracted as an optional node.
10. A method for planning the cutting trajectory of a cantilever tunneling machine based on an improved ant colony algorithm according to claim 1, characterized in that, In the trajectory search step, ants are allowed to repeatedly visit nodes they have already visited, and the number of times each road segment is repeatedly visited is counted as an evaluation index of the number of repeated cuts. The interpolation planning employs polynomial interpolation or curve interpolation methods to perform trajectory smoothing in joint space.