Multi-robot cooperative control system and method combining large language model and physical diagnosis

By constructing a physical diagnostic engine and a causal attribution analyzer, and combining a multi-strategy parallel iteration mechanism, the problems of low diagnostic accuracy and low optimization efficiency in multi-robot collaborative control systems are solved, and efficient multi-robot collaborative control is achieved.

CN123129153APending Publication Date: 2026-11-20EAST CHINA NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611345129.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing multi-robot collaborative control systems lack physically interpretable diagnostic mechanisms, performance attribution and priority decision-making mechanisms, and multi-strategy parallel exploration mechanisms, resulting in low diagnostic accuracy, low optimization efficiency, and a tendency to get trapped in local optima.

Method used

A physical diagnostic engine is constructed to perform quantitative deviation calculation. Combined with a causal attribution analyzer and a priority sorter, a closed-loop adaptive optimization framework is formed through a multi-strategy parallel iterative mechanism to achieve fully automatic generation, quantitative diagnosis, and intelligent iterative optimization of multi-robot collaborative control code.

Benefits of technology

It improves the diagnostic accuracy and optimization efficiency of multi-robot collaborative control, realizes unmanned intelligent iteration throughout the entire process, and enhances the system's adaptability and generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123129153A_ABST
    Figure CN123129153A_ABST
Patent Text Reader

Abstract

The application discloses a large language model combined with physical diagnosis multi-robot cooperative control system and method, the system comprises a physical diagnosis engine, a causal attribution analyzer, a priority sorter, a strategy pool manager, a parallel code generator and a version evaluator; the physical diagnosis engine collects real-time state of the robot, quantitatively calculates deviation relying on a physical model and outputs explainable diagnosis information; the causal attribution analyzer distinguishes the root cause of performance exceeding the standard from derivative problems; the priority sorter dynamically adjusts index optimization weight, estimates improvement effect of the optimization scheme and sorts; the strategy pool manager manages standardized optimization strategies, supports the large model to generate new strategies and intelligently matches; the parallel code generator generates candidate control codes in batches; and the version evaluator simulates and verifies the candidate codes, and multi-dimensionally evaluates and filters the optimal version. The application can improve diagnosis accuracy, optimization efficiency and intelligent level of the multi-robot cooperative control system, and realizes fully automatic performance-driven optimization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robot control technology, and in particular to a multi-robot collaborative control system and method that combines a large language model with physical diagnostics. Background Technology

[0002] Multi-robot cooperative control technology is a research hotspot in the field of robotics, and in recent years it has mainly developed along two technical routes: The first category is traditional algorithm development methods. Traditional multi-robot simulation platforms internally implement various classic control algorithms, including path planning algorithms such as control barrier function algorithms, fast exploration random tree algorithms, and ant colony algorithms, as well as cooperative algorithms such as formation control and swarm control. The characteristics of this type of system are that the algorithm logic is manually designed, the parameters are fixed and difficult to adaptively adjust, requiring long-term development and debugging by professionals. Optimization methods mainly construct objective functions through mathematical descriptions, and then use evolutionary algorithms to optimize the generation strategy. However, this still has the limitations of manually designed functions and cannot adapt to open-ended natural language commands.

[0003] The second category is code generation methods based on large language models. New-generation intelligent systems, represented by GenSwarm, utilize the code generation capabilities of large language models to automatically generate multi-robot control code based on natural language task descriptions. This type of system implements end-to-end functionality, providing a complete solution from user instructions to executable code, including constraint pooling analysis systems, function design modules, multi-layered function generation methods, automatic code checking systems, error feedback mechanisms, and visual feedback systems.

[0004] Despite significant advancements in existing technologies, the following technical challenges remain.

[0005] First, there is a lack of physically interpretable diagnostic mechanisms. Existing systems primarily rely on the direct output of large language models to diagnose performance gaps in control codes, lacking quantitative analysis based on physical models. When the root mean square error of the formation exceeds the limit, the system cannot automatically calculate the position deviation vector of each robot relative to the target formation; when the convergence time is too long, it cannot quantitatively analyze the impact of each control parameter on the convergence speed; and when energy consumption is too high, it cannot identify invalid oscillations or redundant actions in the control signal.

[0006] Second, there is a lack of performance attribution and prioritization mechanisms. When multiple performance metrics fail to meet standards simultaneously, existing systems lack effective prioritization mechanisms. For example, exceeding convergence time and exceeding formation root mean square error may be causally related—the former may be the root cause, and the latter may be a derivative result. Code improvements to existing methods heavily rely on external visual language model video analysis and human natural language feedback, as well as a limited number of scalar parameters. They cannot perform automated closed-loop iterative optimization based on the system's underlying real-time performance metrics, cannot provide specific parameter adjustment suggestions for large language models, cannot dynamically adjust optimization weights according to task objectives, and cannot predict the expected improvement magnitude of each candidate improvement scheme for different performance metrics.

[0007] Third, there is a lack of a multi-strategy parallel exploration mechanism. Existing system code improvements employ a serial iterative approach, generating only one improved version at a time. This approach has limitations: low iteration efficiency, each optimization cycle can only explore a single improvement direction, and it is prone to getting trapped in local optima. Without a predefined strategy knowledge base and a parallel generation mechanism, the system struggles to effectively explore and backtrack along the optimization path.

[0008] In summary, there is an urgent need in this field for a closed-loop adaptive optimization framework that integrates physical quantitative diagnosis, multi-indicator causal attribution, multi-strategy parallel iteration, and automatic code evolution to achieve unmanned intelligent iteration of the entire process of multi-robot collaborative control. Summary of the Invention

[0009] This invention provides a multi-robot collaborative control system and method that combines a large language model with physical diagnosis. It achieves quantitative deviation calculation by constructing a physical diagnosis engine, intelligent decision-making by performance attribution and priority ranking, and efficient exploration by a multi-strategy parallel iterative mechanism, thus forming a complete generation-diagnosis-attribution-optimization closed loop. This enables fully automatic generation, quantitative diagnosis, and intelligent iterative optimization of multi-robot collaborative control code, improving the diagnostic accuracy, optimization efficiency, and intelligence level of multi-robot collaborative control.

[0010] To achieve the above objectives, the present invention provides the following solution: A multi-robot cooperative control system combining a large language model and physical diagnostics includes: The physical diagnostic engine is used to acquire real-time status data of a multi-robot system, perform quantitative deviation calculation on the status data based on a physical model, and map the calculation results into interpretable natural language diagnostic information. The causal attribution analyzer is used to determine the causal relationship between various performance indicators exceeding the standard based on natural language diagnostic information and causal inference methods, and to identify the root causes and derivative results of performance optimization. The priority sorter is used to dynamically adjust the optimization weights of each performance indicator according to the task objective, and to estimate the expected improvement of each optimization scheme on the performance indicators through lightweight simulation, thereby completing the priority sorting of optimization suggestions. The strategy pool manager is used to manage a variety of predefined iterative optimization strategies. Each strategy is bound to trigger conditions, parameter adjustment rules, parameter value limits, security risk constraints, and rollback rules. It also supports the dynamic generation of new optimization strategies from large language models and the matching and output of appropriate optimization strategies based on the current diagnostic results. The parallel code generator is used to iteratively generate multiple candidate control codes in parallel based on the current best control code, standardized diagnostic information, and the adaptation optimization strategy output by the policy pool manager, and to perform multi-dimensional constraint verification to filter out invalid codes. The version evaluator is used to deploy the verified candidate control code to the simulation environment for multi-dimensional performance evaluation and to select the version with the best overall performance.

