Multi-agent formation generation and control method based on distributed secure affine transformation
By introducing safety constraints and distributed consistency optimization at the affine parameter level, a safe multi-agent formation trajectory is generated, which solves the problems of formation shape distortion and insufficient obstacle avoidance in the existing technology, and realizes flexible and safe formation control in complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING INST OF TECH
- Filing Date
- 2026-01-27
- Publication Date
- 2026-05-29
AI Technical Summary
Existing multi-agent formation control methods struggle to generate safe reference formations online in complex environments, leading to distorted formation shapes or ineffective obstacle avoidance, resulting in a lack of flexibility and safety.
By introducing safety constraints at the affine parameter level, a parameter-level control barrier function is constructed. Combined with distributed consensus optimization and an agent-level tracking controller, a safe reference formation trajectory is generated, enabling the multi-agent system to maneuver flexibly in complex environments.
It enables online generation of safe formations, ensuring the safety and flexibility of formations in complex environments. It can maintain formation continuity and restore the nominal shape in obstacle environments, thus improving mission execution efficiency.
Smart Images

Figure CN122111087A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of multi-agent cooperative control technology, specifically to a method for generating and controlling multi-agent formations based on distributed secure affine transformation. Background Technology
[0002] Multi-agent formation control has wide applications in surveillance, environmental monitoring, and cooperative transportation. In practical applications, formations often need to operate in environments full of obstacles, and maintaining the desired geometry often conflicts with the requirements for safe obstacle avoidance. Existing methods typically handle formation reference generation and safe control separately. One type is trajectory planning-based methods, which, while generating collision-free trajectories, are prone to deadlock or loss of formation integrity when safety constraints dominate. Another type is low-level safety filters based on control obstacle functions (CBF), which, while ensuring individual safety, often lead to severe distortion of the formation shape and cannot effectively restore the desired formation. Furthermore, existing affine formation control methods mostly rely on offline parameter design and lack the ability to adapt to changes in the environment online. Therefore, there is an urgent need for a control framework that can generate safe reference formations online and achieve accurate tracking.
[0003] To address the formation control problem under the aforementioned multiple constraints, the following research schemes are currently available:
[0004] Scheme 1: In the literature (Zhang, X., Yang, Q., Lyu, J., Zhao, X., and Fang, H.(2024). Distributed variation parameter design for dynamic formation maneuvers with bearing constraints. IEEE Transactions on Automation Science and Engineering, 21(3), 3664–3677.), the global consistency of locally bounded scaling and translation parameters is achieved under environmental excitation conditions using a control barrier function (CBF) and distributed average tracking technology. Although this method can achieve overall scaling and translation of the formation, the generated reference formation cannot be guaranteed to be collision-free with obstacles, thus lacking safety guarantees.
[0005] Scheme 2: In the literature (Du, Z., Zhang, H., Wang, Z., and Yan, H. (2025). Motionplanning and tracking mpc for multiagent systems: A dynamic affine formation approach. IEEE Transactions on Cybernetics, 55(10), 4743–4756.), the affine transformation parameters of the formation are calculated by sampling around the preset formation center trajectory and evaluating the sampling points through an artificial potential field function. This method requires a centralized solution for the formation transformation parameters, thus requiring a central computing node.
[0006] Option 3: The paper (Sha, H., Cui, Y., Lu, W., Zhang, D., Wang, C., Wu, J., Xiong, R., and Wang, Y. (2024). Efficient global trajectory planning for multi-robot system with affinely deformable formation. In 2024 IEEE / RSJ International Conference on Intelligent Robots and Systems (IROS), 14148–14155.) combines the RRT* algorithm with reinforcement learning to plan affine transformation parameters offline. This method also requires a centralized planning process, and due to the complexity of the problem, it is difficult to implement online and lacks security guarantees.
[0007] Therefore, existing technologies do not address the issue of generating reference formations for safety, thus failing to ensure the flexibility and safe maneuverability of multi-agent systems in complex environments. Summary of the Invention
[0008] In view of this, the present invention provides a distributed secure affine transformation method for generating and controlling multi-agent formations. By introducing security constraints at the affine parameter level, an inherently secure reference formation is generated. Combined with underlying secure tracking control, this method enables flexible and secure maneuverability of multi-agent systems in complex environments.
[0009] To solve the above-mentioned technical problems, the present invention is implemented as follows.
[0010] A method for multi-agent formation generation and control based on distributed secure affine transformation includes: Step S1: For each agent Building and intelligent agents affine transformation parameters Related parameter-level control barrier functions To constrain intelligent agents Based on affine transformation parameters Determined expected reference formation position Maintain a safe distance from obstacles; based on CBF theory, control the obstacle function according to the parameter level. Deriving the parameters of the affine transformation Safety constraints on evolution; Step S2: Construct a distributed consensus optimization problem that includes the aforementioned security constraints and system-wide parameter consistency constraints, to drive the formation to restore its nominal shape and track the desired centroid; each agent solves the distributed consensus optimization problem and updates its affine transformation parameters using the solution results. Generate time-varying safety reference formation trajectories; Step S3: Use an intelligent agent-level tracking controller to control each intelligent agent to track the safety reference formation trajectory.
[0011] Preferably, in step S1, the step of targeting each intelligent agent... Building and intelligent agents affine transformation parameters Related parameter-level control barrier functions for: Define intelligent agents The expected reference formation that satisfies the affine transformation is : (I) in, For the formation structure matrix, For intelligent agents The affine transformation parameters include the affine transformation matrix and the translation vector; Define the parameter-level control barrier function as follows: (II) in, Representing obstacles The center coordinates, It is the preset safe distance between the intelligent agent and the obstacle; Substituting equation (I) into equation (II), we obtain the result related to the intelligent agent. affine transformation parameters Related parameter-level control barrier functions : .
[0012] Preferably, based on the parameter-level control barrier function Deriving the parameters of the affine transformation The safety constraints of evolution specifically include: Treating the affine parameters as a single integrator system, we define the intelligent agent. Affine parameter control input = ; According to CBF theory, Differentiation yields , For normalized direction vectors, ; According to CBF security conditions ,Will Substituting the CBF safety condition, we obtain the affine transformation parameters. The safety constraints of evolution, i.e., affine parameter control inputs The set of safety control inputs is as follows:
[0013] in, A collection of obstacles. To extend the K-class functions.
[0014] Preferably, in step S2, the objective function of the distributed consensus optimization problem is designed as follows:
[0015] in, The total number of agents. For nominal parameter level control input; The security constraints of the objective function are: ; The system-wide parameter consistency constraint for the objective function is: , It is a globally consistent variable.
[0016] Preferably, the nominal parameter level control input Designed as follows:
[0017] in, To control the gain; The target affine transformation parameters correspond to the nominal formation shape; This represents arranging the matrix by columns; For dimension The identity matrix, The dimension of the agent's state vector; The nominal center of gravity of the formation, The desired centroid velocity; To select the matrix.
[0018] Preferably, in step S2, the distributed consensus optimization problem solved by each agent is as follows: The distributed consensus optimization problem is solved using the similar distributed alternating direction multiplier method (SD-ADMM); each agent uses neighbor information for iterative updates, eliminating the need for a central node.
[0019] Preferably, in step S3, the use of an agent-level tracking controller to control each agent to track the safe reference formation trajectory is as follows: Design a control obstacle function CBF1 to maintain a preset safe distance between intelligent agents, and a control obstacle function CBF2 to maintain a preset safe distance between an intelligent agent and an obstacle; The agent-level tracking controller obtains the optimal agent control input by solving the following quadratic programming problem (QP). :
[0020]
[0021]
[0022]
[0023] in, For intelligent agents used to track the trajectory of the safety reference formation The nominal controller output, The control input for the intelligent agent that needs to provide the solution; The constraint coefficients are derived based on CBF1 and CBF2. and For agent serial number, Indicates an obstacle. Represents a set of obstacles; This indicates that the infinity norm of the agent-level tracking controller output cannot exceed the controller's maximum value constraint. .
[0024] Preferably, the nominal controller is designed as follows: ; in, For the nominal controller output used to track the safety reference formation trajectory, For the position of the agent, For the speed of the intelligent agent, For intelligent agents, To control the gain.
[0025] Beneficial effects: (1) This invention proposes a consistent affine transformation parameter generation method based on online distributed optimization. It introduces a parameter-level control barrier function (CBF) to directly apply safety constraints in the affine parameter space, ensuring that the generated reference formation is theoretically collision-free. Therefore, this invention can generate safe formations online, realizing not only the flexible maneuverability of the formation in complex environments but also ensuring the safety of the generated formation.
[0026] (2) This invention designs a distributed affine formation parameter generation algorithm based on the similarity distributed alternating direction multiplier method (SD-ADMM). It can solve for consistent affine transformation parameters based solely on communication between neighbors, without requiring a computation center, and can be distributed and deployed on cluster robots. Moreover, the addition of consistency constraints enables the formation to produce consistent deformation, maintaining the continuity of the formation. In addition, the optimization objective function is designed as a quadratic form, aiming to make the control input as close as possible to the nominal input used to restore the nominal shape, thereby achieving automatic shape restoration in the obstacle-free area.
[0027] (3) The present invention forms a two-layer security architecture to achieve secure tracking of the reference formation, making the multi-agent system more secure in complex environments and enabling it to complete more complex tasks.
[0028] (4) This invention achieves online secure generation of reference formations and accurate tracking of actual movement through a two-layer security architecture, effectively improving the formation maintenance capability and task execution efficiency of multi-agent systems in cluttered environments. Attached Figure Description
[0029] Figure 1 This is a flowchart of the multi-agent formation generation and control method based on distributed secure affine transformation of the present invention; Figure 2 This is a trajectory diagram of multiple agents traversing an obstacle area in the simulation; Figure 3 The time-varying curve of the parameter-level control input in the simulation; Figure 4 The graph shows the evolution of the affine matrix error during the simulation. Figure 5 This is a graph showing the minimum distance curves between the reference formation and the actual formation from the obstacle in the simulation. Detailed Implementation
[0030] To ensure the safety of formations after affine transformation, this invention provides a multi-agent formation generation and control method based on distributed safe affine transformation, which mainly includes the following three core parts: (1) Construction of parameter-level safety constraints: This invention proposes a parameter-level control barrier function (CBF) to constrain the rate of change of affine parameters, thereby constraining the evolution of affine transformation parameters (including scaling, rotation, shearing, and translation). This method of directly imposing safety constraints in the affine parameter space ensures that the generated reference formation is theoretically collision-free. By establishing a mapping relationship between affine parameters and obstacle distances, the non-convex state constraints are transformed into safety constraints on linear inequalities of the affine parameter control inputs. This not only theoretically guarantees the safety of the generated time-varying reference formation but also makes it solvable.
[0031] (2) Distributed consensus solution: A distributed optimization problem incorporating the aforementioned safety and consistency constraints was designed. Utilizing the Similar Distributed Alternating Direction Multiplier Method (SD-ADMM), each agent computes affine parameter control inputs that satisfy local safety constraints and tend towards global consistency only by communicating with its neighbors. This ensures consistent formation deformation and maintains formation coherence. The objective function is designed as a quadratic form, aiming to make the control input as close as possible to the nominal input used to recover the nominal shape, thereby achieving automatic shape recovery in obstacle-free areas.
[0032] (3) Two-layer security architecture: The upper layer generates a safe reference formation by optimizing affine parameters; the lower layer uses an agent-level CBF-QP controller to track this reference formation, achieving safe tracking of the reference formation, ultimately forming a two-layer safe distributed formation control framework. The lower-level controller is not only responsible for trajectory tracking, but also handles obstacle avoidance requirements and input saturation issues between agents and between agents and obstacles through CBF-based constraints, thus constituting a two-layer safety guarantee.
[0033] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0034] Figure 1 A flowchart of the multi-agent formation generation and control method based on distributed secure affine transformation of the present invention is shown. As shown in the figure, the method includes the following steps: Step 1: Design a parametric control barrier function that guarantees the safety of affine transformations. .
[0035] consider Several agents are grouped together, and the kinematic model of each agent is represented by the following second-order system: (1) in, The number representing the intelligent agent. respectively intelligent agents Position, velocity, and acceleration; acceleration As the control input for the intelligent agent, and subject to the following saturation constraints: (2) in Represents the infinite norm, It is a scalar, it is Maximum value constraint.
[0036] Define nominal formation relative to the center of mass relative position Expected reference formation Generated by affine transformation: (3) in Let be the affine transformation matrix. It is a translation vector. For dimension The identity matrix, For dimension A matrix of all 1s.
[0037] intelligent agents Expected reference formation The expression (3) is represented in vector form: (4) in For the formation structure matrix, It is an intelligent agent The local affine transformation parameter vector is also a parameter that requires safety constraints in this invention.
[0038] To avoid obstacles, a parameter-level obstacle control function (CBF) is defined: (5) in, Representing obstacles The center coordinates, It is the preset safe distance between the intelligent agent and the obstacle.
[0039] Substituting equation (2) into equation (5), we obtain the result related to the intelligent agent. affine transformation parameters Related parameter-level control barrier functions : (6) The corresponding set of security parameters It can be defined as: Intelligent agents Overall set of safety affine parameters It can be represented as: ,in This represents a set of obstacles.
[0040] Treat the affine parameters as a single integrator system: (7) Here, we define an intelligent agent. The affine parameter control input is It is the affine transformation parameter vector. The derivative of .
[0041] According to CBF theory, Taking the derivative, we get: (8) Wherein, the normalized direction vector .
[0042] According to CBF security conditions Formula (8) Substituting the CBF security condition, we obtain the set of security control inputs that keeps the security set forward unchanged: (9) in, A matrix related to formation structure; This is the normalized direction vector; To extend the K-class functions, one can use The product form.
[0043] The above set It indicated that regarding The inequality conditions allow for a secure modeling of affine transformations as relating to... The linear inequality constraints are then solved. It can be calculated using formula (7). And then update .
[0044] Step 2: Solve for the parameters of the distributed affine transformation.
[0045] First, a distributed consistency optimization problem is constructed, which includes the aforementioned security constraints and system-wide parameter consistency constraints, to drive the formation to restore its nominal shape and track the desired centroid.
[0046] The objective function for the distributed consistency optimization problem is designed as follows: (10) Used to drive the formation to recover its nominal shape and track the desired centroid.
[0047] in, It can be designed as a quadratic form as follows: (11) in, This is the nominal parameter-level control input. In this embodiment, the nominal parameter-level control input is designed as follows:
[0048] in, To control the gain; The target affine transformation parameters correspond to the nominal formation shape; This represents arranging the matrix by columns; For dimension The identity matrix, The dimension of the agent's state vector; The nominal center of gravity of the formation, The desired centroid velocity; To select the matrix.
[0049] In formula (10) Safety constraints for the objective function; In formula (10) To ensure consistent parameters across the entire system, It is a globally consistent variable.
[0050] Next, each agent solves the above distributed consensus optimization problem (Equation 10) to obtain the affine parameter control input. Calculated using formula (7) Then according to dynamics Update the affine transformation parameters of this agent. This is a standard first-order integrator parameter update problem, given the initial values. The dynamic integral is used to update and generate a time-varying safety reference formation trajectory.
[0051] In this embodiment, the problem is solved in a distributed manner using the SD-ADMM algorithm, yielding consistent results among all agents. Each agent uses neighbor information for iterative updates, without the need for a central node. The SD-ADMM algorithm consists of the following steps (1)-(6): (1) Set the maximum number of iterations and obtain the local affine parameters at each time t. Local nominal affine control The center position of each obstacle and nominal formation .
[0052] (2) Initialization , , , , , .in For intelligent agents The Lagrange multipliers in the first iteration of the algorithm, , , For parameters.
[0053] (3) in the In this iteration, solve the following QP problem and update the original variables. :
[0054] (4) Update the dual variable :
[0055] in It is an intelligent agent The set of neighbors.
[0056] (5) Update the Lagrange multipliers :
[0057] (6) If the convergence condition is not met or the number of iterations is less than the maximum number of iterations, repeat steps (3)-(5).
[0058] Step 3: Secure formation tracking at the intelligent agent level.
[0059] This step employs an agent-level tracking controller to control each agent to track the safety reference formation trajectory, while simultaneously satisfying collision avoidance constraints between agents and with obstacles.
[0060] Obtain the safety reference formation in step 2 Next, design the nominal controller: ,in, To control the gain,
[0061] To avoid collisions between agents, for any two pairs of agents out of N agents... The absolute relative velocity between the two for:
[0062] in, For intelligent agents to The relative positions between them for Scalar.
[0063] Considering agent input saturation, the following CBF1 mechanism is designed to maintain a preset safe distance between agents:
[0064] in, It is the preset safe distance between intelligent agents.
[0065] Similarly, in order to achieve collision avoidance between the agent and obstacles, for any set of obstacles... The first Given an obstacle, design the following obstacle control function CBF2 to maintain a preset safe distance between the agent and the obstacle:
[0066] in, For intelligent agents With the The relative positions of the obstacles It is a preset safe distance between the intelligent agent and the obstacle.
[0067] Based on the defined CBF1 and CBF2, the following quadratic programming problem is constructed to solve for the optimal safety control input:
[0068] Where: Equation (a) is the collision avoidance constraint between agents based on CBF1; Equation (b) is the collision avoidance constraint between agents and obstacles based on CBF2; (c) is the input saturation constraint of the agent, indicating that the infinite norm of the agent-level tracking controller output cannot exceed the maximum value constraint of the controller. .
[0069] Specifically, , , , .
[0070] in, For intelligent agents With the The absolute relative velocity of the obstacle.
[0071] The optimal control input for the intelligent agent is obtained by solving the problem. This is provided to intelligent agents.
[0072] The above operation is performed at each time t to control each agent to track the safe reference formation trajectory while satisfying the anti-collision constraints between agents.
[0073] The control method proposed in this invention was simulated in the following experiment.
[0074] Figure 2 This is a trajectory diagram of multiple agents traversing an obstacle zone in a simulation; such as... Figure 2 The image shows the formation trajectories of four agents in a circular obstacle environment. The centroid of the formation is shown in the figure. Tracking reference trajectory At the same time, the formation shape is Significant compression and tensile deformation occur at certain times to allow passage through the gaps in the obstacle, and The formation was restored to a square, nominal formation.
[0075] Figure 3 This is a time-varying curve of the parameter-level control input in the simulation; such as... Figure 3 As shown, parameter-level control input The time-varying evolution curve. As can be seen in the figure, when the formation needs to avoid obstacles (such as... and (Nearby), control input components It becomes active to adjust the affine parameters, which tend to zero in the unobstructed region.
[0076] Figure 4 This is a graph showing the evolution of the affine matrix error in the simulation; for example... Figure 4 As shown, affine matrix Elements and expected values The error evolves between the two. The error increases during obstacle avoidance, indicating that the formation is undergoing rotation or scaling deformation; the error converges to zero after obstacle avoidance, indicating that the formation has successfully recovered its nominal shape.
[0077] Figure 5 This is a graph showing the minimum distance curves between the reference formation and the actual formation from the obstacle in the simulation. For example... Figure 5 As shown, reference formation With actual formation Minimum distance curve to the obstacle. As shown in the figure, under the influence of parameter CBF, the distance between the reference formation and the obstacle is always greater than the safe distance. In reality, the formation also maintains a safe distance from obstacles under the control of the safety controller.
[0078] Simulation and experimental verification demonstrate that the designed control algorithm can realize formation contraction, rotation, and shearing transformations of multiple agents in obstacle environments, while ensuring the safety of the agents and preventing collisions with obstacles. When the multiple agents move into free space, the formation can be restored to the nominal formation.
[0079] In summary, the above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for generating and controlling multi-agent formations based on distributed secure affine transformation, characterized in that, include: Step S1: For each agent Building and intelligent agents affine transformation parameters Related parameter-level control barrier functions To constrain intelligent agents Based on affine transformation parameters Determined expected reference formation position Maintain a safe distance from obstacles; based on CBF theory, control the obstacle function at the parameter level. Deriving the parameters of the affine transformation Safety constraints on evolution; Step S2: Construct a distributed consensus optimization problem that includes the aforementioned security constraints and system-wide parameter consistency constraints, to drive the formation to restore its nominal shape and track the desired centroid; each agent solves the distributed consensus optimization problem and updates its affine transformation parameters using the solution results. Generate time-varying safety reference formation trajectories; Step S3: Use an intelligent agent-level tracking controller to control each intelligent agent to track the safety reference formation trajectory.
2. The method as described in claim 1, characterized in that, In step S1, the step of targeting each intelligent agent... Building and intelligent agents affine transformation parameters Related parameter-level control barrier functions for: Define intelligent agents The expected reference formation that satisfies the affine transformation is : (I) in, For the formation structure matrix, For intelligent agents The affine transformation parameters include the affine transformation matrix and the translation vector; Define the parameter-level control barrier function as follows: (II) in, Representing obstacles The center coordinates, It is the preset safe distance between the intelligent agent and the obstacle; Substituting equation (I) into equation (II), we obtain the result related to the intelligent agent. affine transformation parameters Related parameter-level control barrier functions : 。 3. The method as described in claim 2, characterized in that, In step S1, the step of using the parameter-level control barrier function based on CBF theory... Deriving the parameters of the affine transformation The safety constraints of evolution specifically include: Treating the affine parameters as a single integrator system, we define the intelligent agent. Affine parameter control input = ; According to CBF theory, Differentiation yields , For normalized direction vectors, ; According to CBF security conditions ,Will Substituting the CBF safety condition, we obtain the affine transformation parameters. The safety constraints of evolution, i.e., affine parameter control inputs The set of safety control inputs is as follows: in, A collection of obstacles. To extend the K-class functions.
4. The method as described in claim 3, characterized in that, In step S2, the objective function for the distributed consensus optimization problem is designed as follows: in, The total number of agents. For nominal parameter level control input; The security constraints of the objective function are: ; The system-wide parameter consistency constraint for the objective function is: , It is a globally consistent variable.
5. The method as described in claim 4, characterized in that, The nominal parameter level control input Designed as follows: in, To control the gain; The affine transformation parameters of the target correspond to the nominal formation shape; This represents arranging the matrix by columns; For dimension The identity matrix, The dimension of the agent's state vector; The nominal center of gravity of the formation, The desired centroid velocity; To select the matrix.
6. The method as described in claim 1, characterized in that, In step S2, each agent solves the distributed consensus optimization problem as follows: The distributed consensus optimization problem is solved using the similar distributed alternating direction multiplier method (SD-ADMM); each agent uses neighbor information for iterative updates, eliminating the need for a central node.
7. The method as described in claim 2, characterized in that, In step S3, the use of an agent-level tracking controller to control each agent to track the safe reference formation trajectory is as follows: Design a control obstacle function CBF1 to maintain a preset safe distance between intelligent agents, and a control obstacle function CBF2 to maintain a preset safe distance between an intelligent agent and an obstacle; The agent-level tracking controller obtains the optimal agent control input by solving the following quadratic programming problem (QP). : in, For intelligent agents used to track the trajectory of the safety reference formation The nominal controller output, The control input for the intelligent agent that needs to provide the solution; The constraint coefficients are derived based on CBF1 and CBF2. and For agent serial number, Indicates an obstacle. Represents a set of obstacles; This indicates that the infinity norm of the agent-level tracking controller output cannot exceed the controller's maximum value constraint. .
8. The method as described in claim 2, characterized in that, The nominal controller is designed as follows: ; in, For the nominal controller output used to track the safety reference formation trajectory, For the position of the agent, For the speed of the intelligent agent, For intelligent agents, To control the gain.