Simulation method and apparatus for electronic device control system, device and storage medium

Through the running element mapping between the SysML model and the Simulink model, the transformation method is constructed and the SysML model is converted into the Simulink model, which solves the problem of lack of transformation methods in the existing technology and achieves better simulation and analysis effects of electronic device control systems.

WO2024230392A1PCT designated stage expired Publication Date: 2024-11-14SHANGHAI FORMAL TECH INFORMATION TECH CO LTD

Patent Information

Application Number
PCT/CN2024/087030
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-08
Filing Date
2024-04-10
Publication Date
2024-11-14

AI Technical Summary

Technical Problem

The existing technology lacks the conversion method from SysML model to Simulink model, which limits the simulation analysis function of the SysML model multiplexing Simulink tool, and cannot effectively analyze the reliability and security of embedded software.

Method used

By determining the running element mapping between the SysML model and the Simulink model, the transformation method of the SysML model to the Simulink model is constructed, and the conversion of the SysML model to the Simulink model is realized, thereby using the Simulink tool for simulation analysis.

Benefits of technology

The SysML model is reused, the simulation effect and analysis effect of the electronic device control system are improved, and the reliability and security of embedded software can be better analyzed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024087030_14112024_PF_FP_ABST
    Figure CN2024087030_14112024_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a simulation method and apparatus for an electronic device control system, a device and a storage medium. The method comprises: analyzing a target electronic device control system, so as to determine operation elements of the target electronic device control system; on the basis of the operation elements of the target electronic device control system, constructing a target electronic device control system SysML model; according to a preset model conversion method, converting the target electronic device control system SysML model into a target electronic device control system Simulink model; and, on the basis of the target electronic device control system Simulink model, simulating the target electronic device control system. The present application determines a mapping mode of the operation elements of the SysML model and the Simulink model, so as to convert the target system SysML model into the target system Simulink model, such that the SysML model can reuse the Simulink tool, thus achieving better simulation and analysis effects for electronic device control systems.
Need to check novelty before this filing date? Find Prior Art

Description

Simulation method, device, equipment and storage medium for electronic equipment control system Technical Field

[0001] The present application relates to the field of computer simulation technology, and in particular to a simulation method, apparatus, device and storage medium for an electronic equipment control system. Background Art

[0002] SysML is a graphical modeling language widely used in the industry. It can be used to describe the functional and non-functional modeling design of complex systems. SysML reuses the relatively mature semantics and notation of UML2.0, and has made certain extensions based on UML to eliminate the differences in expressions and terminology between different methods.

[0003] While there is simulation software available for SysML models, it still lags behind specialized simulation software in the areas of continuous dynamic behavior modeling and discrete state behavior modeling. Simulink, a powerful simulation tool, addresses SysML's shortcomings, supporting dynamic system modeling, simulation, and analysis in an interactive, graphical interface.

[0004] However, there is currently a lack of simulation methods for electronic control systems based on the conversion of SysML models to Simulink models. To enable SysML models to reuse the simulation and analysis functions of the Simulink tool, it is necessary to propose a conversion method for SysML models to Simulink models. This method can utilize the powerful simulation capabilities of the Simulink tool to analyze the reliability and security of embedded software, thereby achieving better simulation and analysis results for electronic control systems.

[0005] Summary of the Invention

[0006] The problem addressed by this application is the lack of a solution for converting SysML models to Simulink models.

[0007] To solve the above problems, the present application provides a first aspect of a simulation method for an electronic device control system, comprising:

[0008] Analyze the target electronic equipment control system and determine the operating elements of the target electronic equipment control system;

[0009] Constructing a SysML model of the target electronic device control system based on the operating elements of the target electronic device control system;

[0010] According to a preset model conversion method, the SysML model of the target electronic device control system is converted into a Simulink model of the target electronic device control system;

[0011] The target electronic device control system is simulated based on the target electronic device control system Simulink model.

[0012] A second aspect of the present application provides a simulation device for an electronic device control system, comprising:

[0013] A system analysis module, which is used to analyze the control system of the target electronic equipment and determine the operating elements of the control system of the target electronic equipment;

[0014] A model building module, which is used to build a SysML model of the target electronic device control system based on the operating elements of the target electronic device control system;

[0015] A model conversion module, which is used to convert the target electronic device control system SysML model into the target electronic device control system Simulink model according to a preset model conversion method;

[0016] A system simulation module is used to simulate the target electronic device control system based on the target electronic device control system Simulink model.