[0011] This invention also provides a multi-robot cooperative control method combining a large language model and physical diagnostics, applied to the aforementioned multi-robot adaptive cooperative control system, comprising the following steps: Initialization steps: Load configuration file, initialize large language model client, establish connection with simulation environment, and load policy pool knowledge base; Task parsing steps: Receive the natural language task description and parse the constraints, extracting parameters such as the number of robots, formation type, safe radius, and maximum speed; Initial code generation steps: Construct prompt words based on task description and constraints, call the large language model to generate initial control code, and perform syntax checking and constraint verification on the initial control code; Simulation execution steps: Deploy the generated initial control code to the simulation environment, control the robot to perform tasks, and collect status data in real time; Performance evaluation steps: Calculate the convergence time, root mean square error of the formation, and control energy performance indicators, compare them with the target threshold, and determine whether optimization needs to be triggered; Physical diagnostic steps: When performance does not meet the target, the physical diagnostic engine is invoked to perform quantitative deviation analysis, generating diagnostic information and improvement suggestions containing specific values; Attribution ranking steps: Call the causal attribution analyzer to determine the causal relationship of each performance index, determine the optimization priority, and dynamically adjust the optimization weight through the priority ranking algorithm; Strategy selection steps: Select a suitable combination of iterative optimization strategies from the strategy pool based on the diagnostic results and attribution analysis; Parallel generation steps: Based on the current optimal version and the selected iterative optimization strategy, multiple candidate control codes are generated simultaneously; Version evaluation steps: Perform performance evaluation and simulation verification on each candidate control code, and select the version with the best overall performance; Path management steps: Record the optimization path, and trigger the backtracking mechanism when the improvement goal is not achieved in multiple consecutive rounds; Output steps: Output the optimal version of the candidate control code and performance report, and publish standardized performance metrics.

[0012] According to specific embodiments provided by the present invention, the technical effects of the multi-robot collaborative control system and method combining large language model and physical diagnosis provided by the present invention are mainly reflected in: (1) Possesses physical quantitative interpretable diagnostic capabilities, solving the defects of pure large model diagnosis without quantitative basis and low credibility: Set up an independent physical diagnostic engine, rely on the robot physical model to complete the quantitative calculation of indicators such as position deviation, convergence speed, and control oscillation, and output standardized natural language diagnostic content with numerical values. It does not rely on the subjective inference of diagnostic conclusions from large language models, and has high diagnostic accuracy, quantifiable results, and interpretable physical logic.

[0013] (2) Realize the differentiation of causes and effects of multi-indicator failures and intelligent weight allocation, and optimize the decision-making of targets more scientifically: the causal attribution analyzer distinguishes the root causes and derivative problems when multiple performance indicators exceed the standard, and the priority sorter dynamically adjusts the optimization weight of each indicator according to the task requirements. The improvement effect of different optimization schemes is predicted through lightweight simulation.

[0014] (3) Standardized strategy pool and dynamic generation of large model dual mode, comprehensive optimization strategy coverage and strong adaptability: The strategy pool manager has a variety of mature optimization strategies built in, with complete trigger conditions, parameter constraints and safety rollback logic. At the same time, it supports the large language model to generate new optimization strategies in real time based on the diagnostic results, which can adapt to complex and ever-changing robot formation tasks.

[0015] (4) Parallel generation of multiple candidate codes + pre-existing multi-dimensional constraint verification, simultaneously improving iteration efficiency and code reliability. The parallel code generator outputs multiple sets of differentiated candidate control codes in a single iteration, and pre-existing multi-dimensional constraint verification filters out invalid codes with dimensional, security, and data logic errors.

[0016] (5) Multi-dimensional simulation comprehensive evaluation and selection of the best global control scheme, reducing manual intervention: The version evaluator uniformly simulates all effective candidate codes and can quantitatively evaluate from multiple dimensions such as convergence time, formation accuracy, energy consumption, and safety distance. It automatically selects the version with the best comprehensive performance, realizes unmanned iterative optimization throughout the process, and greatly reduces the debugging workload of professionals.

[0017] (6) The entire set of modules forms a complete closed-loop optimization link, greatly enhancing the system's automation and adaptability: the modules of physical diagnosis, causal attribution, weight ranking, strategy matching, parallel code generation, and simulation optimization work together to form a fully automatic optimization closed loop, eliminating the need for manual intervention to analyze faults, design parameter tuning schemes, and screen control codes; it can autonomously complete the entire process of generation-diagnosis-attribution-optimization, adapting to various complex multi-robot collaborative scenarios such as V-shaped formation and circular obstacle avoidance, and significantly improving the system's adaptability and generalization capabilities. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a core framework diagram of the multi-robot collaborative control system combining a large language model and physical diagnosis, as described in an embodiment of the present invention. Figure 2 This is a flowchart of a multi-robot collaborative control method combining a large language model with physical diagnostics, as described in an embodiment of the present invention. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] This invention provides a multi-robot collaborative control system and method that combines a large language model with physical diagnosis. The core innovations include three aspects: First, a physical diagnosis engine that performs quantitative deviation calculation based on a physical model and maps the calculation results to natural language diagnostic information; second, performance attribution and priority ranking that uses causal inference to determine the root causes and derivative relationships of performance indicators and dynamically adjusts optimization weights; and third, a multi-strategy parallel iteration mechanism that supports the parallel exploration and optimal retention of various optimization paths, such as aggressive strategies, conservative strategies, structural reconstruction strategies, and multi-objective balancing strategies.

[0022] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0023] like Figures 1-2As shown in the embodiment of the present invention, the multi-robot collaborative control system combining a large language model and physical diagnosis mainly includes: a physical diagnosis engine, a causal attribution analyzer, a priority sorter, a policy pool manager, a parallel code generator, a version evaluator, and a path backtracking controller. These modules work collaboratively to form a complete adaptive optimization closed loop. A detailed description of each module is as follows: (1) Physical diagnostic engine The physical diagnostic engine is one of the core components of this invention. Its function is to quantitatively calculate performance deviations based on real-time status data and map the calculation results into natural language diagnostic information. This engine contains six diagnostic modules: The real-time status data acquisition and preprocessing module acquires status data such as the position, speed, control input, target formation position, control parameters, energy consumption, and task time of each robot in real time when the robot formation system is running. It then performs time synchronization, coordinate unification, outlier removal, and filtering on the status data to form standardized status data that can be used for subsequent physical diagnostic calculations.

[0024] The position deviation vector calculation module calculates the position deviation vector of each robot relative to the desired formation position after obtaining the actual position of each robot and the target formation position. It quantitatively obtains the magnitude and direction of the deviation for each robot, providing basic calculation results for subsequent formation error diagnosis.

[0025] The formation root mean square error diagnosis module automatically calculates the position deviation vector of each robot relative to the target formation position when it detects that the formation accuracy does not meet the requirements. It identifies the robot number and deviation direction with the largest deviation and generates accurate diagnostic information such as robot 3 being 0.35 meters to the left of the expected formation position.

[0026] The convergence time diagnosis module, when it detects that the convergence speed is too slow, calls the control parameter sensitivity analysis unit to quantitatively calculate the gradient of the influence of each control parameter on the convergence speed through analytical models or numerical perturbation methods, and generates specific parameter-level suggestions such as increasing the proportional gain coefficient or decreasing the system damping coefficient.

[0027] The energy consumption diagnostic module analyzes the degree of change in the control signal when it detects excessive energy consumption, identifies invalid oscillations or redundant operating modes, and generates improvement suggestions such as adding differential control to smooth the control signal when lateral oscillations are detected.

[0028] The diagnostic result mapping and natural language generation module maps the calculation results, such as positional deviation, root mean square error, parameter sensitivity gradient, control signal oscillation degree, and energy anomaly type, into natural language diagnostic text after each diagnostic module completes quantitative calculations, generating user-interpretable diagnostic information. This module uses preset rules, threshold judgment, and templated language generation methods to directly generate diagnostic conclusions without relying on large language models, thus ensuring the stability and repeatability of the diagnostic text.

[0029] (2) Causal attribution analyzer The causal attribution analyzer is used to determine the causal relationship between various performance indicators exceeding the standard based on natural language diagnostic information and causal inference methods, and to identify the root causes and derivative results of performance optimization. The system employs causal inference to analyze the causal relationships between performance indicators exceeding limits. For instance, when both the root mean square error (RMSE) and convergence time exceed limits simultaneously, attribution analysis determines that the convergence time exceedance is the root cause, since calculating formation accuracy is meaningless when the robot is not in a convergent state. Based on this, the system prioritizes convergence time exceedance as a key optimization objective.

