Swarm intelligence algorithm-based multi-agent formation cooperative collision avoidance method and device and electronic equipment

By combining the improved ant colony algorithm and the fish swarm effect, the problems of poor searchability and obstacle avoidance in complex maps in multi-agent formations are solved, and the safe collision avoidance and task execution of multi-agent systems in unknown environments are realized.

CN118192589BActive Publication Date: 2026-12-04NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410421326.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-09
Publication Date
2026-12-04
Estimated Expiration
2044-04-09

AI Technical Summary

Technical Problem

Existing swarm intelligence algorithms suffer from limitations in searching complex maps in multi-agent formations, are prone to falling into local optima, and struggle to simultaneously solve the problem of collision avoidance between dynamic and static obstacles.

Method used

By combining the improved ant colony algorithm and the fish swarm effect, the ant colony algorithm is improved through a chaos optimization factor. By combining static path planning and dynamic path replanning, a dynamic collision avoidance algorithm is designed using an autonomous collision avoidance method, and a multi-agent formation cooperative collision avoidance method is constructed.

Benefits of technology

It enables multi-agent systems to effectively avoid collisions in unknown environments, improves the safety of formations and the efficiency of task execution, and solves the problem of collision avoidance of static and dynamic obstacles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118192589B_ABST
    Figure CN118192589B_ABST
Patent Text Reader

Abstract

This invention discloses a multi-agent formation cooperative collision avoidance method, apparatus, and electronic device based on swarm intelligence algorithms. The method includes: establishing a grid map with obstacle information and performing static global path planning using an improved ant colony algorithm based on chaos factors; generating a series of virtual waypoints according to the optimal path; and effectively tracking these virtual waypoints based on a consensus algorithm, thus activating the multi-agent formation system into a formation tracking mode. When an agent's sensor detects an unknown obstacle approaching within its perception range, it feeds back obstacle information to each agent, and the multi-agent formation immediately enters a cooperative collision avoidance mode. Upon completion of the collision avoidance phase, after safely traversing the obstacle, each agent returns to the tracking mode to re-form the formation, thus achieving the functions of static planning, formation construction, and dynamic traversal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of aerospace multi-agent formation control and decision-making technology, and relates to a multi-agent formation cooperative collision avoidance method, device and electronic equipment based on swarm intelligence algorithm. Background Technology

[0002] For single agents, multi-agent formations offer advantages such as distributed workspace, higher reliability, stronger fault tolerance, and higher execution efficiency. Furthermore, research on multi-agent formation collaboration can further improve the swarm intelligence level of multi-agent systems. However, in the cooperative movement of multi-agent formations, the influence of obstacles in the path is inevitable. Therefore, in addition to formation tracking, multi-agent formations also need to avoid obstacles encountered during tracking. For known harsh environments and static obstacles, global collision avoidance planning is often used based on meteorological information and electronic maps to plan the multi-agent formation's route. Current methods for global collision avoidance planning in known environments include grid-based methods, A* algorithms, and artificial potential field methods. For unknown dynamic obstacles encountered during task execution, local collision avoidance methods are generally adopted, combining the sensors on the agents' equipment to perceive surrounding obstacles, thereby achieving real-time local collision avoidance functionality for multi-agent systems. Current methods include genetic algorithms, neural network methods, fuzzy control methods, and swarm intelligence algorithms. Swarm intelligence algorithms originate from the study of the "social" group behavior of organisms such as ants and schools of fish. They simulate the optimization process as the foraging behavior of individual organisms, thus transforming complex engineering optimization problems into relatively simple function optimization problems. Swarm intelligence algorithms are probabilistic search algorithms, currently widely used to solve multi-agent formation control and decision-making problems such as path pre-planning, autonomous formation and task reconstruction, and swarm intelligence collaborative decision-making. However, when dealing with practical problems, single swarm intelligence algorithms often suffer from drawbacks such as weak search capabilities on complex maps and susceptibility to local optima. Furthermore, using only a single swarm intelligence algorithm, such as ant colony optimization, cannot simultaneously solve the dynamic and static collision avoidance control problems of multi-agent formations. Therefore, it is often necessary to combine or improve various swarm intelligence algorithms based on their specific characteristics. Summary of the Invention

[0003] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a multi-agent formation cooperative collision avoidance method, device, and electronic device based on swarm intelligence algorithms. Addressing the collision avoidance control problem of multi-agent formations encountering unknown dynamic and static obstacles during movement, this invention improves the classic ant colony algorithm based on chaotic optimization factors and the basic structure of the ant colony algorithm. This improves the classic ant colony algorithm's poor convergence, tendency to fall into local optima, and insufficient smoothness of planned paths in static path planning problems. Combining a global path planning method based on the improved ant colony algorithm and a local path replanning method based on the swarm effect, a cooperative collision avoidance method is proposed using swarm intelligence algorithms, and a device is designed to realize collision avoidance formation control of multi-agent systems in unknown environments.

