CN104133948B - A kind of simulation model generation method, system and simulation model - Google Patents

A kind of simulation model generation method, system and simulation model Download PDF

Info

Publication number
CN104133948B
CN104133948B CN201410338482.1A CN201410338482A CN104133948B CN 104133948 B CN104133948 B CN 104133948B CN 201410338482 A CN201410338482 A CN 201410338482A CN 104133948 B CN104133948 B CN 104133948B
Authority
CN
China
Prior art keywords
data
model
simulation model
lookup table
logical model
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.)
Active
Application number
CN201410338482.1A
Other languages
Chinese (zh)
Other versions
CN104133948A (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.)
Weichai Power Co Ltd
Original Assignee
Weichai Power Co Ltd
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 Weichai Power Co Ltd filed Critical Weichai Power Co Ltd
Priority to CN201410338482.1A priority Critical patent/CN104133948B/en
Publication of CN104133948A publication Critical patent/CN104133948A/en
Application granted granted Critical
Publication of CN104133948B publication Critical patent/CN104133948B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the present invention provides a kind of simulation model generation method, system and simulation model, and methods described includes:Selected logical model, parses input data and output data that the logical model includes, and extract the lookup table data that the logical model includes;Data configuration scheme is generated according to the input data, the output data and the lookup table data;The logical model and data configuration scheme are encapsulated as simulation model.

Description

