Cooperative obstacle avoidance and trajectory optimization method for large-scale multi-agent system

By employing hierarchical clustering and navigator optimization, the problem of rapidly generating smooth and cooperative trajectories in large-scale multi-agent systems on resource-constrained platforms is solved, achieving efficient and safe trajectory optimization that adapts to complex environmental changes.

CN121857701APending Publication Date: 2026-04-14HANGZHOU DIANZI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-16
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing trajectory optimization techniques for multi-agent systems struggle to balance computational efficiency, real-time performance, and group collaboration security when dealing with large-scale systems. This is especially true on resource-constrained embedded platforms, where the challenge remains how to quickly generate smooth and collaborative trajectories while ensuring that multiple machines do not collide.

Method used

A large-scale multi-agent system collaborative obstacle avoidance and trajectory optimization method is adopted, including pre-path generation, parameterized mapping, machine learning-based hierarchical clustering, navigator optimization and intra-group parameter sharing derivation. The agents are divided into several clusters through hierarchical clustering. Trajectory optimization is performed only on the navigator, and other members generate trajectories through parameter sharing. Segmented obstacle avoidance strategy and B-spline fitting are combined to generate smooth paths.

Benefits of technology

It significantly reduces computational complexity, improves real-time performance, achieves efficient and smooth path generation, and naturally ensures collision safety among group members, exhibiting strong scene adaptability and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121857701A_ABST
    Figure CN121857701A_ABST
Patent Text Reader

Abstract

The invention discloses a collaborative obstacle avoidance and trajectory optimization method for a large-scale multi-agent system, and the method comprises the specific steps: S1, generating a pre-path for an agent from a starting point to a target point, and enabling the pre-path to avoid an obstacle; s2, selecting a fixed reference point, introducing a time deformation parameter, and mapping the pre-path into an actual track through a mapping formula; after the optimal lambda * is obtained, substituting the optimal lambda * into the mapping formula to obtain discrete track points; s3, performing two-stage clustering on each agent pre-path generated in the step S1; and S4, for each cluster, determining a navigator agent in the cluster, executing parameter sharing derivation on other non-navigator agents of the cluster where the navigator agent in the cluster is located, and generating a derived trajectory. According to the method, the calculation complexity of a large-scale multi-agent system is reduced, and the real-time performance is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of unmanned aerial vehicle (UAV) technology, specifically relating to a collaborative obstacle avoidance and trajectory optimization method for large-scale multi-agent systems with complex constraints. Background Technology

[0002] With the increasing maturity of UAV and robotics technologies, Multi-Agent Systems (MAS) are showing broad application prospects in fields such as national defense, intelligent transportation, industrial monitoring, and disaster relief. Compared to single-agent systems, MAS, with its high flexibility, superior execution efficiency, and strong task robustness, can collaboratively complete complex tasks that are difficult for single agents to achieve. Trajectory optimization remains one of the core research topics in the technical framework of MAS. To ensure efficient task execution, the system must have the ability to generate smooth trajectories in real time that satisfy spatial coordination, environmental obstacle avoidance, and its own kinematic constraints.

[0003] Currently, various methods have been proposed both domestically and internationally for trajectory optimization of multi-agent systems, which can be mainly summarized into the following categories:

[0004] The first category comprises planning methods based on geometric space search and sampling, represented by algorithms such as A*, RRT, and their variants. These methods find feasible paths through state space graph construction or random sampling. While their path retrieval mechanisms are relatively complete, the explosive growth in decision-making dimensions with the increasing number of agents leads to a heavy computational burden when dealing with large-scale swarm systems, making it difficult to respond in real time to complex and changing environments.

[0005] The second category is optimization algorithms based on heuristics and metaheuristics. Examples include artificial potential field methods, pigeon flocking optimization algorithms, and other swarm intelligence algorithms. These methods search for optimal solutions by simulating the behavioral logic of organisms in nature, exhibiting strong environmental adaptability. However, heuristic algorithms generally suffer from slow convergence speed, susceptibility to getting trapped in local optima, and high computational cost. Especially in dynamic and complex environments, these algorithms struggle to guarantee the generation of globally optimal and cooperative trajectories within a finite timeframe.