[0004] To solve the above problems, the present invention adopts the following technical solution.

[0005] The present invention provides a multi-agent cooperative collision avoidance method based on swarm intelligence algorithms, comprising the following steps:

[0006] Step 1: Raster Map Construction Stage

[0007] Step 1.1: Transform obstacle information. Obstacles are expanded, and all grid cells covered by obstacles are set as unreachable areas. Obstacle information in the map is transformed by assigning a logical value to each grid cell, converting the grid map into a matrix. Each small grid cell becomes an element of the matrix, with a value of 0 or 1. A value of 0 indicates that the grid cell does not contain obstacles; a value of 1 indicates that the grid cell contains obstacles.

[0008] Step 1.2: Calculate the position coordinates of the raster map. The raster length is determined by both the actual map size and the raster scale. The position of the i-th raster in the coordinate system is determined by the coordinates of its center point (p...). i ,q i The path point can only move to the adjacent grid cell at a time.

[0009] Step 2, Static Path Planning Phase:

[0010] Step 2.1: Construct the objective function for path planning. Based on the coordinate transformation method and path point transfer method under the grid map, the objective function for the optimal path planning problem of multi-agent formation can be derived as L. * =min(L), L * It is the planned optimal path length. It is the path length in the nth iteration, and N is the number of grid cells traversed by the path; (p i-1 ,q i-1 ) and (p i ,q i ) are the coordinates of the path planning point at step i-1 and step i in this iteration, respectively.

[0011] Step 2.2: Establish a composite heuristic function. Taking into account both distance and angle, incorporate the angle factor, the distance between adjacent points, and the distance to the target point into the heuristic function to establish a composite heuristic function, enhancing the ants' ability to search for paths.

[0012] Step 2.3: Improve the ant colony algorithm's probability transition function. A dynamic pheromone-giving mechanism is proposed, utilizing the decreasing portion of a Gaussian function to reduce the total pheromone amount as the algorithm iterates, ensuring minimal pheromone contribution in later generations. In the early stages of iteration, a chaotic factor generated by a cubic mapping as a signal transmitter is introduced to guide ants to explore unknown spaces and enhance population diversity. An adaptively dynamically adjusted weighting factor is used in the state transition probability function, and a roulette wheel approach is employed to select the next path point.

[0013] A dynamic pheromone-giving mechanism is proposed, which dynamically changes the total pheromone amount Q of the ant colony with the number of iterations. In the later stages of iteration, the increase in pheromone concentration is slowed down, thereby avoiding the algorithm from falling into a cycle of suboptimal solutions due to difficulty in finding high-quality solutions. The specific details are as follows:

[0014]

[0015] In the formula, Q0, σ, and μ are constants; n is the current iteration number; σ = 35 and μ = 0 are taken so that Q decreases with the increase of the iteration number according to a normal distribution that conforms to the 3σ rule.

[0016] A chaos factor is introduced in the early stages of algorithm iteration, and a cubic mapping is used as the signal transmitter. Its expression is:

[0017] x(n+1) = 4x(n) 3 -3x(n); -1≤x(n)≤1; n=0,1,2… (2)

[0018] A chaos factor generated by the cubic mapping is added during pheromone updates, as follows:

[0019]

[0020]

[0021]

[0022] In the formula, ρ is the pheromone evaporation coefficient; n0 is the threshold for the chaos factor to participate in the iteration, ensuring the effective accumulation of pheromone concentration in the later stages of the algorithm; l k It is the set of all paths traversed by the ant colony after the i-th iteration; i,j∈l k This indicates that the ant traversed grids i and j in this iteration.

[0023] An adaptively dynamically adjusted weight factor is used in the state transition probability function, and the next path point is selected using a roulette wheel approach, as detailed below:

[0024]

[0025]

[0026] In the formula, α and β are the dynamic weighting factors of pheromone concentration and heuristic information, respectively, representing their importance in the state transition probability function; N is the total number of iterations; A, B, C, and D are constants used to adjust the dynamic amplitude of the two factors.

[0027] Therefore, the improved state transition probability function is:

[0028]

[0029] In the formula, τ is the probability that the k-th ant moves from grid i to grid j; ij (n) represents the pheromone concentration along the path from grid i to grid j; η ij (n) is the heuristic function; α and β are the pheromone concentration and the relative importance of the heuristic information, respectively; k allowed It is the set of grid cells that the ant can choose in the next step.

[0030] Step 2.4: Generate virtual waypoints. Based on the speed constraints of the virtual navigation agent, the path planning results output by the improved ant colony algorithm are used to establish a path-time coupling relationship, generating a series of virtual waypoints for formation tracking.