A kind of simulation model generation method, system and simulation model
Technical field
The present invention relates to emulation testing technical field, more particularly to a kind of simulation model generation method, system and emulation mould Type.
Background technology
MATLAB is a kind of Model-based diagnosis core tool;And Simulink is the most important components of MATLAB One of, Simulink can provide the integration environment of Modelling of Dynamic System, emulation and comprehensive analysis.At this stage engine electric-controlled During system development, it will pass through Simulink and build logical model, and emulation testing is completed using logical model.
But in the prior art, the logical model built using Simulink, it can only make among emulation testing For the instrument of a saving calculating process.Use for complex logic model needs to give staff deep to the model Understand;The checking and judgement of output data, it is also necessary to evaluated by the actual conditions and effect of model running.
It can be said that the shortcomings that prior art is, emulation testing, the use and test of model are carried out using logical model As a result judgement all excessively relies on artificial, it is necessary to which staff has sufficient understanding for the principle of model, for staff's increasing Work load is added, and efficiency is low.
The content of the invention
In view of this, it is an object of the invention to provide a kind of simulation model generation method, system and simulation model, in institute Encapsulation such as traditional logical model and corresponding data configuration scheme in simulation model is stated, realizes the higher emulation of automaticity Test and more easily test result judge.
To achieve the above object, the present invention has following technical scheme:
A kind of simulation model generation method, methods described include:
Selected logical model, parses input data and output data that the logical model includes, and extract the logic The lookup table data that model includes;
Data configuration scheme is generated according to the input data, the output data and the lookup table data;
The logical model and data configuration scheme are encapsulated as simulation model.
It is described setting data configuration scheme be specially:
For valid data scope corresponding to the setting of the input data, output data and lookup table data, by the conjunction Method data area generates the data configuration scheme.
The lookup table data that the extraction logical model includes is specially:
From the ECU data by demarcation, the lookup table data that the logical model includes is extracted.
It is described the logical model is encapsulated as simulation model with data configuration scheme also to include:
In encapsulation process, the simulation model is encrypted.
A kind of simulation model generates system, and the system includes:
Data acquisition module, for selecting logical model, parse input data and output number that the logical model includes According to, and extract the lookup table data that the logical model includes;
Arrangements module, for generating number according to the input data, the output data and the lookup table data According to allocation plan;
Model encapsulation module, for the logical model and data configuration scheme to be encapsulated as into simulation model.
The arrangements module includes:
Setup unit, for for valid data corresponding to the setting of the input data, output data and lookup table data Scope;
Dispensing unit, for the valid data scope to be generated into the data configuration scheme.
The system also includes:
Encrypting module, in encapsulation process, being encrypted to the simulation model.
A kind of simulation model, the simulation model include logical model and data allocation plan, the data configuration scheme Input data, output data and lookup table data in the logical model and generate.
The data configuration scheme is specially:
For the input data and output data for parsing to obtain from the logical model, and the inquiry table number that extraction obtains According to valid data scope corresponding to setting;The valid data scope is generated into the data configuration scheme.
The simulation model is encrypted encapsulation by logical model and data allocation plan and generated.
As seen through the above technical solutions, beneficial effect existing for the present invention is:As seen through the above technical solutions, this reality Applying beneficial effect existing for example is:Encapsulate to obtain simulation model by data configuration scheme and logical model so that for emulation The checking and judgement of test result are completed by data configuration scheme, without the actual conditions and effect by operation;Also make The utilization and control of simulation model are further departing from the pattern of craft so that the emulation carried out using the simulation model is surveyed Examination has higher automaticity;The security of simulation model is ensure that by encryption.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are the present invention Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis These accompanying drawings obtain other accompanying drawings.
Fig. 1 is methods described flow chart of the embodiment of the present invention;
Fig. 2 is logical model structural representation described in the embodiment of the present invention;
Fig. 3 is system structure diagram described in the embodiment of the present invention;
Fig. 4 is simulation model structural representation described in the embodiment of the present invention.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is Part of the embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
By for traditional logical model combination data allocation plan in the present invention, to obtain highly efficient being easy to operation and using Simulation model.It is shown in Figure 1, it is a specific embodiment of the method for the invention.In the present embodiment, methods described bag Include following steps:
Step 101, selected logical model, parse input data and output data that the logical model includes, and extract The lookup table data that the logical model includes.
In the present embodiment, a logical model built using Simulink is predefined first.It is shown in Figure 2, be The structural representation of logical model described in the present embodiment.In logical model shown in Fig. 2, include input 1~input 5 totally 5 altogether Individual input data, output 1~totally 4 output datas of output 4, totally 3 lookup datas of 1~lookup data of lookup data 3.Input number According to the design determined in logical model build process with output data, and lookup data is derived from ECU data.
After logical model determination, you can parse input data and output data that the logical model includes, then from By in the ECU data of demarcation, extracting the lookup table data that the logical model includes.Subsequently for input data, output number Data configuration scheme is generated according to lookup table data.
Step 102, according to the input data, the output data and the lookup table data generate data configuration side Case.
The data configuration scheme, it on the one hand can be used for guiding the substitution of input data and output data in logical model Extraction, that is to say, that may include the input interface of input data and the output interface of output data in data configuration scheme;By During this improves emulation testing, the automaticity of model startup optimization;So that utilization and control for model, enter one The pattern departing from craft of step.
On the other hand, using data configuration scheme, more intuitively related data can also be verified and judged.Tool For body, generation data configuration scheme can be for corresponding to the input data, output data and lookup table data setting Valid data scope, the valid data scope is generated into the data configuration scheme.That is, the data configuration scheme In show the legal ranges of three kinds of data, thus directly the operation result of simulation model can be entered by data configuration scheme Row checking and judgement, without the actual conditions and effect by operation.
Restriction of the data configuration scheme for data legal range, refer to next section of logic mechanism:
PROJECT test
FUNCTION AccPed
FILENAME AccPed.mdl
Lookup table data 1
Lookup table data 1_X
Lookup table data 1_Y
Lookup table data 2
Lookup table data 2_X
Lookup table data 2_Y
Lookup table data 3
Lookup table data 3_X
Input 10,1,2,3,4,5,6,7,8,9
Input 20,1,2,3,4,5,6,7,8,9
Input 30,1,2,3,4,5,6,7,8,9
Input 40,1,2,3,4,5,6,7,8,9
Input 50,1,2,3,4,5,6,7,8,9
Export 1+0-10
Export 2+0-10
Export 3+0-10
Export 4+0-10
END
Above logic mechanism defines, the legal range of 5 kinds of input datas is 0~9 10 integers, the conjunction of output data Method scope is the real number in 0~10 section, and defines coordinate axis information corresponding to form in lookup table data.
Step 103, the logical model and data configuration scheme be encapsulated as simulation model.
Data configuration scheme is further encapsulated as the simulation model of a similar black box, the emulation mould with logical model Type can realize the carry out emulation testing of the higher automaticity on the basis of traditional logic model;The utilization of simulation model and Control is further departing from the pattern of craft;And the operation result of simulation model is verified and judged, without by means of Help the actual conditions and effect of operation.
Preferably, the simulation model can also be encrypted according to demand during encapsulation.This area Middle conventional cipher mode, can be incorporated under the present embodiment overall technical architecture, not limit specifically herein.
As seen through the above technical solutions, beneficial effect existing for the present embodiment is:Pass through data configuration scheme and logic Model encapsulation obtains simulation model so that and checking and judgement for the simulation results are completed by data configuration scheme, and Without the actual conditions and effect of operation;Also make the utilization of simulation model and control further departing from the mould of craft Formula so that the emulation testing carried out using the simulation model has higher automaticity;It ensure that by encryption The security of simulation model.
It is shown in Figure 3, it is the specific embodiment of system of the present invention, in the present embodiment, the system is used to perform Method described in embodiment illustrated in fig. 1, the two technical scheme is substantially consistent, is accordingly described in previous embodiment, same suitable For in the present embodiment.System includes described in the present embodiment:
Data acquisition module, for selecting logical model, parse input data and output number that the logical model includes According to, and extract the lookup table data that the logical model includes.
Arrangements module, for generating number according to the input data, the output data and the lookup table data According to allocation plan.
The arrangements module includes:
Setup unit, for for valid data corresponding to the setting of the input data, output data and lookup table data Scope.
Dispensing unit, for the valid data scope to be generated into the data configuration scheme.
Model encapsulation module, for the logical model and data configuration scheme to be encapsulated as into simulation model.
Encrypting module, in encapsulation process, being encrypted to the simulation model.
As seen through the above technical solutions, beneficial effect existing for the present embodiment is:Pass through data configuration scheme and logic Model encapsulation obtains simulation model so that and checking and judgement for the simulation results are completed by data configuration scheme, and Without the actual conditions and effect of operation;Also make the utilization of simulation model and control further departing from the mould of craft Formula so that the emulation testing carried out using the simulation model has higher automaticity;It ensure that by encryption The security of simulation model.
It is the specific embodiment of simulation model of the present invention referring to described in Fig. 4.In the present embodiment, the simulation model I.e. using the simulation model of the generation of method shown in Fig. 1, the two technical scheme is substantially consistent, is accordingly described in previous embodiment. In the present embodiment, the simulation model is specially:
The simulation model includes logical model and data allocation plan, and the data configuration scheme is according to the logic mould Input data, output data and lookup table data in type and generate.
The data configuration scheme is specially:
For the input data and output data for parsing to obtain from the logical model, and the inquiry table number that extraction obtains According to valid data scope corresponding to setting;The valid data scope is generated into the data configuration scheme.
The simulation model is encrypted encapsulation by logical model and data allocation plan and generated.
As seen through the above technical solutions, beneficial effect existing for the present embodiment is:Pass through data configuration scheme and logic Model encapsulation obtains simulation model so that and checking and judgement for the simulation results are completed by data configuration scheme, and Without the actual conditions and effect of operation;Also make the utilization of simulation model and control further departing from the mould of craft Formula so that the emulation testing carried out using the simulation model has higher automaticity;It ensure that by encryption The security of simulation model.
Described above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should It is considered as protection scope of the present invention.

