CN103514331A - Method for converting Simulink model into UML model - Google Patents

Method for converting Simulink model into UML model Download PDF

Info

Publication number
CN103514331A
CN103514331A CN201310466291.9A CN201310466291A CN103514331A CN 103514331 A CN103514331 A CN 103514331A CN 201310466291 A CN201310466291 A CN 201310466291A CN 103514331 A CN103514331 A CN 103514331A
Authority
CN
China
Prior art keywords
model
port
class
simulink
conversion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201310466291.9A
Other languages
Chinese (zh)
Other versions
CN103514331B (en
Inventor
王宇英
周兴社
梁东方
李晓宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Northwestern Polytechnical University
Original Assignee
Northwestern Polytechnical University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Northwestern Polytechnical University filed Critical Northwestern Polytechnical University
Priority to CN201310466291.9A priority Critical patent/CN103514331B/en
Publication of CN103514331A publication Critical patent/CN103514331A/en
Application granted granted Critical
Publication of CN103514331B publication Critical patent/CN103514331B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a method for converting a Simulink model into a UML model. The method comprises the steps of setting up a corresponding relation between a model element of the Simulink model and a model element of the UML model, setting up a Simulink source meta model framework and a UML target meta model framework, and therefore determining the method for converting the Simulink model into the UML model according to the Simulink source meta model framework and the UML target meta model framework. According to the method, the corresponding relation between the model element of the Simulink model and the model element of the UML model is determined, the complexity of model conversion is simplified, the problems of domain refinement in the general modeling process and fusion of the calculating process and the physical process in a CPS system are solved, the problems of weakness of requirement modeling of the Simulink model and expression control and algorithm modeling of the UML model are solved, the advantages of the Simulink model and the advantages of the UML model are complementary, the advantages are enhanced, disadvantages are avoided, and the efficiency of modeling development is improved.

Description

A kind of method from Simulink model conversion to uml model
Technical field
The present invention relates to a kind of information physics emerging system, especially a kind of method of model conversion.
Background technology
Information physics emerging system (Cyber-Physical System, CPS) refer on the basis of environment sensing, the degree of depth has merged the networking physical equipment system of 3C, it is realized the degree of depth by computation process and the interactional feedback circulation of physical process and merges and real-time, interactive, in safe, reliable, efficient and real-time mode, monitor or control physical entity, its objective is that the degree of depth that realizes information world and physical world merges.According to function and system property, divide, CPS Integrated Model can be divided into physical entity, computational entity and interworking entity.Physical entity refers to the physical environment that physical process and the degree of depth thereof embed, and its process is mainly expressed as the physical rules of following at continuous-time domain, adopts the dynamic continuous simulation model advancing based on the time to portray physical entity; Computational entity mainly refers to computing unit and the control module of CPS, and its process is mainly expressed as data processing and logic control, adopts and based on event driven dynamic discrete realistic model, computational entity is portrayed; Interworking entity is often comprised of physical feature or calculating member, mainly describes their combined characteristic, interactive interface rule, syncretic relation and behavioral trait.
Model driving development method (Model Driven Development, be called for short MDD) in early days the stage system is analyzed and is verified, contribute to the qualitative attribute of the system that guarantees, and effectively control development time and cost.Model conversion is the core that model-driven relates to development approach, and it refers to the model that a kind of model conversion of language description is become to another language description.It is considered to complicated embedded real time system design and the basis of realizing based on model-driven.
Simulink model is mainly used to portray the continuous dynamic process advancing based on the time, and uml model is mainly used to portray based on event driven discrete action process.Adopt UML to the static structure simulation modeling of computational entity and the dynamic behaviour simulation modeling based on discrete event driving, and adopt Simulink the dynamic Continuous behavior simulation modeling of physical entity to be become to the main flow of engineering test.But the isomerism of CPS, shows the isomerism of Simulink and UML, make the fusion of CPS physical entity and computational entity in the face of very large challenge.
Have at present a lot of collaborative simulation modeling methods based on Simulink and UML.Germany Fraunhofer research institution realizes UML and Simulink at the collaborative simulation of embedded real-time domain by expansion UML Profile, Holland Nijmegen university realizes UML and Simulink in the synchronization simulation of embedded real-time domain by expansion UML in the ability to express aspect the execution time, and German EXTESSY mechanism is integrated into by UML and Simulink model code the collaborative simulation of realizing Simulink and UML in a unified system architecture at code level.
But these integrated approaches all fundamentally do not solve the fusion problem of Simulink and UML, the isomerism of CPS physical entity and computational entity, show as Simulink and the difference in essence of uml model element, make these synergy emulation methods can not meet the requirement that the CPS system degree of depth merges.
Summary of the invention
In order to overcome the deficiencies in the prior art, for above problem, the present invention proposes with Simulink model physical entity is carried out to simulation modeling, with uml model, computational entity is carried out to simulation modeling, between two-layer model, adopt model conversion method, the crossover tool that uses a model is realized Simulink physical model to the conversion of UML computation model, completes the integrated collaborative simulation of CPS system-computed-physical entity.
The present invention will solve the Heterogeneity of above-mentioned Simulink model and uml model, and a kind of conversion method from Simulink model conversion to uml model is provided.
The technical solution adopted for the present invention to solve the technical problems, comprises the steps:
1) set up the corresponding relation between the model element of Simulink model and the model element of uml model
For basic model pantogen submodule Primitive Block, subsystem module SubSystem Block, line Line/Branch and the port Port in Simulink model, by conversion one to one between ATL transformation rule implementation model element, the model element class Class that is uml model by its corresponding conversion respectively, containing class Class Contained Blocks, connector Connector, the flow port Flowport of submodule;
2) set up Simulink source meta-model framework and UML target element model framework
Set up Simulink source meta-model framework, Simulink source meta-model comprise former submodule and containing the meta-model EBlock of subsystem module, the meta-model ELine of the meta-model EPort of port, line, the meta-model EFunction of the meta-model EParameter of parameter and function, set up Simulink source meta-model framework, between EBlock and EParameter, adopt paradigmatic relation, an EBlock can comprise a plurality of EParameter; Between EBlock and EFunction, adopt paradigmatic relation, an EBlock can comprise a plurality of EFunction; Between EBlock and EPort, adopt paradigmatic relation, an EBlock can comprise a plurality of EPort; Between ELine and EPort, adopt paradigmatic relation, an ELine can comprise a plurality of EPort;
Set up UML target element model framework, UML target element model comprise class and containing the meta-model EClass of class of submodule, the meta-model EFlowport of the meta-model EConnector of connector, flow port, the meta-model EOperation of the meta-model EAttribute of attribute and operation; Set up UML target element model framework, between EClass and EAttribute, adopt paradigmatic relation, an EClass can comprise a plurality of EAttribute; Between EClass and EOperation, adopt paradigmatic relation, an EClass can comprise a plurality of EOperation; Between EConnector and EFlowport, adopt paradigmatic relation, an EConnector can comprise a plurality of EFlowport;
Set up the ecore structure of Simulink fundamental element meta-model: according to Simulink source meta-model framework, in definition ecore structure, comprising five classes, is respectively Block, Parameter, Function, Port, Line; Variable in class Block has function f unctions, input parameter srcBlkParams, output parameter dstBlkParams, flows into port srcBlkPorts and outflow port dstBlkPorts, the type of functions is Function, the type of srcBlkParams and dstBlkParams is Parameter, and the type of srcBlkPorts and dstBlkPorts is Port; The variable of class Parameter has Parameter place module blockParameter, the type of blockParameter is Block, when Parameter is input data, blockParameter represents Data Source module srcBlockParameter, when Parameter is output data, blockParameter represents that data arrive module dstBlockParameter; Variable in class Function has Function place module blockFunction, and the type of blockFunction is Block; Variable in class Port comprises Port place module blockPort and the associated line linePort of Port, the type of blockPort is Block, when Port is input data, blockPort is load module srcBlockPort, when Port is output data, blockPort is output module dstBlockPort, the type of linePort is Line, and when Port is input data, line is input link srcLinePort, when Port is output data, line is output line dstLinePort; The port portLine that variable in Line has line to be associated, the type of portLine is Port, Line two ends connect two ports, according to data input or data output, can be divided into input port srcLnPorts and output port dstLnPorts;
Set up the ecore structure of UML fundamental element meta-model: according to UML target element model framework, in definition ecore structure, comprising five classes, is respectively Class, Attribute, Operation, Flowport and Connector; Variable in class Class has parameter, operation, port, and the type of parameter is Attribute, and the type of operation is Operation, and the type of port is Flowport; Variable in class Arrtibute has attribute place class classAttribute, and the type of classAttribute is Class; Variable in class Operation has operation place class classOperation, and the type of classOperation is Operation; The connector conncetorFlowport that variable ports having place class classFlowport in class Flowport and Flowport are associated, the type of classFlowport is Class, the type of conncetorFlowport is Connector, the type of Flowport direction is EString, when Flowport is input port, Flowport direction is " IN ", and when Flowport is output port, Flowport direction is " OUT "; The port flowportConnector that variable in class Connector has Connector to be associated, the type of flowportConnector is Flowport;
3) according to Simulink source meta-model and UML target element model, determine that Simulink model conversion is to the conversion method of uml model
Use ATL transformation rule to be converted to the Class in UML the Block in Simulink model, while there is ring in Simulink model, to look around is a Block, by name and the type information of the parameter in Block, function, port and Block thereof itself, corresponding conversion is name and the type information of attribute, operation, flow port and Class in Class respectively; Wherein, Simulink parameter is to the conversion of UML attribute, comprises the conversion of the information of the class that the conversion of parameter name and parameter are corresponding, comprises that srcBlockParameter and dstBlockParameter are to the conversion of classAttribute; Simulink function, to the conversion of UML operation, comprises the conversion of operating operation name, and the conversion of the information of the class of operational correspondence, comprises that blockFunction is to the conversion of classOperation; Simulink port, to the conversion of UML flow port, comprises the conversion of port name and the conversion of port direction, and wherein, the flow port direction that srcBlkPorts is corresponding is " IN ", and the flow port direction that dstBlkPorts is corresponding is " OUT "; Determine that Simulink model element Line is to the conversion of uml model Elements C onnector, comprise the conversion of Line name, the port srcLnPorts being connected with Line and the conversion of dstLnPorts, the conversion of srcLnPorts and dstLnPorts comprises the conversion of port name word and the conversion of port direction, the flow port direction that srcLnPorts is corresponding is " IN ", the flow port direction that dstLnPorts is corresponding is " OUT ", at this, realize the conversion of Simulink model to uml model, solved the problem that LiaoCPS field computation process and physical process merge.
The invention has the beneficial effects as follows due to the model element of having analyzed Simulink model and uml model, determined the corresponding relation of Simulink model element and uml model element, simplified the analysis to complex model:
1. the present invention has analyzed the structure of Simulink meta-model and UML meta-model, has designed the framework of Simulink source meta-model and UML target element model, has simplified the complicacy of model conversion;
2. the object module of the model conversion strategy in the present invention is uml model, because Simulink is good at, the continuous process advancing based on the time is described, UML is for describing the process driving based on discrete event, the appearance of this model conversion strategy, solved in CPS system the problem that the problem of general modeling process field refinement and computation process and physical process merge.
3. solved the weak tendency of Simulink on Requirements Modeling, and uml model express to control, the defect of algorithm modeling aspect, has complementary advantages both, maximizes favourable factors and minimizes unfavourable ones, to improve the efficiency of model development simultaneously.
Accompanying drawing explanation
Fig. 1 is the overall framework of model conversion.
Fig. 2 is Simulink fundamental element metamodel structure definition figure.
Fig. 3 is UML fundamental element metamodel structure definition figure;
Fig. 4 is Simulink model illustration, wherein, In1, In2 represent input port, Out1 represents output port, Line1, Line2, Line3, Line4, Line5 represent line, and Integrator represents integrator module, and Integrator, Line2, Line4 and totalizer form subsystem module SubSystem, Add represents former submodule, is used for realizing additive operation.
Fig. 5 is uml model illustration, itsSubSystem:SubSystem, itsSum:Sum representation class, inAttribute1, inAttribute2, inAttribute3, outAttribute1, outAttribute2 represent attribute, double is the type of attribute, In1, In2, In3, Out1, Out2 represent flow port, and Line2 represents connector.
Fig. 6 is the constitutional diagram of class in uml model.Wherein (a) is the constitutional diagram of SubSystem in uml model illustration, Active is the name of state, tm (100) represents time-event, every 100ms triggers once, and SubSystemFunction () represents operation, (b) is the constitutional diagram of Sum in uml model illustration, Active represents the name of state, tm (100) represents time-event, and every 100ms triggers once, and SumFunction () represents operation.
Embodiment
Below in conjunction with drawings and Examples, the present invention is further described.
The present invention relates to a Simulink to the model transformation tools of UML, this model transformation tools, to any Simulink model, can be transformed into corresponding uml model automatically.The overall framework of model conversion as shown in Figure 1.
The step of conversion method is:
1) set up the corresponding relation between the model element of Simulink model and the model element of uml model
For basic model pantogen submodule Primitive Block, subsystem module SubSystem Block, line Line/Branch and the port Port in Simulink model, by conversion one to one between ATL transformation rule implementation model element, the model element class Class that is uml model by its corresponding conversion respectively, containing class Class Contained Blocks, connector Connector, the flow port Flowport of submodule;
This model transformation tools, based on ATL model conversion technology, complete this crossover tool of model, the meta-model of definition source language Simulink and target language UML, meta-model is with OO thought, to describe a kind of syntactic structure of language, thereby while making model conversion, can, according to its corresponding syntactic element, carry out corresponding conversion.For the feature of model conversion, used KM3 to redescribe the meta-model syntactic structure of Simulink and UML.
2) set up Simulink source meta-model framework and UML target element model framework
Set up Simulink source meta-model framework, Simulink source meta-model comprise former submodule and containing the meta-model EBlock of subsystem module, the meta-model ELine of the meta-model EPort of port, line, the meta-model EFunction of the meta-model EParameter of parameter and function, set up Simulink source meta-model framework, between EBlock and EParameter, adopt paradigmatic relation, an EBlock can comprise a plurality of EParameter; Between EBlock and EFunction, adopt paradigmatic relation, an EBlock can comprise a plurality of EFunction; Between EBlock and EPort, adopt paradigmatic relation, an EBlock can comprise a plurality of EPort; Between ELine and EPort, adopt paradigmatic relation, an ELine can comprise a plurality of EPort; Paradigmatic relation as shown in Figure 2.
Set up UML target element model framework, UML target element model comprise class and containing the meta-model EClass of class of submodule, the meta-model EFlowport of the meta-model EConnector of connector, flow port, the meta-model EOperation of the meta-model EAttribute of attribute and operation; Set up UML target element model framework, between EClass and EAttribute, adopt paradigmatic relation, an EClass can comprise a plurality of EAttribute; Between EClass and EOperation, adopt paradigmatic relation, an EClass can comprise a plurality of EOperation; Between EConnector and EFlowport, adopt paradigmatic relation, an EConnector can comprise a plurality of EFlowport; Paradigmatic relation as shown in Figure 3.
Set up the ecore structure of Simulink fundamental element meta-model: according to Simulink source meta-model framework, in definition ecore structure, comprising five classes, is respectively Block, Parameter, Function, Port, Line; Variable in class Block has function f unctions, input parameter srcBlkParams, output parameter dstBlkParams, flows into port srcBlkPorts and outflow port dstBlkPorts, the type of functions is Function, the type of srcBlkParams and dstBlkParams is Parameter, and the type of srcBlkPorts and dstBlkPorts is Port; The variable of class Parameter has Parameter place module blockParameter, the type of blockParameter is Block, when Parameter is input data, blockParameter represents Data Source module srcBlockParameter, when Parameter is output data, blockParameter represents that data arrive module dstBlockParameter; Variable in class Function has Function place module blockFunction, and the type of blockFunction is Block; Variable in class Port comprises Port place module blockPort and the associated line linePort of Port, the type of blockPort is Block, when Port is input data, blockPort is load module srcBlockPort, when Port is output data, blockPort is output module dstBlockPort, the type of linePort is Line, and when Port is input data, line is input link srcLinePort, when Port is output data, line is output line dstLinePort; The port portLine that variable in Line has line to be associated, the type of portLine is Port, Line two ends connect two ports, according to data input or data output, can be divided into input port srcLnPorts and output port dstLnPorts;
Set up the ecore structure of UML fundamental element meta-model: according to UML target element model framework, in definition ecore structure, comprising five classes, is respectively Class, Attribute, Operation, Flowport and Connector; Variable in class Class has parameter, operation, port, and the type of parameter is Attribute, and the type of operation is Operation, and the type of port is Flowport; Variable in class Arrtibute has attribute place class classAttribute, and the type of classAttribute is Class; Variable in class Operation has operation place class classOperation, and the type of classOperation is Operation; The connector conncetorFlowport that variable ports having place class classFlowport in class Flowport and Flowport are associated, the type of classFlowport is Class, the type of conncetorFlowport is Connector, the type of Flowport direction is EString, when Flowport is input port, Flowport direction is " IN ", and when Flowport is output port, Flowport direction is " OUT "; The port flowportConnector that variable in class Connector has Connector to be associated, the type of flowportConnector is Flowport;
3) according to Simulink source meta-model and UML target element model, determine that Simulink model conversion is to the conversion method of uml model
Use ATL transformation rule to be converted to the Class in UML the Block in Simulink model, while there is ring in Simulink model, to look around is a Block, by name and the type information of the parameter in Block, function, port and Block thereof itself, corresponding conversion is name and the type information of attribute, operation, flow port and Class in Class respectively.Wherein, Simulink parameter is to the conversion of UML attribute, comprises the conversion of the information of the class that the conversion of parameter name and parameter are corresponding, comprises that srcBlockParameter and dstBlockParameter are to the conversion of classAttribute; Simulink function, to the conversion of UML operation, comprises the conversion of operating operation name, and the conversion of the information of the class of operational correspondence, comprises that blockFunction is to the conversion of classOperation; Simulink port, to the conversion of UML flow port, comprises the conversion of port name and the conversion of port direction, and wherein, the flow port direction that srcBlkPorts is corresponding is ' IN ', the flow port direction that dstBlkPorts is corresponding is ' OUT '.Determine that Simulink model element Line is to the conversion of uml model Elements C onnector, comprise the conversion of Line name, the port srcLnPorts being connected with Line and the conversion of dstLnPorts, the conversion of srcLnPorts and dstLnPorts comprises the conversion of port name word and the conversion of port direction, the flow port direction that srcLnPorts is corresponding is " IN ", the flow port direction that dstLnPorts is corresponding is " OUT ", at this, realize the conversion of Simulink model to uml model, solved the problem that LiaoCPS field computation process and physical process merge.
The Simulink model of take in Fig. 4 is example, and concrete conversion method is:
A, define the title of the uml model that known Simulink model will be transformed into
B, determine the module information at Simulink parameter place, the name of acquisition module
Judge whether to have defined srcBlockParameter, if defined, by srcBlockParameter, obtain the name of corresponding Block, if do not have, by dstBlockParameter, obtain the name of corresponding Block; Otherwise, need oneself definition; According to Simulink embodiment, sub-Block SubSystem has defined srcBlockParameterInAttribute2, and the name of the module that InAttribute2 is corresponding is SubSystem, as shown in Figure 5, similar, the name of the module that InAttribute1 is corresponding is Sum.
C, determine the module information at Simulink function place, the name of acquisition module
Judge whether to have defined blockFunction, if defined, by blockFunction, obtain the name of corresponding Block, if do not have, do not carry out any operation; Otherwise, need oneself definition; According to Simulink embodiment, sub-Block SubSystem has defined blockFunction SubSystemFunction, and the name of the module that SubSystemFunction is corresponding is SubSystem, as shown in Figure 5.
D, the Block in Simulink model is converted to the Class in UML, while there is ring in Simulink model, will look around is a block.
Obtain all parameters, function, port and Block self-information thereof (name, type) in Block, be converted to respectively the information (name, type) of attribute, operation, flow port and Class in Class; In Simulink embodiment, Block SubSystem is converted to uml class SubSystem, and Sum is converted to uml class Sum, and type is Add.Wherein, Simulink parameter, to the conversion of UML attribute, comprises the conversion of parameter information (parameter name etc.), and the conversion of the information of class corresponding to parameter, comprises that srcBlockParameter and dstBlockParameter are to the conversion of classAttribute; As srcBlkParams inAttribute2 and dstBlkParams outAttribute2 in Simulink Block SubSystem are converted to attributes inAttribute2 and the outAttribute2 in UML Class Subsystem.Simulink function, to the conversion of UML operation, comprises the conversion of operation information (operation name etc.), and the conversion of the information of the class of operational correspondence, comprises that blockFunction is to the conversion of classOperation; As functions SumFunction in Simulink Block Sum is converted to the operationsSumFunction in UML Class Sum.Simulink port, to the conversion of UML flow port, comprises the conversion of port information and the conversion of port direction, and wherein, the flow port direction that srcBlkPorts is corresponding is " IN ", and the flow port direction that dstBlkPorts is corresponding is " OUT "; As the srcBlkPorts In1 of Simulink Block Sum is converted to the classFlowports In1 of UML Class Sum, and flowportDirection is " IN ".Determine that Simulink model element Line is to the conversion of uml model Elements C onnector, comprise the conversion of Line information, the port srcLnPorts being connected with Line and the conversion of dstLnPorts, the conversion of srcLnPorts and dstLnPorts comprises the conversion of port information and the conversion of port direction, the flow port direction that srcLnPorts is corresponding is " IN ", the flow port direction that dstLnPorts is corresponding is " OUT ", as the Line2 in Simulink is converted to UML Connector Line2, its dstLnPorts In3 is converted to the flowports In3 in UMLClass, flowportDirection is " OUT ".
E, by meta-model and the step 2 of Simulink model) in definition Simulink ecore model, UML ecore model and the transformation rule that conversion method is write in step 3) be loaded in model conversion device, configuration operation environment, generates the meta-model of corresponding uml model
The meta-model of Simulink model is obtained by Simulink model.The data of Simulink model are preserved with XML document form under project folder, so need to pass through processing XML file, its reduction are become to the .xmi file that meets Simulink source meta-model framework.The meta-model of uml model is the .xmi model description file that meets UML target element model framework.
For uml model binding state figure, according to the Simulink model data information setting sampling time, extraction is by Simulink/RTW (Real-Time Workshop, function SimulinkFunction () in the C/C++ code of the Simulink model real-time instrument) generating, add in UML constitutional diagram, as Fig. 6 extracts respectively function SubSystemFunction () and the SumFunction () in the C/C++ code of Simulink embodiment model.