[0006] The third category comprises reinforcement learning and deep learning methods based on artificial intelligence. In recent years, utilizing neural networks to handle complex decision-making problems has become a hot topic, enabling agents to achieve end-to-end planning capabilities in complex environments through large-scale offline training. While these methods exhibit strong adaptability in specific scenarios, they heavily rely on large-scale training data and high-performance computing resources. Furthermore, deep learning models have limited generalization ability in dynamic and unknown environments, and their real-time performance and security during online deployment are difficult to guarantee with rigorous mathematical assurance.

[0007] In summary, existing multi-agent trajectory optimization techniques struggle to balance computational efficiency, real-time performance, and group collaboration security when dealing with large-scale systems. This is especially true on resource-constrained embedded platforms, where rapidly generating smooth and collaborative trajectories while ensuring that multiple machines do not collide remains a critical challenge that urgently needs to be addressed in the current technological field. Summary of the Invention

[0008] To address the problems existing in the prior art, this invention provides a method for collaborative obstacle avoidance and trajectory optimization in large-scale multi-agent systems.

[0009] The present invention adopts the following technical solution:

[0010] The specific steps of the cooperative obstacle avoidance and trajectory optimization method for large-scale multi-agent systems are as follows:

[0011] S1, Pre-path generation

[0012] Generate a pre-path for the agent from the starting point to the target point, which avoids obstacles;

[0013] S2, Constructing parameterized mappings

[0014] By selecting a fixed reference point and introducing a time deformation parameter, the pre-path is mapped to the actual trajectory using a mapping method; the optimal λ is then obtained. * Then, substitute it into the mapping formula to obtain the discrete trajectory points;

[0015] S3, Hierarchical Clustering Based on Machine Learning

[0016] For each agent pre-path generated in step S1, perform two-stage clustering;

[0017] S4, Navigator Optimization and Intra-Group Parameter Sharing Derivatives

[0018] For each cluster, a leader agent is identified within the cluster. Parameter sharing derivation is performed on other non-leader agents in the same cluster as the leader agent to generate derived trajectories.

[0019] Preferably, step S1 is as follows:

[0020] (1) Segmented exploration and collision detection

[0021] Construct an initial line segment from the agent's starting point toward the target point, and perform an intersection detection between this line segment and the set of obstacles; if there is no intersection, the line segment is retained as a part of the path; if there is an intersection, determine the obstacle that intersects first along the exploration direction.

[0022] (2) Detour point generation and segment splitting

[0023] When a line segment intersects an obstacle, a detour point P is generated near the obstacle.d The original line segment is split into two segments: from the starting point to the detour point and from the detour point to the end point. These segments are then added to the queue to be explored. The above process is repeated until all line segments do not intersect with obstacles, thus obtaining a sequence of broken line path points formed by connecting the starting point, at least one detour point, and the end point.

[0024] (3) Smooth Fitting

[0025] Curve fitting is performed on the sequence of points along the broken line path to obtain a smooth path;

[0026] (4) Smooth curve collision correction

[0027] Collision detection is performed on the smooth curve; if the curve intersects with an obstacle, a local correction control point is inserted near the collision, with the direction away from the obstacle's center and an offset increased. The curve is then fitted and collision corrected again until a collision-free smooth pre-path P is obtained. prey (t).

[0028] Preferably, in step S1 (2), the detour point is obtained by offsetting along the vertical direction of the exploration direction.

[0029] Preferably, in step S1 (3), a cubic B-spline is used; if the path points are insufficient for fitting, at least one intermediate point is inserted.

[0030] Preferably, step S2 is as follows:

[0031] Select a fixed reference point P in the environment ref Introducing time deformation parameters Mapping the pre-path to the actual trajectory:

[0032]

[0033] Taking the first and second derivatives of this equation yields the velocity and acceleration:

[0034]

[0035] in, Continuous or discrete representation as a sequence And set endpoint consistency:

[0036]

[0037] Wherein, λ(t) f ) represents the termination time t f The value of λ(t) when λ(t) f When )=1, the endpoint is determined by the reference endpoint term;

[0038] The velocity and acceleration limits are transformed into constraints on λ. kConstraint checks on its difference components;

[0039] Solve with λ k For a nonlinear constrained optimization problem of decision variables, the discrete trajectory points after optimization by a single agent are obtained.