Claims (5)

1. a kind of simulation model generation method, it is characterised in that methods described includes:
Selected logical model, parses input data and output data that the logical model includes, and extract the logical model Including lookup table data;
Data configuration scheme is generated according to the input data, the output data and the lookup table data;
The logical model and data configuration scheme are encapsulated as simulation model;
It is described generation data configuration scheme be specially:
For valid data scope corresponding to the setting of the input data, output data and lookup table data, by the legal number The data configuration scheme is generated according to scope.
2. method according to claim 1, it is characterised in that the lookup table data tool that the extraction logical model includes Body is:
From the ECU data by demarcation, the lookup table data that the logical model includes is extracted.
3. method according to claim 1, it is characterised in that described to be encapsulated as the logical model and data configuration scheme Simulation model also includes:
In encapsulation process, the simulation model is encrypted.
4. a kind of simulation model generates system, it is characterised in that the system includes:
Data acquisition module, for selecting logical model, input data and output data that the logical model includes are parsed, and Extract the lookup table data that the logical model includes;
Arrangements module, match somebody with somebody for generating data according to the input data, the output data and the lookup table data Put scheme;
Model encapsulation module, for the logical model and data configuration scheme to be encapsulated as into simulation model;
The arrangements module includes:
Setup unit, for for valid data scope corresponding to the setting of the input data, output data and lookup table data;
Dispensing unit, for the valid data scope to be generated into the data configuration scheme.
5. system according to claim 4, it is characterised in that the system also includes:
Encrypting module, in encapsulation process, being encrypted to the simulation model.
CN201410338482.1A 2014-07-16 2014-07-16 A kind of simulation model generation method, system and simulation model Active CN104133948B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410338482.1A CN104133948B (en) 2014-07-16 2014-07-16 A kind of simulation model generation method, system and simulation model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410338482.1A CN104133948B (en) 2014-07-16 2014-07-16 A kind of simulation model generation method, system and simulation model