Claims (1)

1. the method from Simulink model conversion to uml model, is characterized in that comprising the steps:
1) set up the corresponding relation between the model element of Simulink model and the model element of uml model
For basic model pantogen submodule Primitive Block, subsystem module SubSystem Block, line Line/Branch and the port Port in Simulink model, by conversion one to one between ATL transformation rule implementation model element, the model element class Class that is uml model by its corresponding conversion respectively, containing class Class Contained Blocks, connector Connector, the flow port Flowport of submodule;
2) set up Simulink source meta-model framework and UML target element model framework
Set up Simulink source meta-model framework, Simulink source meta-model comprise former submodule and containing the meta-model EBlock of subsystem module, the meta-model ELine of the meta-model EPort of port, line, the meta-model EFunction of the meta-model EParameter of parameter and function, set up Simulink source meta-model framework, between EBlock and EParameter, adopt paradigmatic relation, an EBlock can comprise a plurality of EParameter; Between EBlock and EFunction, adopt paradigmatic relation, an EBlock can comprise a plurality of EFunction; Between EBlock and EPort, adopt paradigmatic relation, an EBlock can comprise a plurality of EPort; Between ELine and EPort, adopt paradigmatic relation, an ELine can comprise a plurality of EPort;
Set up UML target element model framework, UML target element model comprise class and containing the meta-model EClass of class of submodule, the meta-model EFlowport of the meta-model EConnector of connector, flow port, the meta-model EOperation of the meta-model EAttribute of attribute and operation; Set up UML target element model framework, between EClass and EAttribute, adopt paradigmatic relation, an EClass can comprise a plurality of EAttribute; Between EClass and EOperation, adopt paradigmatic relation, an EClass can comprise a plurality of EOperation; Between EConnector and EFlowport, adopt paradigmatic relation, an EConnector can comprise a plurality of EFlowport;
Set up the ecore structure of Simulink fundamental element meta-model: according to Simulink source meta-model framework, in definition ecore structure, comprising five classes, is respectively Block, Parameter, Function, Port, Line; Variable in class Block has function f unctions, input parameter srcBlkParams, output parameter dstBlkParams, flows into port srcBlkPorts and outflow port dstBlkPorts, the type of functions is Function, the type of srcBlkParams and dstBlkParams is Parameter, and the type of srcBlkPorts and dstBlkPorts is Port; The variable of class Parameter has Parameter place module blockParameter, the type of blockParameter is Block, when Parameter is input data, blockParameter represents Data Source module srcBlockParameter, when Parameter is output data, blockParameter represents that data arrive module dstBlockParameter; Variable in class Function has Function place module blockFunction, and the type of blockFunction is Block; Variable in class Port comprises Port place module blockPort and the associated line linePort of Port, the type of blockPort is Block, when Port is input data, blockPort is load module srcBlockPort, when Port is output data, blockPort is output module dstBlockPort, the type of linePort is Line, and when Port is input data, line is input link srcLinePort, when Port is output data, line is output line dstLinePort; The port portLine that variable in Line has line to be associated, the type of portLine is Port, Line two ends connect two ports, according to data input or data output, can be divided into input port srcLnPorts and output port dstLnPorts;
Set up the ecore structure of UML fundamental element meta-model: according to UML target element model framework, in definition ecore structure, comprising five classes, is respectively Class, Attribute, Operation, Flowport and Connector; Variable in class Class has parameter, operation, port, and the type of parameter is Attribute, and the type of operation is Operation, and the type of port is Flowport; Variable in class Arrtibute has attribute place class classAttribute, and the type of classAttribute is Class; Variable in class Operation has operation place class classOperation, and the type of classOperation is Operation; The connector conncetorFlowport that variable ports having place class classFlowport in class Flowport and Flowport are associated, the type of classFlowport is Class, the type of conncetorFlowport is Connector, the type of Flowport direction is EString, when Flowport is input port, Flowport direction is " IN ", and when Flowport is output port, Flowport direction is " OUT "; The port flowportConnector that variable in class Connector has Connector to be associated, the type of flowportConnector is Flowport;
3) according to Simulink source meta-model and UML target element model, determine that Simulink model conversion is to the conversion method of uml model
Use ATL transformation rule to be converted to the Class in UML the Block in Simulink model, while there is ring in Simulink model, to look around is a Block, by name and the type information of the parameter in Block, function, port and Block thereof itself, corresponding conversion is name and the type information of attribute, operation, flow port and Class in Class respectively; Wherein, Simulink parameter is to the conversion of UML attribute, comprises the conversion of the information of the class that the conversion of parameter name and parameter are corresponding, comprises that srcBlockParameter and dstBlockParameter are to the conversion of classAttribute; Simulink function, to the conversion of UML operation, comprises the conversion of operating operation name, and the conversion of the information of the class of operational correspondence, comprises that blockFunction is to the conversion of classOperation; Simulink port, to the conversion of UML flow port, comprises the conversion of port name and the conversion of port direction, and wherein, the flow port direction that srcBlkPorts is corresponding is " IN ", and the flow port direction that dstBlkPorts is corresponding is " OUT "; Determine that Simulink model element Line is to the conversion of uml model Elements C onnector, comprise the conversion of Line name, the port srcLnPorts being connected with Line and the conversion of dstLnPorts, the conversion of srcLnPorts and dstLnPorts comprises the conversion of port name word and the conversion of port direction, the flow port direction that srcLnPorts is corresponding is " IN ", the flow port direction that dstLnPorts is corresponding is " OUT ", at this, realize the conversion of Simulink model to uml model, solved the problem that LiaoCPS field computation process and physical process merge.
CN201310466291.9A 2013-09-30 2013-09-30 A kind of method from Simulink model conversion to uml model Expired - Fee Related CN103514331B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310466291.9A CN103514331B (en) 2013-09-30 2013-09-30 A kind of method from Simulink model conversion to uml model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310466291.9A CN103514331B (en) 2013-09-30 2013-09-30 A kind of method from Simulink model conversion to uml model