[0030] (3) Priority sorter The priority sorter is used to dynamically adjust the optimization weights of each performance indicator according to the task objective, and to estimate the expected improvement of each optimization scheme on the performance indicators through lightweight simulation, thereby completing the priority sorting of optimization suggestions. Specifically, the optimization weights of each performance indicator are automatically adjusted based on the current task's objective: when the task objective is task priority, convergence time and success rate have higher weights; when the task objective is energy saving priority, energy consumption has a higher weight. The weight adjustment results directly affect the output ranking of optimization suggestions.

[0031] (4) Policy Pool Manager The strategy pool manager is used to manage a variety of predefined iterative optimization strategies. Each strategy is bound to trigger conditions, parameter adjustment rules, parameter value limits, security risk constraints, and rollback rules. It also supports the dynamic generation of new optimization strategies from large language models and the matching and output of appropriate optimization strategies based on the current diagnostic results. The policy pool manager predefines several iterative policies with different optimization tendencies: aggressive policies, which significantly adjust control parameters and are suitable for situations with large performance differences; conservative policies, which fine-tune parameters and are suitable for near-optimal situations; structural restructuring policies, which modify algorithm logic, such as switching from proportional-integral-derivative control to model predictive control; and multi-objective balancing policies, which simultaneously optimize multiple performance metrics to achieve overall performance improvement. Policies can be stored in a policy knowledge base or dynamically generated by a large language model at runtime.

[0032] (5) Parallel code generator A parallel code generator iteratively generates multiple candidate control codes based on the current optimal control code, standardized diagnostic information, and the adaptation optimization strategy output by the policy pool manager. It then performs multi-dimensional constraint verification to filter out invalid codes. This multi-dimensional constraint verification includes seven dimensions: array shape verification (confirming that all array dimensions match the number of robots and the state dimension); data type verification (confirming that all variable types remain consistent during computation); robot number index verification (confirming that all indices are within a valid range); speed limit verification (confirming that the control output does not exceed the preset maximum speed); broadcast operation verification (confirming that array broadcast operations are semantically correct); safety distance constraint verification (confirming that the collision avoidance logic is correctly implemented); and control input dimension verification (confirming that the control output dimension matches the robot state dimension).

[0033] (6) Version evaluator The version evaluator is used to deploy the verified candidate control code to the simulation environment for multi-dimensional performance evaluation and to select the version with the best overall performance.

[0034] The version evaluator implements lightweight effect prediction. Before sending improvement suggestions to the large language model, it uses a rule engine or lightweight model to predict the expected improvement of each candidate improvement scheme on each performance metric, helping to make a better choice among multiple candidate schemes.

[0035] The version evaluator is configured to: evaluate the performance of multiple candidate versions generated in parallel using multi-dimensional performance metrics, including convergence time, formation accuracy, energy consumption, and robustness; and select the optimal version as the starting point for the next iteration based on the comprehensive score.

[0036] (7) Path backtracking controller The path backtracking controller is used to automatically backtrack to the previous branch point and switch to another strategy path to continue iteration when there is no significant improvement in a certain strategy path for several consecutive rounds. The path backtracking controller is further configured to: when path backtracking is triggered, select the backtracking version based on the security status and performance improvement of the current version; if the current version has a security violation, backtrack to the most recent secure version; if the current version has no security violation but the performance improvement is less than a preset threshold, backtrack to the parent version with the best performance; if multiple rounds of iteration optimization fail to achieve the improvement target, backtrack to the initial version and use a different strategy type.

[0037] In addition, the multi-robot adaptive cooperative control system includes a behavior library update module, which automatically adds validated and significantly performance-enhancing optimized code, control strategies, and diagnostic experience to the behavior library. Each entry in the behavior library includes at least the task type, number of robots, formation geometry parameters, initial performance indicators, diagnostic conclusions, adopted strategies, parameter values ​​before and after adjustment, final code snippets, and performance improvement. When the similarity between a subsequent task and an entry in the behavior library exceeds a preset threshold, the system uses that entry as a reference for initial code generation or parameter initialization. The similarity calculation comprehensively considers differences in the number of robots, similarity in formation geometry, task spatial scale ratio, and constraint similarity.

[0038] In the specific implementation process, such as Figure 1 As shown, the system input is divided into two categories of external inputs: natural language task description 10 and task constraints 20. First, the task parameters are parsed by the natural language parsing module 101 and transmitted to the large language model client 102. Then, the initial control code is generated by the initial code generation module 103 and delivered to the parallel code generator 104. Invalid code is filtered by the multi-dimensional constraint verification module 105. Valid code is then sent to the simulation environment / multi-robot system 106 for execution. Simultaneously, the real-time status data acquisition module 107 continuously collects raw data such as robot position, speed, energy consumption, and formation error, and sends it to the physical diagnostic engine 108 to complete quantitative deviation calculation. The diagnostic results are input to the causal attribution analyzer 109 to distinguish between root causes and derived indicators of the fault. This is then passed to the priority sorter 110 to dynamically configure optimization weights. The strategy pool manager 111 then retrieves aggressive / conservative / structural reconstruction / multi-objective balance optimization strategies. The strategies are fed back to the parallel code generator to generate new candidate codes, which are then scored and selected by the version evaluator 112 using multi-dimensional simulation. If the iteration does not improve the situation, the path backtracking controller 113 automatically switches to the optimization branch. After the iteration reaches the target, the result output module 115 outputs the optimal control code 30, the performance evaluation report 40, and the standardized performance index 50. At the same time, the behavior library update module 114 stores the mature solution that meets the target into the knowledge base, which can be directly reused for similar tasks in the future, forming a self-evolving closed loop.

[0039] Combination Figure 2 The flowchart below illustrates the complete execution logic of the control method of this invention step by step: Initialization and Task Parsing Phase (S101~S104, D101): After the process starts, the S101 initialization step is executed, loading the global configuration, connecting the large language model client and the simulation environment, and loading the policy pool knowledge base; then, the S102 task parsing step is entered, reading the external natural language task description and constraints, and extracting key parameters such as the number of robots, formation, safety distance, and speed threshold; S103 constructs prompt words based on the parsed information and calls the large language model to generate the initial collaborative control code; S104 performs syntax verification and multi-dimensional physical constraint verification on the initial code. The D101 branch determines whether the code verification fails, and if it fails, it returns to S103 to regenerate the code; if the verification passes, it enters the simulation execution phase.

[0040] Simulation Operation and Performance Compliance Determination (S105~S106, D102): S105 deploys compliant code to the multi-robot simulation environment, driving the robots to perform formation tasks and periodically collecting real-time status data of the entire machine; S106 quantifies and calculates multi-dimensional performance indicators such as formation root mean square error, convergence time, and total energy consumption based on the collected data, and compares them with the target thresholds. D102 determines: if all performance indicators meet the target requirements, proceed directly to the S114 result output step; if the indicators exceed the standards, proceed to the physical diagnosis and optimization link.

[0041] Physical diagnosis, causal attribution, and optimization strategy matching (S107~S109): S107 calls the physical diagnosis engine, relies on the robot's physical dynamics and formation geometry model to complete the quantitative deviation solution, and outputs a standardized diagnostic report with numerical quantification results; S108 uses the causal attribution analyzer to distinguish the root causes and derivative problems of each exceeding indicator, and the priority sorter dynamically allocates the optimization weight of each indicator; S109 combines the diagnostic conclusions and attribution results, and matches the appropriate iterative optimization strategy combination from the strategy pool manager.

[0042] Parallel generation and validity verification of multiple candidate codes (S110~S111, D103): S110 uses the current optimal control version as a base and combines the selected optimization strategy to generate multiple sets of differentiated candidate control codes in parallel; S111 performs multi-dimensional constraint verification on all candidate codes. The D103 branch determines whether there are valid candidate codes: if no valid candidate codes exist, the S113 path management step is executed, triggering strategy backtracking and returning to S109 to re-match the optimization strategy; if valid candidate codes exist, the version evaluation process begins.

