A joint simulation model integration method, tool and medium
By using joint simulation model integration methods and tools, problems such as type incompatibility in the integration of multi-morphological heterogeneous models are solved, and standardized integration of components, entities, semi-physical objects and systems is achieved, which improves integration efficiency and resource utilization and supports cross-platform calls.
Patent Information
- Application Number
- CN202411500274.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-10-25
AI Technical Summary
Existing heterogeneous multi-form models suffer from problems such as type incompatibility, inconsistent coordinates, non-standard syntax, unclear semantics, mismatched mappings, different granularities, asynchronous time, and lack of resource sharing during the integration process. These problems result in low integration efficiency, high failure rate, and difficulty in achieving automation and scalability.
A co-simulation model integration method is provided, including model parameter semantic analysis, interface association mapping and integration configuration. Through meta-model data analysis, conceptual model description analysis, static semantic analysis and dynamic semantic analysis, combined with intelligent and manual semantic analysis, a process for model integration into the library is generated, supporting the standardized integration of components, entities, semi-physical objects and systems.
It enables rapid integration and reuse of multi-form heterogeneous models, improves integration efficiency, expands the application scope of models, supports cross-platform calls, and enhances the reusability and interoperability of model resources.
Smart Images

Figure CN119578026B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of co-simulation technology and relates to a co-simulation model integration method, tool, and medium. Background Technology
[0002] In the field of co-simulation technology, numerous elements and complex relationships are involved, making model building technically challenging and labor-intensive. Therefore, it is essential to utilize existing model resources efficiently and at low cost. However, in actual simulation experiments, a large number of mature model resources exist, originating from different sources, of different types, with varying resolutions and spatiotemporal references. As the scale, functionality, and logical complexity of co-simulation systems continue to increase, utilizing existing models becomes difficult, resource reuse rates are low, and integration and verification cycles are lengthy, failing to meet the demands for rapid integration and application of diverse heterogeneous models (such as components, entities, semi-physical objects, and systems).
[0003] A semi-physical model, also known as a semi-physical model, refers to a simulation model in which a part of the system to be simulated is introduced into the simulation loop in the form of a physical object (or physical model) for the purpose of simulation research, while the rest of the system to be simulated is described by a mathematical model. This model is then transformed into a simulation calculation model and used for real-time mathematical and physical simulation.
[0004] During the integration process, various heterogeneous models with different system frameworks, diverse sources, complex types, large differences in resolution, and significant differences in spatiotemporal references often encounter problems such as type incompatibility, inconsistent coordinates, inconsistent dimensions, non-standard syntax, unclear semantics, mismatched mappings, different granularities, asynchronous timing, and lack of resource sharing. These problems are very detailed and require familiarity with the detailed definitions of the interface between the model and the simulation system, necessitating negotiation and resolution between integrators and modelers. Current model integration technologies rely on customized interface conversions, lacking standardization and process streamlining, resulting in high development difficulty, low integration efficiency, and virtually no possibility of automation or scalability. Therefore, there is an urgent need for efficient auxiliary integration methods to help simulation personnel achieve rapid reuse of large-scale, multi-morphological heterogeneous models. Summary of the Invention
[0005] The purpose of this invention is to address the problems of high technical barriers, large development workload, low integration efficiency, and high integration failure rate in the rapid integration and reuse of existing multi-form heterogeneous models, and to provide a co-simulation model integration method and tool. This method achieves standardized integration of four types of multi-form heterogeneous models: components, entities, systems, and semi-physical objects, providing support for simulation system calls and offering tools for simulation personnel.
[0006] To solve this technical problem, the technical solution of the present invention is as follows:
[0007] On the one hand, a method for integrating co-simulation models is provided, which is used to integrate and call four types of heterogeneous models of multiple forms: components, entities, semi-physical objects, and systems; the integration steps are as follows:
[0008] Step 1: Semantic Analysis of Model Parameters: Semantic analysis is performed on the interface parameters of the multi-morphological heterogeneous model. The semantic analysis process consists of the following stages:
[0009] Meta-model data analysis, conceptual model description analysis, static semantic analysis, and dynamic semantic analysis;
[0010] S1. Meta-model data analysis includes: extracting and analyzing basic model information such as model ID, model name, model version number, model description, subject of the model, model creator, model creation time, model modifier, model modification time, model application scope, usage restrictions, and model security level.
[0011] Meta-model data analysis analyzed and described the model from a pragmatic perspective, providing partial node knowledge for the semantic analysis knowledge base. It also provided key information for rapid retrieval of the model in various scenarios after its integration into the database, thus improving the ease of management and use after model integration.
[0012] S2. Conceptual model description and analysis includes: extracting and analyzing model interaction patterns, and describing the model's internal interaction process in the form of event sequences between entities; the elements involved in this process include model state transitions, entity types, and event types.
[0013] Through conceptual model description analysis, the interaction patterns, interaction processes, state transitions, interaction-related entity types, and event types of the model are analyzed and described at the semantic level. Each model interaction pattern description completes a specific function through one or more events. One event corresponds to one action, and each event is associated with a certain event inside the model or an external interactive model entity.
[0014] The conceptual model description analysis can describe the interaction process inside or outside the model, improve the model's interaction, combinatorial ability and interoperability, and help enhance the ability to exchange and understand data.
[0015] S3. Static semantic analysis includes: extracting the model interface function list and analyzing the input and output parameter ID, input and output parameter name, input and output parameter data type, input and output parameter unit, upper limit of input and output parameter value, lower limit of input and output parameter value, and the row and column numbers of input and output parameters in the input and output data files.
[0016] S4. Dynamic semantic analysis includes: obtaining pointers to external interface functions of the model, then calling each external interface function and viewing the model's output data, performing analysis and verification of the output data. When calling external interface functions, it is necessary to obtain the data type, unit, and value range of the corresponding external interface input parameters based on the results of static semantic analysis, and then use random data generation techniques or manual random data entry to generate specific values for the input parameters of the external interface functions.
[0017] Through static and dynamic semantic analysis, the interfaces and parameters of the multi-morphological heterogeneous models were analyzed, described, and verified at the semantic and syntactic levels. This process verified whether the models had defects and whether they could be called normally and accurately reflect the pragmatic and semantic information described in the meta-model data analysis and conceptual model description analysis. Models with problems were not further integrated. This initial screening of models to be integrated improved the efficiency of model integration.
[0018] Step 2, Model Interface Association Mapping: Perform event association mapping on the interface functions of the multi-morphological heterogeneous model.
[0019] For the list of model interface functions in the semantic analysis results described in step one, perform event association mapping to the final required model specification framework;
[0020] The association mapping process refers to mapping the list of interface functions in the original model to the list of interface functions in the integrated model. The list of interface functions in the integrated model refers to the standard interfaces required by the final model specification framework.
[0021] The model interface association mapping can connect and map the list of model interface functions in a graphical and visual way, automatically generating mapping code, which improves the efficiency of interface integration logic and model integration.
[0022] Step 3: Model Integration and Configuration: Integrate and configure the multi-morphological heterogeneous models.
[0023] Configure the imported multi-form heterogeneous model integration environment, including: configuring the model runtime environment, setting model integration parameters, generating model directory files, generating model assembly files, generating model scheduling files, and other integration configuration files.
[0024] The integration configuration file refers to all procedural files generated as needed during the integration configuration of multi-morphological heterogeneous models. Based on the semantic analysis results and model integration parameters, the integration configuration process generates an integrated target model directory file, a model assembly file, and a model scheduling file. These three types of model description files are provided to the target simulation system for integration and reference, thus solving the model configuration problem in multi-morphological heterogeneous integration.
[0025] Step 4: Model Integration and Storage: Integrate the multi-form heterogeneous models into the database; model integration and storage refers to packaging and sending the integrated models to the model resource library for unified management.
[0026] According to the integration configuration file described in step three, all relevant files of the multi-morphological heterogeneous model are packaged and integrated as needed, and finally sent to the model resource library for storage, or directly provided to the simulation system for linking and calling.
[0027] Furthermore, when integrating a semi-physical model or a system model, the method requires creating a digital proxy model before step one, which replaces the semi-physical model or system model. Specifically, in step four, when the multi-form heterogeneous model is a component or physical model, the original model file and the integration configuration file are packaged and integrated; when the multi-form heterogeneous model is a system or a semi-physical model, the digital proxy model and the integration configuration file are packaged and integrated.
[0028] This method allows for direct integration of component or entity models. However, for semi-physical / system models, a digital proxy model needs to be created in advance. Replacing the original semi-physical / system model with the digital proxy model can greatly improve the efficiency of optimization design and reduce the difficulty of optimization.
[0029] Specifically, in aircraft co-simulation, the input interface parameters of the aircraft physical model (or the digital proxy model created from a semi-physical / system model) include waypoints, cruise routes, cruise airspace, maneuver control commands, input performance parameters, and simulation time; the output interface parameters include aircraft motion state information, fuel consumption rate, longitude, latitude, altitude, pitch angle, roll angle, yaw angle, and speed scalar. To integrate the input parameters required by the aircraft physical model, and considering the aircraft's characteristics, the following custom data types are defined for the aircraft physical model:
[0030] Define the waypoint data structure required for the aircraft model input, including three-dimensional position coordinates on the map composed of latitude, longitude, and altitude. Define the cruise route data structure required for the aircraft model input, including a list of waypoints. Define the cruise area data structure required for the aircraft model input, including the airspace enclosed by the cruise route. Define the maneuvers input to the aircraft model via maneuver control commands, including basic acceleration, deceleration, turning, and cornering, as well as unique maneuvers such as loops, separation S-turns, rolls, J-turns, falling leaf maneuvers, and barrel rolls. Define additional parameters for the above maneuvers, such as acceleration, turning angle, and turning altitude. Define the performance parameters required for the aircraft model input, including speed, altitude, range, flight time, and payload.
[0031] The standard interface functions for an aircraft physical model (or digital proxy model) include creating an instance (for registering the model), initialization, subscribing to data, stepping (for passing in model data before single-step simulation), publishing data, and deregistering the instance (for destroying the model).
[0032] Optionally, the model parameter semantic analysis process may further include: intelligent semantic analysis and manual semantic analysis.
[0033] The intelligent semantic analysis refers to the automated analysis of extracted semantic parameters by retrieving semantic analysis knowledge bases or using other intelligent methods. This enables automatic completion of semantic parameters and automatic correction based on recommended values, improving the automation level and efficiency of model integration.
[0034] The aforementioned manual semantic analysis refers to the process of manually selecting or setting configuration parameters during the extraction and analysis of semantic parameters and the resulting data (the configuration parameters include model type, corresponding primary category, secondary category, main purpose, functional components, internal and external interface functions, model library dependencies, parameter dimensions and coordinate system, etc.).
[0035] Specifically, during the semantic analysis of model parameters, parameters can be selected or set based on experience and knowledge, or a semantic analysis knowledge base can be referenced or queried. Combining intelligent semantic analysis with human semantic analysis can improve both the efficiency of model integration and the accuracy of semantic analysis.
[0036] The model interface association mapping mentioned in step two includes automatic association mapping or manual association mapping.
[0037] The automatic association mapping refers to mapping the list of model interface functions one by one to the standard interfaces of the required model specification framework based on the automated analysis results of the semantic analysis knowledge base.
[0038] The manual association mapping refers to the process of manually mapping the list of model interface functions one by one to the standard interfaces of the required model specification framework, based on the experience and knowledge of the integration personnel. It also includes manually correcting the results of automatic association mapping.
[0039] Combining automatic association mapping with manual association mapping can improve both the efficiency of model integration and the accuracy of model interface association mapping.
[0040] The model specification framework described in step two includes FMI specifications, BOM specifications, SMP specifications, or other custom specifications. Custom specifications refer to user-defined standard interface specifications for the integration engine.
[0041] The event association mapping strategies described in step two include "one-to-one", "one-to-many", "many-to-many", "many-to-one", "one-to-zero", and "zero-to-one". The association mapping logic used based on these strategies includes adding functions, deleting functions, renaming functions, merging functions, decomposing functions, and rearranging APIs.
[0042] In step three, when the system environment for generating the model is incompatible with the system environment for running the model, it is necessary to configure the model runtime environment, for example, by deploying a virtualization environment in advance. Virtualization environment deployment involves encapsulating and deploying the model to be integrated within a virtual model runtime environment, and then communicating with the target simulation system in the heterogeneous model runtime environment via a model service bus. The virtual model runtime environment can be implemented using various methods such as virtual machines and containers.
[0043] Deploying in a virtualized environment can extend the integration methods of multi-form heterogeneous models, enabling cross-platform black-box multi-form models to be integrated and invoked, thus improving the reusability of existing multi-form heterogeneous models.
[0044] In step three, during the integration and configuration of multi-form heterogeneous models, it is necessary to set model integration parameters, including integration target type, target interface format, target language, target bit width, communication interface type, target runtime environment, dependencies, integrated model name, integration description, host environment, etc.
[0045] The simulation system refers to a set of software and hardware systems that realizes the model of the simulated system according to the requirements of the simulation task for simulation experiments, including simulation equipment, operators and models, etc.
[0046] On the other hand, a co-simulation model integration tool is provided, which includes a model parameter semantic analysis function module, a model interface association mapping function module, a model integration configuration function module, and a model integration and database entry function module.
[0047] The model parameter semantic analysis function module includes: a meta-model data analysis unit, a conceptual model description analysis unit, a static semantic analysis unit, and a dynamic semantic analysis unit.
[0048] The meta-model data analysis unit analyzes and describes the model from a pragmatic perspective. This unit converts the basic information of the model to be integrated into an XML-formatted analysis file and outputs it, providing partial node knowledge for the subsequent semantic analysis knowledge base.
[0049] Specifically, in the integration tool system interface, users can input basic information about the model to be integrated through the UI, including model ID, model name, model version number, model description, subject to which the model belongs, model creator, model creation time, model modifier, model modification time, model application scope, usage restrictions, model security level, and other basic model information. It outputs an XML-formatted analysis file, providing some node knowledge for the subsequent semantic analysis knowledge base.
[0050] The conceptual model description and analysis unit analyzes and describes the model's interaction patterns, interaction processes, state transitions, and interaction-related entity types and event types from a semantic perspective. This unit allows users to input model interaction patterns through a UI interface, define the event types and state transition conditions for each model interaction pattern, define the model entity types associated with each event, and output an XML-formatted analysis file that can describe the internal or external interaction flow of the model.
[0051] The static semantic analysis unit allows users to input relevant information about the model to be integrated through a UI interface, including input / output parameter IDs, input / output parameter names, data types of input / output parameters, units of input / output parameters, upper and lower limits of input / output parameter values, and row and column numbers of input / output parameters in the input / output data files. It also outputs an XML-formatted analysis file, providing basic data for the subsequent implementation of various functional units in the model encapsulation.
[0052] The dynamic semantic analysis unit supports extracting and dynamically calling external interface functions of the model. For the model input interface data format, it inputs initial parameters in a certain format, then runs the model file and outputs the returned data of the model's calling interface, thus realizing the model interface verification function.
[0053] The model interface association mapping function module maps the interface functions in the model to be integrated to the standard interfaces required by the final model specification framework, and automatically generates mapping code. The input of this module is a list of model interface functions and the mapping connection relationship entered on the interface, and the output is a relationship mapping code file. Specifically, in the integration tool system interface: the list of interface functions in the model to be integrated and the list of standard interfaces required by the final model specification framework are listed respectively, and the interface functions are mapped one by one by connecting the lines.
[0054] The model integration configuration module is responsible for configuring the integrated environment of imported multi-form heterogeneous models; the model integration configuration module includes a virtualization environment deployment unit and a parameter configuration unit.
[0055] The parameter configuration unit allows users to input parameters through the UI interface to configure the model running environment, set model integration parameters, and output integrated configuration files such as XML format model directory files, model assembly files, and model scheduling files.
[0056] The virtualization environment deployment unit encapsulates and deploys the model to be integrated within a virtual model runtime environment, and then communicates with the target simulation system in the heterogeneous model runtime environment via a model service bus. The virtual model runtime environment can be implemented using various methods such as virtual machines and containers. The unit's inputs are the model library to be encapsulated and the integration configuration file, and its outputs are the deployment directory and startup method of the virtualization environment.
[0057] The model integration module packages and integrates all relevant files of multi-form heterogeneous models as needed, and finally sends them to the model resource library for storage, or directly provides them to the target simulation system for linking and calling. This module allows users to select the desired file name, the address of the model resource library to be stored, and the package name on the UI interface, and finally outputs a compressed package and sends it to the specified location.
[0058] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the functions of the integrated tool.
[0059] The beneficial effects of this invention are:
[0060] This invention enables the integration of most types of models in the field of co-simulation technology, allowing for the expansion and reuse of integrated subject-specific models, and is convenient and flexible to use. It significantly improves simulation integration efficiency, expands the application scope of models, and effectively utilizes various existing model resources, as detailed below:
[0061] (1) The model parameter semantic analysis described in this method describes and analyzes the interface parameters of multi-morphological heterogeneous models, including meta-model data analysis, conceptual model description analysis, static semantic analysis and dynamic semantic analysis. It clarifies the model description items and model verification methods required before model integration, standardizes the interpretability of model behavior, effectively judges the usability of the model to be integrated, and realizes model checking and understanding before the implementation of model integration work.
[0062] (2) The semantic analysis of model parameters and the association mapping of model interface described in this method demonstrate the key steps in the model integration process. The intelligent semantic analysis and automatic association mapping functions provide an efficient model integration method, realize automated model encapsulation and integration, and effectively improve the efficiency of model integration.
[0063] (3) This method provides a solution for rapid integration of different types of models (including components, entities, semi-physical objects and systems), realizes efficient integration of different types of models on the same platform, and truly realizes the interconnection of complex elements in multidisciplinary joint simulation.
[0064] (4) In particular, when the physical model is an aircraft entity model, the aircraft entity model of the present invention has multiple custom data types, which can not only satisfy the tight coupling of aircraft entity attributes, but also satisfy the cross-platform operation and calling of the model. It is suitable for the association mapping of model interfaces and the semantic analysis of model parameters, and facilitates the integration configuration and integration into the library of the model.
[0065] (5) The virtualization environment deployment described in this method provides a feasible integration method for cross-platform black box models, realizes the integration method of cross-platform operation and calling of models, and expands the application scope of models. Attached Figure Description
[0066] To more clearly illustrate the technical solutions implemented in this invention, the accompanying drawings used in the embodiments of this invention will be briefly explained below. Obviously, the drawings described below are merely some embodiments of this invention. Those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0067] Figure 1 Flowchart of the co-simulation model integration method;
[0068] Figure 2 Logic block diagram for the co-simulation model integration tool;
[0069] Figure 3 Flowchart for static semantic analysis of aircraft platform model;
[0070] Figure 4 The diagram showing the interface association mapping results for the aircraft platform model;
[0071] Figure 5 Deployment unit structure diagram for virtual environment. Detailed Implementation
[0072] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, not all, of the embodiments of the present invention. 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.
[0073] The features of various aspects of the embodiments of the present invention will now be described in detail. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the invention. However, it will be apparent to those skilled in the art that the invention can also be practiced without these specific details. The following description of the embodiments is merely intended to provide a better understanding of the invention by illustrating examples. The invention is not limited to any specific setups and methods provided below, but covers all improvements, substitutions, etc., to product structures and methods without departing from the spirit of the invention.
[0074] In the accompanying drawings and the following description, well-known structures and techniques are not shown to avoid unnecessary ambiguity regarding the invention. The flowchart of the co-simulation model integration method of the present invention is as follows: Figure 1 As shown. In embodiments of the present invention, the integration method of the present invention is further explained in detail using the integration of a typical heterogeneous aircraft physical model and the integration of a semi-physical aircraft model as examples:
[0075] The existing solid model is an aircraft solid model. The model files include a .dll format dynamic library file (plane.dll), a .h format header file (plane.h), and a .csv format interface specification file (plane.csv). The plane.dll file defines the simulation program for the aircraft solid model, the plane.h file defines the declarations of the external interface functions of the aircraft solid model, and the plane.csv file defines the calling method and parameter semantics of the external interface functions of the aircraft solid model, as well as the usage method of the aircraft solid model.
[0076] The target simulation system for model integration is based on a custom model specification framework, providing a set of inherent standard interface calls for the model. This simulation system runs on a Linux operating system. Traditional model integration methods require recompiling the aircraft entity model source code into a .so format dynamic library file under Linux, and then customizing the external interface functions exposed by the model in the source code to be completely consistent with the model specification framework's standard interface. This integration method requires operations on the model at the source code level, which is detrimental to the decoupling of model and simulation system behavior, hinders the protection of model intellectual property rights, and makes it virtually impossible to integrate such cross-platform heterogeneous models when the model provider cannot provide the source code.
[0077] For external, heterogeneous aircraft entity models, since they lack model description files conforming to the XML format specification, the plane.csv interface specification file needs to undergo model parameter semantic analysis (intelligent semantic analysis + manual semantic analysis) to generate an aircraft entity model description file (plane.xml) using a simulation model integration tool. Following model interface association mapping and model integration configuration steps, the aircraft entity model is deployed in a Windows virtualization environment. The virtualization environment deployment unit employs model service bus technology, enabling instruction and data communication between the encapsulated and integrated aircraft entity model and the simulation system. Ultimately, this achieves the goal of providing the simulation system with a virtualized environment containing the encapsulated and integrated aircraft entity model DLL dynamic library file (planeCAE.dll) running on a Linux system.
[0078] For the integration of semi-physical aircraft models, it is first necessary to construct a digital proxy model of the semi-physical aircraft, and then use the method mentioned in this invention.
[0079] Building a digital proxy model essentially enables interaction between the hardware-in-the-loop aircraft model and the simulation system, which can be achieved using middleware. The digital proxy model receives data packets sent by the hardware-in-the-loop model via the TCP / IP network protocol, and then uses middleware to convert the received data packets into attributes or interaction class instances of model objects defined in the simulation system before forwarding them to the simulation system. This achieves interconnection and interoperability between the hardware-in-the-loop aircraft model and the simulation system.
[0080] The digital agent model can receive management messages, behavioral task instructions, and environmental situation information from the simulation system, and can publish status information, target information, and interference information of the hardware-in-the-loop aircraft model to the simulation system. The digital agent model has task planning and parsing capabilities, heterogeneous system data interaction capabilities, and protocol conversion capabilities.
[0081] The task planning parsing function performs situational analysis on the task plans sent by the simulation system and converts them into action plan file data formats usable in hardware-in-the-loop simulation.
[0082] The heterogeneous system data interaction function converts and exchanges data between the simulation system and the hardware-in-the-loop model. Examples include scenario data, situational data, and detection data.
[0083] The protocol conversion function converts various control commands of the simulation system into different protocols, enabling the simulation system to effectively manage and control the semi-physical model. Examples include simulation advancement, simulation services, model services, time management, event management, scheduling management, and clock synchronization.
[0084] Aside from the need to pre-build a digital proxy model of the semi-physical aircraft, the integration process for the semi-physical aircraft model and the component / entity model is the same. Therefore, the following description, using the integration of the aircraft entity model as an example with accompanying drawings, details the joint simulation model integration tool of this invention. Figure 2 The following is a detailed method and process for integrating aircraft physical models:
[0085] Step 1: Establish a digital agent model
[0086] The physical model of the aircraft is not a semi-physical / system model, therefore there is no need to build a digital proxy model.
[0087] Importing model files includes the aircraft solid model DLL dynamic library file (plane.dll) and the CSV format interface table file (plane.csv). The DLL dynamic library file is primarily a binary program file, while the CSV interface table describes the interface functions and parameters exposed by the aircraft solid model DLL dynamic library file. In this step, depending on the model's modeling differences, there will be interface files in various formats. These could be user manuals or operation instructions with .txt or .docx extensions, interface tables with .xlsx or .csv extensions, program header files with .h extensions, or language description files with .xml or .json extensions, etc. For each of these imported model description files, the user first needs to perform preliminary manual analysis and understanding before subsequent automatic analysis and integration can be achieved using tools.
[0088] Step 2: Metamodel Data Analysis
[0089] Based on the above steps and basic understanding of the imported model, users fill in the basic information of the aircraft entity model through the UI interface of the co-simulation model integration tool. This includes the model ID, model name, model version number, model description, model discipline, model creator, model creation time, model modifier, model modification time, model application scope, usage restrictions, model security level, and other basic model information. The output is a plane.xml file. Users fill in the node values related to the meta-model data in this file, which also provides some node knowledge for the subsequent semantic analysis knowledge base.
[0090] Step 3: Conceptual Model Description and Analysis
[0091] Based on the analysis and description of the aircraft entity model described above, the semantic analysis and description of the interaction modes, interaction processes, state transitions, and related entity and event types of the aircraft entity model are further performed. Users input the interaction modes of the aircraft entity model through the UI interface of the co-simulation model integration tool, define the event types and state transition conditions for each model interaction mode, and define the external model entity types associated with each event. Finally, the output is a plane.xml file, in which node values related to the conceptual model description and analysis are filled in to describe the internal or external interaction flow of the model.
[0092] Step 4: Static Semantic Analysis
[0093] Based on the analysis and description of the aircraft entity model described above, the user inputs the aircraft entity model interface functions, input / output parameter IDs, input / output parameter names, data types, units, upper and lower limits of input / output parameter values, and row and column numbers of the input / output parameters in the input / output data files through the UI interface of the co-simulation model integration tool. The final output is a plane.xml file, where the node values related to static semantic analysis are filled in.
[0094] This step can be linked to a semantic analysis knowledge base. A flowchart of the static semantic analysis algorithm is shown below. Figure 3 As shown, by constructing a semantic knowledge graph in the aviation field, default values or intelligent algorithm-recommended values of information are filled in, or reset based on these values, ultimately generating an aircraft entity model description XML file (plane.xml).
[0095] Step 5: Dynamic Semantic Analysis
[0096] Based on the model interface information in the plane.xml file generated in step four, extract and dynamically call the external interface functions of the test aircraft entity model, input initial parameters that conform to the model interface data format, run the model file and view the model output data, and analyze and verify the output data.
[0097] The input and output interface parameters of the aircraft solid model are shown in Table 1 and Table 2, respectively.
[0098] Table 1 List of Input Interface Functions for Aircraft Platform Model
[0099]
[0100] Table 2 List of output interface functions for the aircraft platform model
[0101]
[0102]
[0103] Specifically, the input interface parameters for the aircraft solid model in Table 1 have the following requirements, and the custom data types in the aircraft solid model are as follows:
[0104] `CSMapPoint` defines the waypoint data structure that the aircraft model needs to input, including three-dimensional position coordinates on the map composed of latitude, longitude, and altitude. `CSMapPath` defines the cruise route data structure that the aircraft model needs to input, including a list of waypoints. `CSMapRegion` defines the cruise area data structure that the aircraft model needs to input, including the airspace surrounded by a series of cruise routes. `PlaneManeuver` defines the maneuvers input to the aircraft model by maneuver control commands. Besides basic acceleration, deceleration, turning, and cornering, it also includes unique maneuvers such as loops, separation S-turns, rolls, J-turns, falling leaf maneuvers, and barrel rolls. `CommandParameters` defines additional parameters for the above maneuvers, such as acceleration, turning angle, and turning altitude. `PlanePerformance` defines the performance parameters that the aircraft model needs to input, including speed, altitude, range, flight time, and payload.
[0105] The dynamic semantic analysis function is mainly responsible for online testing of the dynamic library file (plane.dll) of the co-simulation model integration tool after the aircraft entity model is imported and before integration. By filling in the input parameters of the interface function of the aircraft entity model through the interface of the co-simulation model integration tool, running the dynamic library file of the aircraft entity model, and verifying whether the return result of the interface function of the aircraft entity model is semantically correct (here the output parameter is not necessarily the function return value. The model interface file may indicate that a certain input parameter of the function is limited to out, then that parameter is also an output parameter and also needs to be verified).
[0106] In this embodiment, the input parameters required for the entry point function `SetInput` (input interface function) of the aircraft entity model are listed in Table 1, and are described in the interface specification file `plane.csv`. This entry point function initializes the aircraft entity model. A return value of -1 indicates initialization failure, and a return value of 0 indicates successful initialization. When the input performance parameters, waypoints, and other information are reasonable, the `SetInput` function returns 0; otherwise, it returns -1, verifying that the semantic description of the aircraft entity model is correct. This step is repeated to verify all entry point functions. If they match the actual situation, dynamic semantic analysis is passed. Conversely, if the actual situation of calling the aircraft entity model's entry point function does not match the description in the interface specification file `plane.csv`, dynamic semantic analysis fails, the aircraft entity model is invalid, and subsequent integration steps cannot be performed.
[0107] After dynamic semantic analysis, the aircraft physical model can perform maneuvering functions such as takeoff, cruise, hovering, and climb, given waypoint information and maneuvering commands.
[0108] Step 6: Model Interface Association Mapping
[0109] For the model interface function information in the aircraft entity model description file plane.xml, automatic or manual association mapping is performed to connect it to the standard interfaces in the target simulation system model specification framework. The model interface association mapping process may involve logic such as adding, deleting, modifying, querying, merging, decomposing, and rearranging interface functions. The list of standard interface function events in the target simulation system model specification framework is shown in Table 3.
[0110] Table 3. List of Standard Interfaces for Simulation System Model Specification Framework
[0111] method Semantics parameter Remark Creat Create an instance none Used for registering models Init initialization Json Initialize model interface Subscribe Subscription data Any<any<string,map>> Input model data before single-step simulation Tick Step Double t, doubledelta_t Simulation time and step time Publish Publishing data Any<any<string,map>> Data is published after single-step simulation. Destroy Cancel instance none Model Destruction
[0112] The possible function mapping strategies include "one-to-one", "one-to-many", "many-to-many", "many-to-one", "one-to-zero", and "zero-to-one". The specific mapping logic used based on these strategies includes adding functions, deleting functions, renaming functions, merging functions, decomposing functions, and rearranging APIs.
[0113] For the aircraft entity model, the result of the model interface association mapping is as follows: Figure 4 As shown. Finally, through the model interface association mapping, the aircraft entity model integration file planeCAE.dll is generated. This model library file contains the generated function mapping relationships. By calling planeCAE.dll, the corresponding interface functions in plane.dll can be automatically associated and called. This is equivalent to encapsulating the original interface of plane.dll.
[0114] Step 7: Model Integration Configuration
[0115] Parameter Configuration Unit: Since the Windows (.dll dynamic library) system environment for generating the aircraft entity model is incompatible with the Linux system environment for running the model, model integration parameters need to be set for model integration configuration. In this embodiment, the integration target type is .so, the target interface format is XML, the target language is C++, the target bitness is 64-bit, the communication interface type is RESTful API, the target runtime environment is Linux, the integrated model name is planeCAE, the virtualization technology is VM virtual machine, and the host environment is Ubuntu 18.04. After filling in the above information on the interface, the integration configuration file planeConfigCAE.xml is finally generated through the tool.
[0116] Virtualization environment deployment unit: Since it relies on the DLL library files of the Windows operating system and cannot run directly on the Linux operating system, a virtualization environment deployment unit is required. In this embodiment, the virtualization technology selected is the VM virtual machine, and a functional communication module inside and outside the virtual machine is required. This functional communication module is implemented by the model service bus technology (when the aircraft entity model is a third-party black box model, and the model provider cannot provide the source code and cannot recompile).
[0117] In this embodiment, the overall structure of the virtualized runtime environment deployment includes two parts: a Linux system model service module and a Windows virtual machine model service module (both implemented by the model service bus). The Linux system model service module is mainly responsible for data interaction with the simulation system and data communication with the virtual machine service module, including service invocation, service publishing, protocol adaptation, and protocol conversion. The Windows virtual machine model service module is mainly responsible for managing and calling the DLL model dynamic library (planeCAE.dll) in the virtual machine environment, including service interfaces and DLL calling programs. First, the simulation system sends a message to the Linux system model service module to call the interface to execute the DLL method. Second, this module parses the request parameters and converts them into a message of a pre-defined format, which is then sent to the Windows virtual machine model service module. Then, the Windows virtual machine model service module parses the request parameters, obtains information such as the DLL file name, method name, and method parameters, loads the DLL file, and requests the relevant methods. Finally, the returned value of the obtained DLL dynamic library is sent back to the Windows virtual machine model service module, then back to the Linux system model service module, and finally the returned result is sent to the simulation system, completing the entire operation process.
[0118] The model service bus is primarily responsible for data communication and service operation management between the host (Linux) simulation system and dynamic libraries in the virtualization environment. The entire virtualization deployment and operation process is as follows: Figure 5 Show.
[0119] Step 8: Model integration into the library
[0120] In the tool interface, select the aforementioned model integration file planeCAE.dll, integration configuration file planeConfigCAE.xml, and the original files plane.dll and plane.xml of the multi-morphological heterogeneous model for packaging and integration. Finally, send them to the model resource library for storage or directly provide them to the simulation system for linking and calling. For component / physical models, package and integrate the original model library files and integration configuration files. For system / semi-physical models, package and integrate the original model proxy model and integration configuration files.
[0121] This invention provides a standardized model integration method and tool for co-simulation experiments, addressing the need to integrate and utilize four types of heterogeneous models: components, entities, semi-physical objects, and systems. This method integrates a large number of existing heterogeneous models, enabling various models to be integrated and utilized by the target simulation system. This approach and tool help expand the types of resources available for co-simulation experiments, introduce mature simulation models into the system, improve the efficiency of resource construction, and free experimenters from programming and complex modeling, allowing them to focus more on simulation experiments. It also supports model interoperability and reusability, maximizing the value of model resources, expanding the application scope of models, and avoiding redundant construction.
[0122] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
Claims
1. A method for integrating co-simulation models, characterized in that: The integration method is used to integrate and call four types of multi-form heterogeneous models: components, entities, semi-physical objects, and systems. The integration steps are as follows: Step 1: Semantic Analysis of Model Parameters: Semantic analysis is performed on the interface parameters of the multi-morphological heterogeneous model. The semantic analysis process consists of the following stages: Meta-model data analysis, conceptual model description analysis, static semantic analysis, and dynamic semantic analysis; S1. Meta-model data analysis includes: extracting and analyzing model ID, model name, model version number, model description, subject of the model, model creator, model creation time, model modifier, model modification time, model application scope, usage restrictions, model security level, and basic model information. S2. Conceptual model description and analysis includes: extracting and analyzing model interaction patterns, and describing the model's internal interaction process in the form of event sequences between entities; the elements involved in this process include model state transitions, entity types, and event types; S3. Static semantic analysis includes: extracting the model interface function list and analyzing the input and output parameter ID, input and output parameter name, input and output parameter data type, input and output parameter unit, upper limit of input and output parameter value, lower limit of input and output parameter value, and the row and column information of input and output parameters in the input and output data files; S4. Dynamic semantic analysis includes: obtaining pointers to external interface functions of the model, then calling each external interface function of the model and viewing the model output data, and performing analysis and verification of the output data; when calling the external interface function of the model, it is necessary to obtain the data type, unit and value range of the corresponding external interface input parameters based on the results of static semantic analysis, and generate the specific values of the input parameters of the external interface function of the model. Step 2, Model Interface Association Mapping: Perform event association mapping on the interface functions of the multi-morphological heterogeneous model. For the list of model interface functions in the semantic analysis results described in step one, perform event association mapping to the final required model specification framework; The association mapping process refers to mapping the list of interface functions in the original model to the list of interface functions in the integrated model. The list of interface functions in the integrated model refers to the standard interfaces required by the final model specification framework. Step 3: Model Integration and Configuration: Integrate and configure the multi-morphological heterogeneous models. Configure the integrated environment for the imported multi-form heterogeneous models, including: configuring the model runtime environment, setting model integration parameters, generating model directory files, generating model assembly files, and generating model scheduling files; Step 4: Model Integration and Storage: Integrate the multi-form heterogeneous models into the database; model integration and storage refers to packaging and sending the integrated models to the model resource library for unified management. According to the integration configuration file described in step three, all relevant files of the multi-morphological heterogeneous model are packaged and integrated as needed, and finally sent to the model resource library for storage, or directly provided to the simulation system for linking and calling.
2. The integration method according to claim 1, characterized in that: When integrating a semi-physical model or a system model, the method requires creating a digital proxy model before step one, and using the digital proxy model to replace the semi-physical model or system model.
3. The integration method according to claim 2, characterized in that: In step four, when the multi-form heterogeneous model is a component or physical model, the original model file and the integration configuration file are packaged and integrated; when the multi-form heterogeneous model is a system or semi-physical model, the digital agent model and the integration configuration file are packaged and integrated.
4. The integration method according to claim 2, characterized in that: When the physical model is an aircraft solid model, the custom data types in the aircraft solid model are as follows: Define the waypoint data structure that the aircraft model needs to input, including the three-dimensional position coordinates on the map composed of latitude, longitude and altitude; define the cruise route data structure that the aircraft model needs to input, including a list of waypoints; Define the cruise area data structure that the aircraft model needs to input, including the airspace surrounded by the cruise route; Define the maneuvers input to the aircraft model by maneuver control commands, including basic acceleration, deceleration, hovering, and turning, as well as loops, separation S-turns, rolls, J-turns, leaf rolls, and barrel rolls; define the additional parameters for the above maneuvers, including acceleration, turning angle, and hovering height; define the performance parameters that the aircraft model needs to input, including speed, altitude, range, flight time, and payload.
5. The integration method according to claim 1 or 2, characterized in that: The semantic analysis process of the model parameters also includes: intelligent semantic analysis and manual semantic analysis; The intelligent semantic analysis refers to: automatically analyzing the extracted semantic parameters by retrieving them from a semantic analysis knowledge base; The aforementioned manual semantic analysis refers to the process in which manual intervention is required to select or set configuration parameters during the extraction and analysis of semantic parameters and the resulting data.
6. The integration method according to claim 1 or 2, characterized in that: The model interface association mapping mentioned in step two includes automatic association mapping or manual association mapping; The automatic association mapping refers to mapping the list of model interface functions one by one to the standard interface of the required model specification framework based on the automatic analysis results of the semantic analysis knowledge base. The manual association mapping refers to manually mapping the list of model interface functions one by one to the standard interfaces of the required model specification framework by integrating the experience and knowledge of the personnel; it also includes manually correcting the results of the automatic association mapping.
7. The integration method according to claim 1 or 2, characterized in that: The model specification framework described in step two includes the FMI specification, BOM specification, and SMP specification.
8. The integration method according to claim 1 or 2, characterized in that: The event association mapping strategies mentioned in step two include "one-to-one", "one-to-many", "many-to-many", "many-to-one", "one-to-zero", and "zero-to-one"; the association mapping logic used based on the strategies includes adding functions, deleting functions, renaming functions, merging functions, decomposing functions, and rearranging APIs.
9. The integration method according to claim 1 or 2, characterized in that: In step three, during the integration and configuration of multi-form heterogeneous models, it is necessary to set model integration parameters, including integration target type, target interface format, target language, target bit width, communication interface type, target runtime environment, dependencies, integrated model name, integration description, and host environment.
10. The integration method according to claim 1 or 2, characterized in that: The simulation system refers to a set of software and hardware systems that realizes the model of the simulated system according to the simulation task requirements for conducting simulation experiments, including simulation equipment, operators and models.
11. A co-simulation model integration tool, The integration method according to claim 1 or 2 is characterized in that: the integration tool includes a model parameter semantic analysis function module, a model interface association mapping function module, a model integration configuration function module, and a model integration and database entry function module; The model parameter semantic analysis function module includes: a meta-model data analysis unit, a conceptual model description analysis unit, a static semantic analysis unit, and a dynamic semantic analysis unit; The model interface association mapping function module maps the interface functions in the model to be integrated to the standard interfaces required by the final model specification framework, and automatically generates mapping code; the input of this module is a list of model interface functions and the mapping connection relationship entered on the interface, and the output is a relationship mapping code file; The model integration configuration function module is responsible for configuring the integrated environment of the imported multi-form heterogeneous models; the model integration configuration function module includes a virtualization environment deployment unit and a parameter configuration unit; The model integration module will package and integrate all relevant files of the multi-form heterogeneous model as needed, and finally send them to the model resource library for storage, or directly provide them to the target simulation system for linking and calling.
12. The integration tool according to claim 11, characterized in that: The meta-model data analysis unit analyzes and describes the model from a pragmatic perspective; the unit converts the basic information of the model to be integrated into an XML-formatted analysis file and outputs it, providing some node knowledge for the subsequent semantic analysis knowledge base; The conceptual model description and analysis unit analyzes and describes the model interaction mode, interaction process, state transition, interaction-related entity type and event type from a semantic level. The unit allows users to input the model interaction mode through the UI interface, define the event type and state transition conditions of each model interaction mode, define the model entity type associated with each event, and output an XML format analysis file, which can describe the interaction process inside or outside the model. The static semantic analysis unit allows users to input relevant information about the model to be integrated through a UI interface, including input / output parameter ID, input / output parameter name, data type of input / output parameter, unit of input / output parameter, upper limit of input / output parameter value, lower limit of input / output parameter value, and row and column numbers of input / output parameters in the input / output data file. It also outputs an XML-formatted analysis file, providing basic data for the subsequent implementation of various functional units in the model encapsulation. The dynamic semantic analysis unit supports extracting and dynamically calling external interface functions of the model. It inputs initial parameters according to the model input interface data format, then runs the model file and outputs the returned data of the model's calling interface, thus realizing the model interface verification function.
13. The integration tool according to claim 11, characterized in that: The parameter configuration unit allows users to input parameters through the UI interface to configure the model running environment, set model integration parameters, and output XML-formatted model directory files, model assembly files, and model scheduling file integration configuration files. The virtualization environment deployment unit encapsulates and deploys the model to be integrated in the virtual model runtime environment, and then communicates with the target simulation system in the heterogeneous model runtime system environment through the model service bus; The virtual model runtime environment includes various implementation methods such as virtual machines and containers; the input of this unit is the model library to be packaged and the integration configuration file, and the output is the deployment directory and startup method of the virtualization environment.
14. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the integrated tool as described in any one of claims 11 to 13.
Citation Information
Patent Citations
Multi-field simulation model integration method and system
CN115061772A
Simulation model operation scheduling method for navigation efficiency simulation system
CN118567963A