[0040] Preferably, in step S2, a sequential quadratic programming (SQP) method is used to solve for λ. k For nonlinear constrained optimization problems with decision variables, SQP constructs a quadratic programming subproblem through a quadratic approximation of the objective and constraint linearization, and iteratively solves it to obtain the optimal λ. * Then, substitute it into the mapping expression. The discrete trajectory points are obtained:

[0041] .

[0042] Preferably, step S3 is as follows:

[0043] Generate a pre-path for each agent Then, two-stage clustering is performed on all pre-paths:

[0044] (1) Coarse grouping

[0045] For each pre-path, the number of turning points or corners exceeds a threshold. The number of occurrences is used to classify the pre-path into different coarse groups based on the statistical value.

[0046] (2) Fine clustering

[0047] Within each coarse group, the pre-path is resampled to N. s The shape feature vector f is obtained by concatenating and normalizing the coordinates of the sampling points at equal intervals. i Then, the KMeans clustering algorithm is used for further subdivision, ultimately resulting in several clusters. .

[0048] Preferably, step S4 is as follows: After obtaining the hierarchical clustering results, for each cluster... First, identify the leader agent within the cluster;

[0049] After the leader is determined, parametric mapping and constraint optimization are performed on the leader of the cluster; specifically, the deformation parameter sequence of the cluster is used. As decision variables, the objective function is constructed by combining the aforementioned trajectory parameterization mapping relationship.

[0050] With constraints The optimal parameters of the cluster are obtained by using the constrained optimization method SQP. After the solution is completed, the other non-leader agents within the cluster directly reuse the optimal parameters of the cluster. and their respective pre-paths Combined generation of derived trajectories:

[0051] .

[0052] Preferably, in step S4, the leader is determined using a maximum feasible margin strategy, specifically as follows: for each candidate agent within the cluster... Based on pre-path A feasibility margin index is calculated to measure the safety margin of the pre-path in satisfying constraints. This index consists of the "minimum distance margin with obstacle boundaries" and the "minimum distance margin with other agents." The minimum distance margin with obstacle boundaries is defined as the minimum distance margin of the pre-path to the extended safety boundaries of each obstacle along the time domain. The minimum distance margin with other agents is defined as the minimum relative distance threshold d between the pre-path and other pre-paths in the same cluster. min The margin is determined and a comprehensive margin is formed. The agent with the largest feasible margin index is selected as the leader of the cluster.

[0053] Preferably, in step S4, after completing the derived trajectory, a security re-check is performed on the trajectory within the cluster; for any two agents in the same cluster... Its derived trajectory satisfies the relative displacement relationship:

[0054]

[0055] Based on the above relationships, in the optimization of the navigator... The range, lower bound, or rate of change of the value are constrained; after derivation, the minimum distance to the obstacle and the minimum safe distance within the group are checked. If the agent is found to have insufficient feasibility margin, an adaptive remediation process is triggered, that is, the agent is temporarily removed from the current cluster and the optimization process is executed separately.

[0056] In summary, this invention proposes a cooperative obstacle avoidance and trajectory optimization method for large-scale multi-agent systems, which has the following significant advantages compared to existing technologies:

[0057] (1) It greatly reduces the computational complexity of large-scale multi-agent systems and significantly improves real-time performance.

[0058] This invention simplifies the complex trajectory optimization problem by introducing a motion camouflage model, reducing it to solving for low-dimensional deformation parameters. Specifically, it incorporates a machine learning clustering algorithm to divide a large-scale agent system into several geometrically similar subgroups. During optimization, only the leader of each group needs trajectory optimization; the remaining members directly generate trajectories through parameter sharing. This strategy reduces computational overhead from being proportional to the number of agents to being proportional to the number of groups, effectively addressing the computational bottleneck in real-time deployment of large-scale multi-agent systems.

[0059] (2) It achieves efficient and smooth generation of the initial path without the need for complex numerical solutions.

[0060] This invention proposes an initial path generation method that combines a piecewise obstacle avoidance strategy with B-spline fitting. This method generates obstacle avoidance turning points through simple geometric probing and vertical offsetting, and utilizes the convex hull property and second-order continuity of cubic B-splines for smoothing. This process does not involve complex nonlinear optimization iterations and can quickly provide all agents with high-quality initial solutions that satisfy obstacle constraints, laying a solid convergence foundation for subsequent refined optimization.