[0031] Step 3, Formation Formation Stage:

[0032] Step 3.1: Construct a multi-agent control model. Construct a second-order differential equation control model for multiple agents to describe the relationship between their positions and velocities, and combine this with formation information to give the formation control objective.

[0033] Step 3.2: Formation construction based on the consistency principle. A fully directed graph is used to describe the communication topology of the multi-agent formation, and a control law satisfying the convergence condition is designed based on the consistency principle.

[0034] Step 4, Dynamic Cooperative Collision Avoidance Phase:

[0035] Step 4.1: Construct the resultant potential function based on the swarm effect. After encountering an obstacle, the multi-agent formation will disband and avoid the obstacle individually, transforming into a multi-agent cluster to perform independent collision avoidance tasks. It is subject to repulsive forces from obstacles, repulsive forces from other agents within the cluster, attractive forces from the local replanning endpoint, and attractive forces from the average movement position of the cluster.

[0036] When an agent detects an obstacle within its obstacle avoidance range, it will be repelled. ib The details are as follows:

[0037]

[0038]

[0039]

[0040] In the formula, a1 and a2 are constants; and These are the position coordinates of agent i and obstacle b, respectively; d ib n is the distance between agent i and obstacle b; ib It is the unit direction vector from agent i to obstacle b.

[0041] When agent i detects the presence of other agents within the safe range of the cluster's movement, it will be subject to a repulsive effect. The potential function f, considering both agent cluster cooperation and inter-group collision avoidance, is... is It can be designed as follows:

[0042]

[0043]

[0044] In the formula, r v It is a unit vector in the agent's motion direction that comprehensively considers both the average motion direction and the average collision direction of the cluster; V i t and X represents the velocity vector and position coordinates of agent i at time t; t and These are the cluster average position coordinates and cluster average direction of motion of the multi-agent system at time t; λ1 is the average collision direction of the multi-agent system at time t; b1 is the weight value; k1 is the acceleration constant; k2, λ1, and λ2 are random variables that follow a uniform distribution in the range [0,1].

[0045] In addition, agent i is subject to the gravitational force f from the endpoint of the local replanning. ie for:

[0046]

[0047] In the formula, k1 is the acceleration constant; k3 is a random variable that follows a uniform distribution in the range [0,1], and X e These are the coordinates of the endpoint of the local replanning.

[0048] In summary, the net potential function of agent i during the cooperative collision avoidance process is:

[0049] f i =f is +f ib +f ie (15)

[0050] Step 4.2, Dynamics Constraint Correction. Considering the dynamic constraints experienced by the agent during actual movement, such as key dynamic characteristics like velocity and moment of inertia, the output command signal is corrected accordingly.

[0051] The present invention provides a multi-agent cooperative collision avoidance device based on swarm intelligence algorithm, comprising:

[0052] The map building module is used to establish a Cartesian coordinate system as the global static path planning coordinate system and to divide the static map into several small grids of equal size using a rasterization method. In order to reduce the collision problem between multi-agent formations and obstacles, obstacles are processed by dilation, and all grids covered by obstacles are set as unreachable areas.

[0053] The path planning module improves the ant colony algorithm based on a chaotic optimization factor, addressing the shortcomings of the classic ant colony algorithm in static path planning problems, such as poor convergence, susceptibility to local optima, and insufficiently smooth path planning. It ultimately outputs a path that successfully avoids known static obstacles and generates a series of virtual navigation points based on this path for formation control. Specifically, based on the coordinate transformation method and path point transfer method under the grid map, the objective function for the optimal path planning problem of multi-agent formation can be derived as L. * =min(L), L * It is the planned optimal path length. x is the path length in the m-th iteration, where M is the number of grid cells traversed by the path; i and y iThese are the x and y coordinates of the path planning point at step i in this iteration. A composite heuristic function is established by comprehensively considering both distance and angle factors, incorporating angle, distance between adjacent points, and distance to the target point into the heuristic function to enhance the ants' path-finding ability. A dynamic pheromone-giving mechanism is proposed, utilizing the decreasing part of the Gaussian function to reduce the total pheromone amount as the algorithm iterates, ensuring the lowest pheromone contribution in later generations. A chaotic factor generated by a cubic mapping as a signal transmitter is introduced in the early stages of the algorithm iteration to guide ants to explore unknown spaces and enhance population diversity. An adaptively dynamically adjusted weight factor is used in the state transition probability function, and a roulette wheel method is used to select the next path point. The improved ant colony algorithm output path planning results are coupled with the speed constraints of the virtual navigator agent to establish a path-time coupling relationship, generating a series of virtual navigator points for formation tracking.

[0054] The formation module is used for multi-agent systems to enter formation tracking mode, providing a description of the multi-agent motion model and formation, and designing the formation control law based on the consensus algorithm;

