1. Introduction
Inspired by the collective behavior of biological swarms, multi-agent systems (MAS), composed of multiple autonomous agents, have emerged as a pivotal technology for solving complex engineering problems [1]. Leveraging their inherent advantages in robustness, scalability, and task efficiency, multi-agent swarms demonstrate significant application potential in domains such as automated warehousing [2, 3], large-scale environmental monitoring [4, 5], and search and rescue [6, 7]. Consequently, the effective control of a swarm to accomplish complex formation shaping and collision avoidance tasks constitutes a central challenge in this field.
Currently, research in multi-agent formation control is primarily categorized into two major paradigms: target assignment-based methods and target-assignment-free self-organization. Target assignment-based methods [8, 9, 10] first assign explicit positions within the formation to each agent and then plan their respective paths. However, these approaches, particularly centralized strategies, suffer from high computational complexity and limited robustness, rendering them ill-suited for large-scale and dynamic scenarios [11, 12]. To address these limitations, target-assignment-free self-organization methods have emerged. Among these, a particularly promising direction, and the primary focus of this paper, is distributed formation control based on "shape discrete layers" [13]. This approach constructs a potential field that encodes the desired shape information, guiding agents to form up autonomously without explicit target assignments, thereby significantly enhancing the system's scalability and adaptability. However, similar to the traditional Artificial Potential Field (APF) method [14, 15], this approach is still susceptible to the risk of becoming trapped in local minima, failing to guarantee global path reachability in complex obstacle-laden environments.
To address this critical challenge, the shape discrete layer control framework was integrated with the A Star (A*) global pathfinding algorithm [16, 17], proposing a hybrid framework for distributed self-organizing formation control guided by a global path. The advantages of this hierarchical, decoupled strategy are significant. In a preprocessing step, the A* algorithm plans an optimal and safe global route. Subsequently, during the execution phase, the shape discrete layer controller guides the swarm to self-organize around this reference path while performing dynamic collision avoidance. The introduction of the A* algorithm fundamentally overcomes the propensity of purely self-organizing methods to become trapped in complex environments, thereby guaranteeing task reachability while fully preserving the advantages of distributed control in local dynamic obstacle avoidance and system robustness.
This paper is organized as follows: Section II provides a mathematical model and formal description of the multi-agent formation control problem. Section III elaborates on the proposed global path-guided distributed self-organizing formation control method, including the construction of the A* global path planner and the design of the shape discrete layer controller. In Section IV, a series of MATLAB simulation experiments are conducted to demonstrate and analyze the performance of the proposed method. Finally, Section V summarizes the work of the entire paper and points out potential directions for future research.
2. Problem statement
This paper studies the formation control problem for a swarm
3. Methods
3.1. Constructing the discrete layers of the formation shape
To determine the location of the formation, discrete layers of the formation shape are constructed within the formation environment. The agents can utilize the information from these discrete layers to determine the formation's position, and this information is also used in the subsequent calculation of the agents' velocities. In this paper, to better guide the agents into the black-colored area representing the formation shape, a grayscale iteration method is used to expand the influence of the central black area outwards. The iterative algorithm is designed as follows:
In the formula,
After the operation of the equation above, the influence range of the formation shape is expanded. In a formation task, after the final formation shape is achieved, the ideal scenario is that
From which we derive:
From the second equation, it can be seen that for a given collision avoidance radius
The actual simulation map area is generally larger than the area of the formation shape with its additional grid radius,
It is worth noting that in general formation design, it is often required that the number of target cells is the same as the number of agents participating in the formation, i.e.,
3.2. Dynamic negotiation
Within the framework for multi-agent formation control, a critical challenge is enabling the swarm to establish a common spatial reference, particularly in dynamic environments with obstacles. The system addresses this by employing a dynamic consensus protocol, a distributed method that allows all agents to collaboratively agree upon the geometric center of a target formation,
The foundation of this protocol is the mathematical representation of the inter-agent communication network as an undirected graph,
The degree matrix of graph G is:
Therefore, the Laplacian matrix of graph G is:
Expressed in matrix form as:
Next, the discussion will proceed in a discrete-time framework. In the k-th negotiation step, the state of agent i, representing its estimate of the formation's center, is denoted by
A consensus on the formation's center is considered to be reached when the following condition is met for all agents:
In this equation, kmaxrepresents the maximum number of negotiation iterations. The state of a single agent i at the next time step is given by:
where ε is the step size for each negotiation, and dmax is the maximum degree of the graph. The consensus protocol ui(k) can be expressed as:
This can be written in matrix form for the entire system as:
where
Thus, the position of the formation center at the next time step is given by:
According to the consensus algorithm, through continuous interaction with neighboring agents, it is achieved that:
3.3. Motion control law design
To achieve efficient, safe, and collision-free formation shaping in complex dynamic environments, the core of this research lies in designing a fully distributed motion control law for each agent. This strategy discards the complex centralized target assignment process found in traditional methods, endowing the system with greater robustness and scalability. The instantaneous velocity of each agent,
First, the formation entry control law,
In this expression, the fractional part is a normalized unit vector that provides only the direction from the agent's current position, , allowing it to enter at a high speed. As it enters the formation's "grayscale" zone of influence,
Second, to address the issue of edge congestion after agents enter the formation area and to achieve effective filling of the interior, we have designed the formation exploration control law,
This is equivalent to leaving a "pheromone" in the environment, making the area less attractive to other agents. Subsequently, the agent calculates its exploration velocity according to the formula
The essence of which is to compute a resultant vector pointing towards surrounding "potential wells" (i.e., unoccupied darker regions). Notably, the factor
Finally, throughout the entire motion process, ensuring system safety and avoiding collisions is the highest priority task, which is handled by the collision avoidance control law,
which generates a repulsive vector at detected collision points,
In summary, the agent's final motion control law is obtained through the simple vector summation
These three components function dynamically and cooperatively: at a distance,
3.4. Global path planning
When a multi-agent system executes formation tasks, in addition to relying on the aforementioned distributed motion control laws for local collision avoidance and formation keeping, a global path is also required to guide the entire formation from a starting point to a target area. To generate an optimal or near-optimal collision-free trajectory in an environment containing complex obstacles, this research adopts the A* algorithm as the foundation for global path planning. The environment for this algorithm is discretized into an
In this formula,
where
Only if this tentative score is less than the previously recorded g-score for
4. Simulation
4.1. Simulation setup
To validate the effectiveness of the proposed global path-guided distributed self-organizing formation control framework, a series of simulation experiments were conducted using the MATLAB platform.
The experimental environment is set up as a 50m
Within this environment, the global path planning phase is executed first. The task for the A* algorithm is to compute an optimal global path from the start point (10, 10) to the goal point (40, 40), taking the aforementioned point-obstacles into account. This generated path does not contain complex dynamic information but serves as a macroscopic navigational reference, providing clear direction and guidance for the agent swarm in the subsequent phase.
In the multi-agent distributed control simulation phase, a swarm of 30 independent agents is initialized near the starting area of the global path. Their core task is to collaboratively track this pre-set global path while, at a local level, performing collision avoidance, maintaining safe distances, and dynamically adjusting relative positions through mutual communication and sensing. Ultimately, the swarm is required to successfully self-organize into a predefined 'snowflake' geometric configuration upon reaching the path's end region. This serves to demonstrate the effectiveness and robustness of the entire hierarchical control framework in guiding large-scale group movement, maintaining formation, and completing complex tasks.
4.2. A global path planning
The first step of the framework is to generate a global reference path using the A* algorithm. The environment contains a set of pre-defined, static point-obstacles that the path must navigate around. As depicted in Figure 2, the A* algorithm's task is to compute an optimal path from the start point (green dot) at (10, 10) to the goal point (red dot) at (40, 40). During its search, the algorithm treats the grid cells occupied by the obstacles (black squares) as non-traversable. The resulting path, shown by the blue curve, is a smoothed trajectory that successfully weaves through the obstacle field. This path provides a globally optimal and safe reference trajectory for the subsequent multi-agent formation tracking task.
4.3. Multi-agent formation tracking and collision avoidance
Once the global reference path was generated, the simulation proceeded to validate the self-organizing formation and path-tracking capabilities of the multi-agent swarm. Figure 3 illustrates the complete trajectories for this process. As depicted, the swarm, consisting of 30 agents, begins in the starting region and follows the A*-generated path as a macroscopic guide. The overall trajectory of the swarm aligns closely with this reference path. Throughout the process, each agent, distinguished by a unique trajectory color, leverages its distributed local controller. This allows each agent not only to maintain a safe distance from its neighbors to prevent internal collisions but also to preserve the overall cohesion of the swarm, enabling the collective to successfully navigate around all static obstacles (red squares). Ultimately, the swarm successfully converges into the desired "snowflake" formation upon arriving at the target region.
To quantitatively evaluate the performance of the proposed framework, Figure 4 presents the time-evolution of three key performance metrics: coverage rate, entering rate, and formation uniformity. As shown in the figure, both the entering rate and the coverage rate remain near zero for approximately the first 6 seconds, corresponding to the swarm's transit phase toward the target area. Subsequently, both metrics exhibit a rapid increase between t=6s and t=10s, reaching a stable value of 1, which indicates that all agents efficiently entered the target region and fully formed the 'snowflake' configuration within a 4-second window. Concurrently, the uniformity metric, which measures the spatial distribution of the agents (with lower values indicating higher uniformity), shows significant fluctuations during the initial transit and formation phases. However, after t=10s, as the formation stabilizes, the uniformity value sharply decreases and converges to a low, stable value, confirming the high quality and stability of the final configuration.
These simulation results clearly demonstrate the effectiveness of the proposed hybrid framework: the A* algorithm successfully addresses the challenges of global navigation and static obstacle avoidance in complex environments, while the distributed self-organizing controller ensures the swarm's local formation stability and dynamic collision avoidance capabilities during the execution of the global task.
5. Conclusion
This paper presents a hierarchical control framework for multi-agent systems that successfully integrates a "shape discrete layer" method for distributed self-organization with the A* algorithm for global path planning. This hybrid approach is designed to overcome a primary limitation of purely self-organizing methods: the risk of becoming trapped in local minima in complex, obstacle-laden environments. The primary contribution lies in the synergistic combination of these two techniques. The A* algorithm provides a guaranteed, globally reachable path, fundamentally solving the local minima issue, while the shape discrete layer controller preserves the key advantages of distributed systems, such as high scalability and robustness, by managing local formation shaping and dynamic collision avoidance.
The effectiveness of this framework was validated through a series of simulation experiments conducted in MATLAB. The results demonstrate that the swarm can accurately follow the globally planned path, effectively navigate complex static obstacle fields, and successfully self-organize into the predefined "snowflake" formation upon reaching the target destination. This confirms the successful synergy between the global planner and the local distributed controller.
While this research has achieved its primary objectives, several promising directions for future work remain. The current framework is validated in an environment with static obstacles; future efforts could focus on extending the model to handle dynamic or unknown environments, potentially by integrating a real-time replanning mechanism. Furthermore, expanding the control model from its current two-dimensional space to three-dimensional space would significantly broaden its applicability to more complex, real-world scenarios such as aerial swarm formations or underwater exploration. Finally, to bridge the gap between simulation and reality, a crucial next step will be to implement the proposed framework on a physical multi-robot platform, which would provide ultimate validation of the algorithm's effectiveness and robustness against real-world uncertainties like sensor noise, communication constraints, and actuation errors.
References
[1]. Brambilla, Manuele, et al. "Swarm robotics: a review from the swarm engineering perspective." Swarm Intelligence 7.1 (2013): 1-41.
[2]. Wurman, Peter R., Raffaello D'Andrea, and Mick Mountz. "Coordinating hundreds of cooperative, autonomous vehicles in warehouses." AI magazine 29.1 (2008): 9-9.
[3]. D'Andrea, Raffaello. "Guest editorial: A revolution in the warehouse: A retrospective on kiva systems and the grand challenges ahead." IEEE Transactions on Automation Science and Engineering 9.4 (2012): 638-639.
[4]. Schranz, Melanie, et al. "Swarm robotic behaviors and current applications." Frontiers in Robotics and AI 7 (2020): 36.
[5]. Vásárhelyi, Gábor, et al. "Optimized flocking of autonomous drones in confined environments." Science Robotics 3.20 (2018): eaat3536.
[6]. Nagatani, Keiji, et al. "Emergency response to the nuclear accident at the Fukushima Daiichi Nuclear Power Plants using mobile rescue robots." Journal of Field Robotics 30.1 (2013): 44-63.
[7]. Topal, Sebahattin. Multi-robot coordination control methodology for search and rescue operations. Diss. Middle East Technical University (Turkey), 2011.
[8]. Kuhn, Harold W. "The Hungarian method for the assignment problem." Naval research logistics quarterly 2.1‐2 (1955): 83-97.
[9]. Bertsekas, Dimitri P. "The auction algorithm for assignment and other network flow problems: A tutorial." Interfaces 20.4 (1990): 133-149.
[10]. Gerkey, Brian P., and Maja J. Matarić. "A formal analysis and taxonomy of task allocation in multi-robot systems." The International journal of robotics research 23.9 (2004): 939-954.
[11]. Kant, Kamal, and Steven W. Zucker. "Toward efficient trajectory planning: The path-velocity decomposition." The international journal of robotics research 5.3 (1986): 72-89.
[12]. Parker, Lynne E. "ALLIANCE: An architecture for fault tolerant multirobot cooperation." IEEE transactions on robotics and automation 14.2 (2002): 220-240.
[13]. Pan, Yun-wei, et al. "Multi-Agent Formation Control Based on Discrete Layers of Formation Shapes." Computer Science, 4 Nov. 2024.
[14]. Khatib, Oussama. "Real-time obstacle avoidance for manipulators and mobile robots." The international journal of robotics research 5.1 (1986): 90-98.
[15]. Zheng, Li, et al. "Particle swarm algorithm path-planning method for mobile robots based on artificial potential fields." Sensors 23.13 (2023): 6082.
[16]. Liu, Yanjie, et al. "Mobile robot path planning based on kinematically constrained A-star algorithm and DWA fusion algorithm." Mathematics 11.21 (2023): 4552.
[17]. Zeng, Wei, and Richard L. Church. "Finding shortest paths on real road networks: the case for A." International journal of geographical information science 23.4 (2009): 531-543.
Cite this article
Xiang,K. (2025). Distributed Shape Discrete Layers Based Formation Control and Global Path Planning for Multi-Agent Systems. Applied and Computational Engineering,179,95-106.
Data availability
The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.
Disclaimer/Publisher's Note
The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of EWA Publishing and/or the editor(s). EWA Publishing and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
About volume
Volume title: Proceedings of CONF-MLA 2025 Symposium: Intelligent Systems and Automation: AI Models, IoT, and Robotic Algorithms
© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and
conditions of the Creative Commons Attribution (CC BY) license. Authors who
publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons
Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this
series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published
version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial
publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and
during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See
Open access policy for details).
References
[1]. Brambilla, Manuele, et al. "Swarm robotics: a review from the swarm engineering perspective." Swarm Intelligence 7.1 (2013): 1-41.
[2]. Wurman, Peter R., Raffaello D'Andrea, and Mick Mountz. "Coordinating hundreds of cooperative, autonomous vehicles in warehouses." AI magazine 29.1 (2008): 9-9.
[3]. D'Andrea, Raffaello. "Guest editorial: A revolution in the warehouse: A retrospective on kiva systems and the grand challenges ahead." IEEE Transactions on Automation Science and Engineering 9.4 (2012): 638-639.
[4]. Schranz, Melanie, et al. "Swarm robotic behaviors and current applications." Frontiers in Robotics and AI 7 (2020): 36.
[5]. Vásárhelyi, Gábor, et al. "Optimized flocking of autonomous drones in confined environments." Science Robotics 3.20 (2018): eaat3536.
[6]. Nagatani, Keiji, et al. "Emergency response to the nuclear accident at the Fukushima Daiichi Nuclear Power Plants using mobile rescue robots." Journal of Field Robotics 30.1 (2013): 44-63.
[7]. Topal, Sebahattin. Multi-robot coordination control methodology for search and rescue operations. Diss. Middle East Technical University (Turkey), 2011.
[8]. Kuhn, Harold W. "The Hungarian method for the assignment problem." Naval research logistics quarterly 2.1‐2 (1955): 83-97.
[9]. Bertsekas, Dimitri P. "The auction algorithm for assignment and other network flow problems: A tutorial." Interfaces 20.4 (1990): 133-149.
[10]. Gerkey, Brian P., and Maja J. Matarić. "A formal analysis and taxonomy of task allocation in multi-robot systems." The International journal of robotics research 23.9 (2004): 939-954.
[11]. Kant, Kamal, and Steven W. Zucker. "Toward efficient trajectory planning: The path-velocity decomposition." The international journal of robotics research 5.3 (1986): 72-89.
[12]. Parker, Lynne E. "ALLIANCE: An architecture for fault tolerant multirobot cooperation." IEEE transactions on robotics and automation 14.2 (2002): 220-240.
[13]. Pan, Yun-wei, et al. "Multi-Agent Formation Control Based on Discrete Layers of Formation Shapes." Computer Science, 4 Nov. 2024.
[14]. Khatib, Oussama. "Real-time obstacle avoidance for manipulators and mobile robots." The international journal of robotics research 5.1 (1986): 90-98.
[15]. Zheng, Li, et al. "Particle swarm algorithm path-planning method for mobile robots based on artificial potential fields." Sensors 23.13 (2023): 6082.
[16]. Liu, Yanjie, et al. "Mobile robot path planning based on kinematically constrained A-star algorithm and DWA fusion algorithm." Mathematics 11.21 (2023): 4552.
[17]. Zeng, Wei, and Richard L. Church. "Finding shortest paths on real road networks: the case for A." International journal of geographical information science 23.4 (2009): 531-543.