[0061] (3) It naturally ensures the collision safety among group members and reduces the difficulty of constraint handling.

[0062] This invention cleverly utilizes the mathematical properties of motion camouflage mapping: under the control of the same parameters, the relative displacement between the trajectories of members within a group is merely a scaling of their initial path displacement. Since sufficient safety distances are guaranteed in the initial path stage, the optimized trajectory can automatically inherit this safety. This eliminates the need to calculate pairwise obstacle avoidance constraints between all members in real time during the optimization process, greatly reducing the burden on the optimizer and mathematically enhancing the overall collaborative safety of the system.

[0063] (4) It has strong scene adaptability and scalability.

[0064] The two-stage clustering method employed in this invention, consisting of "coarse clustering (turning points) + fine clustering (shape features)," can automatically and rationally group intelligent agents according to the distribution of obstacles in complex environments. Regardless of the increase in the size of the intelligent agents or the complexity of the environment, this framework can balance computational accuracy and speed by dynamically adjusting the number of clusters, demonstrating excellent engineering practicality. Attached Figure Description

[0065] Figure 1 This is a schematic diagram of a preferred embodiment of the pre-path generation method of the present invention.

[0066] Figure 2This is a diagram showing the pre-path generation result of a preferred embodiment of the present invention.

[0067] Figure 3 This is a diagram showing the pre-path clustering results of a preferred embodiment of the present invention.

[0068] Figure 4 This is a diagram showing the trajectory optimization results of an intelligent agent according to a preferred embodiment of the present invention. Detailed Implementation

[0069] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0070] This embodiment discloses a method for cooperative obstacle avoidance and trajectory optimization in a large-scale multi-agent system. In this embodiment, a two-dimensional space is assumed to contain several static obstacles, which are represented as circular regions. The center of the k-th obstacle is o. k The radius is r k The agent needs to maintain a safety margin (r) with obstacles during trajectory generation. s ,satisfy:

[0071]

[0072] A minimum safe distance d must be satisfied between intelligent agents. min (This constraint can serve as a trigger condition for either a hard constraint or a soft penalty). The agent dynamics preferably employ a double-integral model (position-velocity-acceleration), with a set upper limit on velocity v. max , acceleration upper limit a max Among them, v max a max r s d min A positive value can be determined by task requirements or platform capabilities. The planning time interval is [t]. o ,t f Discretized into T segments, with a step size of [missing information]. T can be set according to the requirements of real-time performance and accuracy, for example, T=50~300.

[0073] The specific steps in this embodiment are as follows:

[0074] S1, Pre-path generation

[0075] Figure 1 This illustrates the pre-path generation process in this embodiment.

[0076] To improve the convergence of subsequent solutions and reduce the risk of infeasibility, a "pre-path" (also called a baseline path) is first generated for the agent from the starting point to the target point. This path is required to avoid obstacles and be as smooth as possible. Specifically, it includes the following sub-steps:

[0077] (1) Segmented exploration and collision detection

[0078] Construct an initial line segment from the starting point to the target point, and perform an intersection check between this line segment and the set of obstacles. If there is no intersection, the line segment is retained as a part of the path. If there is an intersection, the obstacle that intersects with the target point first along the exploration direction is determined.

[0079] (2) Detour point generation and segment splitting

[0080] When a line segment intersects an obstacle, a detour point P is generated near the obstacle. d The detour point can preferably be obtained by "offsetting in the perpendicular direction of the exploration direction", and the offset can be slightly greater than r. k +r s The value (e.g., (1.05~1.5))(r) k +r s Then, the original line segment is split into two segments (from the starting point to the detour point, and from the detour point to the end point) and added to the queue to be explored. The above process is repeated until all line segments do not intersect with obstacles, thus obtaining a sequence of broken line path points formed by connecting the starting point, several detour points and the end point.

[0081] (3) B-spline smoothing fitting

[0082] Curve fitting is performed on the sequence of points along the broken line to obtain a smooth path, preferably using cubic B-splines. If the path points are insufficient for fitting (e.g., only the start and end points), at least one intermediate point (such as the midpoint between two points or a point inserted proportionally) is inserted to ensure fit.

[0083] (4) Smooth curve collision correction