[0017] A third aspect of the present application provides a terminal device, comprising: a memory and a processor;

[0018] The memory is used to store programs;

[0019] The processor is coupled to the memory and is used to execute the program to implement the aforementioned model conversion method, or to implement the aforementioned simulation method.

[0020] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement the aforementioned model conversion method or the aforementioned simulation method.

[0021] In this application, after constructing the SysML model, the SysML model is converted into a Simulink model for simulation, which not only retains the universal advantages of the SysML model, but also allows for better simulation using the Simulink model. By determining the mapping method of the operating elements of the SysML model and the Simulink model, the target system SysML model is converted into the target system Simulink model, so that the SysML model can reuse the Simulink tool to achieve better simulation and analysis effects of the electronic equipment control system. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 is a schematic diagram of the classification of SysML model diagrams;

[0023] FIG2 is a flow chart of a model conversion method according to an embodiment of the present application;

[0024] FIG3 is a state machine diagram of the SysML model of the target electronic device control system of the present application;

[0025] FIG4 is a state flow diagram of a Simulink model of the target electronic device control system of the present application;

[0026] FIG5 is a flow chart of a simulation method according to an embodiment of the present application;

[0027] FIG6 is a structural block diagram of a model conversion device according to an embodiment of the present application;

[0028] FIG7 is a structural block diagram of a simulation device according to an embodiment of the present application;

[0029] FIG8 is a structural block diagram of a terminal device according to an embodiment of the present application. DETAILED DESCRIPTION

[0030] To make the above-mentioned objects, features, and advantages of the present application more clearly understood, specific embodiments of the present application are described in detail below with reference to the accompanying drawings. Although the accompanying drawings show exemplary embodiments of the present application, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. Instead, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0031] It should be noted that, unless otherwise specified, the technical or scientific terms used in this application should have the common meanings understood by those skilled in the art to which this application belongs.

[0032] SysML is a widely used, expressive graphical modeling language that visualizes the key aspects of system design—structure, behavior, requirements, and parameters (mathematical models)—facilitating communication of design content. It was developed by the Object Management Group (OMG) and the Systems Engineering Institute to meet the modeling needs of systems engineering. Based on a subset of UML 2.0, it was developed to meet the modeling needs of systems engineering.

[0033] SysML diagrams are divided into three categories and nine types. As shown in Figure 1, SysML is divided into behavioral diagrams, requirement diagrams, and structure diagrams. These three diagram categories are further divided into nine model diagrams: activity diagrams, state machine diagrams, sequence diagrams, use case diagrams, requirement diagrams, module definition diagrams, internal module diagrams, package diagrams, and parameter diagrams. The diagram models for activity diagrams, module definition diagrams, and internal module diagrams are improvements based on UML 2.0; requirement diagrams and parameter diagrams are new SysML diagram models.

[0034] Although there is software that supports simulation for SysML models, there is still a certain gap between them and specialized simulation software in the fields of continuous dynamic behavior modeling and discrete state behavior modeling.

[0035] Simulink is a powerful visual simulation tool, a block diagram environment for multi-domain simulation and model-based design. Simulink supports dynamic system modeling, simulation, and analysis in an interactive, graphical interface. It offers excellent simulation results for both continuous dynamic behavior modeling and discrete state behavior modeling, complementing the shortcomings of SysML.

[0036] Currently, there are methods for independently building a SysML model of the target system and a method for independently building a Simulink model of the target system. However, in order to reuse the powerful simulation capabilities of the Simulink tool with the SysML model and analyze the reliability and security of embedded software, it is necessary to convert the system's SysML model into a Simulink model. Currently, there is a lack of a conversion method for converting SysML models into Simulink models.

[0037] To address the above issues, the present application provides a new model conversion solution that can convert the SysML model of the target system into a Simulink model by determining the element mapping between the SysML model and the Simulink model.

[0038] An embodiment of the present application provides a model conversion method, which can be executed by a model conversion device, and the model conversion device can be integrated into electronic devices such as computers, servers, and computers.

[0039] As shown in FIG2 , it is a flow chart of a model conversion method according to an embodiment of the present application; wherein the model conversion method includes:

[0040] S10, obtaining the constructed SysML model of the target system;

[0041] The target system may be a target electronic equipment control system, such as an aircraft control system or a driving control system of an intelligent vehicle.

[0042] For ease of understanding, this application takes the target electronic device control system as an example to describe the specific situation of applying the model conversion method to the target electronic device control system.