[0055] The cooperative collision avoidance module is used for multi-agent systems to enter cooperative collision avoidance mode, construct an unknown obstacle model, and design a dynamic collision avoidance algorithm using an autonomous collision avoidance method. This enables dynamic replanning of local paths for multiple agents, ensuring that agents can successfully avoid obstacles and that the formation task can continue to be executed after the collision avoidance is completed.

[0056] An electronic device according to the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the multi-agent formation cooperative collision avoidance method based on the above-described swarm intelligence algorithm.

[0057] A non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the multi-agent formation cooperative collision avoidance method based on swarm intelligence algorithm described above.

[0058] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0059] 1. This invention introduces the chaos factor into the ant colony algorithm and reasonably improves the algorithm according to the structure of the ant colony algorithm. It solves the shortcomings of the classic ant colony algorithm in static path planning problems, such as poor convergence, easy to fall into local optima and insufficient smoothness of the planned path. Moreover, the improved algorithm has significant advantages in planning problems of complex maps.

[0060] 2. This invention organically combines static global path planning and dynamic path replanning for multi-agent formations. By combining two classic swarm intelligence algorithms, it successfully solves the collision avoidance problem when multi-agent systems encounter known and unknown obstacles during movement, providing a new solution for the safety of multi-agent formations in performing tasks. Attached Figure Description

[0061] Figure 1 This is a flowchart of a method according to an embodiment of the present invention.

[0062] Figure 2 is a schematic diagram of a grid map according to an embodiment of the present invention. Figure 2a This is a grid map containing obstacles, according to an embodiment of the present invention. Figure 2b This is a schematic diagram of the grid position according to an embodiment of the present invention.

[0063] Figure 3 This is a multi-agent formation communication topology diagram according to an embodiment of the present invention.

[0064] Figure 4 is a comparison chart of 20-dimensional map static global planning path results according to an embodiment of the present invention. Figure 4a This is a comparison chart of the optimal paths output by the improved ant colony algorithm and the classic ant colony algorithm according to an embodiment of the present invention. Figure 4b This is a comparison chart showing the convergence of optimal path lengths output by an improved ant colony algorithm and a classic ant colony algorithm according to an embodiment of the present invention.

[0065] Figure 5 is a comparison chart of 40-dimensional map static global planning path results according to an embodiment of the present invention. Figure 5a This is a comparison chart of the optimal paths output by the improved ant colony algorithm and the classic ant colony algorithm according to an embodiment of the present invention. Figure 5b This is a comparison chart showing the convergence of optimal path lengths output by an improved ant colony algorithm and a classic ant colony algorithm according to an embodiment of the present invention.

[0066] Figure 6 is a comparison chart of 60-dimensional map static global planning path results according to an embodiment of the present invention. Figure 6a This is a comparison chart of the optimal paths output by the improved ant colony algorithm and the classic ant colony algorithm according to an embodiment of the present invention. Figure 6b This is a comparison chart showing the convergence of optimal path lengths output by an improved ant colony algorithm and a classic ant colony algorithm according to an embodiment of the present invention.

[0067] Figure 7 shows the multi-agent formation path tracking result of an embodiment of the present invention. Figure 7a This is a multi-agent formation path result diagram according to an embodiment of the present invention. Figure 7b This is a magnified view of a multi-agent formation path tracking method according to an embodiment of the present invention.

[0068] Figure 8 is a tracking control error diagram of a multi-agent formation system according to an embodiment of the present invention. Figure 8a This is a multi-agent formation position tracking error diagram according to an embodiment of the present invention. Figure 8b This is a multi-agent formation speed tracking error diagram according to an embodiment of the present invention.

[0069] Figure 9 This is a diagram showing the result of a multi-agent formation dynamic cooperative collision avoidance path according to an embodiment of the present invention.

[0070] Figure 10 This is a diagram showing the position difference between each intelligent agent and the center of the obstacle in one embodiment of the present invention. Detailed Implementation

[0071] This invention discloses a multi-agent cooperative collision avoidance method, apparatus, and electronic device based on a swarm intelligence algorithm. It establishes a grid map containing obstacle information and utilizes an improved ant colony algorithm based on chaos factors for static global path planning. Then, it generates a series of virtual waypoints according to the optimal path and designs a control law based on the consistency principle to effectively track these virtual waypoints, allowing the multi-agent formation to enter a line-following mode. When an agent's sensor detects an approaching unknown obstacle within its perception range, it feeds back the obstacle information to each agent, and the multi-agent formation immediately enters a cooperative collision avoidance mode. When the collision avoidance phase ends, after safely traversing the obstacle, each agent returns to the line-following mode to re-form the formation, thus achieving the three basic functions of static planning, formation construction, and dynamic traversal.