Publications (2)

Publication Number Publication Date
CN103514331A true CN103514331A (en) 2014-01-15
CN103514331B CN103514331B (en) 2016-08-31

Family

ID=49897047

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310466291.9A Expired - Fee Related CN103514331B (en) 2013-09-30 2013-09-30 A kind of method from Simulink model conversion to uml model

Country Status (1)

Country Link
CN (1) CN103514331B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106096126A (en) * 2016-06-08 2016-11-09 华东师范大学 A kind of modeling method of information physical emerging system based on SysML/MARTE
CN107766943A (en) * 2016-08-15 2018-03-06 中国科学院软件研究所 A kind of Knowledge Component automation exchange method under CPS environment
CN108664241A (en) * 2018-04-23 2018-10-16 华东师范大学 A method of SysML models are subjected to simulating, verifying
CN115686503A (en) * 2022-11-03 2023-02-03 北京世冠金洋科技发展有限公司 Engineering conversion method and system
CN117648833A (en) * 2024-01-30 2024-03-05 浙江大学 Simulink-to-SysML model generation method and device
CN117648833B (en) * 2024-01-30 2024-05-17 浙江大学 Simulink-to-SysML model generation method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080066046A1 (en) * 2006-09-11 2008-03-13 The Mathworks, Inc. Hardware definition language generation for frame-based processing
CN102227714A (en) * 2008-11-28 2011-10-26 英科伦有限责任公司 Method system and simulation or analysis model for data processing
US20120041746A1 (en) * 2005-12-27 2012-02-16 The Mathworks, Inc. System and method for digital effects analysis
CN102436375A (en) * 2011-10-28 2012-05-02 东南大学 Characters per second (CPS) Modeling and verification method based on model transformation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120041746A1 (en) * 2005-12-27 2012-02-16 The Mathworks, Inc. System and method for digital effects analysis
US20080066046A1 (en) * 2006-09-11 2008-03-13 The Mathworks, Inc. Hardware definition language generation for frame-based processing
CN102227714A (en) * 2008-11-28 2011-10-26 英科伦有限责任公司 Method system and simulation or analysis model for data processing
CN102436375A (en) * 2011-10-28 2012-05-02 东南大学 Characters per second (CPS) Modeling and verification method based on model transformation

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
PATRICIA DERLER ETAL.: "Addressing Modeling Challenges in Cyber-Physical Systems", 《TECHNICAL REPORT NO.UCB/EECS-2011-17》 *
刘厦 等: "面向CPS系统仿真的建模方法研究与设计", 《计算机科学》 *
刘辉 等: "模型转换中特性保持的描述与验证", 《软件学报》 *
李仁发 等: "信息-物理融合系统若干关键问题综述", 《计算机研究与发展》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106096126A (en) * 2016-06-08 2016-11-09 华东师范大学 A kind of modeling method of information physical emerging system based on SysML/MARTE
CN106096126B (en) * 2016-06-08 2019-06-25 华东师范大学 A kind of modeling method of the information physical emerging system based on SysML/MARTE
CN107766943A (en) * 2016-08-15 2018-03-06 中国科学院软件研究所 A kind of Knowledge Component automation exchange method under CPS environment
CN108664241A (en) * 2018-04-23 2018-10-16 华东师范大学 A method of SysML models are subjected to simulating, verifying
CN108664241B (en) * 2018-04-23 2021-05-07 华东师范大学 Method for carrying out simulation verification on SysML model
CN115686503A (en) * 2022-11-03 2023-02-03 北京世冠金洋科技发展有限公司 Engineering conversion method and system
CN117648833A (en) * 2024-01-30 2024-03-05 浙江大学 Simulink-to-SysML model generation method and device
CN117648833B (en) * 2024-01-30 2024-05-17 浙江大学 Simulink-to-SysML model generation method and device