[0043] Version selection and iteration backtracking judgment (S112, D104, S113): S112 simulates all valid candidate code independently, completes multi-dimensional performance quantification evaluation, and selects the version with the best overall performance as the benchmark for this round; D104 judges the effect of iteration optimization: if the performance improvement in multiple consecutive rounds does not reach the preset threshold, the path management step S113 is executed to record the optimization trajectory, backtrack to the historical best stable version and switch the optimization strategy path, and return to S109 to iterate again; if there is a significant performance improvement in this round, the result output process is directly entered.

[0044] Results output and behavior library self-update closed loop (S114~S115): S114 outputs the optimal control code, complete performance evaluation report and standardized quantitative performance indicators; S115 executes the behavior library update logic. When the overall performance improvement of the optimal code reaches the standard and all safety constraints are met, the task parameters, diagnostic records, optimization strategies and final control code are completely stored in the behavior library; after the process is completed, the overall closed loop ends.

[0045] The following two examples, one involving five robots in a V-formation and the other involving six robots in a circular formation, are both based on... Figure 1 System hardware and software architecture, following Figure 2 The standardized process completes the simulation iteration.

[0046] Example: Five-robot V-formation formation control example This embodiment takes the control task of controlling a five-robot V-formation as an example to illustrate the control method of the control system of the present invention in detail, which specifically includes the following steps: 1.1 Task Initialization The module initializes configuration files and constraints (including common parameters such as safe radius, maximum linear velocity, maximum angular velocity, target convergence time, root mean square error, energy threshold, and error threshold), loads environmental obstacle parameters, initializes the large language model client, establishes a connection with the simulation test environment, loads the policy pool knowledge base, and prepares a reference code template library that can be automatically learned and supplemented during operation.

[0047] The system receives a natural language task description from the user: Control five robots to form a V-shaped formation with a spacing of 1 meter and an included angle of 90°, and move them from the initial area to the target point. Nearby, robots are required to maintain a safe distance from each other and complete formation convergence as quickly as possible.

[0048] The system parses the natural language task and obtains the following task constraints: the number of robots is five, denoted as... The formation type is V-shaped; the target point coordinates are set to... The robot's safe distance is set to The maximum linear velocity of a single robot is set to The maximum angular velocity of a single robot is set to The target convergence time is set to The root mean square error of the target formation is set to be no greater than [value missing]. The target control energy is set to be no greater than a preset energy threshold. ; The relative positions of the targets in the V-shaped formation are: As the navigation robot, the target's relative position is ; Located to the right rear, the target's relative position is ; Located to the left rear, the target's relative position is ; Located further to the right and rear, the target's relative position is ; Located further to the left and rear, the target's relative position is The relative positions mentioned above are referenced to the navigator robot's coordinate system and are updated in real time as the navigator robot moves, based on its position and heading. The navigator robot's current heading is defined as forward, with forward direction defined as 0° in the local coordinate system. The counter-clockwise direction is defined as the positive direction, and the polar coordinate angles to the left and right rear are determined according to this local coordinate system.

[0049] 1.2 Initial Control Code Generation At the initial moment of the simulation, the five robots are located at (0,0), (0.4,0.2), (-0.3,0.5), (0.2,-0.4), and (-0.5,-0.2) respectively, with an initial velocity of zero and an initial heading angle of 0°.

[0050] The system constructs prompt words based on the task parsing results and calls the large language model to generate initial multi-robot cooperative control code, including state reading function, target position calculation function, control input calculation function, speed limiting function, collision avoidance function, and main control loop function.

[0051] The initial control code includes the following control logic: the lead robot generates the desired speed based on the target point direction; the follower robots calculate the position error based on their current position and the relative position of the target formation; each robot generates a control speed using proportional control; the controller limits the speed commands to ensure they do not exceed the maximum linear velocity and maximum angular velocity; the controller incorporates collision avoidance measures to ensure the distance between robots is not less than a safe distance. The initial control law can be expressed as:

[0052] in: Indicates the first The control input for the robot; Indicates the position error proportional gain; Indicates the first The positional deviation vector of each robot relative to the target formation position; This indicates the collision avoidance control item.

[0053] The initial parameters are set as follows: position scaling gain Collision avoidance gain Speed ​​smoothing coefficient Control cycle Among them, the speed smoothing coefficient Used to smooth control inputs, the smoothing formula is:

[0054] Under this definition, The smaller the value, the lower the proportion of the current control input, and the smoother the control.

[0055] After generating the initial code, the system performs seven-dimensional constraint verification for semantics, including array shape verification, data type verification, robot number index verification, velocity limit verification, broadcast operation verification, safety distance constraint verification, and control input dimension verification. Once verification is successful, the code is deployed to the simulation environment for execution.

[0056] If verification fails, the system will send the error type, error location, and repair suggestions to the large language model to regenerate or partially repair the control code.

[0057] 1.3 Simulation Execution and Status Data Acquisition During the simulation execution, the system follows The control cycle collects the status data of each robot in real time, including: the robot's current position. Robot's current speed Robot's current heading angle Robot control input Robot target formation position Current task execution time Control energy accumulation value The system performs time synchronization, coordinate unification, and outlier removal on the above data. For example, if the location data collected at a certain moment changes by more than [a certain amount], [the system will detect an outlier]. If the transition cannot be explained by the maximum speed constraint, the state point is identified as an abnormal sampling point and corrected by interpolation using the two valid sampling points before and after it.

[0058] 1.4 Performance Index Calculation After the simulation ends or the maximum simulation time is reached, the system calculates the following performance metrics.

[0059] First, the root mean square error of the formation: ,in, .

[0060] Second, single robot positional deviation: .

[0061] Third, convergence time. The system determines continuity. The system is considered to have converged when the following conditions are met: ; And the distances between all robots satisfy the following: ; Fourth, control energy: .

[0062] In the initial code simulation results of this embodiment, the system obtained the following convergence time: The root mean square error of the formation is The maximum single robot position deviation is The robot with the largest deviation is Control energy to be higher than the target threshold by approximately Due to convergence time Greater than the target convergence time And the root mean square error of the formation Greater than the target threshold The system triggers a physical diagnostic process.

[0063] The system further diagnoses the control energy consumption to determine whether the high energy is caused by oscillations. Within a sliding window of ten control cycles, the system calculates the rate of change of the control input:

[0064] in, The length of the sliding window. Indicates the first The robot in the first The control input for each control cycle.

[0065] The system sets a preset oscillation threshold. An invalid oscillation is determined to exist when both of the following conditions are met simultaneously: And the duration exceeds The input direction is controlled to reverse multiple times within a continuous window, i.e., satisfying the following conditions:

[0066] in, This is a sign function; a negative value indicates a reversal of direction.

[0067] In this embodiment, the system analyzes the control input sequence to detect the rate of change of the transverse control component. achieve Furthermore, five directional reversals occurred within the sliding window, exceeding the preset threshold. Therefore, the system determined that invalid oscillations existed, and that the oscillations mainly occurred in the lateral control component.

[0068] Based on the diagnostic conclusion of oscillation, the system generates corresponding parameter adjustment suggestions: if the oscillation mainly occurs in the lateral control component, increase the damping coefficient. Alternatively, reduce the velocity smoothing coefficient; if the oscillation mainly occurs in the collision avoidance term, reduce the collision avoidance gain. Alternatively, the smooth range of the collision avoidance action can be expanded. In this embodiment, the system determines that the damping coefficient should be increased. and reduce the speed smoothing coefficient. The current control input percentage is used to suppress oscillations.

[0069] 1.5 Rules for determining the magnitude of positional deviation To determine whether the robot's positional deviation is too large, the system pre-sets the following deviation levels: when the single robot's positional deviation... When, it is judged as a slight deviation; when When, it is judged as an acceptable deviation; when When, it is judged as a large deviation; when At that time, it was judged as a serious deviation.