[0072] Swarm intelligence algorithms are probabilistic search algorithms, mainly including ant colony optimization, particle swarm optimization, and other natural computing methods inspired by biological groups, such as fish swarm optimization and hybrid frog jumping optimization. They are currently widely used to solve problems such as path pre-planning, autonomous swarm formation and task reconstruction, and collaborative decision-making in swarm intelligence. Combining different swarm intelligence algorithms according to their characteristics is beneficial for solving complex control and decision-making problems in multi-agent systems.

[0073] The present invention will now be described in further detail with reference to the accompanying drawings.

[0074] Figure 1 This is a flowchart illustrating a method according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:

[0075] Step 1 is the grid map construction stage, as shown in the grid map diagram in Figure 2. A Cartesian coordinate system is established as the global static path planning coordinate system, and the static map is divided into several small grids of equal size using a gridding method. To reduce collisions with obstacles during multi-agent formation movement, obstacles are inflated, and all grids covered by obstacles are set as unreachable areas.

[0076] Step 2 is the static path planning stage. Based on the chaos optimization factor, the ant colony algorithm is improved to overcome the shortcomings of the classic ant colony algorithm in static path planning problems, such as poor convergence, easy to fall into local optima and insufficient smoothness of the planned path. Finally, a path that successfully avoids static known obstacles is output, and a series of virtual navigation points are generated based on this path for formation control.

[0077] Step 3 is the formation stage, and the formation communication topology is as follows: Figure 3 The communication topology diagram is shown; the multi-agent system enters the formation tracking mode, and the multi-agent motion model description and formation description are given. The formation control law is designed based on the consistency principle.

[0078] Step 4 is the dynamic cooperative collision avoidance stage. The multi-agent system enters the cooperative collision avoidance mode, constructs an unknown obstacle model, and designs a dynamic collision avoidance algorithm using an autonomous collision avoidance method to realize dynamic replanning of local paths for multiple agents, ensuring that agents can successfully avoid obstacles and that the formation task can continue to be executed after the collision avoidance is completed.

[0079] Specifically, step 1, the raster map construction stage, includes:

[0080] Step 1.1: Transform obstacle information: Inflate obstacles by setting all grid cells covered by obstacles as unreachable areas. Transform obstacle information in the map by giving logical values ​​to each grid cell and convert the grid map into a matrix. Each small grid cell becomes an element of the matrix, with a value of 0 or 1. If it is 0, it means that the grid cell space does not contain obstacles; if it is 1, it means that the grid cell space contains obstacles.

[0081] Step 1.2: Calculate the position coordinates of the raster map: The raster length is determined by both the actual map size and the raster scale. The position of the i-th raster in the coordinate system is determined by the coordinates of its center point (p...). i ,q i This can be represented by ), and the path point can only move to the adjacent grid cell at a time. Specifically, it can be represented as:

[0082]

[0083] In the formula, num is the number of grid cells in each row of the raster map; a represents the grid length, which is determined by the actual map size and the grid scale; mod(f) is the modulo operation; ceil(f) is the smallest integer not less than f.

[0084] Specifically, step 2, the static path planning stage, includes:

[0085] Step 2.1: Construct the objective function for path planning. Based on the coordinate transformation method and path point transfer method under the grid map, the objective function for the optimal path planning problem of multi-agent formation can be derived as L. * =min(L), L * It is the planned optimal path length. It is the path length in the nth iteration, and N is the number of grid cells traversed by the path; (p i-1 ,q i-1 ) and (p i ,q i ) are the coordinates of the path planning point at step i-1 and step i in this iteration, respectively.

[0086] Step 2.2: Establish a composite heuristic function. Taking into account both distance and angle, incorporate the angle factor, the distance between adjacent points, and the distance to the target point into the heuristic function to establish a composite heuristic function, enhancing the ants' ability to search for paths.

[0087] Define the distance factor U in the heuristic function as:

[0088] U = U i ·U E (17)

[0089] in,

[0090]

[0091]