[0043] The acquired target system SysML model may be directly read from a preset target system SysML model, or may be acquired from the functional requirements of the target system and then the target system SysML model may be constructed based on the functional requirements, or may be acquired in other ways.

[0044] S20, constructing mapping rules for converting SysML models into Simulink models;

[0045] The SysML model has fixed operational elements, and the Simulink model also has fixed operational elements. Some operational elements of the two models have corresponding conversion relationships. By analyzing the operational elements of the SysML model and the Simulink model, the corresponding mapping rules can be obtained / constructed.

[0046] In the target electronic device control system, the functional requirements of the target electronic device control system are fixed. Therefore, some operating elements in the SysML model of the target electronic device control system must be associated with the operating elements of the Simulink model of the target electronic device control system. By analyzing this association, the mapping rules between the SysML model of the target electronic device control system and the Simulink model of the target electronic device control system can be obtained / constructed.

[0047] For example, an electronic device control system can be switched from a cooling state to a heating state through the control of a controller; there must be a correlation between the operating elements of the SysML model and the operating elements of the Simulink model corresponding to the operating state.

[0048] S30: Determine a target system Simulink model based on the mapping rule.

[0049] Here, based on the mapping rules, (part of) the operational elements of the target system SysML model are mapped to the operational elements of the target system Simulink model, and the target system Simulink model is constructed / determined based on the operational elements.

[0050] In the target electronic device control system, the operating elements of the target electronic device control system SysML model are converted into operating elements of the target electronic device control system Simulink model according to the mapping rules, and the target electronic device control system Simulink model is constructed / determined based on the operating elements.

[0051] In this way, by determining the mapping method of the running elements of the SysML model and the Simulink model, the SysML model of the target system / target electronic device control system is converted into the Simulink model of the target system / target electronic device control system, so that the SysML model can reuse the Simulink tool to achieve better simulation and analysis effects.

[0052] Among them, after reusing the Simulink tool, you can use Design Verify tools to model and verify complex systems, thereby effectively ensuring the correctness of the established SysML model of the target system.

[0053] In one embodiment, the SysML model includes a state machine diagram, and the Simulink model includes a state flow diagram (stateflow);

[0054] In the mapping rule for converting the SysML model into the Simulink model, the state machine diagram of the SysML model is mapped to the state flow diagram of the Simulink model.

[0055] The state machine diagram in a SysML model is a behavioral diagram that illustrates the dynamic behavior of a system, focusing on how the system changes state over time in response to events. This state machine diagram is a precise and unambiguous behavioral specification that can be used in SysML models for system design and simulation.

[0056] Among them, Stateflow (state flow chart) is a module in Simulink used to build a finite state machine, which models and simulates decision logic by using state machines and flow charts.

[0057] In this way, you only need to map the state machine diagram of the SysML model to the state flow diagram of the Simulink model to reuse the simulation tools and effects of the Simulink model.

[0058] It should be noted that Stateflow is directly embedded in the Simulink model. During the initialization phase of the simulation, Simulink converts the logic diagrams drawn by Stateflow into C language through a compiler for simulation. The specific compilation process may require corresponding fine-tuning due to differences in target systems, simulation tools, etc., and this application does not limit the specific fine-tuning and specific compilation process.

[0059] It should be noted that the Simulink model not only includes Stateflow, but also includes state transition diagrams, flow charts, etc. However, in the specific simulation process, only Stateflow can be compiled into C language for simulation; state transition diagrams and flow charts serve as detailed supplements to the simulation process, which can achieve clearer and better simulation effects.

[0060] In one embodiment, the state machine diagram includes input variables, local variables and output variables, and the state flow diagram includes input data, local data and output data.

[0061] The state machine diagram of the SysML model is mapped to the state flow diagram of the Simulink model, including:

[0062] The input variables of the state machine diagram are mapped to the input data of the state flow diagram;

[0063] The local variables of the state machine diagram are mapped to the local data of the state flow diagram;

[0064] The output variables of the state machine diagram are mapped to the output data of the state flow diagram.

[0065] Among them, the state machine diagram (stm) includes input variables, local variables and output variables; the Simulink model / state flow diagram includes input data (Input Data), local data (Local Data) and output data (Output Data).

[0066] It should be noted that for Simulink models and state flow charts, the input data (Input Data), local data (Local Data) and output data (Output Data) included are the same data; therefore, they can be considered as variable data of the Simulink model or as variable data of the state flow chart.

