CN-121980917-A - Multi-agent system and method for Simulink modeling in aviation field
Abstract
The invention relates to a multi-agent system and method for Simulink modeling in the aviation field. The existing automatic modeling method of Simulink modeling in the aviation field is highly dependent on hard coding, and the formalized requirements are converted into model designs, so that the method has the defects of high development cost, dependence on expert knowledge, incapability of automatic verification, no support of a third party library and the like. The multi-agent system provided by the invention completely automatizes the design, realization and verification process of Simulink modeling in the aviation field by integrating and designing a plurality of expert agents and strictly arranging workflow. Referring to the abstract drawing, the whole system comprises a model designer, a test reviewer, a model constructor, an execution and debugger, a report writer and AGENTIC RAG subsystems, and different sub-modules cooperate to complete tasks in a specific flow depending on large model capabilities and context management strategies. Compared with the traditional automatic modeling technology, the system and the method greatly improve the modeling flexibility and efficiency.
Inventors
- PU YOUHUA
- ZHANG JINZHAO
- GAO JIPENG
- ZHANG DANTAO
- LIU JIACHEN
- HONG DANDAN
Assignees
- 中国航空工业集团公司西安飞行自动控制研究所
Dates
- Publication Date
- 20260505
- Application Date
- 20251224
Claims (10)
- 1. A multi-agent system for Simulink modeling in the aviation field is characterized by comprising a AGENTIC RAG subsystem and a plurality of agents, wherein the agents comprise a model designer, a test reviewer, a model constructor, an execution and debugger and a report writer, The input of the model designer is natural language requirement, and the model designer, the test reviewer, the model constructor, the execution and debugger and the report writer are in bidirectional communication with the AGENTIC RAG subsystem; The model designer and the test panel are in two-way communication for transmitting the formatted model description and the examination item result, the model designer and the model constructor are in two-way communication for transmitting the formatted model description, the model constructor and the execution and debug are in two-way communication for transmitting modeling code and error information, the test panel and the execution and debug are in communication for transmitting error information, the report writer and the execution and debug are in communication for transmitting the execution result, the execution and debug are used for outputting the simulation model, the report writer is used for outputting the simulation modeling report, And AGENTIC RAG the subsystem is used for providing reference knowledge for each agent when completing tasks, and a plurality of agents cooperate with a standard workflow to complete an automatic generation process from natural language requirements to a Simulink model.
- 2. The system of claim 1, wherein AGENTIC RAG subsystem comprises a large language model based retrieval agent and a toolset, wherein the retrieval agent is externally exposed as an MCP client and the toolset is packaged as an MCP server.
- 3. The system of claim 2, wherein the tool set comprises a vector search engine, a model library, a standard document library and a model instance library, wherein the AGENTIC RAG subsystem is a flexibly updated knowledge management system with intelligent searching, updating and collaboration capabilities and can respond to query requests of various agents, the AGENTIC RAG subsystem is organized based on an MCP protocol, searching agents are exposed to MCP clients, the tool set is exposed to an MCP server, the MCP clients respond to external requests and reply, the tool set standard model library is a mandatory module and comprises basic units for constructing models, tool part standard documents and instance models are optional modules for supplementing domain knowledge of the system, the standard model library comprises complete block descriptions and functional descriptions and comprises types, library paths, basic principles, connection related parameter specifications and port names and descriptions of used Simulink blocks, the standard document is designed to comprise a designed and cleaned aviation modeling standard database, and the model instance library is designed to comprise an actual modeling instance library for verifying over-production of a civil flight control domain.
- 4. The system of claim 3, wherein the search agent comprises an instruction big language model and associated context management and workflow, wherein the search agent, upon receiving an external request, analyzes the requirements and invokes different vector search engines within the tool set to search for related data and returns related information to the caller, wherein the vector search engines, model libraries, standard document libraries and model instance libraries in the tool set comprise embedded vector models, vector databases, data units, and wherein the tool set, upon receiving a request from the search model, uses Embedding models to find matching data units and returns.
- 5. A method for automatically generating an aeronautical Simulink model, the method being performed by means of the multi-intelligent system of any of claims 1-4, the method comprising: Step one, a model designer receives natural language requirements, understands and summarizes the requirements in a first round of reasoning, an autonomous request AGENTIC RAG subsystem acquires a standard model library, documents and example models related to the requirements, the model designer collates and generates a requirement analysis report, wherein the requirement analysis report is requested standard model library, documents and example model information related to the requirements, Reporting the design model based on the demand analysis in the second round of pushing and outputting a formatted model description file, wherein the formatted model description file contains module information required by modeling and connection information between related attribute settings and the modules; based on the formatted model description file output by the model designer, the test reviewer uses preset rules to check the correctness and compliance of the design model and outputs a check item result file, and a subsystem is automatically requested AGENTIC RAG to acquire background knowledge required by checking in the process; Step three, the model designer receives the result file of the inspection item from the test reviewer, if the error exists, the error information and the existing model description are taken as input, the formatted model description file is output again, the step two is repeated, and if the error exists, the latest model description file is sent to the model builder; The model constructor takes the latest model description file as input, autonomously requests AGENTIC RAG a subsystem, acquires background knowledge related to model construction, and outputs a python code file for constructing the model; Executing and debugger to run python code file output by the model constructor to construct a Simulink model and save the Simulink model as a file, loading the Simulink model based on the Simulink and running model simulation, collecting simulation results, if error execution and debugger can analyze debugging information and results and perform attribution based on preset rules, the process execution and debugger can autonomously request AGENTIC RAG a subsystem to acquire background knowledge auxiliary attribution, output error reasons as error information files based on attribution results, and inform the model constructor and model designer to trigger reconstruction or redesign, such as error-free output simulation model and execution result files; and step six, the report writer takes the execution result file as input, autonomously requests AGENTIC RAG the subsystem to acquire background knowledge, composes a summary report of the modeling according to a preset report template and outputs a simulation modeling report file.
- 6. The method according to claim 5, wherein the first step is specifically: the model designer selects the task to execute by a rule-based task scheduling module based on the current input: for natural language demand input, understanding and analyzing the input demand based on a preset context in a first round, and autonomously requesting AGENTIC RAG a subsystem to query a standard model library, a standard document and an example model related to the demand, and outputting a demand analysis and persistence as a demand analysis report; For a demand analysis report, in a second round, based on the demand obtained by analysis and the queried background knowledge, obtaining the names of all modules, library paths, preset positions, settable parameter values and signal lines and signal line attributes among different modules required by model design, and sorting and persisting into a formatted model description file in json format; For the information of the checking item, the model designer outputs the formatted model description file to the model constructor when the checking result is correct, and re-triggers the reasoning of the second round when the checking result is wrong.
- 7. The method according to claim 6, wherein the second step specifically comprises: The test reviewer receives the formatted model description output by the model designer, analyzes and independently requests AGENTIC RAG the subsystem to acquire background knowledge related to the model description, evaluates whether the connection accords with the standard and the specification through seven inspection items, namely 1 the existence of a block list 2 the standardization of the block attribute format 3 the accuracy of the connection description format 4 the correctness of the connection parameter setting 5 the connection redundancy 6 the port connection integrity 7 the standardization of the module layout, and persists the inspection result into an inspection result file according to a preset template.
- 8. The method according to claim 7, wherein the fourth step is specifically: The model builder acquires a code template, a function description and a complete block description in a standard model library and optional standard documents and an example model through an autonomous request AGENTIC RAG subsystem, and writes a python script for building a Simulink model based on a formatted model description provided by a model designer and a modeling rule preset in context.
- 9. The method according to claim 8, wherein the fifth step is specifically: The execution and debugger selects an execution task according to the current input and the internal task state, inputs a python code generated by a model constructor, executes the model generation task in a first round, operates the python code to generate a Simulink model and stores the Simulink model as a model file, executes a model simulation task in a second round, constructs input data for the generated Simulink model, loads the model and executes simulation, if an error occurs, executes an error attribution task in a third round, analyzes the execution result of the python code or the Simulink simulation, judges whether the error belongs to python and Simulink grammar problems or a deeper model design problem, collects and persists error due to the code grammar problem, informs the model constructor to trigger model reconstruction, informs the model designer to reconstruct the model design problem, informs the writer to write a report, and requests AGENTIC RAG subsystems to acquire a model description and a possible simulation model description and an auxiliary knowledge attribution task as an error attribution model.
- 10. The method according to claim 9, characterized in that step six, in particular: After the report writer executes a successful signal transmitted by the debugger, collecting an existing demand analysis file, a formatted model description and constructed python code in a file system and a log in the running process of the system, independently requesting AGENTIC RAG a subsystem to acquire relevant supplementary information, generating a summary report of the task based on a template, wherein the report is divided into four parts, namely a simulation purpose, a main simulation step, theoretical knowledge and mathematical modeling related to each step, an implementation mode of each step in the code and a final simulation result.
Description
Multi-agent system and method for Simulink modeling in aviation field Technical Field The invention relates to the fields of artificial intelligence, computer engineering and aviation, in particular to a multi-agent system and method for Simulink modeling in the aviation field. Background In modern engineering and scientific research, simulink is an extremely important graphical simulation platform as a tool for dynamic system modeling and simulation in MATLAB environments. In the aviation field, a large number of software and hardware algorithm modules are developed based on Simulink. However, modeling tasks in the field are difficult to automate due to the requirements of knowledge in the field of aviation and the complexity of the graphical modeling tasks. The existing traditional automatic method mainly converts the formalized requirement into a model design based on manual hard coding logic, and then converts the formatted model design into a model to be realized by utilizing a mechanism provided by a simulation tool, and the method has certain usability but relies heavily on expert knowledge and manual coding, is a semi-automatic process in practice and has low efficiency. Multi-agent collaborative techniques based on large language models have made significant progress in software development automation and code generation, but are still blank in the modeling field, particularly in generating aviation Simulink models. The application of multi-agent technology in modeling field needs to include the complete capability of designing, implementing and verifying the Simulink model, and needs to consider the possible problems of generating the Simulink model from the required text, such as conceptual errors (because of lack of field knowledge, the mathematical structure of the control system or the functional roles of some blocks in the feedback loop cannot be correctly understood), block implementation errors (the generated modeling code has semantic defects of referencing invalid block library paths, misconfiguring port numbers or confusing block names, etc.), connection implementation errors (generating invalid wiring configuration that violates the Simulink standard, such as connecting incompatible ports, omitting necessary intermediate blocks or mismarking ports, etc.), and catastrophic forgetting when managing the whole Simulink automation flow, etc. due to the context window bottleneck existing in the single large language model when processing long context tasks. Particularly in a specific field, such as an aviation field, a series of standard documents prescribe standards to be followed by Simulink modeling, libraries used by modeling also need to meet airworthiness standards, a great amount of field knowledge and strong constraints further increase complexity of modeling tasks, and a system and a method for realizing simulation modeling tasks under the strong constraints need to be found. Meanwhile, on the premise of strong constraint, the method has certain flexibility in understanding and realizing requirements so as to improve the running efficiency and the reality degree of the established simulation model. Considering updating of modeling requirements and iteration of standards, the system also needs to have knowledge pluggable characteristics to realize dynamic updating of the knowledge base. Disclosure of Invention The invention aims to: A multi-agent system and a method for Simulink modeling in the aviation field are provided, and the design thought, the composition details and the technical details of all sub-modules in the system are provided. The method is used for solving the technical problem of automation of complex Simulink modeling tasks under strong knowledge constraint in the aviation field, improving the efficiency of model design, development and verification personnel, and verifying the feasibility and potential of enabling the traditional graphical modeling tasks by the prior artificial intelligence technology. The technical scheme is as follows: a multi-agent system for Simulink modeling in the aviation field comprises AGENTIC RAG subsystems and a plurality of agents, wherein the agents comprise a model designer, a test panel, a model constructor, an execution and debugging device and a report writer, The input of the model designer is natural language requirement, and the model designer, the test reviewer, the model constructor, the execution and debugger and the report writer are in bidirectional communication with the AGENTIC RAG subsystem; The model designer and the test panel are in two-way communication for transmitting the formatted model description and the examination item result, the model designer and the model constructor are in two-way communication for transmitting the formatted model description, the model constructor and the execution and debug are in two-way communication for transmitting modeling code and error information, the test panel and the execution