[0084] Collision detection is performed on the smooth curve. If the curve still intersects with obstacles, local correction control points ("bump points") are inserted near the collision point. These points are oriented away from the obstacle's center and a safety offset is added. The curve is then fitted again and re-checked until a collision-free smooth pre-path is obtained. The pre-path P is obtained through these steps. prey (t), whose discrete representation is P prey,k .

[0085] In the simulation experiment of this embodiment, the results of pre-path generation for 100 agents are as follows: Figure 2 As shown.

[0086] S2, Constructing parameterized mappings

[0087] Based on the motion camouflage model, a fixed reference point P is selected in the environment. ref (Target point, environment center, or preset coordinates can be selected), introduce the time deformation parameter λ(t) to map the pre-path to the actual trajectory:

[0088]

[0089] Taking the first and second derivatives of this equation yields the velocity and acceleration:

[0090]

[0091]

[0092] Here, λ(t) can be represented continuously or discretely as a sequence λ in the simulation. k It also allows setting endpoint consistency to ensure that the start and end points do not shift:

[0093]

[0094] Wherein, λ(t) f ) represents the termination time t f The value of λ(t) when λ(t) f When )=1, the endpoint is completely determined by the reference (original) endpoint term, thus ensuring that the endpoint does not shift.

[0095] Velocity and acceleration are obtained using a difference approximation. Forward difference is used:

[0096]

[0097] Substituting these values ​​into the first and second derivative equations above, we can approximately obtain the discrete sequence of velocity and acceleration: Because of P ref With P prey,k The conditions were known before optimization and remained unchanged, therefore, during subsequent optimization processes... It can be completely represented as λ k The function. The deformation parameter sequence λ k As decision variables, construct an optimization problem for a single agent:

[0098]

[0099] objective function It consists of two parts: energy penalty and collision penalty, and is subject to both equality and inequality constraints. The specific expression is as follows:

[0100]

[0101] Among them, J e (•) Energy penalty:

[0102]

[0103] J c (•) represents the collision penalty term, defined piecewise according to the minimum agent spacing d:

[0104]

[0105] Where, w c >0 represents the weighting coefficient, and C1>C2>0, with d1 slightly smaller than the safety distance d. min d2 (slightly larger than the safety distance d) min The safety distance threshold in the simulation is represented by ( ). The constraint function is defined by inequality constraints. With equality constraints Composition, in which,

[0106] Defined as:

[0107]

[0108] This ensures that the intelligent agent is and The position at a given time coincides with the pre-path, thus ensuring that the target point is reached eventually. The inequality constraint is specifically defined as follows:

[0109] ,in , They are respectively exist and The value, , Let be the radius and center coordinates of the m-th obstacle, respectively. , These are the upper limits for speed and acceleration, respectively.

[0110] In solving this optimization problem, this embodiment preferably employs Sequential Quadratic Programming (SQP) to solve the discrete form λ of the time-mapped parameters. k This is a nonlinear constrained optimization problem for decision variables. SQP can be solved iteratively by constructing a quadratic programming subproblem through "quadratic approximation of the objective + constraint linearization". The Hessian matrix can be updated using positive definite approximations such as BFGS (Broyden–Fletcher–Goldfarb–Shanno). In each iteration, the Hessian matrix (or its inverse matrix) is updated using a quasi-Newtonian approach based on the variable increment and gradient difference between two adjacent iterations. The descent property and numerical stability of the search direction are guaranteed by maintaining the positive definiteness of the updated matrix. The iterative process of SQP is as follows: at the k-th iteration, the step direction is obtained by solving the QP subproblem. The step size coefficient is determined through line search or trust region strategy. Thus update

[0111]

