## 1 Introduction  
The multi-agent system has replaced human beings to perform specific complex tasks and has achieved remarkable results in intelligent scenarios. Multi-agent cooperation will have a higher value in the future and have excellent developmental prospects [1, 2]. Facing complex environments, the multi-agent system needs to deal with agent disability, communication disconnection, and other emergencies to ensure the overall survivability of the system [3]. Therefore, achieving the formation, reconstruction, and transformation of multi-agent formations under time-varying topology is one of the difficulties in the collaborative control of multi-agent systems [4]. Nowadays, there is a large amount of theoretical and practical research on the formation and reconstruction technology of multi-agent clusters [5, 6]. In Ref. [7], the leader-follower method is adopted to realize multi-robot formation control, and the follower layer is controlled according to the information of the leader layer. This method depends on the state of the leader and has poor robustness [8]. Ref. [9] combines the artificial potential field with the virtual structure. The potential field repulsion function is used to realize collision avoidance and the virtual structure can be tracked to form the AUV formation. The artificial potential field method easily falls into the local minimum point, and it is difficult to reach the global optimal. In Ref. [10], the concept of escape angle is introduced to determine the heading angle of the robot, and the behavior-based method is adopted to implement obstacle-avoiding formation control. The behavior of this method in dynamic and complex environments is unpredictable and needs better flexibility. The above documents use different control strategies to solve the formation control of multi-agent systems but do not consider the possible reconstruction problems in the formation process. Numerous studies have been conducted to address issues such as the UAV formation and reconfiguration. In Ref. [11], a sliding mode method is used to design a time-varying formation output tracking controller to deal with uncertainties and external disturbances. In Ref. [12], a new speed and lateral channel controller was designed to limit the deviation during formation transformation, so as to improve the rapidity and stability of reconfiguration. However, most of the papers focus on time-varying formations and reconfigurations for uncertainties in dynamic models, practical constraints and external disturbances, and the formation topology is generally fixed. In complex environments such as blocked communications, the execution of tasks via multi-agent systems is affected by many factors, and the failure of a single agent is a typical situation. If a fixed topology is adopted, multi-agent systems cannot cooperate to complete subsequent tasks when confronted with an unexpected situation. Switching communication topology can effectively solve the multi-agent system configuration reconstruction. In Ref. [13], the multi-agent network topology is switched according to the Markov random transition and the mean square consistency problem of the Lure-type multi-agent system with time delay and topology uncertainty is considered. The virtual leader is designed to assign the trajectory of systems in Ref. [14]. Subgroups can interact with each other by cooperation among group leaders such that the relative configuration between different groups can be adjusted simultaneously. In Ref. [15], the leader's control input is unknown, and the followers are prone to being influenced. The algorithms apply the idea of simply disregarding a certain number of extreme values to rule against the misbehaviors of affected agents. However, the article mentioned above do not consider the energy consumption of formation reconstruction of multi-agent systems after switching topology. The complex task requirements of multi-agent systems involve switching between different formation configurations.