[0067] In one embodiment, the state machine diagram further includes simple states, state transitions, and composite states, the state transitions include trigger elements, guard elements, and influence elements, the state flow diagram includes state elements, transition elements, and block elements, and the transition elements include transition events, transition guards, and transition influences;

[0068] The state machine diagram of the SysML model is mapped to the state flow diagram of the Simulink model, further comprising:

[0069] The simple states of the state machine diagram are mapped to the state elements of the state flow diagram;

[0070] The state transition of the state machine diagram is mapped to the transfer element of the state flow diagram;

[0071] The composite state of the state machine diagram is mapped to a block element of the state flow diagram;

[0072] The state transition of the state machine diagram is mapped to the transition element of the state flow diagram, and the trigger element, guard element and influence element of the state transition are respectively mapped to the transition event, transition guard and transition influence of the transition element.

[0073] The state machine diagram further includes a simple state, a state transition, and a composite state, and the state transition includes a trigger element, a guard element, and an effect element; the state flow diagram includes a state element, a transition element, and a chart element, and the transition element includes a transition event, a transition guard, and a transition effect.

[0074] Among them, the state machine diagram mainly contains the following elements:

[0075] Simple state: Its description includes state name, entry and exit actions, internal activities, internal transitions, etc.

[0076] Composite state: A state that has sub-states nested inside it, also called a combined state.

[0077] Transition: A relationship between two states; the transition includes a trigger element, a guard element, and an effect element.

[0078] Trigger element: It is a phenomenon that acts on an object externally and can trigger a change in the state of the object;

[0079] Guard element (guard): A Boolean expression that is a condition that must be met to trigger state transition;

[0080] Effect: It is the behavior executed when the state transition is activated. That is to say, when the transition is activated, if the corresponding action is defined, the action is executed.

[0081] Among them, Stateflow mainly has the following elements:

[0082] State element (state): describes a mode of system operation. It has Boolean behavior. At any time, the state is either active or inactive. The state is divided into entry (entry action: used to specify the action that occurs when entering the state, usually used to perform internal initialization required by the state), doing (internal activity: used to specify the activity that is continuously executed in a certain state. The internal activity continues until the arrival of an external event, or the activity ends, the state is completed, and a transition is triggered.), and exit (exit action: used to specify the action that occurs when leaving the state, usually used to indicate the processing work to be performed when leaving a state).

[0083] Transition element: A transition connects two states. When a transition occurs, the target state becomes active and the state before the transition becomes inactive.

[0084] Default transition: The default transition is a special transition that specifies the state machine at the current level.

[0085] Chart element (chart): A chart element is a nested Stateflow model that can contain all Stateflow elements.

[0086] In this application, by analyzing a SysML state machine diagram model and a Simulink model, a mapping rule is established from the SysML state machine diagram to the Simulink model. The State in the state machine diagram is converted to a Stateflow in the Simulink model; the Transition in the state machine diagram is converted to a Transition in the Simulink model; and the Composite State in the state machine diagram is converted to a Chart in the Simulink model. The Trigger, Condition, and Effect on the Transition in the SysML state machine diagram are converted to the Event, Guard, and Effect on the Transition element in the Simulink model, respectively.

[0087] It should be noted here that the English names of the elements in the state machine diagram and the English names of the elements in Stateflow are commonly used names in the corresponding models. Some elements have similar English names (such as Transition, State, Effect, etc.) due to similar meanings / functions, but in essence they belong to different models and cannot be regarded as having exactly the same meaning.

[0088] As shown in Figure 3 and Figure 4, the state machine diagram of the target electronic device control system defines four states: off, on, cool, and heat. Off, cool, and heat are simple states, while on is a composite state that includes both cool and heat (indicating that the electronic device control system can be divided into two states under the on state: heat and cool).

[0089] Among them, the cooling state (cool) and the heating state (heat) are both simple states and sub-states of the compound state operation (on).

[0090] Among them, in the target electronic device control system, the off state (off) and the running state (on) are connected by two state transitions, indicating that the electronic device control system switches between the off and running states, and the cooling state (cool) and heating state (heat) inside the running state (on) are connected by state transitions, indicating that the electronic device control system can switch between heating and cooling in the running state.

[0091] Among them, in the control system of the target electronic device, the state machine diagram includes three trigger elements: turn on (TurnOn), turn off (TurnOff), and switch (Change).