[0070] In this embodiment, Position deviation is greater than Therefore, it was determined to be a serious deviation. The system further calculates the direction of the deviation: ; If the calculation yields: ; then it means Deviation to the left relative to the desired formation position , deviate forward Based on this, the system generates a natural language diagnostic result: Robot 3 has a serious deviation from the expected V-shaped formation position, with a deviation magnitude of [missing value]. Horizontally to the left Vertical forward deviation The current formation error is mainly caused by the following lag of robots three and five.

[0071] 1.6 Attribution Judgment for Convergence Time Exceeding Limits When the system detects that both convergence time and formation error exceed the limits, the causal attribution analyzer determines the causal relationship between the two. The specific judgment rule is as follows: if the robot speed remains unstable in the later stages of the simulation, and If the trend continues downward, the system is determined not to have converged sufficiently. If the system has not converged sufficiently, the current excessive formation error may be a consequence of insufficient convergence. If the convergence time exceeds the limit, the confidence level is higher than [missing information]. If the system has already converged, then prioritize optimizing the convergence speed. If the error still exceeds the limit, then priority is given to optimizing the formation geometry accuracy. In this embodiment, the system detected... exist to The speed continued to decrease within the specified range, and the robot's speed had not yet entered a stable range. Therefore, the system determined that: the excessive convergence time was the root cause; the excessive formation error was a derivative problem; the first optimization objective was to shorten the convergence time; the second optimization objective was to reduce the root mean square error of the formation; and the third optimization objective was to reduce the control energy.

[0072] The system sets optimization weights based on this judgment: convergence time weight. Formation error weights Controlling energy weights .

[0073] 1.7 Sensitivity Analysis of Control Parameters To determine which parameters should be adjusted and by how much, the system invokes the control parameter sensitivity analysis module. This module performs numerical disturbance analysis on the key control parameters.

[0074] The parameters to be analyzed include: position scaling gain. Collision avoidance gain Speed ​​smoothing coefficient Maximum speed limit Damping coefficient If the damping term has not been set in the initial code, it will be added as a candidate parameter.

[0075] The numerical perturbation method is as follows: For any parameter The system calculates respectively and The performance index changes over time, where the perturbation step size is set as follows: If the initial parameter values ​​are small, then use the minimum perturbation step size. .

[0076] The system calculates the gradient of the effect of this parameter on the convergence time: ;like This indicates that increasing this parameter helps to shorten the convergence time; if This indicates that increasing this parameter will prolong the convergence time.

[0077] In this embodiment, the system obtains the following sensitivity analysis results: Table 1

[0078] 1.8 Method for determining parameter adjustment values The system does not directly use large language models to provide parameters based on experience, but rather determines the parameter adjustment range based on the current performance gap and sensitivity analysis results.

[0079] Regarding convergence time, the out-of-limit ratio is defined as follows: ; In this embodiment: ;because This indicates that the convergence time is severely exceeding the limit, and the system prioritizes an aggressive strategy.

[0080] proportional gain The adjustment rules are as follows: ;in, Represents the amplitude limiting function; ; ; Determined based on the proportion of convergence time exceeding the limit. When At that time, the settings were: ,therefore: The system will from Adjusted to .

[0081] Speed ​​smoothing coefficient The adjustment rules are as follows: ;therefore, .

[0082] Maximum speed limit The adjustment rules are as follows: ,therefore, At the same time, in order to reduce the increase The system will add a damping term to address potential oscillations: The initial value of the damping coefficient is determined based on the proportional gain. ,Right now: .

[0083] 1.9 Strategy Pool Knowledge Base Structure The policy pool is a core component of the system's multi-policy parallel iteration mechanism, storing various validated control optimization policies. Each policy in the policy pool includes at least the following fields: Strategy Name: A unique identifier for a strategy, such as an aggressive convergence strategy, a conservative stable strategy, a structural restructuring strategy, or a multi-objective equilibrium strategy.

[0084] Applicable triggering conditions: Conditions that determine when to enable this strategy include: threshold for convergence time exceeding the limit; threshold for formation error exceeding the limit; threshold for energy consumption exceeding the limit; and control input oscillation detection index.

[0085] Target optimization metrics: The main performance metrics that the strategy optimizes, such as convergence time, formation accuracy, energy efficiency, and obstacle avoidance safety.

[0086] Parameter adjustment rules: Adjustment methods for different control parameters, including: rules for increasing or decreasing the gain coefficient; conditions for introducing new control terms; parameter limit range.

[0087] Parameter value range: The upper and lower bounds of each adjustable parameter, ensuring that the adjusted parameter is within the physically achievable range.

[0088] Risk constraints: Safety constraints that must be met when the strategy is activated, such as: oscillation indicators must not exceed the threshold; safety distance must not be reduced; maximum speed must not be exceeded.

[0089] Rollback conditions: Rollback rules when the strategy is ineffective, including: maximum number of iterations limit; performance improvement threshold; safety constraint trigger conditions.

[0090] Based on the current diagnostic results, the policy pool manager selects three best-matching policies from the policy pool, and the parallel code generator generates candidate versions based on these policies.

[0091] 1.10 Multi-strategy Parallel Generation Based on the diagnostic results above, the policy pool manager selects three candidate optimization policies, and the parallel code generator generates three candidate versions simultaneously.

[0092] The first candidate version is an aggressive convergence strategy: from Adjusted to ; from Adjusted to ; from Adjusted to Added damping item .

[0093] The second candidate version adopts a conservative and stable strategy: from Adjusted to ; Keep ; Keep Added damping item .

[0094] The third candidate version is a structural reconfiguration strategy: the simple proportional control is adjusted to proportional-damped control; a feedforward term based on the speed of the leading robot is added to the following robot; the control law becomes:

[0095] in: ; ; .

[0096] 1.10.1 Candidate Version Evaluation and Selection The system performs simulations on the three candidate versions respectively and calculates the overall score:

[0097] A lower overall score indicates better performance. Simulation results are shown in Table 2. Table 2

[0098] Based on the comprehensive score, the system selects the structural reconstruction strategy as the starting point for the next round of optimization.

[0099] 1.11 Failure Branches and Rollback Mechanism The system incorporates robust failure handling logic and rollback mechanisms during the optimization process to ensure its robustness and security.

[0100] 1.11.1 Handling Constraint Validation Failures If a candidate version fails the seven-dimensional constraint verification (including array shape verification, data type verification, robot number index verification, velocity limit verification, broadcast operation verification, safety distance constraint verification, and control input dimension verification), then that candidate version will not proceed to simulation evaluation. The system will feed back the error type, error location, and repair suggestions to the large language model to regenerate or partially repair the control code.

[0101] If all candidate versions generated in parallel fail the constraint verification, the system reverts to the current optimal version and regenerates with a reduced policy aggressiveness. For example, the aggressive convergence policy is adjusted to a conservative and stable policy, and the parameter adjustment range is reduced.

[0102] 1.11.2 Simulation Evaluation Failure Handling If the candidate version passes constraint verification but a collision occurs during simulation (the distance between robots is less than the safe distance), or the distance to the obstacle is less than If a version fails to meet the minimum requirements, it will be marked as a security failure and will not be included in the selection process. The system records the reason for the failure and will prioritize a conservative strategy in the next round of optimization.

[0103] 1.11.3. Oscillation Detection and Rollback If a candidate version exhibits severe control oscillations in simulation, it must meet one of the following conditions: Control input change rate Exceed And the duration exceeds ; The root mean square error of the formation continued to fluctuate beyond [a certain value] even after convergence. ; The system then determines that this version has an oscillation problem and backtracks to the previous version, while increasing the damping coefficient. Or reduce the speed smoothing coefficient The value is used to enhance the smoothing effect.

[0104] 1.11.4 Handling all failures of parallel candidate versions If all three candidate versions generated in parallel fail the safety verification (collision or severe oscillation occurs), the system reverts to the current optimal version and takes the following measures: reduce the adjustment magnitude of all gain coefficients to... Increase collision avoidance gain Ensure a safe distance; reduce the speed smoothing factor. The value is increased to enhance control smoothness and reduce the risk of oscillation; the maximum number of iterations is increased by one round.

