# Affine Formation Maneuver Control for Multi-Agent Based on Optimal Flight System
## 1 Introduction
[22] extended the affine-based method by introducing a stress matrix to enable general linear transformations involving translation, rotation, scaling, shear, or compositions of these transformations. These methods ensure that the configuration maintains the rigid graph structure in each step, preserving collinearity and distance ratios, while also enabling maneuver control. The second approach is more adaptable, aiming to maximize the observation capabilities of the robot team and facilitate obstacle avoidance. This method focuses on actively moving mobile agents to improve the accuracy of target detection with a dynamically adjustable geometry. Ref. [25] studied a formation loop that forms an un-rigid configuration using a distributed non-linear model predictive controller (DNMPC) and an estimator module. Ref. [26] discussed the use of artificial potential fields (APF) as a cost function in a non-linear model predictive controller (NMPC) with a modified A* path planner method for configuration changes. These methods exhibit generality, allowing adaptation to both static and dynamic environments, where the value and direction of velocity can be adjusted based on the current cost. However, these methods have limitations in terms of generality. The first method fails to address sudden changes in an agent's velocity in terms of value and direction. The velocity is directly designed in each step of the configuration transformation, relying on prior information about the environment. The second approach heavily relies on strong communication interaction, which may lead to reconstruction failures in the event of breakdowns in one or more agents. Therefore, the goal of formation control with continuous configuration changes is to ensure low communication costs, an adaptable change model, as well as equilibrium and stability within the system. Thus, this paper presents an algorithm that integrates APF-based leader control [27; 28; 29; 30] with the affine formation, while utilizing behavior optimization for local trajectory calculation. This algorithm enables efficient navigation for multi-agents within a formation by incorporating artificial potentials to guide agent movement, a virtual leader for formation path planning, and geometric pattern modeling for obstacle avoidance. Moreover, the agents within the formation are initially placed randomly and are adjusted applying additional forces to move individual agents to their new equilibrium positions in various configurations. The objective of employing potential functions is to guide agents away from obstacles and towards or away from the virtual leader, while also ensuring cohesion among agents as they navigate through the environment [31; 32; 33]. In other words, the configuration of the formation can be adjusted based on the error in the velocity vector of agents and the virtual leader. Therefore, the potential functions used in our methodology consist of virtual leader forces and obstacle forces. As the virtual leader's position moves, the artificial potential relationships guide the group along the path defined by the virtual leader's motion. By relying on the global motion of a virtual leader, the complexity of planning multiple collision-free paths for numerous vehicles is reduced to planning just one collision-free path. Consequently, the interacting agents enter optimization procedures, where the explicit fourth-order Runge-Kutta methods [34] are introduced into the local control law. This method is commonly used to solve ordinary differential equations (ODE) and estimates the value of the next step by utilizing the slope of the midpoint with truncation error O (\(L^{4}\)) in each step size. Subsequently, the local trajectory [35] of each agent estimates the value of the function at the next step by calculating the slopes of multiple intermediate points to obtain the numerical solution. The virtual leader abstraction is utilized to guide the formation through the environment.