[0092] It should be noted that the state machine diagram only includes three trigger elements: TurnOn, TurnOff, and Change; it can be considered that the state machine diagram does not contain guard elements and influence elements, or it can be considered that the corresponding guard elements in the state machine diagram are TurnOn=true, TurnOff=true, and Change=true.

[0093] Among them, in the control system of the target electronic device, the state machine diagram includes three input variables: turn on, turn off, and change.

[0094] In one embodiment, based on the mapping rules, determining the target system Simulink model includes: based on the mapping rules, mapping the operating elements of the target electronic device control system SysML model to the operating elements of the target electronic device control system Simulink model, and constructing the target electronic device control system Simulink model through the mapped operating elements of the target electronic device control system Simulink model.

[0095] In one embodiment, mapping the operating elements of the target electronic device control system SysML model to the operating elements of the target electronic device control system Simulink model includes:

[0096] The three input variables TurnOn, TurnOff, and Change of the state machine diagram are mapped to three input data of the state flow diagram.

[0097] The three input data of the mapped state flow diagram are TurnOn, TurnOff, and Change.

[0098] The mapping rules include mapping rules for input variables, local variables, and output variables. When the state machine diagram only includes input variables, only the input variables of the state machine diagram are mapped to input data of the state flow diagram.

[0099] Similarly, when the state machine diagram includes only one or two of input variables, local variables, and output variables, only the variables included in the state machine diagram are mapped to data of the state flow diagram.

[0100] Similarly, the trigger element (trigger), guard element (guard) and effect element (effect) in the state transition do not have to exist at the same time.

[0101] In one embodiment, mapping the operating elements of the target electronic device control system SysML model to the operating elements of the target electronic device control system Simulink model further includes:

[0102] Mapping the off state (off), cooling state (cool), and heating state (heat) of the state machine diagram to the off state element (off), cooling state element (cool), and heating state element (heat) of the state flow diagram;

[0103] Mapping the running state (on) of the state machine diagram to the running state block (on) of the state flow diagram;

[0104] The trigger elements of the state transition of the state machine diagram: TurnOn, TurnOff, and Change are mapped to the transition events (Event) of the transition elements of the state flow diagram: TurnOn, TurnOff, and Change.

[0105] The three transition events (Event) of the transition element of the mapped state flow diagram are: turn on (TurnOn), turn off (TurnOff), and switch (Change).

[0106] In this way, the Simulink model of the target electronic device control system is constructed by mapping the three input data of the state flow diagram, namely, turn on (TurnOn), turn off (TurnOff), and change, the off state element (off), the cooling state element (cool), and the heating state element (heat), the running state block (on), and the three transfer events (Event) of the transfer element: turn on (TurnOn), turn off (TurnOff), and change.

[0107] Among them, the specific construction process of constructing the Simulink model of the target electronic device control system through the operating elements of the Simulink model will not be repeated in this application.

[0108] The present application provides a simulation method for an electronic device control system. The method can be performed by a simulation device, which can be integrated into electronic devices such as computers, servers, and computers. As shown in Figure 5, it is a flow chart of the simulation method according to one embodiment of the present application; wherein the simulation method includes:

[0109] S100, analyzing the target electronic device control system to determine the operating elements of the target electronic device control system;

[0110] In one embodiment, the target electronic device controls the operating elements of the system, including:

[0111] The electronic equipment control system is initially in a closed state;

[0112] When the electronic device control system is turned on using the remote controller, the electronic device control system enters the operating state;

[0113] When the electronic device control system is turned off using the remote controller, the electronic device control system enters a shutdown state;

[0114] In the operating state, the electronic equipment control system is in the cooling state by default;

[0115] When the remote controller is used to change the state of the electronic device control system, the electronic device control system switches between a cooling state and a heating state.

[0116] It should be noted that the operating elements of the target electronic device control system are determined based on the analysis of the target electronic device control system. The electronic device control system is a system with many actual applications. In this application, only the target electronic device control system is considered, and other forms of electronic device control systems are not described in detail.

[0117] S200, constructing a SysML model of the target electronic device control system based on the operating elements of the target electronic device control system;

[0118] Wherein, based on the operating elements of the target electronic device control system, the SysML modeling language can be used to construct the requirement diagram, use case diagram, module definition diagram and state machine diagram of the target electronic device control system.

[0119] Among them, the demand diagram includes the electronic equipment control system architecture and the electronic equipment control system functions. The electronic equipment control system architecture may include a control layer and an execution layer; the control layer mainly includes an electronic equipment control system controller, which is used to determine control instructions; the execution layer includes switches and cooling and heating switching units, which are used to execute control instructions.

