Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Self-adapting simulation and code generation control method in Simulink

A code generation and control method technology, applied in the field of automotive electronics embedded system development, can solve the problems that cannot meet the needs of modeling and code generation, large system development time, cumbersome modeling process, etc., to save system development time, Improve generation efficiency and display intuitive effects

Active Publication Date: 2014-10-08
CHINA NORTH ENGINE INST TIANJIN
View PDF5 Cites 8 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the custom module cannot obtain the fixed-point type attribute of the parameter by reading the parameter of the fixed-point type, which will cause the custom module to use the wrong data type to output the result calculated by the parameter, and make the output of the module wrong.
Although this problem can be solved by writing a specific custom module for each fixed-point type parameter with different attributes, it will consume a lot of system development time, and when the fixed-point type attribute of the parameter changes, all related modules need to be replaced. Custom modules make the modeling process very cumbersome and cannot meet the needs of modeling and code generation

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Self-adapting simulation and code generation control method in Simulink

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0014] The present invention will be described in detail below in conjunction with the accompanying drawings and embodiments.

[0015] Such as figure 1 As shown, an adaptive simulation and code generation control method in Simulink,

[0016] 1) Create a Simulink.Parameter type or similar type of parameter in MATLAB / Simulink, which uses a built-in data type or a custom Simulink.NumericType or Simulink.AliasType type of data type;

[0017] 2) Write the S function, the parameters of the S function include at least the parameters of the Simulink.Parameter type or similar types, the data type name of the parameter, and the data type number of the parameter, the S function can be determined according to the data type name The data type of the parameter, the S function reads the numerical value of the parameter according to the data type of the parameter when outputting the simulation result, and calculates the output, converts the output numerical value according to the out...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to a self-adapting simulation and code generation control method in Simulink. The method comprises the steps that (1), the Simulink.Parameter type or similar type parameters are created in MATLAB / Simulink; (2), an S function is written; (3), an S function module is created in Simulink model files, and the S function is connected to the S function module; (4), the name of the parameters is input into a GUI tool, and the tool automatically reads the information of the various parameters needed by the S function and sets parameters of the S function module; (5), a TLC file is written, the TLC file reads the parameter information of the S function and other information relevant to the S function, and determines data types of the parameters according to the serial number of the data types, and user-defined codes with different specified formats can be generated. The self-adapting simulation and code generation control method can greatly improve modeling and code generation efficiency, and has high practicability.

Description

technical field [0001] The invention relates to the field of automotive electronic embedded system development, in particular to automatic code generation based on MATLAB / Simulink, and in particular to a control method for self-defined module data type adaptive simulation and code generation in Simulink. Background technique [0002] In the field of automotive electronics, embedded systems are used more and more widely, and most of them use microprocessors as the control core. The model-based V-type development method can realize the modeling and simulation of the controller model, rapid prototyping, automatic code generation, hardware-in-the-loop simulation and system application. MATLAB / Simulink is a modeling simulation and automatic code generation tool commonly used today, which can complete the entire process of modeling simulation, rapid prototyping and automatic code generation. Simulink provides a large number of built-in modules for modeling and code generation, b...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F17/50
Inventor 褚全红方成张维彪范燕朝吴飚胡勇郭佳旭杨凤秋
Owner CHINA NORTH ENGINE INST TIANJIN
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products