[0112] The iteration stopping condition uses a joint criterion of KKT residuals and step size thresholds: when the residual norm corresponding to the Karush–Kuhn–Tucker (KKT) optimality condition is reached... Less than a given threshold And the update step size satisfies (or When convergence is reached, the iteration is terminated.

[0113] However, this invention does not limit the specific optimizer; without changing the principle of "constrained optimization with λ as the core low-dimensional variable," interior-point methods, augmented Lagrange methods, or projected gradients can also be used as alternatives. When the optimal λ is obtained... * (λ) * For λ k After optimizing the result using SQP, substituting it into the mapping formula yields the discrete trajectory points optimized by a single agent:

[0114]

[0115] Furthermore, the velocity and acceleration sequences can be recovered through forward differential analysis:

[0116]

[0117] Used as a reference for downstream controllers or directly for execution.

[0118] S3. Hierarchical clustering method based on machine learning

[0119] When the number of agents N is large, performing optimization independently for each agent would incur significant computational overhead. This embodiment reduces the overall complexity by employing a method of "hierarchical clustering + optimizing only the representative within the group (the leader) + deriving trajectories using shared parameters within the group".

[0120] First, use the steps in S1 to generate a prepath for each agent. Then, two-stage clustering is performed on all pre-paths:

[0121] (1) Coarse grouping

[0122] For each pre-path, the number of turning points or corners exceeds a threshold. Number of times ( Preferred selection The pre-path is then assigned to different coarse groups based on this statistic to reflect macroscopic geometric differences.

[0123] (2) Fine clustering

[0124] Within each coarse group, the pre-path is resampled to N. s N equally spaced points s(Preferably 50-200), the coordinates of the sampling points are concatenated and normalized to obtain the shape feature vector f. i Then, the KMeans clustering algorithm is used for further subdivision. The number of clusters can be selected based on metrics such as silhouette coefficient, resulting in a number of clusters. The pre-path shapes within each cluster are similar. Specifically, KMeans uses minimizing the intra-cluster squared error as its objective function:

[0125]

[0126] in, Let k be the centers of the c-th cluster. The algorithm first initializes k cluster centers, then iteratively executes two steps:

[0127] 1) Allocation steps: Allocate each sample f i Assigned to the cluster corresponding to the center with the closest Euclidean distance. ;

[0128] 2) Update steps: For each cluster c, update the center using the mean of the samples within the cluster. .

[0129] The above process is repeated until the objective function converges or the maximum number of iterations is reached. To avoid clustering... To mitigate the bias introduced by human intervention, this invention iterates through the candidate k range and selects the k with the largest silhouette coefficient as the optimal cluster number for the coarse group.

[0130] In the simulation experiment, the clustering results of 100 agents are as follows: Figure 3 As shown, the curves of different colors represent different groups of pre-paths.

[0131] S4, Navigator Optimization and Intra-Group Parameter Sharing Derivatives

[0132] After obtaining the hierarchical clustering results, for each cluster (subsystem) An integrated process of "navigator optimization - parameter sharing derivation - security review and remediation" is implemented to significantly reduce the number of optimization problems that need to be solved while ensuring security and executability.

[0133] For each cluster First, a leader agent is determined within the cluster. Unlike methods based on "closest to cluster center" or "shape representativeness," this embodiment employs a maximum feasible margin strategy to determine the leader; that is, for each candidate agent within the cluster... Based on its pre-path A feasibility margin index is calculated to measure the "safety margin" of the pre-path in satisfying constraints. The feasibility margin index is preferably composed of a combination of "minimum distance margin to obstacle boundaries" and "minimum distance margin to other agents." The obstacle margin (i.e., the minimum distance margin to obstacle boundaries) is defined as the minimum distance margin of the pre-path to the extended safety boundaries of each obstacle along the time domain. The intra-group margin (i.e., the minimum distance margin to other agents) is defined as the minimum relative distance threshold d between the pre-path and other pre-paths (or their sample point sets) in the same cluster. min The margin is calculated, and a weighted minimum or other equivalent method is used to form a comprehensive margin. Then, the agent with the largest comprehensive feasible margin is selected as the leader of the cluster, so that the subsequent optimization process, which only involves a few leaders, is more likely to remain feasible and converge more stably. It is also more conducive to satisfying the safety distance and obstacle avoidance constraints as a whole after sharing parameters within the cluster.

[0134] After the leader is determined, the parametric mapping and constraint optimization in step 2 are performed only on the leader of the cluster to obtain the corresponding discrete trajectory points. Specifically, the deformation parameter sequence of the cluster is used. As the sole or primary decision variable, the objective function and constraints are constructed based on the trajectory parameterization mapping relationship described above, and the optimal parameters for this cluster are obtained by using the constrained optimization method SQP. During this process, it is possible to simultaneously... Applying necessary boundary and smoothness constraints improves the feasibility of generating trajectories and reduces the risk of numerical instability. After solving the problem, the remaining non-leader agents within the cluster no longer construct the optimization problem in step 2 independently, but instead directly reuse the optimal parameters of the cluster. and their respective pre-paths Combined generation of derived trajectories:

[0135]

[0136] Since each agent has a different pre-path, the above parameter sharing will not cause all trajectories to overlap, but rather to maintain the "cooperative change" of trajectories in the same cluster in terms of morphology. This significantly reduces the number of optimization instances that need to be solved, while still maintaining the synergy within the cluster and individual differences.

[0137] Furthermore, to ensure the security of shared derivations within a group, this embodiment performs a rapid security re-check on the intra-cluster trajectory after derivation. This applies to any two agents within the same cluster. Its derived trajectory satisfies the relative displacement relationship:

[0138]

[0139] This indicates that there is a scaling correspondence between the relative geometric relationships within a group and the relative relationships of the pre-path. Based on this property, on the one hand, in navigator optimization, this can be achieved by... The range, lower bound, or rate of change of the values ​​are constrained to prevent the scaling process from over-compressing the minimum spacing within a group. On the other hand, after derivation, the minimum distance to obstacles and the minimum safe distance within a group are quickly checked. If a small number of agents are found to have insufficient feasibility margin at a local moment, an adaptive remedial process is triggered, that is, the agent is temporarily removed from the current cluster and the optimization process is performed separately. Through the above integrated steps of "maximum feasible margin leader + shared derivation + remedial check", cooperative trajectory results that meet the requirements of safe obstacle avoidance and have smooth executability can be obtained with low computational cost in large-scale multi-agent scenarios. Figure 4 The results of the agent trajectory optimization in this embodiment are shown.

[0140] The above description is merely a preferred embodiment of the method of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method for cooperative obstacle avoidance and trajectory optimization in large-scale multi-agent systems, characterized by: The specific steps are as follows: S1, Pre-path generation Generate a pre-path for the agent from the starting point to the target point, which avoids obstacles; S2, Constructing parameterized mappings By selecting a fixed reference point and introducing a time deformation parameter, the pre-path is mapped to the actual trajectory using a mapping method; the optimal λ is then obtained. * Then, substitute it into the mapping formula to obtain the discrete trajectory points; S3, Hierarchical Clustering Based on Machine Learning For each agent pre-path generated in step S1, perform two-stage clustering; S4, Navigator Optimization and Intra-Group Parameter Sharing Derivatives For each cluster, a leader agent is identified within the cluster. Parameter sharing derivation is performed on other non-leader agents in the same cluster as the leader agent to generate derived trajectories.

2. The method for cooperative obstacle avoidance and trajectory optimization in large-scale multi-agent systems as described in claim 1, characterized in that, Step S1 is as follows: (1) Segmented exploration and collision detection Construct an initial line segment from the agent's starting point to the target point, and perform an intersection detection between this line segment and the set of obstacles; if there is no intersection, the line segment is retained as a part of the path; If there is an intersection, then identify the obstacle that first intersects along the exploration direction; (2) Detour point generation and segment splitting When a line segment intersects an obstacle, a detour point P is generated near the obstacle. d The original line segment is split into two segments: from the starting point to the detour point and from the detour point to the end point. These segments are then added to the queue to be explored. The above process is repeated until all line segments do not intersect with obstacles, thus obtaining a sequence of broken line path points formed by connecting the starting point, at least one detour point, and the end point. (3) Smooth Fitting Curve fitting is performed on the sequence of points along the broken line path to obtain a smooth path; (4) Smooth curve collision correction Collision detection is performed on the smooth curve; if the curve intersects with an obstacle, a local correction control point is inserted near the collision, with the direction away from the obstacle's center and an offset increased. The curve is then fitted and collision corrected again until a collision-free smooth pre-path P is obtained. prey (t).

3. The method for cooperative obstacle avoidance and trajectory optimization in large-scale multi-agent systems as described in claim 2, characterized in that, In step S1 (2), the detour point is obtained by offsetting along the vertical direction of the exploration direction.

4. The method for cooperative obstacle avoidance and trajectory optimization in large-scale multi-agent systems as described in claim 2, characterized in that, In step S1 (3), a cubic B-spline is used; if the path points are insufficient for fitting, at least one intermediate point is inserted.