[0105] 1.11.5 Maximum Iteration Count Retreat The system is set to a maximum of five iterations. When the maximum number of iterations is reached: if a version meets the safety constraints, the version with the lowest overall score is selected as the final result; if none of the versions fully meet the performance goals, the current best version is output along with an explanation of the unmet goals; failure cases during the optimization process are recorded for continuous improvement of the strategy pool and behavior library.

[0106] 1.11.6 Backtracking Path Selection When path backtracking is triggered, the system selects the backtracking version according to the following rules: if the current version has a security violation, backtrack to the most recent secure version; if the current version has no security violation but the performance improvement is less than [a certain percentage], backtrack to the next secure version. If no significant improvement is achieved after three consecutive rounds of optimization, the system will revert to the initial version and use a completely different strategy type.

[0107] Through the above multi-level and multi-faceted failure handling and rollback mechanisms, the system can maintain stable operation when encountering abnormal situations, avoid getting caught in an ineffective optimization loop, and ensure that the final generated control code always meets basic safety constraints.

[0108] 1.12 Second Round of Optimization and Final Results In the second round of optimization, since the convergence time is close to the target, the system no longer adopts an aggressive strategy, but instead adopts a multi-objective balancing strategy to make minor adjustments to the parameters.

[0109] The system detected that the control energy was still slightly high in the restructured version, therefore the following adjustments were made: from Fine-tuning ;Will from Adjusted to ; feedforward coefficients from Adjusted to ; speed smoothing coefficient from Adjusted to .

[0110] The final simulation result is: convergence time is The root mean square error of the formation is The maximum single robot position deviation is The energy consumption is lower than that of the initial optimized version. The distance between all robots is always greater than the safe distance. .

[0111] The system outputs the final control code and performance report, and marks this version as the current optimal version. If the overall performance improvement of this version compared to the initial version exceeds... The system will also write the control code, parameter adjustment records, and diagnostic experience into the behavior library as a reference case for subsequent similar V-shaped formation tasks.

[0112] 1.13 Self-evolution mechanism of the behavior library The system writes a candidate version into the behavior database when the following condition is met: the overall score decreases by more than [percentage missing] compared to the initial version. All safety constraints are satisfied; successful verification was performed repeatedly at at least three different initial positions; the code passed the seven-dimensional constraint verification. The content written into the behavior library includes: Task types: such as V-shaped formation, circular formation obstacle avoidance, etc.; Number of robots: The total number of robots participating in the task; Formation geometry parameters: formation shape, spacing, angle, etc.; Initial performance metrics: convergence time, error, energy, etc., before optimization; Diagnostic conclusion: Root cause analysis of performance problems; Strategy employed: The type of optimization strategy selected; Values ​​before and after parameter adjustment: initial and final values ​​of key parameters; Final code snippet: Optimized core control code; Performance improvement percentage: The percentage improvement of each indicator.

[0113] The behavior library invocation mechanism is as follows: when the similarity between a subsequent task and a task in the behavior library exceeds a preset threshold, the system prioritizes invoking that behavior library entry. Similarity calculation comprehensively considers: differences in the number of robots; similarity of the formation's geometric shape; the scale ratio of the task space; and similarity of constraints.

[0114] When similarity When this happens, the system uses the behavior library entry as a reference for initial code generation or as a basis for parameter initialization, thereby significantly improving the processing efficiency and success rate of subsequent tasks.

[0115] Through this continuous self-evolving behavior library update mechanism, the system can continuously accumulate optimization experience and gradually improve its ability to solve complex multi-robot collaborative control problems.

[0116] Example 2: Six-Robot Circular Formation Obstacle Avoidance Control Example This embodiment uses the obstacle avoidance control of a six-robot circular formation as an example to illustrate the control method of the control system described in this invention, which specifically includes the following steps: 2.1 Task Initialization The module initializes configuration files and constraints (including common parameters such as safe radius, maximum linear velocity, maximum angular velocity, target convergence time, root mean square error, energy threshold, and error threshold), loads environmental obstacle parameters, initializes the large language model client, establishes a connection with the test environment, loads the policy pool knowledge base, and prepares a reference code template library that can be automatically learned and supplemented during operation.

[0117] The system receives a natural language task description input by the user: Control six robots to form a circular formation with a radius of [missing information]. Move to the target area with the center point at (12.0m, 8.0m), and avoid obstacles during the movement. The circular formation should be as uniform as possible, and there should be no collisions between the robots.

[0118] The system analysis yielded the following task constraints: the number of robots is six, denoted as... to The formation type is circular. The radius of the circular formation is set to... The target point of the circle is set as follows: The positions of the two static obstacles are as follows: Obstacle 1: Obstacle 2: The obstacle safety distance is set to... The safe distance between robots is set to... The maximum linear velocity is set to... The target convergence time is set to... The circular formation radius error threshold is set to... The threshold for the uniformity error of the circular formation angle is set to... The overall symmetry error threshold is set to... .

[0119] In this embodiment, the six robots are dispersed near the starting area at the initial moment of the simulation, with all of them having an initial velocity of zero and an initial heading angle set along the global coordinate system. Positive axis direction. The initial positions of the six robots are set as follows: The initial position is ; The initial position is ; The initial position is ; The initial position is ; The initial position is ; The initial position is .

[0120] During the movement, the system sets a virtual center. Serving as the reference center for the circular formation. The virtual center of the circle extends from the center of the starting area to the center of the target circle. Move gradually according to the maximum speed constraint. The desired position of each robot is calculated with reference to this virtual center. During performance evaluation, if the final formation error is being assessed, then... Take the center of the target circle; if evaluating the instantaneous formation error during the motion process, then Find the virtual center of the circle at the current moment.

[0121] In the circular formation, the first The expected angle of the robot relative to the center of the circle is:

[0122] The desired position is:

[0123] in: The center position of the circular formation; Let be the desired radius.

[0124] 2.2 Initial Code Generation and Deployment The system calls the large language model to generate initial control code. The large language model outputs control code including state readout functions, target position calculation functions, control input calculation functions, velocity limiting functions, collision avoidance functions, and main control loop functions. The initial code includes the following parts: center movement control, used to drive the entire circular formation to move towards the target point; radius holding control, used to keep each robot at a distance from the center of the circle. The control law includes: position control; angle uniform distribution control to ensure six robots are evenly distributed around a circle; obstacle avoidance control to induce a repulsive velocity when a robot approaches an obstacle; and robot collision avoidance control to prevent collisions between robots. The initial control law can be expressed as:

[0125] The initial parameters are set as follows: center tracking gain Radius Preservation Gain ; Angular uniformity gain Obstacle avoidance gain Inter-robot collision avoidance gain Control cycle .

[0126] After the code is generated, the system performs constraint verification to confirm that the robot array dimension is [value missing]. The obstacle array has a dimension of The speed output dimension is And confirmed that the speed limit and obstacle avoidance safety distance logic are effective.

[0127] If semantic verification fails, the system will send the error type, error location, and repair suggestions to the large language model to regenerate or partially repair the control code.

[0128] 2.3 Simulation Execution and Performance Evaluation The system deploys the initial control code to the simulation environment and runs it, collecting real-time data on robot position, speed, control input, obstacle distance, and circular formation geometry. The system calculates the following performance metrics.

[0129] First, radius error: ; Second, average radius error: ; Third, angular uniformity error. The system first calculates the actual angle of each robot relative to the center of the circle, then sorts them according to the angle magnitude and calculates the angular interval between adjacent robots: ; The ideal angle interval is: ; Therefore, the angle uniformity error is: ; Fourth, minimum distance to obstacles: ;in, Indicates the first The location of the obstacle.

[0130] Fifth, symmetry error. The system maps radius error and angular error to a unified length scale: .

[0131] The initial simulation results are as follows: convergence time is The average radius error is ; Angle uniformity error is The overall symmetry error is The minimum distance to the obstacle is No robot collision occurred.

[0132] Due to the combined symmetry error Greater than the target threshold And the angle uniformity error Greater than the target threshold The system triggers a physical diagnostic process.

