If this work is helpful for your research, please consider citing the following BibTeX entry.
@article{xie2023consensus,
title={Consensus enhancement for multi-agent systems with rotating-segmentation perception},
author={Xie, Guangqiang and Xu, Haoran and Li, Yang and Hu, Xianbiao and Wang, Chang-Dong},
journal={Applied Intelligence},
volume={53},
number={5},
pages={5750--5765},
year={2023},
publisher={Springer}
}
- Python 3.5 (or higher)
- NumPy
- Matplotlib
In the MAS with dynamic topology, each agent has a limited sensing range and only interacts with its perceived neighbors within the sensing range, so as to carry out convergence evolution. The state of each agent can be described as encompassing position, speed, opinion value, etc. Then, the MAS’s network topology will dynamically change according to the state change of the agent during the convergence evolution.
In this paper, we follow a simple rationale that there must be redundancy in the communication of the MAS, which calls for an effective consensus protocol with neighbor selection strategies to enhance consensus of the MAS. Specifically, this paper proposes a new distributed consensus framework based on two neighbor selection strategies, where each agent evolves by only referencing the state of some representative neighbors. The main contributions of this paper are summarized as:
- We provide a novel Representative Selection with Rotating-Segmentation Perception (RSRSP) strategy to select representative neighbors in each sector of perception-based communication region. Specifically, the communication region is segmented into several sectors with optimal rotation angle, then agents select the nearest neighbor in each sector for convergence evolution.
- We design a distributed switching strategy to switch from RSRSP to SAN when the system is fully connected. Specifically, agents adopt RSRSP for the convergence evolution before the system is fully connected. Once the communication topology reaches full connectivity, all agents will switch from RSRSP to traditional SAN synchronously through the proposed distributed synchronization algorithm.
- The stability of the proposed framework is analyzed with the common Lyapunov function under undirected and dynamic communication topology.
Fig. 1 shows the operation process of the RSRSP strategy. The upper right corner of the figure shows the list of the number of neighbors in each sector and the variance of the list. When the variance is the smallest, the RSRSP strategy stops rotating.
To quickly understand the idea of the proposed strategy, we can using the following simple command:
python3 run_demo.py
Then, we can convert images in /example folder into an animated GIF by using:
python3 convert2gif.py
In Fig. 2, 120 agents are randomly distributed in the square [-4, 4] × [-4, 4]. Fig. 3 and Fig. 4 shows the comparison between the original communication topology and the topology after using RSRSP.
Fig 2. Init State |
|
Fig 3. Original Communication Topology |
Fig 4. Communication Topology based on RSRSP |
The initial distribution of the MASs is called
Parameter | Meaning | Value |
---|---|---|
episode_num | simulation times | 50 |
n | agent number | 50 |
R | agents initially distribute in a circular region of radius | 1 |
circle_center | agents initially distribute in a circular region centered at circle_center | np.array([0, 0]) |
r_c | sensing range (communication range) | 1 |
alpha | gaining parameter in the MAS | 1/n |
done_threshold | tolerance which measures the convergence | 0.02 |
delta_rotate | rotation angle of each rotation | 1 |
base_vec | basis vector of X-axis | np.array([1, 0]) |
base_sector_ranges | reference angle of the initial 4 sectors | np.array([0, 90, 180, 270]) |
Remark: We can get results faster by reducing the accuracy (i.e., increasing delta_rotate)