[0120] Among them, according to the electronic equipment control system architecture, a module definition diagram is constructed: the system architecture is divided into two layers, so the module definition diagram is divided into two modules, namely the control module and the execution module; the two modules each contain multiple units.

[0121] According to the usage scenario of the target electronic device control system, a use case diagram of the target electronic device control system is constructed. The specific construction process will not be described in detail in this application.

[0122] Among them, according to the operating elements of the target electronic device control system, a state machine diagram of the target electronic device control system is constructed.

[0123] The constructed state machine diagram defines four states: off, on, cool, and heat. Off, cool, and heat are simple states, while on is a composite state that includes both cool and heat (indicating that the electronic device control system can be divided into two states during operation: heating and cooling).

[0124] Among them, the cooling state (cool) and the heating state (heat) are both simple states and sub-states of the compound state operation (on).

[0125] Among them, in the constructed state machine diagram, the off state (off) and the running state (on) are connected by two state transitions, indicating that the electronic device control system switches between the off and running states, and the cooling state (cool) and heating state (heat) inside the running state (on) are connected by state transitions, indicating that the electronic device control system can switch between heating and cooling in the running state.

[0126] The constructed state machine diagram includes three trigger elements: TurnOn, TurnOff, and Change.

[0127] The constructed state machine diagram includes three input variables: TurnOn, TurnOff, and Change.

[0128] S300, converting the target electronic device control system SysML model into the target electronic device control system Simulink model according to the aforementioned model conversion method;

[0129] The specific process of converting the target electronic device control system SysML model into the target electronic device control system Simulink model is shown in the model conversion method described in steps S10-S30, and will not be repeated in this step.

[0130] S400: Simulating the target electronic device control system based on a Simulink model of the target electronic device control system.

[0131] In this step, when the Simulink model of the target electronic device control system is determined, simulation can be performed by compiling it into a C program through initialization, or by using the MATLAB command window. The specific simulation process will not be described in detail here.

[0132] In this way, after building the SysML model, converting the SysML model into a Simulink model for simulation can not only retain the universal advantages of the SysML model, but also enable better simulation using the Simulink model.

[0133] An embodiment of the present application provides a model conversion device for executing the model conversion method described above in the present application. The model conversion device is described in detail below.

[0134] As shown in FIG6 , the model conversion device includes:

[0135] Model acquisition module 101, which is used to obtain the constructed target system SysML model;

[0136] A rule construction module 102 is used to construct a mapping rule for converting a SysML model into a Simulink model;

[0137] The model determination module 103 is configured to determine the target system Simulink model based on the mapping rule.

[0138] In one embodiment, the SysML model includes a state machine diagram, and the Simulink model includes a state flow diagram; in the mapping rule for converting the SysML model to the Simulink model, the state machine diagram of the SysML model is mapped to the state flow diagram of the Simulink model.

[0139] In one embodiment, the state machine diagram includes input variables, local variables, and output variables, the state flow diagram includes input data, local data, and output data, and the rule construction module 102 is further configured to:

[0140] The input variables of the state machine diagram are mapped to the input data of the state flow diagram; the local variables of the state machine diagram are mapped to the local data of the state flow diagram; and the output variables of the state machine diagram are mapped to the output data of the state flow diagram.

[0141] In one embodiment, the state machine diagram further includes simple states, state transitions, and composite states, the state transitions include trigger elements, guard elements, and influence elements, the state flow diagram includes state elements, transition elements, and block elements, and the transition elements include transition events, transition guards, and transition influences;

[0142] The rule construction module 102 is further configured to:

[0143] The simple states of the state machine diagram are mapped to the state elements of the state flow diagram; the state transitions of the state machine diagram are mapped to the transfer elements of the state flow diagram; the composite states of the state machine diagram are mapped to the block elements of the state flow diagram; the state transitions of the state machine diagram are mapped to the transfer elements of the state flow diagram, and the trigger elements, guard elements and influence elements of the state transitions are respectively mapped to the transfer events, transfer guards and transfer influences of the transfer elements.

[0144] The model conversion device provided in the above-mentioned embodiment of the present application and the model conversion method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.

[0145] An embodiment of the present application provides a simulation device for executing the simulation method described above in the present application. The simulation device is described in detail below.

[0146] As shown in FIG7 , the simulation device includes:

[0147] System analysis module 201, which is used to analyze the control system of the target electronic device and determine the operating elements of the control system of the target electronic device;