[0133] 2.4 Circular Formation Error Judgment Rules The system sets the following error judgment rules for circular formations.

[0134] For radius error: when When, the judgment radius remains good; when When the radius error is acceptable, then the error is acceptable; when... At that time, the radius error was too large.

[0135] For angular uniformity error: when When the angle distribution is good, it is determined that the angle distribution is good; when When the angle distribution is acceptable, it is determined that the angle distribution is acceptable; when When the angle distribution is uneven, it is determined that the angle distribution is not uniform.

[0136] For the comprehensive symmetry error: when When, the circular formation is deemed to meet the requirements; when At that time, it was determined that the circular formation exhibited significant deformation; when At that time, it was determined that the circular formation was severely deformed.

[0137] In this embodiment, Therefore, the main problem the system determines about circular formations is uneven angle distribution, rather than insufficient radius maintenance.

[0138] 2.5 Obstacles Affect Diagnosis The system further determines whether the uneven angle distribution is caused by obstacle avoidance. The diagnostic rules are as follows: When the robot approaches an obstacle, the obstacle repulsion term... The proportion of total control inputs exceeds If so, then it is believed that obstacles have a significant impact on the formation shape.

[0139] If the angle error still cannot be recovered to within the threshold after passing through the obstacle area, the angle recovery control is considered insufficient.

[0140] If the minimum distance to the obstacle is less than the safe distance In this case, priority should be given to improving obstacle avoidance safety.

[0141] If the minimum distance to the obstacle is greater than the safe distance and the symmetry error exceeds the standard, then the formation recovery capability should be improved first.

[0142] In this embodiment, the minimum distance to the obstacle is greater than the safe distance This indicates that obstacle avoidance safety meets the requirements. However, after the system detects that the robot has passed obstacle two, the angle uniformity error still remains at [a certain level]. The above indicates that the main problem is insufficient angle recovery control.

[0143] The system generated a diagnostic result: The circular formation failed to restore a uniform angular distribution in a timely manner after avoiding the obstacle. The current average radius error is... The error is within an acceptable range; the angle uniformity error is... Exceeding the target threshold The minimum distance to the obstacle is This meets the safety distance requirements. Therefore, this round of optimization should prioritize enhancing angle uniformity control while maintaining the existing obstacle avoidance strength.

[0144] 2.6 Priority Sorting and Weight Adjustment Based on the diagnostic results, the causal attribution analyzer determines the current optimization objectives in the following order: First priority: reduce angle uniformity error; Second priority: maintain a safe distance from obstacles; Third priority: shorten convergence time; Fourth priority: reduce control energy.

[0145] The optimization weights are reset to: symmetry error weights. Obstacle avoidance safety weight Convergence time weights Controlling energy weights .

[0146] Since the obstacle avoidance safety distance already meets the requirements, the system does not adopt a strategy of increasing the obstacle avoidance gain, but instead prioritizes adjusting the angle uniformity gain and the formation recovery term.

[0147] 2.7 Angle control parameter adjustment method System gain on angular uniformity Perform sensitivity analysis. Currently... The perturbation step size is set as follows:

[0148] System tests and Calculate the change in angle error over time and the sensitivity:

[0149] like , indicating an increase It can reduce angular error.

[0150] In this embodiment, the system detects an increase. The rear angle error was significantly reduced, but when At this time, local oscillations are prone to occur between robots. Therefore, the range of values ​​for the system's angle uniformity gain is set as follows:

[0151] The percentage of angle errors exceeding the standard is:

[0152] Substitute the data from this embodiment:

[0153] According to the rules, when At that time, a moderate adjustment should be adopted:

[0154] therefore:

[0155] The system will increase the angular uniformity gain from Adjusted to .

[0156] 2.8 Enhanced Obstacle Avoidance Parameter Maintenance and Recovery Control Due to the current minimum distance of the obstacle It is already greater than the safe distance. The system determines that the obstacle avoidance capability meets the requirements, therefore the obstacle avoidance gain is increased. It is not advisable to continue increasing the size. If it continues to increase... This could cause the robot to perform greater circling movements near obstacles, thereby further disrupting the symmetry of the circular formation.

[0157] Therefore, the system remains:

[0158] A new formation recovery control option has also been added:

[0159] in, This is used to enhance the robot's ability to return to the desired circular position after it has passed through an area of ​​obstacles.

[0160] The initial value is determined based on the proportion of angle error exceeding the standard:

[0161] Substitution ,get:

[0162] Therefore, a new recovery gain is added:

[0163] To avoid conflicts between recovery control and obstacle avoidance control, the system sets the conditions for enabling recovery control: When the robot is greater than the nearest obstacle At that time, fully enable recovery control; When the robot is between the nearest obstacle to During this period, recovery control is activated proportionally. When the robot is less than the obstacle When this happens, obstacle avoidance control is prioritized, and recovery control is temporarily suppressed.

[0164] The recovery control weight can be expressed as:

[0165] The final recovery control item is:

[0166] 2.9 Multi-strategy parallel generation Based on the diagnostic results, the system generates three candidate versions in parallel.

[0167] The first candidate version is the angle enhancement strategy: [The strategy will be implemented as follows] from Adjusted to ;Keep No new recovery items will be added.

[0168] The second candidate version is a formation recovery strategy: [The strategy will be...] from Adjusted to Added recovery bonus Set the recovery control enable distance threshold to... .

[0169] The third candidate version is a multi-objective balancing strategy: [The strategy will be implemented in the following ways] from Adjusted to Added recovery bonus Maintain radius gain from Fine-tuning Maintain obstacle avoidance gain A smoothing term was added to the control input to prevent oscillations caused by excessively rapid angle adjustments.

[0170] 2.10 Candidate Version Evaluation The system simulated the three candidate versions respectively, and the results are shown in Table 3.

[0171] Table 3

[0172] Among them, the multi-objective balancing strategy reduces the overall symmetry error to Below the target threshold Meanwhile, the minimum distance to the obstacle remains. greater than the safe distance The convergence time also meets the requirements. The system meets the target requirements. Therefore, the multi-objective balancing strategy is selected as the optimal version.

[0173] 2.11 Path backtracking judgment The system records the optimization path for this round. If the improvement in the overall symmetry error after two consecutive optimization rounds for a certain strategy is less than... If so, path backtracking will be triggered.

[0174] The method for calculating the improvement range is as follows:

[0175] like: If the result is negative, then the strategy path is deemed to have no significant improvement.

[0176] In this embodiment, the multi-objective balancing strategy integrates the symmetry error from... Reduce to The improvement is as follows:

[0177] The improvement was significantly higher than Therefore, path backtracking is not triggered.

[0178] 2.12 Final Output Results The system outputs the final optimized control code and performance report. The final performance metrics are as follows: the overall symmetry error of the circular formation is... ; Angle uniformity error is The average radius error is The minimum distance to the obstacle is The convergence time is The minimum distance between robots is greater than the safe distance No collision occurred.

[0179] The system generates a natural language report: The obstacle avoidance task for the six robots in a circular formation has been completed. The overall symmetry error before optimization was... After optimization, the reduction is to ; Angular uniformity error is caused by Reduce to The minimum distance to obstacles is maintained. The obstacle avoidance safety constraints are met. The system determines that this round of optimization is effective and saves the code and parameter configuration corresponding to the multi-objective balancing strategy as the current optimal version.

[0180] If this version is successfully verified in subsequent similar tasks, the system will automatically save its parameter combinations, diagnostic rules, and control code snippets into the behavior library to improve the initial code generation quality and optimization efficiency of subsequent circular formation obstacle avoidance tasks.

[0181] Note: The above parameters are only one example value. In actual applications, they can be adjusted according to robot size, dynamic model, task space scale, control cycle and safety requirements.

[0182] Those skilled in the art should understand that the technical solutions described in this invention are not limited to the specific embodiments described above.