Also Published As

Publication number Publication date
CN103514331B (en) 2016-08-31

Similar Documents

Publication Publication Date Title
Shah et al. Multi-view modeling to support embedded systems engineering in SysML
Karsai et al. Model-integrated development of embedded software
Agrawal et al. Semantic translation of simulink/stateflow models to hybrid automata using graph transformations
Sztipanovits et al. Model and tool integration platforms for cyber–physical system design
CN107357961A (en) Spacecraft propulsion system dynamic analysing method based on Modelica models
CN103514331A (en) Method for converting Simulink model into UML model
Karsai et al. Specifying graphical modeling systems using constraint-based meta models
CN103605869A (en) Three-dimensional implementation digital prototype system for spacecraft assembly and construction method of three-dimensional implementation digital prototype system
Bouquet et al. Transformation of SysML structure diagrams to VHDL-AMS
Lattmann et al. Towards automated evaluation of vehicle dynamics in system-level designs
Zhang et al. An integrated intelligent modeling and simulation language for model-based systems engineering
Zhang et al. X language: an integrated intelligent modeling and simulation language for complex products
Zeigler et al. Service-oriented model engineering and simulation for system of systems engineering
Medvidovic et al. Stemming Architectural Erosion by Coupling Architectural Discovery and Recovery.
CN106874562B (en) Conversion system and method for converting architecture model into static calculation model
Aurisicchio et al. The function analysis diagram
Elsheikh et al. Modelica-enabled rapid prototyping via TRNSYS
Risco-Martın et al. From UML state charts to DEVS state machines using XML
Shang et al. Processing conversion and parallel control platform: a parallel approach to serial hydrodynamic simulators for complex hydrodynamic simulations
Nuzzo et al. Hierarchical system design with vertical contracts
Brandstetter et al. Early validation of automation plant control software using simulation based on assumption modeling and validation use cases
CN103324776B (en) Based on the generation method of the linear hybrid system invariant of abstract interpretation
Folli et al. Refactoring of UML models using AGG
Fumarola et al. An approach for loosely coupled discrete event simulation models and animation components
Li et al. A prototype of model-based design tool and its application in the development process of electronic control unit

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160831

Termination date: 20180930