Publications (2)

Publication Number Publication Date
CN104133948A CN104133948A (en) 2014-11-05
CN104133948B true CN104133948B (en) 2018-02-02

Family

ID=51806624

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410338482.1A Active CN104133948B (en) 2014-07-16 2014-07-16 A kind of simulation model generation method, system and simulation model

Country Status (1)

Country Link
CN (1) CN104133948B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105608978A (en) * 2016-02-15 2016-05-25 余启佳 Simulation model for magnetic suspension Boeing 747 airliner
CN106484621B (en) * 2016-10-13 2018-12-14 北京润科通用技术有限公司 A kind of method for generating test case and device
CN106502897B (en) * 2016-10-24 2019-03-12 北京润科通用技术有限公司 Test model generation method and device
CN109586963B (en) * 2018-11-30 2022-03-04 北京仿真中心 Cloud simulation platform security guarantee system, server, terminal and method
CN114424196A (en) * 2019-09-30 2022-04-29 西门子股份公司 Nonlinear model linearization processing method, device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201812197U (en) * 2010-06-09 2011-04-27 北京经纬恒润科技有限公司 Device for testing automobile electronic control system
CN102393819A (en) * 2011-11-08 2012-03-28 上海师范大学 MATLAB (matrix laboratory)-based fuzzy controller HDL (hardware description language) code automatic generation method
CN103455643A (en) * 2012-05-29 2013-12-18 北京神州普惠科技股份有限公司 Describing and modeling method of general simulation assemblies

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7337430B2 (en) * 2001-07-20 2008-02-26 The Mathworks, Inc. Optimized look-up table calculations in block diagram software

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201812197U (en) * 2010-06-09 2011-04-27 北京经纬恒润科技有限公司 Device for testing automobile electronic control system
CN102393819A (en) * 2011-11-08 2012-03-28 上海师范大学 MATLAB (matrix laboratory)-based fuzzy controller HDL (hardware description language) code automatic generation method
CN103455643A (en) * 2012-05-29 2013-12-18 北京神州普惠科技股份有限公司 Describing and modeling method of general simulation assemblies

Also Published As

Publication number Publication date
CN104133948A (en) 2014-11-05

Similar Documents

Publication Publication Date Title
CN104133948B (en) A kind of simulation model generation method, system and simulation model
CN104991863B (en) A kind of method that test case is automatically generated based on FBD test model
CN106886411A (en) A kind of protective relaying device logic figure collocation method based on QT
CN103593809A (en) Intelligent operation-ticket semanteme verification method of automatic power dispatching system
CN108038294A (en) UVM environmental structure method and systems
CN103810092A (en) Application system testing method and device
CN106777529A (en) Integrated circuit fault-resistant injection attacks capability assessment method based on FPGA
CN104123400A (en) Global-Local detail finite element method based on force method
CN106779582A (en) A kind of TWS flows collocation method and device
CN104636521A (en) Smart card chip security authentication method based on VMM and authentication environment platform
CN105740579A (en) Building method for connecting UVM verification platform
CN107193559A (en) A kind of complication system virtual Prototype method based on meta-model
CN105045698A (en) Method for analyzing chip verification progress by using MATPLOTLIB of PYTHON
CN106021571A (en) Method and device for generating oil production engineering scheme
CN105786787A (en) Efficient PDF report form testing method based on Java
CN102183896A (en) System for testing protection logic by utilizing Matlab
CN104679963A (en) Simulation and verification device and simulation and verification method based on TCL
CN101216769A (en) Hiberarchy system description language SmartC to C code automatic conversion method
CN102214252A (en) Method for carrying out parameter extraction and modeling on semiconductor device
Li et al. Mode of débitage and technical cognition of hominids at the Guanyindong site
CN105718617B (en) The reversed method for automatic modeling of Bus structural body tested automatically for Matlab
CN103901342B (en) A kind of accurate fault injection systems of FPGA based on mask file
CN103017815A (en) Visual general test system and visual general test method
Venditti Innovative models and algorithms for the optimization of layout and control strategy of complex diesel HEVs
Zhang et al. Integration design and model transformation for cyber physical systems

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Huang Jixuan

Inventor after: Li Yunqiang

Inventor before: Huang Jixuan

GR01 Patent grant
GR01 Patent grant