[0183] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A multi-robot cooperative control system combining a large language model with physical diagnostics, characterized in that, include: The physical diagnostic engine is used to acquire real-time status data of a multi-robot system, perform quantitative deviation calculation on the status data based on a physical model, and map the calculation results into interpretable natural language diagnostic information. The causal attribution analyzer is used to determine the causal relationship between various performance indicators exceeding the standard based on natural language diagnostic information and causal inference methods, and to identify the root causes and derivative results of performance optimization. The priority sorter is used to dynamically adjust the optimization weights of each performance indicator according to the task objective, and to estimate the expected improvement of each optimization scheme on the performance indicators through lightweight simulation, thereby completing the priority sorting of optimization suggestions. The strategy pool manager is used to manage a variety of predefined iterative optimization strategies. Each strategy is bound to trigger conditions, parameter adjustment rules, parameter value limits, security risk constraints, and rollback rules. It also supports the dynamic generation of new optimization strategies from large language models and the matching and output of appropriate optimization strategies based on the current diagnostic results. The parallel code generator is used to iteratively generate multiple candidate control codes in parallel based on the current best control code, standardized diagnostic information, and the adaptation optimization strategy output by the policy pool manager, and to perform multi-dimensional constraint verification to filter out invalid codes. The version evaluator is used to deploy the verified candidate control code to the simulation environment for multi-dimensional performance evaluation and to select the version with the best overall performance.

2. The multi-robot cooperative control system combining a large language model with physical diagnosis according to claim 1, characterized in that, The physical diagnostic engine includes: The real-time status data acquisition and preprocessing module is used to acquire the status data of each robot in real time during the operation of the robot formation system, including position, speed, control input, target formation position, control parameters, energy consumption and task time, and to perform time synchronization, coordinate unification, outlier removal and filtering on the status data to form standardized status data. The position deviation vector calculation module is used to calculate the position deviation vector of each robot relative to the target formation position after obtaining the actual position of each robot and the target formation position, and quantitatively obtain the position deviation magnitude and deviation direction of each robot. The formation root mean square error diagnosis module is used to identify the robot number and deviation direction with the largest deviation based on the position deviation vector of each robot relative to the target formation position when the formation accuracy is not met, and generate diagnostic information. The convergence time diagnosis module is used to quantitatively calculate the gradient of the influence of each control parameter on the convergence speed through analytical model or numerical perturbation method when the convergence speed is detected to be lower than a set threshold, and generate parameter-level adjustment suggestions. The energy consumption diagnostic module is used to analyze the degree of change in the control signal when excessive energy consumption is detected, identify invalid oscillations or redundant operating modes, and generate improvement suggestions that include oscillation detection results. The diagnostic result mapping and natural language generation module is used to map the calculation results of each module into natural language diagnostic text, generating interpretable diagnostic information for users; the calculation results of each module include position deviation, root mean square error, parameter sensitivity gradient, control signal oscillation degree and energy anomaly type.

3. The multi-robot collaborative control system combining a large language model with physical diagnosis according to claim 1, characterized in that, The causal attribution analyzer uses causal inference methods to determine the causal relationship between various performance indicators exceeding the standard, including: When multiple performance indicators exceed the limit simultaneously, determine the temporal relationship and dependency between the indicators, and identify the root cause indicator and the derived result indicator; when it is determined that the system has not yet fully converged, identify the convergence time exceeding the limit as the root cause and the formation error exceeding the limit as the derived result; when it is determined that the system has converged but the formation error exceeds the limit, identify the insufficient formation accuracy as the root cause.

4. The multi-robot collaborative control system combining a large language model with physical diagnosis according to claim 1, characterized in that, The priority sorter dynamically adjusts weights in the following manner: The optimization weights of each performance indicator are automatically adjusted according to the target type of the current task; when the task objective is task priority, the weights of convergence time and success rate are increased; when the task objective is energy saving priority, the weights of energy consumption are increased.

5. The multi-robot collaborative control system combining a large language model with physical diagnosis according to claim 1, characterized in that, The iterative optimization strategies managed by the strategy pool manager include: aggressive strategies, which make significant adjustments to control parameters and are suitable for situations with large performance differences; conservative strategies, which fine-tune control parameters and are suitable for situations close to the optimal; structural reconstruction strategies, which modify algorithm logic or control structure; and multi-objective balancing strategies, which optimize multiple performance indicators simultaneously to achieve overall performance improvement.

6. The multi-robot cooperative control system combining a large language model with physical diagnosis according to claim 1, characterized in that, The version evaluator is configured to: evaluate the performance of multiple candidate versions generated in parallel using multi-dimensional performance metrics, including convergence time, formation accuracy, energy consumption, and robustness; and select the optimal version as the starting point for the next iteration based on the comprehensive score.

7. The multi-robot cooperative control system combining a large language model with physical diagnosis according to claim 1, characterized in that, The multi-robot adaptive cooperative control system also includes a path backtracking controller, which is used to automatically backtrack to the previous branch point and switch to another strategy path to continue iterating when there is no significant improvement in a certain strategy path for several consecutive rounds. The path backtracking controller is further configured to: when path backtracking is triggered, select the backtracking version based on the security status and performance improvement of the current version; if the current version has security violations, backtrack to the most recent secure version; if the current version has no security violations but the performance improvement is less than a preset threshold, backtrack to the parent version with the best performance; if multiple rounds of iterative optimization fail to achieve the improvement target, backtrack to the initial version and use a different strategy type.

8. The multi-robot collaborative control system combining a large language model with physical diagnosis according to claim 1, characterized in that, The multi-dimensional constraint verification includes: array shape verification, confirming that all array dimensions match the robot quantity and state dimensions; data type verification, confirming that all variable types remain consistent during calculations; robot number index verification, confirming that all indices are within a valid range; speed limit verification, confirming that the control output does not exceed the preset maximum speed; broadcast operation verification, confirming that the array broadcast operation is semantically correct; safety distance constraint verification, confirming that the collision avoidance logic is correctly implemented; and control input dimension verification, confirming that the control output dimension matches the robot state dimension.

9. A multi-robot cooperative control method combining a large language model and physical diagnostics, applied to the multi-robot adaptive cooperative control system described in any one of claims 1-8, characterized in that, Includes the following steps: Initialization steps: Load configuration file, initialize large language model client, establish connection with simulation environment, and load policy pool knowledge base; Task parsing steps: Receive the natural language task description and parse the constraints, extracting parameters such as the number of robots, formation type, safe radius, and maximum speed; Initial code generation steps: Construct prompt words based on task description and constraints, call the large language model to generate initial control code, and perform syntax checking and constraint verification on the initial control code; Simulation execution steps: Deploy the generated initial control code to the simulation environment, control the robot to perform tasks, and collect status data in real time; Performance evaluation steps: Calculate the convergence time, root mean square error of the formation, and control energy performance indicators, compare them with the target threshold, and determine whether optimization needs to be triggered; Physical diagnostic steps: When performance does not meet the target, the physical diagnostic engine is invoked to perform quantitative deviation analysis, generating diagnostic information and improvement suggestions containing specific values; Attribution ranking steps: Call the causal attribution analyzer to determine the causal relationship of each performance index, determine the optimization priority, and dynamically adjust the optimization weight through the priority ranking algorithm; Strategy selection steps: Select a suitable combination of iterative optimization strategies from the strategy pool based on the diagnostic results and attribution analysis; Parallel generation steps: Based on the current optimal version and the selected iterative optimization strategy, multiple candidate control codes are generated simultaneously; Version evaluation steps: Perform performance evaluation and simulation verification on each candidate control code, and select the version with the best overall performance; Path management steps: Record the optimization path, and trigger the backtracking mechanism when the improvement goal is not achieved in multiple consecutive rounds; Output steps: Output the optimal version of the candidate control code and performance report, and publish standardized performance metrics.

10. The multi-robot cooperative control method combining a large language model with physical diagnostics according to claim 9, characterized in that, The control method further includes: Behavior library update steps: When the overall performance improvement of the candidate control code exceeds the preset threshold and all safety constraints are met, the candidate control code, parameter adjustment records, and diagnostic experience are written into the behavior library; when the similarity between subsequent tasks and entries in the behavior library exceeds the preset threshold, the behavior library entry is called as the initial code generation reference.