Design simulation integration method based on SysML and Modelica
By combining SysML and Modelica in system design, the system architecture model and simulation model is established to achieve the integration of system design and simulation, solving the information transmission problem between design and simulation, and improving the efficiency and accuracy of design verification.
Patent Information
- Application Number
- CN202411642065.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-03-07
AI Technical Summary
How to integrate system design and system simulation, and solve the problem that design requires simulation verification and simulation requires design and analysis of system objects and parameters.
Using the integrated design simulation method based on SysML and Modelica, the system architecture model is built through SysML, and the simulation model is built using Modelica to establish the association between SysML input parameters and Modelica input interface, as well as the association between Modelica output interface and SysML output parameters, set the Modelica variable value and start the simulation.
It realizes the integrated integration of system design and simulation. Through the combination of SysML and Modelica, it supports the design and simulation of complex systems, improving the efficiency and accuracy of design verification.
Smart Images

Figure CN119578066A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of system design and simulation, in particular to a design and simulation integration method based on SysML and Modelica. Background Art
[0002] System design is the process of designing a new system that can meet the target requirements to the greatest extent based on the results of the current analysis, using the ideas and methods of system science. System simulation is to establish a simulation model that can describe the system structure or behavior process and has a certain logical relationship or quantitative relationship based on the design results, and conduct experiments or quantitative analysis based on this to obtain various information required for correct decision-making. System design and simulation are closely related and inseparable. Design requires simulation to verify and iterate, and simulation requires the design to analyze system objects and parameters. How to achieve the integration of system design and system simulation is a technical problem that needs to be solved. Summary of the invention
[0003] The present invention provides a design and simulation integration method based on SysML and Modelica, aiming at realizing the integrated fusion of system design and system simulation.
[0004] In the first aspect, a design simulation integration method based on SysML and Modelica is provided, including:
[0005] Use SysML to build system architecture models, including system components, interfaces, and parameters;
[0006] Use Modelica to build simulation models and provide external input and output interfaces;
[0007] Establish the association between SysML system input parameters and Modelica simulation input interface;
[0008] Establish the association between the output interface of Modelica simulation and the output parameters of SysML system;
[0009] Set Modelica variable values and start Modelica model simulation.
[0010] In combination with the first aspect, in some implementations of the first aspect, using SysML to construct a system architecture model includes:
[0011] Use SysML's Block to express the class of system composition, and use SysML's composition attribute to express the system composition; use SysML's InterfaceBock to express the class of system interface, and use SysML's proxy port to express the system interface; system architecture model parameters are represented by value attributes; parameter types are uniformly set to Real scalars; SysML architecture model is visually expressed through BDD and IBD; BDD uses a tree diagram layout to express the composition of the system; IBD expresses the system interface and the connection relationship of the interface.
[0012] In combination with the first aspect, in some implementations of the first aspect, the input interface and output interface types of the Modelica model are both Real scalars.
[0013] In conjunction with the first aspect, in certain implementations of the first aspect, establishing an association between a SysML system input parameter and an input interface of a Modelica simulation includes:
[0014] Generate an input interface connection description file in XML format according to the input parameter connection relationship. The file is used to record the information associated with SysML and Modelica variables.
[0015] Generate input variable and value description information in XML format according to the value set by SysML variable;
[0016] By reading the input interface connection description file, input variables and value description information, the variable values to be set for the Modelica model variables are obtained.
[0017] In conjunction with the first aspect, in certain implementations of the first aspect, establishing an association between an output interface of the Modelica simulation and an output parameter of the SysML system includes:
[0018] Generate an output interface connection description file in XML format according to the output parameter connection relationship;
[0019] Generate the output interface value information after Modelica model simulation into the description information of output variables and values in XML format;
[0020] By reading the output interface connection description file, output variables and value description information, the SysML output variable value is obtained, and then it is determined whether the SysML architecture model meets the indicator requirements.
[0021] In combination with the first aspect, in some implementations of the first aspect, the use of Modelica to construct the simulation model is specifically to use Modelica to construct a subsystem model; the method further includes:
[0022] Establish the filling relationship between the SysML architecture model and the Modelica subsystem model, and specify the Modelica subsystem model to fill the SysML architecture model;
[0023] Perform model population of SysML architecture models and Modelica subsystem models;
[0024] Based on the topological relationship of the SysML architecture model, a Modelica architecture model is generated. The Modelica model includes all parameters of the SysML design model and parameter default values. The Modelica architecture model is a subsequent Modelica simulation object.
[0025] That is, when you start the Modelica model simulation later, the Modelica architecture model generated here is started.
[0026] Second, a design and simulation integration method based on SysML and Modelica, including:
[0027] Use SysML to build system architecture models;
[0028] Use Modelica to build subsystem models;
[0029] Establish the filling relationship between the SysML architecture model and the Modelica subsystem model, and specify the Modelica subsystem model to fill the SysML architecture model;
[0030] Perform model population of SysML architecture models and Modelica subsystem models;
[0031] Generate a Modelica architecture model based on the topological relationship of the SysML architecture model. The Modelica model contains all the parameters of the SysML design model and their default values.
[0032] Starts simulation of a Modelica architecture model.
[0033] In conjunction with the second aspect, in certain implementations of the second aspect, using SysML to construct a system architecture model includes:
[0034] Use SysML's Block to express the class of system composition, and use SysML's composition attribute to express the system composition; use SysML's InterfaceBock to express the class of system interface, and use SysML's proxy port to express the system interface; system architecture model parameters are represented by value attributes; parameter types are uniformly set to Real scalars; SysML architecture model is visually expressed through BDD and IBD; BDD uses a tree diagram layout to express the composition of the system; IBD expresses the system interface and the connection relationship of the interface.
[0035] In conjunction with the second aspect, in certain implementations of the second aspect, the constructed Modelica subsystem model is of model type; the constructed Modelica subsystem model is a component of the SysML architecture model in terms of business.
[0036] In conjunction with the second aspect, in some implementations of the second aspect, performing model filling of the SysML architecture model and the Modelica subsystem model includes:
[0037] Establish the interface connection relationship between SysML architecture model and Modelica subsystem model;
[0038] Establish interface connections between Modelica subsystems;
[0039] After the SysML architecture model and the Modelica subsystem model interface are connected, the type of the system architecture interface automatically changes to the Modelica subsystem interface.
[0040] In conjunction with the second aspect, in some implementations of the second aspect, generating a Modelica architecture model based on the topological relationship of the SysML architecture model includes:
[0041] According to the filling relationship, the Modelica subsystem model is filled into the generated Modelica architecture model; the Modelica architecture model includes multiple Modelica subsystem models, each Modelica subsystem model generates a Model, a component is generated under the Model, and the connection relationship is consistent with the filling relationship; according to the interface connection relationship, the Modelica subsystem model interface is connected to the Modelica architecture model interface to form a complete Modelica simulation model.
[0042] Compared with the prior art, the solution provided by the present invention includes at least the following beneficial technical effects:
[0043] 1. The present invention adopts the standard SysML language, and the syntax of SysML is not modified. SysML is a system modeling language in the field of system engineering. The design purpose of SysML is to solve the modeling problems faced in system engineering and provide a simple, easy-to-learn and powerful modeling language for system designers. SysML is particularly effective for describing system requirements analysis, structural analysis, behavior description, parameter allocation and attribute constraints in system design analysis. It supports multiple structured and object-oriented methods and processes.
[0044] 2. The standard Modelica language used in the present invention does not modify the syntax of Modelica. Modelica is an object-oriented, equation-based, non-causal, multi-domain unified modeling language, which has natural advantages in building large-scale complex heterogeneous models involving multiple disciplines and multi-professional couplings such as mechanics, electronics, control, hydraulics, pneumatics, and heat.
[0045] 3. Convert the existing Modelica into a SysML computing component, and use the powerful computing and simulation capabilities of the Modelica model to perform complex verification calculations during the design phase.
[0046] 4. Directly convert the existing Modelica model into SysML Block object for modeling, realizing the hybrid modeling of SysML and Modelica. It is no longer necessary to modify the model using the Modelica modeling tool after generating the Modelica simulation model in SysML, thus realizing the integration of design and simulation in visual modeling.
[0047] 5. By converting the SysML model into the Modelica model, consistent transfer of design-to-simulation knowledge is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a schematic flow chart of a design and simulation integration method based on SysML and Modelica.
[0049] Figure 2 This is a schematic flow chart of another design and simulation integration method based on SysML and Modelica.
[0050] Figure 3 This is a schematic diagram of the SysML architecture topology relationship.
[0051] Figure 4 This is a schematic diagram of the Modelica architecture model. DETAILED DESCRIPTION
[0052] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0053] Model-based system engineering usually uses SysML as a system design tool. It supports a general graphical modeling language for complex system analysis, specification, design, verification and validation. It supports the expression of sequential logic simulation, but does not support the expression and simulation of continuous time equation systems. When simulating a system, it is often completed in conjunction with a multi-physics modeling language and simulation platform (such as Modelica, Simulink).
[0054] Modelica is an open, object-oriented modeling language suitable for modeling large-scale complex heterogeneous physical systems, including mechanical, electronic, electrical, hydraulic, thermal, control and process-oriented subsystem models. Modelica is an equation-based modeling and simulation language that supports simulation of continuous time and discrete events, but does not support modeling of system requirements, functions and logical components.
[0055] To achieve the systematization of design simulation, it is necessary to transfer the information of SysML design model to Modelica simulation model. Since SysML and Modelica are two complex modeling languages with different standards, how to establish the relationship between them and then realize the integration of system design and system simulation is the technical problem to be solved by this patent.
[0056] The present invention provides a design simulation integration method based on SysML and Modelica, which is used to verify whether parameters are correct through simulation during system design. The specific steps are as follows.
[0057] Step 101, using SysML to build a system architecture model, including system components, interfaces and parameters.
[0058] Use SysML's Block to express the class of system composition, and use SysML's composition attribute to express the system composition. Use SysML's InterfaceBock to express the class of system interface, and use SysML's proxy port to express the system interface. System architecture model parameters are represented by value attributes. In order to facilitate the subsequent connection with simulation model parameters, the type is uniformly set to Real scalar. Group the system architecture model into input parameters, output parameters, and internal parameters, among which input and output parameters support association with Modelica external input and output interfaces. SysML's architecture model is visually expressed through BDD and IBD. BDD uses a tree diagram layout to express the composition of the system. IBD expresses the system's interfaces and the connection relationship between the interfaces.
[0059] Step 102, use Modelica to build a simulation model, providing external input and output interfaces, and internal sub-components.
[0060] The constructed Modelica model has an unlimited number of input and output interfaces, and the type is Real scalar.
[0061] Step 103: Establish an association between the SysML system input parameters and the input interface of the Modelica refined simulation.
[0062] According to the input parameter connection relationship, an input interface connection description file in XML format is generated, which records the information associated with SysML and Modelica variables. Then, according to the value set by the SysML variable, the input variable and value description information in XML format is generated. The Modelica model obtains the variable value to be set for the Modelica model variable by reading the input interface connection description file and the description information of the input variable and value.
[0063] Step 104: establish association between the SysML system output parameters and the output interface of the Modelica refined simulation.
[0064] Generate an output interface connection description file in XML format according to the output parameter connection relationship, and then generate output variable and value description information in XML format from the output interface value information after Modelica model simulation. The SysML model sets the SysML output variable value by reading the output interface connection description file and the output variable and value description information. Check the SysML output parameter information to determine whether it meets the indicator requirements.
[0065] Step 105, setting Modelica variable values and starting Modelica model simulation.
[0066] The present invention also provides a design simulation integration method based on SysML and Modelica, which is used to verify whether the parameters are correct through simulation after the system design is completed. The specific steps are as follows.
[0067] Step 201: Use SysML to build a system architecture model.
[0068] Use SysML's Block to express the class of system composition, and use SysML's composition attribute to express the system composition. Use SysML's InterfaceBock to express the class of system interface, and use SysML's proxy port to express the system interface. System architecture model parameters are represented by value attributes. In order to facilitate the subsequent connection with simulation model parameters, the type is uniformly set to Real scalar. Group the system architecture model into input parameters, output parameters, and internal parameters, among which input and output parameters support association with Modelica external input and output interfaces. SysML's architecture model is visually expressed through BDD and IBD. BDD uses a tree diagram layout to express the composition of the system. IBD expresses the system's interfaces and the connection relationship between the interfaces.
[0069] Step 202: Use Modelica to build a subsystem model of the system.
[0070] The constructed Modelica subsystem model is of model type. The constructed Modelica subsystem model can be finer-grained than the SysML architecture model and is a component of the SysML architecture model in terms of business. The constructed Modelica subsystem model is not limited to the hierarchy of the SysML architecture model. For example, the SysML architecture model is divided into three layers: system, subsystem, and device. The Modelica subsystem model can be a subsystem model to be filled or a device model to be filled.
[0071] Step 203 , establishing a filling relationship between the SysML architecture model and the Modelica subsystem model, and specifying the Modelica subsystem model to fill the SysML architecture model.
[0072] The fill relationship is used to indicate the SysML architecture model filled by the Modelica subsystem model, and is also used to indicate the specific interface connection relationship. The filled Modelica subsystem model should be a component of the SysML architecture model in the physical system. A SysML architecture model can be filled with multiple Modelica subsystems.
[0073] Step 204 , executing model filling of the SysML architecture model and the Modelica subsystem model.
[0074] First, establish the interface connection relationship between the SysML architecture model and the Modelica subsystem model; then establish the interface connection relationship between the Modelica subsystems. The Modelica subsystem interface connection needs to check the interface matching relationship; after the SysML architecture model and the Modelica subsystem model interface are connected, the type of the system architecture interface automatically changes to the Modelica subsystem interface, which is convenient for the subsequent generation of the Modelica architecture.
[0075] Step 205 , based on the topological relationship of the SysML architecture model, a Modelica architecture model is generated, where the Modelica model includes all parameters of the SysML design model and parameter default values.
[0076] like Figure 3 As shown in Figure 1, the topological relationship of the SysML architecture model can be displayed through the IBD diagram. The conversion mapping rules for generating the Modelica architecture model from the SysML architecture model are shown in Table 1 and Table 2.
[0077] Table 1 Modelica and SysML structural metamodels
[0078]
[0079] Table 2 Modelica and SysML syntax concepts correspondence
[0080]
[0081] According to the filling relationship, the Modelica subsystem model is filled into the generated Modelica architecture model, such as Figure 4 As shown. The Modelica architecture model includes multiple Modelica subsystem models, each Modelica subsystem model generates a Model (class), under which a component (instance) is generated, and the connection relationship is consistent with the filling relationship in step 204. According to the interface connection relationship, the Modelica subsystem model interface is connected to the Modelica architecture model interface to form a complete and refined simulation model.
[0082] Step 206 , start the simulation of the Modelica architecture model.
[0083] Use the parameter curve to check whether the architecture and parameters of the SysML design meet the index requirements.
[0084] The present invention provides a design simulation integration method based on SysML and Modelica. The specific steps are as follows.
[0085] Step 301: Use SysML to build a system architecture model. For specific implementation, see step 201.
[0086] Step 302: Use Modelica to construct a subsystem model of the system. For specific implementation, see step 202.
[0087] Step 303: Establish a filling relationship between the SysML architecture model and the Modelica subsystem model, and specify the Modelica subsystem model to fill the SysML architecture model. For a specific implementation, see step 203.
[0088] Step 304 , executing model filling of the SysML architecture model and the Modelica subsystem model. For specific implementation, see step 204 .
[0089] Step 305: Generate a Modelica architecture model based on the topological relationship of the SysML architecture model, wherein the Modelica model includes all parameters of the SysML design model and their default values.
[0090] Step 306: Establish association between SysML system input parameters and Modelica refined simulation input interface. For specific implementation, see step 103.
[0091] Step 307: Establish association between the SysML system output parameters and the output interface of the Modelica refined simulation. For specific implementation, see step 104.
[0092] Step 308: Set Modelica variable values and start Modelica model simulation. For specific implementation, see step 105 or 206.
[0093] Although the present invention is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present invention. Any person skilled in the art may make possible changes and modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be based on the scope defined by the claims of the present invention.
Claims
1. A design simulation integration method based on SysML and Modelica, characterized in that: include: Use SysML to build system architecture models, including system components, interfaces, and parameters; Use Modelica to build simulation models and provide external input and output interfaces; Establish the association between SysML system input parameters and Modelica simulation input interface; Establish the association between the output interface of Modelica simulation and the output parameters of SysML system; Set Modelica variable values and start Modelica model simulation.
2. The method according to claim 1, characterized in that The use of SysML to build a system architecture model includes: Use SysML's Block to express the class of system composition, and use SysML's composition attribute to express the system composition; use SysML's InterfaceBock to express the class of system interface, and use SysML's proxy port to express the system interface; system architecture model parameters are represented by value attributes; parameter types are uniformly set to Real scalars; SysML architecture model is visually expressed through BDD and IBD; BDD uses a tree diagram layout to express the composition of the system; IBD expresses the system interface and the connection relationship of the interface.
3. The method according to claim 1, characterized in that The input interface and output interface types of the Modelica model are both Real scalar.
4. The method according to claim 1, characterized in that: The establishing of association between SysML system input parameters and Modelica simulation input interface includes: Generate an input interface connection description file in XML format according to the input parameter connection relationship. The file is used to record the information associated with SysML and Modelica variables. Generate input variable and value description information in XML format according to the value set by SysML variable; By reading the input interface connection description file, input variables and value description information, the variable values to be set for the Modelica model variables are obtained.
5. The method according to claim 1, characterized in that The establishing of the association between the output interface of the Modelica simulation and the output parameters of the SysML system includes: Generate an output interface connection description file in XML format according to the output parameter connection relationship; Generate the output interface value information after Modelica model simulation into the description information of output variables and values in XML format; By reading the output interface connection description file, output variables and value description information, the SysML output variable value is obtained, and then it is determined whether the SysML architecture model meets the indicator requirements.
6. A design simulation integration method based on SysML and Modelica, characterized in that: include: Use SysML to build system architecture models; Use Modelica to build subsystem models; Establish the filling relationship between the SysML architecture model and the Modelica subsystem model, and specify the Modelica subsystem model to fill the SysML architecture model; Perform model population of SysML architecture models and Modelica subsystem models; Generate a Modelica architecture model based on the topological relationship of the SysML architecture model. The Modelica model contains all the parameters of the SysML design model and their default values. Starts simulation of a Modelica architecture model.
7. The method according to claim 6, characterized in that The use of SysML to build a system architecture model includes: Use SysML's Block to express the class of system composition, and use SysML's composition attribute to express the system composition; use SysML's InterfaceBock to express the class of system interface, and use SysML's proxy port to express the system interface; system architecture model parameters are represented by value attributes; parameter types are uniformly set to Real scalars; SysML architecture model is visually expressed through BDD and IBD; BDD uses a tree diagram layout to express the composition of the system; IBD expresses the system interface and the connection relationship of the interface.
8. The method according to claim 6, characterized in that The constructed Modelica subsystem model is of model type; the constructed Modelica subsystem model is a component of the SysML architecture model in terms of business.
9. The method according to claim 6, characterized in that The execution of model filling of the SysML architecture model and the Modelica subsystem model includes: Establish the interface connection relationship between SysML architecture model and Modelica subsystem model; Establish interface connections between Modelica subsystems; After the SysML architecture model and the Modelica subsystem model interface are connected, the type of the system architecture interface automatically changes to the Modelica subsystem interface.
10. The method according to claim 6, characterized in that The generating of the Modelica architecture model based on the topological relationship of the SysML architecture model includes: According to the filling relationship, the Modelica subsystem model is filled into the generated Modelica architecture model; the Modelica architecture model includes multiple Modelica subsystem models, each Modelica subsystem model generates a Model, a component is generated under the Model, and the connection relationship is consistent with the filling relationship; according to the interface connection relationship, the Modelica subsystem model interface is connected to the Modelica architecture model interface to form a complete Modelica simulation model.
Citation Information
Cited By
Conversion method and system based on SysML and Modelica model semantic mapping
CN120780317A