[0148] A model building module 202 is configured to build a SysML model of the target electronic device control system based on the operating elements of the target electronic device control system;

[0149] A model conversion module 203 is configured to convert the SysML model of the target electronic device control system into a Simulink model of the target electronic device control system according to the aforementioned model conversion method;

[0150] The system simulation module 204 is configured to simulate the target electronic device control system based on the target electronic device control system Simulink model.

[0151] In one embodiment, the target electronic device controls the operating elements of the system, including:

[0152] The electronic device control system is initially in the off state; when the electronic device control system is turned on using the remote control, the electronic device control system enters the running state; when the electronic device control system is turned off using the remote control, the electronic device control system enters the off state; in the running state, the electronic device control system is in the cooling state by default; when the electronic device control system state is changed using the remote control, the electronic device control system switches between the cooling state and the heating state.

[0153] The simulation device provided in the above-mentioned embodiment of the present application and the simulation method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.

[0154] The internal functions and structures of the model conversion device and the simulation device are described above. As shown in FIG8 , in practice, the model conversion device and the simulation device can be implemented as a terminal device, including: a memory 301 and a processor 303 .

[0155] The memory 301 may be configured to store programs.

[0156] In addition, the memory 301 may also be configured to store various other data to support operations on the terminal device. Examples of such data include instructions for any application or method operating on the terminal device, contact data, phone book data, messages, pictures, videos, etc.

[0157] The memory 301 can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0158] The processor 303 is coupled to the memory 301 and is configured to execute a program in the memory 301 to:

[0159] Obtain the constructed SysML model of the target system;

[0160] Construct mapping rules for converting SysML models to Simulink models;

[0161] Based on the mapping rules, determining a Simulink model of the target system;

[0162] Or for:

[0163] Analyze the target electronic equipment control system and determine the operating elements of the target electronic equipment control system;

[0164] Constructing a SysML model of the target electronic device control system based on the operating elements of the target electronic device control system;

[0165] According to the aforementioned model conversion method, the target electronic device control system SysML model is converted into the target electronic device control system Simulink model;

[0166] The target electronic device control system is simulated based on the target electronic device control system Simulink model.

[0167] In one embodiment, the SysML model includes a state machine diagram, and the Simulink model includes a state flow diagram; in the mapping rule for converting the SysML model to the Simulink model, the state machine diagram of the SysML model is mapped to the state flow diagram of the Simulink model.

[0168] In one embodiment, the state machine diagram includes input variables, local variables and output variables, and the state flow diagram includes input data, local data and output data.

[0169] The processor 303 is specifically configured to:

[0170] The input variables of the state machine diagram are mapped to the input data of the state flow diagram; the local variables of the state machine diagram are mapped to the local data of the state flow diagram; and the output variables of the state machine diagram are mapped to the output data of the state flow diagram.

[0171] In one embodiment, the state machine diagram further includes simple states, state transitions, and composite states, the state transitions include trigger elements, guard elements, and influence elements, the state flow diagram includes state elements, transition elements, and block elements, and the transition elements include transition events, transition guards, and transition influences;

[0172] The processor 303 is specifically configured to:

[0173] The simple states of the state machine diagram are mapped to the state elements of the state flow diagram; the state transitions of the state machine diagram are mapped to the transfer elements of the state flow diagram; the composite states of the state machine diagram are mapped to the block elements of the state flow diagram; the state transitions of the state machine diagram are mapped to the transfer elements of the state flow diagram, and the trigger elements, guard elements and influence elements of the state transitions are respectively mapped to the transfer events, transfer guards and transfer influences of the transfer elements.

[0174] In one embodiment, the target electronic device controls the operating elements of the system, including:

[0175] The electronic device control system is initially in the off state; when the electronic device control system is turned on using the remote control, the electronic device control system enters the running state; when the electronic device control system is turned off using the remote control, the electronic device control system enters the off state; in the running state, the electronic device control system is in the cooling state by default; when the electronic device control system state is changed using the remote control, the electronic device control system switches between the cooling state and the heating state.

[0176] In this application, only some components are shown schematically in FIG8 , which does not mean that the terminal device only includes the components shown in FIG8 .

[0177] The terminal device provided in this embodiment is based on the same inventive concept as the model conversion method and simulation method provided in the embodiment of the present application, and has the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.

[0178] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0179] The present application is described with reference to the flow chart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present application. It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processing machine or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for realizing the function specified in one flow chart flow or multiple flows and / or one box or multiple boxes of the block diagram.