5. The method for cooperative obstacle avoidance and trajectory optimization in large-scale multi-agent systems as described in any one of claims 2-4, characterized in that, Step S2 is as follows: Select a fixed reference point P in the environment ref Introducing time deformation parameters Mapping the pre-path to the actual trajectory: Taking the first and second derivatives of this equation yields the velocity and acceleration: in, Continuous or discrete representation as a sequence And set endpoint consistency: Wherein, λ(t) f ) represents the termination time t f The value of λ(t) when λ(t) f When )=1, the endpoint is determined by the reference endpoint term; The velocity and acceleration limits are transformed into constraints on λ. k Constraint checks on its difference components; Solve with λ k For a nonlinear constrained optimization problem of decision variables, the discrete trajectory points after optimization by a single agent are obtained.

6. The method for cooperative obstacle avoidance and trajectory optimization in large-scale multi-agent systems as described in claim 5, characterized in that, In step S2, sequential quadratic programming (SQP) is used to solve for λ. k For nonlinear constrained optimization problems with decision variables, SQP constructs a quadratic programming subproblem through a quadratic approximation of the objective and constraint linearization, and iteratively solves it to obtain the optimal λ. * Then, substitute it into the mapping expression. The discrete trajectory points are obtained: 。 7. The method for cooperative obstacle avoidance and trajectory optimization in large-scale multi-agent systems as described in claim 6, characterized in that, Step S3 is as follows: Generate a pre-path for each agent Then, two-stage clustering is performed on all pre-paths: (1) Coarse grouping For each pre-path, the number of turning points or corners exceeds a threshold. The number of occurrences is used to classify the pre-path into different coarse groups based on the statistical value. (2) Fine clustering Within each coarse group, the pre-path is resampled to N. s The shape feature vector f is obtained by concatenating and normalizing the coordinates of the sampling points at equal intervals. i Then, the KMeans clustering algorithm is used for further subdivision, ultimately resulting in several clusters. .

8. The method for cooperative obstacle avoidance and trajectory optimization in large-scale multi-agent systems as described in claim 7, characterized in that, Step S4 is as follows: After obtaining the hierarchical clustering results, for each cluster... First, identify the leader agent within the cluster; After the leader is determined, parametric mapping and constraint optimization are performed on the leader of the cluster; specifically, the deformation parameter sequence of the cluster is used. As decision variables, the objective function is constructed by combining the aforementioned trajectory parameterization mapping relationship. With constraints The optimal parameters of the cluster are obtained by using the constrained optimization method SQP. After the solution is completed, the other non-leader agents within the cluster directly reuse the optimal parameters of the cluster. and their respective pre-paths Combined generation of derived trajectories: 。 9. The method for cooperative obstacle avoidance and trajectory optimization in large-scale multi-agent systems as described in claim 8, characterized in that, In step S4, the leader is determined using a maximum feasible margin strategy, as follows: For each candidate agent within the cluster... Based on pre-path A feasibility margin index is calculated to measure the safety margin of the pre-path in satisfying constraints. This index consists of the "minimum distance margin with obstacle boundaries" and the "minimum distance margin with other agents." The minimum distance margin with obstacle boundaries is defined as the minimum distance margin of the pre-path to the extended safety boundaries of each obstacle along the time domain. The minimum distance margin with other agents is defined as the minimum relative distance threshold d between the pre-path and other pre-paths in the same cluster. min The margin is determined and a comprehensive margin is formed. The agent with the largest feasible margin index is selected as the leader of the cluster.

10. The method for cooperative obstacle avoidance and trajectory optimization in a large-scale multi-agent system as described in claim 9, characterized in that, In step S4, after completing the derived trajectory, a security re-check is performed on the trajectory within the cluster; for any two agents in the same cluster... Its derived trajectory satisfies the relative displacement relationship: Based on the above relationships, in the optimization of the navigator... The range, lower bound, or rate of change of the value are constrained; after derivation, the minimum distance to the obstacle and the minimum safe distance within the group are checked. If the agent is found to have insufficient feasibility margin, an adaptive remediation process is triggered, that is, the agent is temporarily removed from the current cluster and the optimization process is executed separately.