[0092] In the formula, (p i+1 ,q i+1 (p) represents the ant's position coordinates at the next path point to be chosen; e ,q e ) represents the coordinates of the endpoint of the ant path planning.

[0093] When an ant chooses its next point, it should move as close to the endpoint as possible in that direction. At this point, there is an angle θ between the ant's direction of movement and the direction pointing from that point to the endpoint, which can be represented as:

[0094]

[0095] In the formula, It is the direction vector from the path point to the destination. It is the direction vector from the path point to the path point to be selected.

[0096] During the selection of waypoints, the smaller the θ value, the more likely the ants will move towards the target location when selecting the next node. However, fully incorporating the angle factor in the early stages of path planning will interfere with the ants' initial search of the grid space, hindering them from searching for more possible paths and making it difficult for the ant colony to find the globally optimal path. Therefore, an angle coefficient φ is introduced here.

[0097]

[0098] In the formula, φ0 is a constant, representing the initial value of the included angle coefficient; p i is the x-coordinate of the ant at that path point; num is the number of grid cells in each row of the raster map.

[0099] The included angle factor W can then be defined as:

[0100]

[0101] Therefore, an improved composite heuristic function can be obtained.

[0102] η ij (n)=W·U (23)

[0103] Step 2.3: Improve the ant colony algorithm's probability transition function. A dynamic pheromone-giving mechanism is proposed, utilizing the decreasing portion of a Gaussian function to reduce the total pheromone amount as the algorithm iterates, ensuring the lowest pheromone contribution in later generations. In the early stages of the algorithm iteration, a chaotic factor generated by a cubic mapping as a signal transmitter is introduced to guide ants to explore unknown spaces and enhance population diversity. An adaptively dynamically adjusted weight factor is used in the state transition probability function, and a roulette wheel approach is employed to select the next path point.

[0104] A dynamic pheromone-giving mechanism is proposed, which dynamically changes the total pheromone amount Q of the ant colony with the number of iterations. In the later stages of iteration, the increase in pheromone concentration is slowed down, thereby avoiding the algorithm from falling into a cycle of suboptimal solutions due to difficulty in finding high-quality solutions. The specific details are as follows:

[0105]

[0106] In the formula, Q0, σ, and μ are constants; n is the current iteration number; σ = 35 and μ = 0 are chosen so that Q decreases according to a normal distribution conforming to the 3σ rule as the number of iterations increases. By utilizing the decreasing part of the Gaussian function, the pheromone increment decreases as the number of algorithm iterations increases, and the contribution of pheromones in later generations is minimized, allowing the ant colony algorithm to still have search capabilities in the later stages of iteration.

[0107] In each iteration, all ants in the population select the next grid cell based on the state transition probability function until they reach the target point. After each iteration, the pheromones need to be dynamically updated based on the ant colony's crawling path. Besides considering the volatilization and enhancement effects during the pheromone update process, a chaos factor is introduced in the early stages of the algorithm iteration to guide the ants to explore unknown spaces, enhance population diversity, and improve global optimization capabilities. A cubic mapping is used as the signal transmitter, and its expression is:

[0108] x(n+1) = 4x(n) 3 -3x(n); -1≤x(n)≤1; n=0,1,2… (2)

[0109] Therefore, the pheromone update formula after adding the chaos factor generated by the cubic mapping is as follows:

[0110]

[0111]

[0112]

[0113] In the formula, ρ is the pheromone evaporation coefficient; n0 is the threshold for the chaos factor to participate in the iteration, ensuring the effective accumulation of pheromone concentration in the later stages of the algorithm; l k It is the set of all paths traversed by the ant colony after the i-th iteration; i,j∈l k This indicates that the ant traversed grids i and j in this iteration.

[0114] An adaptively dynamically adjusted weight factor is used in the state transition probability function, and the next path point is selected using a roulette wheel approach, as detailed below:

[0115]

[0116]

[0117] In the formula, α and β are the dynamic weighting factors of pheromone concentration and heuristic information, respectively, representing their importance in the state transition probability function; N is the total number of iterations; A, B, C, and D are constants used to adjust the dynamic amplitude of the two factors.

[0118] Therefore, the improved state transition probability function is:

[0119]

[0120] In the formula, τ is the probability that the k-th ant moves from grid i to grid j; ij (n) represents the pheromone concentration along the path from grid i to grid j; η ij(n) is the heuristic function; α and β are the pheromone concentration and the relative importance of the heuristic information, respectively; k allowed It is the set of grid cells that the ant can choose in the next step.

[0121] Step 2.4: Generate virtual waypoints. Based on the speed constraints of the virtual navigation agent, the path planning results output by the improved ant colony algorithm are used to establish a path-time coupling relationship, generating a series of virtual waypoints for formation tracking.

[0122] Specifically, step 3, the formation stage, includes:

[0123] Step 3.1: Construct a multi-agent formation control model: Construct a second-order differential equation control model to describe the relationship between the position and velocity of each agent in the multi-agent formation, and give the multi-agent formation control objective in combination with the formation information;

[0124] In a multi-agent formation, the state of the i-th agent is determined by its center of gravity position (x, y) in the inertial coordinate system. i ,y i and yaw angle Let V represent the state of motion, which is determined by its online velocity V. ui and angular velocity r i To represent it, its kinematic model can be expressed as:

[0125]

[0126] In the control problem of multi-agent formations, each agent maintains its course through command signals from speed maintainers and yaw angle maintainers.

[0127]

[0128] In the formula, It is a command signal; yaw angle The following geometric relationship exists with the velocity components:

[0129]

[0130] Therefore, the second-order differential equation control model of the intelligent agent can be described as:

[0131]

[0132] In the formula, It is a speed command signal, τ x and τ y It is a constant, and each variable needs to meet performance constraints.

[0133] In multi-agent formation, the positional relationships between agents can be represented by the relative position matrix R.x and R y The details are as follows.

[0134]

[0135] In the formula, (xij, yij) is the relative position difference between agent i and agent j, and x ii =y ii =0.

[0136] Therefore, when a multi-agent formation reaches a stable state, the following control objectives must be met:

[0137]

[0138] Step 3.2, Formation construction based on the consistency principle: The communication topology of the multi-agent formation is described using a fully directed graph, and a control law that satisfies the convergence condition is designed based on the consistency principle.

[0139] Adjacency matrix A can be used n To describe the communication topology between agents in a multi-agent formation, when two agents can communicate with each other, a ij =1 (i≠j), otherwise, a ij =0. Define the communication topology of a multi-agent formation consisting of n agents as G. n The Laplace matrix L that makes up its structure can be given. n element l ij for:

[0140]

[0141] -L can be calculated n It has one zero eigenvalue and n-1 non-zero eigenvalues, with the non-zero eigenvalues ​​taking the value -n.

[0142] Assuming that the communication topology between the agents remains consistent during the movement, the control law for multi-agent formation can be given based on the consistency principle as follows:

[0143]

[0144] In the formula, It is a speed command signal; a ij Used to describe the communication relationships between the various submarines; (x ij ,y ij ) is the relative position difference between unmanned surface vessel i and unmanned surface vessel j; α is the gain constant, which affects whether the consistency control law can converge.

[0145] The convergence condition is: if G nIt contains a cluster of directed spanning trees, and Then the state of the formation system can gradually reach uniformity. Where -L n If all non-zero eigenvalues ​​are negative, then

[0146] Therefore, the convergence condition of the uniformity control law is:

[0147] α>0 (32)

[0148] Specifically, step 4, the dynamic cooperative collision avoidance phase, includes:

[0149] Step 4.1: Construct the resultant potential function based on the swarm effect. After encountering an obstacle, the multi-agent formation will disband and avoid the obstacle individually, transforming into a multi-agent cluster to perform independent collision avoidance tasks. It is subject to repulsive forces from obstacles, repulsive forces from other agents within the cluster, attractive forces from the local replanning endpoint, and attractive forces from the average movement position of the cluster.

[0150] Given the agent's safe distance R s The obstacle avoidance reaction range of an intelligent agent is defined as a circle centered on its center of mass, 3R. s A circle with radius f is a repulsive force when an agent detects an obstacle within its radius. ib The details are as follows:

[0151]

[0152]

[0153]

[0154] In the formula, a1 and a2 are constants; and These are the position coordinates of agent i and obstacle b, respectively; d ib n is the distance between agent i and obstacle b; ib It is the unit direction vector from agent i to obstacle b.

[0155] Using the average location coordinate X of the cluster t and the average direction of movement of the cluster The state of the agent cluster at time t is described as follows:

[0156]

[0157]

[0158] In the formula, n is the number of agents; These are the position coordinates of agent i at time t; It is the yaw angle of agent i at time t.

[0159] The safe zone for multi-agent swarm movement is defined as a circle centered on its centroid, 2R. s A circle with radius [radius] will repel other agents when they appear within this circle. Therefore, the average collision direction of the cluster can be defined. This is used to represent the average of the current movement directions of all agents within the safe range of the current agent's movement, as follows:

[0160]

[0161] In the formula, N is the number of agents within the current agent's safe movement range; These are the current position coordinates of the agent; It is the position coordinate of the j-th intelligent agent located within the safe movement range of this intelligent agent.

[0162] Therefore, considering both agent swarm collaboration and inter-swarm collision avoidance, the potential function f is It can be designed as follows:

[0163]

[0164]

[0165] In the formula, r v It is a unit vector in the agent's motion direction that comprehensively considers both the average motion direction and the average collision direction of the cluster; V i t and λ1 is the velocity vector and position coordinates of agent i at this moment; b1 is the weight value; k1 is the acceleration constant; k2, λ1, λ2 are random variables that follow a uniform distribution in the range [0,1].

[0166] In addition, during the collision avoidance process, each agent still needs to consider the local task endpoint X. e That is, the endpoint of the local replanning at this moment is the target attitude adjustment motion, during which it is subjected to a gravitational force f from the endpoint of the local replanning. ie for:

[0167]

[0168] In the formula, k1 is the acceleration constant; k3 is a random variable that follows a uniform distribution in the range [0,1].

[0169] In summary, the net force acting on agent i during the cooperative collision avoidance process is:

[0170] f i =fis +f ib +f ie (15)

[0171] Therefore, the expected velocity vector V of agent i at the next moment i t+1 and position coordinates It can be represented as:

[0172] V i t+1 =f i (36)

[0173]

[0174] In the formula, T is the time step of the agent's movement in the algorithm.

[0175] Step 4.2, Dynamics Constraint Correction. Considering the dynamic constraints experienced by the agent during actual motion, such as key dynamic characteristics like velocity and moment of inertia, the output command signal is corrected accordingly. Specifically, velocity characteristics can be characterized by the upper limit of the agent's velocity variation range, representing the constraint imposed by the agent's own inertia on its velocity changes; rotational characteristics can be characterized by the upper limit of the agent's angular velocity variation range, representing the constraint imposed by the agent's own inertia on its angular velocity changes.

[0176] This invention proposes a multi-agent formation cooperative collision avoidance method and apparatus based on swarm intelligence algorithm, which can be used to realize multi-agent formation cooperative collision avoidance control and solve the path planning, formation control and collision avoidance decision problems of multi-agent formations.

[0177] 1. This invention introduces the chaos factor into the ant colony algorithm and reasonably improves the algorithm according to the structure of the ant colony algorithm. It solves the shortcomings of the classic ant colony algorithm in static path planning problems, such as poor convergence, easy to fall into local optima and insufficient smoothness of the planned path. Moreover, the improved algorithm has significant advantages in planning problems of complex maps.

[0178] 2. This invention organically combines static global path planning and dynamic path replanning for multi-agent formations, successfully solving the collision avoidance problem when multi-agent systems encounter known and unknown obstacles during movement, and providing a new solution for the safety of multi-agent formations in performing tasks.

[0179] This invention was verified on MATLAB R2018B software, using a centralized formation of 5 agents as the experimental object.

[0180] The verification results of this invention are shown in Figures 4, 5, 6, 7, and 8. Figure 9 , Figure 10As shown in Figures 4, 5, and 6, it can be seen that in a 20-dimensional grid environment, although the improved ant colony algorithm provided by this invention outputs slightly different path results from the classic ant colony algorithm, the final convergence result is the same. This indicates that for 20-dimensional grid maps, both the improved ant colony algorithm and the classic ant colony algorithm can quickly find the shortest path, but the improved ant colony algorithm converges faster, has fewer turning points in the path, and has higher path smoothness. In a 40-dimensional grid environment, the optimal path found by the improved ant colony algorithm is significantly better than that of the classic ant colony algorithm. The improved ant colony algorithm can converge to a better path result faster, and the path has no inconsistencies. The necessary turning points demonstrate that the addition of the angle factor makes the ant colony's optimization more purposeful. The chaotic optimization factor prompts the ant colony to escape local optima, thus enabling the improved ant colony algorithm to converge to the global optimum more quickly. In a 60-dimensional grid environment, as the map dimension increases, the classic ant colony algorithm can no longer meet the planning requirements with a limited ant colony size. Many unnecessary turns appear in the path, indicating that the classic ant colony algorithm has fallen into local optima and cannot find the globally optimal path. Furthermore, the convergence speed of the classic ant colony algorithm lags far behind that of the improved ant colony algorithm, while the improved ant colony algorithm still reaches the convergence condition quickly. Analysis of algorithm runtime shows that, with the same ant colony size, the runtime of both algorithms gradually increases with the increase of map dimension. However, the improved ant colony algorithm still has a better solution speed, with a shorter runtime than the classic ant colony algorithm. Simulation results show that the improved ant colony algorithm can find the optimal path better, and with the increase of grid map dimension, the improved ant colony algorithm has a more significant advantage for large-scale searches on complex maps. As can be seen from Figures 7 and 8, the multi-agent formation consisting of five agents forms the desired formation configuration and maintains it while tracking the virtual waypoint. Furthermore, the formation achieves the consistency control objective: convergence to the formation distance in terms of position error and convergence to zero in terms of velocity error. Figure 9 and Figure 10 It can be seen that when the multi-agent formation detects an obstacle, it will de-formation and gradually approach the collision avoidance endpoint under multiple constraints of cooperative motion, inter-group collision avoidance, and obstacle collision avoidance. After leaving the collision avoidance endpoint, it will quickly reconstruct the formation. Throughout the collision avoidance process, the agents always maintain an absolutely safe distance from the obstacle, with a minimum distance of 200m from the center of the obstacle, which meets the safety distance requirement.

[0181] In summary, the method of this invention has significant advantages in path planning problems on complex maps. It improves upon the shortcomings of the classic ant colony algorithm in static path planning problems, such as poor convergence, susceptibility to local optima, and insufficient smoothness of planned paths. The proposed cooperative collision avoidance method is effective for the dynamic cooperative collision avoidance problem of multi-agent formations, ensuring the desired system stability and asymptotic tracking performance. This invention is of great significance for the reliable control of multi-agent formations and the safe completion of tasks.