[0180] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0181] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0182] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0183] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0184] The present application also provides a computer-readable storage medium corresponding to the model conversion method and simulation method provided in the aforementioned embodiments, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it will execute the model conversion method provided in any of the aforementioned embodiments, or execute the simulation method provided in any of the aforementioned embodiments.

[0185] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0186] The computer-readable storage medium provided in the above-mentioned embodiments of the present application and the model conversion method and simulation method provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the application programs stored therein.

[0187] It should be noted that, in the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known structures and technologies are not shown in detail so as not to obscure the understanding of this description.

[0188] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0189] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A simulation method for an electronic equipment control system, characterized in that: include: Analyze the target electronic equipment control system and determine the operating elements of the target electronic equipment control system; Based on the operating elements of the target electronic device control system, construct a SysML model of the target electronic device control system; According to a preset model conversion method, the SysML model of the target electronic device control system is converted into a Simulink model of the target electronic device control system; The target electronic device control system is simulated based on the target electronic device control system Simulink model.

2. The method according to claim 1, characterized in that The operating elements of the target electronic device control system include: The electronic equipment control system is initially in a closed state; When the electronic device control system is turned on using the remote controller, the electronic device control system enters the operating state; When the electronic device control system is turned off using the remote controller, the electronic device control system enters a turned-off state; In the operating state, the electronic equipment control system is in the cooling state by default; When the state of the electronic device control system is changed using the remote controller, the electronic device control system switches between a cooling state and a heating state.

3. The method according to claim 1, characterized in that The model conversion method comprises: Obtain the constructed SysML model of the target system; Construct mapping rules for converting SysML models to Simulink models; Based on the mapping rules, a Simulink model of the target system is determined.

4. The method according to claim 3, characterized in that The SysML model includes a state machine diagram, and the Simulink model includes a state flow diagram; In the mapping rule for converting the SysML model into the Simulink model, the state machine diagram of the SysML model is mapped to the state flow diagram of the Simulink model.

5. The method according to claim 4, characterized in that The state machine diagram includes input variables, local variables and output variables, and the state flow diagram includes input data, local data and output data. The state machine diagram of the SysML model is mapped to the state flow diagram of the Simulink model, including: The input variables of the state machine diagram are mapped to the input data of the state flow diagram; The local variables of the state machine diagram are mapped to the local data of the state flow diagram; The output variables of the state machine diagram are mapped to the output data of the state flow diagram.

6. The method according to claim 5, characterized in that The state machine diagram further includes simple states, state transitions and composite states, the state transitions include trigger elements, guard elements and influence elements, the state flow diagram includes state elements, transfer elements and block elements, the transfer elements include transfer events, transfer guards and transfer influences; The state machine diagram of the SysML model is mapped to the state flow diagram of the Simulink model, further comprising: The simple states of the state machine diagram are mapped to the state elements of the state flow diagram; The state transition of the state machine diagram is mapped as a transfer element of the state flow diagram; The composite states of the state machine diagram are mapped to block elements of the state flow diagram; The state transition of the state machine diagram is mapped to the transition element of the state flow diagram, and the trigger element, guard element and influence element of the state transition are respectively mapped to the transition event, transition guard and transition influence of the transition element.

7. A simulation device for an electronic equipment control system, characterized in that: include: A system analysis module, which is used to analyze the control system of the target electronic equipment and determine the operating elements of the control system of the target electronic equipment; A model building module, which is used to build a SysML model of the target electronic device control system based on the operating elements of the target electronic device control system; A model conversion module, which is used to convert the SysML model of the target electronic device control system into a Simulink model of the target electronic device control system according to a preset model conversion method; A system simulation module is used to simulate the target electronic device control system based on the target electronic device control system Simulink model.

8. A terminal device, characterized in that: include: Memory and processor; The memory is used to store programs; The processor is coupled to the memory and is used to execute the program to implement any one of claims 1 to 6. The method described.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Multiplexing missile modeling method based on Simulink and Stateflow

    CN111950085A

  • State machine model and Simulink joint simulation method

    CN114547886A

  • Model verification method suitable for SysML, Simulink and AADL distributed system

    CN114647401A

  • Simulation method and device of electronic equipment control system, equipment and storage medium

    CN116719601A

  • Systems and methods for the automatic realization of models for co-simulation

    DE102019003851A1

Cited By

  • Multi-target conflict coordination method for model mapping configuration optimization

    CN121072725A